boards: shields: Add Adafruit DS2484 1-Wire shield
Product photo from https://learn.adafruit.com/assets/130701 with license CC BY-SA 3.0 Tested with command mentioned in the index.rst page. Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
This commit is contained in:
committed by
Henrik Brix Andersen
parent
d99cddd4ec
commit
9434b2cb92
5
boards/shields/adafruit_ds2484/Kconfig.shield
Normal file
5
boards/shields/adafruit_ds2484/Kconfig.shield
Normal file
@@ -0,0 +1,5 @@
|
||||
# Copyright (c) 2025 Jonas Berg
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SHIELD_ADAFRUIT_DS2484
|
||||
def_bool $(shields_list_contains,adafruit_ds2484)
|
||||
18
boards/shields/adafruit_ds2484/adafruit_ds2484.overlay
Normal file
18
boards/shields/adafruit_ds2484/adafruit_ds2484.overlay
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Jonas Berg
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&zephyr_i2c {
|
||||
status = "okay";
|
||||
|
||||
w1_adafruit_ds2482: w1@18 {
|
||||
compatible = "maxim,ds2484";
|
||||
status = "okay";
|
||||
reg = <0x18>;
|
||||
};
|
||||
};
|
||||
|
||||
/* Alternate node label for samples/drivers/w1/scanner */
|
||||
w1: &w1_adafruit_ds2482 {};
|
||||
BIN
boards/shields/adafruit_ds2484/doc/adafruit_ds2484.webp
Normal file
BIN
boards/shields/adafruit_ds2484/doc/adafruit_ds2484.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
65
boards/shields/adafruit_ds2484/doc/index.rst
Normal file
65
boards/shields/adafruit_ds2484/doc/index.rst
Normal file
@@ -0,0 +1,65 @@
|
||||
.. _adafruit_ds2484:
|
||||
|
||||
Adafruit DS2484 Shield
|
||||
######################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The `Adafruit DS2484 I2C to 1-Wire Bus Adapter Shield`_ features
|
||||
an `Analog Devices DS2484 1-Wire Master`_ and two STEMMA QT connectors.
|
||||
|
||||
.. figure:: adafruit_ds2484.webp
|
||||
:align: center
|
||||
:alt: Adafruit DS2484 Shield
|
||||
|
||||
Adafruit DS2484 Shield (Credit: Adafruit)
|
||||
|
||||
|
||||
Requirements
|
||||
************
|
||||
|
||||
This shield can be used with boards which provide an I2C connector, for
|
||||
example STEMMA QT or Qwiic connectors.
|
||||
The target board must define a ``zephyr_i2c`` node label.
|
||||
See :ref:`shields` for more details.
|
||||
|
||||
|
||||
Pin Assignments
|
||||
===============
|
||||
|
||||
+--------------+------------------------------+
|
||||
| Shield Pin | Function |
|
||||
+==============+==============================+
|
||||
| SDA | DS2484 I2C SDA |
|
||||
+--------------+------------------------------+
|
||||
| SCL | DS2484 I2C SCL |
|
||||
+--------------+------------------------------+
|
||||
| 1WIRE | Connection to 1-Wire devices |
|
||||
+--------------+------------------------------+
|
||||
| SLPZ | Digital input for sleep mode |
|
||||
+--------------+------------------------------+
|
||||
|
||||
See :dtcompatible:`maxim,ds2484` for documentation on how to adjust the
|
||||
devicetree file for sleep mode etc.
|
||||
|
||||
|
||||
Programming
|
||||
***********
|
||||
|
||||
Set ``--shield adafruit_ds2484`` when you invoke ``west build``. For example
|
||||
when running the :zephyr:code-sample:`w1-scanner` 1-Wire scanning sample:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/drivers/w1/scanner
|
||||
:board: adafruit_qt_py_rp2040
|
||||
:shield: adafruit_ds2484
|
||||
:goals: build
|
||||
|
||||
Connect one or several 1-Wire devices to the shield before running the scanning sample.
|
||||
|
||||
.. _Adafruit DS2484 I2C to 1-Wire Bus Adapter Shield:
|
||||
https://learn.adafruit.com/adafruit-ds2484-i2c-to-1-wire-bus-adapter-breakout
|
||||
|
||||
.. _Analog Devices DS2484 1-Wire Master:
|
||||
https://www.analog.com/en/products/ds2484.html
|
||||
10
boards/shields/adafruit_ds2484/shield.yml
Normal file
10
boards/shields/adafruit_ds2484/shield.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Copyright (c) 2025, Jonas Berg
|
||||
|
||||
shield:
|
||||
name: adafruit_ds2484
|
||||
full_name: Adafruit DS2484 I2C to 1-Wire Bus Adapter Shield
|
||||
vendor: adafruit
|
||||
supported_features:
|
||||
- w1
|
||||
@@ -67,3 +67,15 @@ tests:
|
||||
regex:
|
||||
- "Number of devices found on bus: .*"
|
||||
fixture: w1_scanner_w1_max
|
||||
sample.drivers.w1.scanner.shields:
|
||||
platform_allow:
|
||||
- adafruit_qt_py_rp2040/rp2040
|
||||
integration_platforms:
|
||||
- adafruit_qt_py_rp2040/rp2040
|
||||
extra_args:
|
||||
- platform:adafruit_qt_py_rp2040/rp2040:SHIELD="adafruit_ds2484"
|
||||
harness_config:
|
||||
type: one_line
|
||||
regex:
|
||||
- "Number of devices found on bus: .*"
|
||||
fixture: zepyhr_i2c_ds2484
|
||||
|
||||
Reference in New Issue
Block a user