J. Nick Koston
d812683df1
Use platform build flags in lwip_fast_select.c guard
...
USE_ESP32 and USE_LIBRETINY are compiler flags (-D) always available
to .c files. USE_LWIP_FAST_SELECT is in the generated defines.h which
may not be force-included for .c files on all build systems. Use
platform flags directly in the .c file; .cpp/.h files continue using
USE_LWIP_FAST_SELECT from the generated defines.
2026-02-24 09:49:07 -06:00
J. Nick Koston
3f74726f00
[core] Extend fast select optimization to LibreTiny platforms
...
Extend the ESP32 lwip_select() replacement (direct rcvevent reads +
FreeRTOS task notifications) to all LibreTiny platforms (bk72xx,
rtl87xx, ln882h).
All LibreTiny platforms have LwIP >= 2.1.3 with
lwip_socket_dbg_get_socket() and FreeRTOS task notifications. The
thread safety argument is actually stronger on LibreTiny since all
platforms are single-core ARM Cortex-M, eliminating cross-core
memory ordering concerns entirely.
Introduces USE_LWIP_FAST_SELECT feature define (set from Python
codegen for ESP32 and LibreTiny) replacing per-platform USE_ESP32
guards. The only platform-specific difference is FreeRTOS header
paths (freertos/FreeRTOS.h on ESP-IDF vs FreeRTOS.h on LibreTiny).
Expected impact on LibreTiny (same as ESP32):
- ~17x faster socket polling (direct rcvevent vs lwip_select)
- ~3.5 KB flash savings (dead code elimination of lwip_select)
- ~56 bytes static RAM savings (fd_set members excluded)
- ~200-300 bytes heap savings (UDP wake socket eliminated)
2026-02-24 09:39:38 -06:00
J. Nick Koston
fc5b94df6c
pressure test
2026-02-24 08:48:50 -06:00
J. Nick Koston
73092d14a5
tweak comments
2026-02-24 08:44:31 -06:00
J. Nick Koston
36eb31e8ee
tweak comments
2026-02-24 08:42:23 -06:00
J. Nick Koston
8d997c247e
improve comments about safety
2026-02-24 08:40:02 -06:00
J. Nick Koston
07014b09ae
Revert "Add fast_select diagnostic counters logged every 10000 loops"
...
This reverts commit 29ffeeeb19 .
2026-02-23 22:22:26 -06:00
J. Nick Koston
29ffeeeb19
Add fast_select diagnostic counters logged every 10000 loops
2026-02-23 22:21:07 -06:00
J. Nick Koston
d1dffafc86
Clarify rcvevent reads are main-loop-only due to socket ownership
2026-02-23 22:14:15 -06:00
J. Nick Koston
44462d8453
Document Socket::ready() as main-loop-only
2026-02-23 22:10:29 -06:00
J. Nick Koston
341395a1cd
Remove unused public is_socket_ready()
2026-02-23 22:09:46 -06:00
J. Nick Koston
63a144fb43
Fix is_socket_ready comment: main loop only, not thread-safe
2026-02-23 22:07:58 -06:00
J. Nick Koston
5a378143e2
Fix LwIP source references and thread safety comments
2026-02-23 22:06:17 -06:00
J. Nick Koston
04af37e514
Note lwip_socket_dbg_get_socket wraps tryget_socket_unconn_nouse
2026-02-23 22:01:36 -06:00
J. Nick Koston
cba004e2d1
Check for pending socket data before sleeping
2026-02-23 21:49:26 -06:00
J. Nick Koston
8d1cf9fd7d
Add clarifying comments for review feedback
2026-02-23 21:37:19 -06:00
J. Nick Koston
1c886d43e7
Extract get_sock() helper to deduplicate lookup pattern
2026-02-23 21:33:05 -06:00
J. Nick Koston
746e760697
Remove dead NULL check on s_original_callback
2026-02-23 21:32:18 -06:00
J. Nick Koston
661f826bf1
comments
2026-02-23 21:27:03 -06:00
J. Nick Koston
6734aa1544
comments
2026-02-23 21:24:29 -06:00
J. Nick Koston
c3dee3d307
comments
2026-02-23 21:21:43 -06:00
J. Nick Koston
29416061ea
comments
2026-02-23 21:20:38 -06:00
J. Nick Koston
3fd24b779c
comments
2026-02-23 21:17:50 -06:00
J. Nick Koston
c9c73ec6e9
cleanup
2026-02-23 21:13:16 -06:00
J. Nick Koston
a696ed4920
cleanup
2026-02-23 21:10:59 -06:00
J. Nick Koston
3e0cdc2404
cleanup
2026-02-23 21:10:38 -06:00
J. Nick Koston
86642ab9d7
cleanup
2026-02-23 21:04:08 -06:00
J. Nick Koston
fd6d0de7a2
cleanup
2026-02-23 21:00:00 -06:00
J. Nick Koston
64364961db
[core] Replace lwip_select() with direct rcvevent reads on ESP32
...
On ESP32, replace lwip_select() in yield_with_select_() with direct
socket event reads via lwip_socket_dbg_get_socket(), reducing poll
cost from 133us to ~7us (18.7x faster). Replace the UDP loopback
wake socket with FreeRTOS task notifications (<2us, ISR-safe).
Benchmarks (ESP32, 4 listen sockets):
- Poll path: 7,087 ns vs 132,402 ns (18.7x faster)
- Wake signal: 1,826 ns vs ~130,000 ns (72x faster, now ISR-safe)
- Binary: yield_with_select_ 108B vs 188B (43% smaller)
Non-ESP32 platforms (LibreTiny, ESP8266, RP2040) are unchanged.
2026-02-23 20:47:54 -06:00
J. Nick Koston
ad2da0af52
[network] Use C++17 nested namespace syntax ( #14248 )
2026-02-24 02:00:21 +00:00
J. Nick Koston
7d9d90d3f8
[cse7766] Use C++17 nested namespace syntax ( #14247 )
2026-02-23 20:50:22 -05:00
J. Nick Koston
70e47f301d
[ethernet] Use C++17 nested namespace syntax ( #14246 )
2026-02-23 20:50:11 -05:00
J. Nick Koston
1614eb9c9c
[i2c] Use C++17 nested namespace syntax ( #14245 )
2026-02-23 20:50:00 -05:00
J. Nick Koston
a694003fe3
[usb_host] Use C++17 nested namespace syntax ( #14244 )
2026-02-23 20:49:48 -05:00
J. Nick Koston
500aa7bf1d
[text_sensor] Use C++17 nested namespace syntax ( #14243 )
2026-02-23 20:49:35 -05:00
J. Nick Koston
63c1496115
[text] Use C++17 nested namespace syntax ( #14242 )
2026-02-23 20:49:25 -05:00
J. Nick Koston
843d06df3f
[switch] Use C++17 nested namespace syntax ( #14241 )
2026-02-23 20:49:15 -05:00
J. Nick Koston
30cc51eac9
[version] Use C++17 nested namespace syntax ( #14240 )
2026-02-23 20:49:00 -05:00
Jonathan Swoboda and Copilot
ebf1047da7
[core] Move build_info_data.h out of application.h to fix incremental rebuilds ( #14230 )
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-02-23 18:51:56 -05:00
J. Nick Koston and Claude Opus 4.6
869678953d
[core] Add pow10_int helper, replace powf in normalize_accuracy and sensor filters ( #14114 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-24 12:03:24 +13:00
James Myatt
4a52900352
[nfc] Fix logging tag for nfc helpers ( #14235 )
2026-02-23 21:16:32 +00:00
tomaszduda23
02c37bb6d6
[nrf52,logger] generate crash magic in python ( #14173 )
2026-02-23 20:23:40 +00:00
dependabot[bot]
918bbfb0d3
Bump aioesphomeapi from 44.0.0 to 44.1.0 ( #14232 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 20:22:32 +00:00
tomaszduda23
063c6a9e45
[esp32,core] Move CONF_ENABLE_OTA_ROLLBACK to core ( #14231 )
2026-02-23 20:06:20 +00:00
daee71a2c1
[http_request] Retry update check on startup until network is ready ( #14228 )
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-23 14:21:29 -05:00
Jonathan Swoboda and Copilot
0d32a5321c
[remote_transmitter/remote_receiver] Rename _esp32.cpp to _rmt.cpp ( #14226 )
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-02-23 13:46:53 -05:00
J. Nick Koston
e199145f1c
[core] Avoid expensive modulo in LockFreeQueue for non-power-of-2 sizes ( #14221 )
2026-02-23 12:20:55 -06:00
1f945a334a
[hdc302x] Add new component ( #10160 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
2026-02-23 12:01:23 -05:00
Jonathan Swoboda and Claude Opus 4.6
fb6c7d81d5
[core] Fix multiline log continuations without leading whitespace ( #14217 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-23 05:08:40 +00:00
J. Nick Koston
417f4535af
[logger] Use subtraction-based line number formatting to avoid division ( #14219 )
2026-02-23 04:25:20 +00:00