diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-09-26 15:50:23 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-30 01:53:53 +0000 |
commit | 87762fa6997d3deb55dec777d5fa42c3cabdf7ca (patch) | |
tree | fc057b0aedbb8c26417f0d83705d869ee7e7fed3 /include/lightbar_opcode_list.h | |
parent | af3d103dbc3ddbb6004240186a946efe1cc8b8f4 (diff) | |
download | chrome-ec-87762fa6997d3deb55dec777d5fa42c3cabdf7ca.tar.gz |
Add compiler/decompiler for lightbar bytecode programs.
BUG=none
BRANCH=ToT
TEST=manual
make BOARD=samus
for i in extra/lightbar/programs/[g-z]*.bin; do
./build/samus/util/lbcc -d $i /tmp/x.lbs
./build/samus/util/lbcc /tmp/x.lbs /tmp/x.bin
cmp $i /tmp/x.bin
done
Change-Id: I86c014c425e917ecafadd1c6845fcf2e5b4edbb7
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/220244
Diffstat (limited to 'include/lightbar_opcode_list.h')
-rw-r--r-- | include/lightbar_opcode_list.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/lightbar_opcode_list.h b/include/lightbar_opcode_list.h new file mode 100644 index 0000000000..523303eb60 --- /dev/null +++ b/include/lightbar_opcode_list.h @@ -0,0 +1,15 @@ +/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * This defines a list of lightbar opcodes for programmable sequences. + */ +#define LIGHTBAR_OPCODE_TABLE \ + OP(JUMP), \ + OP(DELAY), \ + OP(SET_BRIGHTNESS), \ + OP(SET_COLOR), \ + OP(SET_DELAY_TIME), \ + OP(RAMP_ONCE), \ + OP(CYCLE_ONCE), \ + OP(CYCLE), |