Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
615 B

  1. /*
  2. SYSTEM MODULE
  3. Copyright (C) 2019 by Xose Pérez <xose dot perez at gmail dot com>
  4. */
  5. #pragma once
  6. #include <Ticker.h>
  7. #include <Schedule.h>
  8. #include <cstdint>
  9. extern "C" {
  10. #include "user_interface.h"
  11. extern struct rst_info resetInfo;
  12. }
  13. uint32_t systemResetReason();
  14. uint8_t systemStabilityCounter();
  15. void systemStabilityCounter(uint8_t count);
  16. void systemCheck(bool stable);
  17. bool systemCheck();
  18. uint32_t systemResetReason();
  19. unsigned char customResetReason();
  20. void customResetReason(unsigned char reason);
  21. void deferredReset(unsigned long delay, unsigned char reason);
  22. bool checkNeedsReset();