Mostly the same as T4, except a few different alternate Uart pins, plus Serial8 was added.main_ledos
#elif defined(__IMXRT1062__) | #elif defined(__IMXRT1062__) | ||||
case 1: // Serial1 | case 1: // Serial1 | ||||
#if defined(ARDUINO_TEENSY41) | |||||
case 53: | |||||
#endif | |||||
uart = &IMXRT_LPUART6; | uart = &IMXRT_LPUART6; | ||||
CCM_CCGR3 |= CCM_CCGR3_LPUART6(CCM_CCGR_ON); | CCM_CCGR3 |= CCM_CCGR3_LPUART6(CCM_CCGR_ON); | ||||
hwtrigger = DMAMUX_SOURCE_LPUART6_TX; | hwtrigger = DMAMUX_SOURCE_LPUART6_TX; | ||||
hwtrigger = DMAMUX_SOURCE_LPUART3_TX; | hwtrigger = DMAMUX_SOURCE_LPUART3_TX; | ||||
break; | break; | ||||
case 20: // Serial5 | case 20: // Serial5 | ||||
#if defined(ARDUINO_TEENSY40) | |||||
case 39: // Serial5 alt | case 39: // Serial5 alt | ||||
#elif defined(ARDUINO_TEENSY41) | |||||
case 47: | |||||
#endif | |||||
uart = &IMXRT_LPUART8; | uart = &IMXRT_LPUART8; | ||||
CCM_CCGR6 |= CCM_CCGR6_LPUART8(CCM_CCGR_ON); | CCM_CCGR6 |= CCM_CCGR6_LPUART8(CCM_CCGR_ON); | ||||
hwtrigger = DMAMUX_SOURCE_LPUART8_TX; | hwtrigger = DMAMUX_SOURCE_LPUART8_TX; | ||||
CCM_CCGR5 |= CCM_CCGR5_LPUART7(CCM_CCGR_ON); | CCM_CCGR5 |= CCM_CCGR5_LPUART7(CCM_CCGR_ON); | ||||
hwtrigger = DMAMUX_SOURCE_LPUART7_TX; | hwtrigger = DMAMUX_SOURCE_LPUART7_TX; | ||||
break; | break; | ||||
#if defined(ARDUINO_TEENSY41) | |||||
case 35: | |||||
uart = &IMXRT_LPUART5; | |||||
CCM_CCGR3 |= CCM_CCGR3_LPUART5(CCM_CCGR_ON); | |||||
hwtrigger = DMAMUX_SOURCE_LPUART5_TX; | |||||
break; | |||||
#endif | |||||
#endif | #endif | ||||
default: | default: | ||||
return false; // pin not supported | return false; // pin not supported |
// Teensy 3.5: 1, 5, 8, 10, 26, 32, 33, 48 | // Teensy 3.5: 1, 5, 8, 10, 26, 32, 33, 48 | ||||
// Teensy 3.6: 1, 5, 8, 10, 26, 32, 33 | // Teensy 3.6: 1, 5, 8, 10, 26, 32, 33 | ||||
// Teensy 4.0: 1, 8, 14, 17, 20, 24, 29, 39 | // Teensy 4.0: 1, 8, 14, 17, 20, 24, 29, 39 | ||||
// Teensy 4.1: 1, 8, 14, 17, 20, 24, 29, 35, 47, 53 | |||||
byte drawingMemory[numled*3]; // 3 bytes per LED | byte drawingMemory[numled*3]; // 3 bytes per LED | ||||
DMAMEM byte displayMemory[numled*12]; // 12 bytes per LED | DMAMEM byte displayMemory[numled*12]; // 12 bytes per LED |
// Teensy 3.5: 1, 5, 8, 10, 26, 32, 33, 48 | // Teensy 3.5: 1, 5, 8, 10, 26, 32, 33, 48 | ||||
// Teensy 3.6: 1, 5, 8, 10, 26, 32, 33 | // Teensy 3.6: 1, 5, 8, 10, 26, 32, 33 | ||||
// Teensy 4.0: 1, 8, 14, 17, 20, 24, 29, 39 | // Teensy 4.0: 1, 8, 14, 17, 20, 24, 29, 39 | ||||
// Teensy 4.1: 1, 8, 14, 17, 20, 24, 29, 35, 47, 53 | |||||
byte drawingMemory[numled*4]; // 4 bytes per LED for RGBW | byte drawingMemory[numled*4]; // 4 bytes per LED for RGBW | ||||
DMAMEM byte displayMemory[numled*16]; // 16 bytes per LED for RGBW | DMAMEM byte displayMemory[numled*16]; // 16 bytes per LED for RGBW |
// Teensy 3.5: 1, 5, 8, 10, 26, 32, 33, 48 | // Teensy 3.5: 1, 5, 8, 10, 26, 32, 33, 48 | ||||
// Teensy 3.6: 1, 5, 8, 10, 26, 32, 33 | // Teensy 3.6: 1, 5, 8, 10, 26, 32, 33 | ||||
// Teensy 4.0: 1, 8, 14, 17, 20, 24, 29, 39 | // Teensy 4.0: 1, 8, 14, 17, 20, 24, 29, 39 | ||||
// Teensy 4.1: 1, 8, 14, 17, 20, 24, 29, 35, 47, 53 | |||||
#define DATA_PIN 1 | #define DATA_PIN 1 | ||||
// Define the array of leds | // Define the array of leds |