Lines Matching refs:setup

465 static int dfu_class_handle_to_host(struct usb_setup_packet *setup,  in dfu_class_handle_to_host()  argument
472 switch (setup->bRequest) { in dfu_class_handle_to_host()
507 setup->wValue, setup->wLength, dfu_data.state); in dfu_class_handle_to_host()
526 if (!setup->wLength || in dfu_class_handle_to_host()
527 dfu_data.block_nr != setup->wValue) { in dfu_class_handle_to_host()
529 "len %d", setup->wValue, in dfu_class_handle_to_host()
530 dfu_data.block_nr, setup->wLength); in dfu_class_handle_to_host()
539 if (bytes_left < setup->wLength) { in dfu_class_handle_to_host()
542 len = setup->wLength; in dfu_class_handle_to_host()
579 len < setup->wLength) { in dfu_class_handle_to_host()
601 setup->bmRequestType, setup->bRequest); in dfu_class_handle_to_host()
608 static int dfu_class_handle_to_device(struct usb_setup_packet *setup, in dfu_class_handle_to_device() argument
613 switch (setup->bRequest) { in dfu_class_handle_to_device()
639 setup->wValue, setup->wLength, dfu_data.state); in dfu_class_handle_to_device()
660 dfu_data_worker.worker_len = setup->wLength; in dfu_class_handle_to_device()
661 memcpy(dfu_data_worker.buf, *data, setup->wLength); in dfu_class_handle_to_device()
667 dfu_data_worker.worker_len = setup->wLength; in dfu_class_handle_to_device()
669 memcpy(dfu_data_worker.buf, *data, setup->wLength); in dfu_class_handle_to_device()
682 setup->wValue, dfu_data.state); in dfu_class_handle_to_device()
700 timeout = MIN(setup->wValue, CONFIG_USB_DFU_DETACH_TIMEOUT); in dfu_class_handle_to_device()
706 setup->bmRequestType, setup->bRequest); in dfu_class_handle_to_device()
722 static int dfu_class_handle_req(struct usb_setup_packet *setup, in dfu_class_handle_req() argument
725 if (usb_reqtype_is_to_host(setup)) { in dfu_class_handle_req()
726 return dfu_class_handle_to_host(setup, data_len, data); in dfu_class_handle_req()
728 return dfu_class_handle_to_device(setup, data_len, data); in dfu_class_handle_req()
798 static int dfu_custom_handle_req(struct usb_setup_packet *setup, in dfu_custom_handle_req() argument
803 if (usb_reqtype_is_to_host(setup) || in dfu_custom_handle_req()
804 setup->RequestType.recipient != USB_REQTYPE_RECIPIENT_INTERFACE) { in dfu_custom_handle_req()
808 if (setup->bRequest == USB_SREQ_SET_INTERFACE) { in dfu_custom_handle_req()
809 LOG_DBG("DFU alternate setting %d", setup->wValue); in dfu_custom_handle_req()
813 switch (setup->wValue) { in dfu_custom_handle_req()
834 dfu_data.alt_setting = setup->wValue; in dfu_custom_handle_req()