Hi,
I have a number of projects that all use GPS, and all use the same GPS library.
Currently the library is hard coded to Serial1.
My latest project requires that I use the interrupt on pin 18 or 19, so I need to move the GPS module to port 2 and edit the GPS library to use Serial2.
I can do a simple global replace of "Serial1" with "Serial2" which would solve my immediate problems, but then my existing projects (which have the GPS module physically connected to port1) won't work until I reverse the changes.
So, what's the simplest way of modifying my GPS library so that the port number is configurable in software?
Thanks