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

[K32W] Add functionality to run lock-app and lighting-app without OM15082 Expansion board #6813

Merged
merged 4 commits into from
May 14, 2021

Conversation

PetruSicoe
Copy link
Contributor

@PetruSicoe PetruSicoe commented May 14, 2021

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]

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]>
@PetruSicoe PetruSicoe changed the title [K32W] Add functionality to run lock-app and lighting-app without [K32W] Add functionality to run lock-app and lighting-app without OM15082 Expansion board May 14, 2021
@woody-apple
Copy link
Contributor

@@ -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)
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link

@Ursescu Ursescu May 21, 2021

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.

@andy31415 andy31415 merged commit ea872b9 into project-chip:master May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants