I am currently designing a library for Arduino and I am using the the “HardwareSerial” class as the model for my library.
Despite having searched through all the source code, I am still at a loss as to how “Serial” gets defined.
In the “HardwareSerial.h” there is:
extern HardwareSerial Serial;
This means, as far as I remember, that “Serial” gets defined elsewhere. I just can’t find where.
Looking at this another way, why can I write in my Arduino setup() function:
without first having to have written:
in my sketch?
Many thanks in advance for any support on this! Stuart