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.
#include "CCRTOS.h"<br />
void TaskN (void *pdata)<br />
{<br />
OS_TID tid;<br />
...<br />
tid = CoGetCurTaskID();<br />
printf("Current task ID is %d !\n",tid);<br />
...<br />
}<br />
Note:<br />
None<br />
6.2.5 CoSetPriority()<br />
Function Prototype:<br />
StatusType CoSetPriority<br />
Description:<br />
(<br />
);<br />
OS_TID<br />
U8<br />
taskID,<br />
priority<br />
Set the priority of the designated task and return the executing state of the<br />
function.<br />
Parameters:<br />
[in] task ID<br />
ID of the designated task<br />
[in] Priority<br />
Returns:<br />
The priority to which the task will be set<br />
E_INVALID_ID,<br />
E_OK,<br />
The task ID is invalid.<br />
Reset successfully.<br />
Example Usage:<br />
53