Skip to content

Commit

Permalink
remove unrelated Cargo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossless committed Mar 9, 2024
1 parent 576197b commit 82e2921
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 28 deletions.
35 changes: 25 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/carlossless/sinowealth-kb-tool"
version = "0.0.8"
edition = "2021"
license = "MIT"
rust-version = "1.76"
rust-version = "1.65"

[dependencies]
clap = "4.1"
Expand All @@ -17,9 +17,9 @@ md5 = "0.7"
thiserror = "1.0"

[dependencies.hidapi]
version = "2.6"
version = "2.4"
default-features = false
features = ["linux-static-libusb", "macos-shared-device"]
features = ["linux-static-libusb"]

[dependencies.log]
version = "0.4"
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ sinowealth-kb-tool read \
--isp_usage_page 0xff00 \ # optional
--isp_usage 0x0001 \ # optional
--isp_index 0 \ # optional
--reboot true \ # optional
foobar.hex
```

Expand All @@ -59,6 +60,7 @@ sinowealth-kb-tool write \
--isp_usage_page 0xff00 \ # optional
--isp_usage 0x0001 \ # optional
--isp_index 0 \ # optional
--reboot true \ # optional
foobar.hex
```

Expand Down Expand Up @@ -103,15 +105,19 @@ Make sure your user is part of the `plugdev` group.

### macOS

## Platform Support
Ensure that your terminal application has access to input devices/input monitoring. <verify this>

| Bootloader | Windows | macOS | Linux |
| -------------------------------- | ------- | ----- | ----- |
| 3e0ebd0c440af5236d7ff8872343f85d | true | true | true |
| cfc8661da8c9d7e351b36c0a763426aa | true | false | true |
| 2d169670eae0d36eae8188562c1f66e8 | check | check | check |
| e57490acebcaabfcff84a0ff013955d9 | check | check | check |
| 13df4ce2933f9654ffef80d6a3c27199 | check | check | check |
## Platform / Bootloader Support

| Bootloader | Windows | macOS | Linux |
| -------------------------------- | -------- | -------- | ----- |
| 3e0ebd0c440af5236d7ff8872343f85d | ok | ok | ok |
| cfc8661da8c9d7e351b36c0a763426aa | ok | fail[^1] | ok |
| 2d169670eae0d36eae8188562c1f66e8 | ok | ? | ok |
| e57490acebcaabfcff84a0ff013955d9 | ok | ? | ? |
| 13df4ce2933f9654ffef80d6a3c27199 | ? | ? | ok |

[^1]: macOS does not recognize the composite device as an HID device

## Acknowledgments

Expand Down
4 changes: 2 additions & 2 deletions src/isp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ impl ISPDevice {
if device_count == 1 {
return Err(ISPError::IrregularDeviceCount(device_count));
} else if device_count == 2 {
let mut request_device = devices[0];
let mut data_device = devices[1];
let request_device = devices[0];
let data_device = devices[1];
debug!("Request device: {:?}", request_device.path());
debug!("Data device: {:?}", data_device.path());
return Ok(HIDDevices {
Expand Down
7 changes: 2 additions & 5 deletions tools/functional-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ FILE_POST_WRITE="$FILE_PREFIX-post-write.hex"
FILE_POST_WRITE_CUSTOM="$FILE_PREFIX-post-write-custom.hex"

function reboot_device () {
echo "Turning off port..."
uhubctl -a off -p 1 -l 65-1
sleep 1
echo "Turning on port..."
uhubctl -a on -p 1 -l 65-1
echo "Cycling port power..."
uhubctl -a cycle -l "3-3.3.4.4" -p 4 -d 1
echo "Waiting..."
sleep 5
}
Expand Down

0 comments on commit 82e2921

Please sign in to comment.