arduino / arduino/ArduinoCore-mbed
USBHOST coding error resulting in spurious error message
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
tusbh_msg_root_enable()
res = -1;
while (res!=0){
res = tusbh_device_attach(dev);
TUSB_ROOT_INFO("Device attach failed\n");
}
This will cause a "Device attach failed" to always be printed, regardless of the outcome of the first device_attach() call.
I'll get around to a pull request, but this should be a quick fix. (working on getting USBHost more stable on Portenta Machine Control)
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate tusbh_msg_root_enable() and inspect the shown tusbh_device_attach(dev) loop. Confirm the current output when the first attach succeeds, then make the completion condition match the intended error reporting. Done means "Device attach failed" is not printed after a successful first attach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100