Repository navigation
refactor(lpc): rename FL_LPC* macros to FL_IS_ARM_LPC_* (closes #2999) - #3017
Conversation
…vention
Brings the LPC subtype macros in line with the project-wide
`FL_IS_<FAMILY>_<SUBTYPE>` naming convention used everywhere else
(`FL_IS_TEENSY_LC`, `FL_IS_STM32_F1`, `FL_IS_ESP8266`, `FL_IS_SAMD21`,
...). Only the family roll-up `FL_IS_ARM_LPC` was previously compliant.
Renamed (table per the issue body):
| Old (wrong) | New (correct) |
|--------------------|--------------------------|
| `FL_LPC845` | `FL_IS_ARM_LPC_845` |
| `FL_LPC804` | `FL_IS_ARM_LPC_804` |
| `FL_LPC11` | `FL_IS_ARM_LPC_11` |
| `FL_LPC11_USB` | `FL_IS_ARM_LPC_11_USB` |
| `FL_LPC11_LEGACY` | `FL_IS_ARM_LPC_11_LEGACY`|
| `FL_LPC15` | `FL_IS_ARM_LPC_15` |
Touched 9 files, all under `src/platforms/arm/lpc/`:
* `is_lpc.h` — source of truth: 6 `#define`s renamed, sub-family
roll-up `#if defined(...)` updated, header banner extended with a
short convention note referencing #2999. Upstream toolchain /
vendor inputs (`__LPC845__`, `LPC845M301`, `CPU_LPC845M301JBD48`,
etc.) are explicitly NOT renamed — we read them, we don't define
them.
* `clockless_arm_lpc.h`, `clockless_arm_lpc_plu.h`,
`clockless_arm_lpc_pwm_dma.h`, `fastled_arm_lpc.h`,
`fastpin_arm_lpc.h`, `led_sysdefs_arm_lpc.h`, `spi_arm_lpc.h`,
`README.md` — `defined(FL_LPC*)` consumers and prose references
updated. No semantic change; the conditions evaluate to the same
truth values they did before.
* `fastled_arm_lpc.h` — added `#include "platforms/arm/is_arm.h"`
so the `IsHeaderIncludeChecker` is satisfied (the rename means
the file now uses `FL_IS_*` macros, which require the trampoline
include).
No backward-compat aliases needed — the `FL_LPC*` names were internal
to `src/platforms/arm/lpc/` (zero references in `src/` outside that
directory, zero in `examples/`, `tests/`, or `ci/`). Verified
zero-occurrence post-rename with a project-wide grep.
Closes #2999.
Test plan:
* `bash lint` — clean (was 1 violation pre-fix-the-include, now 0).
* `bash autoresearch lpc845brk --upload-port COM10 --skip-lint
--timeout 5` — LPC845 firmware builds (text 62.16 KB / 64 KB),
flashes via pyOCD, and the existing bring-up RPC test still
passes on real hardware:
✅ Serial.println — REMOTE: response received
✅ JSON-RPC echo — sentinel 4242 round-trip verified
✅ FL_WARN_LIT — FastLED warn pipeline reached host
* `bash test --cpp` — 219/219 host test cases pass (a separate
intermittent zccache-daemon link race surfaced "0/0 tests built"
on one run — that's the false-pass / false-fail mode tracked by
#3011 and is independent of this change; the second invocation
after `zccache stop` returned clean test pass counts).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAll LPC platform-detection macros in ChangesLPC Platform Macro Rename
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary
Brings the LPC subtype macros in line with the project-wide
FL_IS_<FAMILY>_<SUBTYPE>naming convention used everywhere else (FL_IS_TEENSY_LC,FL_IS_STM32_F1,FL_IS_ESP8266,FL_IS_SAMD21, ...). Only the family roll-upFL_IS_ARM_LPCwas previously compliant.Rename
FL_LPC845FL_IS_ARM_LPC_845FL_LPC804FL_IS_ARM_LPC_804FL_LPC11FL_IS_ARM_LPC_11FL_LPC11_USBFL_IS_ARM_LPC_11_USBFL_LPC11_LEGACYFL_IS_ARM_LPC_11_LEGACYFL_LPC15FL_IS_ARM_LPC_15Scope
Touched 9 files, all under
src/platforms/arm/lpc/. No backward-compat aliases needed — theFL_LPC*names were entirely internal to that directory (zero references insrc/outside it, zero inexamples/,tests/, orci/). Verified zero-occurrence post-rename with a project-widegrep -rn.Upstream toolchain / vendor inputs (
__LPC845__,LPC845M301,CPU_LPC845M301JBD48, ...) are explicitly NOT renamed — we read them, we don't define them.fastled_arm_lpc.hgained a#include "platforms/arm/is_arm.h"to satisfy theIsHeaderIncludeCheckerlint (which requires any file using anFL_IS_*macro to pull in the trampoline include).Test plan
bash lint— clean (was 1 IsHeaderIncludeChecker violation pre-fix, now 0).bash autoresearch lpc845brk --upload-port COM10 --skip-lint --timeout 5— LPC845 firmware builds (text 62.16 KB / 64 KB), flashes via pyOCD, and the existing bring-up RPC test passes on real hardware:bash test --cpp— 219/219 host test cases pass (a separate intermittent zccache-daemon link race surfaced "0/0 tests built" on one run — that's the false-pass / false-fail mode tracked by test runner produces false-pass when link fails (zccache daemon crash under all-with-examples) #3011 and is independent of this change; the second invocation afterzccache stopreturned clean test pass counts).Closes #2999.
🤖 Generated with Claude Code
Summary by CodeRabbit