Skip to content

Conversation

@DeqingSun
Copy link

This is a follow up of #54 and refered to dual-driver backend of https://github.com/ch32-rs/wlink/blob/217f0e5136892ffcc6a80204a601bc1b62159505/src/usb_device.rs#L161-L168

It changed device_handle from DeviceHandle<rusb::Context> to Option<DeviceHandle<rusb::Context>>. So it can be none when using CH375 driver. When compiled on win64, ch375_index stores the device index.

On win64, it will first try to use CH375 backend, then try libusb if unsuccessful.

It has been tested on Win10 with both CH375 and WinUSB driver, and Mac OS 14.7 on M2.

This is my first rust code and hopefully the code quality is OK.

@andelf
Copy link
Contributor

andelf commented Apr 24, 2025

Thanks. On my machine, the wlink.CH375 driver only functions when compiling in x86 mode; it does not work in x64 mode.

Are you experiencing the same issue?

@DeqingSun
Copy link
Author

Hmm, I did the opposite way. My local computer can not compile x86 32bit (or I didn't know how to do it). So I just made it in target_arch = "x86_64"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that packing DLL in this repo is not acceptable.
Better add a document section to tell user how to download it from WCH official.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fair, I will add the instructions in the readme and load dll exception.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DLL has been removed from this repo in the following commits.
DLL should be already in the system if WCHISPTOOL is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants