Skip to content

feat(rx/lpc): scaffold LPC8xx SCT-capture RX backend + WS2812 decoder - #3016

Merged
zackees merged 1 commit into
masterfrom
feat/3015-lpc-rx-sct-capture
Jun 14, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/3015-lpc-rx-sct-capture

Conversation

@zackees

@zackees zackees commented Jun 14, 2026 •

Copy link
Copy Markdown
Member

Summary

First slice of #3015's WS2812 loopback work — the bit that's independent of #3002's flash refactor and host-testable today.

Closes Status
#3015 item 2 — src/platforms/arm/lpc/rx_sct_capture.h implementing RxDevice ✅ scaffold + decoder + dispatch
#3015 item 1 — free ~4 KB of flash on the bring-up sketch ❌ still tracked by #3002
#3015 items 3–4 — loopback wiring + probePair-driven pin auto-detect ❌ follow-up after 1 + this

What ships

  • RxBackend::LPC_SCT_CAPTURE enum + RxDeviceType::LPC_SCT_CAPTURE. Default backend on LPC (PLATFORM_DEFAULT → LPC_SCT_CAPTURE). Dispatchable everywhere — real LpcSctRxChannel on LPC, NativeRxDevice on stub for host tests, DummyRxDevice elsewhere.
  • src/platforms/arm/lpc/rx_sct_capture.{h,cpp.hpp} — LpcSctRxChannel:
    • injectEdges() / getRawEdgeTimes() — fully functional against an in-RAM fl::vector<EdgeTime> buffer (same shape NativeRxDevice uses).
    • decode() — fully functional 4-phase WS2812 edge-pair → byte decoder. Kept in-TU per the existing FlexPWM / FlexIO convention; the follow-up consolidation target is src/fl/channels/rx/decode_ws2812.h.
    • begin() — stores config, clears buffer. The actual SCT input-capture + DMA register sequence is documented as a register-by-register TODO block referencing UM11029 §16 (SCT EVENTCTRL / CAPTURE / DMA mux setup) so a follow-up bench session can fill it in.
  • src/fl/channels/rx_sct_capture.h — thin public re-export so callers (and tests) reference the driver via a stable fl/channels/... path without reaching into platforms/arm/lpc/.
  • tests/fl/channels/rx_sct_capture.cpp — five host unit tests:
    1. RxBackend / RxDeviceType toString includes the new entry.
    2. RxDevice::create<LPC_SCT_CAPTURE>(pin) is non-null on every platform.
    3. injectEdges → decode round-trips a 9-byte GRB payload across 3 LEDs at WS2812B nominal timing (T0H=400/T0L=850, T1H=800/T1L=450 ns, ±150 ns tolerance).
    4. Decoder rejects an empty edge buffer with INVALID_ARGUMENT.
    5. getRawEdgeTimes() faithfully mirrors what was injected.

What does NOT ship (deferred)

The actual SCT + DMA register programming in begin(). The peripheral path needs a scope/LA on a real LPC845-BRK to validate event-mux routing, capture-register polarity, and DMA transfer sizing. The contract above is deliberately complete enough that the follow-up only has to populate mEdges from the SCT/DMA ISR — every other surface (finished, wait, decode, getRawEdgeTimes, injectEdges) is host-tested today and won't change shape.

Test plan

  • bash test rx_sct_capture --cpp — all 5 cases pass.
  • bash lint — clean.
  • bash autoresearch lpc845brk --upload-port COM10 --skip-lint --timeout 5 — LPC845 firmware still builds (text 62.16 KB / 64 KB) and the existing bring-up test (Serial.println + JSON-RPC echo + FL_WARN_LIT) still passes on real hardware. The new RX driver adds zero flash on this sketch because nothing references RxBackend::LPC_SCT_CAPTURE yet — LTO drops it.

