|
STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
|
← STM32duino documentation
|
Classes | |
| struct | PinMap |
| Pin, peripheral instance and alternate function of one pin mapping entry. More... | |
Macros | |
| #define | GPIO_AF_NONE 0 |
| #define | STM_LL_GPIO_PIN(X) (pin_map_ll[STM_PIN(X)]) |
| #define | NP 0U |
| No peripheral. | |
Functions | |
| bool | pin_in_pinmap (PinName pin, const PinMap *map) |
| Check whether a pin is present in a pinmap. | |
| void | pin_function (PinName pin, int function) |
| Configure a pin: mode, speed, output type, pull-up/pull-down and alternate function. | |
| static PinName | pin_pinName (const PinMap *map) |
| Get the pin name of a PinMap entry. | |
| void | pinmap_pinout (PinName pin, const PinMap *map) |
| Configure a pin from a pinmap entry matching the pin. | |
| void * | pinmap_find_peripheral (PinName pin, const PinMap *map) |
| Find the peripheral associated with a pin. | |
| void * | pinmap_peripheral (PinName pin, const PinMap *map) |
| Find the peripheral associated with a pin, ignoring NC pins. | |
| PinName | pinmap_find_pin (void *peripheral, const PinMap *map) |
| Find the pin associated with a peripheral. | |
| PinName | pinmap_pin (void *peripheral, const PinMap *map) |
| Find the pin associated with a peripheral, ignoring NP peripherals. | |
| uint32_t | pinmap_find_function (PinName pin, const PinMap *map) |
| Find the function associated with a pin. | |
| uint32_t | pinmap_function (PinName pin, const PinMap *map) |
| Find the function associated with a pin, ignoring NC pins. | |
| void * | pinmap_merge_peripheral (void *a, void *b) |
| Merge two peripheral pointers that may be NP. | |
Variables | |
| const uint32_t | pin_map_ll [16] |
| Even if MP1 support some dual pad (analog switch), we don't consider it because its behavior is different from H7 and almost useless. | |
| void pin_function | ( | PinName | pin, |
| int | function | ||
| ) |
Configure a pin: mode, speed, output type, pull-up/pull-down and alternate function.
| pin | Pin name. |
| function | Pin function, encoded with the STM_PIN_* macros. |
| bool pin_in_pinmap | ( | PinName | pin, |
| const PinMap * | map | ||
| ) |
Check whether a pin is present in a pinmap.
| pin | Pin name to look for. |
| map | PinMap array, terminated by an entry with pin NC. |
|
inlinestatic |
| uint32_t pinmap_find_function | ( | PinName | pin, |
| const PinMap * | map | ||
| ) |
Find the function associated with a pin.
| pin | Pin name. |
| map | PinMap array, terminated by an entry with pin NC. |
| void * pinmap_find_peripheral | ( | PinName | pin, |
| const PinMap * | map | ||
| ) |
Find the peripheral associated with a pin.
| pin | Pin name. |
| map | PinMap array, terminated by an entry with pin NC. |
| PinName pinmap_find_pin | ( | void * | peripheral, |
| const PinMap * | map | ||
| ) |
Find the pin associated with a peripheral.
| peripheral | Peripheral pointer. |
| map | PinMap array, terminated by an entry with peripheral NP. |
| uint32_t pinmap_function | ( | PinName | pin, |
| const PinMap * | map | ||
| ) |
Find the function associated with a pin, ignoring NC pins.
| pin | Pin name. |
| map | PinMap array, terminated by an entry with pin NC. |
| void * pinmap_merge_peripheral | ( | void * | a, |
| void * | b | ||
| ) |
Merge two peripheral pointers that may be NP.
| a | First peripheral pointer. |
| b | Second peripheral pointer. |
| void * pinmap_peripheral | ( | PinName | pin, |
| const PinMap * | map | ||
| ) |
Find the peripheral associated with a pin, ignoring NC pins.
| pin | Pin name. |
| map | PinMap array, terminated by an entry with pin NC. |
| PinName pinmap_pin | ( | void * | peripheral, |
| const PinMap * | map | ||
| ) |
Find the pin associated with a peripheral, ignoring NP peripherals.
| peripheral | Peripheral pointer. |
| map | PinMap array, terminated by an entry with peripheral NP. |
| void pinmap_pinout | ( | PinName | pin, |
| const PinMap * | map | ||
| ) |
Configure a pin from a pinmap entry matching the pin.
| pin | Pin name. Nothing is done if the pin is NC. |
| map | PinMap array, terminated by an entry with pin NC. |
|
extern |
Even if MP1 support some dual pad (analog switch), we don't consider it because its behavior is different from H7 and almost useless.
Switches remains open all the time. No need to configure it