Azure Sphere MT3620 M4 API Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Function

This section provides high level APIs to upper layer. More...

Overview

This section provides high level APIs to upper layer.

Functions

int mtk_os_hal_gpioif_ctlr_init (gpioif_group group)
 Init GPIOIF controller. More...
 
int mtk_os_hal_gpioif_ctlr_deinit (gpioif_group group)
 Deinit GPIOIF controller. More...
 
int mtk_os_hal_gpioif_set_direction_mode (gpioif_group group, u8 control_setting, u32 low_limit, u32 high_limit, u32 reset_value, gpioif_source_clock clock_source)
 This function is used to set GPIOIF direction mode. More...
 
int mtk_os_hal_gpioif_set_updown_mode (gpioif_group group, u8 control_setting, u32 low_limit, u32 high_limit, u32 reset_value, gpioif_source_clock clock_source)
 This function is used to set GPIOIF updown mode. More...
 
int mtk_os_hal_gpioif_set_quadrature_mode (gpioif_group group, u8 control_setting, u32 low_limit, u32 high_limit, u32 reset_value, gpioif_source_clock clock_source)
 This function is used to set GPIOIF quadrature mode. More...
 
int mtk_os_hal_gpioif_set_capture_mode (gpioif_group group, u8 edge_type_gpio_0, u8 edge_type_gpio_1, gpioif_source_clock clock_source)
 This function is used to set GPIOIF capture mode. More...
 
int mtk_os_hal_gpioif_interrupt_control (gpioif_group group, u8 enable, u8 clear, u32 bit)
 This function is used to control interrupt. More...
 
int mtk_os_hal_gpioif_limit_comparator (gpioif_group group, gpioif_sa_mode_limit_select sa_limit_v, gpioif_interrupt_limit_select interrupt_limit_v)
 This function is used to set interrupt mode or saturation mode of the GPIO event counter. More...
 
int mtk_os_hal_gpioif_de_glitch (gpioif_group group, u8 gpio, u8 enable, u32 min_p, u32 init_v)
 This function is used to set GPIOIF de-glitch setting. More...
 
int mtk_os_hal_gpioif_event_counter_setting (gpioif_group group, u8 control_setting, u32 low_limit, u32 high_limit, u32 reset_value, u8 event_cnt_mode)
 This function is used to set event counter mode setting. More...
 
int mtk_os_hal_gpioif_global_cr_reset (gpioif_group group)
 This function is used to reset all GPIOIF group globally and make the register of the GPIOIF group to default value. More...
 
int mtk_os_hal_gpioif_hardware_reset (gpioif_group group, mtk_os_gpioif_mode mode, u8 active_reset)
 This function uses GPIO_2 pin to reset GPIOIF event counter. More...
 
int mtk_os_hal_gpioif_interrupt_count_init (gpioif_group group)
 This function is used to initialize all software counter in interrupt function. More...
 
int mtk_os_hal_gpioif_capture_fifo_init (gpioif_group group)
 This function is used to initialize software capture fifo counter. More...
 
int mtk_os_hal_gpioif_dump_int (gpioif_group group)
 This function is used to dump all software counter in interrupt function. More...
 
int mtk_os_hal_gpioif_read_gpio_event_count (gpioif_group group, u32 *pvalue)
 This function is used to read gpio event counter value. More...
 
int mtk_os_hal_gpioif_read_reset_val (gpioif_group group, u32 *pvalue)
 This function is used to read reset value of GPIOIF Event Counter. More...
 
int mtk_os_hal_gpioif_read_low_limit_val (gpioif_group group, u32 *pvalue)
 This function is used to read low limit value of GPIOIF Event Counter. More...
 
int mtk_os_hal_gpioif_read_high_limit_val (gpioif_group group, u32 *pvalue)
 This function is used to read high limit value of GPIOIF Event Counter. More...
 
int mtk_os_hal_gpioif_select_clock_source (gpioif_group group, gpioif_source_clock clock_source)
 This function is used to select the GPIOIF clock source. More...
 
int mtk_os_hal_gpioif_counter_clock_setting (gpioif_group group, u8 enable)
 This function is used to enable/disable GPIOIF source clock. More...
 
int mtk_os_hal_gpioif_software_reset (gpioif_group group, mtk_os_gpioif_mode mode)
 This function is used to perform software reset of the GPIO event counter. More...
 
int mtk_os_hal_gpioif_enable_event_counter (gpioif_group group)
 This function is used to enable event counter mode. More...
 
int mtk_os_hal_gpioif_disable_event_counter (gpioif_group group)
 This function is used to disable event counter mode. More...
 
int mtk_os_hal_gpioif_disable_capture_counter (gpioif_group group)
 This function is used to disable capture counter mode. More...
 
