Commit Graph
24927 Commits
Author SHA1 Message Date
J. Nick Koston 93b103be0e Merge remote-tracking branch 'origin/ble-server-inline-is-active' into integration 2026-03-16 16:27:59 -10:00
J. Nick Koston 0f4f5aa392 [esp32_ble, esp32_ble_server] Inline is_active/is_running and remove STL bloat from BLE server loop
Move ESP32BLE::is_active() and BLEServer::is_running() to headers
with ESPHOME_ALWAYS_INLINE to eliminate cross-TU call overhead on
every loop iteration. Replace std::remove_if + erase in
BLEServer::loop() with a simple index-based compacting loop,
removing ~250 bytes of unrolled STL template machinery.
2026-03-16 16:27:39 -10:00
J. Nick Koston 3d77e95b11 merge 2026-03-16 15:47:32 -10:00
J. Nick Koston eb34cf0142 Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 15:26:12 -10:00
J. Nick Koston bd3287a554 [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 15:24:12 -10:00
J. Nick Koston 03db9d7ada Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 15:16:58 -10:00
J. Nick Koston 6423f9832f [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 15:15:42 -10:00
J. Nick Koston 0a67cf4496 Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 15:12:57 -10:00
J. Nick Koston d7dc641fcb [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 15:12:32 -10:00
J. Nick Koston fe759e613e Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 14:56:49 -10:00
J. Nick Koston 9c81c0ab53 [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 14:54:20 -10:00
J. Nick Koston 8e8faaa983 Merge remote-tracking branch 'upstream-ssh/api-overflow-buffer-cleanup' into integration 2026-03-16 13:11:13 -10:00
J. Nick Koston 1ecbd28742 Address review: restore queue-full log, fix power-of-2 comment
- Add HELPER_LOG when overflow buffer is full and connection is dropped
- Clarify comment: defaults are power of 2 (not a requirement for users)
2026-03-16 13:09:41 -10:00
J. Nick Koston 61cc3022cb Address review: save errno before use, fix docs, add missing include
- Save errno into local before check_socket_write_err_ and HELPER_LOG
  to avoid potential clobbering between reads
- Update try_drain() doc: 0 means all-drained or no-progress (callers
  only act on -1)
- Include socket/headers.h explicitly for struct iovec
2026-03-16 13:08:08 -10:00
J. Nick Koston 69956c54a7 fix power of 2 2026-03-16 13:04:29 -10:00
J. Nick Koston 3ac6eb0f5a Address review: only log hard errors, fix try_drain doc comments
- Move HELPER_LOG after errno check so transient WOULD_BLOCK doesn't
  spam very-verbose logs during normal backpressure
- Fix try_drain() docstring: -1 can be EWOULDBLOCK or hard error
  (caller distinguishes via errno), 0 means no progress (not would-block)
2026-03-16 13:01:42 -10:00
J. Nick Koston 1450d1e487 Merge branch 'dev' into api-overflow-buffer-cleanup 2026-03-16 12:51:38 -10:00
J. Nick Koston e2a68cc2d3 Simplify: return drain result directly in loop() 2026-03-16 12:44:33 -10:00
J. Nick Koston 9f774b3827 Inline empty() fast path, out-of-line drain+error handling
Keep the cheap overflow_buf_.empty() check inline at all call sites.
Move try_drain + HELPER_LOG + error handling into a single out-of-line
drain_overflow_and_handle_errors_() used by both write_raw_ and the
subclass loop() methods. Eliminates the duplicated drain logic.
2026-03-16 12:43:17 -10:00
J. Nick Koston ad427e1635 tune 2026-03-16 12:36:52 -10:00
J. Nick Koston 848b1a303d Restore HELPER_LOG in write_raw_ error paths 2026-03-16 12:36:24 -10:00
J. Nick Koston b9a688a946 Clean up write_raw_: collapse error checks, remove redundant comments 2026-03-16 12:35:08 -10:00
J. Nick Koston 2009ec5da8 Inline enqueue_or_fail_ at single call site, add branch hints
Only one call site remains after tail-call restructure, so inline it.
Add [[unlikely]]/[[likely]] hints for overflow and error paths.
2026-03-16 12:33:59 -10:00
J. Nick Koston 5bee336a76 Single enqueue_or_fail_ tail call in write_raw_ 2026-03-16 12:31:36 -10:00
J. Nick Koston 1a3c477998 Single enqueue_or_fail_ tail call in write_raw_ 2026-03-16 12:30:47 -10:00
J. Nick Koston e8bf69d1e2 Restructure write_raw_ for single enqueue_or_fail_ tail call 2026-03-16 12:29:39 -10:00
J. Nick Koston 2893788d4b Remove dead iovcnt==0 check — no caller passes 0 2026-03-16 12:28:37 -10:00
Fabrice 2142bc1b76 [mipi_rgb] Make h- and v-sync pins optional (#14870) 2026-03-17 09:25:11 +11:00
J. Nick Koston 067c9ad1fa Force inline Entry::destroy for 16 bytes flash savings 2026-03-16 12:24:40 -10:00
J. Nick Koston 165175eaf3 Restore HELPER_LOG at overflow drain call sites 2026-03-16 12:19:29 -10:00
J. Nick Koston 7846c42730 Rename base loop() to try_drain_overflow_buffer_() inline helper
The base class loop() only drained the overflow buffer. Rename to
make intent clear and inline it so the compiler can optimize across
the call boundary. Make loop() pure virtual since subclasses always
override it.
2026-03-16 12:17:15 -10:00
J. Nick Koston 8a8e05fdb2 Remove remaining sav_errno locals 2026-03-16 12:11:34 -10:00
J. Nick Koston 488c395fbb Simplify: no need to save errno before HELPER_LOG 2026-03-16 12:10:52 -10:00
J. Nick Koston 6e80814507 Propagate drain errors in write_raw_ to preserve original behavior 2026-03-16 12:09:22 -10:00
J. Nick Koston 2d8c7938c2 power of 2 2026-03-16 12:06:52 -10:00
J. Nick Koston 0bccf4a42d power of 2 2026-03-16 12:06:18 -10:00
J. Nick Koston bdeea29836 Revert "Replace modulo with compare-and-reset for circular buffer indices"
This reverts commit c03dd86796.
2026-03-16 12:04:32 -10:00
J. Nick Koston c03dd86796 Replace modulo with compare-and-reset for circular buffer indices
Modulo generates a full division on ESP8266 since API_MAX_SEND_QUEUE
is not a power of 2. Use increment + compare instead.
2026-03-16 12:03:10 -10:00
J. Nick Koston 49dd23d2a1 Fix doc comment: LWIP not kernel 2026-03-16 12:01:51 -10:00
J. Nick Koston 0eed9e8eb6 [api] Extract overflow buffer from frame helper into APIOverflowBuffer
The TCP send overflow buffer code was embedded directly in
APIFrameHelper, making it appear to be part of the primary send path.
In reality, it is rarely used in production — only when the kernel TCP
send buffer is full due to a slow client, congested network, or heavy
logging. Extract it into a dedicated APIOverflowBuffer class with clear
documentation about its purpose and usage frequency.
2026-03-16 12:00:20 -10:00
KamilCuk f81e04b036 [web_server] Fix wrong printf format specifier (#14836) 2026-03-16 11:30:31 -10:00
Jonathan SwobodaandJ. Nick Koston c3327d0b43 [i2s_audio] Fix ESP-IDF 6.0 compatibility for I2S port types (#14818)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-03-16 16:04:20 -04:00
Jonathan Swoboda 8577c26358 [i2c] Handle ESP_ERR_INVALID_RESPONSE as NACK for IDF 6.0 (#14867) 2026-03-16 20:03:09 +00:00
Jonathan Swoboda 80730fd012 [seeed_mr24hpc1] Fix frame parser length handling bugs (#14863) 2026-03-16 09:57:53 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 5ee3e94ca1 Bump actions/create-github-app-token from 2.2.1 to 3.0.0 (#14868)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 09:57:33 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 037f75e0ff Bump github/codeql-action from 4.32.6 to 4.33.0 (#14869)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 09:57:17 -10:00
Jonathan Swoboda c47f4fbc1c [core] Support both dot and dash separators in Version.parse (#14858) 2026-03-16 09:45:16 -10:00
Jonathan Swoboda 2f86e48a83 [as3935] Fix ENERGY_MASK dropping bit 4 of lightning energy MMSB (#14861) 2026-03-16 09:44:55 -10:00
Jonathan Swoboda 0bbba75757 [am43] Fix battery update throttle using wrong type (#14864) 2026-03-16 09:42:13 -10:00
Jonathan Swoboda 9362d9745e [ci] Fix clang-tidy hash check 403 error on fork PRs (#14860) 2026-03-16 09:41:21 -10:00