Led - Metrologic Optimus S Programming Manual

"c" programming guide
Table of Contents

Advertisement

72
"C" Programming Guide For Optimus S/R

3.6 LED

In general, the dual-color LED indicator on the portable terminals is used to indicate the
system status, such as good read or bad read, error occurrence, etc.
set_led
Purpose
To set the LED indicator.
void set_led (int led, int mode, int duration);
Syntax
int led;
int mode;
int duration;
Example
set_led (LED_RED,LED_FLASH,50);
Description
This routine sets the LED operation mode.
The value of the parameter led can be one of the following:
LED_RED (0)
LED_GREEN (1) Use green led light
The value of the parameter mode can be one of the following:
LED_OFF (0)
LED_ON (1)
LED_FLASH (2)
Return
None
/* color of LED to be accessed */
/* duration in units of 10 milli-second. */
/* set red LED to flash for each 1 second cycle */
Use red led light
Off for (duration * 0.01) seconds and then on
On for (duration * 0.01) seconds and then off
Flash, turn on and then off for (duration *0.01) seconds.
Then repeat.
/* activation mode */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents