Howto utilize the led's on the Zaurus
The Sharp Zaurus has two led's on the device that can be controled from applications. This device can make the led turn on and off and blink at several different speeds as defined in "sharp_char.h"
If an application want to use the led it needs to do at least the following three things:
Include sharp_char.h in the application to use the headers defines. The header is installed in : /opt/Embedix/tools/arm-linux/include/asm/. You may want to manually copy the file locally or create a sym-link to the file into the local directory.
Open /dev/sharp_led. Use normal error checking here.
int fd= open("/dev/sharp_led", O_WRONLY);
Make an ioctl cal on /dev/sharp_led replacing LED_COLLIE_0_DEFAULT with the desired action from sharp_char.h
ioctl(fd, SHARP_LED_SETSTATUS, LED_COLLIE_0_DEFAULT);
Download example source and binary led demo is in a tar.gz file here. Simply copy the led executable over to the Zaurus and run it from the command line.
This gui test program will open the driver and allow the selection of what each of the two led's should do. The souce is included in the tar.gz for further review and exploration.