Skip to content

Commit 38eba1f

Browse files
restyle
1 parent f8a41c1 commit 38eba1f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ static sl_status_t wfx_rsi_do_join(void)
687687
case WFX_SEC_WPA3:
688688
ap.security = SL_WIFI_WPA3_TRANSITION;
689689
#else
690-
ap.security = SL_WIFI_WPA_WPA2_MIXED;
690+
ap.security = SL_WIFI_WPA_WPA2_MIXED;
691691
#endif // WIFI_ENABLE_SECURITY_WPA3_TRANSITION
692692
break;
693693
case WFX_SEC_NONE:

examples/platform/silabs/uart.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
#include "AppConfig.h"
1919
#include "matter_shell.h"
2020
#include <cmsis_os2.h>
21+
#include <lib/shell/Engine.h>
2122
#include <platform/CHIPDeviceLayer.h>
2223
#include <sl_cmsis_os2_common.h>
23-
#include <lib/shell/Engine.h>
2424

2525
#ifdef __cplusplus
2626
extern "C" {
@@ -35,11 +35,11 @@ extern "C" {
3535
#define MAX_DMA_BUFFER_SIZE (MAX_BUFFER_SIZE / 2)
3636

3737
#if SLI_SI91X_MCU_INTERFACE
38+
#include "USART.h"
3839
#include "rsi_board.h"
3940
#include "rsi_debug.h"
4041
#include "rsi_rom_egpio.h"
4142
#include "sl_si91x_usart.h"
42-
#include "USART.h"
4343
#else // For EFR32
4444
#include "em_core.h"
4545
#include "em_usart.h"
@@ -96,10 +96,10 @@ extern "C" {
9696
namespace {
9797
// In order to reduce the probability of data loss during the dmaFull callback handler we use
9898
// two duplicate receive buffers so we can always have one "active" receive queue.
99-
uint8_t sRxDmaBuffer[MAX_DMA_BUFFER_SIZE] = { 0 };
99+
uint8_t sRxDmaBuffer[MAX_DMA_BUFFER_SIZE] = { 0 };
100100
uint8_t sRxDmaBuffer2[MAX_DMA_BUFFER_SIZE] = { 0 };
101-
uint16_t lastCount = 0; // Nb of bytes already processed from the active dmaBuffer
102-
}
101+
uint16_t lastCount = 0; // Nb of bytes already processed from the active dmaBuffer
102+
} // namespace
103103

104104
#endif // SLI_SI91X_MCU_INTERFACE
105105

@@ -282,7 +282,7 @@ void uartConsoleInit(void)
282282

283283
sUartTxQueue = osMessageQueueNew(UART_MAX_QUEUE_SIZE, sizeof(UartTxStruct_t), &kUartTxQueueAttr);
284284
sUartTaskHandle = osThreadNew(uartMainLoop, nullptr, &kUartTaskAttr);
285-
285+
286286
// Init a fifo for the data received on the uart
287287
InitFifo(&sReceiveFifo, sRxFifoBuffer, MAX_BUFFER_SIZE);
288288

@@ -298,7 +298,6 @@ void uartConsoleInit(void)
298298
UARTDRV_Receive(vcom_handle, sRxDmaBuffer, MAX_DMA_BUFFER_SIZE, UART_rx_callback);
299299
UARTDRV_Receive(vcom_handle, sRxDmaBuffer2, MAX_DMA_BUFFER_SIZE, UART_rx_callback);
300300

301-
302301
// Enable USART0/EUSART0 interrupt to wake OT task when data arrives
303302
NVIC_ClearPendingIRQ(USART_IRQ);
304303
NVIC_EnableIRQ(USART_IRQ);
@@ -319,10 +318,11 @@ void uartConsoleInit(void)
319318
}
320319

321320
#if SLI_SI91X_MCU_INTERFACE
322-
void cache_uart_rx_data(char character) {
321+
void cache_uart_rx_data(char character)
322+
{
323323
if (RemainingSpace(&sReceiveFifo) >= 1)
324324
{
325-
WriteToFifo(&sReceiveFifo,(uint8_t *) &character, 1);
325+
WriteToFifo(&sReceiveFifo, (uint8_t *) &character, 1);
326326
}
327327
#ifdef ENABLE_CHIP_SHELL
328328
chip::NotifyShellProcess();
@@ -464,7 +464,7 @@ int16_t uartConsoleRead(char * Buf, uint16_t NbBytesToRead)
464464
#if SLI_SI91X_MCU_INTERFACE == 0
465465
if (NbBytesToRead > AvailableDataCount(&sReceiveFifo))
466466
{
467-
UARTDRV_Count_t count, remaining;
467+
UARTDRV_Count_t count, remaining;
468468
// Not enough data available in the fifo for the read size request
469469
// If there is data available in dma buffer, get it now.
470470
CORE_ATOMIC_SECTION(UARTDRV_GetReceiveStatus(vcom_handle, &data, &count, &remaining); if (count > lastCount) {
@@ -503,7 +503,7 @@ void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes)
503503
{
504504
#if SLI_SI91X_MCU_INTERFACE
505505
// ensuring null termination of buffer
506-
if( nbOfBytes != CHIP_SHELL_MAX_LINE_SIZE && buffer[nbOfBytes - 1] != '\0')
506+
if (nbOfBytes != CHIP_SHELL_MAX_LINE_SIZE && buffer[nbOfBytes - 1] != '\0')
507507
{
508508
buffer[nbOfBytes] = '\0';
509509
}

0 commit comments

Comments
 (0)