summaryrefslogtreecommitdiff
path: root/util/lbcc.c
Commit message (Collapse)AuthorAgeFilesLines
* util/lbcc: match up format string and argumentsPatrick Georgi2019-07-311-1/+1
| | | | | | | | | | | | | | | BUG=none BRANCH=none TEST=none Change-Id: Icfceebfa631a3a3f42095009e23c0562fa898bff Signed-off-by: Patrick Georgi <pgeorgi@google.com> Found-by: Coverity Scan #199442 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1725955 Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org> Auto-Submit: Patrick Georgi <pgeorgi@chromium.org>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-191-1/+1
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* common: bit change 1 << constants with BIT(constants)Gwendal Grignou2019-03-261-1/+1
| | | | | | | | | | | | | | | | | Mechanical replacement of bit operation where operand is a constant. More bit operation exist, but prone to errors. Reveal a bug in npcx: chip/npcx/system-npcx7.c:114:54: error: conversion from 'long unsigned int' to 'uint8_t' {aka 'volatile unsigned char'} changes value from '16777215' to '255' [-Werror=overflow] BUG=None BRANCH=None TEST=None Change-Id: I006614026143fa180702ac0d1cc2ceb1b3c6eeb0 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1518660 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* ec: fix a clang warning by use a unused variable.Yunlian Jiang2015-04-201-1/+1
| | | | | | | | | | | | | | | | This uses the variable 'usage' in an error message to fix a clang warning. BUG=chromium:475960 TEST=CC=x86_64-cros-linux-gnu-clang emerge-falco ec-devutils BRANCH=none Signed-off-by: yunlian@chromium.org Change-Id: Ic5703636040805661c7b81b83fc182e127ceab8c Reviewed-on: https://chromium-review.googlesource.com/266404 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Yunlian Jiang <yunlian@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
* ec: fix duplicate 'const' warning for clang..Yunlian Jiang2015-04-181-3/+3
| | | | | | | | | | | | | | | It fixes duplicate 'const' warning. BUG=chromium:475960 TEST=the warning is gone. BRANCH=none Signed-off-by: yunlian@chromium.org Change-Id: I348fbefec4d681bb8b20c6b8cf84acec4561b391 Reviewed-on: https://chromium-review.googlesource.com/266109 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@chromium.org> Tested-by: Yunlian Jiang <yunlian@chromium.org>
* lightbar: interpreter additions to encode other patternsEric Caruso2014-10-151-88/+176
| | | | | | | | | | | | | | | | | | | | 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>
* lightbar: Rename structs and macros for kernel cros_ec_commandsEric Caruso2014-10-091-21/+22
| | | | | | | | | | | | | | | This prepends EC_ a macro exposed in ec_commands.h, moves a macro into lbcc that is not used elsewhere, and changes lb_program structs to lightbar_program. BUG=None BRANCH=ToT TEST=make buildall -j Change-Id: I481562da72d91f846c64cf9af40338027641462c Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/222406 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* lightbar: treat HALT like a normal opcodeEric Caruso2014-10-011-1/+0
| | | | | | | | | | | | | | | | This removes the special casing around HALT. It saves us a string literal and some logic. In total, we gain about 50 bytes and a little cleanup for this. BUG=None BRANCH=ToT TEST=Tried a program that uses HALT (i.e. red-green-blink) in simulator and on hardware. Change-Id: Iffee1b559983fd1ecd385cc6b8967f72a6b968a0 Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220589 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add compiler/decompiler for lightbar bytecode programs.Bill Richardson2014-09-301-0/+602
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