-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[K32W] Add functionality to run lock-app and lighting-app without OM15082 Expansion board #6813
[K32W] Add functionality to run lock-app and lighting-app without OM15082 Expansion board #6813
Conversation
OM15082 Expansion board LED D2 and LED D3 functionality are redirected to LED DS2 and LED DS3 on the DK6 board if OM15082 is not attached. Also the factory reset action can be done by long pressing the USERINTERFACE button on DK6 board. If the OM15082 Expansion Board is attached to the DK6 board, then chip_with_OM15082 should be set to 1 in the gn build instruction. By default chip_with_OM15082 is zero. Signed-off-by: PetruSicoe <[email protected]>
@@ -241,6 +241,12 @@ void AppTask::ButtonEventHandler(uint8_t pin_no, uint8_t button_action) | |||
else if (pin_no == BLE_BUTTON) | |||
{ | |||
button_event.Handler = BleHandler; | |||
#if !(defined OM15082) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this not be using defined(OM15082)
instead of (defined OM15082)
? I find the bracketing a bit odd ... gcc defined
docs seem to only describe the brackets after the keyword.
Is this a style that is valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested it and it does work ... but feels unusual. Are there docs on why it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @andy31415, that syntax is basically the one described from GCC standard defined OM15082
wrapped around parenthesis. Check out the reference link under examples and also the godbolt that I've baked.
OM15082 Expansion board
LED D2 and LED D3 functionality are redirected to LED DS2 and LED DS3
on the DK6 board if OM15082 is not attached.
Also the factory reset action can be done by long pressing the
USERINTERFACE button on DK6 board.
If the OM15082 Expansion Board is attached to the DK6 board, then
chip_with_OM15082 should be set to 1 in the gn build instruction.
By default chip_with_OM15082 is zero.
Signed-off-by: PetruSicoe [email protected]