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.
The ID of the specified timer<br />
Returns:<br />
E_INVALID_ID, The timer ID passed is invalid.<br />
E_OK,<br />
Stop the specified timer successfully.<br />
Example Usage:<br />
#include "CCRTOS.h"<br />
OS_TCID sftmr;<br />
void TaskN (void *pdata)<br />
{<br />
StatusType sta;<br />
...<br />
/* Stop Software Timer */<br />
sta = CoStopTmr (sftmr);<br />
if (sta != E_OK)<br />
{<br />
if (sta == E_INVALID_ID)<br />
{<br />
printf("The timer id passed is invalid, failed to stop. \n");<br />
}<br />
}<br />
...<br />
}<br />
Note:<br />
When a software timer stops running, the system will retain its current<br />
counter value in order to re-activate it.<br />
6.4.4 CoDelTmr()<br />
Function Prototype:<br />
StatusType CoDelTmr<br />
(<br />
OS_TCID tmrID<br />
);<br />
Description:<br />
Delete a specified timer and release the resources it had occupied.<br />
Parameters:<br />
[IN] tmrID<br />
The ID of the specified timer<br />
Returns:<br />
E_INVALID_ID, The timer ID passed is invalid.<br />
E_OK,<br />
Delete the specified timer successfully.<br />
65