feat(cardputer-adv): add CC1101 nRF24 LoRa 3-in-1 expansion support - #2827
feat(cardputer-adv): add CC1101 nRF24 LoRa 3-in-1 expansion support#2827leandrofleury wants to merge 1 commit into
Conversation
|
Compatibility scope:
|
28d09a6 to
7263fcb
Compare
|
Rebased onto dev (fe07bd7) and changed the PR base from main to dev. The only conflict was in src/modules/NRF24/nrf_spectrum.cpp, which was rewritten by #2758 (SpectrumPlot, continuous trace, frequency ruler). The 3-in-1 changes were reapplied on top of the new structure: scanChannels() — the mux critical section now wraps the sweep, and the tolerant RPD detection stays scoped to #if defined(CARDPUTER_ADV_3IN1_MUX). The #else path is the current upstream scanner, including NRF_FULL_SCALE. nrf_common.cpp, bus_HAL.cpp and the board files rebased cleanly. Both environments build against dev. |
Proposed Changes
Add support for the JosephCGS CC1101/NRF24/LoRa 3-in-1 expansion board on the M5Stack Cardputer ADV.
This introduces a dedicated PlatformIO environment:
m5stack-cardputer-adv-3in1The standard
m5stack-cardputerenvironment remains unchanged.The expansion shares the Cardputer ADV SPI bus and multiplexes GPIO8/9 between the TCA8418 keyboard controller and NRF24 CE/CS.
The implementation:
This PR is rebased onto
dev(fe07bd7). The only conflict wassrc/modules/NRF24/nrf_spectrum.cpp, rewritten by #2758 (SpectrumPlot, continuous trace, frequency ruler). The 3-in-1 changes were reapplied on the new structure:scanChannels()— the mux critical section wraps the sweep; the tolerant RPD detection stays scoped to#if defined(CARDPUTER_ADV_3IN1_MUX), and the#elsepath is the current upstream scanner (NRF_FULL_SCALE);nrf_spectrum()—devearly-returns whennrf_start()fails, soadv3in1Nrf24CriticalEnd()runs before that return; otherwise the mutex would leak and leave the TCA8418 keyboard stuck when the radio fails to start.nrf_common.cpp,bus_HAL.cppand the board files rebased cleanly.Types of Changes
New Feature / Hardware Support
Verification
Both environments build successfully:
pio run -e m5stack-cardputerpio run -e m5stack-cardputer-adv-3in1The standard Cardputer environment was also verified to retain its original compile-time pin configuration.
Hardware testing on M5Stack Cardputer ADV with the JosephCGS 3-in-1 expansion validated:
Testing
Both environments build successfully against
dev(fe07bd7):Standard environment:
3-in-1 environment:
The hardware checklist above was validated on the functional implementation prior to the rebase. The final rebased commit was build-tested on both environments against
dev; a hardware retest is pending.Linked Issues
None.
User-Facing Change