02.01.2015 Views

CooCox CoOS User's Guide

CooCox CoOS User's Guide

CooCox CoOS User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Description:<br />

Set an event to the non-ready state.<br />

Parameters:<br />

[in] id<br />

The ID of a specified event flag<br />

Returns:<br />

E_INVALID_ID, The incoming flag ID is invalid.<br />

E_OK,<br />

Clear successfully.<br />

Example usage:<br />

#include "CCRTOS.h"<br />

OS_FlagID flag;<br />

void TaskN (void *pdata)<br />

{<br />

StatusType result;<br />

...<br />

result = CoClearFlag (flag);<br />

if (result != E_OK)<br />

{<br />

if (result == E_INVALID_ID)<br />

{<br />

printf("Invalid flag ID !\n");<br />

}<br />

}<br />

...<br />

}<br />

Note:<br />

This function usually acts on the flag which is reset manually.<br />

6.10.8 CoSetFlag()<br />

Function Prototype:<br />

StatusType CoSetFlag(<br />

OS_FlagID<br />

);<br />

Description:<br />

Set an event to the ready state.<br />

Parameters:<br />

[in] id<br />

The ID of a specified flag<br />

id<br />

116

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!