diff --git a/src/USBHost/USBHost.cpp b/src/USBHost/USBHost.cpp index 77ff9e0..a434ae7 100644 --- a/src/USBHost/USBHost.cpp +++ b/src/USBHost/USBHost.cpp @@ -180,6 +180,12 @@ void USBHost::usb_process() res = getDeviceDescriptor(&devices[i], buf, 8); if (res == USB_TYPE_OK) { + + + if (nullptr != mount_fnc) { + mount_fnc(); + } + break; } @@ -189,9 +195,7 @@ void USBHost::usb_process() USB_INFO("New device connected: %p [hub: %d - port: %d]", &devices[i], usb_msg->hub, usb_msg->port); // Call the device connected callback if registered - if (nullptr != mount_fnc) { - mount_fnc(); - } + #if MAX_HUB_NB if (buf[4] == HUB_CLASS) {