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.

Event Control Block (Cont’d)<br />

• Event Control Block / <strong>OS</strong>_EventWaitListInit()<br />

Semaphore, Mutex, Mailbox, Message Queue <br />

.<br />

Event Control Block Task <br />

.<br />

void <strong>OS</strong>_EventWaitListInit (<strong>OS</strong>_EVENT *pevent)<br />

{<br />

INT8U *ptbl;<br />

pevent-><strong>OS</strong>EventGrp = 0x00;<br />

ptbl = &pevent-><strong>OS</strong>EventTbl[0];<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 0<br />

*ptbl++ = 0x00;<br />

#endif<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 1<br />

*ptbl++ = 0x00;<br />

#endif<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 2<br />

*ptbl++ = 0x00;<br />

#endif<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 3<br />

*ptbl++ = 0x00;<br />

#endif<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 4<br />

*ptbl++ = 0x00;<br />

#endif<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 5<br />

*ptbl++ = 0x00;<br />

#endif<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 6<br />

*ptbl++ = 0x00;<br />

#endif<br />

#if <strong>OS</strong>_EVENT_TBL_SIZE > 7<br />

*ptbl = 0x00;<br />

#endif<br />

}<br />

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

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

Saved successfully!

Ooh no, something went wrong!