The programmable LED driver is for moxa DA-682A, DA-820 embedded computer. /dev/pled is the entry point for trun on/off the programmable LED. You can use the `echo 00000001` to turn on the first LED. Or write your program used open(), write() and close() system call to control the LED. Following describes how to compile this driver.

1. Setting the path to your kernel source tree in Makefile.

	To compile this driver, you should modify the KDIR to the path of your kernel source.
	Modify the KERNEL_VERSION to your target's kernel version.
	We configure the KDIR, KERNEL_VERSION in Makefile for configuring the path of the kernel source.

	The original value

	KDIR:=$(ROOTDIR)/$(LINUXDIR)
	KERNEL_VERSION=`cat $(ROOTDIR)/$(LINUXDIR)/include/config/kernel.release`

	The new value

	KDIR=/lib/modules/`uname -r`/build
	KERNEL_VERSION=`uname -r`

2. Compile the driver.

	$ cd /home/moxa/moxa_pled
	$ make
	  Building modules, stage 2.
	  MODPOST 2 modules
	  CC      /home/moxa//moxa_pled/moxa-pled.o
	  LD [M]  /home/moxa/moxa_pled/moxa-pled.ko

3. Install this driver manually

	$ insmod /home/moxa/moxa_pled/moxa-pled.ko

4. Install this driver and load it at boot time.

	Install this driver
	$ cd /home/moxa/moxa_pled/
	$ make install

5. Turn on/of the LED

	Turn on the first LED.

	$ echo "00000001" >/dev/pled

	Turn off the first LED.

	$ echo "00000000" >/dev/pled

