4 #include <twr_common.h>
twr_gpio_pull_t twr_gpio_get_pull(twr_gpio_channel_t channel)
Get pull-up/pull-down configuration for GPIO channel.
void twr_gpio_set_output(twr_gpio_channel_t channel, int state)
Set output state for GPIO channel.
void twr_gpio_set_pull(twr_gpio_channel_t channel, twr_gpio_pull_t pull)
Set pull-up/pull-down configuration for GPIO channel.
void twr_gpio_init(twr_gpio_channel_t channel)
Initialize GPIO channel.
twr_gpio_mode_t
GPIO mode of operation.
twr_gpio_channel_t
GPIO channels.
void twr_gpio_toggle_output(twr_gpio_channel_t channel)
Toggle output state for GPIO channel.
int twr_gpio_get_output(twr_gpio_channel_t channel)
Get output state for GPIO channel.
twr_gpio_mode_t twr_gpio_get_mode(twr_gpio_channel_t channel)
Get mode of operation for GPIO channel.
twr_gpio_pull_t
GPIO pull-up/pull-down setting.
int twr_gpio_get_input(twr_gpio_channel_t channel)
Get input state for GPIO channel.
void twr_gpio_set_mode(twr_gpio_channel_t channel, twr_gpio_mode_t mode)
Set mode of operation for GPIO channel.
@ TWR_GPIO_MODE_INPUT
GPIO channel operates as input.
@ TWR_GPIO_MODE_OUTPUT
GPIO channel operates as output.
@ TWR_GPIO_MODE_ALTERNATE_2
GPIO channel operates in alternate mode AF2.
@ TWR_GPIO_MODE_ALTERNATE_5
GPIO channel operates in alternate mode AF5.
@ TWR_GPIO_MODE_ALTERNATE_6
GPIO channel operates in alternate mode AF6.
@ TWR_GPIO_MODE_ALTERNATE_0
GPIO channel operates in alternate mode AF0.
@ TWR_GPIO_MODE_ALTERNATE_3
GPIO channel operates in alternate mode AF3.
@ TWR_GPIO_MODE_ALTERNATE
GPIO channel operates in alternate mode.
@ TWR_GPIO_MODE_ALTERNATE_4
GPIO channel operates in alternate mode AF4.
@ TWR_GPIO_MODE_ALTERNATE_7
GPIO channel operates in alternate mode AF7.
@ TWR_GPIO_MODE_ANALOG
GPIO channel operates in analog mode.
@ TWR_GPIO_MODE_OUTPUT_OD
GPIO channel operates as open-drain output.
@ TWR_GPIO_MODE_ALTERNATE_1
GPIO channel operates in alternate mode AF1.
@ TWR_GPIO_P11
GPIO channel P11, TXD2.
@ TWR_GPIO_P12
GPIO channel P12, MISO.
@ TWR_GPIO_P1
GPIO channel P1, A1, RXD0.
@ TWR_GPIO_P8
GPIO channel P8.
@ TWR_GPIO_P3
GPIO channel P3, A3, RXD1.
@ TWR_GPIO_P13
GPIO channel P13, MOSI.
@ TWR_GPIO_P5
GPIO channel P5, A5, DAC1.
@ TWR_GPIO_P9
GPIO channel P9.
@ TWR_GPIO_SDA0
GPIO channel SDA0.
@ TWR_GPIO_INT
GPIO channel INT.
@ TWR_GPIO_P17
GPIO channel P17, SDA1.
@ TWR_GPIO_P6
GPIO channel P6.
@ TWR_GPIO_P15
GPIO channel P15, CS.
@ TWR_GPIO_BUTTON
GPIO channel BUTTON.
@ TWR_GPIO_SCL0
GPIO channel SCL0.
@ TWR_GPIO_LED
GPIO channel LED.
@ TWR_GPIO_P10
GPIO channel P10, RXD2.
@ TWR_GPIO_P2
GPIO channel P2, A2, TXD1.
@ TWR_GPIO_P0
GPIO channel P0, A0, TXD0.
@ TWR_GPIO_P14
GPIO channel P14, SCLK.
@ TWR_GPIO_P4
GPIO channel P4, A4, DAC0.
@ TWR_GPIO_P16
GPIO channel P16, SCL1.
@ TWR_GPIO_P7
GPIO channel P7, A6.
@ TWR_GPIO_PULL_NONE
GPIO channel has no pull-up/pull-down.
@ TWR_GPIO_PULL_DOWN
GPIO channel has pull-down.
@ TWR_GPIO_PULL_UP
GPIO channel has pull-up.