Refs: #3002, #3004, #3012, #3013, #3014, #3015.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added LPC SCT capture backend for RX input channels, extending hardware support to ARM LPC microcontroller platforms.
  • Tests

    • Added comprehensive test suite for the LPC SCT RX backend, verifying decoder functionality and cross-platform compatibility.

…#3015)

Lays down the contract everything else in #3015's WS2812 loopback test
needs while leaving the hardware-bench-required SCT/DMA register
programming as a documented follow-up.

What ships:

  * `RxBackend::LPC_SCT_CAPTURE` enum + `RxDeviceType::LPC_SCT_CAPTURE` —
    dispatchable on every platform (real `LpcSctRxChannel` on LPC8xx,
    `NativeRxDevice` on stub for host tests, `DummyRxDevice` elsewhere).
    Default backend on LPC maps to `LPC_SCT_CAPTURE`. Updated `toString`
    for both enums.

  * `src/platforms/arm/lpc/rx_sct_capture.{h,cpp.hpp}` — `LpcSctRxChannel`
    implementing the full `RxDevice` interface:
      - `injectEdges()` / `getRawEdgeTimes()` — fully functional against
        an in-RAM `fl::vector<EdgeTime>` buffer (same pattern as
        `NativeRxDevice`).
      - `decode()` — fully functional 4-phase WS2812 edge-pair → byte
        decoder. Kept in-TU per the existing FlexPWM / FlexIO
        convention; the follow-up consolidation target is
        `src/fl/channels/rx/decode_ws2812.h`.
      - `begin()` — stores config, clears buffer. The actual SCT input-
        capture + DMA register sequence is sketched in detail as a
        documented `TODO` block referencing UM11029 §16 (SCT
        EVENTCTRL / CAPTURE / DMA mux setup) so a follow-up bench
        session can fill it in without re-reading the manual.

  * `src/fl/channels/rx_sct_capture.h` — thin public re-export so callers
    (and the matching unit test) reference the driver via a stable
    `fl/channels/...` path without reaching into `platforms/arm/lpc/`.

  * `tests/fl/channels/rx_sct_capture.cpp` — five host unit tests that
    lock down the contract this PR ships:
      1. `RxBackend` / `RxDeviceType` `toString` includes the new entry.
      2. `RxDevice::create<LPC_SCT_CAPTURE>(pin)` returns a non-null
         device on every platform.
      3. injectEdges → decode round-trips a 9-byte GRB payload across
         3 LEDs at WS2812B nominal timing (T0H=400/T0L=850, T1H=800/
         T1L=450 ns, ±150 ns tolerance).
      4. Decoder rejects an empty edge buffer with `INVALID_ARGUMENT`.
      5. `getRawEdgeTimes()` faithfully mirrors what was injected
         (8 bits × 2 edges = 16 entries; spot-checked alternating
         bit pattern 0xA5).

What does NOT ship (deferred to a follow-up):

  * The actual SCT input-capture + DMA register programming in
    `begin()`. The peripheral path needs a scope/LA on a real
    LPC845-BRK to validate event-mux routing, capture-register
    polarity, and DMA transfer sizing. The contract above is
    deliberately complete enough that the follow-up only has to
    populate `mEdges` from the SCT/DMA ISR — every other surface
    (`finished`, `wait`, `decode`, `getRawEdgeTimes`, `injectEdges`)
    is host-tested today and won't change.

Test plan:

  * `bash test rx_sct_capture --cpp` — all 5 cases pass on host
    (decoder + dispatch contract).
  * `bash lint` — clean.
  * `bash autoresearch lpc845brk --upload-port COM10 --skip-lint
    --timeout 5` — LPC845 firmware still builds (text 62.16 KB /
    64.00 KB) and the existing bring-up test (serial + JSON-RPC
    echo + FL_WARN_LIT) still passes on real hardware. The new RX
    driver adds zero flash on this sketch because nothing references
    `RxBackend::LPC_SCT_CAPTURE` yet — LTO drops it.

