Hi, I have made a driver for our mpc8270 board It is based upon Denx led_driver and made for 2.6 kernel (See atached file)
To control the leds you have to perfom some ioctl's first create your devices mknod led0 c 151 0 ... Example howto use it: void led_off( int file ) { if (ioctl(file,STATUSLED_SET,0) < 0) perror("led off: "); } void led_blink( int file ) { if (ioctl(file,STATUSLED_SET,1) < 0) perror("led blink: "); } void led_on( int file ) { if (ioctl(file,STATUSLED_SET,2) < 0) perror("led on: "); } void led_per( int file, int period ) { if (ioctl(file,STATUSLED_PERIOD,period) < 0) perror("led on: "); } ... int led0 = open("/dev/led0",O_RDWR) ... led_blink(led0); /* turn on green LED */ .. /Hans On Thu, 2005-03-17 at 06:15, srinivas.surabhi at wipro.com wrote: > > -----Original Message----- > From: Srinivas Surabhi (WT01 - TELECOM SOLUTIONS) > Sent: Thursday, March 17, 2005 7:53 AM > To: linuxppc-embedded at ozlabs.org > Subject: LED driver > > Hi, > > I am working on the MPC8270 board having connected GPIO 3 lines > connected to 3 LEDs. So can any one help me in finding out the best > solution of controlling the LEDs from MVlinux (kernel and user space) or > any pointers who has done it before. > > Thanks & Rgds > SS > > > > > Confidentiality Notice > > The information contained in this electronic message and any attachments to > this message are intended > for the exclusive use of the addressee(s) and may contain confidential or > privileged information. If > you are not the intended recipient, please notify the sender at Wipro or > Mailadmin at wipro.com immediately > and destroy all copies of this message and any attachments. > _______________________________________________ > Linuxppc-embedded mailing list > Linuxppc-embedded at ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-embedded > -------------- next part -------------- A non-text attachment was scrubbed... Name: rcb8270_led.c Type: text/x-c Size: 17175 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050317/dff5e619/attachment.bin