monitor.h 720 B

12345678910111213141516171819202122232425262728293031
  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 struct {
  12. int gpio;
  13. int active;
  14. } monitor_gpio_t;
  15. extern void (*pseudo_idle_svc)(uint32_t now);
  16. extern void (*jack_handler_svc)(bool inserted);
  17. extern bool jack_inserted_svc(void);
  18. extern void (*spkfault_handler_svc)(bool inserted);
  19. extern bool spkfault_svc(void);
  20. extern void (*battery_handler_svc)(float value, int cells);
  21. extern float battery_value_svc(void);
  22. extern uint16_t battery_level_svc(void);
  23. extern monitor_gpio_t * get_spkfault_gpio();
  24. extern monitor_gpio_t * get_jack_insertion_gpio();