FD32M0P Microcontroller SDK
Loading...
Searching...
No Matches

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.

Variables

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
COMP_WIN_COMP_SEL_E comp_win_comp_cfg_s::win_comp_sel
uint32_t comp_out_cfg_s::samp_en
COMP_OUT_POL_E comp_out_cfg_s::out_pol

Detailed Description


Data Structure Documentation

◆ comp_cfg_s

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

◆ comp_win_comp_cfg_s

struct comp_win_comp_cfg_s
Data Fields
uint32_t enable
COMP_WIN_COMP_SEL_E win_comp_sel

◆ comp_out_cfg_s

struct comp_out_cfg_s
Data Fields
uint32_t samp_en
COMP_OUT_POL_E out_pol

Enumeration Type Documentation

◆ COMP_HYST_E

Enumerator
COMP_HYST_DISABLED 

0x0

COMP_HYST_LOW 

0x1

COMP_HYST_MEDIUM 

0x2

COMP_HYST_HIGH 

0x3

◆ COMP_INTR_EDGE_SEL_E

Enumerator
COMP_E0_POS_E1_NEG 

0x0

COMP_E0_NEG_E1_POS 

0x1

◆ COMP_IN_P_SEL_E

Enumerator
COMP_IN_P_SEL_NON_INV_0 

0x0

COMP_IN_P_SEL_NON_INV_1 

0x1

COMP_IN_P_SEL_COMP0_NON_INV_2 

0x2

COMP_IN_P_SEL_COMP1_NON_INV_2 

0x2

COMP_IN_P_SEL_COMP0_DAC_CONN 

0x3

COMP_IN_P_SEL_COMP1_DAC_CONN 

0x3

COMP_IN_P_SEL_COMP0_OPA1_CONN 

0x4

COMP_IN_P_SEL_COMP1_GND 

0x4

COMP_IN_P_SEL_COMP0_PSEL_CONN 

0x5

COMP_IN_P_SEL_COMP1_PSEL_CONN 

0x5

◆ COMP_IN_M_SEL_E

Enumerator
COMP_IN_M_SEL_INV_0 

0x0

COMP_IN_M_SEL_INV_1 

0x1

COMP_IN_M_SEL_COMP0_INV_2 

0x2

COMP_IN_M_SEL_COMP1_INV_2 

0x2

COMP_IN_M_SEL_COMP0_OPA0_CONN 

0x3

◆ COMP_WIN_COMP_SEL_E

Enumerator
COMP_WIN_COMP_SEL_0 

0x0

COMP_WIN_COMP_SEL_1 

0x1

COMP_WIN_COMP_SEL_2 

0x2

◆ COMP_OUT_POL_E

Enumerator
COMP_OUT_POL_NON_INV 

0x0

COMP_OUT_POL_INV 

0x1

Function Documentation

◆ comp_cfg()

void comp_cfg ( COMP_REGS_s * regs,
comp_cfg_s comp_cfg )

This function configures comparator.

Parameters
regs: pointer to the COMP register space
comp_cfg: comp configuration struct
Return values
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comp_win_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.

Parameters
regs: pointer to the COMP register space
win_comp_cfg: window comp configuration struct
Return values
void

References comp_win_comp_cfg_s::enable, COMP_REGS_s::OUT_CTRL1, and comp_win_comp_cfg_s::win_comp_sel.

◆ comp_out_cfg()

void comp_out_cfg ( COMP_REGS_s * regs,
comp_out_cfg_s comp_out_cfg )

This function configures output of comparator.

Parameters
regs: pointer to the COMP register space
comp_out_cfg: comparator output configuration struct
Return values
void

References comp_out_cfg(), and COMP_REGS_s::OUT_CTRL0.

Referenced by comp_out_cfg(), and get_comp_out_cfg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_comp_cfg()

comp_cfg_s get_comp_cfg ( COMP_REGS_s * regs)

This function returns comparator configuration.

Parameters
regs: pointer to the COMP register space
Return values
Comparatorconfiguration

References comp_cfg(), COMP_REGS_s::CTRL0, COMP_REGS_s::INPUT_CTRL0, and COMP_REGS_s::INPUT_CTRL1.

Here is the call graph for this function:

◆ get_comp_win_comp_cfg()

comp_win_comp_cfg_s get_comp_win_comp_cfg ( COMP_REGS_s * regs)

This function returns window comparator configuration in comparator.

Parameters
regs: pointer to the COMP register space
Return values
Windowcomparator configuration

References comp_win_comp_cfg_s::enable, COMP_REGS_s::OUT_CTRL1, and comp_win_comp_cfg_s::win_comp_sel.

◆ get_comp_out_cfg()

comp_out_cfg_s get_comp_out_cfg ( COMP_REGS_s * regs)

This function returns output configuration of comparator.

Parameters
regs: pointer to the COMP register space
Return values
Comparatoroutput configuration

References comp_out_cfg(), and COMP_REGS_s::OUT_CTRL0.

Here is the call graph for this function:

◆ get_comp_out_sts()

uint32_t get_comp_out_sts ( COMP_REGS_s * regs)

This function returns output of comparator.

Parameters
regs: pointer to the COMP register space
Return values
Comparatoroutput

References COMP_REGS_s::STS.

Variable Documentation

◆ enable [1/2]

uint32_t comp_cfg_s::enable

◆ hyst

COMP_HYST_E comp_cfg_s::hyst

◆ intr_edge_sel

COMP_INTR_EDGE_SEL_E comp_cfg_s::intr_edge_sel

◆ in_p_en

COMP_IN_P_SEL_E comp_cfg_s::in_p_en

◆ in_p_sel

uint32_t comp_cfg_s::in_p_sel

◆ in_m_en

uint32_t comp_cfg_s::in_m_en

◆ in_m_sel

COMP_IN_M_SEL_E comp_cfg_s::in_m_sel

◆ in_short

uint32_t comp_cfg_s::in_short

◆ in_swap

uint32_t comp_cfg_s::in_swap

◆ enable [2/2]

uint32_t comp_win_comp_cfg_s::enable

◆ win_comp_sel

COMP_WIN_COMP_SEL_E comp_win_comp_cfg_s::win_comp_sel

◆ samp_en

uint32_t comp_out_cfg_s::samp_en

◆ out_pol

COMP_OUT_POL_E comp_out_cfg_s::out_pol