-
-
- #include <Arduino.h>
- #include "HardwareSerial.h"
- #if defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41)
-
- #ifndef SERIAL8_TX_BUFFER_SIZE
- #define SERIAL8_TX_BUFFER_SIZE 40
- #endif
- #ifndef SERIAL8_RX_BUFFER_SIZE
- #define SERIAL8_RX_BUFFER_SIZE 64
- #endif
- #define IRQ_PRIORITY 64
-
- void IRQHandler_Serial8()
- {
- Serial8.IRQHandler();
- }
-
-
-
- static BUFTYPE tx_buffer8[SERIAL8_TX_BUFFER_SIZE];
- static BUFTYPE rx_buffer8[SERIAL8_RX_BUFFER_SIZE];
- uint8_t _serialEvent8_default __attribute__((weak)) PROGMEM = 0 ;
-
- static HardwareSerial::hardware_t UART5_Hardware = {
- 7, IRQ_LPUART5, &IRQHandler_Serial8,
- &serialEvent8, &_serialEvent8_default,
- CCM_CCGR3, CCM_CCGR3_LPUART5(CCM_CCGR_ON),
- {{34,1, &IOMUXC_LPUART5_RX_SELECT_INPUT, 1}, {48, 2, &IOMUXC_LPUART5_RX_SELECT_INPUT, 0}},
- {{35,1, &IOMUXC_LPUART5_TX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
-
- 50,
- 2,
- IRQ_PRIORITY, 38, 24,
- XBARA1_OUT_LPUART5_TRG_INPUT
- };
- HardwareSerial Serial8(&IMXRT_LPUART5, &UART5_Hardware, tx_buffer8, SERIAL8_TX_BUFFER_SIZE,
- rx_buffer8, SERIAL8_RX_BUFFER_SIZE);
- #endif
|