Skip to content

Commit

Permalink
reboot on all devices
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossless committed Mar 9, 2024
1 parent d2ba2f7 commit 02b9862
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 40 deletions.
35 changes: 10 additions & 25 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.65"
rust-version = "1.76"

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

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

[dependencies.log]
version = "0.4"
Expand Down
14 changes: 2 additions & 12 deletions src/isp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,7 @@ impl ISPDevice {
ReadType::Full => self.read(0, self.part.firmware_size + self.part.bootloader_size)?,
};

// The Royal Kludge RK84 ISO Return will be stuck in ISP mode otherwise
if self.part.product_id == PART_ROYALKLUDGE_RK84_ISO_RETURN.product_id
&& self.part.vendor_id == PART_ROYALKLUDGE_RK84_ISO_RETURN.vendor_id
{
self.reboot()?;
}
self.reboot()?;

return Ok(firmware);
}
Expand All @@ -320,12 +315,7 @@ impl ISPDevice {

self.enable_firmware()?;

// The Royal Kludge RK84 ISO Return will be stuck in ISP mode otherwise
if self.part.product_id == PART_ROYALKLUDGE_RK84_ISO_RETURN.product_id
&& self.part.vendor_id == PART_ROYALKLUDGE_RK84_ISO_RETURN.vendor_id
{
self.reboot()?;
}
self.reboot()?;

Ok(())
}
Expand Down

0 comments on commit 02b9862

Please sign in to comment.