Skip to content

Commit 560a6b7

Browse files
committed
shields: add two shield definitions for modulino boards
Add two shield definitions for the the modulino buttons and smartleds modules. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 1d1dc09 commit 560a6b7

File tree

8 files changed

+120
-0
lines changed

8 files changed

+120
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2025 Google LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_ARDUINO_MODULINO_BUTTONS
5+
def_bool $(shields_list_contains,arduino_modulino_buttons)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/input/input-event-codes.h>
8+
#include <zephyr/dt-bindings/led/led.h>
9+
10+
&qwiic_i2c {
11+
modulino-buttons@3e {
12+
compatible = "i2c-device";
13+
reg = <0x3e>;
14+
15+
modulino_buttons: modulino-buttons {
16+
compatible = "arduino,modulino-buttons";
17+
zephyr,codes = <INPUT_KEY_A>,
18+
<INPUT_KEY_B>,
19+
<INPUT_KEY_C>;
20+
};
21+
22+
modulino_leds: modulino-leds {
23+
compatible = "arduino,modulino-buttons-leds";
24+
};
25+
};
26+
27+
};
Binary file not shown.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. _arduino_modulino_buttons:
2+
3+
Arduino Modulino Buttons
4+
########################
5+
6+
Overview
7+
********
8+
9+
The Arduino Modulino Buttons is a QWIIC compatible module with three buttons
10+
and three LEDs.
11+
12+
13+
.. image:: img/arduino_modulino_buttons.webp
14+
:align: center
15+
:alt: Arduino Modulino Buttons module
16+
17+
Programming
18+
***********
19+
20+
Set ``--shield arduino_modulino_buttons`` when you invoke ``west build``, the
21+
buttons will be available through the input subsystem and the LEDs through the
22+
LED subsystem.
23+
24+
For example,
25+
26+
.. zephyr-app-commands::
27+
:zephyr-app: samples/subsys/input
28+
:board: arduino_uno_r4@wifi
29+
:shield: arduino_modulino_buttons
30+
:goals: build
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2025 Google LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_ARDUINO_MODULINO_SMARTLEDS
5+
def_bool $(shields_list_contains,arduino_modulino_smartleds)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/led/led.h>
8+
9+
/ {
10+
aliases {
11+
led-strip = &modulino_smartleds;
12+
};
13+
};
14+
15+
&qwiic_i2c {
16+
modulino_smartleds: modulino-smartleds@36 {
17+
compatible = "arduino,modulino-smartleds";
18+
reg = <0x36>;
19+
chain-length = <8>;
20+
color-mapping = <LED_COLOR_ID_RED
21+
LED_COLOR_ID_GREEN
22+
LED_COLOR_ID_BLUE>;
23+
};
24+
};
Binary file not shown.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.. _arduino_modulino_smartleds:
2+
3+
Arduino Modulino smart LEDs
4+
###########################
5+
6+
Overview
7+
********
8+
9+
The Arduino Modulino smart LEDs is a QWIIC compatible module with 8 addressable
10+
LEDs.
11+
12+
13+
.. image:: img/arduino_modulino_smartleds.webp
14+
:align: center
15+
:alt: Arduino Modulino Smart LEDs
16+
17+
Programming
18+
***********
19+
20+
Set ``--shield arduino_modulino_smartleds`` when you invoke ``west build``, the
21+
leds will be available through the LED strip subsystem.
22+
23+
For example,
24+
25+
.. zephyr-app-commands::
26+
:zephyr-app: samples/drivers/led/led_strip
27+
:board: arduino_uno_r4@wifi
28+
:shield: arduino_modulino_smartleds
29+
:goals: build

0 commit comments

Comments
 (0)