Home |
RTTarget-32 Programming Manual Function RTHalt Function RTSetDLLNameTranslation System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTHaltRTHalt waits for a hardware interrupt: BYTE RTHalt(void); The function returns the current privilege level (0 or 3). If the program runs at privilege level 3, RTHalt returns immediately and does nothing. However, if running at CPL 0, instruction HLT is executed. To execute HLT at CPL 3, see function RTHaltCPL3. HLT stops the CPU until a hardware interrupt or a hardware reset occurs. During the wait, the CPU is in Halt Mode. The bus is free to be accessed by other hardware such as DMA. Also, only a fraction of the CPU's normal power consumption is used, significantly reducing heat generation. All loops waiting for an external event (e.g., keyboard input, a specific time, data to be received, etc.) can call RTHalt to reduce power consumption and heat emission. Alternatively, you can assign function RTHalt to RTTarget-32's idle handler (see function RTWait).
|