Idle

Availability All terminals
Description This function sets the reader in a 'sleep' mode. Calling this function while waiting for an action will reduce the power consumption significantly.
Syntax void Idle( void );
Arguments None
Returns None
Remarks After calling the Idle() function, the reader will halt program execution until it is awakened by a software interrupt - like the reception of data over the serial port - or by a hardware interrupt - like a keystroke.
When no interrupts are received, the terminal will resume program execution within a maximum of 20 milliseconds after calling Idle().
Using Idle() has no effect on the scanning performance.
One can use this function while waiting for a keystroke, while waiting for reception of data, etc.

It's also possible to reduce the power consumption to almost zero by using the AutoPowerDown function to sleep or power down.
Example
// The following example demonstrates the use of Idle() and the power reduction.
// The example may reduce power consumption by about 2-4 times!

#include <stdio.h>
#include "lib.h"

void main( void )
{
    unsigned int x;
    for(;;)
    {
        printf("\nIdle loop");
        for( x=0; x < 200; x++)
            Idle();
        printf("\n normal loop");
        for( x=0; x < 10000; x++)
            continue;
    }
}