FD32M0P Microcontroller SDK
|
Functions | |
void | iomux_cfg (IOMUX_REGS_s *regs, IOMUX_PA_REG_s iomux_cfg_struct, uint32_t pin_num) |
This function configures the IOMUX. | |
void | gpio_dout_pinwise (GPIO_REGS_s *regs, uint32_t pin_num, uint32_t dout_pin_val) |
This function writes the data at GPIO pin given in pin_num. | |
void | gpio_glitch_filter_cfg (GPIO_REGS_s *regs, uint32_t pin_num, GPIO_FILT_EN_E filt_width_val) |
This function configures the glitch filter for the val provided in filt_width_val and at the pin given in pin_num. | |
void | gpio_intr_polarity_cfg (GPIO_REGS_s *regs, uint32_t pin_num, GPIO_INTR_POL_E intr_pol_val) |
This function configures the interrupt polarity for the val provided in intr_pol_val and at the pin given in pin_num. | |
void | gpio_dma_cfg (GPIO_REGS_s *regs, uint32_t dma_wr_mask) |
This function configures the dma_mask in GPIO. | |
uint32_t | gpio_din (GPIO_REGS_s *regs) |
This function reads the input at the GPIO. | |
void | gpio_dout (GPIO_REGS_s *regs, uint32_t dout) |
This function writes at the GPIO. | |
void | gpio_dout_en (GPIO_REGS_s *regs, uint32_t dout_en) |
This function enables GPIO outputs. | |
void | gpio_set_en (GPIO_REGS_s *regs, uint32_t dout_en_set) |
This function enables GPIO outputs for value written in dout_set register. | |
void | gpio_clr_en (GPIO_REGS_s *regs, uint32_t dout_en_clr) |
This function enables GPIO outputs for value written in dout_clr register. | |
void | gpio_sub_cfg (GPIO_REGS_s *regs, uint32_t sub_sel, uint32_t sub_en, uint32_t pin_action, uint32_t pin_num) |
This function configures GPIO subscriber. | |
uint32_t | gpio_din_pinwise (GPIO_REGS_s *regs, uint32_t pin_num) |
This function reads input at specific pin. | |
void | gpio_set (GPIO_REGS_s *regs, uint32_t dout_set) |
This function sets GPIO output. | |
void | gpio_clr (GPIO_REGS_s *regs, uint32_t dout_clr) |
This function clears GPIO output. | |
void | gpio_tgl (GPIO_REGS_s *regs, uint32_t dout_tgl) |
This function toggles GPIO output. | |
uint32_t | get_gpio_glitch_filter_cfg (GPIO_REGS_s *regs, uint32_t pin_num) |
This function returns the GPIO glitch filter configuration. | |
uint32_t | get_gpio_intr_polarity_cfg (GPIO_REGS_s *regs, uint32_t pin_num) |
This function returns the GPIO interrupt polarity configuration. | |
IOMUX_PA_REG_s | get_gpio_iomux_cfg (IOMUX_REGS_s *regs, uint32_t pin_num) |
This function returns IOMUX configuration. | |
GPIO_SUB_CFG_REG_s | get_gpio_sub_cfg (GPIO_REGS_s *regs, uint32_t sub_sel) |
This function returns GPIO subscriber configuration. | |
uint32_t | get_gpio_dma_cfg (GPIO_REGS_s *regs) |
This function returns GPIO DMA configuration. | |
uint32_t | get_gpio_dout (GPIO_REGS_s *regs) |
This function returns GPIO dout register values. | |
uint32_t | get_gpio_dout_pinwise (GPIO_REGS_s *regs, uint32_t pin_num) |
This function returns GPIO dout pinwise register values. |
void iomux_cfg | ( | IOMUX_REGS_s * | regs, |
IOMUX_PA_REG_s | iomux_cfg_struct, | ||
uint32_t | pin_num ) |
This function configures the IOMUX.
regs | : pointer to the GPIO register space |
iomux_cfg_struct | : IOMUX Configuration Struct |
pin_num | : IOMUX pin to be configured |
void |
References iomux_cfg(), IOMUX_REGS_s::PA, and IOMUX_PA_u::packed_w.
Referenced by get_gpio_iomux_cfg(), iomux_cfg(), and vref_cfg().
void gpio_dout_pinwise | ( | GPIO_REGS_s * | regs, |
uint32_t | pin_num, | ||
uint32_t | dout_pin_val ) |
This function writes the data at GPIO pin given in pin_num.
regs | : pointer to the GPIO register space |
pin_num | : GPIO pin to be configured |
dout_pin_val | : Value to be written at the pin |
void |
References GPIO_REGS_s::DOUT_11_8, GPIO_REGS_s::DOUT_15_12, GPIO_REGS_s::DOUT_19_16, GPIO_REGS_s::DOUT_23_20, GPIO_REGS_s::DOUT_27_24, GPIO_REGS_s::DOUT_31_28, GPIO_REGS_s::DOUT_3_0, GPIO_REGS_s::DOUT_7_4, GPIO_DOUT_11_8_u::packed_byte, GPIO_DOUT_15_12_u::packed_byte, GPIO_DOUT_19_16_u::packed_byte, GPIO_DOUT_23_20_u::packed_byte, GPIO_DOUT_27_24_u::packed_byte, GPIO_DOUT_31_28_u::packed_byte, GPIO_DOUT_3_0_u::packed_byte, and GPIO_DOUT_7_4_u::packed_byte.
void gpio_glitch_filter_cfg | ( | GPIO_REGS_s * | regs, |
uint32_t | pin_num, | ||
GPIO_FILT_EN_E | filt_width_val ) |
This function configures the glitch filter for the val provided in filt_width_val and at the pin given in pin_num.
regs | : pointer to the GPIO register space |
pin_num | : GPIO pin to be configured |
filt_width_val | : GPIO glitch filter width |
void |
References GPIO_REGS_s::FILT_EN_0, and GPIO_REGS_s::FILT_EN_1.
void gpio_intr_polarity_cfg | ( | GPIO_REGS_s * | regs, |
uint32_t | pin_num, | ||
GPIO_INTR_POL_E | intr_pol_val ) |
This function configures the interrupt polarity for the val provided in intr_pol_val and at the pin given in pin_num.
regs | : pointer to the GPIO register space |
pin_num | : GPIO pin to be configured |
intr_pol_val | : GPIO interrupt polarity. 0: No Intr, 1: Pos Edge, 2: Neg Edge, 3: Any Edge |
void |
References GPIO_REGS_s::INTR_POL_0, and GPIO_REGS_s::INTR_POL_1.
void gpio_dma_cfg | ( | GPIO_REGS_s * | regs, |
uint32_t | dma_wr_mask ) |
This function configures the dma_mask in GPIO.
regs | : pointer to the GPIO register space |
dma_wr_mask | : GPIO DMA mask |
void |
References GPIO_REGS_s::DMA_WR_MASK, and GPIO_DMA_WR_MASK_u::packed_w.
uint32_t gpio_din | ( | GPIO_REGS_s * | regs | ) |
This function reads the input at the GPIO.
regs | : pointer to the GPIO register space |
GPIO | Data Read |
References GPIO_REGS_s::DIN, and GPIO_DIN_u::packed_w.
void gpio_dout | ( | GPIO_REGS_s * | regs, |
uint32_t | dout ) |
This function writes at the GPIO.
regs | : pointer to the GPIO register space |
void |
References GPIO_REGS_s::DOUT, and GPIO_DOUT_u::packed_w.
void gpio_dout_en | ( | GPIO_REGS_s * | regs, |
uint32_t | dout_en ) |
This function enables GPIO outputs.
regs | : pointer to the GPIO register space |
void |
References GPIO_REGS_s::DOUT_EN, and GPIO_DOUT_EN_u::packed_w.
void gpio_set_en | ( | GPIO_REGS_s * | regs, |
uint32_t | dout_en_set ) |
This function enables GPIO outputs for value written in dout_set register.
regs | : pointer to the GPIO register space |
dout_en_set | : 32 bit reg. The bits set here enables the output for the bits in dout_set reg. |
void |
References GPIO_REGS_s::DOUT_EN_SET, and GPIO_DOUT_EN_SET_u::packed_w.
void gpio_clr_en | ( | GPIO_REGS_s * | regs, |
uint32_t | dout_en_clr ) |
This function enables GPIO outputs for value written in dout_clr register.
regs | : pointer to the GPIO register space |
dout_en_clr | : 32 bit reg. The bits set here enables the output for the bits in dout_clr reg. |
void |
References GPIO_REGS_s::DOUT_EN_CLR, and GPIO_DOUT_EN_CLR_u::packed_w.
void gpio_sub_cfg | ( | GPIO_REGS_s * | regs, |
uint32_t | sub_sel, | ||
uint32_t | sub_en, | ||
uint32_t | pin_action, | ||
uint32_t | pin_num ) |
This function configures GPIO subscriber.
regs | : pointer to the GPIO register space |
sub_sel | : selects GPIO subscriber |
sub_en | : enables subscriber |
pin_action | : Pin action upon receiving published event on GPIO sub. 0: Nothing, 1: Set, 2: Clr, 3: Toggle |
void |
References GPIO_REGS_s::SUB_CFG.
uint32_t gpio_din_pinwise | ( | GPIO_REGS_s * | regs, |
uint32_t | pin_num ) |
This function reads input at specific pin.
regs | : pointer to the GPIO register space |
pin_num | : GPIO pin to be read |
void |
References GPIO_REGS_s::DIN_11_8, GPIO_REGS_s::DIN_15_12, GPIO_REGS_s::DIN_19_16, GPIO_REGS_s::DIN_23_20, GPIO_REGS_s::DIN_27_24, GPIO_REGS_s::DIN_31_28, GPIO_REGS_s::DIN_3_0, and GPIO_REGS_s::DIN_7_4.
void gpio_set | ( | GPIO_REGS_s * | regs, |
uint32_t | dout_set ) |
This function sets GPIO output.
regs | : pointer to the GPIO register space |
dout_set | : bits set high sets those GPIO pin. |
void |
References GPIO_REGS_s::DOUT_SET, and GPIO_DOUT_SET_u::packed_w.
void gpio_clr | ( | GPIO_REGS_s * | regs, |
uint32_t | dout_clr ) |
This function clears GPIO output.
regs | : pointer to the GPIO register space |
dout_set | : bits set high clears those GPIO pin. |
void |
References GPIO_REGS_s::DOUT_CLR, and GPIO_DOUT_CLR_u::packed_w.
void gpio_tgl | ( | GPIO_REGS_s * | regs, |
uint32_t | dout_tgl ) |
This function toggles GPIO output.
regs | : pointer to the GPIO register space |
dout_set | : bits set high toggles those GPIO pin. |
void |
References GPIO_REGS_s::DOUT_TGL, and GPIO_DOUT_TGL_u::packed_w.
uint32_t get_gpio_glitch_filter_cfg | ( | GPIO_REGS_s * | regs, |
uint32_t | pin_num ) |
This function returns the GPIO glitch filter configuration.
regs | : pointer to the GPIO register space |
pin_num | : GPIO pin for which gpio glitch filter configuration is required. |
GPIO | glitch filter configuration |
References GPIO_REGS_s::FILT_EN_0, and GPIO_REGS_s::FILT_EN_1.
uint32_t get_gpio_intr_polarity_cfg | ( | GPIO_REGS_s * | regs, |
uint32_t | pin_num ) |
This function returns the GPIO interrupt polarity configuration.
regs | : pointer to the GPIO register space |
pin_num | : GPIO pin for which gpio interrupt polarity configuration is required. |
GPIO | interrupt polarity configuration |
References GPIO_REGS_s::INTR_POL_0, and GPIO_REGS_s::INTR_POL_1.
IOMUX_PA_REG_s get_gpio_iomux_cfg | ( | IOMUX_REGS_s * | regs, |
uint32_t | pin_num ) |
This function returns IOMUX configuration.
regs | : pointer to the GPIO register space |
pin_num | : GPIO pin for which IOMUX configuration is required. |
IOMUX | configuration |
References iomux_cfg(), and IOMUX_REGS_s::PA.
GPIO_SUB_CFG_REG_s get_gpio_sub_cfg | ( | GPIO_REGS_s * | regs, |
uint32_t | sub_sel ) |
This function returns GPIO subscriber configuration.
regs | : pointer to the GPIO register space |
sub_sel | : Subscriber for which subscriber configuration is required. |
GPIO | subscriber configuration |
References GPIO_SUB_CFG_REG_s::action, GPIO_SUB_CFG_REG_s::bit_num, GPIO_REGS_s::SUB_CFG, and GPIO_SUB_CFG_REG_s::sub_en.
uint32_t get_gpio_dma_cfg | ( | GPIO_REGS_s * | regs | ) |
This function returns GPIO DMA configuration.
regs | : pointer to the GPIO register space |
GPIO | DMA configuration |
References GPIO_REGS_s::DMA_WR_MASK, and GPIO_DMA_WR_MASK_u::packed_w.
uint32_t get_gpio_dout | ( | GPIO_REGS_s * | regs | ) |
This function returns GPIO dout register values.
regs | : pointer to the GPIO register space |
GPIO | DOUT register values. |
References GPIO_REGS_s::DOUT, and GPIO_DOUT_u::packed_w.
uint32_t get_gpio_dout_pinwise | ( | GPIO_REGS_s * | regs, |
uint32_t | pin_num ) |
This function returns GPIO dout pinwise register values.
regs | : pointer to the GPIO register space |
GPIO | DOUT pinwise register values. |
References GPIO_REGS_s::DOUT_11_8, GPIO_REGS_s::DOUT_15_12, GPIO_REGS_s::DOUT_19_16, GPIO_REGS_s::DOUT_23_20, GPIO_REGS_s::DOUT_27_24, GPIO_REGS_s::DOUT_31_28, GPIO_REGS_s::DOUT_3_0, GPIO_REGS_s::DOUT_7_4, GPIO_DOUT_11_8_u::packed_byte, GPIO_DOUT_15_12_u::packed_byte, GPIO_DOUT_19_16_u::packed_byte, GPIO_DOUT_23_20_u::packed_byte, GPIO_DOUT_27_24_u::packed_byte, GPIO_DOUT_31_28_u::packed_byte, GPIO_DOUT_3_0_u::packed_byte, and GPIO_DOUT_7_4_u::packed_byte.