Add polling_interval and its usage to ethernet.rst (#4389)

This commit is contained in:
Satoshi YAMADA 2024-10-29 12:08:12 +09:00 committed by GitHub
parent cbb2ba8a27
commit 3c1775697e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,11 +90,30 @@ SPI configuration variables:
- **miso_pin** (**Required**, :ref:`config-pin`): The SPI MISO pin.
- **cs_pin** (**Required**, :ref:`config-pin`): The SPI chip select pin.
- **interrupt_pin** (*Optional*, :ref:`config-pin`): The interrupt pin.
This variable is **required** for older frameworks. See below.
- **reset_pin** (*Optional*, :ref:`config-pin`): The reset pin.
- **clock_speed** (*Optional*, float): The SPI clock speed.
Any frequency between `8Mhz` and `80Mhz` is allowed, but the nearest integer division
of `80Mhz` is used, i.e. `16Mhz` (`80Mhz` / 5) is used when `15Mhz` is configured.
Default: `26.67Mhz`.
- **polling_interval** (*Optional*, :ref:`config-time`): If ``interrupt_pin`` is not set,
set the time interval for periodic polling. Minimum is 1ms, Defaults to 10ms.
Older frameworks may not support this variable. See below for details.
If you are using a framework with the latest version, ESPHome provides
an SPI-based Ethernet module without interrupt pin.
Support for SPI polling mode (no interrupt pin) is provided by the following frameworks:
- ESP-IDF 5.3 or later
- ESP-IDF 5.2.1 and later 5.2.x versions
- ESP-IDF 5.1.4
- Arduino-ESP32 3.0.0 or later (**Caution**: PlatformIO does not support these Arduino-ESP32 versions)
When building with frameworks that support SPI polling mode, either ``interrupt_pin``
or ``polling_interval`` can be set. If you set both, ESPHome will throw an error.
If you are using a framework that does not support SPI-based ethernet modules without interrupt pin,
``interrupt_pin`` is **required** and you cannot set ``polling_interval``.
Advanced common configuration variables:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^