20 #include "periph_cpu.h" 
   30 #if !defined(CPU_FAM_STM32F1) 
   32 #  define HAVE_GPIO_LL_PREPARE_SWITCH_DIR 
   35 #define HAVE_GPIO_PULL_STRENGTH_T 
   43 #define HAVE_GPIO_DRIVE_STRENGTH_T 
   58 #if defined(GPIO_OSPEEDR_OSPEED0) || defined(GPIO_OSPEEDER_OSPEEDR0) \ 
   59     || defined(GPIO_OSPEEDER_OSPEED0) || defined(GPIO_OSPEEDR_OSPEEDR0) 
   60 #  define STM32_HAS_OSPEED  1 
   62 #  define STM32_HAS_OSPEED  0 
   65 #define HAVE_GPIO_SLEW_T 
   82 #define HAVE_GPIO_IRQ_TRIG_T 
  101     GPIO_TRIGGER_LEVEL          = 0x4,
 
  110     GPIOX_MODER_INPUT   = 0x0,  
 
  111     GPIOX_MODER_OUTPUT  = 0x1,  
 
  112     GPIOX_MODER_AF      = 0x2,  
 
  113     GPIOX_MODER_ANALOG  = 0x3,  
 
  119 #define GPIO_STATE_T_OPEN_DRAIN_FLAG    0x4 
  123 #define GPIO_STATE_T_MODER_Msk          0x3 
  125 #define HAVE_GPIO_STATE_T 
  135 #define HAVE_GPIO_PULL_T 
  143 #define HAVE_GPIO_CONF_T 
gpio_irq_trig_t
Definition of possible IRQ triggers.
 
@ GPIO_TRIGGER_EDGE_FALLING
edge triggered IRQ on falling flanks only
 
@ GPIO_TRIGGER_LEVEL_HIGH
level triggered IRQ on high input
 
@ GPIO_TRIGGER_EDGE_RISING
edge triggered IRQ on rising flanks only
 
@ GPIO_TRIGGER_EDGE_BOTH
edge triggered IRQ on falling AND rising flanks
 
@ GPIO_TRIGGER_LEVEL_LOW
level triggered IRQ on low input
 
gpio_pull_t
Enumeration of pull resistor configurations.
 
gpio_pull_strength_t
Enumeration of pull resistor values.
 
gpio_state_t
Enumeration of GPIO states (direction)
 
gpio_slew_t
Enumeration of slew rate settings.
 
gpio_drive_strength_t
Enumeration of drive strength options.
 
typedef gpio_conf_t
GPIO pin configuration.
 
@ GPIO_FLOATING
No pull ups nor pull downs enabled.
 
@ GPIO_PULL_KEEP
Keep the signal at current logic level with pull up/down resistors.
 
@ GPIO_PULL_DOWN
Pull down resistor enabled.
 
@ GPIO_PULL_UP
Pull up resistor enabled.
 
@ GPIO_PULL_WEAKEST
Use the weakest (highest Ohm value) resistor.
 
@ GPIO_PULL_WEAK
Use a weak pull resistor.
 
@ GPIO_PULL_STRONG
Use a strong pull resistor.
 
@ GPIO_PULL_STRONGEST
Use the strongest pull resistor.
 
@ GPIO_OUTPUT_OPEN_SOURCE
Use pin as output in open emitter configuration.
 
@ GPIO_USED_BY_PERIPHERAL
The GPIO pin is used by a peripheral.
 
@ GPIO_OUTPUT_OPEN_DRAIN
Use pin as output in open collector configuration.
 
@ GPIO_OUTPUT_PUSH_PULL
Use pin as output in push-pull configuration.
 
@ GPIO_DISCONNECT
Disconnect pin from all peripherals.
 
@ GPIO_INPUT
Use pin as input.
 
@ GPIO_SLEW_SLOWEST
let the output voltage level rise/fall as slow as possible
 
@ GPIO_SLEW_FAST
let the output voltage level rise/fall fast
 
@ GPIO_SLEW_SLOW
let the output voltage level rise/fall slowly
 
@ GPIO_SLEW_FASTEST
let the output voltage level rise/fall as fast as possible
 
@ GPIO_DRIVE_STRONG
Use a strong drive strength.
 
@ GPIO_DRIVE_WEAK
Use a weak drive strength.
 
@ GPIO_DRIVE_STRONGEST
Use the strongest drive strength.
 
@ GPIO_DRIVE_WEAKEST
Use the weakest drive strength.
 
GPIO pin configuration for STM32 MCUs.
 
gpio_pull_t pull
Pull resistor configuration.
 
gpio_state_t state
State of the pin.
 
bool initial_value
Initial value of the output.
 
gpio_slew_t slew_rate
Configure the slew rate of outputs.