CooCox CoOS User's Guide
CooCox CoOS User's Guide
CooCox CoOS User's Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Example Usage:<br />
#include "CCRTOS.h"<br />
OS_TID TaskMId;<br />
OS_TID TaskNId;<br />
void TaskM (void *pdata)<br />
{<br />
...<br />
TickDelay (30);<br />
...<br />
}<br />
void TaskN (void *pdata)<br />
{<br />
StatusType result;<br />
...<br />
/* Reset TaskM delay time */<br />
result = ResetTaskDelayTick (TaskMId, 61);<br />
if(result!=E_OK)<br />
{<br />
if(result == E_INVALID_ID)<br />
{<br />
printf("Invalid task id !\n");<br />
}<br />
else if (result == E_NOT_IN_DELAY_LIST)<br />
{<br />
printf("TaskM is not in delay list !\n");<br />
}<br />
}<br />
...<br />
}<br />
Note:<br />
If the tick number is reset to 0, move the specified task out of the delay<br />
list.<br />
6.3.4 CoTimeDelay()<br />
Function Prototype:<br />
StatusType CoTimeDelay<br />
(<br />
U8<br />
U8<br />
U8<br />
U16<br />
);<br />
hour,<br />
minute,<br />
sec,<br />
millsec<br />
60