Skip to content

Commit e372b00

Browse files
soburiDhruvaG2000
authored andcommitted
documentation: Add document about i2cs
Add a description for `i2cs` Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 8d13271 commit e372b00

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

documentation/variants.md

+20
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,26 @@ The following example instantiates `Serial` and `Serial1` with each `uart0` and
107107
};
108108
```
109109

110+
### Configure I2C devices
111+
112+
The `i2cs` node defines the I2C devices to use.
113+
It instantiate the `Wire` with the i2c device that contained in the node.
114+
Also instantiate as `Wire1`, `Wire2`, .. `WireN` with the devices
115+
that is after the second in the case of the array contains plural devices.
116+
117+
If the `i2cs` node is not defined, Use the node labeled `arduino-i2c`.
118+
Boards with Arduino-shield style connectors usually label `arduino-i2c`
119+
to i2c exposed in the connector.
120+
121+
The following example instantiates `Wire` and `Wire2` with each `i2c0` and `i2c1`.
122+
123+
```
124+
/ {
125+
zephyr,user {
126+
i2cs = <&i2c0, &i2c1>;
127+
};
128+
};
129+
```
110130

111131
### Overlays from scratch
112132

0 commit comments

Comments
 (0)