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.

Returns:<br />

E_INVALID_PARAMETER,<br />

E_OK,<br />

Example usage:<br />

The parameter is invalid.<br />

Convert successfully.<br />

#include "CCRTOS.h"<br />

void TaskM (void *pdata)<br />

{<br />

U32 tick;<br />

StatusType result;<br />

...<br />

result = CoTimeToTick (19,<br />

49,<br />

10,<br />

1,<br />

&tick);<br />

if (result != E_OK)<br />

{<br />

if (result == E_INVALID_PARAMETER)<br />

{<br />

printf("Invalid parameter be passed and convert fail !\n");<br />

}<br />

}<br />

}<br />

...<br />

121

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

Saved successfully!

Ooh no, something went wrong!