28.12.2014 Views

uC/OS-II (Structure) - 경희대학교

uC/OS-II (Structure) - 경희대학교

uC/OS-II (Structure) - 경희대학교

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Kernel <strong>Structure</strong> (Cont’d)<br />

• Task – Infinite loop function<br />

MicroC/<strong>OS</strong>-<strong>II</strong> Task 64 .<br />

MicroC/<strong>OS</strong>-<strong>II</strong> 8 Idle, CPU Task <br />

.(ex. 1 -> )<br />

Task Task .<br />

void YourTask (void *pdata)<br />

{<br />

for (;;){<br />

/* USER CODE */<br />

Call one of <strong>uC</strong>/<strong>OS</strong>-<strong>II</strong>’s services:<br />

<strong>OS</strong>FlagPend();<br />

<strong>OS</strong>MboxPend();<br />

<strong>OS</strong>MutexPend();<br />

<strong>OS</strong>QPend();<br />

<strong>OS</strong>SemPend();<br />

<strong>OS</strong>TaskDel(<strong>OS</strong>_PRIO_SELF);<br />

<strong>OS</strong>TaskSuspend(<strong>OS</strong>_PRIO_SELF);<br />

<strong>OS</strong>TimeDly();<br />

<strong>OS</strong>TimeDlyHMSM();<br />

/* USER CODE */<br />

}<br />

}<br />

Embedded System Lab. <strong>II</strong> 10

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

Saved successfully!

Ooh no, something went wrong!