Skip to content

Commit

Permalink
[Silabs] Adds refactored spi multiplexing with feature toggle for NCP…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 23, 2024
1 parent b6130cf commit e83677b
Show file tree
Hide file tree
Showing 7 changed files with 257 additions and 198 deletions.
14 changes: 7 additions & 7 deletions examples/platform/silabs/display/demo-ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "dmd/dmd.h"
#include "em_types.h"
#include "glib.h"
#if SL_WIFI && !SIWX_917
#include "spi_multiplex.h"
#endif // SL_WIFI && !SIWX_917
#include <stdio.h>
#include <string.h>
#if (defined(EFR32MG24) && defined(SL_WIFI))
#include "spi_multiplex.h"
#endif

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

sl_status_t updateDisplay(void)
{
#if (defined(EFR32MG24) && defined(SL_WIFI))
#if SL_LCDCTRL_MUX
sl_wfx_host_pre_lcd_spi_transfer();
#endif
#endif // SL_LCDCTRL_MUX
sl_status_t status = DMD_updateDisplay();
#if (defined(EFR32MG24) && defined(SL_WIFI))
#if SL_LCDCTRL_MUX
sl_wfx_host_post_lcd_spi_transfer();
#endif
#endif // SL_LCDCTRL_MUX
if (status != DMD_OK)
return SL_STATUS_FAIL;
return SL_STATUS_OK;
Expand Down
3 changes: 0 additions & 3 deletions examples/platform/silabs/display/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@

#include "sl_board_control.h"

#if (defined(EFR32MG24) && defined(SL_WIFI))
#include "spi_multiplex.h"
#endif
#define LCD_SIZE 128
#define QR_CODE_VERSION 4
#define QR_CODE_MODULE_SIZE 3
Expand Down
Loading

0 comments on commit e83677b

Please sign in to comment.