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_TCID sftmr;<br />
void TaskN (void *pdata)<br />
{<br />
StatusType result;<br />
...<br />
/* Create Software Timer */<br />
sftmr = CoCreateTmr(TMR_TYPE_PERIODIC,<br />
100,<br />
100,<br />
SftTmrCallBack);<br />
...<br />
/* Delete Software Timer */<br />
result= CoDelTmr (sftmr);<br />
if (result != E_OK)<br />
{<br />
if (result== E_INVALID_ID)<br />
{<br />
printf("The timer id passed is invalid, filed to delete!\n");<br />
}<br />
}<br />
...<br />
}<br />
Note:<br />
None<br />
6.4.5 CoGetCurTmrCnt()<br />
Function Prototype:<br />
U32 CoGetCurTmrCnt<br />
Description:<br />
(<br />
);<br />
OS_TCID<br />
StatusType*<br />
tmrID,<br />
perr<br />
Obtain the current counter of a specified software timer.<br />
Parameters:<br />
[IN] tmrID<br />
The ID of the specified timer<br />
[OUT] Perr<br />
The types of the error returned<br />
E_INVALID_ID,<br />
The timer ID passed is invalid.<br />
66