Description
Looking through the GPIO mapping and functions, it appears we have tried to abstract the functions away from the hardware registers, but haven't properly mapped back to them. Rather, we are calling the SPL gpio_init function from pin_function, but passing it variables that are still mapped to the abstraction when it is expecting the actual hardware defined bits. It seems that setting/changing GPIO modes won't be working correctly as is.
Since we don't have a HAL library that we are working with here, we really shouldn't abstract away much at all. There are two different GPIO mode APIs used in the SPL (depending on the specific chip) that need to be sorted, but we can either use the SPL header definitions directly here, or alternatively use switch methods in pin_function (and any place else) to remap these bits back to the proper SPL register definitions. This will have to happen anywhere we call SPL functions, so if there are too many cases - we might want to find a better way??