summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-03-20 21:18:19 +0800
committersakumisu <[email protected]>2022-03-20 21:18:19 +0800
commit214e2f39b3f7d19bd98c6bb648a8e2ea11f15b93 (patch)
tree9e22f844a1f7c911e849d07033f2e50ff32667f4
parent29fa5a9b05dea1b2d00588438e6ae810b6598c2a (diff)
fix descriptor parse error log
-rw-r--r--core/usbh_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c
index 8850e6f0..d07c64ca 100644
--- a/core/usbh_core.c
+++ b/core/usbh_core.c
@@ -196,7 +196,7 @@ static int parse_device_descriptor(struct usbh_hubport *hport, struct usb_device
USB_LOG_ERR("invalid device bLength 0x%02x\r\n", desc->bLength);
return -EINVAL;
} else if (desc->bDescriptorType != USB_DESCRIPTOR_TYPE_DEVICE) {
- USB_LOG_ERR("unexpected descriptor 0x%02x\r\n", desc->bDescriptorType);
+ USB_LOG_ERR("unexpected device descriptor 0x%02x\r\n", desc->bDescriptorType);
return -EINVAL;
} else {
if (length <= 8) {
@@ -244,10 +244,10 @@ static int parse_config_descriptor(struct usbh_hubport *hport, struct usb_config
uint8_t intf_num = 0;
uint8_t *p = (uint8_t *)desc;
if (desc->bLength != USB_SIZEOF_CONFIG_DESC) {
- USB_LOG_ERR("invalid device bLength 0x%02x\r\n", desc->bLength);
+ USB_LOG_ERR("invalid config bLength 0x%02x\r\n", desc->bLength);
return -EINVAL;
} else if (desc->bDescriptorType != USB_DESCRIPTOR_TYPE_CONFIGURATION) {
- USB_LOG_ERR("unexpected descriptor 0x%02x\r\n", desc->bDescriptorType);
+ USB_LOG_ERR("unexpected config descriptor 0x%02x\r\n", desc->bDescriptorType);
return -EINVAL;
} else {
if (length <= USB_SIZEOF_CONFIG_DESC) {
@@ -344,7 +344,7 @@ static int parse_string_descriptor(struct usbh_hubport *hport, struct usb_string
uint8_t *p = (uint8_t *)desc;
if (desc->bDescriptorType != USB_DESCRIPTOR_TYPE_STRING) {
- USB_LOG_ERR("unexpected descriptor 0x%02x\r\n", desc->bDescriptorType);
+ USB_LOG_ERR("unexpected string descriptor 0x%02x\r\n", desc->bDescriptorType);
return -2;
} else {
p += 2;