Commit Graph
26714 Commits
Author SHA1 Message Date
J. Nick Koston 88f47c5241 Merge remote-tracking branch 'upstream/api-noise-split-state-action' into integration 2026-04-05 11:15:50 -10:00
J. Nick Koston 9a8d17e3c8 [api] Split Noise handshake state_action_ to reduce stack pressure
On RP2040, the core0 stack lives in a 4KB SCRATCH_Y RAM bank. The Noise
protocol handshake calls into curve25519 scalar multiplication which
needs ~2KB+ of stack. When all handshake state branches lived in a
single function, the compiler allocated stack space for all branches
simultaneously (SERVER_HELLO msg[46]+mac[13], HANDSHAKE buffer[65],
NoiseBuffer, etc.), leaving insufficient headroom for the crypto path.

Split state_action_() into per-state methods so each state's locals
occupy separate stack frames. The crypto path (WRITE_MESSAGE) now only
carries its own 85 bytes of locals instead of ~200+ bytes from all
branches combined.
2026-04-05 11:12:47 -10:00
J. Nick Koston 1582e230dd Merge branch 'enhancement/ethernet-spi-interface' into integration 2026-04-05 10:32:44 -10:00
J. Nick Koston ddb024cfb1 Merge branch 'dev' into enhancement/ethernet-spi-interface 2026-04-05 10:32:31 -10:00
J. Nick Koston 47c5734793 bot comments 2026-04-05 10:00:45 -10:00
J. Nick Koston 3509e1ee21 Merge remote-tracking branch 'origin/fix-ota-handshake-flush' into integration 2026-04-05 09:54:52 -10:00
J. Nick Koston a084f5199c Merge remote-tracking branch 'upstream/dev' into integration 2026-04-05 09:53:52 -10:00
J. Nick Koston 2243e34981 [ota] Fix OTA handshake failure by switching to blocking before feature ACK write
Switch to blocking mode before writing the feature ACK byte in the
no-password path. lwIP may not transmit data written in non-blocking
mode when the socket immediately switches to blocking and blocks in
recv(). Writing the feature ACK in blocking mode ensures it is flushed
to the wire before entering the blocking data transfer phase.
2026-04-05 09:51:37 -10:00
J. Nick Koston bf39dfef6a [ota] Fix OTA handshake failure by flushing pending writes before blocking read
Add delay(0) after switching to blocking mode in handle_data_() to
flush any pending non-blocking writes (the feature ACK byte) before
entering the blocking read loop. lwIP may not transmit data written
in non-blocking mode until the task yields.
2026-04-05 09:49:08 -10:00
J. Nick Koston f070ef6d08 preen 2026-04-05 09:43:58 -10:00
J. Nick Koston c2f5b5f770 amek proper validator 2026-04-05 09:36:37 -10:00
J. Nick Koston bfb6f2d0fd match 2026-04-05 09:36:18 -10:00
J. Nick Koston 8f26903c8c match 2026-04-05 09:34:26 -10:00
J. Nick Koston 380aa0b3ee touch ups 2026-04-05 09:28:36 -10:00
J. Nick Koston 4e9e505829 touch ups 2026-04-05 09:27:37 -10:00
Edvard FilistovičBl00d-B0bpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>J. Nick Koston
ae9068a4c4 [internal_temperature] Add support for LN882X (Lightning LN882H) (#15370)
Co-authored-by: Bl00d-B0b <Bl00d-B0b@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: J. Nick Koston <nick@home-assistant.io>
2026-04-05 09:17:12 -10:00
J. Nick Koston dae8ea1b04 [mcp23xxx][pi4ioe5v6408] Add optional interrupt pin to eliminate polling (#15445) 2026-04-05 08:26:39 -10:00
Ross Tyler c20da3e951 Merge branch 'dev' into enhancement/ethernet-spi-interface 2026-04-05 07:37:56 -07:00
Javier Peletier 2d7eb116f2 [spi] Enable host-platform builds for unit testing (#15188) 2026-04-05 20:11:49 +10:00
J. Nick Koston 9ea27e68ee [pcf8574][pca9554] Disable loop when all pins are outputs (#15455) 2026-04-04 22:52:40 -10:00
J. Nick Koston 4a0d424d58 Merge remote-tracking branch 'upstream/pcf8574-pca9554-disable-loop-output-only' into integration 2026-04-04 22:11:51 -10:00
J. Nick Koston 411d2f8beb Merge remote-tracking branch 'upstream/dev' into integration 2026-04-04 22:11:48 -10:00
J. Nick Koston 62bb8aeeda [pcf8574][pca9554] Disable loop when all pins are outputs
When an expander has only output pins configured, loop() was still
running every iteration to invalidate the read cache. Since no
digital_read() calls will ever be made, this work is wasted.

Now disable_loop() is called unconditionally in setup(). For polling
mode, loop is re-enabled only when pin_mode() registers an input pin.
For interrupt-driven mode, behavior is unchanged as the ISR already
manages loop enablement.
2026-04-04 22:11:04 -10:00
Clyde StubbsandJonathan Swoboda 4d2062282e [mipi_spi] Run spi final validation (#15418)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-04-04 21:11:49 -04:00
J. Nick Koston 2d9a42e4ba [pcf8574][pca9554] Add optional interrupt pin to eliminate polling (#15444) 2026-04-04 13:56:21 -10:00
J. Nick Koston 2b4448db02 Merge remote-tracking branch 'upstream/move-wake-to-core' into integration 2026-04-04 13:43:10 -10:00
J. Nick Koston 586196779b Merge remote-tracking branch 'upstream/gpio-expander-interrupt-pin-2' into integration 2026-04-04 13:43:06 -10:00
J. Nick Koston c17df9aaa3 Deduplicate RP2040 wake: wake_loop_threadsafe delegates to wake_loop_any_context 2026-04-04 13:19:03 -10:00
J. Nick Koston 2ead905e44 Fix ESP8266 wakeable_delay wake loss, use BaseType_t* for ISR-safe API 2026-04-04 13:13:41 -10:00
J. Nick Koston 0b90dbf328 Document LibreTiny IRAM_ATTR and ISR-safe wake limitations 2026-04-04 13:03:11 -10:00
J. Nick Koston e2c71419b6 Revert LibreTiny ISR change: FreeRTOS port lacks vTaskNotifyGiveFromISR/portYIELD_FROM_ISR 2026-04-04 13:00:57 -10:00
J. Nick Koston 670a23b4c1 Fix LibreTiny ISR safety: use vTaskNotifyGiveFromISR in wake_loop_any_context, update stale comment 2026-04-04 12:59:34 -10:00
J. Nick Koston 619370170c Remove socket_wake/socket_delay: callers use wake_loop_any_context/wakeable_delay directly 2026-04-04 12:56:13 -10:00
J. Nick Koston e8a8add6c3 Remove duplicate wake code: socket_delay/socket_wake delegate to core wake mechanism 2026-04-04 12:48:15 -10:00
J. Nick Koston 18497d5a7f Add backward-compat defines in require_wake_loop_threadsafe, remove pointless host socket consumption 2026-04-04 12:41:30 -10:00
Boris KrivonogCopilotJ. Nick Kostonpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
830517a98f [mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 3) (#15437)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-04-04 12:40:05 -10:00
J. Nick Koston 59969d4743 Simplify loop(): single yield_with_select_ call 2026-04-04 12:22:44 -10:00
J. Nick Koston c74889de67 Fix clang-tidy: rename wake_loop_impl_ to wake_loop_impl (no trailing underscore on free functions) 2026-04-04 12:10:42 -10:00
J. Nick Koston 58ab4866a6 Document Zephyr as the only platform without wake 2026-04-04 11:59:04 -10:00
J. Nick Koston 36b3d35d15 Fix Zephyr build: add fallback wakeable_delay and wake_loop_threadsafe 2026-04-04 11:58:33 -10:00
J. Nick Koston ac95bde627 Move RP2040 wakeable_delay to wake.cpp (file-scope state for alarm callback) 2026-04-04 11:49:22 -10:00
J. Nick Koston 113edd2076 Fix CI: remove redundant (void) in main_task.h, restore lwip_fast_select.h include for socket monitoring 2026-04-04 11:46:21 -10:00
J. Nick Koston 277c4f6343 Filter main_task.c and lwip_fast_select.c from platforms that don't need them 2026-04-04 11:45:44 -10:00
J. Nick Koston 1dc0559e20 Inline main_task notify helpers in header, simplify wake.h 2026-04-04 11:40:55 -10:00
J. Nick Koston 6dcdefe179 Move task notification helpers to main_task.c/h, deduplicate ESP32/LibreTiny in wake.h 2026-04-04 11:39:10 -10:00
J. Nick Koston a1e6a89fc8 Share task handle between wake.h and lwip_fast_select via main_task.h 2026-04-04 11:36:49 -10:00
J. Nick Koston 36d2b78c18 Unify ESP32/LibreTiny wake: always use g_main_task_handle, remove lwip_fast_select dependency 2026-04-04 11:34:10 -10:00
J. Nick Koston 63b8275e23 Fix ISR safety: ESP32 without fast select needs xPortInIsrContext detection 2026-04-04 11:30:45 -10:00
J. Nick Koston aa0e56bfde Fix ESP32/LibreTiny without fast select: use FreeRTOS task notifications directly 2026-04-04 11:28:21 -10:00
J. Nick Koston 80ff9f365b Fix wake.cpp: move includes outside namespace to fix cpptests build 2026-04-04 11:21:52 -10:00