Header file containing functions prototypes of COMP LL library. More...
#include "gr5x.h"
Go to the source code of this file.
Classes | |
struct | _ll_comp_init |
LL COMP init Structure definition. More... | |
Macros | |
#define | LL_COMP_INPUT_SRC_IO0 (0UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_IO1 (1UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_IO2 (2UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_IO3 (3UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_IO4 (4UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_IO5 (5UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_IO6 (6UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_IO7 (7UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_VBAT (9UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_INPUT_SRC_VREF (10UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_P_Pos) |
#define | LL_COMP_REF_SRC_IO0 (0UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_IO1 (1UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_IO2 (2UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_IO3 (3UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_IO4 (4UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_IO5 (5UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_IO6 (6UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_IO7 (7UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_VBAT (9UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_REF_SRC_VREF (10UL << AON_PMU_COMP_REG_0_CHANNEL_SEL_N_Pos) |
#define | LL_COMP_HYST_POSITIVE (1UL << AON_PMU_COMP_REG_0_POSITIVE_HYS_EN_Pos ) |
#define | LL_COMP_HYST_NEGATIVE (1UL << AON_PMU_COMP_REG_0_NEGATIVE_HYS_EN_Pos ) |
#define | LL_COMP_RES_DEGENERATION_POSITIVE (1UL << AON_PMU_COMP_REG_1_CHANNEL_POSITIVE_RES_DEGENERATION_Pos ) |
#define | LL_COMP_RES_DEGENERATION_NEGATIVE (1UL << AON_PMU_COMP_REG_1_CHANNEL_NEGATIVE_RES_DEGENERATION_Pos ) |
#define | LL_COMP_WAKEUP_EDGE_BOTH ( 0UL ) |
#define | LL_COMP_WAKEUP_EDGE_FALLING ( 1UL ) |
#define | LL_COMP_WAKEUP_EDGE_RISING ( 2UL ) |
#define | LL_COMP_WriteReg(__instance__, __REG__, __VALUE__) WRITE_REG((__instance__)->__REG__, (__VALUE__)) |
Write a value in COMP register. More... | |
#define | LL_COMP_ReadReg(__instance__, __REG__) READ_REG((__instance__)->__REG__) |
Read a value in COMP register. More... | |
#define | LL_COMP_DEFAULT_CONFIG |
Default configuartion for initializing structure. More... | |
Typedefs | |
typedef struct _ll_comp_init | ll_comp_init_t |
LL COMP init Structure definition. More... | |
Functions | |
__STATIC_INLINE void | ll_comp_enable (void) |
Enable COMP module. More... | |
__STATIC_INLINE void | ll_comp_disable (void) |
Disable COMP module. More... | |
__STATIC_INLINE void | ll_comp_set_input_src (uint32_t source) |
Set channel of COMP input source. More... | |
__STATIC_INLINE void | ll_comp_set_ref_src (uint32_t source) |
Set channel of COMP reference source. More... | |
__STATIC_INLINE void | ll_comp_set_vbatt_lvl (uint32_t level) |
Set VBATT control level. More... | |
__STATIC_INLINE void | ll_comp_set_vref_lvl (uint32_t level) |
Set VREF control level. More... | |
__STATIC_INLINE void | ll_comp_set_current (uint32_t level) |
set current of comparator. More... | |
__STATIC_INLINE void | ll_comp_cascres_half_high (uint32_t level) |
set power of comparator. More... | |
__STATIC_INLINE void | ll_comp_positive_hysteresis (uint32_t hyst) |
Set positive hysteresis comparator. More... | |
__STATIC_INLINE void | ll_comp_negative_hysteresis (uint32_t hyst) |
Set negative hysteresis comparator. More... | |
__STATIC_INLINE void | ll_comp_positive_degeneration (uint32_t res_deg) |
Set calibration of comparator. More... | |
__STATIC_INLINE void | ll_comp_negative_degeneration (uint32_t res_deg) |
Set calibration of comparator. More... | |
__STATIC_INLINE void | ll_comp_enable_rising_wakeup (void) |
Enable Wakeup Interrupt for COMP Rising. More... | |
__STATIC_INLINE void | ll_comp_disable_rising_wakeup (void) |
Disable Wakeup Interrupt for COMP Rising. More... | |
__STATIC_INLINE uint32_t | ll_comp_is_enable_rising_wakeup (void) |
Get Wakeup Interrupt for COMP Rising. More... | |
__STATIC_INLINE void | ll_comp_enable_falling_wakeup (void) |
Enable Wakeup Interrupt for COMP Falling. More... | |
__STATIC_INLINE void | ll_comp_disable_falling_wakeup (void) |
Disable Wakeup Interrupt for COMP Falling. More... | |
__STATIC_INLINE uint32_t | ll_comp_is_enable_falling_wakeup (void) |
Get Wakeup Interrupt for COMP Falling. More... | |
__STATIC_FORCEINLINE uint32_t | ll_comp_is_rising_triger_flag_it (void) |
Indicate if the COMP rising_triger Flag is set or not. More... | |
__STATIC_FORCEINLINE void | ll_comp_clear_rising_triger_flag_it (void) |
Clear rising_triger flag for COMP. More... | |
__STATIC_FORCEINLINE uint32_t | ll_comp_is_falling_triger_flag_it (void) |
Indicate if the COMP falling_triger Flag is set or not. More... | |
__STATIC_FORCEINLINE void | ll_comp_clear_falling_triger_flag_it (void) |
Clear falling_triger flag for COMP. More... | |
__STATIC_INLINE void | ll_comp_set_remove_cycle (uint32_t cycle) |
Set compator glitch remove cycles. More... | |
__STATIC_INLINE uint32_t | ll_comp_get_remove_cycle (void) |
Set compator glitch remove cycles. More... | |
void | ll_comp_deinit (void) |
De-initialize COMP registers (Registers restored to their default values). More... | |
void | ll_comp_init (const ll_comp_init_t *p_comp_init) |
Initialize COMP registers according to the specified. parameters in p_comp_init. More... | |
void | ll_comp_struct_init (ll_comp_init_t *p_comp_init) |
Set each field of a ll_comp_init_t type structure to default value. More... | |
Header file containing functions prototypes of COMP LL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file ll_comp.h.