|
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ESP_PINCTRL_COMMON_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ESP_PINCTRL_COMMON_H_
12#define ESP32_PIN_NUM_SHIFT 0U
13#define ESP32_PIN_NUM_MASK 0x3FU
20#define ESP32_PIN_SIGI_MASK 0x1FFU
21#define ESP32_PIN_SIGI_SHIFT 6U
22#define ESP32_PIN_SIGO_MASK 0x1FFU
23#define ESP32_PIN_SIGO_SHIFT 15U
24#define ESP_SIG_INVAL ESP32_PIN_SIGI_MASK
26#define ESP32_PINMUX(pin, sig_i, sig_o) \
27 (((pin & ESP32_PIN_NUM_MASK) << ESP32_PIN_NUM_SHIFT) | \
28 ((sig_i & ESP32_PIN_SIGI_MASK) << ESP32_PIN_SIGI_SHIFT) | \
29 ((sig_o & ESP32_PIN_SIGO_MASK) << ESP32_PIN_SIGO_SHIFT))
36#define ESP32_PIN_BIAS_SHIFT 0U
37#define ESP32_PIN_BIAS_MASK 0x3U
38#define ESP32_PIN_DRV_SHIFT 2U
39#define ESP32_PIN_DRV_MASK 0x3U
40#define ESP32_PIN_OUT_SHIFT 4U
41#define ESP32_PIN_OUT_MASK 0x3U
42#define ESP32_PIN_EN_DIR_SHIFT 6U
43#define ESP32_PIN_EN_DIR_MASK 0x3U
46#define ESP32_NO_PULL 0x1
47#define ESP32_PULL_UP 0x2
48#define ESP32_PULL_DOWN 0x3
51#define ESP32_PUSH_PULL 0x1
52#define ESP32_OPEN_DRAIN 0x2
58#define ESP32_PIN_OUT_HIGH 0x1
59#define ESP32_PIN_OUT_LOW 0x2
65#define ESP32_PIN_OUT_EN 0x1
66#define ESP32_PIN_IN_EN 0x2
73#define ESP32_NO_PULL_FLAG BIT(0)
74#define ESP32_PULL_UP_FLAG BIT(1)
75#define ESP32_PULL_DOWN_FLAG BIT(2)
76#define ESP32_PUSH_PULL_FLAG BIT(3)
77#define ESP32_OPEN_DRAIN_FLAG BIT(4)
78#define ESP32_DIR_INP_FLAG BIT(5)
79#define ESP32_DIR_OUT_FLAG BIT(6)
80#define ESP32_PIN_OUT_HIGH_FLAG BIT(7)
81#define ESP32_PIN_OUT_LOW_FLAG BIT(8)
82#define ESP32_PIN_OUT_EN_FLAG BIT(9)
83#define ESP32_PIN_IN_EN_FLAG BIT(10)