for micros() Use: ARM Synchronization Primitives, include of arm_math.h
Get systick_isr data safely without disable interrupts, uses systick_safe_read as indicator variable
Sketches that includes String objects did not compile, so simply copy the wstring.cpp from Teensy3 directory.
Likewise sketches that used stream functions like:
Serial1.readBytes would not compile as the Stream sources were not included.
So likewise copied over from Teensy3 directory
Add some support for serialEventX calls when yield is called.
Currently keep table of which SerialX objects are Used (.begin called) and each has their own function which does the
if (Serial1.available()) serialEvent1();
Calling SerialX.end(), removes the call from the list. Also the default weak pointer serialEventX functions call the disable function, as to only be called once as no one is actually processing them...
At some point will integrate this with EventResponder
Put in first pass at SerialX.end(),
Which should disable the Serial object, and I believe set the IO pins to be GPIO pins.
Also defined the extern void SerialEvent1() like functions in header in preperation for callbacks...
Fleshing out some of the missing pieces. - Need to test
copy NVIC execution priority from T3
Set priority per Serial object
RTS pin
CTS pin - only Serial3 supports
setRX, setTX - do nothing none of these have two pins defined.
Maybe temporary - but added from previous code ability to add second buffer for RX and TX
Used macros from OneWIre to fast set/clear the optional Transmitter Enable support.
Also fixed bug in ISR where was not properly looking for TC. This will help make SerialX->flush() to work