|
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32_PINCTRL_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32_PINCTRL_H_
34#define STM32_ANALOG 0x10
35#define STM32_GPIO 0x11
42#define STM32_MODE_SHIFT 0U
43#define STM32_MODE_MASK 0x1FU
44#define STM32_LINE_SHIFT 5U
45#define STM32_LINE_MASK 0xFU
46#define STM32_PORT_SHIFT 9U
47#define STM32_PORT_MASK 0x1FU
62#define STM32_PINMUX(port, line, mode) \
63 (((((port) - 'A') & STM32_PORT_MASK) << STM32_PORT_SHIFT) | \
64 (((line) & STM32_LINE_MASK) << STM32_LINE_SHIFT) | \
65 (((STM32_ ## mode) & STM32_MODE_MASK) << STM32_MODE_SHIFT))
82#define STM32_MODER_INPUT_MODE (0x0 << STM32_MODER_SHIFT)
83#define STM32_MODER_OUTPUT_MODE (0x1 << STM32_MODER_SHIFT)
84#define STM32_MODER_ALT_MODE (0x2 << STM32_MODER_SHIFT)
85#define STM32_MODER_ANALOG_MODE (0x3 << STM32_MODER_SHIFT)
86#define STM32_MODER_MASK 0x3
87#define STM32_MODER_SHIFT 4
90#define STM32_OTYPER_PUSH_PULL (0x0 << STM32_OTYPER_SHIFT)
91#define STM32_OTYPER_OPEN_DRAIN (0x1 << STM32_OTYPER_SHIFT)
92#define STM32_OTYPER_MASK 0x1
93#define STM32_OTYPER_SHIFT 6
96#define STM32_OSPEEDR_LOW_SPEED (0x0 << STM32_OSPEEDR_SHIFT)
97#define STM32_OSPEEDR_MEDIUM_SPEED (0x1 << STM32_OSPEEDR_SHIFT)
98#define STM32_OSPEEDR_HIGH_SPEED (0x2 << STM32_OSPEEDR_SHIFT)
99#define STM32_OSPEEDR_VERY_HIGH_SPEED (0x3 << STM32_OSPEEDR_SHIFT)
100#define STM32_OSPEEDR_MASK 0x3
101#define STM32_OSPEEDR_SHIFT 7
104#define STM32_PUPDR_NO_PULL (0x0 << STM32_PUPDR_SHIFT)
105#define STM32_PUPDR_PULL_UP (0x1 << STM32_PUPDR_SHIFT)
106#define STM32_PUPDR_PULL_DOWN (0x2 << STM32_PUPDR_SHIFT)
107#define STM32_PUPDR_MASK 0x3
108#define STM32_PUPDR_SHIFT 9
111#define STM32_ODR_0 (0x0 << STM32_ODR_SHIFT)
112#define STM32_ODR_1 (0x1 << STM32_ODR_SHIFT)
113#define STM32_ODR_MASK 0x1
114#define STM32_ODR_SHIFT 11