summaryrefslogtreecommitdiff
path: root/extra/lightbar
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-0529-1076/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-142-4/+3
| | | | | | | | | | | | | | | | | | | | There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* host_command: Change host command return value to enum ec_statusTom Hughes2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the host command handler callback function returns an int, it's easy to accidentally mix up the enum ec_error_list and enum ec_status types. The host commands always expect an enum ec_status type, so we change the return value to be of that explicit type. Compilation will then fail if you accidentally try to return an enum ec_error_list value. Ran the following commands and then manually fixed up a few remaining instances that were not caught: git grep --name-only 'static int .*(struct host_cmd_handler_args \*args)' |\ xargs sed -i 's#static int \(.*\)(struct host_cmd_handler_args \*args)#\ static enum ec_status \1(struct host_cmd_handler_args \*args)##' git grep --name-only 'int .*(struct host_cmd_handler_args \*args)' |\ xargs sed -i 's#int \(.*\)(struct host_cmd_handler_args \*args)#\ enum ec_status \1(struct host_cmd_handler_args \*args)##' BRANCH=none BUG=chromium:1004831 TEST=make buildall -j Cq-Depend: chrome-internal:1872675 Change-Id: Id93df9387ac53d016a1594dba86c6642babbfd1e Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1816865 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-195-5/+5
| | | | | | | | | | | | | | | | 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>
* tasks: convert TASK_EVENT_CUSTOM macro to bitJett Rink2019-04-241-5/+5
| | | | | | | | | | | | | | | | | | | | | We should ensure that all custom task definition are non-zero and fit with the globally defined events. Add compile time check and change semantics to specify bit number (instead of making all callers use the BIT macro). This also fixes an error with TASK_EVENT_PHY_TX_DONE for ITE being 0. The bug that made that happen hasn't landed on any firmware branches that use it though. BRANCH=none BUG=none TEST=builds Cq-Depend:chrome-internal:1178968,chrome-internal:1178952 Change-Id: I5e1d1312382d200280c548e9128e53f4eddd3e61 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1570607 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
* ec: Add macro to check if constant index is too largeGwendal Grignou2018-10-231-0/+2
| | | | | | | | | | | | | | | | | BUILD_ASSERT can only be used for declarative code, add a macro to check if a condition resolved at build time is true or not. Take advantage of compiler detection of division by zero error message. [-Werror=div-by-zero] BUG=none BRANCH=eve,nocturne TEST=compile, check error is detected when condition is not true. Change-Id: I4ab1ad4ae516c00c9e30e778dd81f18893ef1673 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1283969 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* cleanup: fix all the header guardsBill Richardson2015-06-181-3/+3
| | | | | | | | | | | | | | | This unifies all the EC header files to use __CROS_EC_FILENAME_H as the include guard. Well, except for test/ util/ and extra/ which use __TEST_ __UTIL_ and __EXTRA_ prefixes respectively. BUG=chromium:496895 BRANCH=none TEST=make buildall -j Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Iea71b3a08bdec94a11239de810a2b2e152b15029 Reviewed-on: https://chromium-review.googlesource.com/278121 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* lightbar: interpreter additions to encode other patternsEric Caruso2014-10-1522-1/+187
| | | | | | | | | | | | | | | | | | | | 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: bring the TAP sequence in graduallyBill Richardson2014-10-151-0/+1
| | | | | | | | | | | | | | | | | | | With only four LED segments, it's confusing to indicate a power percentage by dimming the top segment unless you can see the indicator smoothly ramping up from all-off. This does that. Kind of pretty, if I say so myself. BUG=chrome-os-partner:29041 BRANCH=ToT, Samus TEST=make buildall Run "ectool lightbar demo on", then press the T key to invoke the pattern and the arrow keys to fake the charge state. Change-Id: Ib6a56aea56078b8c1fc9edddda469d7f41735ff7 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223300 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* lightbar: Rename structs and macros for kernel cros_ec_commandsEric Caruso2014-10-092-5/+5
| | | | | | | | | | | | | | | 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: extra test programEric Caruso2014-10-091-0/+0
| | | | | | | | | | | | | | Gets a little more coverage on the SET_COLOR control operand. BUG=None BRANCH=ToT TEST=On hardware and simulator. Should appear exactly the same as rainbow-shift.bin. Change-Id: Id9c9948ae178884180e4d42e4fcceb58218423f8 Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/222004 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Remove PULSE and TEST sequences from lightbar moduleVic Yang2014-10-081-1/+0
| | | | | | | | | | | | | | | PULSE and TEST sequences are not used anywhere. Remove them to save flash space. Also, fix msleep(MSEC) calls in the unit test; it's essentially usleep(SECOND) written in an incorrect way. BUG=chrome-os-partner:32203 TEST=make buildall BRANCH=None Change-Id: I61ba897df632538eb89364a4c913d5fee87f3864 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220711 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* lightbar: test programs for seq type PROGRAMEric Caruso2014-09-268-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | These programs test various bytecode interpreter functions. rainbow-shift, red-green-blink and green-pulse produce visual effects, whereas the other three programs test error cases. bad-jump makes sure the interpreter stops if the PC goes out of bounds. bad-opcode makes sure the interpreter stops if it does not understand the instructions it is decoding. infinite-jump makes sure that sticking a tight loop in the EC (i.e., one not perforated with any DELAYs, RAMP_ONCEs, or CYCLE*s) does not cause it to hang or crash. bad-decode-8 and -32 test that malformed instructions are detected while decoding the instruction's immediate data. BUG=None BRANCH=ToT TEST=In simulator/scp files to device and test Change-Id: I6c189997a13e7c6196daa28eb74d5506b5288f2b Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219565 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* lightbar: add seq type PROGRAM for user-programmable sequencesEric Caruso2014-09-252-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | This diff allows the user to send small programs to the EC and gain control of the lightbar. Right now, this is only exposed through ectool, and sysfs support will come later. To send a program to the EC, use $ ectool lightbar program /path/to/program.bin and then start running the program with $ ectool lightbar seq program BUG=None BRANCH=ToT TEST=Using the above steps with hand-assembled programs. Checked that infinite bytecode loops do not hang the EC. Checked that bad opcodes exit with an error. Stress tested pushing programs and changing sequences. Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Change-Id: I635fb041a5dc5c403f7c26fb9a41b5563be9b6b7 Reviewed-on: https://chromium-review.googlesource.com/219558 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* extra: Move lightbar simulator into subdirectoryAnton Staaf2014-09-117-0/+848
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>