diff options
author | Eric Caruso <ejcaruso@chromium.org> | 2014-10-09 13:06:22 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-15 18:22:37 +0000 |
commit | bcc5057ad30a1252e7ae994dee58a689c210e302 (patch) | |
tree | 0a54fe090b65f731ce31adb6e27a130c5b1669f3 /extra | |
parent | 8fc80e86e4aa90dc88064edf135f6ccae374e647 (diff) | |
download | chrome-ec-bcc5057ad30a1252e7ae994dee58a689c210e302.tar.gz |
lightbar: interpreter additions to encode other patterns
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>
Diffstat (limited to 'extra')
22 files changed, 187 insertions, 1 deletions
diff --git a/extra/lightbar/programs/bad-decode-32.bin b/extra/lightbar/programs/bad-decode-32.bin index de2e71b327..1d5d0c6c75 100644 --- a/extra/lightbar/programs/bad-decode-32.bin +++ b/extra/lightbar/programs/bad-decode-32.bin @@ -1 +1 @@ -UUU
\ No newline at end of file +UUU
\ No newline at end of file diff --git a/extra/lightbar/programs/bad-decode-8.bin b/extra/lightbar/programs/bad-decode-8.bin Binary files differindex d8188da697..8352675d67 100644 --- a/extra/lightbar/programs/bad-decode-8.bin +++ b/extra/lightbar/programs/bad-decode-8.bin diff --git a/extra/lightbar/programs/bad-jump.bin b/extra/lightbar/programs/bad-jump.bin Binary files differindex d284cb97ce..b2c29a0bbf 100644 --- a/extra/lightbar/programs/bad-jump.bin +++ b/extra/lightbar/programs/bad-jump.bin diff --git a/extra/lightbar/programs/green-pulse.bin b/extra/lightbar/programs/green-pulse.bin Binary files differindex 9ea21f789a..0fdab712e9 100644 --- a/extra/lightbar/programs/green-pulse.bin +++ b/extra/lightbar/programs/green-pulse.bin diff --git a/extra/lightbar/programs/green-pulse.lbs b/extra/lightbar/programs/green-pulse.lbs new file mode 100644 index 0000000000..bccf3e5c9a --- /dev/null +++ b/extra/lightbar/programs/green-pulse.lbs @@ -0,0 +1,8 @@ + set.1 {0,1,2,3}.end.g 0xff + delay.r 7813 + delay.w 2000000 +L0001: on + cycle.1 + off + wait + jump L0001 diff --git a/extra/lightbar/programs/infinite-jump.bin b/extra/lightbar/programs/infinite-jump.bin Binary files differindex 09f370e38f..5407bf3ddf 100644 --- a/extra/lightbar/programs/infinite-jump.bin +++ b/extra/lightbar/programs/infinite-jump.bin diff --git a/extra/lightbar/programs/infinite-jump.lbs b/extra/lightbar/programs/infinite-jump.lbs new file mode 100644 index 0000000000..6174d7ffd4 --- /dev/null +++ b/extra/lightbar/programs/infinite-jump.lbs @@ -0,0 +1 @@ +L0001: jump L0001 diff --git a/extra/lightbar/programs/konami.bin b/extra/lightbar/programs/konami.bin Binary files differnew file mode 100644 index 0000000000..f7abfdc4ee --- /dev/null +++ b/extra/lightbar/programs/konami.bin diff --git a/extra/lightbar/programs/konami.lbs b/extra/lightbar/programs/konami.lbs new file mode 100644 index 0000000000..c9fa8d697a --- /dev/null +++ b/extra/lightbar/programs/konami.lbs @@ -0,0 +1,89 @@ +# Konami code easter egg + delay.w 100000 + set.rgb {1,2}.end 0xff 0xff 0x00 + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + set.rgb {1,2}.end 0x00 0x00 0x00 + set.1 {0,3}.end.b 0xff + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + set.1 {0,3}.end.b 0x00 + set.1 {0,1}.end.r 0xff + ramp.1 + wait + cycle.1 + wait + set.1 {0,1}.end.r 0x00 + set.1 {2,3}.end.g 0xff + ramp.1 + wait + cycle.1 + wait + set.1 {2,3}.end.g 0x00 + set.1 {0,1}.end.r 0xff + ramp.1 + wait + cycle.1 + wait + set.1 {0,1}.end.r 0x00 + set.1 {2,3}.end.g 0xff + ramp.1 + wait + cycle.1 + wait + set.1 {2,3}.end.g 0x00 + set.rgb {0,2}.end 0x00 0xff 0xff + ramp.1 + wait + cycle.1 + wait + delay.w 50000 + wait + set.rgb {0,2}.end 0x00 0x00 0x00 + set.rgb {1,3}.end 0xff 0x00 0xff + ramp.1 + wait + wait + cycle.1 + wait + delay.w 100000 + wait + wait + set.rgb {0,1,2,3}.end 0xff 0xff 0xff + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + halt diff --git a/extra/lightbar/programs/rainbow-shift-compact.bin b/extra/lightbar/programs/rainbow-shift-compact.bin Binary files differdeleted file mode 100644 index f5590c5820..0000000000 --- a/extra/lightbar/programs/rainbow-shift-compact.bin +++ /dev/null diff --git a/extra/lightbar/programs/rainbow-shift.bin b/extra/lightbar/programs/rainbow-shift.bin Binary files differindex 44e1af4b7d..a72c5b16d6 100644 --- a/extra/lightbar/programs/rainbow-shift.bin +++ b/extra/lightbar/programs/rainbow-shift.bin diff --git a/extra/lightbar/programs/rainbow-shift.lbs b/extra/lightbar/programs/rainbow-shift.lbs new file mode 100644 index 0000000000..e1cbcddc83 --- /dev/null +++ b/extra/lightbar/programs/rainbow-shift.lbs @@ -0,0 +1,8 @@ +# The rainbow cycle program. + set.rgb {0,1,2,3}.end 0xff 0xff 0xff + set.rgb {0}.phase 0x00 0x55 0xaa + set.rgb {1}.phase 0x40 0x95 0xea + set.rgb {2}.phase 0x80 0xd5 0x2a + set.rgb {3}.phase 0xc0 0x15 0x6a + delay.r 7813 + cycle diff --git a/extra/lightbar/programs/red-green-blink.bin b/extra/lightbar/programs/red-green-blink.bin Binary files differindex 305f3c53f9..6bece444dd 100644 --- a/extra/lightbar/programs/red-green-blink.bin +++ b/extra/lightbar/programs/red-green-blink.bin diff --git a/extra/lightbar/programs/red-green-blink.lbs b/extra/lightbar/programs/red-green-blink.lbs new file mode 100644 index 0000000000..d520b739bb --- /dev/null +++ b/extra/lightbar/programs/red-green-blink.lbs @@ -0,0 +1,14 @@ +# Blinks red and green with 1 second pauses. + set.rgb {0,1,2,3}.beg 0xff 0x00 0x00 + set.rgb {0,1,2,3}.end 0x00 0xff 0x00 + delay.w 250000 + delay.r 0 + cycle.1 + wait + ramp.1 + wait + cycle.1 + wait + ramp.1 + wait + halt diff --git a/extra/lightbar/programs/s0.bin b/extra/lightbar/programs/s0.bin Binary files differnew file mode 100644 index 0000000000..b20cecd8ee --- /dev/null +++ b/extra/lightbar/programs/s0.bin diff --git a/extra/lightbar/programs/s0.lbs b/extra/lightbar/programs/s0.lbs new file mode 100644 index 0000000000..364c3d595c --- /dev/null +++ b/extra/lightbar/programs/s0.lbs @@ -0,0 +1,22 @@ +# S0 sequence: Google colors, unless battery is low. + set.rgb {0}.end 0x33 0x69 0xe8 + set.rgb {1}.end 0xd5 0x0f 0x25 + set.rgb {2}.end 0xee 0xb2 0x11 + set.rgb {3}.end 0x00 0x99 0x25 + delay.r 1250 + ramp.1 + set.1 {0,1,2,3}.beg.r 0xff + delay.r 2500 + delay.w 1000000 + wait + jump L0003 +L0001: swap + ramp.1 +L0002: wait +L0003: jbat L0004 L0002 + jump L0002 +L0004: swap + ramp.1 +L0005: wait + jbat L0005 L0001 + jump L0001 diff --git a/extra/lightbar/programs/s0s3.bin b/extra/lightbar/programs/s0s3.bin Binary files differnew file mode 100644 index 0000000000..d1cb8a4af1 --- /dev/null +++ b/extra/lightbar/programs/s0s3.bin diff --git a/extra/lightbar/programs/s0s3.lbs b/extra/lightbar/programs/s0s3.lbs new file mode 100644 index 0000000000..ba141f338d --- /dev/null +++ b/extra/lightbar/programs/s0s3.lbs @@ -0,0 +1,16 @@ +# S0S3 sequence: Fade out, Google color ramp up/down. + get + delay.r 2000 + ramp.1 + swap + set.rgb {0}.end 0x33 0x69 0xe8 + set.rgb {1}.end 0xd5 0x0f 0x25 + set.rgb {2}.end 0xee 0xb2 0x11 + set.rgb {3}.end 0x00 0x99 0x25 + delay.r 1250 + ramp.1 + swap + delay.r 10000 + ramp.1 + off + halt diff --git a/extra/lightbar/programs/s3.bin b/extra/lightbar/programs/s3.bin Binary files differnew file mode 100644 index 0000000000..7e487bb8c9 --- /dev/null +++ b/extra/lightbar/programs/s3.bin diff --git a/extra/lightbar/programs/s3.lbs b/extra/lightbar/programs/s3.lbs new file mode 100644 index 0000000000..e8803a06bb --- /dev/null +++ b/extra/lightbar/programs/s3.lbs @@ -0,0 +1,17 @@ +# S3 sequence: Pulse red on low battery. + set.rgb {0,1,2,3}.end 0xff 0x00 0x00 + cycle.1 + delay.w 5000000 +L0001: off + wait + jcharge L0001 + jbat L0002 L0001 + jump L0001 +L0002: on + delay.r 1250 + ramp.1 + swap + delay.r 10000 + ramp.1 + swap + jump L0001 diff --git a/extra/lightbar/programs/s3s0.bin b/extra/lightbar/programs/s3s0.bin Binary files differnew file mode 100644 index 0000000000..b277752d25 --- /dev/null +++ b/extra/lightbar/programs/s3s0.bin diff --git a/extra/lightbar/programs/s3s0.lbs b/extra/lightbar/programs/s3s0.lbs new file mode 100644 index 0000000000..0cac96f208 --- /dev/null +++ b/extra/lightbar/programs/s3s0.lbs @@ -0,0 +1,11 @@ +# S3S0 sequence: Google color ramp up/down. + set.rgb {0}.end 0x33 0x69 0xe8 + set.rgb {1}.end 0xd5 0x0f 0x25 + set.rgb {2}.end 0xee 0xb2 0x11 + set.rgb {3}.end 0x00 0x99 0x25 + delay.r 1250 + ramp.1 + swap + delay.r 10000 + ramp.1 + halt |