[beken-72xx] Fix SerialClass character reading

This commit is contained in:
Kuba Szczodrzyński
2022-07-31 14:52:09 +02:00
parent 9416e45a75
commit 7920ea2dda
3 changed files with 8 additions and 1 deletions

View File

@@ -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) {

View File

@@ -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

View File

@@ -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