Closes #3015 *item 2* (the `rx_sct_capture.h` scaffold). Item 1
(the `fl::json` fixed-point refactor that frees the ~4 KB flash
margin needed for the full loopback sketch) is still tracked by
#3002. Items 3-4 (loopback test wiring + auto-detect via
`probePair`) ship in a follow-up once both 1 and 2 are bench-
verified.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds LPC_SCT_CAPTURE as a new receive backend (RxBackend and RxDeviceType value 5) for ARM LPC8xx platforms. Introduces fl::LpcSctRxChannel, an RxDevice-derived class with an edge-buffer-based WS2812 decoder; the SCT+DMA hardware register setup in begin() is scaffolded but left as a TODO. Platform dispatch is wired across all build targets, and a host-side test suite validates the decoder.

Changes

LPC SCT Capture RX Backend

Layer / File(s) Summary
RxBackend and RxDeviceType enum extensions
src/fl/channels/rx/types.h, src/fl/channels/rx.h
Adds LPC_SCT_CAPTURE = 5 to both RxBackend and RxDeviceType enums, extends toString() helpers for each, and declares the RxDevice::create<LPC_SCT_CAPTURE> template specialization.
LpcSctRxChannel class declaration and public wrapper header
src/platforms/arm/lpc/rx_sct_capture.h, src/fl/channels/rx_sct_capture.h
Declares fl::LpcSctRxChannel deriving from RxDevice with lifecycle, decode, edge-buffer, and injection method overrides plus mPin/mFinished/mEdges state; adds the stable fl/channels/rx_sct_capture.h include-only wrapper.
LpcSctRxChannel method implementations
src/platforms/arm/lpc/rx_sct_capture.cpp.hpp, src/platforms/arm/lpc/_build.cpp.hpp
Implements factory, constructor, begin/finished/wait, the alternating-edge-pair-to-byte decode() loop with error-rate gating, getRawEdgeTimes, name/getPin, and injectEdges; registers the translation unit in the Unity build.
Platform dispatch
src/fl/channels/rx.cpp.hpp, src/fl/channels/rx/channel.cpp.hpp
Adds RxDevice::create<LPC_SCT_CAPTURE> specializations for each platform branch (ESP32/Teensy dummy, ARM LPC real, STUB native, unsupported dummy) and adds the LPC_SCT_CAPTURE case to createBackendDevice's backend-selection switch.
Host-side tests
tests/fl/channels/rx_sct_capture.cpp
Covers toString round-trips, device creation/pin identity, a full GRB synthetic-edge integration decode, empty-buffer negative decode, and raw edge-buffer fidelity checks.

Sequence Diagram(s)

sequenceDiagram
  participant Test as Test / Application
  participant RxDevice
  participant LpcSctRxChannel
  participant EdgeBuffer as mEdges

  Test->>RxDevice: create<LPC_SCT_CAPTURE>(pin)
  RxDevice->>LpcSctRxChannel: LpcSctRxChannel::create(pin)
  LpcSctRxChannel-->>Test: shared_ptr<LpcSctRxChannel>

  Test->>LpcSctRxChannel: begin(config)
  LpcSctRxChannel->>EdgeBuffer: clear()
  Note over LpcSctRxChannel: SCT+DMA hw setup TODO

  Test->>LpcSctRxChannel: injectEdges(edgeTimes)
  LpcSctRxChannel->>EdgeBuffer: append EdgeTime entries

  Test->>LpcSctRxChannel: wait(timeout_ms)
  LpcSctRxChannel-->>Test: SUCCESS / TIMEOUT

  Test->>LpcSctRxChannel: decode(WS2812Timing, outputSpan)
  LpcSctRxChannel->>EdgeBuffer: iterate alternating HIGH/LOW pairs
  LpcSctRxChannel-->>Test: result<u32, DecodeError>
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#2400: Established the RxDevice/RxChannel backend framework and RxDevice::create specialization pattern that this PR extends with the new LPC_SCT_CAPTURE backend.
  • FastLED/FastLED#2765: Added the FLEXIO backend following the same dispatch pattern in rx.cpp.hpp and rx/channel.cpp.hpp that this PR replicates for LPC_SCT_CAPTURE.
  • FastLED/FastLED#2837: Introduced FL_IS_ARM_LPC platform guards for LPC845/LPC804 detection, which this PR depends on to conditionally compile the LpcSctRxChannel implementation.

