Commit c0dc5233 authored by David Boddie's avatar David Boddie 💬
Browse files

Merge branch '68-add-led-description' into 'master'

Resolve "Add LED description"

Closes #68

See merge request Librem5/!124
parents 3e01f5c8 0f9f9585
.. _simple_input_output_guide:
Simple Input/Output
The Librem 5 has a number of peripherals that allow applications to interact
with users and the outside world in a simple way. This guide covers these I/O
peripherals and describes how to use them.
Light Emitting Diodes (LEDs)
Only one of the LEDs can be controlled by applications. This red diode is
mapped to the ``/sys/class/leds/LED 1`` directory in the file system and its
state can be changed by writing to the ``/sys/class/leds/LED 1/brightness``
file, as in this shell command::
echo 200 > /sys/class/leds/LED\ 1/brightness
Using the default system configuration, writing a value of 0 to the file will
switch the LED off. Writing a value from 1 to 255 will switch it on.
The lack of control over the brightness of the LED is because it is driven by
a Pulse Width Modulator (PWM) that it shares with the haptic motor, and the
default kernel device tree configures the motor to use the PWM. If a different
device tree is used with the kernel, this behavior can be adjusted.
.. Perhaps link to issue
......@@ -12,6 +12,7 @@ to encounter. We aim to add more guides to this collection over time.
We welcome suggestions for new guides. Please check the current
` issues`_ for existing requests and submit a new request if
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment