Skip to content

Power down IO Masters #133

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

Merged
merged 5 commits into from
Feb 27, 2020
Merged

Power down IO Masters #133

merged 5 commits into from
Feb 27, 2020

Conversation

nseidle
Copy link
Member

@nseidle nseidle commented Feb 26, 2020

This PR enables the user to easily turn off IO masters using SPI.end and Wire.end.

  • Adds deinitialize() to Wire.end. This is the same function used in SPI.end.
  • Change deinitialize to power down IO master, and only fire if handle is not NULL
  • Add example showing how to successfully power down, then back up with more peripheral support.
  • Update to HAL v2.4.1 on files apollo3.h, system_apollo3.h, and power control.

The changes are pretty minimal except for updating a few of the files to HAL 2.4.1. I needed it for power control but if it's too much, I can return to my original code that uses direct register writes (as Ambiq did in their earlier examples).

@oclyke
Copy link
Contributor

oclyke commented Feb 27, 2020

Great step toward easy low-power configuration! I don't mind the partial update to 2.4.1

@oclyke oclyke merged commit c0308f6 into master Feb 27, 2020
@nseidle nseidle deleted the powerDownIOMs branch April 12, 2020 03:11
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