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

@@ -110,7 +110,7 @@ int usbh_hid_connect(struct usbh_hubport *hport, uint8_t intf)
struct usbh_hid *hid_class = usbh_hid_class_alloc();
if (hid_class == NULL) {
USB_LOG_ERR("Fail to alloc hid_class\r\n");
return -ENOMEM;
return -USB_ERR_NOMEM;
}
hid_class->hport = hport;