Tim Crawford
acf67d4413
tool: Assume ROM size is total flash size
...
Remove the hard-coded assumption that the EC is always 128K, as ITE
chips can also be 256K (which Clevo has started using since addw4).
Instead assume the ROM is correctly sized, which we do since
0d83819a21
("Pad binary file to total flash size") and proprietary
firmware has always done.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2024-02-28 11:40:32 -07:00
Ian Douglas Scott
47b070418a
ectool: Use clap derive syntax
...
Co-authored-by: Tim Crawford <tcrawford@system76.com >
2023-12-08 16:04:37 -07:00
Tim Crawford
166e03972b
tool: Derive Eq, PartialEq on enums
...
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2023-10-05 14:32:15 -06:00
Tim Crawford
4fa389e1bd
tool: Fix clippy warnings
...
Fix:
- clippy::unnecessary_cast
- clippy::needless_borrow
Allow:
- clippy::uninlined_format_args
- clippy::get_first
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2023-10-05 14:32:15 -06:00
Tim Crawford
782f18a3f6
tool: Update toolchain, edition, deps
...
- Update toolchain to nightly-2023-09-07
- Update edition to 2021
- Update deps
`OpenHidDeviceError` is deprecated, and is removed in newer versions.
Replace it with `HidApiErrorEmpty`, because there are no descriptions
for what anything means so I just picked one that didn't require fields.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2023-10-05 14:32:15 -06:00
13r0ck
fe6faa21fc
Add reset command to ectool
2023-06-14 13:50:20 -06:00
Jeremy Soller
4a1e0a5aa8
Add optional EC security state and documentation
2023-04-03 13:06:16 -06:00
Tim Crawford
1046dd7aec
Update Rust toolchain to 2023-01-21
...
Update the toolchain and deps, and use the sparse registry access.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2023-02-18 06:28:21 -07:00
Tim Crawford
a8e37276e9
tool: Disable default features of redox-hwio
...
Fixes using as a dependency in no-std environments.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2022-12-20 13:41:02 -07:00
Tim Crawford
1019878e3c
tool: Update dependencies
...
clap is only updated to 3.2 instead of 4.0 because I didn't want to deal
with all the changes.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2022-11-30 08:39:16 -07:00
13r0ck
be5d34dc0d
Add other launch keyboards
2022-11-01 16:22:11 -06:00
Tim Crawford
5780bb5e83
Update Rust toolchain to 2022-03-18
...
Match the toolchain used by Redox.
Update dependencies and submodules to fix building.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2022-04-04 18:59:20 -06:00
Ian Douglas Scott
ab0c55fae2
ectool 0.3.8
2021-11-19 13:32:00 -08:00
Ian Douglas Scott
85595a8d4c
tool: Add a system76_ec command to disable input events
...
For testing Launch keyboards.
Could easily support in EC firmware as well if we had a use for that,
but not adding that for now.
2021-11-18 13:08:05 -08:00
Jeremy Soller
d9ce247a15
ectool: update lock file
2021-11-17 18:27:11 -07:00
Jeremy Soller
95632b4503
ectool: use linux-shared-hidraw feature for hidapi
2021-11-17 18:26:26 -07:00
Tim Crawford
43e5cf4ba3
Fix or silence clippy warnings on nightly
...
Fix:
- dead_code
- clippy::if_then_panic
- clippy::manual_memcpy
- clippy::needless_borrow
Silence:
- clippy::missing_safety_doc
- clippy::needless_range_loop
- clippy::single_match
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2021-10-26 11:35:48 -06:00
Tim Crawford
975377af42
Update Rust toolchain to 2021-06-15
...
Update toolchain to match the version used in Redox.
Update dependencies to fix build.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2021-10-26 11:35:48 -06:00
Ian Douglas Scott
55523d4083
ectool 0.3.6
2021-04-13 11:04:51 -06:00
Ian Douglas Scott
84d5c6b79d
tool: Make Access
require Send
and 'static
...
This allows the Configurator to send a `Ec<Box<dyn Access>>` through a
channel to a background thread. This could be done differently, but
presumably there's no reason to have an `Access` implementation this
doesn't apply to.
2021-04-13 11:04:51 -06:00
Jeremy Soller
61428bd198
ectool 0.3.5
2021-03-16 10:33:46 -06:00
Jeremy Soller
0017450cbb
Add LED_SAVE command
2021-03-16 10:33:46 -06:00
Jeremy Soller
91d128f0a0
ectool 0.3.4
2021-03-04 13:52:25 -07:00
Jeremy Soller
aab45bfcc1
Add layer parameter for LED_GET_MODE and LED_SET_MODE commands
2021-03-04 13:52:25 -07:00
Ian Douglas Scott
301eef6f21
tool: Fix and CI test with redox_hwio
2021-03-04 13:51:19 -07:00
Ian Douglas Scott
59df32814b
tool: Don't depend on clap
when without default features
2021-03-04 13:51:19 -07:00
Ian Douglas Scott
325762d4d8
tool: Fix building without std
feature
2021-03-04 13:51:19 -07:00
Jeremy Soller
8825b906bd
ectool 0.3.3
2021-03-01 11:51:08 -07:00
Jeremy Soller
f30a9d84f7
Fix unused variable warning
2021-03-01 11:50:31 -07:00
Jeremy Soller
2ef4cd7bbd
Add matrix command
2021-03-01 11:50:31 -07:00
Ian Douglas Scott
4cd4df03e8
ectool 0.3.2
2021-02-26 12:18:02 -07:00
Ian Douglas Scott
b11bc64bba
tool: API and CLI for LED matrix mode
2021-02-26 12:18:02 -07:00
Jeremy Soller
73a5d8b8a1
ectool 0.3.1: Implement read_debug for Box<dyn Access>
2021-02-23 09:45:55 -07:00
Tim Crawford
3e154d7f00
Add missing SPDX identifiers
2021-02-22 14:02:18 -07:00
Tim Crawford
9ef191edff
tool: Update copyright year
2021-02-22 13:58:53 -07:00
Tim Crawford
44a0b887c4
tool: Replace ICU license text with MIT license
...
Cargo.toml declares MIT license, but the included LICENSE is the ICU
variant. Replace the text, as formatted on choosealicense [1].
[1]: https://choosealicense.com/licenses/mit/
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2021-02-22 13:58:53 -07:00
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