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
"noinline, noclone" has the opposite effect of beeing faster now on T4
Maye it would be best to use an empty define ? Then we can remove the section in the linker-file, too.
#define FASTRUN
QA quick and dirty import of the AVR emulation stuff for SPI registers.
So far none of SPCR is implemented
in SPSR only getting status of SPIF is setup
SPDR reads and writes to LPSPI4...
So, it allows for some simple SPI write functions and wait for the write to complete and read the result.
WIth this Adafruit_ILI9341 graphic test runs
I created a structure IMXRT_LPSPI_t
like what was done for UARTS.
I hopefully got all of the unused fields in properly to get the registers on the correct addresses.
Note: I did not update the other #define LPSPIn_ values but left them, likewise, I create a new define for each of the addresses.
That way we can double check I have everything properly aligned
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