C H A P T E R 4 |
Programming the User LED |
This chapter describes how to use the Alarm/User LED. The Alarm/User LED is located on the front panel of the Netra CP2100 series boards. The bi-colored LED is red and green in color (see FIGURE 4-1 for the location of the Alarm/User LED on the board front panel).
Note - Programming the User LED is supported on the Netra CP2140 and the Netra CP2160 boards when they are used with the CP2000 Supplemental CD 4.0 for Solaris 8 only. |
In order to use the LED function, support with a sparc v9 64 bit C library and the led.h file are required. The Application Programming Interface (API) for the user is documented in the led.h file. The library and the file are available on the CP2000 Supplemental CD 4.0 for Solaris 8.
To use the Alarm/User LED feature, the user should update the firmware with the appropriate firmware version that supports this feature on the Netra board.
Note - To check the current firmware version and for instructions on how to update the firmware, refer to the technical reference manual of the Netra board that you are using. |
The list of packages that are required are as follows:
Ensure that the following drivers are also there, as needed:
/platform/${PLATFORM}/kernel/drv/sparcv9/sc
/platform/${PLATFORM}/kernel/strmod/sparcv9/s_led
A typical example of ${PLATFORM} is UltraSPARCengine_CP-60 for the Netra CP2160 board. An example for the library directory is:
/usr/platform/UltraSPARCengine_CP-60/lib
This section provides the application programming interface (API) to control the command combination of the Alarm/User LED, and instructions on how to compile and link the information.
The supported LED and command combinations are shown in TABLE 4-1 and TABLE 4-2.
Color of LED[1] |
||||
---|---|---|---|---|
Color of LED[2] |
||||
---|---|---|---|---|
USER_LED_RED[3] |
||||
As you compile your application, you need to use the compiler command (cc) flag
-I, to include the sys/led.h file named in Files and Packages Required to Support the Alarm/User LED. Specify 64-bit binaries by setting the -xarch=v9 and -D__sparcv9 compiler flags.
To create a link to the library named (libcp2000.so) listed in Files and Packages Required to Support the Alarm/User LED, use the linker flag -L command.
Copyright © 2004, Sun Microsystems, Inc. All Rights Reserved.