mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
tusb_type rename
This commit is contained in:
parent
26d81c3ea1
commit
d71334c348
@ -213,7 +213,7 @@ void cdcd_close(uint8_t port)
|
||||
tusb_error_t cdcd_control_request_subtask(uint8_t port, tusb_control_request_t const * p_request)
|
||||
{
|
||||
//------------- Class Specific Request -------------//
|
||||
if (p_request->bmRequestType_bit.type != TUSB_REQUEST_TYPE_CLASS) return TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT;
|
||||
if (p_request->bmRequestType_bit.type != TUSB_REQ_TYPE_CLASS) return TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT;
|
||||
|
||||
switch(p_request->bRequest)
|
||||
{
|
||||
|
@ -245,7 +245,7 @@ static tusb_error_t send_message_get_response_subtask( uint8_t dev_addr, cdch_da
|
||||
|
||||
//------------- Send RNDIS Control Message -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_INTERFACE),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_INTERFACE),
|
||||
CDC_REQUEST_SEND_ENCAPSULATED_COMMAND, 0, p_cdc->interface_number,
|
||||
mess_length, p_mess),
|
||||
error
|
||||
@ -260,7 +260,7 @@ static tusb_error_t send_message_get_response_subtask( uint8_t dev_addr, cdch_da
|
||||
|
||||
//------------- Get RNDIS Message Initialize Complete -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_INTERFACE),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_INTERFACE),
|
||||
CDC_REQUEST_GET_ENCAPSULATED_RESPONSE, 0, p_cdc->interface_number,
|
||||
RNDIS_MSG_PAYLOAD_MAX, p_response),
|
||||
error
|
||||
|
@ -190,7 +190,7 @@ tusb_error_t hidd_control_request_subtask(uint8_t port, tusb_control_request_t c
|
||||
hidd_interface_t* const p_hid = p_driver->p_interface;
|
||||
|
||||
//------------- STD Request -------------//
|
||||
if (p_request->bmRequestType_bit.type == TUSB_REQUEST_TYPE_STANDARD)
|
||||
if (p_request->bmRequestType_bit.type == TUSB_REQ_TYPE_STANDARD)
|
||||
{
|
||||
uint8_t const desc_type = u16_high_u8(p_request->wValue);
|
||||
uint8_t const desc_index = u16_low_u8 (p_request->wValue);
|
||||
@ -205,7 +205,7 @@ tusb_error_t hidd_control_request_subtask(uint8_t port, tusb_control_request_t c
|
||||
tusb_dcd_control_xfer(port, TUSB_DIR_IN, m_hid_buffer, p_hid->report_length, false);
|
||||
}
|
||||
//------------- Class Specific Request -------------//
|
||||
else if (p_request->bmRequestType_bit.type == TUSB_REQUEST_TYPE_CLASS)
|
||||
else if (p_request->bmRequestType_bit.type == TUSB_REQ_TYPE_CLASS)
|
||||
{
|
||||
OSAL_SUBTASK_BEGIN
|
||||
|
||||
|
@ -199,7 +199,7 @@ tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
|
||||
|
||||
//------------- SET IDLE (0) request -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_INTERFACE),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_INTERFACE),
|
||||
HID_REQUEST_CONTROL_SET_IDLE, 0, p_interface_desc->bInterfaceNumber,
|
||||
0, NULL ),
|
||||
error
|
||||
@ -211,7 +211,7 @@ tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
|
||||
if ( p_desc_hid->bNumDescriptors )
|
||||
{
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_INTERFACE),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_INTERFACE),
|
||||
TUSB_REQUEST_GET_DESCRIPTOR, (p_desc_hid->bReportType << 8), 0,
|
||||
p_desc_hid->wReportLength, report_descriptor ),
|
||||
error
|
||||
|
@ -123,7 +123,7 @@ tusb_error_t mscd_open(uint8_t port, tusb_descriptor_interface_t const * p_inter
|
||||
|
||||
tusb_error_t mscd_control_request_subtask(uint8_t port, tusb_control_request_t const * p_request)
|
||||
{
|
||||
ASSERT(p_request->bmRequestType_bit.type == TUSB_REQUEST_TYPE_CLASS, TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT);
|
||||
ASSERT(p_request->bmRequestType_bit.type == TUSB_REQ_TYPE_CLASS, TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT);
|
||||
|
||||
mscd_interface_t * p_msc = &mscd_data;
|
||||
|
||||
|
@ -328,7 +328,7 @@ tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
|
||||
|
||||
//------------- Get Max Lun -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_INTERFACE),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_INTERFACE),
|
||||
MSC_REQUEST_GET_MAX_LUN, 0, msch_data[dev_addr-1].interface_number,
|
||||
1, msch_buffer ),
|
||||
error
|
||||
@ -340,7 +340,7 @@ tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
|
||||
#if 0
|
||||
//------------- Reset -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_INTERFACE),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_INTERFACE),
|
||||
MSC_REQUEST_RESET, 0, msch_data[dev_addr-1].interface_number,
|
||||
0, NULL ),
|
||||
error
|
||||
@ -366,7 +366,7 @@ tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
|
||||
if ( hcd_pipe_is_stalled(msch_data[dev_addr-1].bulk_in) )
|
||||
{ // clear stall TODO abstract clear stall function
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_ENDPOINT),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_ENDPOINT),
|
||||
TUSB_REQUEST_CLEAR_FEATURE, 0, hcd_pipe_get_endpoint_addr(msch_data[dev_addr-1].bulk_in),
|
||||
0, NULL ),
|
||||
error
|
||||
|
@ -54,8 +54,8 @@
|
||||
typedef struct ATTR_PACKED{
|
||||
union {
|
||||
struct ATTR_PACKED {
|
||||
uint8_t recipient : 5; ///< Recipient type tusb_std_request_recipient_t.
|
||||
uint8_t type : 2; ///< Request type tusb_control_request_type_t.
|
||||
uint8_t recipient : 5; ///< Recipient type tusb_request_recipient_t.
|
||||
uint8_t type : 2; ///< Request type tusb_request_type_t.
|
||||
uint8_t direction : 1; ///< Direction type. tusb_dir_t
|
||||
} bmRequestType_bit;
|
||||
uint8_t bmRequestType;
|
||||
|
@ -105,22 +105,22 @@ typedef enum
|
||||
TUSB_REQUEST_GET_INTERFACE , ///< 10
|
||||
TUSB_REQUEST_SET_INTERFACE , ///< 11
|
||||
TUSB_REQUEST_SYNCH_FRAME ///< 12
|
||||
}tusb_std_request_code_t;
|
||||
}tusb_request_code_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TUSB_REQUEST_TYPE_STANDARD = 0,
|
||||
TUSB_REQUEST_TYPE_CLASS,
|
||||
TUSB_REQUEST_TYPE_VENDOR
|
||||
} tusb_control_request_type_t;
|
||||
TUSB_REQ_TYPE_STANDARD = 0,
|
||||
TUSB_REQ_TYPE_CLASS,
|
||||
TUSB_REQ_TYPE_VENDOR
|
||||
} tusb_request_type_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TUSB_REQUEST_RECIPIENT_DEVICE =0,
|
||||
TUSB_REQUEST_RECIPIENT_INTERFACE,
|
||||
TUSB_REQUEST_RECIPIENT_ENDPOINT,
|
||||
TUSB_REQUEST_RECIPIENT_OTHER
|
||||
} tusb_std_request_recipient_t;
|
||||
TUSB_REQ_RCPT_DEVICE =0,
|
||||
TUSB_REQ_RCPT_INTERFACE,
|
||||
TUSB_REQ_RCPT_ENDPOINT,
|
||||
TUSB_REQ_RCPT_OTHER
|
||||
} tusb_request_recipient_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -149,7 +149,7 @@ typedef enum
|
||||
TUSB_CLASS_MISC = 0xEF ,
|
||||
TUSB_CLASS_APPLICATION_SPECIFIC = 0xFE ,
|
||||
TUSB_CLASS_VENDOR_SPECIFIC = 0xFF
|
||||
}tusb_std_class_code_t;
|
||||
}tusb_class_code_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -284,8 +284,8 @@ tusb_error_t usbd_control_request_subtask(uint8_t port, tusb_control_request_t c
|
||||
error = TUSB_ERROR_NONE;
|
||||
|
||||
//------------- Standard Control e.g in enumeration -------------//
|
||||
if( TUSB_REQUEST_RECIPIENT_DEVICE == p_request->bmRequestType_bit.recipient &&
|
||||
TUSB_REQUEST_TYPE_STANDARD == p_request->bmRequestType_bit.type )
|
||||
if( TUSB_REQ_RCPT_DEVICE == p_request->bmRequestType_bit.recipient &&
|
||||
TUSB_REQ_TYPE_STANDARD == p_request->bmRequestType_bit.type )
|
||||
{
|
||||
if ( TUSB_REQUEST_GET_DESCRIPTOR == p_request->bRequest )
|
||||
{
|
||||
@ -313,7 +313,7 @@ tusb_error_t usbd_control_request_subtask(uint8_t port, tusb_control_request_t c
|
||||
}
|
||||
}
|
||||
//------------- Class/Interface Specific Request -------------//
|
||||
else if ( TUSB_REQUEST_RECIPIENT_INTERFACE == p_request->bmRequestType_bit.recipient)
|
||||
else if ( TUSB_REQ_RCPT_INTERFACE == p_request->bmRequestType_bit.recipient)
|
||||
{
|
||||
static uint8_t class_code;
|
||||
|
||||
@ -331,8 +331,8 @@ tusb_error_t usbd_control_request_subtask(uint8_t port, tusb_control_request_t c
|
||||
}
|
||||
|
||||
//------------- Endpoint Request -------------//
|
||||
else if ( TUSB_REQUEST_RECIPIENT_ENDPOINT == p_request->bmRequestType_bit.recipient &&
|
||||
TUSB_REQUEST_TYPE_STANDARD == p_request->bmRequestType_bit.type &&
|
||||
else if ( TUSB_REQ_RCPT_ENDPOINT == p_request->bmRequestType_bit.recipient &&
|
||||
TUSB_REQ_TYPE_STANDARD == p_request->bmRequestType_bit.type &&
|
||||
TUSB_REQUEST_CLEAR_FEATURE == p_request->bRequest )
|
||||
{
|
||||
tusb_dcd_edpt_clear_stall(port, u16_low_u8(p_request->wIndex) );
|
||||
|
@ -78,7 +78,7 @@ tusb_error_t hub_port_clear_feature_subtask(uint8_t hub_addr, uint8_t hub_port,
|
||||
|
||||
//------------- Clear Port Feature request -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_OTHER),
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_OTHER),
|
||||
HUB_REQUEST_CLEAR_FEATURE, feature, hub_port,
|
||||
0, NULL ),
|
||||
error
|
||||
@ -87,7 +87,7 @@ tusb_error_t hub_port_clear_feature_subtask(uint8_t hub_addr, uint8_t hub_port,
|
||||
|
||||
//------------- Get Port Status to check if feature is cleared -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_OTHER),
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_OTHER),
|
||||
HUB_REQUEST_GET_STATUS, 0, hub_port,
|
||||
4, hub_enum_buffer ),
|
||||
error
|
||||
@ -112,7 +112,7 @@ tusb_error_t hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port)
|
||||
|
||||
//------------- Set Port Reset -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_OTHER),
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_OTHER),
|
||||
HUB_REQUEST_SET_FEATURE, HUB_FEATURE_PORT_RESET, hub_port,
|
||||
0, NULL ),
|
||||
error
|
||||
@ -123,7 +123,7 @@ tusb_error_t hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port)
|
||||
|
||||
//------------- Get Port Status to check if port is enabled, powered and reset_change -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_OTHER),
|
||||
usbh_control_xfer_subtask( hub_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_OTHER),
|
||||
HUB_REQUEST_GET_STATUS, 0, hub_port,
|
||||
4, hub_enum_buffer ),
|
||||
error
|
||||
@ -180,7 +180,7 @@ tusb_error_t hub_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t cons
|
||||
|
||||
//------------- Get Hub Descriptor -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_DEVICE),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_DEVICE),
|
||||
HUB_REQUEST_GET_DESCRIPTOR, 0, 0,
|
||||
sizeof(descriptor_hub_desc_t), hub_enum_buffer ),
|
||||
error
|
||||
@ -195,7 +195,7 @@ tusb_error_t hub_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t cons
|
||||
for(i=1; i <= hub_data[dev_addr-1].port_number; i++)
|
||||
{
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_OTHER),
|
||||
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_OTHER),
|
||||
HUB_REQUEST_SET_FEATURE, HUB_FEATURE_PORT_POWER, i,
|
||||
0, NULL ),
|
||||
error
|
||||
|
@ -407,7 +407,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
{
|
||||
//------------- Get Port Status -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( usbh_devices[0].hub_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_OTHER),
|
||||
usbh_control_xfer_subtask( usbh_devices[0].hub_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_CLASS, TUSB_REQ_RCPT_OTHER),
|
||||
HUB_REQUEST_GET_STATUS, 0, usbh_devices[0].hub_port,
|
||||
4, enum_data_buffer ),
|
||||
error
|
||||
@ -449,7 +449,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
|
||||
//------------- Get first 8 bytes of device descriptor to get Control Endpoint Size -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( 0, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_DEVICE),
|
||||
usbh_control_xfer_subtask( 0, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
|
||||
TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_TYPE_DEVICE << 8), 0,
|
||||
8, enum_data_buffer ),
|
||||
error
|
||||
@ -482,7 +482,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
SUBTASK_ASSERT(new_addr <= TUSB_CFG_HOST_DEVICE_MAX); // TODO notify application we reach max devices
|
||||
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( 0, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_DEVICE),
|
||||
usbh_control_xfer_subtask( 0, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
|
||||
TUSB_REQUEST_SET_ADDRESS, new_addr, 0,
|
||||
0, NULL ),
|
||||
error
|
||||
@ -504,7 +504,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
|
||||
//------------- Get full device descriptor -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_DEVICE),
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
|
||||
TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_TYPE_DEVICE << 8), 0,
|
||||
18, enum_data_buffer ),
|
||||
error
|
||||
@ -521,7 +521,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
|
||||
//------------- Get 9 bytes of configuration descriptor -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_DEVICE),
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
|
||||
TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_TYPE_CONFIGURATION << 8) | (configure_selected - 1), 0,
|
||||
9, enum_data_buffer ),
|
||||
error
|
||||
@ -532,7 +532,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
|
||||
//------------- Get full configuration descriptor -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_DEVICE),
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
|
||||
TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_TYPE_CONFIGURATION << 8) | (configure_selected - 1), 0,
|
||||
TUSB_CFG_HOST_ENUM_BUFFER_SIZE, enum_data_buffer ),
|
||||
error
|
||||
@ -544,7 +544,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
|
||||
//------------- Set Configure -------------//
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT(
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_DEVICE),
|
||||
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
|
||||
TUSB_REQUEST_SET_CONFIGURATION, configure_selected, 0,
|
||||
0, NULL ),
|
||||
error
|
||||
|
Loading…
x
Reference in New Issue
Block a user