I am trying and failing to covert a sketch into a libiary.
Using an Arduino Zero.
In sketch form:
Variable of type Uart is defined as follows:
Uart* serPort = &serial2;
There is a function that switches between &serial1 and &serial2.
Now i am trying to implement the same into the library:
Defined in the main code as follows:
Here is the header file:
Here is the .cpp file:
serPort = &PortIn;
This complies but somthing must crash on startup as the USB port is lost. Resetbutton has to be presed to start the bootloader.
I cannot seem to find what is wrong.