Poem

🐇 A bunny hops on LPC land,
Where SCT edges fill a RAM-side hand.
Inject the bits, then decode each pair—
GRB bytes emerge right from the air!
The DMA TODO waits patiently still,
While host-side tests confirm the skill. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.51% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: introducing an LPC8xx SCT-capture RX backend scaffold with WS2812 decoder support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/3015-lpc-rx-sct-capture

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/platforms/arm/lpc/rx_sct_capture.cpp.hpp (1)

47-103: Note ISR synchronization requirements when the TODO is implemented.

The TODO block (lines 52-100) describes the future SCT+DMA+ISR setup. When that ISR lands and begins mutating mFinished (line 95) and populating mEdges via DMA, both fields will become ISR-shared state. Per the C++ standards guideline, they must then be protected with fl::atomic<bool> for mFinished (with explicit memory order) and either atomics or critical sections for mEdges access; plain member variables are not safe for cross-context (main thread ↔ ISR) communication.

Currently there is no ISR, so this is not a defect in the present PR. Flag for the follow-up that implements the register programming.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platforms/arm/lpc/rx_sct_capture.cpp.hpp` around lines 47 - 103, When the
follow-up PR implements the TODO (lines 52-100) with the actual SCT register
programming and ISR, add a comment flagging that mFinished must be changed from
a plain bool to fl::atomic<bool> with explicit memory order specifications, and
mEdges access must be protected with either atomics or critical sections, since
both fields will become ISR-shared state that requires safe cross-context (main
thread ↔ ISR) synchronization per C++ standards guidelines.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/fl/channels/rx_sct_capture.cpp`:
- Around line 10-18: Replace all Unicode glyphs and characters in comments with
ASCII-only equivalents throughout the file tests/fl/channels/rx_sct_capture.cpp.
In the comment block at lines 10-18, replace the Unicode arrow (→) with ASCII
arrow (->). In the comment sections at lines 36-40 and lines 106-109, replace
any Unicode micro sign (µ) with ASCII text (us) and replace any other Unicode
punctuation characters with their ASCII equivalents to ensure the entire file
meets the source-integrity requirement of being ASCII-only with no Unicode
glyphs in comments.

---

Nitpick comments:
In `@src/platforms/arm/lpc/rx_sct_capture.cpp.hpp`:
- Around line 47-103: When the follow-up PR implements the TODO (lines 52-100)
with the actual SCT register programming and ISR, add a comment flagging that
mFinished must be changed from a plain bool to fl::atomic<bool> with explicit
memory order specifications, and mEdges access must be protected with either
atomics or critical sections, since both fields will become ISR-shared state
that requires safe cross-context (main thread ↔ ISR) synchronization per C++
standards guidelines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f3a56805-8e31-4fa7-9f5b-e2cc917a7e27

📥 Commits

Reviewing files that changed from the base of the PR and between a13f4f8 and 3e2cdca.

📒 Files selected for processing (9)
  • src/fl/channels/rx.cpp.hpp
  • src/fl/channels/rx.h
  • src/fl/channels/rx/channel.cpp.hpp
  • src/fl/channels/rx/types.h
  • src/fl/channels/rx_sct_capture.h
  • src/platforms/arm/lpc/_build.cpp.hpp
  • src/platforms/arm/lpc/rx_sct_capture.cpp.hpp
  • src/platforms/arm/lpc/rx_sct_capture.h
  • tests/fl/channels/rx_sct_capture.cpp

