diff --git a/boards/shields/mikroe_accel13_click/Kconfig.shield b/boards/shields/mikroe_accel13_click/Kconfig.shield new file mode 100644 index 00000000000..335781b3b9b --- /dev/null +++ b/boards/shields/mikroe_accel13_click/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2023 Mark Olsson +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_MIKROE_ACCEL13_CLICK + def_bool $(shields_list_contains,mikroe_accel13_click) diff --git a/boards/shields/mikroe_accel13_click/doc/accel-13-click.jpg b/boards/shields/mikroe_accel13_click/doc/accel-13-click.jpg new file mode 100644 index 00000000000..20c2bccb90d Binary files /dev/null and b/boards/shields/mikroe_accel13_click/doc/accel-13-click.jpg differ diff --git a/boards/shields/mikroe_accel13_click/doc/index.rst b/boards/shields/mikroe_accel13_click/doc/index.rst new file mode 100644 index 00000000000..24d6a69443a --- /dev/null +++ b/boards/shields/mikroe_accel13_click/doc/index.rst @@ -0,0 +1,56 @@ +.. _mikroe_accel13_click_shield: + +MikroElektronika ACCEL 13 Click +############################### + +Overview +******** + +The MikroElektronika ACCEL 13 Click carries the `IIS2DLPC`_ ultra-low +power triaxial accelerometer sensor in a `mikroBUS`_ |trade| form factor. + +The `IIS2DLPC`_ sensor supports both SPI and I2C bus protocols. Currently +only I2C is supported for this shield. + +.. figure:: accel-13-click.jpg + :align: center + :alt: MikroElektronika ACCEL 13 Click + + MikroElektronika ACCEL 13 Click (Credit: MikroElektronika) + +Requirements +************ + +This shield can only be used with a development board that provides a +configuration for mikroBUS connectors and defines a node alias for the mikroBUS +I2C interface (see :ref:`shields` for more details). + +For more information about interfacing the IIS2DLPC and the ACCEL 13 Click, +see the following documentation: + +- `IIS2DLPC Datasheet`_ +- `ACCEL 13 Click`_ + +Programming +*********** + +Set ``-DSHIELD=mikro_accel13_click`` when you invoke ``west build``. For +example: + +.. zephyr-app-commands:: + :zephyr-app: test/boards/board_shell + :board: lpcxpresso55s69 + :shield: mikroe_accel13_click + :goals: build + +.. _IIS2DLPC: + https://www.st.com/en/mems-and-sensors/iis2dlpc.html + +.. _mikroBUS: + https://www.mikroe.com/mikrobus + +.. _IIS2DLPC Datasheet: + https://www.st.com/resource/en/datasheet/iis2dlpc.pdf + +.. _ACCEL 13 Click: + https://www.mikroe.com/accel-13-click diff --git a/boards/shields/mikroe_accel13_click/mikroe_accel13_click.overlay b/boards/shields/mikroe_accel13_click/mikroe_accel13_click.overlay new file mode 100644 index 00000000000..e2979b384d3 --- /dev/null +++ b/boards/shields/mikroe_accel13_click/mikroe_accel13_click.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2023 Mark Olsson + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + aliases { + accel0 = &iis2dlpc_mikroe_accel13_click; + }; +}; + +&mikrobus_i2c { + status = "okay"; + + iis2dlpc_mikroe_accel13_click: iis2dlpc@18 { + compatible = "st,iis2dlpc"; + reg = <0x18>; + drdy-gpios = <&mikrobus_header 7 GPIO_ACTIVE_HIGH>; + drdy-int = <2>; + status = "okay"; + }; +};