41 hw_gpio_rising = (1 << 0),
42 hw_gpio_falling = (1 << 1),
hw_gpio_mode_t hw_gpio_get_mode(const hw_gpio_t *gpio)
Get the current mode configuration of a GPIO pin.
struct hw_gpio_t hw_gpio_t
GPIO logical pin structure.
hw_gpio_event_t
GPIO interrupt event flags.
uint8_t hw_gpio_pin(const hw_gpio_t *gpio)
Get the logical pin number for a GPIO handle.
hw_gpio_mode_t
GPIO mode flags for configuring GPIO pins.
void(* hw_gpio_callback_t)(uint8_t bank, uint8_t pin, hw_gpio_event_t event, void *userdata)
GPIO interrupt callback function pointer.
uint8_t hw_gpio_bank(const hw_gpio_t *gpio)
Get the GPIO bank number for a GPIO handle.
bool hw_gpio_get(const hw_gpio_t *gpio)
Read the current state of a GPIO pin.
void hw_gpio_deinit(hw_gpio_t *gpio)
Deinitialize and release a GPIO pin.
void hw_gpio_set_callback(hw_gpio_callback_t callback, void *userdata)
Set the global GPIO interrupt callback handler.
uint8_t hw_gpio_count(uint8_t bank)
Get the total number of available GPIO pins for a given bank.
void hw_gpio_set_mode(hw_gpio_t *gpio, hw_gpio_mode_t mode)
Set the current mode configuration of a GPIO pin.
void hw_gpio_set(hw_gpio_t *gpio, bool value)
Set the state of a GPIO pin.
hw_gpio_t * hw_gpio_init(uint8_t bank, uint8_t pin, hw_gpio_mode_t mode)
Initialize a GPIO pin with the specified mode.