jpathy / hidapi

FFI bindings for hidapi
MIT License
1 stars 3 forks source link

`hid-open` doesn't allow omitting serial-number #2

Open kengruven opened 1 year ago

kengruven commented 1 year ago

The hid-open procedure has a mandatory #:serial-number parameter, of type string?. In the C library, the sample code begins with:

handle = hid_open(0x4d8, 0x3f, NULL);

showing that the serial number is optional. In Racket, it's a non-optional keyword, and passing #f throws a contract violation.

jpathy commented 1 year ago

Thanks for your report. I will fix it over the weekend.