arduino-libraries / ArduinoLowPower

Powersave features for SAMD boards
GNU Lesser General Public License v2.1
80 stars 57 forks source link

detachInterruptWakeup function #59

Closed fxf06 closed 1 year ago

fxf06 commented 1 year ago

Hello,

I'm working on a project that will wait for bursts of ticks on a pin, and I'd like to make my arduino sleeping while nothing happens. Therefore, I'd like to:

  1. be awaken on 1st tick
  2. use interrupts to count other ticks
  3. go to sleep after the burst

As this happens to be on the same pin, I need to "detach" the wake up (and reattach after burst completion). I looked at the code, and I'm not sure of what to do (like unsetting the configuration)

Or is it not necessary, since there is no impact in being asked to be awaken while already awake, and use the existing callback?

Actually, I already have the code the normal behavior, wondering how to achieve low-power.

per1234 commented 1 year ago

Hi @fxf06. Thanks for your interest in this open source project. This issue tracker is only to be used to report bugs or feature requests specific to the project. This topic is more appropriate for the Arduino Forum. I'm sure we will be able to help you out over there:

https://forum.arduino.cc/