diff options
| author | hathach <[email protected]> | 2018-07-13 17:48:26 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-07-13 17:48:26 +0700 |
| commit | 1efb552bfd097a23651bbb5ad29b6d8eb3bc9ccd (patch) | |
| tree | 2d6301a8058d3a631dde379515b3185992ab1422 /src/host | |
| parent | cd5b5d3a53adb465ac614b6027e16c8ec987b09e (diff) | |
add ep2drv, rename descriptor offset
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/usbh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c index a67bd8d8c..6d1cd37ad 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -572,9 +572,9 @@ tusb_error_t enumeration_body_subtask(void) while( p_desc < enum_data_buffer + ((tusb_desc_configuration_t*)enum_data_buffer)->wTotalLength )
{
// skip until we see interface descriptor
- if ( TUSB_DESC_INTERFACE != p_desc[DESCRIPTOR_OFFSET_TYPE] )
+ if ( TUSB_DESC_INTERFACE != p_desc[DESC_OFFSET_TYPE] )
{
- p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH]; // skip the descriptor, increase by the descriptor's length
+ p_desc += p_desc[DESC_OFFSET_LEN]; // skip the descriptor, increase by the descriptor's length
}else
{
static uint8_t class_index; // has to be static as it is used to call class's open_subtask
@@ -600,11 +600,11 @@ tusb_error_t enumeration_body_subtask(void) p_desc += length;
}else // Interface open failed, for example a subclass is not supported
{
- p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH]; // skip this interface, the rest will be skipped by the above loop
+ p_desc += p_desc[DESC_OFFSET_LEN]; // skip this interface, the rest will be skipped by the above loop
}
} else // unsupported class (not enable or yet implemented)
{
- p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH]; // skip this interface, the rest will be skipped by the above loop
+ p_desc += p_desc[DESC_OFFSET_LEN]; // skip this interface, the rest will be skipped by the above loop
}
}
}
|
