• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: three leds available on SheevaPlug  (Read 1892 times)
bob38
Newbie
*

Karma: 1
Posts: 22


View Profile
« on: November 10, 2010, 03:09:24 AM »

Hi,

I wanted to manage the three Led on Globalscale SheevaPlug, like on Ionics. And I did it Smiley

First of all, I get the last kernel (2.6.36) sources, and its patch. I unzip it, apply all the patch, and copy config file into .config.
The update the sheevaplug-setup.c in the directory linux-2.6.36/arch/arm/mach-kirkwood by my update, provided here. Then, I cross compile the kernel. And I boot my sheevaPlug with this new kernel. And I can manage 3 Leds (green, blue, red), available in the directory /sys/devices/platform/leds-gpio/leds.

There are led1, led2 and led3. But if you change name into the file sheevaplug-setup.c, you can name them green, blue, red. In fact, I just had in this file the led 2 and 3 and their bind GPIO.

You just have use echo command to change their state

echo 0 > /sys/devices/platform/leds-gpio/leds/led1/brightness
echo 255 > /sys/devices/platform/leds-gpio/leds/led1/brightness

Have fun  Cheesy

Bob

* sheevaplug-setup.c (4.46 KB - downloaded 191 times.)
Logged

Pages: [1]
Print
Jump to: