[bootlin/training-materials updates] master: labs/sysdev-accessing-hardware: improve steps about LEDs (6d07555f)
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Thu Sep 22 16:43:41 CEST 2022
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/6d07555f0c8cbce78ca04c51e7441da2f91d13e7
>---------------------------------------------------------------
commit 6d07555f0c8cbce78ca04c51e7441da2f91d13e7
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date: Thu Sep 22 16:43:41 2022 +0200
labs/sysdev-accessing-hardware: improve steps about LEDs
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
>---------------------------------------------------------------
6d07555f0c8cbce78ca04c51e7441da2f91d13e7
.../sysdev-accessing-hardware.tex | 28 ++++++++++++----------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/labs/sysdev-accessing-hardware/sysdev-accessing-hardware.tex b/labs/sysdev-accessing-hardware/sysdev-accessing-hardware.tex
index acc56cfb..78002bd6 100644
--- a/labs/sysdev-accessing-hardware/sysdev-accessing-hardware.tex
+++ b/labs/sysdev-accessing-hardware/sysdev-accessing-hardware.tex
@@ -219,25 +219,27 @@ routine is used to drive its value):
As you can see, there are many triggers to choose from, the current
being \code{heartbeat}, corresponding to the CPU activity.
-If you had a keyboard, you could use use the \code{kbd-capslock}
-and use this LED to show the Caps Lock status.
+You can disable all triggers by:
-You could also use the \code{timer} trigger to light the LED
-with specified time on and time off.
+\begin{bashinput}
+# echo none > trigger
+\end{bashinput}
-Here, let's just use the \code{torch} trigger to light the LED
-permanently, and make it as bright as possible. If it's bright enough,
-you could use it as a flashlight!
+And then directly control the LED:
\begin{bashinput}
-# echo torch > trigger
-# cat max_brightness > brightness
+# echo 1 > brightness
+# echo 0 > brightness
\end{bashinput}
-Unfortunately, this particular LED only offers two brightness
-levels (0: off, 1: on). On other systems, for example when an LED
-is used as backlight for an LCD display, you will have many
-more possible brightness levels.
+You could also use the \code{timer} trigger to light the LED
+with specified time on and time off:
+
+\begin{bashinput}
+# echo timer > trigger
+# echo 10 > delay_on
+# echo 200 > delay_off
+\end{bashinput}
\section{Managing the I2C buses and devices}
More information about the training-materials-updates
mailing list