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 <fabiobaltieri@google.com>
This commit is contained in:
parent
1d1dc09ca3
commit
560a6b7de9
8 changed files with 120 additions and 0 deletions
5
boards/shields/arduino_modulino_buttons/Kconfig.shield
Normal file
5
boards/shields/arduino_modulino_buttons/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright 2025 Google LLC
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config SHIELD_ARDUINO_MODULINO_BUTTONS
|
||||||
|
def_bool $(shields_list_contains,arduino_modulino_buttons)
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2025 Google LLC
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||||
|
#include <zephyr/dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&qwiic_i2c {
|
||||||
|
modulino-buttons@3e {
|
||||||
|
compatible = "i2c-device";
|
||||||
|
reg = <0x3e>;
|
||||||
|
|
||||||
|
modulino_buttons: modulino-buttons {
|
||||||
|
compatible = "arduino,modulino-buttons";
|
||||||
|
zephyr,codes = <INPUT_KEY_A>,
|
||||||
|
<INPUT_KEY_B>,
|
||||||
|
<INPUT_KEY_C>;
|
||||||
|
};
|
||||||
|
|
||||||
|
modulino_leds: modulino-leds {
|
||||||
|
compatible = "arduino,modulino-buttons-leds";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
30
boards/shields/arduino_modulino_buttons/doc/index.rst
Normal file
30
boards/shields/arduino_modulino_buttons/doc/index.rst
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
.. _arduino_modulino_buttons:
|
||||||
|
|
||||||
|
Arduino Modulino Buttons
|
||||||
|
########################
|
||||||
|
|
||||||
|
Overview
|
||||||
|
********
|
||||||
|
|
||||||
|
The Arduino Modulino Buttons is a QWIIC compatible module with three buttons
|
||||||
|
and three LEDs.
|
||||||
|
|
||||||
|
|
||||||
|
.. image:: img/arduino_modulino_buttons.webp
|
||||||
|
:align: center
|
||||||
|
:alt: Arduino Modulino Buttons module
|
||||||
|
|
||||||
|
Programming
|
||||||
|
***********
|
||||||
|
|
||||||
|
Set ``--shield arduino_modulino_buttons`` when you invoke ``west build``, the
|
||||||
|
buttons will be available through the input subsystem and the LEDs through the
|
||||||
|
LED subsystem.
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/subsys/input
|
||||||
|
:board: arduino_uno_r4@wifi
|
||||||
|
:shield: arduino_modulino_buttons
|
||||||
|
:goals: build
|
5
boards/shields/arduino_modulino_smartleds/Kconfig.shield
Normal file
5
boards/shields/arduino_modulino_smartleds/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright 2025 Google LLC
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config SHIELD_ARDUINO_MODULINO_SMARTLEDS
|
||||||
|
def_bool $(shields_list_contains,arduino_modulino_smartleds)
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2025 Google LLC
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <zephyr/dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
led-strip = &modulino_smartleds;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&qwiic_i2c {
|
||||||
|
modulino_smartleds: modulino-smartleds@36 {
|
||||||
|
compatible = "arduino,modulino-smartleds";
|
||||||
|
reg = <0x36>;
|
||||||
|
chain-length = <8>;
|
||||||
|
color-mapping = <LED_COLOR_ID_RED
|
||||||
|
LED_COLOR_ID_GREEN
|
||||||
|
LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
29
boards/shields/arduino_modulino_smartleds/doc/index.rst
Normal file
29
boards/shields/arduino_modulino_smartleds/doc/index.rst
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
.. _arduino_modulino_smartleds:
|
||||||
|
|
||||||
|
Arduino Modulino smart LEDs
|
||||||
|
###########################
|
||||||
|
|
||||||
|
Overview
|
||||||
|
********
|
||||||
|
|
||||||
|
The Arduino Modulino smart LEDs is a QWIIC compatible module with 8 addressable
|
||||||
|
LEDs.
|
||||||
|
|
||||||
|
|
||||||
|
.. image:: img/arduino_modulino_smartleds.webp
|
||||||
|
:align: center
|
||||||
|
:alt: Arduino Modulino Smart LEDs
|
||||||
|
|
||||||
|
Programming
|
||||||
|
***********
|
||||||
|
|
||||||
|
Set ``--shield arduino_modulino_smartleds`` when you invoke ``west build``, the
|
||||||
|
leds will be available through the LED strip subsystem.
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/drivers/led/led_strip
|
||||||
|
:board: arduino_uno_r4@wifi
|
||||||
|
:shield: arduino_modulino_smartleds
|
||||||
|
:goals: build
|
Loading…
Add table
Add a link
Reference in a new issue