doc: dts: Use definition list for compatible/label/ref
See https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html. Gives neater output compared to a bullet list. Also tweak the text a bit. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
0ddc7b819b
commit
d3bdb67cd7
1 changed files with 24 additions and 19 deletions
|
@ -129,25 +129,30 @@ a gray background, except for the root node, which is shown using its path
|
||||||
|
|
||||||
Some important properties are:
|
Some important properties are:
|
||||||
|
|
||||||
- **compatible**: this says what "kind" of device the node represents. Its
|
compatible
|
||||||
value is a null-terminated string in the format "vendor,device", like
|
Says what kind of device the node represents. The value is a
|
||||||
``"avago,apds9960"``, or a sequence of these, like ``"ti,hdc",
|
string in the format "vendor,device", like ``"avago,apds9960"``, or a
|
||||||
"ti,hdc1010"``. The build system uses the compatible property to find the
|
sequence of these, like ``"ti,hdc", "ti,hdc1010"``. The build system uses
|
||||||
right bindings for the node.
|
the compatible property to find the right :ref:`binding <bindings>` for the
|
||||||
- **label**: the device's name according to Zephyr's :ref:`device_drivers`. The
|
node.
|
||||||
value can be passed to :c:func:`device_get_binding()` to retrieve the
|
|
||||||
corresponding driver-level :ref:`struct device* <device_struct>`. This
|
label
|
||||||
pointer can then be passed to the correct driver API by application code to
|
The device's name according to Zephyr's :ref:`device_drivers`. The value
|
||||||
interact with the device. For example, calling
|
can be passed to :c:func:`device_get_binding()` to retrieve the
|
||||||
``device_get_binding("I2C_0")`` would return a pointer to a device
|
corresponding driver-level :ref:`struct device* <device_struct>`. This
|
||||||
structure which could be passed to :ref:`I2C API <i2c_api>` functions like
|
pointer can then be passed to the correct driver API by application code to
|
||||||
:c:func:`i2c_transfer()`. The generated C header will also contain a macro
|
interact with the device. For example, calling
|
||||||
which expands to this string.
|
``device_get_binding("I2C_0")`` would return a pointer to a device
|
||||||
- **reg**: information used to address the device. This could be a
|
structure which could be passed to :ref:`I2C API <i2c_api>` functions like
|
||||||
memory-mapped I/O address range (as with ``i2c@40003000``\ 's reg property),
|
:c:func:`i2c_transfer()`. The generated C header will also contain a macro
|
||||||
an I2C bus address (as with ``apds9960@39`` and its devicetree siblings), a
|
which expands to this string.
|
||||||
SPI chip select line, or some other value depending on the kind of device the
|
|
||||||
node represents.
|
reg
|
||||||
|
Information used to address the device. This could be a memory-mapped I/O
|
||||||
|
address range (as with ``i2c@40003000``\ 's reg property), an I2C bus
|
||||||
|
address (as with ``apds9960@39`` and its devicetree siblings), a SPI chip
|
||||||
|
select line, or some other value depending on the kind of device the node
|
||||||
|
represents.
|
||||||
|
|
||||||
This tree has the following DTS.
|
This tree has the following DTS.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue