Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix silabs compile - #elif without a condition replaced with #else #29319

Merged
merged 5 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/platform/silabs/display/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ void SilabsLCD::SetScreen(Screen_e screen)
case StatusScreen:
WriteStatus();
break;
#ifdef QR_CODE_ENABLED
case QRCodeScreen:
WriteQRCode();
break;
#endif
default:
break;
}
Expand All @@ -224,7 +226,7 @@ void SilabsLCD::CycleScreens(void)
{
#ifdef QR_CODE_ENABLED
if (mCurrentScreen < QRCodeScreen)
#elif
#else
if (mCurrentScreen < StatusScreen)
#endif
{
Expand Down
6 changes: 5 additions & 1 deletion examples/platform/silabs/display/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class SilabsLCD
{
DemoScreen = 0,
StatusScreen,
#ifdef QR_CODE_ENABLED
QRCodeScreen,
#endif
InvalidScreen,
} Screen_e;

Expand Down Expand Up @@ -74,13 +76,15 @@ class SilabsLCD
bool protocol1 = false; /* data */
} DemoState_t;

void WriteQRCode();
void WriteDemoUI();
void WriteStatus();

#ifdef QR_CODE_ENABLED
void WriteQRCode();
void LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h);
char mQRCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1];
#endif

GLIB_Context_t glibContext;

#ifdef SL_DEMO_NAME
Expand Down