Lines Matching refs:command
71 usb_raw_command command; in Do() local
72 command.control.request_type = setup->bmRequestType; in Do()
73 command.control.request = setup->bRequest; in Do()
74 command.control.value = setup->wValue; in Do()
75 command.control.index = setup->wIndex; in Do()
76 command.control.length = setup->wLength; in Do()
77 command.control.data = fLibusbTransfer->buffer + LIBUSB_CONTROL_SETUP_SIZE; in Do()
80 if (ioctl(fRawFD, B_USB_RAW_COMMAND_CONTROL_TRANSFER, &command, sizeof(command)) || in Do()
81 command.control.status != B_USB_RAW_STATUS_SUCCESS) { in Do()
86 fUsbiTransfer->transferred = command.control.length; in Do()
92 usb_raw_command command; in Do() local
93 command.transfer.interface = fUSBDevice->EndpointToInterface(fLibusbTransfer->endpoint); in Do()
94 command.transfer.endpoint = fUSBDevice->EndpointToIndex(fLibusbTransfer->endpoint); in Do()
95 command.transfer.data = fLibusbTransfer->buffer; in Do()
96 command.transfer.length = fLibusbTransfer->length; in Do()
100 if (ioctl(fRawFD, B_USB_RAW_COMMAND_BULK_TRANSFER, &command, sizeof(command)) || in Do()
101 command.transfer.status != B_USB_RAW_STATUS_SUCCESS) { in Do()
108 if (ioctl(fRawFD, B_USB_RAW_COMMAND_INTERRUPT_TRANSFER, &command, sizeof(command)) || in Do()
109 command.transfer.status != B_USB_RAW_STATUS_SUCCESS) { in Do()
115 fUsbiTransfer->transferred = command.transfer.length; in Do()
121 usb_raw_command command; in Do() local
122 command.isochronous.interface = fUSBDevice->EndpointToInterface(fLibusbTransfer->endpoint); in Do()
123 command.isochronous.endpoint = fUSBDevice->EndpointToIndex(fLibusbTransfer->endpoint); in Do()
124 command.isochronous.data = fLibusbTransfer->buffer; in Do()
125 command.isochronous.length = fLibusbTransfer->length; in Do()
126 command.isochronous.packet_count = fLibusbTransfer->num_iso_packets; in Do()
139 command.isochronous.packet_descriptors = packetDescriptors; in Do()
142 if (ioctl(fRawFD, B_USB_RAW_COMMAND_ISOCHRONOUS_TRANSFER, &command, sizeof(command)) || in Do()
143 command.isochronous.status != B_USB_RAW_STATUS_SUCCESS) { in Do()
161 fUsbiTransfer->transferred = command.transfer.length; in Do()
277 usb_raw_command command; in SetConfiguration() local
278 command.config.config_index = config_index; in SetConfiguration()
279 if (ioctl(fRawFD, B_USB_RAW_COMMAND_SET_CONFIGURATION, &command, sizeof(command)) || in SetConfiguration()
280 command.config.status != B_USB_RAW_STATUS_SUCCESS) { in SetConfiguration()
281 return _errno_to_libusb(command.config.status); in SetConfiguration()
290 usb_raw_command command; in SetAltSetting() local
291 command.alternate.config_index = fUSBDevice->ActiveConfigurationIndex(); in SetAltSetting()
292 command.alternate.interface_index = inumber; in SetAltSetting()
293 if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_ACTIVE_ALT_INTERFACE_INDEX, &command, sizeof(command)) || in SetAltSetting()
294 command.alternate.status != B_USB_RAW_STATUS_SUCCESS) { in SetAltSetting()
296 return _errno_to_libusb(command.alternate.status); in SetAltSetting()
298 if (command.alternate.alternate_info == alt) { in SetAltSetting()
302 command.alternate.alternate_info = alt; in SetAltSetting()
303 if (ioctl(fRawFD, B_USB_RAW_COMMAND_SET_ALT_INTERFACE, &command, sizeof(command)) || in SetAltSetting()
304 …command.alternate.status != B_USB_RAW_STATUS_SUCCESS) { //IF IOCTL FAILS DEVICE DISONNECTED PROBAB… in SetAltSetting()
306 return _errno_to_libusb(command.alternate.status); in SetAltSetting()
438 usb_raw_command command; in Initialise() local
439 command.device.descriptor = &fDeviceDescriptor; in Initialise()
440 if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_DEVICE_DESCRIPTOR, &command, sizeof(command)) || in Initialise()
441 command.device.status != B_USB_RAW_STATUS_SUCCESS) { in Initialise()
451 command.config.descriptor = &tmp_config; in Initialise()
452 command.config.config_index = i; in Initialise()
453 if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_CONFIGURATION_DESCRIPTOR, &command, sizeof(command)) || in Initialise()
454 command.config.status != B_USB_RAW_STATUS_SUCCESS) { in Initialise()
461 command.control.request_type = 128; in Initialise()
462 command.control.request = 6; in Initialise()
463 command.control.value = (2 << 8) | i; in Initialise()
464 command.control.index = 0; in Initialise()
465 command.control.length = tmp_config.total_length; in Initialise()
466 command.control.data = fConfigurationDescriptors[i]; in Initialise()
467 if (ioctl(fRawFD, B_USB_RAW_COMMAND_CONTROL_TRANSFER, &command, sizeof(command)) || in Initialise()
468 command.control.status!=B_USB_RAW_STATUS_SUCCESS) { in Initialise()
474 command.alternate.config_index = i; in Initialise()
475 command.alternate.interface_index = j; in Initialise()
476 if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_ALT_INTERFACE_COUNT, &command, sizeof(command)) || in Initialise()
477 command.config.status != B_USB_RAW_STATUS_SUCCESS) { in Initialise()
482 int num_alternate = command.alternate.alternate_info; in Initialise()
485 command.interface_etc.config_index = i; in Initialise()
486 command.interface_etc.interface_index = j; in Initialise()
487 command.interface_etc.alternate_index = k; in Initialise()
488 command.interface_etc.descriptor = &tmp_interface; in Initialise()
489 if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_INTERFACE_DESCRIPTOR_ETC, &command, sizeof(command)) || in Initialise()
490 command.config.status != B_USB_RAW_STATUS_SUCCESS) { in Initialise()
497 command.endpoint_etc.config_index = i; in Initialise()
498 command.endpoint_etc.interface_index = j; in Initialise()
499 command.endpoint_etc.alternate_index = k; in Initialise()
500 command.endpoint_etc.endpoint_index = l; in Initialise()
501 command.endpoint_etc.descriptor = &tmp_endpoint; in Initialise()
502 if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_ENDPOINT_DESCRIPTOR_ETC, &command, sizeof(command)) || in Initialise()
503 command.config.status != B_USB_RAW_STATUS_SUCCESS) { in Initialise()