Skip to content

Conversation

@dracc
Copy link
Contributor

@dracc dracc commented Oct 27, 2025

Add an SPI_BtnMode for the RP2040.

Opened in draft as I can't figure out why the OpenFFBoard still boots into TM-mode if RP2040 mode was saved to flash.
#160 has been opened if this isn't the place for spitting ideas.

Edit: Turns out that restoreFlash() runs setConfig() which in turn runs initSPI(), only for the SPI_Buttons constructor to change some of the SPI port values and re-run initSPI(). 7cbcb08 fixes this behavior, published separately in #164.

@dracc dracc marked this pull request as ready for review November 4, 2025 11:38
@Ultrawipf
Copy link
Owner

is this still relevant on the dev branch with the dynamic spi settings? i apologize for the broken history, you probably have to rebase to check what is already changed

@dracc
Copy link
Contributor Author

dracc commented Jan 26, 2026

is this still relevant on the dev branch with the dynamic spi settings? i apologize for the broken history, you probably have to rebase to check what is already changed

As far as I can tell, this PR still sets up edges and polarity in a different way than the other modes. I only saw changes to the speed settings in recent commits but it's more than likely that I missed something.

@Ultrawipf
Copy link
Owner

Ultrawipf commented Jan 27, 2026

Yes it is a valid mode but i am thinking about a better way to name it. rp2040 doesn't make much sense to a user if it is not clear what the spi settings are also considering that it is with positive CS polarity which is unusual.
The LSB/MSB direction shouldn't really matter as it just changes the button order so it might make more sense to keep it the same for all modes and only have clock and cs variations.

Maybe we could rename all the modes like "DIY Mode CS+,CL+" or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants