forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: shields: Add Pmod ACL sensor module
Adds a new shield definition for the Digilent Pmod ACL module. This module provides support for an ADI ADXL345 3-axis accelerometer over a Pmod SPI connector. Signed-off-by: Maureen Helm <[email protected]>
- Loading branch information
1 parent
0a79085
commit 64225c3
Showing
5 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2024 Analog Devices, Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SHIELD_PMOD_ACL | ||
def_bool $(shields_list_contains,pmod_acl) |
11 changes: 11 additions & 0 deletions
11
boards/shields/pmod_acl/boards/apard32690_max32690_m4.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright (c) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
accel0 = &adxl345_pmod_acl; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.. pmod_acl: | ||
Digilent Pmod ACL | ||
################# | ||
|
||
Overview | ||
******** | ||
|
||
The Digilent Pmod ACL is a 3-axis digital accelerometer module powered by the | ||
Analog Devices ADXL345. | ||
|
||
Programming | ||
*********** | ||
|
||
Set ``--shield pmod_acl`` when you invoke ``west build``. For example: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/sensor/sensor_shell | ||
:board: apard32690/max32690/m4 | ||
:shield: pmod_acl | ||
:goals: build | ||
|
||
Requirements | ||
************ | ||
|
||
This shield can only be used with a board which provides a configuration | ||
for Pmod connectors and defines node aliases for SPI and GPIO interfaces | ||
(see :ref:`shields` for more details). | ||
|
||
References | ||
********** | ||
|
||
- `Pmod ACL product page`_ | ||
- `Pmod ACL reference manual`_ | ||
- `Pmod ACL schematic`_ | ||
- `ADXL345 product page`_ | ||
- `ADXL345 data sheet`_ | ||
|
||
.. _Pmod ACL product page: | ||
https://digilent.com/shop/pmod-acl-3-axis-accelerometer/ | ||
|
||
.. _Pmod ACL reference manual: | ||
https://digilent.com/reference/pmod/pmodacl/reference-manual | ||
|
||
.. _Pmod ACL schematic: | ||
https://digilent.com/reference/_media/reference/pmod/pmodacl/pmodacl_sch.pdf | ||
|
||
.. _ADXL345 product page: | ||
https://www.analog.com/en/products/adxl345.html | ||
|
||
.. _ADXL345 data sheet: | ||
https://www.analog.com/media/en/technical-documentation/data-sheets/adxl345.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (c) 2024 Analog Devices, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pmod_spi { | ||
status = "okay"; | ||
|
||
adxl345_pmod_acl: adxl345@0 { | ||
compatible = "adi,adxl345"; | ||
reg = <0x0>; | ||
spi-max-frequency = <DT_FREQ_M(1)>; | ||
status = "okay"; | ||
}; | ||
}; |