Controlling the mini2440 system LEDs and the EEPROM

This is pretty trivial but i thought i’d post it just incase. Using the mini2440 kernel by BusError the system LEDs are registered under /sys/devices/platform/s3c24xxled.X, where X is the LED number. LEDs 1-4 are located on the system board and LED 5 is the backlight. To control the devices you can do the following:

cd /sys/devices/platform/s3c24xx_led.5/leds/backlight

echo 0 > brightness #turns the backlight off

echo 255 > brightness #turns the backlight on

You can also choose from one of the available triggers, for example..

root@mini2440:/sys/devices/platform/s3c24xx_led.5/leds/backlight# cat trigger
none nand-disk mmc0 timer heartbeat [backlight] gpio default-on
root@mini2440:/sys/devices/platform/s3c24xx_led.5/leds/backlight# echo heartbeat > trigger

Will make your backlight flash on and off like crazy!

Unfortunately there is no PWM control to manage the brightness. This would have been really nice.

The EEPROM can be controlled in a similar way. You can access it in:

/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0050

Data can be written by using the following command:

echo whatever you want > eeprom

The just do the following to read the memory:

cat eeprom

Leave a Reply

Your email address will not be published. Required fields are marked *