beautypg.com

Remarks, Return value, Portability – Rockwell Automation 6182 SDK User Manual

Page 58: Functions for use in pci device drivers

background image

4–18

RAC6182-Specific Extensions to the CE API

Publication 6182-UM002B-EN-P

Remarks
Use this function to set the operating states of the system LEDs.

Note:

Before calling this function, it is a good idea to issue a calls
to the NLedGetDeviceInfo function to verify the presence
of the LED of interest and to get its capabilities. As of this
writing, RAC6182s with integrated LCDs are equipped
with three front panel LEDs which have only “on” and
“off” capabilities.

Note:

Do not confuse this function with NLedDriverSetDevice()
described in the Microsoft CE documentation, which is a
kernel level function, not callable by applications.

nInfoId must be evaluated with the NLED_SETTINGS_INFO_ID macro
defined in nleddrv.h (included by nledapi.h).

pInput must point to a caller allocated structure, defined in nleddrv.h as
follows:

struct NLED_SETTINGS_INFO {

UINT LedNum;
INT OffOnBlink; // 0=off, 1=on, 2=blink

LONG TotalCycleTime; // (usec)
LONG OnTime; // blink-on time(usec)
LONG OffTime; // blink-off time(usec)

INT MetaCycleOn; // num blink-on cycles
INT MetaCycleOff; // numblink-off cycles

};

Prior to calling this function, the LED that is to be set must be selected.
This is done by evaluating LedNum using one of the following macros
(defined in nledapi.h):

ID_WARNING_LED
ID_NUMLOCK_LED

ID_POWER_LED

Other parameters should be set, based on capabilities for the LED in
question obtained with an NLedGedDeviceInfo call.

Return Value
One of the following: TRUE or FALSE.

Portability
The arguments to this function are specific to the RAC6182 hardware.

The functions necessary to access PCI configuration space, map PCI
memory or IO space, and handle interrupts on the PCI card are HAL
(Hardware Abstraction Layer) calls and several other CE-specific Win32
calls. The basic operation of these calls is already documented by

Functions for Use in PCI

Device Drivers

This manual is related to the following products: