Go to the source code of this file.
Classes | |
struct | gpio_config_t |
Macros | |
#define | digitalHi(p, i) { p->BSRR = i; } |
#define | digitalIn(p, i) (p->IDR & i) |
#define | digitalLo(p, i) { p->BRR = i; } |
#define | digitalToggle(p, i) { p->ODR ^= i; } |
Enumerations | |
enum | GPIO_Mode { Mode_AIN = 0x0, Mode_IN_FLOATING = 0x04, Mode_IPD = 0x28, Mode_IPU = 0x48, Mode_Out_OD = 0x14, Mode_Out_PP = 0x10, Mode_AF_OD = 0x1C, Mode_AF_PP = 0x18 } |
enum | GPIO_Pin { Pin_0 = 0x0001, Pin_1 = 0x0002, Pin_2 = 0x0004, Pin_3 = 0x0008, Pin_4 = 0x0010, Pin_5 = 0x0020, Pin_6 = 0x0040, Pin_7 = 0x0080, Pin_8 = 0x0100, Pin_9 = 0x0200, Pin_10 = 0x0400, Pin_11 = 0x0800, Pin_12 = 0x1000, Pin_13 = 0x2000, Pin_14 = 0x4000, Pin_15 = 0x8000, Pin_All = 0xFFFF } |
enum | GPIO_Speed { Speed_10MHz = 1, Speed_2MHz, Speed_50MHz } |
Functions | |
void | gpioExtiLineConfig (uint8_t portsrc, uint8_t pinsrc) |
void | gpioInit (GPIO_TypeDef *gpio, gpio_config_t *config) |
void | gpioPinRemapConfig (uint32_t remap, bool enable) |
#define digitalHi | ( | p, | |
i | |||
) | { p->BSRR = i; } |
Definition at line 67 of file drv_gpio.h.
#define digitalIn | ( | p, | |
i | |||
) | (p->IDR & i) |
Definition at line 70 of file drv_gpio.h.
#define digitalLo | ( | p, | |
i | |||
) | { p->BRR = i; } |
Definition at line 68 of file drv_gpio.h.
#define digitalToggle | ( | p, | |
i | |||
) | { p->ODR ^= i; } |
Definition at line 69 of file drv_gpio.h.
enum GPIO_Mode |
Enumerator | |
---|---|
Mode_AIN | |
Mode_IN_FLOATING | |
Mode_IPD | |
Mode_IPU | |
Mode_Out_OD | |
Mode_Out_PP | |
Mode_AF_OD | |
Mode_AF_PP |
Definition at line 24 of file drv_gpio.h.
enum GPIO_Pin |
Enumerator | |
---|---|
Pin_0 | |
Pin_1 | |
Pin_2 | |
Pin_3 | |
Pin_4 | |
Pin_5 | |
Pin_6 | |
Pin_7 | |
Pin_8 | |
Pin_9 | |
Pin_10 | |
Pin_11 | |
Pin_12 | |
Pin_13 | |
Pin_14 | |
Pin_15 | |
Pin_All |
Definition at line 41 of file drv_gpio.h.
enum GPIO_Speed |
Enumerator | |
---|---|
Speed_10MHz | |
Speed_2MHz | |
Speed_50MHz |
Definition at line 35 of file drv_gpio.h.
void gpioExtiLineConfig | ( | uint8_t | portsrc, |
uint8_t | pinsrc | ||
) |
Definition at line 88 of file drv_gpio.c.
void gpioInit | ( | GPIO_TypeDef * | gpio, |
gpio_config_t * | config | ||
) |
Definition at line 56 of file drv_gpio.c.
void gpioPinRemapConfig | ( | uint32_t | remap, |
bool | enable | ||
) |
Definition at line 103 of file drv_gpio.c.