fix(nrf24): recover auxiliary SPI after failed probe#2711
Open
AndrewIsFat wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Retry a failed NRF24 probe after cleanly restarting the auxiliary SPI controller. The recovery helper only accepts the auxiliary bus, so display and SD buses are never reset. Also emit the resolved NRF24 pin tuple on probe success or failure to make hardware reports easier to diagnose.
This fixes a regression on the M5StickC Plus2 legacy NRF24 connection where 1.14 worked but 1.15+ and dev reported "NRF24 not found".
Types of Changes
Bugfix.
Verification
Tested on a physical M5StickC Plus2 with an NRF24L01 connected through the legacy pin mapping:
The radio was detected successfully in Spectrum and again in MouseJack after leaving and re-entering NRF24 tools. The flashed image was verified by esptool.
Testing
Linked Issues
Related to #1655.
User-Facing Change
Further Comments
The first probe is retained. The auxiliary SPI restart is only used as a recovery path after that probe fails.