Search found 1 match

by aster
Tue Mar 24, 2020 12:57 pm
Forum: General discussion
Topic: USBSerial and HardwareSerial agnostic lib
Replies: 1
Views: 3023

USBSerial and HardwareSerial agnostic lib

Hello,

I am writing a lib that takes a Serial port as argument ina function. I would like to make the library agnostic and use both USBSerial and HardwareSerial

For example if i write on a maple mini
my_lib(Serial);

It won't work because the Serial is a USBSerial, instead
my_lib(Serial1 ...

Go to advanced search