tmos.h 989 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * tmos.h
  3. *
  4. * Created on: Feb 29, 2024
  5. * Author: Administrator
  6. */
  7. #ifndef APP_INCLUDE_TMOS_H_
  8. #define APP_INCLUDE_TMOS_H_
  9. #include "typedef.h"
  10. #define INVALID_TASK_ID 0xFF // Task ID isn't setup properly
  11. #define TASK_NO_TASK 0xFF
  12. typedef unsigned char tmosTaskID;
  13. typedef unsigned short tmosEvents;
  14. typedef unsigned long tmosTimer;
  15. typedef unsigned char bStatus_t;
  16. typedef tmosEvents(*pTaskEventHandlerFn)( tmosTaskID taskID, tmosEvents event );
  17. extern bStatus_t tmos_init();
  18. extern bStatus_t tmos_set_event( tmosTaskID taskID, tmosEvents event );
  19. extern bStatus_t tmos_start_task( tmosTaskID taskID, tmosEvents event, tmosTimer time );
  20. extern bStatus_t tmos_stop_task( tmosTaskID taskID, tmosEvents event );
  21. extern void TMOS_SystemProcess( void );
  22. extern tmosTaskID TMOS_ProcessEventRegister( pTaskEventHandlerFn eventCb );
  23. #endif /* APP_INCLUDE_TMOS_H_ */