Skip to content
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

Enable STM32 fastio for softspi #451

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

omicronns
Copy link

There was a digitalPinToPort macro usage missing in softspi fastio implementation for Teensy, that worked by accident, only because Teensy implementation of this macro is trivial: #define digitalPinToPort(pin) (pin). After that Teensy fastio implementation becomes pretty cross platform, so I enabled STM32 as a consumer of it.

Also did some PORTreg_t cleanup, because comments were contradicting the code, but I don't have hardware to test it on different platforms.
I mean this comment specifically:

      // Port direction register pointers are always 8-bit regardless of
      // PORTreg_t -- even if 32-bit port, we modify a byte-aligned 8 bits.

Here it was not consistent with the code, but here it was, so I'm not sure if this fix is correct, but it seemd odd that direction register would be different size than access register.

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.

1 participant