Skip to content

Commit

Permalink
Added check for board control before including header/function calls (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
CuRahman authored and pull[bot] committed Apr 17, 2024
1 parent 24c2484 commit 4202675
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/platform/silabs/efr32/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ extern "C" {
#include "assert.h"
#include "em_core.h"
#include "em_usart.h"
#ifdef SL_BOARD_NAME
#include "sl_board_control.h"
#endif
#include "sl_uartdrv_instances.h"
#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT
#include "sl_uartdrv_eusart_vcom_config.h"
Expand Down Expand Up @@ -252,7 +254,9 @@ void uartConsoleInit(void)
return;
}

#ifdef SL_BOARD_NAME
sl_board_enable_vcom();
#endif
// Init a fifo for the data received on the uart
InitFifo(&sReceiveFifo, sRxFifoBuffer, MAX_BUFFER_SIZE);

Expand Down
1 change: 1 addition & 0 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ template("efr32_sdk") {
"PLAT=EMBER_PLATFORM_CORTEXM3",
"${silabs_mcu}=1",
"${silabs_board}=1",
"SL_BOARD_NAME=${silabs_board}",
"SL_SUPRESS_DEPRECATION_WARNINGS_SDK_3_1",
"__HEAP_SIZE=0",
"SL_CATALOG_FREERTOS_KERNEL_PRESENT=1",
Expand Down

0 comments on commit 4202675

Please sign in to comment.