syswatch_config.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * File : syswatch.h
  3. *
  4. * Change Logs:
  5. * Date Author Notes
  6. * 2020-01-10 qiyongzhong first version
  7. */
  8. #ifndef __SYSWATCH_CONFIG_H__
  9. #define __SYSWATCH_CONFIG_H__
  10. #include <rtconfig.h>
  11. #define PKG_USING_SYSWATCH
  12. //#define SYSWATCH_USING_TEST
  13. #ifdef PKG_USING_SYSWATCH
  14. #define SYSWATCH_USING
  15. /* thread exception resolve mode:
  16. * 0--system reset
  17. * 1--kill exception thread
  18. * 2--resume exception thread
  19. */
  20. #ifndef SYSWATCH_EXCEPT_RESOLVE_MODE
  21. #define SYSWATCH_EXCEPT_RESOLVE_MODE 2
  22. #endif
  23. #ifndef SYSWATCH_EXCEPT_TIMEOUT
  24. #define SYSWATCH_EXCEPT_TIMEOUT 2//thread exception blocking timeout, unit : s
  25. #endif
  26. #ifndef SYSWATCH_EXCEPT_CONFIRM_TMO
  27. #define SYSWATCH_EXCEPT_CONFIRM_TMO 2//exception thread confirm timeout, unit : s
  28. #endif
  29. #ifndef SYSWATCH_EXCEPT_RESUME_DLY
  30. #define SYSWATCH_EXCEPT_RESUME_DLY 1//exception thread resume delay, unit : s
  31. #endif
  32. #ifndef SYSWATCH_THREAD_PRIO
  33. #define SYSWATCH_THREAD_PRIO 0//the highest priority allowed in your system
  34. #endif
  35. #ifndef SYSWATCH_THREAD_STK_SIZE
  36. #define SYSWATCH_THREAD_STK_SIZE 512//stack size of system watcher
  37. #endif
  38. #ifndef SYSWATCH_THREAD_NAME
  39. #define SYSWATCH_THREAD_NAME "syswatch"//thread name of system watcher
  40. #endif
  41. #ifndef SYSWATCH_WDT_NAME
  42. #define SYSWATCH_WDT_NAME "wdt"//name of watchdog device used
  43. #endif
  44. #ifndef SYSWATCH_WDT_TIMEOUT
  45. #define SYSWATCH_WDT_TIMEOUT 2//timeout of watchdog device used
  46. #endif
  47. #endif //PKG_USING_SYSWATCH
  48. #endif //__SYSWATCH_CONFIG_H__