Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Macros for pin control configuration of Renesas RA0 SoCs. More...

Files

file  pinctrl-ra0.h
 Devicetree pin control helpers for Renesas RA0.

Macros

#define RA_PSEL(psel, port_num, pin_num)
 Utility macro to build Renesas RA0 psels property entry.

Detailed Description

Macros for pin control configuration of Renesas RA0 SoCs.

Each pin configuration is built with the RA_PSEL() macro, which combines a per-port peripheral-function selector, the port number, and the pin number within that port.

The selector follows the naming convention RA_PSEL_P<PORT>nPFS_<SIGNAL>, where <PORT> is the port number and <SIGNAL> is the peripheral signal routed to the pin (for example RA_PSEL_P1nPFS_TXDA0C selects the TXDA0C signal on port 1). Signals are grouped by peripheral:

  • Timer array unit (TAU): timer inputs TI and outputs TO
  • Serial array unit (SAU) in SPI mode: SCK, SI, SO, SSI; in UART mode: TXD, RXD; in simple-I2C mode: SCL, SDA
  • IICA: SCLA0, SDAA0, SCLA1, SDAA1
  • UARTA: TXDA0, RXDA0, TXDA1, RXDA1
  • RTC: RTCOUT, RTCOUNTC
  • Clock output (CGC): PCLBUZ0, PCLBUZ1
  • Capacitive touch (CTSU): TS0 ... TS12, TSCAP
  • JTAG/SWD: SWDIO, SWCLK
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra0.h>
&pinctrl {
uarta0_default: uarta0_default {
group1 {
psels = <RA_PSEL(RA_PSEL_P1nPFS_TXDA0C, 1, 5)>,
<RA_PSEL(RA_PSEL_P1nPFS_RXDA0C, 1, 6)>;
};
};
};

Macro Definition Documentation

◆ RA_PSEL

#define RA_PSEL ( psel,
port_num,
pin_num )

#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra0.h>

Value:
(psel << RA_PSEL_POS | port_num << RA_PORT_NUM_POS | pin_num << RA_PIN_NUM_POS)

Utility macro to build Renesas RA0 psels property entry.

Parameters
pselPin function configuration (see RA_PSEL_{name} macros).
port_numPort (0 or 15).
pin_numPin (0..31).