Back to home page

OSCL-LXR

 
 

    


0001 ==================
0002 Leds BlinkM driver
0003 ==================
0004 
0005 The leds-blinkm driver supports the devices of the BlinkM family.
0006 
0007 They are RGB-LED modules driven by a (AT)tiny microcontroller and
0008 communicate through I2C. The default address of these modules is
0009 0x09 but this can be changed through a command. By this you could
0010 dasy-chain up to 127 BlinkMs on an I2C bus.
0011 
0012 The device accepts RGB and HSB color values through separate commands.
0013 Also you can store blinking sequences as "scripts" in
0014 the controller and run them. Also fading is an option.
0015 
0016 The interface this driver provides is 2-fold:
0017 
0018 a) LED class interface for use with triggers
0019 ############################################
0020 
0021 The registration follows the scheme::
0022 
0023   blinkm-<i2c-bus-nr>-<i2c-device-nr>-<color>
0024 
0025   $ ls -h /sys/class/leds/blinkm-6-*
0026   /sys/class/leds/blinkm-6-9-blue:
0027   brightness  device  max_brightness  power  subsystem  trigger  uevent
0028 
0029   /sys/class/leds/blinkm-6-9-green:
0030   brightness  device  max_brightness  power  subsystem  trigger  uevent
0031 
0032   /sys/class/leds/blinkm-6-9-red:
0033   brightness  device  max_brightness  power  subsystem  trigger  uevent
0034 
0035 (same is /sys/bus/i2c/devices/6-0009/leds)
0036 
0037 We can control the colors separated into red, green and blue and
0038 assign triggers on each color.
0039 
0040 E.g.::
0041 
0042   $ cat blinkm-6-9-blue/brightness
0043   05
0044 
0045   $ echo 200 > blinkm-6-9-blue/brightness
0046   $
0047 
0048   $ modprobe ledtrig-heartbeat
0049   $ echo heartbeat > blinkm-6-9-green/trigger
0050   $
0051 
0052 
0053 b) Sysfs group to control rgb, fade, hsb, scripts ...
0054 #####################################################
0055 
0056 This extended interface is available as folder blinkm
0057 in the sysfs folder of the I2C device.
0058 E.g. below /sys/bus/i2c/devices/6-0009/blinkm
0059 
0060   $ ls -h /sys/bus/i2c/devices/6-0009/blinkm/
0061   blue  green  red  test
0062 
0063 Currently supported is just setting red, green, blue
0064 and a test sequence.
0065 
0066 E.g.::
0067 
0068   $ cat *
0069   00
0070   00
0071   00
0072   #Write into test to start test sequence!#
0073 
0074   $ echo 1 > test
0075   $
0076 
0077   $ echo 255 > red
0078   $
0079 
0080 
0081 
0082 as of 6/2012
0083 
0084 dl9pf <at> gmx <dot> de