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

Made weak reference to shutdown BT stack, to avoid linking it if not needed #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chipguyhere
Copy link
Contributor

I noticed that when I use the POWER class to shut down the M5Stack Core device, my flash requirements grew by over 600KB.

I discovered that this was because there's a call to shutdown the BT stack as part of the process that brings current consumption to a minimum. But I'm not using the BT stack, so shutting it down is not necessary, and having it present in my binary is counterproductive.

This change makes the call to shutdown the BT stack into a weak reference, so it only gets called if the BT stack is already linked, but without linking it if it's not otherwise being used.

@Tinyu-Zhao Tinyu-Zhao force-pushed the master branch 2 times, most recently from 123e101 to 2feddca Compare June 20, 2024 09:53
@Tinyu-Zhao
Copy link
Collaborator

I would like to ask if you use platformIO to determine the flash occupied when building the project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants