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

Macros for pin control configuration of Renesas RZ/N Series. More...

Files

file  pinctrl-rzn-common.h
 Devicetree pin control helpers for Renesas RZ/N.

Macros

#define RZN_PINMUX(port, pin, func)
 Create an encoded value containing port/pin/function information.

Detailed Description

Macros for pin control configuration of Renesas RZ/N Series.

Each pin configuration is built with the RZN_PINMUX() macro, which takes three fields:

  • port — the port identifier, one of the PORT_* values.
  • pin — the pin number within that port.
  • func — the alternate-function number that selects which peripheral signal is routed to the pin. There is no symbolic macro for it: func is the function index for the pin taken from the SoC's Pin Function Controller table (the multiplexing table in the hardware manual / pin-assignment spreadsheet), passed as a plain integer.

For example, RZN_PINMUX(PORT_16, 5, 1) routes function 1 of port 16 pin 5 (UART0 TXD on the supported SoCs).

#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzn-common.h>
&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <RZN_PINMUX(PORT_16, 5, 1)>;
};
group2 {
pinmux = <RZN_PINMUX(PORT_16, 6, 2)>;
input-enable;
};
};
};

Macro Definition Documentation

◆ RZN_PINMUX

#define RZN_PINMUX ( port,
pin,
func )

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

Value:
(port | pin | (func << 16))

Create an encoded value containing port/pin/function information.

Parameters
portPort identifier (PORT_00..PORT_34).
pinPin number within the port.
funcPin function selector (encoded in bits [21:16])
Returns
Encoded pinmux value.