Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Abstract out transport -- libusb and hidapi #1316

Closed
mcuee opened this issue Mar 11, 2023 · 1 comment
Closed

Abstract out transport -- libusb and hidapi #1316

mcuee opened this issue Mar 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mcuee
Copy link
Collaborator

mcuee commented Mar 11, 2023

I am not so sure how difficult this is. I can see that the transport mechanisms are kind of abstracted out to a certain extent but not that clear. It would be good to improve the situation if possible.

Maybe serial port and parallel port are better asbstracted out but I did not look so deep into them. Parallel port is kind of dead anyway.

Example:

  1. HIDAPI: the following code is there but it does not seem to be widely used by the programmers, rather the programmers are still using <hidapi/hidapi.h> directly.
    https://github.com/avrdudes/avrdude/blob/main/src/usb_hidapi.c (probably this is not sufficient)

  2. libusb-0,1 API: the following code is there but I am not that so sure how widely it is used.
    https://github.com/avrdudes/avrdude/blob/main/src/usb_libusb.c

And then there are quite some fall back codes. I understand the needs to support as wide platforms as possible but I guess it does add to the complexity of the codes.

  1. usbasp -- try to use libusb-1.0 API, if not present then fall back to libusb-0.1 API
  2. HIDAPI based programmer -- use HIDAPI first, if not present then fall back to libusb
  3. PICKit 2 -- use libusb or Win32 API, it would be good to use HIDAPI instead and only fall back when HIDAPI is not present.
@mcuee
Copy link
Collaborator Author

mcuee commented Jun 21, 2023

Even though this is a nice to have enhancement, but it is not essential. So I will close this one for now.

@mcuee mcuee closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
@avrdudes avrdudes locked and limited conversation to collaborators Jun 24, 2023
@mcuee mcuee converted this issue into discussion #1431 Jun 24, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant