eclipse-threadx / usbx

Eclipse ThreadX - USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with Eclipse ThreadX RTOS
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/usbx/index.md
MIT License
157 stars 92 forks source link

Does USBX support multiple device type switching? #40

Closed arilink-tech closed 2 years ago

arilink-tech commented 3 years ago

The processor used in my project is STM32F105RBT6. I transplanted ThreadX and USBX for development. I want to know if USBX supports multiple device type switching. For example, USB is a normal USB device when it is working normally. When firmware update is required, enter USB DFU mode?

xiaocq2001 commented 3 years ago

Host recognized device is actually from what device reported (descriptors), if your application start different USB framework on different triggers, host will see different devices. So yes, USBX supports multiple device type switching.

arilink-tech commented 3 years ago

I know this situation, I mean, for example, the currently running USB class is CDC. After receiving the command, can it be converted to HID through some operations without resetting the system?

xiaocq2001 commented 3 years ago

You can try following flow: If hardware support, issue detach. Disconnect, unregister classes, uninitialize device stack, then initialize device stack with another device framework, register classes again ... Then attach ...

BlueShark7 commented 3 years ago

@xiaocq2001 Can you give your mail ?, I need a support to develop an application

xiaocq2001 commented 2 years ago

@BlueShark7 please email to azure-rtos-support@microsoft.com.

xiaocq2001 commented 2 years ago

@arilink any progress on suggested flow for device type switching?

arilink-tech commented 2 years ago

Encountered a little trouble, trying to solve it

BlueShark7 commented 2 years ago

@xiaocq2001 how can i send a multiple audio isochrone packet in host app ?

xiaocq2001 commented 2 years ago

@BlueShark7 Not sure what you mean for multiple audio isochrones packet, do you mean the usage of host audio class APIs?

BlueShark7 commented 2 years ago

@xiaocq2001 yess i want to write to audio interface

xiaocq2001 commented 2 years ago

@BlueShark7 sorry to reply late, can you create another issue to discuss since it's another topic, thanks.