Pin control controller of the STM32 GPIO ports.
More...
Pin control controller of the STM32 GPIO ports.
A pin is a pinmux cell of the upstream binding, STM32_PINMUX(port, line, mode), or'ed with its options. Every option is written when the pin is configured, so a pin without any gets no pull, a push-pull output and the lowest speed. The controller ungates the clock of a port the first time it configures one of its pins:
#define PBL_PINCTRL_STM32_PINMUX(cell)
A pinmux cell, the pin number and mode of STM32_PINMUX().
Definition stm32.h:40
#define PBL_PINCTRL_STM32_PULL_UP
Pull-up.
Definition stm32.h:49
#define STM32_PINCTRL
Pin controller.
Definition stm32.h:79
#define PBL_PINCTRL_STATE_DEFINE(sym, _ctrl,...)
Define a pin state.
Definition pinctrl.h:98
#define AF7
Definition stm32-pinfunc.h:16
#define STM32_PINMUX(port, line, mode)
Definition stm32-pinfunc.h:30
◆ pbl_pinctrl_stm32
◆ PBL_PINCTRL_STM32_DEFINE
| #define PBL_PINCTRL_STM32_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_base, |
|
|
|
... |
|
) |
| |
Value:
.base = (_base), .clks = {__VA_ARGS__}, \
}
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:132
STM32 pin controller.
Definition stm32.h:64
#define PBL_PINCTRL_STM32_NUM_PORTS
Number of GPIO ports of the controller, A to K.
Definition stm32.h:61
A pin controller.
Definition pinctrl.h:55
#define PBL_PINCTRL_CONTROLLER_INIT(sym, _name, _parent, _ops, _num_pads)
Initializer for the struct pbl_pinctrl_controller of controller sym.
Definition pinctrl.h:74
Define the pin controller.
- Parameters
-
| sym | Symbol of the controller. |
| _name | Name. |
| _base | Registers of port A. |
| ... | Clocks of ports A to K, from PBL_CLK(). |
◆ PBL_PINCTRL_STM32_NO_PULL
| #define PBL_PINCTRL_STM32_NO_PULL 0U |
◆ PBL_PINCTRL_STM32_NUM_PORTS
| #define PBL_PINCTRL_STM32_NUM_PORTS 11U |
Number of GPIO ports of the controller, A to K.
◆ PBL_PINCTRL_STM32_OPEN_DRAIN
| #define PBL_PINCTRL_STM32_OPEN_DRAIN PBL_PINCTRL_STM32_OD |
◆ PBL_PINCTRL_STM32_PINMUX
| #define PBL_PINCTRL_STM32_PINMUX |
( |
|
cell | ) |
((uint32_t)(cell)) |
◆ PBL_PINCTRL_STM32_PULL_DOWN
| #define PBL_PINCTRL_STM32_PULL_DOWN (2U << 16) |
◆ PBL_PINCTRL_STM32_PULL_UP
| #define PBL_PINCTRL_STM32_PULL_UP (1U << 16) |
◆ PBL_PINCTRL_STM32_PUSH_PULL
| #define PBL_PINCTRL_STM32_PUSH_PULL 0U |
◆ PBL_PINCTRL_STM32_SPEED
| #define PBL_PINCTRL_STM32_SPEED |
( |
|
n | ) |
((uint32_t)(n) << 21) |
Output speed, 0 (low) to 3 (very high).
◆ STM32_PINCTRL