/* * tmos.h * * Created on: Feb 29, 2024 * Author: Administrator */ #ifndef APP_INCLUDE_TMOS_H_ #define APP_INCLUDE_TMOS_H_ #include "typedef.h" #define INVALID_TASK_ID 0xFF // Task ID isn't setup properly #define TASK_NO_TASK 0xFF typedef unsigned char tmosTaskID; typedef unsigned short tmosEvents; typedef unsigned long tmosTimer; typedef unsigned char bStatus_t; typedef tmosEvents(*pTaskEventHandlerFn)( tmosTaskID taskID, tmosEvents event ); extern bStatus_t tmos_init(); extern bStatus_t tmos_set_event( tmosTaskID taskID, tmosEvents event ); extern bStatus_t tmos_start_task( tmosTaskID taskID, tmosEvents event, tmosTimer time ); extern bStatus_t tmos_stop_task( tmosTaskID taskID, tmosEvents event ); extern void TMOS_SystemProcess( void ); extern tmosTaskID TMOS_ProcessEventRegister( pTaskEventHandlerFn eventCb ); #endif /* APP_INCLUDE_TMOS_H_ */