-
-
- #include <Arduino.h>
- #include "HardwareSerial.h"
-
- #ifndef SERIAL4_TX_BUFFER_SIZE
- #define SERIAL4_TX_BUFFER_SIZE 40
- #endif
- #ifndef SERIAL4_RX_BUFFER_SIZE
- #define SERIAL4_RX_BUFFER_SIZE 64
- #endif
- #define IRQ_PRIORITY 64
-
-
- void IRQHandler_Serial4()
- {
- Serial4.IRQHandler();
- }
-
-
- static BUFTYPE tx_buffer4[SERIAL4_TX_BUFFER_SIZE];
- static BUFTYPE rx_buffer4[SERIAL4_RX_BUFFER_SIZE];
- uint8_t _serialEvent4_default __attribute__((weak)) PROGMEM = 0 ;
-
- static HardwareSerial::hardware_t UART3_Hardware = {
- 3, IRQ_LPUART3, &IRQHandler_Serial4,
- &serialEvent4, &_serialEvent4_default,
- CCM_CCGR0, CCM_CCGR0_LPUART3(CCM_CCGR_ON),
- {{16,2, &IOMUXC_LPUART3_RX_SELECT_INPUT, 0}, {0xff, 0xff, nullptr, 0}},
- {{17,2, &IOMUXC_LPUART3_TX_SELECT_INPUT, 0}, {0xff, 0xff, nullptr, 0}},
- 0xff,
- 0,
- IRQ_PRIORITY, 38, 24,
- XBARA1_OUT_LPUART3_TRG_INPUT
- };
- HardwareSerial Serial4(&IMXRT_LPUART3, &UART3_Hardware, tx_buffer4, SERIAL4_TX_BUFFER_SIZE,
- rx_buffer4, SERIAL4_RX_BUFFER_SIZE);
|