I’m looking for the equivalent of the port data direction registers on Arduino, and haven’t found it documented yet. I’m building a utility library that works a bit like Tinker, so it’s very helpful to be able to display whether a read value of 0 is real or just an output pin… and moreover, save some cycles and only read pins that are actually inputs.
In the feature/hal branch, we have HAL_Get_PinMode() to retrieve the current pin mode for a given pin. This would allow you to distinguish inputs from outputs.
Awesome @mdma, you have no idea how excited I am for HAL. We have any similar thing on ye olde firmware, or should I just wait for HAL to get pushed out for Cores?