From 2293380d391e9f5c2ccecb299e62085bfbd2de17 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:34:18 -0400 Subject: [PATCH] silabs minor fixes (#33121) --- examples/platform/silabs/efr32/rs911x/hal/efx_spi.c | 2 +- examples/platform/silabs/efr32/uart.cpp | 2 +- examples/platform/silabs/matter_shell.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c index daed27f9398a93..7a3dcc08942d46 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c +++ b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c @@ -374,7 +374,7 @@ int16_t rsi_spi_transfer(uint8_t * tx_buf, uint8_t * rx_buf, uint16_t xlen, uint } (void) mode; // currently not used; - error_t rsiError = RSI_ERROR_NONE; + int16_t rsiError = RSI_ERROR_NONE; xSemaphoreTake(spiTransferLock, portMAX_DELAY); diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index 9a626e10a2159d..5feaaa66d86923 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -301,7 +301,7 @@ void USART_IRQHandler(void) { #ifdef ENABLE_CHIP_SHELL chip::NotifyShellProcess(); -#elif !defined(PW_RPC_ENABLED) +#elif !defined(PW_RPC_ENABLED) && !defined(SL_WIFI) otSysEventSignalPending(); #endif diff --git a/examples/platform/silabs/matter_shell.cpp b/examples/platform/silabs/matter_shell.cpp index a6a8c9f6d6e1ae..3e70764a08a1d5 100644 --- a/examples/platform/silabs/matter_shell.cpp +++ b/examples/platform/silabs/matter_shell.cpp @@ -83,13 +83,13 @@ CHIP_ERROR CmdSilabsDispatch(int argc, char ** argv) size_t arg_len = strlen(argv[i]); /* Make sure that the next argument won't overflow the buffer */ - VerifyOrExit(buff_ptr + arg_len < buff + kMaxLineLength, error = CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrExit(buff_ptr + arg_len < buff + SL_CLI_INPUT_BUFFER_SIZE, error = CHIP_ERROR_BUFFER_TOO_SMALL); strncpy(buff_ptr, argv[i], arg_len); buff_ptr += arg_len; /* Make sure that there is enough buffer for a space char */ - if (buff_ptr + sizeof(char) < buff + kMaxLineLength) + if (buff_ptr + sizeof(char) < buff + SL_CLI_INPUT_BUFFER_SIZE) { strncpy(buff_ptr, " ", sizeof(char)); buff_ptr++;