- Remove dead ENC28J60 entry from _IDF6_ETHERNET_COMPONENTS
- Simplify get_duplex_mode() — both chips are full-duplex on RP2040
- Add #error guard for unsupported RP2040 SPI Ethernet type
- Remove dead ENC28J60 entry from _IDF6_ETHERNET_COMPONENTS
- Simplify get_duplex_mode() — both chips are full-duplex on RP2040
- Add #error guard for unsupported RP2040 SPI Ethernet type
Move calculate_looping_components_() from application.cpp to
application.h as an inline method. This function has only one
caller (setup()) and is small enough for the compiler to inline,
saving ~20 bytes of flash by eliminating the function call overhead.
The write_interval == 0 case (sync every loop) is only used on host
or for testing. For the vast majority of real devices using the default
60s interval, loop() and the runtime branch are unnecessary overhead.
Use a compile-time define to separate the two modes so that:
- Normal case: no loop() override, no write_interval_ member, just set_interval
- Zero interval case: loop() syncs every iteration, no interval needed
Move get_use_address()/set_use_address() definitions to headers for
wifi, ethernet, and openthread components so the compiler can inline
them. Also inline network::get_use_address() in the header, matching
the existing pattern used by network::is_connected().
This allows the compiler to collapse the two-level indirection
(network::get_use_address -> component->get_use_address -> field load)
into a single pointer dereference at each call site.
Saves 24 bytes of flash on ESP32-S3.
When multiple ble_client RSSI sensors were configured, they all reported
the same RSSI value because the GAP event handler did not filter by
remote device address. Add an address check so each sensor only processes
RSSI events matching its parent client's device.
Fixes https://github.com/esphome/esphome/issues/14898
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The sds011 component handles update_interval via its own
set_update_interval_min method. Pop it from config before
register_component to prevent generating a set_update_interval
call on the Component base class.
Remove the virtual keyword from set_update_interval and inline the
trivial setter in the header. No component in the tree actually
overrides this on PollingComponent — the only apparent override was
in sds011 which extends Component (not PollingComponent), so it was
just a name-hiding no-op that is also removed here.
This allows the compiler to inline the setter at all 8 call sites
generated by register_component, eliminating function call overhead
and removing a vtable entry.
Move set_gate_move_threshold_number and set_gate_still_threshold_number
definitions into the header. These are single-line array assignments
called 14 times each (once per gate), and inlining them eliminates
function call overhead, saving ~52 bytes of flash.