Skip to content
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

Harmony Core Console Service takes the only USB Device instances #18

Open
youpko opened this issue Nov 27, 2021 · 0 comments
Open

Harmony Core Console Service takes the only USB Device instances #18

youpko opened this issue Nov 27, 2021 · 0 comments

Comments

@youpko
Copy link

youpko commented Nov 27, 2021

How do I combine the multiple USB devices functions that required their own event handling?

I tried the following two test:

  1. 2x CDC instances:
    • CDC 1 using the Console Service + Command Service.
    • CDC 2 connected through to a UART peripheral to create a USB CDC UART bridge (following the cdc_com_port_single example project).
  2. 1x CDC Instance & 1x HID Instance.
    • CDC instance using the Console Service
    • HID instance following the hid_joystick example project.

While trying this I ran in to a problem that I couldn't open the USB Device.
After some time i found that the Console Service already calls the USB_DEVICE_Open( USB_DEVICE_INDEX_0) and attaches the USBDeviceEventHandler and the necessary USBDeviceCDCEventHandler.
Because the USB Device is already opened I have no way to set:

  • CDC event handler for the UART Bridge code.
  • HID event handler for the joystick code.

It seems to me that I need a unified USBDeviceEventHandler . But the Console Service doesn't seem to expose any way of adding the other necessary CDC/HID event handlers to its USBDeviceEventHandler.
Some old Harmony 1.1 documentation that talked about multiple USB Device Instances but that doesn't seem to exists in Harmony 3, or at least not in the configurator.

Is there some API part that I missed that would allow me to set all the event handlers that I need. Or is this some limitation form the USB frame work/Console Service?

For these small test I can remove the Console Service and do without.
But for my actual project this is not really option because other Harmony libraries use the Console Service like the TCP/IP stack that provides some command line utilities.

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

No branches or pull requests

1 participant