GPIO CPU definitions for the STM32 family. More...
GPIO CPU definitions for the STM32 family.
Definition in file cpu_gpio.h.
#include <stdint.h>#include "cpu.h" Include dependency graph for cpu_gpio.h:
 Include dependency graph for cpu_gpio.h: This graph shows which files directly or indirectly include this file:
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| #define | GPIO_UNDEF (0xffffffff) | 
| Definition of a fitting UNDEF value. | |
| #define | GPIO_PIN(x, y) | 
| Define a CPU specific GPIO pin generator macro. | |
| #define | GPIO_MODE(io, pr, ot) | 
| Generate GPIO mode bitfields. | |
| enum | |
| Available GPIO ports.  More... | |
| enum | gpio_af_t { GPIO_AF0 = 0 , GPIO_AF1 , GPIO_AF2 , GPIO_AF3 , GPIO_AF4 , GPIO_AF5 , GPIO_AF6 , GPIO_AF7 , GPIO_AF8 , GPIO_AF9 , GPIO_AF10 , GPIO_AF11 , GPIO_AF12 , GPIO_AF13 , GPIO_AF14 , GPIO_AF15 , GPIO_AF_UNDEF } | 
| Available MUX values for configuring a pin's alternate function.  More... | |
| 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. | |
| #define GPIO_MODE | ( | io, | |
| pr, | |||
| ot ) | 
Generate GPIO mode bitfields.
We use 5 bit to encode the mode:
Definition at line 172 of file cpu_gpio.h.
| #define GPIO_PIN | ( | x, | |
| y ) | 
Define a CPU specific GPIO pin generator macro.
Definition at line 48 of file cpu_gpio.h.
| #define GPIO_UNDEF (0xffffffff) | 
Definition of a fitting UNDEF value.
Definition at line 40 of file cpu_gpio.h.
| anonymous enum | 
Available GPIO ports.
Definition at line 54 of file cpu_gpio.h.
| enum gpio_af_t | 
Available MUX values for configuring a pin's alternate function.
Definition at line 93 of file cpu_gpio.h.
| void gpio_init_af | ( | gpio_t | pin, | 
| gpio_af_t | af ) | 
Configure the alternate function for the given pin.
| [in] | pin | pin to configure | 
| [in] | af | alternate function to use | 
| void gpio_init_analog | ( | gpio_t | pin | ) | 
Configure the given pin to be used as ADC input.
| [in] | pin | pin to configure |