services.h 498 B

1234567891011121314151617
  1. /*
  2. * Squeezelite for esp32
  3. *
  4. * (c) Philippe G. 2019, philippe_44@outlook.com
  5. *
  6. * This software is released under the MIT License.
  7. * https://opensource.org/licenses/MIT
  8. *
  9. */
  10. #pragma once
  11. typedef enum { SLEEP_ONTIMER, SLEEP_ONKEY, SLEEP_ONGPIO, SLEEP_ONIR, SLEEP_ONBATTERY } sleep_cause_e;
  12. void services_sleep_activate(sleep_cause_e cause);
  13. void services_sleep_setsuspend(void (*hook)(void));
  14. void services_sleep_setsleeper(uint32_t (*sleeper)(void));
  15. void services_sleep_init(void);