Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pinctrl_soc_bflb_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021-2025 Gerson Fernando Budke <nandojve@gmail.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12#ifndef ZEPHYR_INCLUDE_DRIVERS_PINCTRL_PINCTRL_SOC_BFLB_COMMON_H_
13#define ZEPHYR_INCLUDE_DRIVERS_PINCTRL_PINCTRL_SOC_BFLB_COMMON_H_
14
15#include <zephyr/devicetree.h>
16#include <zephyr/types.h>
17
18/* clang-format off */
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
46
54#define Z_PINCTRL_STATE_PIN_INIT(node_id, prop, idx) \
55 ((DT_PROP_BY_IDX(node_id, prop, idx)) \
56 | (DT_PROP(node_id, bias_pull_up) << BFLB_PINMUX_PULL_UP_POS) \
57 | (DT_PROP(node_id, bias_pull_down) << BFLB_PINMUX_PULL_DOWN_POS) \
58 | (DT_PROP(node_id, output_enable) << BFLB_PINMUX_OE_POS) \
59 | (DT_PROP(node_id, input_schmitt_enable) << BFLB_PINMUX_SMT_POS) \
60 | (DT_ENUM_IDX(node_id, drive_strength) << BFLB_PINMUX_DRIVER_STRENGTH_POS) \
61 ),
62
69#define Z_PINCTRL_STATE_PINS_INIT(node_id, prop) \
70 {DT_FOREACH_CHILD_VARGS(DT_PHANDLE(node_id, prop), \
71 DT_FOREACH_PROP_ELEM, pinmux, \
72 Z_PINCTRL_STATE_PIN_INIT)}
73
76#ifdef __cplusplus
77}
78#endif
79
80/* clang-format on */
81
82#endif /* ZEPHYR_INCLUDE_DRIVERS_PINCTRL_PINCTRL_SOC_BFLB_COMMON_H_ */
Devicetree main header.
struct pinctrl_soc_pin pinctrl_soc_pin_t
Type for R-Car pin.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90