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

apps/auracast: Make the code compile on native target #1783

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

MariuszSkamra
Copy link
Contributor

This fixes auracast native build by disabling GPIO button functionality.

Copy link
Contributor

@sjanc sjanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make this button as as opt-in

@andrzej-kaczmarek
Copy link
Contributor

there's already hal_gpio for native so you can just add missing APIs there

@MariuszSkamra
Copy link
Contributor Author

As discussed with @andrzej-kaczmarek offline, the button pin number is configurable via syscfg. If valid (> 0), the broadcaster functionality is enabled; disabled otherwise.

@MariuszSkamra MariuszSkamra requested a review from sjanc May 23, 2024 13:01
@@ -60,12 +63,12 @@ static uint16_t bis_handles[MYNEWT_VAL(BROADCASTER_CHAN_NUM)];
static struct os_callout audio_broadcast_callout;

static int audio_data_offset;
static uint8_t auracast_adv_instance;

#if STOP_ON_BUTTON_PRESS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be
#if MYNEWT_VAL(BROADCASTER_STOP_BUTTON) >= 0

so no need for extra wrap macro (this is how we typically do this in codebase)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MariuszSkamra could you help with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

description: >
Button number for Broadcast Stop action.
Negative value if disabled.
value: 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be BUTTON_3 ? otherwise looks ok to me

This fixes auracast native build by disabling GPIO button functionality.
@szymon-czapracki
Copy link
Contributor

@sjanc PING

@rymanluk
Copy link
Contributor

rymanluk commented Sep 2, 2024

@sjanc

Copy link
Contributor

@rymanluk rymanluk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sjanc sjanc merged commit 05cef9b into apache:master Sep 2, 2024
18 checks passed
@MariuszSkamra MariuszSkamra deleted the auracast_on_native branch September 2, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Small PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants