Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
FocalTech FT9001 pin control helpers

Macros for pin multiplexing configuration on FocalTech FT9001. More...

Topics

 FT9001 IOCTRL register offsets
 Register offsets used as reg arguments to FOCALTECH_PINMUX.

Files

file  focaltech_ft9001_pinctrl.h
 Devicetree pin control helpers for FocalTech FT9001.

Macros

#define FOCALTECH_PINMUX(reg, bit, value)
 Encode one pinmux cell for FT9001 pinctrl devicetree properties.

Detailed Description

Macros for pin multiplexing configuration on FocalTech FT9001.

These helpers describe IO mux selections for the devicetree node compatible with focaltech,ft9001-pinctrl. Each entry in a pinmux property is formed with FOCALTECH_PINMUX, passing one of the IO controller register offsets from FT9001 IOCTRL register offsets, the bit index within that register that controls the pad or signal, and the mux select value for that field (0 = default, 1 = alternate).

#include <zephyr/dt-bindings/pinctrl/focaltech_ft9001_pinctrl.h>
&pinctrl {
usart3_default: usart3_default {
group1 {
pinmux = <FOCALTECH_PINMUX(FOCALTECH_IOCTRL_SCICR_OFFSET, 25, 1)>,
<FOCALTECH_PINMUX(FOCALTECH_IOCTRL_SCICR_OFFSET, 26, 1)>;
};
};
};

Macro Definition Documentation

◆ FOCALTECH_PINMUX

#define FOCALTECH_PINMUX ( reg,
bit,
value )

#include <focaltech_ft9001_pinctrl.h>

Value:
(((reg) << FOCALTECH_PINCTRL_REG_POS) | ((bit) << FOCALTECH_PINCTRL_BIT_POS) | \
((value) << FOCALTECH_PINCTRL_VALUE_POS))

Encode one pinmux cell for FT9001 pinctrl devicetree properties.

Parameters
regIO mux register offset (use FOCALTECH_IOCTRL_*_OFFSET).
bitBit index inside reg for this mux control field.
valueMux selection written to that field.