int mtk_os_hal_gpioif_read_gpio_cap_fifo0_value (gpioif_group group, u32 *pvalue)
 This function is used to read capture fifo0 value. More...
 
int mtk_os_hal_gpioif_read_gpio_cap_fifo1_value (gpioif_group group, u32 *pvalue)
 This function is used to read capture fifo1 value. More...
 
int mtk_os_hal_gpioif_get_int_event_low_count (gpioif_group group)
 This function is used to get GPIOIF interrupt event low count value. More...
 
int mtk_os_hal_gpioif_get_int_event_high_count (gpioif_group group)
 This function is used to get GPIOIF interrupt event high count value. More...
 
int mtk_os_hal_gpioif_get_int_gpio2_rst_done_count (gpioif_group group)
 This function is used to get GPIOIF gpio2 interrupt reset done count value. More...
 
int mtk_os_hal_gpioif_get_int_event_over_count (gpioif_group group)
 This function is used to get GPIOIF interrupt event overflow count value. More...
 
int mtk_os_hal_gpioif_get_int_event_uf_count (gpioif_group group)
 This function is used to get GPIOIF interrupt event underflow count value. More...
 
int mtk_os_hal_gpioif_get_int_cap_f0_full_count (gpioif_group group)
 This function is used to get GPIOIF interrupt capture fifo0 count value. More...
 
int mtk_os_hal_gpioif_get_int_cap_f1_full_count (gpioif_group group)
 This function is used to get GPIOIF interrupt capture fifo1 count value. More...
 
int mtk_os_hal_gpioif_get_int_reset_cap_f0_full_count (gpioif_group group)
 This function is used to get GPIOIF interrupt reset capture fifo0 count value. More...
 
int mtk_os_hal_gpioif_get_int_reset_cap_f1_full_count (gpioif_group group)
 This function is used to get GPIOIF interrupt reset capture fifo1 count value. More...
 
int mtk_os_hal_gpioif_get_int_cap_f0_np_count (gpioif_group group)
 This function is used to get capture fifo0 not empty count value. More...
 
int mtk_os_hal_gpioif_get_int_cap_f1_np_count (gpioif_group group)
 This function is used to get capture fifo1 not empty count value. More...
 
int mtk_os_hal_gpioif_get_int_cap_f0_p_count (gpioif_group group)
 This function is used to get capture fifo0 empty count value. More...
 
int mtk_os_hal_gpioif_get_int_cap_f1_p_count (gpioif_group group)
 This function is used to get capture fifo1 empty count value. More...
 
int mtk_os_hal_gpioif_interrupt_bit_wise (gpioif_group group, u32 bit, u8 enable)
 This function is used to enable/disable interrupt. More...
 
int mtk_os_hal_gpioif_get_cap_fifo0_count (gpioif_group group)
 This function is used to get capture fifo0 count. More...
 
int mtk_os_hal_gpioif_get_cap_fifo1_count (gpioif_group group)
 This function is used to get capture fifo1 count. More...
 
int mtk_os_hal_gpioif_get_cap_fifo0_val (gpioif_group group, u32 idex)
 This function is used to get capture fifo0 value. More...
 
int mtk_os_hal_gpioif_get_cap_fifo1_val (gpioif_group group, u32 idex)
 This function is used to get capture fifo1 value. More...
 
int mtk_os_hal_gpioif_int_callback_register (gpioif_group group, gpioif_int_callback callback, void *user_data)
 This function is used to register user's interrupt callback. More...
 

Function Documentation

int mtk_os_hal_gpioif_ctlr_init ( gpioif_group  group)

Init GPIOIF controller.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return "0" if callback register successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_ctlr_deinit ( gpioif_group  group)

Deinit GPIOIF controller.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return "0" if callback register successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_set_direction_mode ( gpioif_group  group,
u8  control_setting,
u32  low_limit,
u32  high_limit,
u32  reset_value,
gpioif_source_clock  clock_source 
)

This function is used to set GPIOIF direction mode.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5).
[in]control_setting: Define Control edge type of GPIOIF Event Counter(1~6).
[in]low_limit: Define Low limit value for GPIOIF Event Counter. (0~0xffffffff)
[in]high_limit: Defines High limit value for GPIOIF Event Counter. (0~0xffffffff)
[in]reset_value: Defines Reset value for GPIOIF Event Counter. (0~0xffffffff)
[in]clock_source: Defines GPIOIF clock source selection(0~3).
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_set_updown_mode ( gpioif_group  group,
u8  control_setting,
u32  low_limit,
u32  high_limit,
u32  reset_value,
gpioif_source_clock  clock_source 
)

