larskanis/libusb

Please provide a convenient way to populate bmRequestType

gjasny opened this issue · 1 comments

Hello,

I was just porting Apple I/O Kit code to Ruby with libusb and wonder is there is a way to express the following in a convenient way:

req.bmRequestType = USBmakebmRequestType(kUSBIn, kUSBVendor, kUSBOther);

Thanks,
Gregor

Sorry for the late answer. You can do however:

include LIBUSB
req.bmRequestType = ENDPOINT_IN | REQUEST_TYPE_VENDOR | RECIPIENT_OTHER