From 3269465497df59c40b23e5678ce93b5a781c6a7a Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Mon, 3 Apr 2023 10:29:00 -0400 Subject: [PATCH] fix pigweed (#25929) --- 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;