NW   NE
 

Sharp Zaurus Developer Information

Corrections and Comments: Spencer Huang
 
SW   SE
NW   NE
 
Howtos

Upgrading The ROM

Connectivity
Wireless 802.11b

Linux Connectivity
Generic (USB)
Debian (USB)
Red Hat (USB)
Suse (USB)
Mandrake (USB)
Generic (PPP USB)
Generic (PPP Serial)

Windows Connectivity
Win2K (Serial)
Win98se (Serial)
WinMe Over (Serial)
WinNTSP6 (Serial)
WinXP Over (Serial)

Developing
Compiler Setup
Compiling the Kernel
Special Considerations
Checklist
System Layout
Application Help Files
IPKG Howto
Buzzer Howto
Led Howto
IrDa Howto
Audio Howto
Fullscreen Howto
Resume Event
Keys
Turning off the screen

Syncing
Linux
Win2K
Wireless

Other
Wireless Comparison
The Z Boot Process
Ipv6 Setup
Servers Setup
SD And CF FAQ
Setting Up A Feed
Converting TTF fonts
Building a ROM
MPEG Encoding

Downloads
ZaurusZone Feed
Links
 
SW   SE
NW   NE
  Howto utilize the led's on the Zaurus

1) Intro

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"

2) Basics

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.

#include <sharp_char.h>

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);


3) Example

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.
 
SW   SE

    This page was last updated: Wednesday, 09-Apr-2003 04:57:24 PDT