Skip to content

Commit 572a6a6

Browse files
committed
documentation: Add document about serials
Add a description for `serials`
1 parent f9898d9 commit 572a6a6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

documentation/variants.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,31 @@ uses [the Arduino header definitions](https://github.com/zephyrproject-rtos/zeph
8383
};
8484
```
8585

86+
### Configure Serial devices
87+
88+
The `serials` node defines the Serial devices to use.
89+
It instantiate the `Serial` with the UART device that contained in the node.
90+
Also instantiate as `Serial1`, `Serial2`, .. `SerialN` with the devices that is
91+
after the second in the case of the array contains plural devices.
92+
93+
If the `serials` node is not defined, Use the node labeled `arduino-serial`.
94+
Boards with Arduino-shield style connectors usually label `arduino-serial` for
95+
UART port exposed in header or frequently used UART port.
96+
97+
If even 'arduino_serial' does not define, it uses the stub implementation
98+
that redirects to printk().
99+
100+
The following example instantiates `Serial` and `Serial1` with each `uart0` and `uart1`.
101+
102+
```
103+
/ {
104+
zephyr,user {
105+
serials = <&uart0, &uart1>;
106+
};
107+
};
108+
```
109+
110+
86111
### Overlays from scratch
87112

88113
You can see in the example above that there is no mapping for `LED0` in the

0 commit comments

Comments
 (0)