Skip to content

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