I'm writing some diagnostics for a Cortex-M4 -- in this case an ATSAME54. I'd like to be able to read the configuration of individual GPIO pins, namely:
- bool level
- enum gpio_direction direction [IN, OUT, OFF]
- enum gpio_pull_mode pull_mode [UP, DOWN, NONE]
I've figured out how to read the level and the pull mode, but I'm stumped on reading the direction.
Has someone out there solved how to do this?