-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed SPI mode enum in SubGHz library #2191
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jgromes
I've tested your library when done the major part of the rework. And last I've changed this enum.
Sorry for the trouble and thanks for the fix.
@fpistm glad I could help! Any estimate on when is the new version going to be released? |
Hi @jgromes I will do a proper fixes on core side, anyway the new Replacing by |
Not sure what you mean - I can compile RadioLib STM32WL example fine with the changes from both PRs. |
It compiles but does not work. |
Ah, I see. Odd, I can't test that unfortunately, since I don't have any STM32WL on hand. Maybe @matthijskooijman would be able to help? |
I've read up a bit and am trying to make sense of the changes. I think that:
Then, what @fpistm is saying is that by the time radiolib uses Wrt to 392469a, I wonder if all these changes are really needed. Personally, I would like to keep the constructor constexpr, which ensures that constructing an SPISettings object can be done at compiletime. The entire alwaysInline/mightInline stuff really stems from the AVR implementation, where this was, IIRC, needed because there constructing an SPISettings object would condense the settings into a single uint8_t value ready to be put into the hardware registers directly, to ensure that the SPISettings approach was just as compact as the old (non-portable) method of specifying the register values directly. I think that approach also predates the In any case - I think the inline stuff has no place in ArduinoCore-API, since it really does not add anything (in fact, I wonder about the definition of this class in the API repo at all, since any core that includes ArduinoCore-API now can no longer define an optimized SPISettings class like AVR does now - I think ArduinoCore-API should just define an expected API and let cores implement that however they want). So I would suggest stripping the alwaysInline/mightInline stuff from SPISettings - it adds nothing, doing the intialization directly in the constructor and making it I've got to run now, but if it is helpful I could have a closer look and/or test somewhere next week? |
Thanks @matthijskooijman. @jgromes could you file an issue to revert the SPISettings as constexpr, please ? |
Hello, I found this issue in the following CI run for RadioLib: https://github.com/jgromes/RadioLib/actions/runs/6914863886/job/18813152408#step:8:28
Summary
This PR fixes unknown SPI mode in SubGHz library (changed in 392469a).