/* USB::Endpoint#bDescriptorType */ static VALUE rusb_endpoint_bDescriptorType(VALUE v) { return INT2FIX(get_usb_endpoint_descriptor(v)->bDescriptorType); } /* USB::Endpoint#bEndpointAddress */ static VALUE rusb_endpoint_bEndpointAddress(VALUE v) { return INT2FIX(get_usb_endpoint_descriptor(v)->bEndpointAddress); } /* USB::Endpoint#bmAttributes */ static VALUE rusb_endpoint_bmAttributes(VALUE v) { return INT2FIX(get_usb_endpoint_descriptor(v)->bmAttributes); } /* USB::Endpoint#wMaxPacketSize */ static VALUE rusb_endpoint_wMaxPacketSize(VALUE v) { return INT2FIX(get_usb_endpoint_descriptor(v)->wMaxPacketSize); } /* USB::Endpoint#bInterval */ static VALUE rusb_endpoint_bInterval(VALUE v) { return INT2FIX(get_usb_endpoint_descriptor(v)->bInterval); } /* USB::Endpoint#bRefresh */ static VALUE rusb_endpoint_bRefresh(VALUE v) { return INT2FIX(get_usb_endpoint_descriptor(v)->bRefresh); } /* USB::Endpoint#bSynchAddress */ static VALUE rusb_endpoint_bSynchAddress(VALUE v) { return INT2FIX(get_usb_endpoint_descriptor(v)->bSynchAddress); } /* -------- USB::DevHandle -------- */ static VALUE rb_cUSB_DevHandle; void rusb_devhandle_free(void *_h) { usb_dev_handle *h = (usb_dev_handle *)_h; if (h) usb_close(h); }