-
-
- #include <Arduino.h>
- #include "HardwareSerial.h"
-
- #ifndef SERIAL3_TX_BUFFER_SIZE
- #define SERIAL3_TX_BUFFER_SIZE 40
- #endif
- #ifndef SERIAL3_RX_BUFFER_SIZE
- #define SERIAL3_RX_BUFFER_SIZE 64
- #endif
- #define IRQ_PRIORITY 64
-
- void IRQHandler_Serial3()
- {
- Serial3.IRQHandler();
- }
-
-
- static BUFTYPE tx_buffer3[SERIAL3_TX_BUFFER_SIZE];
- static BUFTYPE rx_buffer3[SERIAL3_RX_BUFFER_SIZE];
- uint8_t _serialEvent3_default __attribute__((weak)) PROGMEM = 0 ;
-
- static HardwareSerial::hardware_t UART2_Hardware = {
- 2, IRQ_LPUART2, &IRQHandler_Serial3,
- &serialEvent3, &_serialEvent3_default,
- CCM_CCGR0, CCM_CCGR0_LPUART2(CCM_CCGR_ON),
- {{15,2, &IOMUXC_LPUART2_RX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
- {{14,2, &IOMUXC_LPUART2_TX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}},
- 19,
- 2,
- IRQ_PRIORITY, 38, 24,
- XBARA1_OUT_LPUART2_TRG_INPUT
- };
- HardwareSerial Serial3(&IMXRT_LPUART2, &UART2_Hardware,tx_buffer3, SERIAL3_TX_BUFFER_SIZE,
- rx_buffer3, SERIAL3_RX_BUFFER_SIZE);
-
|