From 72303a0d67cdf1a73689a1b67e3e7ae5267549e6 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven Date: Fri, 31 Mar 2023 15:57:34 -0400 Subject: [PATCH] fix pigweed --- examples/platform/silabs/efr32/uart.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index c9535b40fb82f9..8fab5f11fe4b00 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -108,7 +108,6 @@ static uint16_t lastCount; // Nb of bytes already processed from the active dmaB #endif #define UART_TASK_SIZE 256 #define UART_TASK_NAME "UART" -#define UART_TX_COMPLETE_BIT (1 << 0) #ifdef CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE #define UART_TX_MAX_BUF_LEN (CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE + 2) // \r\n @@ -352,6 +351,12 @@ int16_t uartConsoleWrite(const char * Buf, uint16_t BufLength) return UART_CONSOLE_ERR; } +#ifdef PW_RPC_ENABLED + // Pigweed Logger is already thread safe. + UARTDRV_ForceTransmit(vcom_handle, (uint8_t *) Buf, BufLength); + return BufLength; +#endif + UartTxStruct_t workBuffer; memcpy(workBuffer.data, Buf, BufLength); workBuffer.length = BufLength;