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.
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: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.