diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/microboot.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/firmware/microboot.rb b/firmware/microboot.rb index 0b3ec58..c719e83 100644 --- a/firmware/microboot.rb +++ b/firmware/microboot.rb @@ -108,14 +108,12 @@ class MicroBoot timeout: 5000 }.merge opts) end - - - - def usb_request_type opts - c = LIBUSB::Call - value = c::RequestTypes[:REQUEST_TYPE_VENDOR] | c::RequestRecipients[:RECIPIENT_DEVICE] - value |= c::EndpointDirections[:ENDPOINT_OUT] if opts.has_key? :dataOut - value |= c::EndpointDirections[:ENDPOINT_IN] if opts.has_key? :dataIn + + # calculate usb request type + def usb_request_type opts #:nodoc: + value = LIBUSB::REQUEST_TYPE_VENDOR | LIBUSB::RECIPIENT_DEVICE + value |= LIBUSB::ENDPOINT_OUT if opts.has_key? :dataOut + value |= LIBUSB::ENDPOINT_IN if opts.has_key? :dataIn return value end end |