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.

Time / Date Services<br />

The following Time/Date services are available.<br />

RTX_GET_TIMEDATE Get system time and date<br />

RTX_SET_TIMEDATE Set system time and date<br />

RTX_GET_TICKS Get tick count of system clock<br />

Related Topics<br />

Top of list<br />

Index page<br />

TimeDate_Structure type definition<br />

Timer Procedures<br />

Top of list<br />

Index page<br />

The <strong>@CHIP</strong>-<strong>RTOS</strong> API provides four calls for the usage of timer procedures:<br />

RTX_INSTALL_TIMER Install a timer procedure<br />

RTX_REMOVE_TIMER Remove a timer procedure from the system<br />

RTX_START_TIMER Start periodic execution of a installed timer procedure<br />

RTX_STOP_TIMER Stop periodic execution of a timer procedure<br />

The <strong>@CHIP</strong>-<strong>RTOS</strong> implements timer procedures using kernel objects, of which there are 60 total. The<br />

sum of semaphores + event groups + timer procedures is limited to 60, since all three of these require<br />

use of a kernel object.<br />

The kernel can execute periodic user timer procedures at a specified time interval. Your timer procedure<br />

must be as short as practical without any waiting or endless loops. Avoid the usage of large C-library<br />

functions such as printf(). However, any of the following kernel services are reasonable to call from<br />

within a timer procedure:<br />

Event Manager<br />

❍ RTX_REMOVE_TIMER Service 0x31<br />

❍ RTX_START_TIMER Service 0x32<br />

❍ RTX_STOP_TIMER Service 0x33<br />

❍ RTX_WAKEUP_TASK Service 0x06<br />

❍ RTX_SIGNAL_SEM Service 0x1A<br />

❍ RTX_SIGNAL_EVENTS Service 0x42<br />

❍ RTX_SEND_MESSAGE Service 0x52<br />

❍ RTX_SUSPEND_TASK Service 0x0E<br />

❍ RTX_RESUME_TASK Service 0x0F<br />

The internal <strong>@CHIP</strong>-<strong>RTOS</strong> Event Manager provides a convenient mechanism for coordinating tasks<br />

waiting for events with tasks and/or timer procedures which can signal the events. The Event Manager<br />

Page 233 / 400

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

Saved successfully!

Ooh no, something went wrong!