add usb errno, do not use system errno

This commit is contained in:
sakumisu
2023-12-05 21:34:32 +08:00
parent 48730e20be
commit 14f1f597f1
16 changed files with 145 additions and 442 deletions

View File

@@ -333,7 +333,7 @@ static int usbh_hub_connect(struct usbh_hubport *hport, uint8_t intf)
struct usbh_hub *hub = usbh_hub_class_alloc();
if (hub == NULL) {
USB_LOG_ERR("Fail to alloc hub_class\r\n");
return -ENOMEM;
return -USB_ERR_NOMEM;
}
hub->hub_addr = hport->dev_addr;