/* USB::Setting#iInterface */ static VALUE rusb_setting_iInterface(VALUE v) { return INT2FIX(get_usb_interface_descriptor(v)->iInterface); } /* USB::Setting#endpoints */ static VALUE rusb_setting_endpoints(VALUE v) { struct usb_interface_descriptor *p = get_usb_interface_descriptor(v); int i; VALUE endpoint = rb_ary_new2(p->bNumEndpoints); for (i = 0; i < p->bNumEndpoints; i++) rb_ary_store(endpoint, i, rusb_endpoint_descriptor_make(&p->endpoint[i], v)); return endpoint; }