fix #449 remove obsolete pipehandle from hid host

This commit is contained in:
hathach
2020-09-03 17:07:29 +07:00
parent 1d83ad0ebb
commit ef651e0734
5 changed files with 45 additions and 44 deletions

View File

@@ -306,7 +306,7 @@ bool msch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *it
ep_desc = (tusb_desc_endpoint_t const *) tu_desc_next(ep_desc);
}
p_msc->itf_numr = itf_desc->bInterfaceNumber;
p_msc->itf_num = itf_desc->bInterfaceNumber;
(*p_length) += sizeof(tusb_desc_interface_t) + 2*sizeof(tusb_desc_endpoint_t);
//------------- Get Max Lun -------------//
@@ -315,7 +315,7 @@ bool msch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *it
.bmRequestType_bit = { .recipient = TUSB_REQ_RCPT_INTERFACE, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_IN },
.bRequest = MSC_REQ_GET_MAX_LUN,
.wValue = 0,
.wIndex = p_msc->itf_numr,
.wIndex = p_msc->itf_num,
.wLength = 1
};
// TODO STALL means zero
@@ -328,7 +328,7 @@ bool msch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *it
.bmRequestType_bit = { .recipient = TUSB_REQ_RCPT_INTERFACE, .type = TUSB_REQ_TYPE_CLASS, .direction = TUSB_DIR_OUT },
.bRequest = MSC_REQ_RESET,
.wValue = 0,
.wIndex = p_msc->itf_numr,
.wIndex = p_msc->itf_num,
.wLength = 0
};
TU_ASSERT( usbh_control_xfer( dev_addr, &request, NULL ) );

View File

@@ -175,7 +175,7 @@ void tuh_msc_isr(uint8_t dev_addr, xfer_result_t event, uint32_t xferred_bytes);
//--------------------------------------------------------------------+
typedef struct
{
uint8_t itf_numr;
uint8_t itf_num;
uint8_t ep_in;
uint8_t ep_out;