WS_UART.h 713 B

1234567891011121314151617181920
  1. #ifndef _WS_UART_H_
  2. #define _WS_UART_H_
  3. #include <HardwareSerial.h> // Reference the ESP32 built-in serial port library
  4. #define TXD2 43 //The TXD of UART1 corresponds to GPIO
  5. #define RXD2 44 //The RXD of UART1 corresponds to GPIO
  6. #define TXD3 15 //The TXD of UART1 corresponds to GPIO
  7. #define RXD3 16 //The RXD of UART1 corresponds to GPIO
  8. void SetData2(uint8_t* data, size_t length); // Send data from the Port 0
  9. void SetData3(uint8_t* data, size_t length); // Send data from the Port 2
  10. void Extension_Init(); // Example Initialize the system serial port
  11. void Extension_Loop(); // Read serial data and print
  12. #endif