Skip to content
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

v1: Add hidapi_context #623

Open
Youw opened this issue Sep 4, 2023 · 0 comments
Open

v1: Add hidapi_context #623

Youw opened this issue Sep 4, 2023 · 0 comments
Labels
Core Related to common codes like hidapi.h enhancement New feature or request

Comments

@Youw
Copy link
Member

Youw commented Sep 4, 2023

Instead of having a single hid_init()/hid_exit() we need to have independent HIDAPI contexts, so that HIDAPI can be used by different threads/modules independently.

e.g.:

struct hidapi_context;

int hidapi_initialize(struct hidapi_context** ctx);
int hidapi_exit(struct hidapi_context* ctx);

struct hidapi_dev_info* hidapi_enumerate(struct hidapi_context* ctx, hidapi_enumerate_filter* filter);
struct hidapi_device* hidapi_open(struct hidapi_context* ctx, const char* dev_path);

Details to be refined/updated.

@Youw Youw added enhancement New feature or request Core Related to common codes like hidapi.h labels Sep 4, 2023
@github-project-automation github-project-automation bot moved this to To do in API v1 Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Related to common codes like hidapi.h enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

1 participant