 |
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ENE_KB106X_PINCTRL_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ENE_KB106X_PINCTRL_H_
12#define PINMUX_FUNC_GPIO 0x00
13#define PINMUX_FUNC_A 0x00
14#define PINMUX_FUNC_B 0x01
15#define PINMUX_FUNC_C 0x02
16#define PINMUX_FUNC_D 0x03
17#define PINMUX_FUNC_MAX 0x04
19#define ENE_KB106X_NO_PUD_POS 12
20#define ENE_KB106X_PD_POS 13
21#define ENE_KB106X_PU_POS 14
22#define ENE_KB106X_PUSH_PULL_POS 15
23#define ENE_KB106X_OPEN_DRAIN_POS 16
24#define ENE_KB106X_OUT_DIS_POS 17
25#define ENE_KB106X_OUT_EN_POS 18
26#define ENE_KB106X_OUT_HI_POS 19
27#define ENE_KB106X_OUT_LO_POS 20
28#define ENE_KB106X_PIN_LOW_POWER_POS 21
29#define ENE_KB106X_IN_DIS_POS 22
30#define ENE_KB106X_IN_EN_POS 23
31#define ENE_KB106X_DRIVING_POS 31
33#define ENE_KB106X_PINMUX_PORT_POS 5
34#define ENE_KB106X_PINMUX_PORT_MSK 0x7
35#define ENE_KB106X_PINMUX_PIN_POS 0
36#define ENE_KB106X_PINMUX_PIN_MSK 0x1f
37#define ENE_KB106X_PINMUX_FUNC_POS 8
38#define ENE_KB106X_PINMUX_FUNC_MSK 0xf
40#define ENE_KB106X_EXTENDED_BANK 0x80
48#define ENE_KB106X_PINMUX(n, f) \
49 (((((n) >> 5) & ENE_KB106X_PINMUX_PORT_MSK) << ENE_KB106X_PINMUX_PORT_POS) | \
50 (((n) & ENE_KB106X_PINMUX_PIN_MSK) << ENE_KB106X_PINMUX_PIN_POS) | \
51 (((f) & ENE_KB106X_PINMUX_FUNC_MSK) << ENE_KB106X_PINMUX_FUNC_POS))