How to implement USB to lots of interface (UART/I2C/PWM/SPI/GPIO...)
If we want to implement USB to multi-interface at the same times
USB to UART1~3
USB to I2C1~3
USB to SPI
USB to PWM
USB to SD card
We use STM32F4 , USB 2.0 have 5 in / 5 out endpoints
i think we could use USB mass storage protocol to implement USB to SD
but the remain endpoints is not enough to implement standard USB protocol such as USB to UART1~4 (CDC),
What kind of method could i use to implement usb to other interface?
i do some research
USB HID
Self define descriptor use report ID to distinguish interface(UART/I2C/PWM...)
USB CDC
Use virtual com to send self-defined command to communicate (UART/I2C/PWM)
....
Which is better use in Linux? or is there another method for USB to multi-interface ?
Is there any related sample code could reference?
Thanks alot
