Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions Cargo.lock

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

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ object = { version = "0.38", default-features = false, features = [
] }
indicatif = "0.18"
serialport = "4.7"
libloading = "0.9"
chrono = "0.4"
clap-verbosity-flag = "3"

[target.'cfg(all(target_os = "windows", target_arch = "x86"))'.dependencies]
libloading = "0.9"

[target.'cfg(all(target_os = "windows"))'.dependencies]
windows = { version = "0.62.2", features = [
"Win32_Devices_DeviceAndDriverInstallation",
"Win32_Devices_Usb",
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_IO",
] }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- [x] Enable or Disable 3.3V, 5V output
- [x] [SDI print](https://www.cnblogs.com/liaigu/p/17628184.html) support, requires 2.10+ firmware
- [x] [Serial port watching](https://github.com/ch32-rs/wlink/pull/36) for a smooth development experience
- [x] Windows native driver support, no need to install libusb manually (requires x86 build)
- [x] Windows native driver support, no need to install libusb manually

## Tested On

Expand Down
3 changes: 3 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ pub enum Error {
Io(#[from] std::io::Error),
#[error("Driver error")]
Driver,
#[cfg(all(target_os = "windows"))]
#[error("Windows error: {0}")]
Windows(#[from] windows::core::Error),
}

#[derive(Debug, Clone, Copy)]
Expand Down
Loading