Skip to content

Commit 3ce126a

Browse files
committed
var
1 parent 211d5dc commit 3ce126a

File tree

10 files changed

+27
-0
lines changed

10 files changed

+27
-0
lines changed

documentation/variants.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,20 @@ uses [the Arduino header definitions](https://github.com/zephyrproject-rtos/zeph
9090
};
9191
```
9292

93+
### Configure GPIO devices
94+
95+
The `gpios` node lists the GPIO ports to use.
96+
Pin numbers will be assigned sequentially starting from 0 to the GPIOs of the ports specified here.
97+
For example, if gpio0 and gpio1, each with 16 outputs, are specified, pin 1 of gpio1 will be assigned 17.
98+
99+
```
100+
/ {
101+
zephyr,user {
102+
gpios = <&gpio0>, <&gpio1>;
103+
};
104+
};
105+
```
106+
93107
### Configure Serial devices
94108

95109
The `serials` node defines the Serial devices to use.

variants/arduino_mkrzero/arduino_mkrzero.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<&adc 6>,
5555
<&adc 7>;
5656

57+
gpios = <&porta>, <&portb>;
5758
serials = <&sercom5>;
5859
i2cs = <&sercom0>;
5960
};

variants/arduino_nano_33_ble/arduino_nano_33_ble.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<&adc 4>,
6060
<&adc 1>;
6161

62+
gpios = <&gpio0>, <&gpio1>;
6263
serials = <&uart0>;
6364
i2cs = <&arduino_nano_i2c>;
6465
};

variants/arduino_nano_33_ble_sense/arduino_nano_33_ble_sense.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<&adc 4>,
6060
<&adc 1>;
6161

62+
gpios = <&gpio0>, <&gpio1>;
6263
serials = <&uart0>;
6364
i2cs = <&arduino_nano_i2c>;
6465
};

variants/arduino_nano_33_iot/arduino_nano_33_iot.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<&adc 6>,
6161
<&adc 7>;
6262

63+
gpios = <&porta>, <&portb>;
6364
serials = <&sercom5>;
6465
i2cs = <&arduino_nano_i2c>;
6566
};

variants/beagleconnect_freedom/beagleconnect_freedom.overlay

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
<&gpio0 28 GPIO_ACTIVE_HIGH>; /* D3 - MB1 CS - A5 */
5959

6060
builtin-led-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; /* 2.4GHz TX/RX */
61+
62+
gpios = <&gpio0>;
6163
serials = <&uart0 &uart1>;
6264
i2cs = <&i2c0>;
6365
spis = <&spi0>;

variants/cc3220sf_launchxl/cc3220sf_launchxl.overlay

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<&boosterpack_header 31 0>, /* GPIO_24 */
3131
<&boosterpack_header 32 0>; /* GPIO_23 */
3232
builtin-led-gpios = <&boosterpack_header 10 0>; /* GREEN_LED */
33+
34+
gpios = <&gpioa0>, <&gpioa1>, <&gpioa2>, <&gpioa3>;
3335
serials = <&boosterpack_serial>;
3436
i2cs = <&boosterpack_i2c>;
3537
};

variants/nrf52840dk_nrf52840/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
<&arduino_adc 3>,
5353
<&arduino_adc 4>,
5454
<&arduino_adc 5>;
55+
56+
gpios = <&gpio0>, <&gpio1>;
5557
};
5658
};
5759

variants/nrf9160dk_nrf9160/nrf9160dk_nrf9160.overlay

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
<&arduino_adc 3>,
5858
<&arduino_adc 4>,
5959
<&arduino_adc 5>;
60+
61+
gpios = <&gpio0>;
6062
};
6163
};
6264

variants/rpi_pico/rpi_pico.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
<&adc 1>,
7979
<&adc 2>;
8080

81+
gpios = <&gpio0>;
8182
serials = <&pico_serial>;
8283
i2cs = <&pico_i2c0>;
8384
spis = <&pico_spi>;

0 commit comments

Comments
 (0)