Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sf32lb-common-pinctrl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Core Devices LLC
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef _INCLUDE_ZEPHYR_DT_BINDINGS_PINCTRL_SF32LB_COMMON_PINCTRL_H_
7#define _INCLUDE_ZEPHYR_DT_BINDINGS_PINCTRL_SF32LB_COMMON_PINCTRL_H_
8
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
19
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))
43
44#endif /* _INCLUDE_ZEPHYR_DT_BINDINGS_PINCTRL_SF32LB_COMMON_PINCTRL_H_ */