summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2014-09-10 12:33:58 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-11 20:00:21 +0000
commitdab91fe9ec6ecddea2e3f6f46d207263b58d7982 (patch)
treeaae6f9162e2498fadf2595cf92f258f9c18ddf2e /extra
parent0e59d4f38a97defe45351f2b1e132f76f17160e6 (diff)
downloadchrome-ec-dab91fe9ec6ecddea2e3f6f46d207263b58d7982.tar.gz
extra: Move lightbar simulator into subdirectory
This clears the top level extra directory for additional extras. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=cd extra/lightbar; make; lightbar Change-Id: If05a768e4d33cbf21b2ce47a056c960a95728558 Reviewed-on: https://chromium-review.googlesource.com/217537 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r--extra/README41
-rw-r--r--extra/lightbar/.gitignore (renamed from extra/.gitignore)0
-rw-r--r--extra/lightbar/Makefile (renamed from extra/Makefile)4
-rw-r--r--extra/lightbar/README39
-rw-r--r--extra/lightbar/input.c (renamed from extra/input.c)0
-rw-r--r--extra/lightbar/main.c (renamed from extra/main.c)0
-rw-r--r--extra/lightbar/simulation.h (renamed from extra/simulation.h)0
-rw-r--r--extra/lightbar/windows.c (renamed from extra/windows.c)0
8 files changed, 41 insertions, 43 deletions
diff --git a/extra/README b/extra/README
index 16659415fb..874a7b1b32 100644
--- a/extra/README
+++ b/extra/README
@@ -3,44 +3,3 @@ This directory is for experiments only. It is not built automatically,
required, supported, guaranteed to work, or necessarily well-documented.
The contents may change without warning at any time.
-
-------------------------------------------------------------------------------
-Lightbar simulator
-------------------------------------------------------------------------------
-
-Build with "make lightbar". The executable is "./lightbar".
-
-You may need to install libxcb1-dev or similar.
-
-This provides a simulation environment for the lightbar task, compiling
-common/lightbar.c from the EC source, but faking the rest of the EC.
-
-The EC console is on stdin/stdout, delivering all input to the lightbar's
-console command handler (so it prefixes any input with "lightbar"). The
-lightbar itself is displayed in an X window. You can click in that window to
-emulate changes to the battery level, AC connection, and brightness, all of
-which are normally outside the lightbar task's direct control.
-
-The initial sequence is "S5". Try issuing the command "seq s3s0" to see
-something more familiar.
-
-
-Note: the Pixel lightbar circuitry has three modes of operation:
-
-Unpowered
-
- When the host CPU is off (S5/G3), all power to the lightbar and its
- controller circuitry is lost.
-
-On
-
- When the host CPU is on (S0) or suspended (S3), the lightbar is powered
- again. After every power loss, it will need to be reinitialized by calling
- lb_init() before it can be used.
-
-Standby
-
- The lightbar controller ICs can turn off all the LED outputs to conserve
- power. This is the initial state when power is applied. You can turn the
- LEDs off manually by calling lb_off(). When suspended, the controller will
- respond to commands, but the LEDs aren't lit. Turn them on with lb_on().
diff --git a/extra/.gitignore b/extra/lightbar/.gitignore
index 964154302a..964154302a 100644
--- a/extra/.gitignore
+++ b/extra/lightbar/.gitignore
diff --git a/extra/Makefile b/extra/lightbar/Makefile
index e7ef73ec00..920483b781 100644
--- a/extra/Makefile
+++ b/extra/lightbar/Makefile
@@ -4,12 +4,12 @@
PROG= lightbar
HEADERS= simulation.h
-SRCS= main.c windows.c input.c ../common/lightbar.c
+SRCS= main.c windows.c input.c ../../common/lightbar.c
# comment this out if you don't have libreadline installed
HAS_GNU_READLINE=1
-INCLUDE= -I. -I../include
+INCLUDE= -I. -I../../include
CFLAGS= -g -Wall -Werror -pthread ${INCLUDE} -DLIGHTBAR_SIMULATION
LDFLAGS = -lX11 -lxcb -lrt
diff --git a/extra/lightbar/README b/extra/lightbar/README
new file mode 100644
index 0000000000..1862f922e4
--- /dev/null
+++ b/extra/lightbar/README
@@ -0,0 +1,39 @@
+Lightbar simulator
+------------------------------------------------------------------------------
+
+Build with "make lightbar". The executable is "./lightbar".
+
+You may need to install libxcb1-dev or similar.
+
+This provides a simulation environment for the lightbar task, compiling
+common/lightbar.c from the EC source, but faking the rest of the EC.
+
+The EC console is on stdin/stdout, delivering all input to the lightbar's
+console command handler (so it prefixes any input with "lightbar"). The
+lightbar itself is displayed in an X window. You can click in that window to
+emulate changes to the battery level, AC connection, and brightness, all of
+which are normally outside the lightbar task's direct control.
+
+The initial sequence is "S5". Try issuing the command "seq s3s0" to see
+something more familiar.
+
+
+Note: the Pixel lightbar circuitry has three modes of operation:
+
+Unpowered
+
+ When the host CPU is off (S5/G3), all power to the lightbar and its
+ controller circuitry is lost.
+
+On
+
+ When the host CPU is on (S0) or suspended (S3), the lightbar is powered
+ again. After every power loss, it will need to be reinitialized by calling
+ lb_init() before it can be used.
+
+Standby
+
+ The lightbar controller ICs can turn off all the LED outputs to conserve
+ power. This is the initial state when power is applied. You can turn the
+ LEDs off manually by calling lb_off(). When suspended, the controller will
+ respond to commands, but the LEDs aren't lit. Turn them on with lb_on().
diff --git a/extra/input.c b/extra/lightbar/input.c
index fe4f7cd19f..fe4f7cd19f 100644
--- a/extra/input.c
+++ b/extra/lightbar/input.c
diff --git a/extra/main.c b/extra/lightbar/main.c
index 38234e743c..38234e743c 100644
--- a/extra/main.c
+++ b/extra/lightbar/main.c
diff --git a/extra/simulation.h b/extra/lightbar/simulation.h
index 569107023b..569107023b 100644
--- a/extra/simulation.h
+++ b/extra/lightbar/simulation.h
diff --git a/extra/windows.c b/extra/lightbar/windows.c
index 20b3a5780c..20b3a5780c 100644
--- a/extra/windows.c
+++ b/extra/lightbar/windows.c