01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AH<br />

BX<br />

0 (=RTX_SLEEP_TIME)<br />

Sleep time in milliseconds in range 1 to 32767, inclusive. Note this 16 bit value is treated as signed.<br />

Any non-positive values are translated within this API to 1 millisecond.<br />

Return Value<br />

Comments<br />

DX = 0 success AX: 0<br />

DX != 0 failure AX: contains error code<br />

The RTX_WAKEUP_TASK API (service 0x06) can wake up a sleeping task before its sleep timer has<br />

expired. In this case this API returns with error code -5 in AX.<br />

The system maintains a "Task Wakeup Pending " flag for each task. This flag is set when<br />

RTX_WAKEUP_TASK is called for a task which is not currently awaiting wakeup (i.e. when bit 7 in Task<br />

State is zero). In the case where "Task Wakeup Pending " flag had been set, this RTX_SLEEP_TIME<br />

API clears this flag and returns immediately with error code -5 in AX.<br />

Related Topics<br />

<strong>RTOS</strong> Task Control Services<br />

RTX_SLEEP_REQ Sleep until wake up call<br />

RTX_WAKEUP_TASK Wake up a task<br />

Developer Notes<br />

A sleep call with BX parameter 1 millisecond sleeps for less than or equal to one millisecond. If a user needs a<br />

minimum sleep time of 1 millisecond they must call RTX_SLEEP_TIME with value 2 in BX. In general with BX<br />

sleep time specified to be N milliseconds, the resulting sleep time will range from N-1 milliseconds up to N<br />

milliseconds (inclusive).<br />

Top of list<br />

Index page<br />

Interrupt 0xAD service 0x01: RTX_TASK_CREATE, Create and start a task<br />

Parameters<br />

AH<br />

BX:SI<br />

ES:DI<br />

0x01 (= RTX_TASK_CREATE)<br />

Pointer to 16 bit storage for the taskID, allocated by the caller<br />

Pointer to a TaskDefBlock type data structure<br />

Page 185 / 400

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

Saved successfully!

Ooh no, something went wrong!