Azure Sphere MT3620 M4 API Reference Manual
|
This section provides Fixed APIs(defined as Common Interface) to fully control the MediaTek GPIOIF HW. More...
This section provides Fixed APIs(defined as Common Interface) to fully control the MediaTek GPIOIF HW.
Functions | |
int | mtk_mhal_gpioif_select_clock_source (struct mtk_gpioif_controller *ctlr) |
This function is used to select the GPIOIF clock source. More... | |
int | mtk_mhal_gpioif_event_counter_setting (struct mtk_gpioif_controller *ctlr) |
This function is used to set event counter mode setting. More... | |
int | mtk_mhal_gpioif_capture_counter_setting (struct mtk_gpioif_controller *ctlr) |
This function is used to set capture mode counter setting. More... | |
int | mtk_mhal_gpioif_enable_event_counter (struct mtk_gpioif_controller *ctlr) |
This function is used to enable event counter mode. More... | |
int | mtk_mhal_gpioif_disable_event_counter (struct mtk_gpioif_controller *ctlr) |
This function is used to disable event counter mode. More... | |
int | mtk_mhal_gpioif_enable_capture_counter (struct mtk_gpioif_controller *ctlr) |
This function is used to enable capture counter mode. More... | |
int | mtk_mhal_gpioif_disable_capture_counter (struct mtk_gpioif_controller *ctlr) |
This function is used to disable capture counter mode. More... | |
int | mtk_mhal_gpioif_software_reset (struct mtk_gpioif_controller *ctlr) |
This function is used to perform software reset of the GPIO event counter. More... | |
int | mtk_mhal_gpioif_interrupt_bit_wise (struct mtk_gpioif_controller *ctlr, u32 bit, u8 enable) |
This function is used to enable/disable bit-wise interrupt. More... | |
int | mtk_mhal_gpioif_hardware_reset_by_gpio_2 (struct mtk_gpioif_controller *ctlr, int active_reset) |
This function uses GPIO_2 pin to reset GPIOIF event counter. More... | |
int | mtk_mhal_gpioif_read_gpio_event_count (struct mtk_gpioif_controller *ctlr, unsigned int *pvalue) |
This function is used to read the GPIO event counter value. More... | |
int | mtk_mhal_gpioif_read_gpio_cap_fifo0_value (struct mtk_gpioif_controller *ctlr, unsigned int *pvalue) |
This function is used to read the GPIO capture fifo0 counter. More... | |
int | mtk_mhal_gpioif_read_gpio_cap_fifo1_value (struct mtk_gpioif_controller *ctlr, unsigned int *pvalue) |
This function is used to read the GPIO capture fifo1 counter. More... | |
int | mtk_mhal_gpioif_de_glitch (struct mtk_gpioif_controller *ctlr, int gpio, int enable, unsigned int min_p, unsigned int init_v) |
This function is used to set GPIOIF de-glitch setting. More... | |
int | mtk_mhal_gpioif_limit_comparator (struct mtk_gpioif_controller *ctlr) |
This function is used to set interrupt mode or saturation mode of the GPIO event counter. More... | |
int | mtk_mhal_gpioif_global_reset (struct mtk_gpioif_controller *ctlr) |
This function is used to reset all GPIOIF group globally and make the register of the GPIOIF group to default value. More... | |
int | mtk_mhal_gpioif_counter_clock_setting (struct mtk_gpioif_controller *ctlr, int enable) |
This function is used to enable/disable GPIOIF source clock. More... | |
int | mtk_mhal_gpioif_isr_handle (struct mtk_gpioif_controller *ctlr) |
This function is used to handle GPIOIF group0~5 interrupt. More... | |
int | mtk_mhal_gpioif_read_reset_val (struct mtk_gpioif_controller *ctlr, unsigned int *pvalue) |
This function is used to read reset value of GPIOIF Event Counter. More... | |
int | mtk_mhal_gpioif_read_low_limit_val (struct mtk_gpioif_controller *ctlr, unsigned int *pvalue) |
This function is used to read low limit value of GPIOIF Event Counter. More... | |
int | mtk_mhal_gpioif_read_high_limit_val (struct mtk_gpioif_controller *ctlr, unsigned int *pvalue) |
This function is used to read high limit value of GPIOIF Event Counter. More... | |
int mtk_mhal_gpioif_select_clock_source | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to select the GPIOIF clock source.
Usage: OS-HAL driver should call it to select the GPIOIF clock source.
[in] | ctlr | : GPIOIF controller used with the device. |
int mtk_mhal_gpioif_event_counter_setting | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to set event counter mode setting.
Usage: OS-HAL driver should call it to set event counter mode setting.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_capture_counter_setting | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to set capture mode counter setting.
Usage: OS-HAL driver should call it to set capture mode counter setting.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_enable_event_counter | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to enable event counter mode.
Usage: OS-HAL driver should call it to enable event counter mode.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_disable_event_counter | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to disable event counter mode.
Usage: OS-HAL driver should call it to disable event counter mode.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_enable_capture_counter | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to enable capture counter mode.
Usage: OS-HAL driver should call it to enable capture counter mode.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_disable_capture_counter | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to disable capture counter mode.
Usage: OS-HAL driver should call it to disable capture counter mode.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_software_reset | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to perform software reset of the GPIO event counter.
Usage: OS-HAL driver should call it to perform software reset of the GPIO event counter.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_interrupt_bit_wise | ( | struct mtk_gpioif_controller * | ctlr, |
u32 | bit, | ||
u8 | enable | ||
) |
This function is used to enable/disable bit-wise interrupt.
Usage: OS-HAL driver should call it to enable/disable interrupt by bit-wise.
[in] | ctlr | : GPIOIF controller used with the device |
[in] | bit | : Different bit , different interrupt case |
[in] | enable | : 0:No interrupt is issued when interrupt status is asserted; 1:Interrupt is issued when interrupt status is asserted. |
int mtk_mhal_gpioif_hardware_reset_by_gpio_2 | ( | struct mtk_gpioif_controller * | ctlr, |
int | active_reset | ||
) |
This function uses GPIO_2 pin to reset GPIOIF event counter.
Usage: OS-HAL driver should call it to enable hardware reset of GPIOIF event counter.
[in] | ctlr | : GPIOIF controller used with the device |
[in] | active_reset | : 0: low; 1: high. |
int mtk_mhal_gpioif_read_gpio_event_count | ( | struct mtk_gpioif_controller * | ctlr, |
unsigned int * | pvalue | ||
) |
This function is used to read the GPIO event counter value.
Usage: OS-HAL driver should call it to read the GPIO event counter.
[in] | ctlr | : GPIOIF controller used with the device |
[out] | pvalue | : Read GPIO event counter value and save it to address pvalue |
int mtk_mhal_gpioif_read_gpio_cap_fifo0_value | ( | struct mtk_gpioif_controller * | ctlr, |
unsigned int * | pvalue | ||
) |
This function is used to read the GPIO capture fifo0 counter.
[in] | ctlr | : GPIOIF controller used with the device |
[out] | pvalue | : Read register value and save it to address pvalue |
int mtk_mhal_gpioif_read_gpio_cap_fifo1_value | ( | struct mtk_gpioif_controller * | ctlr, |
unsigned int * | pvalue | ||
) |
This function is used to read the GPIO capture fifo1 counter.
Usage: OS-HAL driver should call it to read the capture fifo1 counter in the capture function mode.
[in] | ctlr | : GPIOIF controller used with the device |
[out] | pvalue | : Read register value and save it to address pvalue |
int mtk_mhal_gpioif_de_glitch | ( | struct mtk_gpioif_controller * | ctlr, |
int | gpio, | ||
int | enable, | ||
unsigned int | min_p, | ||
unsigned int | init_v | ||
) |
This function is used to set GPIOIF de-glitch setting.
Usage: OS-HAL driver should call it to add GPIOIF de-glitch setting.
[in] | ctlr | : GPIOIF controller used with the device |
[in] | gpio | : GPIO number(0~2) |
[in] | enable | : 0: disable; 1: enable. |
[in] | min_p | : Minimum pulse width of the GPIOIF de-glitch circuit(0~16383) |
[in] | init_v | : Initial output value of the GPIOIF de-glitch circuit(0 or 1) |
int mtk_mhal_gpioif_limit_comparator | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to set interrupt mode or saturation mode of the GPIO event counter.
Usage: OS-HAL driver should call it in GPIO event counter to set different interrupt mode or saturation mode.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_global_reset | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to reset all GPIOIF group globally and make the register of the GPIOIF group to default value.
Usage: OS-HAL driver should call it to enable GPIOIF global software reset.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_counter_clock_setting | ( | struct mtk_gpioif_controller * | ctlr, |
int | enable | ||
) |
This function is used to enable/disable GPIOIF source clock.
Usage: OS-HAL driver should call it to enable/disable GPIOIF counter clock source.
[in] | ctlr | : GPIOIF controller used with the device |
[in] | enable | : clock is enable or not(0:disable; 1:enable). |
int mtk_mhal_gpioif_isr_handle | ( | struct mtk_gpioif_controller * | ctlr | ) |
This function is used to handle GPIOIF group0~5 interrupt.
Usage: OS-HAL driver should call it to handle GPIOIF group0~5 interrupt.
[in] | ctlr | : GPIOIF controller used with the device |
int mtk_mhal_gpioif_read_reset_val | ( | struct mtk_gpioif_controller * | ctlr, |
unsigned int * | pvalue | ||
) |
This function is used to read reset value of GPIOIF Event Counter.
[in] | ctlr | : GPIOIF controller used with the device |
[out] | pvalue | : Read register value and save it to address pvalue |
int mtk_mhal_gpioif_read_low_limit_val | ( | struct mtk_gpioif_controller * | ctlr, |
unsigned int * | pvalue | ||
) |
This function is used to read low limit value of GPIOIF Event Counter.
[in] | ctlr | : GPIOIF controller used with the device |
[out] | pvalue | : Read register value and save it to address pvalue |
int mtk_mhal_gpioif_read_high_limit_val | ( | struct mtk_gpioif_controller * | ctlr, |
unsigned int * | pvalue | ||
) |
This function is used to read high limit value of GPIOIF Event Counter.
[in] | ctlr | : GPIOIF controller used with the device |
[out] | pvalue | : Read register value and save it to address pvalue |