TS-7180 LEDs: Difference between revisions

From embeddedTS Manuals
(Created page with "There are four LEDS on the TS-7180 that may be controlled by the user. These are colored yellow, green, red, and blue. Each LED has an enable IO that controls its on/off sta...")
 
(Add mention of triggers to LED documentation)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
There are four LEDS on the TS-7180 that may be controlled by the user.  These are colored yellow, green, red, and blue.  Each LED has an enable IO that controls its on/off state.
There are four LEDS on the TS-7180 that may be controlled by the user through the sysfs interface.  These are colored yellow, green, red, and blue.   


{|class=wikitable
To turn an LED on, write a 1 to 'brightness'.  To turn it off again, write a 0.
|-
! LED
! IO Enable
|-
| Yellow
| 2
|-
| Green
| 3
|-
| Red
| 4
|-
| Blue
| 5
|-
|}
 
To turn an LED on, set its IO Enable high.  To turn it off again, set the IO Enable low.


<source lang=bash>
<source lang=bash>
# Example:  Turn on the Blue LED...
# Example:  Turn on the Blue LED...
tshwctl -a 5 -w 3
echo 1 > /sys/class/leds/blue-led/brightness


# Turn it off again...
# Turn it off again...
tshwctl -a 5 -w 1
echo 0 > /sys/class/leds/blue-led/brightness
</source>
</source>
A number of triggers are also available for each LED, including timers, disk activity, and heartbeat. These allow the LEDs to represent various system activities as they occur. See the [https://www.kernel.org/doc/Documentation/leds/leds-class.txt kernel LED documentation] for more information on triggers and general use of LED class devices.

Latest revision as of 15:37, 13 July 2021

There are four LEDS on the TS-7180 that may be controlled by the user through the sysfs interface. These are colored yellow, green, red, and blue.

To turn an LED on, write a 1 to 'brightness'. To turn it off again, write a 0.

# Example:  Turn on the Blue LED...
echo 1 > /sys/class/leds/blue-led/brightness

# Turn it off again...
echo 0 > /sys/class/leds/blue-led/brightness

A number of triggers are also available for each LED, including timers, disk activity, and heartbeat. These allow the LEDs to represent various system activities as they occur. See the kernel LED documentation for more information on triggers and general use of LED class devices.