Skip to content

USBHOST hub support for TARGET_STM #4231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 15, 2017

Conversation

jamike
Copy link
Contributor

@jamike jamike commented Apr 26, 2017

Description

This list of commit brings:

  • full speed device support connected on hub for target stm.
  • small speed devices connected to hub are not supported

Status

READY

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just style issues. How this can be tested? Any tests that should be written?

dev_connected = true;
int ret=host->interruptRead(dev, int_in, report, len_listen, false);
MBED_ASSERT((ret==USB_TYPE_OK) || (ret ==USB_TYPE_PROCESSING) || (ret == USB_TYPE_FREE));
if ((ret==USB_TYPE_OK) || (ret ==USB_TYPE_PROCESSING))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls fix formatting for these 2 if () { }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree , I ll update soon.

if ((&hubs[k] == usb_msg->hub_parent) && (hub_in_use[k]))
hub_unplugged=false;
}
} else hub_unplugged = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fomrmatting here and line 93

Copy link
Contributor Author

@jamike jamike May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree I ll update soon

@theotherjimmy
Copy link
Contributor

@jamike Could you address @0xc0170's comments?

@jamike jamike force-pushed the USBH0ST_TARGET_STM_HUB_SUPPORT branch from ca3b20d to c4a0497 Compare May 9, 2017 14:31
@jamike
Copy link
Contributor Author

jamike commented May 9, 2017

For the test , it is manuall test and it relies on main.cpp present in https://developer.mbed.org/teams/ST/code/Nucleo_usbhost/

  • plug a hub (i.e with eight port : 3 hubs are detected [hub: 0 - port: 1], [hub: 1 - port: 3],[hub: 1 - port: 4])
  • plug a mouse high speed on one of the hub port (a mouse high speed : i.e nucleo board with https://developer.mbed.org/teams/ST/code/Nucleo_usbmouse/)
  • plug a USB stick format in FAT on one of the hub port.

plug/unplug the different elements (i.e plug usb stick , un-plug hub, plug hub , plug mouse, plug usbstick , un-plug mouse, un-plug stick , plug stick, plug mouse, un-plug hub ...)
Moreover , nucleo_usbmouse uses USER BUTTON to stop/start mouse moving.
Stopping mouse moving allows to control that USB stick trace is OK because each position sent by usbmouse trigger a trace ("buttons: 1, x: 80, y: 46, z: 54")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants