diff --git a/arduino/beken-72xx/cores/arduino/SerialClass.cpp b/arduino/beken-72xx/cores/arduino/SerialClass.cpp index b3dc584..121b2c0 100644 --- a/arduino/beken-72xx/cores/arduino/SerialClass.cpp +++ b/arduino/beken-72xx/cores/arduino/SerialClass.cpp @@ -26,7 +26,10 @@ SerialClass::SerialClass(uint8_t port) { static void callback(int port, void *param) { RingBuffer *buf = (RingBuffer *)param; - buf->store_char(uart_read_byte(port)); + int ch; + while ((ch = uart_read_byte(port)) != -1) { + buf->store_char(ch); + } } void SerialClass::begin(unsigned long baudrate, uint16_t config) { diff --git a/platform/beken-7231n/config/sys_config.h b/platform/beken-7231n/config/sys_config.h index 80a97a5..71df47e 100644 --- a/platform/beken-7231n/config/sys_config.h +++ b/platform/beken-7231n/config/sys_config.h @@ -129,4 +129,6 @@ #define THD_UMP3_PRIORITY 4 #define THD_WPAS_PRIORITY 5 #define THDD_KEY_SCAN_PRIORITY 7 +#define UART1_USE_FIFO_REC 0 +#define UART2_USE_FIFO_REC 0 #define WIFI_DEFAULT_BLE_REQUEST 1 diff --git a/platform/beken-7231t/config/sys_config.h b/platform/beken-7231t/config/sys_config.h index 2d382f2..b114e5d 100644 --- a/platform/beken-7231t/config/sys_config.h +++ b/platform/beken-7231t/config/sys_config.h @@ -113,4 +113,6 @@ #define THD_UMP3_PRIORITY 4 #define THD_WPAS_PRIORITY 5 #define THDD_KEY_SCAN_PRIORITY 7 +#define UART1_USE_FIFO_REC 0 +#define UART2_USE_FIFO_REC 0 #define WIFI_DEFAULT_BLE_REQUEST 1