Compartilhar via


CPUEnterIdle Routine (Windows CE 5.0)

Send Feedback

CPUEnterIdle enables interrupts and puts the CPU, or the hardware platform, into a low-power state. When an interrupt occurs it will awaken the system. CPUEnterIdle is invoked with the same dwIdleParam parameter as OEMIdle.

This routine is prototyped as the following code example indicates.

void CPUEnterIdle(DWORD dwIdleParam);

If your hardware platform does not support low-power modes, the implementation can be used as shown in the following code example.

void CPUEnterIdle(DWORD dwIdleParam);
{
  fInterruptFlag = FALSE;
  INTERRUPTS_ON();
  while (!fInterruptFlag) {
  // Just wait here. Any interrupt will bump us out.
  }
}

**Note   **This requires that all interrupt service routines (ISRs) set the variable fInterruptFlag, which must be declared as volatile.

See Also

Boilerplate Interface Routines | INTERRUPTS_ON

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.