26 #define HW_GPIO_MAX_COUNT 50 109 return gpio && gpio->
mask > 0;
GPIO pin configured for PWM.
hw_gpio_event_t
GPIO mode flags for configuring GPIO pins.
void(* hw_gpio_callback_t)(uint8_t pin, hw_gpio_event_t event, void *userdata)
GPIO interrupt callback function pointer.
GPIO pin input with pull-down resistor.
hw_gpio_t hw_gpio_init(uint8_t pin, hw_gpio_mode_t mode)
Initialize a GPIO pin with the specified mode.
GPIO pin configured as output.
uint8_t pin
GPIO logical pin number.
GPIO pin configured for I2C.
GPIO pin falling edge interrupt.
hw_gpio_mode_t
GPIO mode flags for configuring GPIO pins.
uint8_t hw_gpio_count(void)
Get the total number of available GPIO pins.
bool hw_gpio_get(hw_gpio_t *gpio)
Read the current state of a GPIO pin.
uint64_t mask
GPIO pin mask for multiple pins.
static bool hw_gpio_valid(hw_gpio_t *gpio)
Validate the GPIO pin.
GPIO pin rising edge interrupt.
GPIO pin configured for analog input.
GPIO pin mode is not implemented.
GPIO pin configured for SPI.
void hw_gpio_finalize(hw_gpio_t *gpio)
Finalize and release a GPIO pin.
GPIO pin configured for UART.
hw_gpio_mode_t hw_gpio_get_mode(hw_gpio_t *gpio)
Get the current mode configuration of a GPIO pin.
void hw_gpio_set_callback(hw_gpio_callback_t callback, void *userdata)
Set the global GPIO interrupt callback handler.
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.
GPIO logical pin structure.
struct hw_gpio_t hw_gpio_t
GPIO logical pin structure.
GPIO pin input with pull-up resistor.