makes all UARTs that the board / chip has available
as Serial1 through Serial5 (if existing)
Serial is a either a macro for Serial1 (first hardware serial USART0) or for the SerialUSB if the USB CDC is enabled
Had to place the creation of the Serial objects into their own .cpp file because otherwise the linker wouldn't discard them even if the user wasn't using those objects --> waste of RAM. Not the cleanest looking sollution, but it works, without activating LTO which is a whole new rabbit whole
Serial1
throughSerial5
(if existing)Serial
is a either a macro forSerial1
(first hardware serial USART0) or for the SerialUSB if the USB CDC is enabled.cpp
file because otherwise the linker wouldn't discard them even if the user wasn't using those objects --> waste of RAM. Not the cleanest looking sollution, but it works, without activating LTO which is a whole new rabbit whole