|
| enum | GpioState { GPIO_STATE_LOW = 0
, GPIO_STATE_HIGH
, NUM_GPIO_STATES
} |
| | High or low GPIO state. More...
|
| |
| enum | GpioMode {
GPIO_ANALOG = 0
, GPIO_INPUT_FLOATING
, GPIO_INPUT_PULL_DOWN
, GPIO_INPUT_PULL_UP
,
GPIO_OUTPUT_OPEN_DRAIN
, GPIO_OUTPUT_PUSH_PULL
, GPIO_ALTFN_OPEN_DRAIN
, GPIO_ALTFN_PUSH_PULL
,
NUM_GPIO_MODES
} |
| | Available modes for the GPIO pins. More...
|
| |
| enum | GpioAlternateFunctions {
GPIO_ALT_NONE = 0x00U
, GPIO_ALT0_SWDIO = 0x00U
, GPIO_ALT0_SWCLK = 0x00U
, GPIO_ALT1_TIM1 = 0x01U
,
GPIO_ALT1_TIM2 = 0x01U
, GPIO_ALT2_TIM4 = 0x02U
, GPIO_ALT4_I2C1 = 0x04U
, GPIO_ALT4_I2C2 = 0x04U
,
GPIO_ALT4_I2C3 = 0x04U
, GPIO_ALT5_SPI1 = 0x05U
, GPIO_ALT5_SPI2 = 0x05U
, GPIO_ALT6_SPI3 = 0x06U
,
GPIO_ALT7_USART1 = 0x07U
, GPIO_ALT7_USART2 = 0x07U
, GPIO_ALT7_USART3 = 0x07U
, GPIO_ALT9_CAN1 = 0x09U
,
GPIO_ALT14_TIM15 = 0x0EU
, GPIO_ALT14_TIM16 = 0x0EU
} |
| | Alternate function mapping. Read STM32L433 datasheet page 75. More...
|
| |
| enum | GpioPort {
GPIO_PORT_A = 0
, GPIO_PORT_B
, NUM_GPIO_PORTS
, GPIO_PORT_A = 0
,
GPIO_PORT_B
, GPIO_PORT_C
, GPIO_PORT_D
, GPIO_PORT_E
,
GPIO_PORT_H
, NUM_GPIO_PORTS
} |
| | Available GPIO ports. More...
|
| |
|
| StatusCode | gpio_init (void) |
| | Initializes GPIO globally by disabling JTAG and enabling all GPIO clocks. More...
|
| |
| StatusCode | gpio_init_pin (const GpioAddress *address, const GpioMode pin_mode, GpioState init_state) |
| | Initializes a GPIO pin by address. More...
|
| |
| StatusCode | gpio_init_pin_af (const GpioAddress *address, const GpioMode pin_mode, GpioAlternateFunctions alt_func) |
| | Initializes an alternate function for a GPIO pin by address. More...
|
| |
| StatusCode | gpio_set_state (const GpioAddress *address, GpioState state) |
| | Sets the GPIO pin to a valid state. More...
|
| |
| StatusCode | gpio_toggle_state (const GpioAddress *address) |
| | Toggles the GPIO. More...
|
| |
| GpioState | gpio_get_state (const GpioAddress *address) |
| | Gets the GPIO state. More...
|
| |
| StatusCode | gpio_it_init (const GpioAddress *address, InterruptSettings *settings, const GpioMode pin_mode, GpioState init_state) |
| | Initialize pin to be registered as an interrupt. More...
|
| |
| StatusCode | gpio_register_interrupt (const GpioAddress *address, const InterruptSettings *settings, const Event event, Task *task) |
| | Register a GPIO interrupt by passing in the pin address and task to notify. More...
|
| |
| InterruptEdge | gpio_it_get_edge (const GpioAddress *address) |
| | Gets the GPIO interrupt edge. More...
|
| |
| InterruptPriority | gpio_it_get_priority (const GpioAddress *address) |
| | Gets the GPIO interrupt priority. More...
|
| |
| InterruptType | gpio_it_get_type (const GpioAddress *address) |
| | Gets the GPIO interrupt type. More...
|
| |
| Task * | gpio_it_get_target_task (const GpioAddress *address) |
| | Gets the GPIO interrupt task. More...
|
| |
| StatusCode | gpio_it_mask_interrupt (const GpioAddress *address, bool masked) |
| | Masks the GPIO interrupt. More...
|
| |
| StatusCode | gpio_trigger_interrupt (const GpioAddress *address) |
| | Software generated GPIO interrupt. More...
|
| |
GPIO library.