This function is used to set GPIOIF updown mode.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5).
[in]control_setting: Define Control edge type of GPIOIF Event Counter(1~6).
[in]low_limit: Define Low limit value for GPIOIF Event Counter. (0~0xffffffff)
[in]high_limit: Defines High limit value for GPIOIF Event Counter. (0~0xffffffff)
[in]reset_value: Defines Reset value for GPIOIF Event Counter. (0~0xffffffff)
[in]clock_source: Defines GPIOIF clock source selection(0~3).
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_set_quadrature_mode ( gpioif_group  group,
u8  control_setting,
u32  low_limit,
u32  high_limit,
u32  reset_value,
gpioif_source_clock  clock_source 
)

This function is used to set GPIOIF quadrature mode.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5).
[in]control_setting: Define Control edge type of GPIOIF Event Counter(1~6).
[in]low_limit: Define Low limit value for GPIOIF Event Counter. (0~0xffffffff)
[in]high_limit: Defines High limit value for GPIOIF Event Counter. (0~0xffffffff)
[in]reset_value: Defines Reset value for GPIOIF Event Counter. (0~0xffffffff)
[in]clock_source: Defines GPIOIF clock source selection(0~3).
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_set_capture_mode ( gpioif_group  group,
u8  edge_type_gpio_0,
u8  edge_type_gpio_1,
gpioif_source_clock  clock_source 
)

This function is used to set GPIOIF capture mode.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5).
[in]edge_type_gpio_0: Define edge type of GPIO_0 capture(0~3).
[in]edge_type_gpio_1: Define edge type of GPIO_1 capture(0~3)..
[in]clock_source: Defines GPIOIF clock source selection(0~3).
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_interrupt_control ( gpioif_group  group,
u8  enable,
u8  clear,
u32  bit 
)

This function is used to control interrupt.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]enable: 0: disable; 1: enable.
[in]enable: 0: not clear; 1: clear.
[in]bit: Specifies the GPIOIF interrupt value to set.(0~0xffffffff)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_limit_comparator ( gpioif_group  group,
gpioif_sa_mode_limit_select  sa_limit_v,
gpioif_interrupt_limit_select  interrupt_limit_v 
)

This function is used to set interrupt mode or saturation mode of the GPIO event counter.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]sa_limit_v: Defines GPIOIF saturation mode selection of GPIO event counter when reaching limit value.(0~4)
[in]interrupt_limit_v: defines GPIOIF interrupt mode selection of GPIO event counter.(0~3)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_de_glitch ( gpioif_group  group,
u8  gpio,
u8  enable,
u32  min_p,
u32  init_v 
)

This function is used to set GPIOIF de-glitch setting.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[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)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_event_counter_setting ( gpioif_group  group,
u8  control_setting,
u32  low_limit,
u32  high_limit,
u32  reset_value,
u8  event_cnt_mode 
)

This function is used to set event counter mode setting.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_global_cr_reset ( gpioif_group  group)

This function is used to reset all GPIOIF group globally and make the register of the GPIOIF group to default value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_hardware_reset ( gpioif_group  group,
mtk_os_gpioif_mode  mode,
u8  active_reset 
)

This function uses GPIO_2 pin to reset GPIOIF event counter.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]mode: Specifies the GPIOIF mode numer to set.(0~2)
[in]active_reset: 0: low; 1: high.
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_interrupt_count_init ( gpioif_group  group)

This function is used to initialize all software counter in interrupt function.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_capture_fifo_init ( gpioif_group  group)

This function is used to initialize software capture fifo counter.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_dump_int ( gpioif_group  group)

This function is used to dump all software counter in interrupt function.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_read_gpio_event_count ( gpioif_group  group,
u32 *  pvalue 
)

This function is used to read gpio event counter value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[out]pvalue: Read register value and save it to address pvalue(0~0xffffffff)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_read_reset_val ( gpioif_group  group,
u32 *  pvalue 
)

This function is used to read reset value of GPIOIF Event Counter.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[out]pvalue: Read register value and save it to address pvalue(0~0xffffffff)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_read_low_limit_val ( gpioif_group  group,
u32 *  pvalue 
)

This function is used to read low limit value of GPIOIF Event Counter.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[out]pvalue: Read register value and save it to address pvalue(0~0xffffffff)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_read_high_limit_val ( gpioif_group  group,
u32 *  pvalue 
)

This function is used to read high limit value of GPIOIF Event Counter.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[out]pvalue: Read register value and save it to address pvalue(0~0xffffffff)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_select_clock_source ( gpioif_group  group,
gpioif_source_clock  clock_source 
)

