syswatch.h 778 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * File : syswatch.h
  3. *
  4. * Change Logs:
  5. * Date Author Notes
  6. * 2020-01-10 qiyongzhong first version
  7. */
  8. #ifndef __SYSWATCH_H__
  9. #define __SYSWATCH_H__
  10. #include <syswatch_config.h>
  11. #ifdef SYSWATCH_USING
  12. typedef enum{
  13. SYSWATCH_EVENT_SYSTEM_RESET = 0, //系统复位事件,事件前回调
  14. SYSWATCH_EVENT_THREAD_KILL, //杀掉线程事件,事件前回调
  15. SYSWATCH_EVENT_THREAD_RESUMED, //恢复线程事件,事件后回调
  16. }syswatch_event_t;
  17. typedef void ( * syswatch_event_hook_t)(syswatch_event_t eid, rt_thread_t except_thread);
  18. void syswatch_set_event_hook(syswatch_event_hook_t hook);//set syswatch event callback function
  19. int syswatch_init(void);//Initialize syswatch components
  20. #endif //SYSWATCH_USING
  21. #endif //__SYSWATCH_H__