Open hannobraun opened 6 years ago
~There's a problem with LowPowerClock
: It starts with clock::state::Disabled
, but that may be wrong, as we can't know what happened before the HAL was initialized.~
~I'm not sure if that leads to any actual problems, but it's at the very least misleading. Maybe it would be best to add a third clock state, Unknown
, and start with that.~
Edit: This comment has been resolved in the meantime.
I've added support for additional low-power modes in #106.
Before trying to design anything that can be submitted to embedded-hal, at least #108, #109, and #110 should be resolved.
The current
Pmu
API only support switching to sleep mode. All other low-power modes should be supported as well.I think there's also some potential for embedded-hal here. I'd like to expore the possibility of creating a trait,
PowerMode
, and implementing this trait for each supported power mode.That trait could live in embedded-hal. The
sleep
module could be updated to depend onPowerMode
instead of depending onPmu
directly.