Driver to communicate with GPIO slaves.
|
| #define | PX_GPIO(port, pin, mode, output_type, speed, pull, output_init, alt_fn) GPIO ## port, pin, mode, output_type, speed, pull, output_init, alt_fn |
| | Helper macro to define a GPIO pin. More...
|
| |
| #define | PX_GPIO_INIT(gpio) _GPIO_INIT(gpio) |
| | Initialise a GPIO pin. More...
|
| |
| #define | PX_GPIO_OUT_SET_HI(gpio) _GPIO_OUT_SET_HI(gpio) |
| | Set GPIO pin output high. More...
|
| |
| #define | PX_GPIO_OUT_SET_LO(gpio) _GPIO_PIN_OUT_SET_LO(gpio) |
| | Set GPIO pin output low. More...
|
| |
| #define | PX_GPIO_OUT_TOGGLE(gpio) _GPIO_OUT_TOGGLE(gpio) |
| | Toggle GPIO pin output. More...
|
| |
| #define | PX_GPIO_OUT_IS_HI(gpio) _GPIO_OUT_IS_HI(gpio) |
| | Test if GPIO pin output is set high. More...
|
| |
| #define | PX_GPIO_OUT_IS_LO(gpio) _GPIO_OUT_IS_LO(gpio) |
| | Test if GPIO pin output is set low. More...
|
| |
| #define | PX_GPIO_IN_IS_HI(gpio) _GPIO_IN_IS_HI(gpio) |
| | Test if GPIO pin input is high. More...
|
| |
| #define | PX_GPIO_IN_IS_LO(gpio) _GPIO_IN_IS_LO(gpio) |
| | Test if GPIO pin input is low. More...
|
| |
| #define | PX_GPIO_DIR_SET_OUT(gpio) _GPIO_DIR_SET_OUT(gpio) |
| | Set GPIO pin direction to output. More...
|
| |
| #define | PX_GPIO_DIR_SET_IN(gpio) _GPIO_DIR_SET_IN(gpio) |
| | Set GPIO pin direction to input. More...
|
| |
| #define | PX_GPIO_DIR_IS_OUT(gpio) _GPIO_DIR_IS_OUT(gpio) |
| | Test if GPIO pin is configured to be an output. More...
|
| |
| #define | PX_GPIO_DIR_IS_IN(gpio) _GPIO_DIR_IS_IN(gpio) |
| | Test if GPIO pin is configured to be an input. More...
|
| |
| #define | PX_GPIO_PULL_UP_ENABLE(gpio) _GPIO_PULL_UP_ENABLE(gpio) |
| | Enable pull-up on GPIO pin. More...
|
| |
| #define | PX_GPIO_PULL_DN_ENABLE(gpio) _GPIO_PULL_DN_ENABLE(gpio) |
| | Enable pull-down on GPIO pin. More...
|
| |
| #define | PX_GPIO_PULL_DISABLE(gpio) _GPIO_PULL_DISABLE(gpio) |
| | Disable pull-up / pull-down on GPIO pin. More...
|
| |
| #define | PX_GPIO_REG_MODER_INIT(gpio) _PX_GPIO_REG_MODER_INIT(gpio) |
| | Macro to calculate bit mask used to initialise GPIOx_MODER register. More...
|
| |
| #define | PX_GPIO_REG_OTYPER_INIT(gpio) _PX_GPIO_REG_OTYPER_INIT(gpio) |
| | Macro to calculate bit mask used to initialise GPIOx_OTYPER register. More...
|
| |
| #define | PX_GPIO_REG_OSPEEDR_INIT(gpio) _PX_GPIO_REG_OSPEEDR_INIT(gpio) |
| | Macro to calculate bit mask used to initialise GPIOx_OSPEEDR register. More...
|
| |
| #define | PX_GPIO_REG_PUPDR_INIT(gpio) _PX_GPIO_REG_PUPDR_INIT(gpio) |
| | Macro to calculate bit mask used to initialise GPIOx_PUPDR register. More...
|
| |
| #define | PX_GPIO_REG_ODR_INIT(gpio) _PX_GPIO_REG_ODR_INIT(gpio) |
| | Macro to calculate bit mask used to initialise GPIOx_OTYPER register. More...
|
| |
| #define | PX_GPIO_REG_AFRL_INIT(gpio) _PX_GPIO_REG_AFRL_INIT(gpio) |
| | Macro to calculate bit mask used to initialise GPIOx_AFRL register (pins 0 to 7) More...
|
| |
| #define | PX_GPIO_REG_AFRH_INIT(gpio) _PX_GPIO_REG_AFRH_INIT(gpio) |
| | Macro to calculate bit mask used to initialise GPIOx_AFRH register (pins 8 to 15) More...
|
| |
|
| enum | px_gpio_mode_t {
PX_GPIO_MODE_IN = 0
, PX_GPIO_MODE_OUT = 1
, PX_GPIO_MODE_AF = 2
, PX_GPIO_MODE_ANA = 3
,
PX_GPIO_MODE_DEF = 3
, PX_GPIO_MODE_BIT_MASK = 0x3
} |
| | GPIO mode selection; See GPIOx_MODER register. More...
|
| |
| enum | px_gpio_otype_t { PX_GPIO_OTYPE_NA = 0
, PX_GPIO_OTYPE_PP = 0
, PX_GPIO_OTYPE_OD = 1
, PX_GPIO_OTYPE_BIT_MASK = 0x1
} |
| | GPIO output type selection; See GPIOx_OTYPER register. More...
|
| |
| enum | px_gpio_ospeed_t {
PX_GPIO_OSPEED_NA = 0
, PX_GPIO_OSPEED_LO = 0
, PX_GPIO_OSPEED_MD = 1
, PX_GPIO_OSPEED_HI = 2
,
PX_GPIO_OSPEED_VH = 3
, PX_GPIO_OSPEED_BIT_MASK = 0x3
} |
| | GPIO output speed selection; See GPIOx_OSPEEDR register. More...
|
| |
| enum | px_gpio_pull_t { PX_GPIO_PULL_NO = 0
, PX_GPIO_PULL_UP = 1
, PX_GPIO_PULL_DN = 2
, PX_GPIO_PULL_BIT_MASK = 0x3
} |
| | GPIO pull-up / pull-down selection; See GPIOx_PUPDR register. More...
|
| |
| enum | px_gpio_out_init_t { PX_GPIO_OUT_INIT_NA = 0
, PX_GPIO_OUT_INIT_LO = 0
, PX_GPIO_OUT_INIT_HI = 1
} |
| | GPIO initial output selection; See GPIOx_ODR register. More...
|
| |
| enum | px_gpio_af_t {
PX_GPIO_AF_NA = 0
, PX_GPIO_AF_0 = 0
, PX_GPIO_AF_1 = 1
, PX_GPIO_AF_2 = 2
,
PX_GPIO_AF_3 = 3
, PX_GPIO_AF_4 = 4
, PX_GPIO_AF_5 = 5
, PX_GPIO_AF_6 = 6
,
PX_GPIO_AF_7 = 7
, PX_GPIO_ALT_FN_BIT_MASK = 0xf
} |
| | GPIO alternate function selection; See GPIOx_AFRL and GPIOx_AFRH register. More...
|
| |