 |
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
6#ifndef _INCLUDE_ZEPHYR_DT_BINDINGS_PINCTRL_SF32LB_COMMON_PINCTRL_H_
7#define _INCLUDE_ZEPHYR_DT_BINDINGS_PINCTRL_SF32LB_COMMON_PINCTRL_H_
9#define SF32LB_FSEL_POS 0U
10#define SF32LB_FSEL_MSK 0x0000000FU
11#define SF32LB_PORT_POS 12U
12#define SF32LB_PORT_MSK 0x00003000U
13#define SF32LB_PAD_POS 14U
14#define SF32LB_PAD_MSK 0x003FC000U
15#define SF32LB_PINR_FIELD_POS 22U
16#define SF32LB_PINR_FIELD_MSK 0x00C00000U
17#define SF32LB_PINR_OFFSET_POS 24U
18#define SF32LB_PINR_OFFSET_MSK 0xFF000000U
37#define SF32LB_PINMUX(port, pad, fsel, pinr_offset, pinr_field) \
38 ((((pinr_offset) << SF32LB_PINR_OFFSET_POS) & SF32LB_PINR_OFFSET_MSK) | \
39 (((pinr_field) << SF32LB_PINR_FIELD_POS) & SF32LB_PINR_FIELD_MSK) | \
40 (((SF32LB_PORT_##port) << SF32LB_PORT_POS) & SF32LB_PORT_MSK) | \
41 (((pad) << SF32LB_PAD_POS) & SF32LB_PAD_MSK) | \
42 (((fsel) << SF32LB_FSEL_POS) & SF32LB_FSEL_MSK))
55#define SF32LB_PINMUX_ANALOG(port, pad) \
56 ((((SF32LB_PORT_##port) << SF32LB_PORT_POS) & SF32LB_PORT_MSK) | \
57 (((pad) << SF32LB_PAD_POS) & SF32LB_PAD_MSK) | \
58 ((15U << SF32LB_FSEL_POS) & SF32LB_FSEL_MSK))