Compare commits

...
6 changed files with 10 additions and 62 deletions

No files matched your search

+1 -1
View File
@@ -181,7 +181,7 @@ _IDF6_ETHERNET_COMPONENTS: dict[str, IDFRegistryComponent] = {
"IP101": IDFRegistryComponent("espressif/ip101", "1.1.0"),
"KSZ8081": IDFRegistryComponent("espressif/ksz80xx", "1.1.0"),
"KSZ8081RNA": IDFRegistryComponent("espressif/ksz80xx", "1.1.0"),
"W5500": IDFRegistryComponent("espressif/w5500", "2.0.1"),
"W5500": IDFRegistryComponent("espressif/w5500", "1.0.1"),
"DM9051": IDFRegistryComponent("espressif/dm9051", "1.1.1"),
"ENC28J60": IDFRegistryComponent("espressif/enc28j60", "1.1.0"),
"LAN8670": IDFRegistryComponent("espressif/lan867x", "2.1.0"),
@@ -286,16 +286,9 @@ void EthernetComponent::ethernet_lazy_init_() {
#endif
#if defined(USE_ETHERNET_W5500)
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
w5500_config.base.int_gpio_num = this->interrupt_pin_;
#ifdef USE_ETHERNET_SPI_POLLING_SUPPORT
w5500_config.base.poll_period_ms = this->polling_interval_;
#endif
#else
w5500_config.int_gpio_num = this->interrupt_pin_;
#ifdef USE_ETHERNET_SPI_POLLING_SUPPORT
w5500_config.poll_period_ms = this->polling_interval_;
#endif
#endif
// Install the custom SPI driver that offloads the bulk RX/TX frame transfers off the busy-wait
// path. w5500_config (and the devcfg it references) outlives esp_eth_mac_new_w5500() below, which
@@ -32,16 +32,10 @@ void *w5500_custom_spi_init(const void *spi_config) {
auto *ctx = &w5500_context;
// The W5500 SPI frame carries the 16-bit address in the command phase and the 8-bit control
// byte in the address phase; mirror what the stock driver configures.
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
spi_device_interface_config_t devcfg = *config->base.spi_devcfg;
const spi_host_device_t spi_host_id = config->base.spi_host_id;
#else
spi_device_interface_config_t devcfg = *config->spi_devcfg;
const spi_host_device_t spi_host_id = config->spi_host_id;
#endif
devcfg.command_bits = 16;
devcfg.address_bits = 8;
if (spi_bus_add_device(spi_host_id, &devcfg, &ctx->handle) != ESP_OK) {
if (spi_bus_add_device(config->spi_host_id, &devcfg, &ctx->handle) != ESP_OK) {
ctx->handle = nullptr;
return nullptr;
}
@@ -113,19 +107,11 @@ void install_w5500_async_spi(eth_w5500_config_t &config) {
// Point the custom driver's config at the W5500 config itself; init() reads spi_host_id and
// spi_devcfg back out of it. The self-reference is valid because both the config and the
// spi_devcfg it points at outlive the esp_eth_mac_new_w5500() call that runs init().
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
config.base.custom_spi_driver.config = &config;
config.base.custom_spi_driver.init = w5500_custom_spi_init;
config.base.custom_spi_driver.deinit = w5500_custom_spi_deinit;
config.base.custom_spi_driver.read = w5500_custom_spi_read;
config.base.custom_spi_driver.write = w5500_custom_spi_write;
#else
config.custom_spi_driver.config = &config;
config.custom_spi_driver.init = w5500_custom_spi_init;
config.custom_spi_driver.deinit = w5500_custom_spi_deinit;
config.custom_spi_driver.read = w5500_custom_spi_read;
config.custom_spi_driver.write = w5500_custom_spi_write;
#endif
}
} // namespace esphome::ethernet
+7 -21
View File
@@ -1,5 +1,3 @@
import logging
from esphome import pins
import esphome.codegen as cg
from esphome.components import light
@@ -37,8 +35,6 @@ from ._methods import (
)
from .const import CHIP_TYPES, CONF_ASYNC, CONF_BUS, ONE_WIRE_CHIPS
_LOGGER = logging.getLogger(__name__)
neopixelbus_ns = cg.esphome_ns.namespace("neopixelbus")
NeoPixelBusLightOutputBase = neopixelbus_ns.class_(
"NeoPixelBusLightOutputBase", light.AddressableLight
@@ -139,13 +135,12 @@ def _validate(config):
return config
def _warn_esp32_deprecated(config: ConfigType) -> ConfigType:
def _reject_esp32(config: ConfigType) -> ConfigType:
if CORE.is_esp32:
_LOGGER.warning(
"'neopixelbus' on ESP32 is deprecated. The upstream library "
"(makuna/NeoPixelBus) is no longer actively maintained. Migrate "
"to 'esp32_rmt_led_strip'. Removal is targeted for 2027.1 but "
"may happen sooner once ESPHome moves to ESP-IDF 6."
raise cv.Invalid(
"'neopixelbus' is no longer supported on ESP32. Use the "
"'esp32_rmt_led_strip' light platform instead: "
"https://esphome.io/components/light/esp32_rmt_led_strip/"
)
return config
@@ -183,18 +178,10 @@ def _validate_method(value):
CONFIG_SCHEMA = cv.All(
cv.only_with_framework(
frameworks=Framework.ARDUINO,
suggestions={
Framework.ESP_IDF: (
"esp32_rmt_led_strip",
"light/esp32_rmt_led_strip",
)
},
),
_reject_esp32,
cv.only_with_framework(frameworks=Framework.ARDUINO),
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 4, 0),
esp32_arduino=cv.Version(0, 0, 0),
),
light.ADDRESSABLE_LIGHT_SCHEMA.extend(
{
@@ -211,7 +198,6 @@ CONFIG_SCHEMA = cv.All(
).extend(cv.COMPONENT_SCHEMA),
_choose_default_method,
_validate,
_warn_esp32_deprecated,
)
+1 -1
View File
@@ -80,7 +80,7 @@ dependencies:
rules:
- if: "idf_version >=6.0.0 && target in [esp32, esp32p4]"
espressif/w5500:
version: "2.0.1"
version: "1.0.1"
rules:
- if: "idf_version >=6.0.0"
espressif/dm9051:
@@ -1,17 +0,0 @@
light:
- platform: neopixelbus
id: addr3
name: Neopixelbus Light
gamma_correct: 2.8
color_correct: [0.0, 0.0, 0.0, 0.0]
default_transition_length: 10s
effects:
- addressable_flicker:
name: Flicker Effect With Custom Values
update_interval: 16ms
intensity: 5%
type: GRBW
variant: SK6812
method: ESP32_I2S_0
num_leds: 5
pin: 4