mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
Makes a significant encoding change to existing opcodes and adds several opcodes to allow for encoding the more complicated patterns that we have on the lightbar (S0, etc.) as well as condense the ones we technically could encode but couldn't fit in the 192-byte footprint allotted to us (KONAMI). We need this to remove sequences from the EC code. BUG=chrome-os-partner:32203 BRANCH=ToT TEST=run test programs on hardware and lightbar simulator Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Change-Id: I12fe908d3a43a924aa39f24ad66adbe53f7f38e1 Reviewed-on: https://chromium-review.googlesource.com/222949 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
27 lines
865 B
C
27 lines
865 B
C
/* 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.
|
|
*/
|
|
|
|
/* NAME OPERAND BYTES MNEMONIC*/
|
|
#define LIGHTBAR_OPCODE_TABLE \
|
|
OP(ON, 0, "on" )\
|
|
OP(OFF, 0, "off" )\
|
|
OP(JUMP, 1, "jump" )\
|
|
OP(JUMP_BATTERY, 2, "jbat" )\
|
|
OP(JUMP_IF_CHARGING, 1, "jcharge" )\
|
|
OP(SET_WAIT_DELAY, 4, "delay.w" )\
|
|
OP(SET_RAMP_DELAY, 4, "delay.r" )\
|
|
OP(WAIT, 0, "wait" )\
|
|
OP(SET_BRIGHTNESS, 1, "bright" )\
|
|
OP(SET_COLOR_SINGLE, 2, "set.1" )\
|
|
OP(SET_COLOR_RGB, 4, "set.rgb" )\
|
|
OP(GET_COLORS, 0, "get" )\
|
|
OP(SWAP_COLORS, 0, "swap" )\
|
|
OP(RAMP_ONCE, 0, "ramp.1" )\
|
|
OP(CYCLE_ONCE, 0, "cycle.1" )\
|
|
OP(CYCLE, 0, "cycle" )\
|
|
OP(HALT, 0, "halt" )
|