FD32M0P Microcontroller SDK
|
Data Structures | |
struct | comp_cfg_s |
COMP Configuration Struct. More... | |
struct | comp_win_comp_cfg_s |
struct | comp_out_cfg_s |
Enumerations | |
enum | COMP_HYST_E { COMP_HYST_DISABLED = COMP_CTRL0_HYST_DISABLED , COMP_HYST_LOW = COMP_CTRL0_HYST_LOW , COMP_HYST_MEDIUM = COMP_CTRL0_HYST_MEDIUM , COMP_HYST_HIGH = COMP_CTRL0_HYST_HIGH } |
enum | COMP_INTR_EDGE_SEL_E { COMP_E0_POS_E1_NEG = COMP_CTRL0_INTR_EDGE_SEL_E0_POS_E1_NEG , COMP_E0_NEG_E1_POS = COMP_CTRL0_INTR_EDGE_SEL_E0_NEG_E1_POS } |
enum | COMP_IN_P_SEL_E { COMP_IN_P_SEL_NON_INV_0 = COMP_INPUT_CTRL0_IN_P_SEL_NON_INV_0 , COMP_IN_P_SEL_NON_INV_1 = COMP_INPUT_CTRL0_IN_P_SEL_NON_INV_1 , COMP_IN_P_SEL_COMP0_NON_INV_2 = COMP_INPUT_CTRL0_IN_P_SEL_COMP0_NON_INV_2 , COMP_IN_P_SEL_COMP1_NON_INV_2 = COMP_INPUT_CTRL0_IN_P_SEL_COMP1_NON_INV_2 , COMP_IN_P_SEL_COMP0_DAC_CONN = COMP_INPUT_CTRL0_IN_P_SEL_COMP0_DAC_CONN , COMP_IN_P_SEL_COMP1_DAC_CONN = COMP_INPUT_CTRL0_IN_P_SEL_COMP1_DAC_CONN , COMP_IN_P_SEL_COMP0_OPA1_CONN = COMP_INPUT_CTRL0_IN_P_SEL_COMP0_OPA1_CONN , COMP_IN_P_SEL_COMP1_GND = COMP_INPUT_CTRL0_IN_P_SEL_COMP1_GND , COMP_IN_P_SEL_COMP0_PSEL_CONN = COMP_INPUT_CTRL0_IN_P_SEL_COMP0_PSEL_CONN , COMP_IN_P_SEL_COMP1_PSEL_CONN = COMP_INPUT_CTRL0_IN_P_SEL_COMP1_PSEL_CONN } |
enum | COMP_IN_M_SEL_E { COMP_IN_M_SEL_INV_0 = COMP_INPUT_CTRL0_IN_M_SEL_INV_0 , COMP_IN_M_SEL_INV_1 = COMP_INPUT_CTRL0_IN_M_SEL_INV_1 , COMP_IN_M_SEL_COMP0_INV_2 = COMP_INPUT_CTRL0_IN_M_SEL_COMP0_INV_2 , COMP_IN_M_SEL_COMP1_INV_2 = COMP_INPUT_CTRL0_IN_M_SEL_COMP1_INV_2 , COMP_IN_M_SEL_COMP0_OPA0_CONN = COMP_INPUT_CTRL0_IN_M_SEL_COMP0_OPA0_CONN } |
enum | COMP_WIN_COMP_SEL_E { COMP_WIN_COMP_SEL_0 = COMP_OUT_CTRL1_WIN_COMP_SEL_0 , COMP_WIN_COMP_SEL_1 = COMP_OUT_CTRL1_WIN_COMP_SEL_1 , COMP_WIN_COMP_SEL_2 = COMP_OUT_CTRL1_WIN_COMP_SEL_2 } |
enum | COMP_OUT_POL_E { COMP_OUT_POL_NON_INV = COMP_OUT_CTRL0_OUT_POL_NON_INV , COMP_OUT_POL_INV = COMP_OUT_CTRL0_OUT_POL_INV } |
Functions | |
void | comp_cfg (COMP_REGS_s *regs, comp_cfg_s comp_cfg) |
This function configures comparator. | |
void | comp_win_comp_cfg (COMP_REGS_s *regs, comp_win_comp_cfg_s win_comp_cfg) |
This function configures window comparator operation in comparator. | |
void | comp_out_cfg (COMP_REGS_s *regs, comp_out_cfg_s comp_out_cfg) |
This function configures output of comparator. | |
comp_cfg_s | get_comp_cfg (COMP_REGS_s *regs) |
This function returns comparator configuration. | |
comp_win_comp_cfg_s | get_comp_win_comp_cfg (COMP_REGS_s *regs) |
This function returns window comparator configuration in comparator. | |
comp_out_cfg_s | get_comp_out_cfg (COMP_REGS_s *regs) |
This function returns output configuration of comparator. | |
uint32_t | get_comp_out_sts (COMP_REGS_s *regs) |
This function returns output of comparator. |
struct comp_cfg_s |
COMP Configuration Struct.
Data Fields | ||
---|---|---|
uint32_t | enable | |
COMP_HYST_E | hyst | |
COMP_INTR_EDGE_SEL_E | intr_edge_sel | |
COMP_IN_P_SEL_E | in_p_en | |
uint32_t | in_p_sel | |
uint32_t | in_m_en | |
COMP_IN_M_SEL_E | in_m_sel | |
uint32_t | in_short | |
uint32_t | in_swap |
struct comp_win_comp_cfg_s |
Data Fields | ||
---|---|---|
uint32_t | enable | |
COMP_WIN_COMP_SEL_E | win_comp_sel |
struct comp_out_cfg_s |
Data Fields | ||
---|---|---|
uint32_t | samp_en | |
COMP_OUT_POL_E | out_pol |
enum COMP_HYST_E |
enum COMP_INTR_EDGE_SEL_E |
enum COMP_IN_P_SEL_E |
enum COMP_IN_M_SEL_E |
enum COMP_WIN_COMP_SEL_E |
enum COMP_OUT_POL_E |
void comp_cfg | ( | COMP_REGS_s * | regs, |
comp_cfg_s | comp_cfg ) |
This function configures comparator.
regs | : pointer to the COMP register space |
comp_cfg | : comp configuration struct |
void |
References comp_cfg(), COMP_REGS_s::CTRL0, COMP_REGS_s::INPUT_CTRL0, and COMP_REGS_s::INPUT_CTRL1.
Referenced by comp_cfg(), and get_comp_cfg().
void comp_win_comp_cfg | ( | COMP_REGS_s * | regs, |
comp_win_comp_cfg_s | win_comp_cfg ) |
This function configures window comparator operation in comparator.
regs | : pointer to the COMP register space |
win_comp_cfg | : window comp configuration struct |
void |
References comp_win_comp_cfg_s::enable, COMP_REGS_s::OUT_CTRL1, and comp_win_comp_cfg_s::win_comp_sel.
void comp_out_cfg | ( | COMP_REGS_s * | regs, |
comp_out_cfg_s | comp_out_cfg ) |
This function configures output of comparator.
regs | : pointer to the COMP register space |
comp_out_cfg | : comparator output configuration struct |
void |
References comp_out_cfg(), and COMP_REGS_s::OUT_CTRL0.
Referenced by comp_out_cfg(), and get_comp_out_cfg().
comp_cfg_s get_comp_cfg | ( | COMP_REGS_s * | regs | ) |
This function returns comparator configuration.
regs | : pointer to the COMP register space |
Comparator | configuration |
References comp_cfg(), COMP_REGS_s::CTRL0, COMP_REGS_s::INPUT_CTRL0, and COMP_REGS_s::INPUT_CTRL1.
comp_win_comp_cfg_s get_comp_win_comp_cfg | ( | COMP_REGS_s * | regs | ) |
This function returns window comparator configuration in comparator.
regs | : pointer to the COMP register space |
Window | comparator configuration |
References comp_win_comp_cfg_s::enable, COMP_REGS_s::OUT_CTRL1, and comp_win_comp_cfg_s::win_comp_sel.
comp_out_cfg_s get_comp_out_cfg | ( | COMP_REGS_s * | regs | ) |
This function returns output configuration of comparator.
regs | : pointer to the COMP register space |
Comparator | output configuration |
References comp_out_cfg(), and COMP_REGS_s::OUT_CTRL0.
uint32_t get_comp_out_sts | ( | COMP_REGS_s * | regs | ) |
This function returns output of comparator.
regs | : pointer to the COMP register space |
Comparator | output |
References COMP_REGS_s::STS.
uint32_t comp_cfg_s::enable |
COMP_HYST_E comp_cfg_s::hyst |
COMP_INTR_EDGE_SEL_E comp_cfg_s::intr_edge_sel |
COMP_IN_P_SEL_E comp_cfg_s::in_p_en |
uint32_t comp_cfg_s::in_p_sel |
uint32_t comp_cfg_s::in_m_en |
COMP_IN_M_SEL_E comp_cfg_s::in_m_sel |
uint32_t comp_cfg_s::in_short |
uint32_t comp_cfg_s::in_swap |
uint32_t comp_win_comp_cfg_s::enable |
Referenced by comp_win_comp_cfg(), and get_comp_win_comp_cfg().
COMP_WIN_COMP_SEL_E comp_win_comp_cfg_s::win_comp_sel |
Referenced by comp_win_comp_cfg(), and get_comp_win_comp_cfg().
uint32_t comp_out_cfg_s::samp_en |
COMP_OUT_POL_E comp_out_cfg_s::out_pol |