Comment on lines +10 to +18
/// 1. `RxBackend::LPC_SCT_CAPTURE` is dispatchable on every platform
/// (real device on LPC, NativeRxDevice on stub, DummyRxDevice
/// elsewhere). Tested implicitly via the toString round-trip and
/// the factory's non-null guarantee.
/// 2. The WS2812 edge-pair → byte decoder accepts a synthetic edge
/// stream and round-trips it to the original GRB bytes.
/// 3. `injectEdges()` is fully functional on the LPC backend (the
/// hardware-side capture path will populate the same buffer once
/// the SCT/DMA setup lands).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace Unicode glyphs with ASCII-only text in comments.

Line 14 uses a Unicode arrow and Line 108 uses a Unicode micro sign; this file also uses Unicode punctuation in comment text. Please normalize these to plain ASCII (->, us, -) to meet source-integrity requirements.

As per coding guidelines, "Source integrity: all C++/Python code must be ASCII-only (no emoji or Unicode glyphs in identifiers/prints/comments)."

Also applies to: 36-40, 106-109

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/fl/channels/rx_sct_capture.cpp` around lines 10 - 18, Replace all
Unicode glyphs and characters in comments with ASCII-only equivalents throughout
the file tests/fl/channels/rx_sct_capture.cpp. In the comment block at lines
10-18, replace the Unicode arrow (→) with ASCII arrow (->). In the comment
sections at lines 36-40 and lines 106-109, replace any Unicode micro sign (µ)
with ASCII text (us) and replace any other Unicode punctuation characters with
their ASCII equivalents to ensure the entire file meets the source-integrity
requirement of being ASCII-only with no Unicode glyphs in comments.

Source: Coding guidelines

@zackees
zackees merged commit 5d9fd45 into master Jun 14, 2026
9 of 10 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 14, 2026
zackees added a commit that referenced this pull request Jun 14, 2026
…3024)

* feat(rx/lpc): SCT input-capture + pin-toggle loopback (#3021 Phase 1)

Closes Phase 1 of FastLED #3021 — wires real SCT input-capture
register programming into the LPC SCT-RX scaffold landed by #3015/#3016,
adds the `pinToggleRx` JSON-RPC handler to the LPC845-BRK bring-up
sketch, and adds an `--pin-toggle-rx` autoresearch subcommand + Python
orchestrator that exercises the full loopback at 1 / 10 / 100 kHz.

Driver implementation (src/platforms/arm/lpc/rx_sct_capture.{h,cpp.hpp})
-----------------------------------------------------------------------

Behind a new `FASTLED_LPC_RX_SCT` compile gate (default off — preserves
the existing flash budget for sketches that don't opt in):

  * `begin()` powers up SCT + SWM in SYSCON, routes the user's pin to
    SCT0_GPIO_IN_A_I via SWM PINASSIGN6, programs a 32-bit unified
    free-running counter, and wires events EV0/EV1 to capture into
    CAP[0]/CAP[1] on rising / falling edges of the input.

  * `pollOnce()` (new public method) drains the SCT EVFLAG/CAP[0..1]
    pair into the EdgeTime ring buffer. Designed to be called from a
    TX bit-bang loop on the M0+ — without inline polling the SCT
    overwrites each CAP register on every edge before user code can
    read it. Phase 2's SCT->DMA upgrade will reduce `pollOnce()` to
    a no-op; the API stays for compatibility.

  * `wait()` spins on `pollOnce()` until timeout or buffer full.

  * Destructor halts the SCT and unmaps the SWM pin so a follow-up
    driver can claim it.

All register offsets / bit positions cross-checked against UM11029
Rev 1.7 §8 (SYSCON), §10 (SWM), §21 (SCT). Hardware-validated SYSCON
layout matched against `watchdog_lpc.impl.hpp`. Existing PWM_DMA TX
driver shim has known offset bugs (REGMODE width, SYSCON offset,
DMA CFG.HWTRIGEN bit position) — RX driver uses its own anonymous
namespace of correct constants instead of reusing the broken shim.

Sketch (examples/AutoResearchLpc/AutoResearchLpc.ino)
-----------------------------------------------------

Adds `pinToggleRx(tx, rx, freq_hz, dur_ms) -> CSV string` JSON-RPC
binding. The CSV-string return shape (instead of the FlexIO-style
fl::json object) keeps flash overhead minimal on the 64 KB LPC845
budget: 7 integer fields packed as
`success,edges,periods,mean_ns,sigma_ns,min_ns,max_ns`.

The handler bit-bangs a software square wave on tx_pin while
concurrently calling rx->pollOnce() between each digitalWrite, then
computes period mean / σ / min / max stats over the captured edges.

`#define FASTLED_LPC_RX_SCT 1` is set at the top of the sketch so the
real SCT register programming activates.

