Refactor the code for the gpio. Create hw_led.h add the board defines there.
Refactor if/else to switch/case. Remove extern from the functions in the .c - file. Add names to the function parameters. Update existing mapping so that it depends on the hw_led.h.
Eventually pull out the led stuff and create an led.c/ led.h file for the led specific stuff.
Refactor the code for the gpio. Create hw_led.h add the board defines there. Refactor if/else to switch/case. Remove extern from the functions in the .c - file. Add names to the function parameters. Update existing mapping so that it depends on the hw_led.h. Eventually pull out the led stuff and create an led.c/ led.h file for the led specific stuff.