Skip to content

Commit 1013584

Browse files
rosahay-silabsbrosahay
authored andcommitted
[Silabs] Adds refactored spi multiplexing with feature toggle for NCP combinations (#29414)
* Adds DISPLAY_ENABLED macro for SPI multiplexed functions * Adds CONFIG_USE_EXTERNAL_FLASH macro for SPI multiplex functions * Added proper MACROs for the features that require multiplexing * temp commit with test file * Adds fix for crash on rs91x * Adds updated build commands * adds DEBUG logs * Adds bugfixes to MACROs * Adds additional logs * Adds fix to UART multiplexing * Remove comments * Adds ported changes * Adds use of SL_CATALOG_UARTDRV_USART_PRESENT, SL_CATALOG_UARTDRV_EUSART_PRESENT * Removes code since WF200 requires SL_CATALOG_UARTDRV_USART_PRESENT only * Restyler changes * Adds additional changes to wrap multiplexing with MACROs * Remove log commit * Adds dummy buffer length check * Restyler changes * Removes use of unnecessary MACRO * adds thread check * Adds comment * updated build script * Adds refactored includes and define macros * Adds spell fix * Adds feature macro for header include * Remove temp code * Adds refactored deassert * Comment reformatting --------- Co-authored-by: Rohan S <3526930+brosahay@users.noreply.github.com>
1 parent 295e3a4 commit 1013584

File tree

7 files changed

+257
-198
lines changed

7 files changed

+257
-198
lines changed

examples/platform/silabs/display/demo-ui.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
#include "dmd/dmd.h"
2424
#include "em_types.h"
2525
#include "glib.h"
26+
#if SL_WIFI && !SIWX_917
27+
#include "spi_multiplex.h"
28+
#endif // SL_WIFI && !SIWX_917
2629
#include <stdio.h>
2730
#include <string.h>
28-
#if (defined(EFR32MG24) && defined(SL_WIFI))
29-
#include "spi_multiplex.h"
30-
#endif
3131

3232
// Main Logo and App image
3333
#define SILICONLABS_X_POSITION ((glibContext.pDisplayGeometry->xSize - SILICONLABS_BITMAP_WIDTH) / 2)
@@ -102,13 +102,13 @@ void demoUIInit(GLIB_Context_t * context)
102102

103103
sl_status_t updateDisplay(void)
104104
{
105-
#if (defined(EFR32MG24) && defined(SL_WIFI))
105+
#if SL_LCDCTRL_MUX
106106
sl_wfx_host_pre_lcd_spi_transfer();
107-
#endif
107+
#endif // SL_LCDCTRL_MUX
108108
sl_status_t status = DMD_updateDisplay();
109-
#if (defined(EFR32MG24) && defined(SL_WIFI))
109+
#if SL_LCDCTRL_MUX
110110
sl_wfx_host_post_lcd_spi_transfer();
111-
#endif
111+
#endif // SL_LCDCTRL_MUX
112112
if (status != DMD_OK)
113113
return SL_STATUS_FAIL;
114114
return SL_STATUS_OK;

examples/platform/silabs/display/lcd.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535

3636
#include "sl_board_control.h"
3737

38-
#if (defined(EFR32MG24) && defined(SL_WIFI))
39-
#include "spi_multiplex.h"
40-
#endif
4138
#define LCD_SIZE 128
4239
#define QR_CODE_VERSION 4
4340
#define QR_CODE_MODULE_SIZE 3

0 commit comments

Comments
 (0)