Skip to content

Added hotplug support from libusb #21

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

Merged
merged 3 commits into from
Mar 7, 2023
Merged

Added hotplug support from libusb #21

merged 3 commits into from
Mar 7, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Mar 2, 2023

This allows for the removal of the polling thread.
Tested on Linux, seems working fine. To be tested on Mac and Windows and possibly look for alternatives.

@cmaglie cmaglie self-assigned this Mar 2, 2023
@cmaglie cmaglie requested a review from umbynos March 3, 2023 09:23
@cmaglie cmaglie linked an issue Mar 3, 2023 that may be closed by this pull request
@umbynos
Copy link
Contributor

umbynos commented Mar 3, 2023

On win:

HELLO 1 "cli"
{
  "eventType": "hello",
  "message": "OK",
  "protocolVersion": 1
}
START_SYNC
{
  "eventType": "start_sync",
  "message": "Cannot START_SYNC: Operation not supported or unimplemented on this platform",
  "error": true
}

@cmaglie
Copy link
Member Author

cmaglie commented Mar 6, 2023

For Windows we cannot use libusb, I've added another implementation for Windows.

The event listener has been implemented in arduino/go-win32-utils#4, once merged I will update the go.mod here to create the final version of this PR.

@cmaglie cmaglie marked this pull request as draft March 6, 2023 17:36
@cmaglie cmaglie marked this pull request as ready for review March 7, 2023 11:02
@cmaglie cmaglie merged commit db8a62e into master Mar 7, 2023
@cmaglie cmaglie deleted the hotplug_unix branch March 7, 2023 17:14
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event-based discovery START_SYNC is actually polling-based
3 participants