Autoresearch runner (ci/autoresearch/{args,phases}.py)
------------------------------------------------------

  * New `--pin-toggle-rx` CLI flag in args.py.
  * New `_run_lpc_pin_toggle_rx_tests()` dispatch in phases.py that
    routes lpc845brk + --pin-toggle-rx to a fresh subprocess running
    the Python bench script.

Python orchestrator (ci/autoresearch/test_lpc_pin_toggle_rx.py)
---------------------------------------------------------------

Mirrors `test_flexio_rx_squarewave.py` but adapted to the LPC sketch's
positional-args + CSV-string RPC contract:

  Case 1.1 — 1 kHz  / 200 ms — σ < 1000 ns, mean ±2 %
  Case 1.2 — 10 kHz / 100 ms — σ < 500 ns,  mean ±2 %
  Case 1.3 — 100 kHz/ 100 ms — σ < 500 ns,  mean ±2 %

(Looser σ vs the Teensy 4 FlexIO bench because M0+ polling adds
1–2 µs of capture jitter per edge — see pollOnce() timing budget.)

Wiring: jumper P0_10 ↔ P0_11 on the LPC845-BRK header.

Hardware validation
-------------------

Code is bench-ready but NOT yet validated on real LPC845 silicon —
this PR ships the implementation contract so Phase 1 acceptance can
be confirmed in a follow-up bench session against the LPC845-BRK
attached to COM10.

To run on hardware once the board is connected:
  bash autoresearch lpc845brk --pin-toggle-rx --upload-port COM10

* fix(lpc): rename fl::strstream -> fl::sstream (file header is misleading)

CI caught: `examples/AutoResearchLpc/AutoResearchLpc.ino:233:17:
error: no type named 'strstream' in namespace 'fl'; did you mean
'sstream'?`. The header file is `fl/stl/strstream.h` but the class
inside is `fl::sstream` — file name is misleading. Fix the four use
sites in the pinToggleRx handler.

The uno CI failure on the same run is pre-existing (`math.cpp.hpp:162`
F(1.0/6.0) initializer fails on AVR g++ — not introduced by this PR).

* fix(lpc): gate pinToggleRx handler behind FL_IS_ARM_LPC for host stub

CI surfaced: the example DLL host-stub build (Linux example tests)
compiles AutoResearchLpc.ino with STUB_PLATFORM, where
`fl::LpcSctRxChannel`, `fl::RxConfig`, `fl::EdgeTime`, and the
Arduino-native `delayMicroseconds` all do not exist. Wrap the
pinToggleRx handler body + helpers in `#if defined(FL_IS_ARM_LPC)`
so the host build still gets a valid empty-handler sketch.

The runtime behavior on real LPC845 silicon is unchanged — FL_IS_ARM_LPC
evaluates true there. Host stub now skips the RX section cleanly.
@zackees
zackees deleted the feat/3015-lpc-rx-sct-capture branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant