35 #ifndef __HAL_GPIO_H__ 36 #define __HAL_GPIO_H__ 37 #include "hal_platform.h" 38 #include "hal_pinmux_define.h" 40 #ifdef HAL_GPIO_MODULE_ENABLED 84 #ifdef HAL_GPIO_FEATURE_PUPD 99 #ifdef HAL_GPIO_FEATURE_INVERSE 114 #ifdef HAL_GPIO_FEATURE_CLOCKOUT 240 #ifdef HAL_GPIO_FEATURE_SET_DRIVING 375 #ifdef HAL_GPIO_FEATURE_HIGH_Z 445 #ifdef HAL_GPIO_FEATURE_INVERSE 572 #ifdef HAL_GPIO_FEATURE_PUPD 601 #ifdef HAL_GPIO_FEATURE_CLOCKOUT 626 hal_gpio_status_t hal_gpio_set_clockout(hal_gpio_clock_t gpio_clock_num, hal_gpio_clock_mode_t clock_mode);
630 #ifdef HAL_GPIO_FEATURE_SET_DRIVING hal_gpio_status_t hal_gpio_get_driving_current(hal_gpio_pin_t gpio_pin, hal_gpio_driving_current_t *driving)
This function gets the driving current of the target GPIO.
hal_gpio_status_t hal_gpio_set_output(hal_gpio_pin_t gpio_pin, hal_gpio_data_t gpio_data)
This function sets the output data of the target GPIO.
Defines GPIO driving current as 16mA.
Definition: hal_gpio.h:246
hal_gpio_status_t hal_gpio_init(hal_gpio_pin_t gpio_pin)
This function initializes the GPIO hardware with basic functionality.
hal_gpio_status_t hal_gpio_disable_pull(hal_gpio_pin_t gpio_pin)
This function disables pull-up or pull-down of the target GPIO.
hal_gpio_status_t hal_gpio_pull_down(hal_gpio_pin_t gpio_pin)
This function sets the target GPIO to the pull-down state, after this function, the input data of the...
hal_gpio_status_t hal_gpio_get_direction(hal_gpio_pin_t gpio_pin, hal_gpio_direction_t *gpio_direction)
This function gets the direction of the target GPIO.
Defines GPIO driving current as 12mA.
Definition: hal_gpio.h:245
hal_gpio_direction_t
This enum defines the GPIO direction.
Definition: hal_gpio.h:210
Invalid input pin port.
Definition: hal_gpio.h:235
hal_gpio_status_t hal_gpio_pull_up(hal_gpio_pin_t gpio_pin)
This function sets the target GPIO to pull-up state, after this function, the input data of the targe...
GPIO output direction.
Definition: hal_gpio.h:212
hal_gpio_status_t hal_gpio_set_driving_current(hal_gpio_pin_t gpio_pin, hal_gpio_driving_current_t driving)
This function sets the driving current of the target GPIO.
The pinmux function failed to execute.
Definition: hal_gpio.h:234
The GPIO function executed successfully.
Definition: hal_gpio.h:228
hal_gpio_status_t hal_gpio_set_direction(hal_gpio_pin_t gpio_pin, hal_gpio_direction_t gpio_direction)
This function sets the direction of the target GPIO.
The GPIO function failed to execute.
Definition: hal_gpio.h:225
hal_gpio_pin_t
This enum define the gpio port.
Definition: hal_platform.h:249
hal_gpio_status_t hal_gpio_toggle_pin(hal_gpio_pin_t gpio_pin)
This function toggles the output data of the target GPIO when the direction of the pin is output...
hal_pinmux_status_t hal_pinmux_set_function(hal_gpio_pin_t gpio_pin, uint8_t function_index)
This function configures the pinmux of target GPIO.
GPIO data high.
Definition: hal_gpio.h:219
Invalid input pin number.
Definition: hal_gpio.h:226
Defines GPIO driving current as 8mA.
Definition: hal_gpio.h:244
The pinmux function executed successfully.
Definition: hal_gpio.h:237
hal_gpio_data_t
This enum defines the data type of GPIO.
Definition: hal_gpio.h:217
hal_pinmux_status_t
This enum defines the return type of pinmux API.
Definition: hal_gpio.h:233
hal_gpio_status_t hal_gpio_deinit(hal_gpio_pin_t gpio_pin)
This function deinitializes the GPIO hardware to its default status.
Invalid input function.
Definition: hal_gpio.h:236
Invalid input parameter.
Definition: hal_gpio.h:227
hal_gpio_status_t hal_gpio_get_input(hal_gpio_pin_t gpio_pin, hal_gpio_data_t *gpio_data)
This function gets the input data of target GPIO when the direction of the GPIO is input...
GPIO input direction.
Definition: hal_gpio.h:211
hal_gpio_status_t
This enum defines the return type of GPIO API.
Definition: hal_gpio.h:224
GPIO data low.
Definition: hal_gpio.h:218
hal_gpio_driving_current_t
This enum defines driving current.
Definition: hal_gpio.h:242
hal_gpio_status_t hal_gpio_get_output(hal_gpio_pin_t gpio_pin, hal_gpio_data_t *gpio_data)
This function gets the output data of the target GPIO when the direction of the GPIO is output...
Defines GPIO driving current as 4mA.
Definition: hal_gpio.h:243