Azure Sphere MT3620 M4 API Reference Manual
|
This section provides high level APIs to upper layer. More...
This section provides high level APIs to upper layer.
Functions | |
int | mtk_os_hal_gpio_get_input (os_hal_gpio_pin pin, os_hal_gpio_data *pvalue) |
This function is used to get input data of the target GPIO. More... | |
int | mtk_os_hal_gpio_set_output (os_hal_gpio_pin pin, os_hal_gpio_data out_val) |
This function is used to set output data of the target GPIO. More... | |
int | mtk_os_hal_gpio_get_output (os_hal_gpio_pin pin, os_hal_gpio_data *pvalue) |
This function is used to get output data of the target GPIO. More... | |
int | mtk_os_hal_gpio_set_direction (os_hal_gpio_pin pin, os_hal_gpio_direction dir) |
This function is used to set the direction of the target GPIO. More... | |
int | mtk_os_hal_gpio_get_direction (os_hal_gpio_pin pin, os_hal_gpio_direction *pvalue) |
This function is used to get the direction of the target GPIO. More... | |
int | mtk_os_hal_gpio_set_pullen_pullsel (os_hal_gpio_pin pin, bool enable, bool isup) |
This function is used to set the target GPIO to pull-up/pull-down state. More... | |
int mtk_os_hal_gpio_get_input | ( | os_hal_gpio_pin | pin, |
os_hal_gpio_data * | pvalue | ||
) |
This function is used to get input data of the target GPIO.
Usage: OS-HAL driver should call it in GPIO get-input value function.
[in] | pin | : Specifies the pin number to operate.(0~93) |
[out] | pvalue | : Get DIN value and save it to address pvalue. |
int mtk_os_hal_gpio_set_output | ( | os_hal_gpio_pin | pin, |
os_hal_gpio_data | out_val | ||
) |
This function is used to set output data of the target GPIO.
Usage: OS-HAL driver should call it in GPIO set-output value function.
[in] | pin | : Specifies the pin number to operate.(0~93) |
[in] | out_val | : Represents output data of the target GPIO. 0, output low. 1, output high. |
int mtk_os_hal_gpio_get_output | ( | os_hal_gpio_pin | pin, |
os_hal_gpio_data * | pvalue | ||
) |
This function is used to get output data of the target GPIO.
Usage: OS-HAL driver should call it in GPIO get-output value function.
[in] | pin | : Specifies the pin number to operate.(0~93) |
[out] | pvalue | : Get DOUT value and save it to address pvalue |
int mtk_os_hal_gpio_set_direction | ( | os_hal_gpio_pin | pin, |
os_hal_gpio_direction | dir | ||
) |
This function is used to set the direction of the target GPIO.
Usage: OS-HAL driver should call it in GPIO set-direction function.
[in] | pin | : Specifies the pin number to set.(0~93) |
[in] | dir | : Specified the direction of target GPIO, 0, input. 1, output. |
int mtk_os_hal_gpio_get_direction | ( | os_hal_gpio_pin | pin, |
os_hal_gpio_direction * | pvalue | ||
) |
This function is used to get the direction of the target GPIO.
Usage: OS-HAL driver should call it in GPIO get-direction function.
[in] | pin | : Specifies the pin number to operate.(0~93) |
[out] | pvalue | : Get DIR value and save it to address pvalue |
int mtk_os_hal_gpio_set_pullen_pullsel | ( | os_hal_gpio_pin | pin, |
bool | enable, | ||
bool | isup | ||
) |
This function is used to set the target GPIO to pull-up/pull-down state.
Usage: OS-HAL driver should call it when setting GPIO pull-up/pull-down state.
[in] | pin | : Specifies the pin number to set.(0~93) |
[in] | enable | : Specifies the pin pullen enable or disable. True means pullen enable; false means pullen disable. |
[in] | isup | : Specifies the pin pullsel up or down. True means pullsel up; false means pullsel down. |