It was not properly clearing the old state for the ADC_CFG_AVGS, but instead it was oring in the new value,
also T4-Analog fix calibration tests
Found by @mjs513 - At init time it was not looking at ADC2 to have completed calibration...
Remove T41b1 pins ifdef
The TX and RX values were reversed.
That is for example on Serial1 (LPUART6)
Before we had:
```
```
now we have
```
```
So for example trying to get WS2812Serial library to work was failing, to output anything.
Here is a first pass at trying to get the AVR emulation of Ports working like it did for T3.x.
Not 100% confident, but at least simple sketch is working.
Current naming is confusing since it differs between GTP1 and GTP2. The GTP2 version is compatible to the naming in the data sheet. So I suggest to adjust the naming for GPT1
As per the Teensyduino 1.48 release thread.
T3.x sketches could compile that had int mai() {} and not void() and setup():
So simply copied over setup.cpp from T3 folder of cores, and then changed setup.c to call main, which simply calls setup and loops calling loop/yield.
Added another endless loop after the call to main() to hang there if the users main returns.
Tested with simple sketch
```
#include <arduino.h>
int main (void) {
pinMode(13, OUTPUT);
for(;;) {
digitalWriteFast(13, HIGH);
delay(250);
digitalWriteFast(13, LOW);
delay(250);
}
}
```
tried it on T3.6 verified before compile failed and now works. Also compiled and run a normal app to just make sure it was not totally busted
I suggest to explicitely delcare a (say) IMXRT_TMR_CH_t struct which collects the registers for a TMR channel instead of implicitely defining this struct in the declaration of IMXRT_TMR_t.
This would allow for an easier definition of user classes modelling a TMR channel.
Not a big deal, could also do that mayself the class code but it would be more convenient if this would be done in imxrt.h