30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

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.

252 CHAPTER 5. T-KERNEL/SM<br />

5.6 Power Management Functions<br />

Power management functions are called from T-<strong>Kernel</strong>/OS. See tk set pow.<br />

The manner of calling these functions is implementation-dependent. Simple system calls are possible,<br />

as is the use of a trap. Use of an extended SVC or other means that makes use of OS functions is not<br />

possible, however. Providing these functions in T-Monitor is another option.<br />

The specifications given here for low pow and off pow are reference specifications. Since these functions<br />

are used only inside T-<strong>Kernel</strong>, other specifications may be devised as well. It is even possible to<br />

design completely different specifications in order to realize more advanced power-saving features. If the<br />

functionality is similar to that specified here, however, it would be best to follow these specifications as<br />

closely as practical.<br />

• void low_pow( void )<br />

Switches to low-power mode and waits for an interrupt to be raised. This function is called from<br />

the task dispatcher, and performs the following processing.<br />

(A) Goes to low-power mode.<br />

(B) Waits for an external interrupt to be raised.<br />

(C) When an external interrupt is raised, restores normal power mode and returns to its caller.<br />

This function is called in interrupts disabled state. Interrupts must not be enabled. The speed of<br />

response to an interrupt affects processing speed, and should be as fast as possible.<br />

• void off_pow( void )<br />

Suspends the system. When a resume factor occurs, it resumes system operation.<br />

This function is called from tk set pow, and performs the following processing.<br />

(A) Puts the hardware in suspended state.<br />

(B) Waits for a resume factor to occur.<br />

(C) When a resume factor occurs, returns from suspended state and returns to its caller.<br />

This function is called in interrupts disabled state. Interrupts must not be enabled. The device<br />

drivers perform the suspending and resuming of peripherals and other devices.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

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

Saved successfully!

Ooh no, something went wrong!