Library creates the serial object using first unused hardware serial port. If no free hardware serial ports are available library creates the software serial object using SoftwareSerial library. Library is dedicated for multi architecture sketches for Arduino (for eg. avr and stm32 where hardware serial ports can be different). Library is compatible with all HardwareSerial and SoftwareSerial methods and proprties.
Serial declaration: - AutoSerial mySerial;
Check if serial is hardware: - bool mySerial.isHardwareSerial();
Assign RX and TX pins if serial is SoftwareSerial: - bool mySerial.setRxTxPins(uint8_t Rx,uint8_t Tx);
Check the number of hardware/software serial port: - uint8_t mySerial.getSerialNumber();