This function is used to select the GPIOIF clock source.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]clock_source: Specifies the GPIOIF clock source selection.(0~3)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_counter_clock_setting ( gpioif_group  group,
u8  enable 
)

This function is used to enable/disable GPIOIF source clock.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]enable: clock is enable or not(0:disable; 1:enable).
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_software_reset ( gpioif_group  group,
mtk_os_gpioif_mode  mode 
)

This function is used to perform software reset of the GPIO event counter.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]mode: Specifies the GPIOIF mode numer to set.(0~2)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_enable_event_counter ( gpioif_group  group)

This function is used to enable event counter mode.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_disable_event_counter ( gpioif_group  group)

This function is used to disable event counter mode.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_disable_capture_counter ( gpioif_group  group)

This function is used to disable capture counter mode.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
To indicate whether this function call is successful or not.
If the return value is -GPIOIF_EINVAL, it means that a wrong parameter is given, and the parameter must be verified.
If the return value is 0, it means success.
int mtk_os_hal_gpioif_read_gpio_cap_fifo0_value ( gpioif_group  group,
u32 *  pvalue 
)

This function is used to read capture fifo0 value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[out]pvalue: Specifies the GPIOIF capture fifo0 value.(0~0xffffffff)
Returns
Return"0" if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_read_gpio_cap_fifo1_value ( gpioif_group  group,
u32 *  pvalue 
)

This function is used to read capture fifo1 value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[out]pvalue: Specifies the GPIOIF capture fifo1 value.(0~0xffffffff)
Returns
Return"0" if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_event_low_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt event low count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt event low count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_event_high_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt event high count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt event high count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_gpio2_rst_done_count ( gpioif_group  group)

This function is used to get GPIOIF gpio2 interrupt reset done count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return gpio2 interrupt reset done count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_event_over_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt event overflow count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt event overflow count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_event_uf_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt event underflow count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt event underflow count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_cap_f0_full_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt capture fifo0 count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt capture fifo0 count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_cap_f1_full_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt capture fifo1 count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt capture fifo1 count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_reset_cap_f0_full_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt reset capture fifo0 count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt reset capture fifo0 count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_reset_cap_f1_full_count ( gpioif_group  group)

This function is used to get GPIOIF interrupt reset capture fifo1 count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return interrupt reset capture fifo1 count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_cap_f0_np_count ( gpioif_group  group)

This function is used to get capture fifo0 not empty count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return fifo0 not empty count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_cap_f1_np_count ( gpioif_group  group)

This function is used to get capture fifo1 not empty count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return fifo1 not empty count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_cap_f0_p_count ( gpioif_group  group)

This function is used to get capture fifo0 empty count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return fifo0 empty count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_int_cap_f1_p_count ( gpioif_group  group)

This function is used to get capture fifo1 empty count value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return fifo1 empty count value if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_interrupt_bit_wise ( gpioif_group  group,
u32  bit,
u8  enable 
)

This function is used to enable/disable interrupt.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]bit: Specifies the GPIOIF interrupt value to set.(0~0xffffffff)
[in]enable: 0 means disable interrupt, 1 means enable interrupt.
Returns
Return "0" if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_cap_fifo0_count ( gpioif_group  group)

This function is used to get capture fifo0 count.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return "0" if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_cap_fifo1_count ( gpioif_group  group)

This function is used to get capture fifo1 count.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
Returns
Return "0" if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_cap_fifo0_val ( gpioif_group  group,
u32  idex 
)

This function is used to get capture fifo0 value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]idex: Specifies the GPIOIF fifo0 number.(0~15)
Returns
Return "0" if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_get_cap_fifo1_val ( gpioif_group  group,
u32  idex 
)

This function is used to get capture fifo1 value.

Parameters
[in]group: Specifies the GPIOIF group number to set.(0~5)
[in]idex: Specifies the GPIOIF fifo1 number.(0~15)
Returns
Return "0" if function executes successfully.
Return -GPIOIF_EINVAL if fail.
int mtk_os_hal_gpioif_int_callback_register ( gpioif_group  group,
gpioif_int_callback  callback,
void *  user_data 
)

This function is used to register user's interrupt callback.

It's used for GPIOIF interrupt function handle.
User can register a callback function when using GPIOIF interrupt.
When one interrupt is triggered and a related user callback is called in OS-HAL interrupt handle function which we register.
This typedef is used to describe the callback function what the user wants to call.

Parameters
[in]ctlr: GPIOIF controller used with the device.
[in]callback: The callback function given by test layer. which will be called before we set gpioif related setting.
[in]user_data: A parameter given by OS-HAL and will be passed to user when the callback function is called.
Returns
Return "0" if callback register successfully.
Return -GPIOIF_EINVAL if ctlr or callback or user_data is NULL.