mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-26 17:27:47 +01:00
[sn74hc595] Update documentation for type and spi_id (#3787)
This commit is contained in:
parent
f1b31e85b7
commit
cda94f58d3
@ -58,28 +58,36 @@ Configuration variables:
|
||||
- **oe_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 OE pin
|
||||
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up-to 256. Defaults to ``1``.
|
||||
|
||||
|
||||
Pin configuration variables:
|
||||
****************************
|
||||
|
||||
- **sn74hc595** (**Required**, :ref:`config-id`): The id of the SN74HC595 component the pin belongs to.
|
||||
- **number** (**Required**, int): The pin number.
|
||||
- **inverted** (*Optional*, boolean): If all written values should be treated as inverted.
|
||||
Defaults to ``false``.
|
||||
|
||||
Over SPI
|
||||
--------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
spi:
|
||||
sn74hc595:
|
||||
- id: 'sn74hc595_hub'
|
||||
type: spi
|
||||
latch_pin: D7
|
||||
oe_pin: D6
|
||||
sr_count: 2
|
||||
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC595 component.
|
||||
- **spi_id** (**Required**, :ref:`SPI Bus Schema <spi>`): The SPI bus to use. This will automatically be set to the ID of the SPI bus if there is only one.
|
||||
- **type** (**Required**, string): Must be ``spi``.
|
||||
- **latch_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 RCLK (ST_CP) pin
|
||||
- **oe_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 OE pin
|
||||
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up to 256. Defaults to ``1``.
|
||||
|
||||
|
||||
Pin configuration
|
||||
-----------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Individual outputs
|
||||
switch:
|
||||
- platform: gpio
|
||||
@ -90,17 +98,6 @@ Over SPI
|
||||
number: 0
|
||||
inverted: false
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC595 component.
|
||||
- **latch_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 RCLK (ST_CP) pin
|
||||
- **oe_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 OE pin
|
||||
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up to 256. Defaults to ``1``.
|
||||
|
||||
|
||||
Pin configuration variables:
|
||||
****************************
|
||||
|
||||
- **sn74hc595** (**Required**, :ref:`config-id`): The id of the SN74HC595 component of the pin.
|
||||
- **number** (**Required**, int): The pin number.
|
||||
|
Loading…
Reference in New Issue
Block a user