initialise driver in C with xc8 compiler with gpio pins
问题 Lets say I have a driver "foo.h" and "foo.c" implementation. The driver interacts with the gpio pins on a microcontroller. In Arduino, each GPIO pin has it's own pin number (just an integer). Then you can initialise foo with the function initFoo(1) or initFoo(2), to choose the pin you want to use. In Mbed online c++ compiler, each GPIO can be controlled with a DigitalIn or DigitalOut object. In JAL (Just Another Language) that I'm also familiar with, they use the alias keyword. alias x is pin