Skip to content

Adding Ch375 dll64 access on windows #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

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.

1 participant