Found one idea (but not sure it's the best):
Declare a private pointer to a HardwareSerial object in the class definition:
private:
HardwareSerial *_port;
Then set it to point to the appropriate Serial object in the constructor, and then use it for all future references to the serial port:
{
MGCFA632::MGCFA632(int serialPort0123, int baud)
//Initialize pointer to serial object we'll be using
switch(serialPort0123) {
case 0 : _port=&Serial; break;
case 1 : _port=&Serial1; break;
case 2 : _port=&Serial2; break;
case 3 : _port=&Serial3; break;
}
//Init port
_port->begin(baud);
}
Any better ideas welcome...