42 Commits

Author SHA1 Message Date
Ian Douglas Scott
71f0f1e181 ectool 0.3.0
Crates depending on both ectool and hidapi will have to disable hidapi's
default features (annoyingly) or it will fail to compile saying only one
backend should be enabled.
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
e30779ab8d tool: Accesor method for HidDevice 2021-02-22 08:08:49 -07:00
Ian Douglas Scott
2768925ec6 tool: Support downcasting generic Ec
Removes the `impl Access for &mut dyn Access` I added earlier. But that
hasn't proven too useful.
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
171257916c tool: CLI for color/brightness 2021-02-22 08:08:49 -07:00
Ian Douglas Scott
49b79f665b tool: Add --access argument to work with sim or hid 2021-02-22 08:08:49 -07:00
Ian Douglas Scott
7c5ba4e62c tool: Use clap for argument parsing 2021-02-22 08:08:49 -07:00
Ian Douglas Scott
504284bf72 tool: Move read_debug to trait so generic code can use it
Returns error for backends that don't support it.
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
0c1584385c tool: Support for owned and unowned generic Ec 2021-02-22 08:08:49 -07:00
Ian Douglas Scott
f4458aebca tool: Use hidraw backend of hidapi
The default libusb backend just returns the string "hid_error is not
implemented yet" for all errors, while the hidraw backend at least gives
something correct if vague.

I'm not aware of any disadvantage other that not being (properly)
supported with really ancient kernels. It seems to work fine.
2021-02-22 08:08:49 -07:00
Jeremy Soller
12a9ac8d84 ectool 0.2.3 2021-01-15 08:34:31 -07:00
Jeremy Soller
304e7534c9 Add led value and color commands 2021-01-15 08:34:31 -07:00
Ian Douglas Scott
42f1b4863f Add AccessLpcSim for communicating with ecsim
Probably the duplicated logic in `access/lpc/*` should be factored out
in some way, but it's a bit awkward to do so without defining a trait
that would be part of the public API...
2020-12-08 13:46:35 -07:00
Ian Douglas Scott
802bf417cc tool: Use From<T> for slightly neater error handling 2020-12-08 13:46:35 -07:00
Jeremy Soller
b2aa7ba975 ectool 0.2.2: Use buffer to improve SPI performance 2020-10-06 09:31:34 -07:00
Jeremy Soller
726a0e0837 ectool version 0.2.1:
- Add hidapi feature
- Add redox_hwio feature
- Add feature documentation
2020-10-02 09:05:25 -07:00
Jeremy Soller
8da8342e40
ectool version 2.0 2020-10-01 20:36:21 -06:00
Jeremy Soller
eff4caa752 Refactor SMFI interface and ectool 2020-10-01 19:35:34 -07:00
Jeremy Soller
99ef48f9c4 Address PR feedback 2020-09-29 19:42:05 -06:00
Jeremy Soller
ad5cd931e3 Move StdTimeout to ectool under std feature 2020-09-29 19:42:05 -06:00
Jeremy Soller
de26cdfa74 Commands for reading and setting keyboard map 2020-09-29 19:42:05 -06:00
Jeremy Soller
a8b38d6b37
tool: 0.1.3 - add backup ROM flashing 2020-04-06 16:39:40 -06:00
Jeremy Soller
20d3808aed
Allow a config.mk to be created that contains BOARD, KEYMAP, etc. 2020-04-04 13:01:13 -06:00
Jeremy Soller
82b7079f73
Add tool for collecting power/temp information 2020-04-04 08:23:52 -06:00
Jeremy Soller
62a909ee81
Improve fan curve
- Implement fan cooldown and heatup periods
- Add fan get/set commands
- Fix compilation with logging level lower than debug
2020-04-04 07:30:05 -06:00
Jeremy Soller
6bfe5bb99a
Update Cargo.lock 2020-03-31 12:08:18 -06:00
Jeremy Soller
b0f6d7314a
ectool 0.1.2 - support building on rust stable 2020-03-31 12:07:32 -06:00
Jeremy Soller
25a60568d0
Add print command 2020-03-14 21:13:07 -06:00
Jeremy Soller
e2c6fd7b82
ectool 0.1.1 2020-02-27 15:07:16 -07:00
Jeremy Soller
ff01da5f12
Write and erase at the same time to improve speed 2020-02-27 15:05:28 -07:00
Jeremy Soller
d1468da590
Use 1024 byte erase 2020-02-27 14:48:24 -07:00
Jeremy Soller
33cc2a2a76
Better output when flashing EC 2020-02-27 14:46:32 -07:00
Jeremy Soller
6ac21ace9c
Set spi target to main 2020-02-27 13:30:33 -07:00
Jeremy Soller
e8dd295daa
Parameterize flash_inner 2020-02-27 13:21:59 -07:00
Jeremy Soller
68b9acd249
Add ability to flash backup rom 2020-02-26 13:43:31 -07:00
Jeremy Soller
657437e1ce
Faster flashing with SMFI (#32)
* WIP: support for new flashing API

* Add SPI flashing support to tool

* Add timeouts when flashing with ectool

* Test SPI reading

* Use chunks for SPI commands

* Sanity test of flash size

* Read rom in sectors

* Relocate memmap region, remove PMC3

* Use ectool to flash

* Remove debugging of spi command

* Fix flashing over smfi
2020-02-26 09:04:40 -07:00
Jeremy Soller
f1cf00bdb8
Do not spin in scratch PMC handling 2020-02-24 14:08:16 -07:00
Jeremy Soller
8d0bab01f7
Add more subcommands to tool 2020-02-24 13:42:00 -07:00
Jeremy Soller
d511a57bff
Add firmware struct to tool 2020-02-24 10:23:36 -07:00
Jeremy Soller
369a695bd9
Add timeout macro to simplify timeout logic 2020-02-20 21:09:10 -07:00
Jeremy Soller
85e7225e95
License tool as MIT to allow use in firmware-update 2020-02-20 15:26:59 -07:00
Jeremy Soller
346775b941
Fix ectool command_finish 2020-02-20 15:01:40 -07:00
Jeremy Soller
08490002b9
Add tool (WIP) 2020-02-20 14:20:16 -07:00