40 #define GPIO_UNDEF          (0xffffffff) 
   45 #if defined(CPU_FAM_STM32MP1) 
   46 #define GPIO_PIN(x, y)      ((GPIOA_BASE + (x << 12)) | y) 
   48 #define GPIO_PIN(x, y)      ((GPIOA_BASE + (x << 10)) | y) 
   94 #ifdef CPU_FAM_STM32F1 
  106 #ifndef CPU_FAM_STM32F0 
  121 #ifdef CPU_FAM_STM32F1 
  132 #define GPIO_MODE(mode, cnf, odr)       (mode | (cnf << 2) | (odr << 4)) 
  140 #define HAVE_GPIO_MODE_T 
  156 #define HAVE_GPIO_PP_T 
  172 #define GPIO_MODE(io, pr, ot)   ((io << 0) | (pr << 2) | (ot << 4)) 
  179 #define HAVE_GPIO_MODE_T 
  197 #define HAVE_GPIO_FLANK_T 
@ GPIO_OUT
select GPIO MASK as output
 
@ GPIO_IN
select GPIO MASK as input
 
gpio_af_t
Available MUX values for configuring a pin's alternate function.
 
@ GPIO_AF1
use alternate function 1
 
@ GPIO_AF2
use alternate function 2
 
@ GPIO_AF5
use alternate function 5
 
@ GPIO_AF15
use alternate function 15
 
@ GPIO_AF4
use alternate function 4
 
@ GPIO_AF8
use alternate function 8
 
@ GPIO_AF6
use alternate function 6
 
@ GPIO_AF10
use alternate function 10
 
@ GPIO_AF9
use alternate function 9
 
@ GPIO_AF14
use alternate function 14
 
@ GPIO_AF3
use alternate function 3
 
@ GPIO_AF_UNDEF
an UNDEF value definition, e.g.
 
@ GPIO_AF0
use alternate function 0
 
@ GPIO_AF12
use alternate function 12
 
@ GPIO_AF7
use alternate function 7
 
@ GPIO_AF13
use alternate function 13
 
@ GPIO_AF11
use alternate function 11
 
#define GPIO_MODE(io, pr, ot)
Generate GPIO mode bitfields.
 
void gpio_init_af(gpio_t pin, gpio_af_t af)
Configure the alternate function for the given pin.
 
void gpio_init_analog(gpio_t pin)
Configure the given pin to be used as ADC input.
 
gpio_af_t
Override alternative GPIO mode options.
 
@ GPIO_AF_OUT_OD
alternate function output - open-drain
 
@ GPIO_AF_OUT_PP
alternate function output - push-pull
 
gpio_mode_t
Available pin modes.
 
unsigned int gpio_t
GPIO type identifier.
 
@ GPIO_OD
configure as output in open-drain mode without pull resistor
 
@ GPIO_IN_PU
configure as input with pull-up resistor
 
@ GPIO_OD_PU
configure as output in open-drain mode with pull resistor enabled
 
@ GPIO_IN_PD
configure as input with pull-down resistor