Repository navigation
fix(esp32): make _FL_BIT macro available when FASTLED_UNUSABLE_PIN_MASK is externally defined - #2276
Conversation
Previously _FL_BIT(B) was only defined when FASTLED_UNUSABLE_PIN_MASK was NOT externally defined. However, _FL_BIT is also used unconditionally further down the file (e.g. in the fallback SOC_GPIO_VALID_GPIO_MASK definition around line 164 and 166), so users who supplied their own FASTLED_UNUSABLE_PIN_MASK via a build flag (e.g. ESP32-PICO-V3-02 users who need to re-enable GPIO7/8/20) hit "_FL_BIT undeclared" compile errors. Moving the single-line #define outside the ifndef guard makes the macro always available without changing any existing behavior. Fixes #1372 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change repositions the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
📊 Header Compilation PerformanceTotal Time: 989.20ms Top 5 Slowest Headers
Warnings
Full Report |
Summary
Move the
_FL_BIT(B)helper macro out of the#ifndef FASTLED_UNUSABLE_PIN_MASKblock insrc/platforms/esp/32/core/fastpin_esp32.hso that it is always defined.Previously
_FL_BITwas only defined when the user did NOT overrideFASTLED_UNUSABLE_PIN_MASK. However the macro is also used unconditionally further down the file (inside theSOC_GPIO_VALID_GPIO_MASKfallback for older ESP-IDF versions at lines 164/166). As a result, users who tried to override the pin mask via a build flag — for example, ESP32-PICO-V3-02 users who need to re-enable GPIO7/8/20 that the SiP package exposes externally — would get_FL_BIT undeclaredcompile errors.Moving the single-line
#defineoutside the guard fixes this without changing any existing behavior.Fixes
Fixes #1372
Test plan
bash compile esp32dev --examples Blinksucceeds on this branch-DFASTLED_UNUSABLE_PIN_MASK=0x100740LLas a build flag and compile cleanly🤖 Generated with Claude Code
Summary by CodeRabbit