hathach / tinyusb

An open source cross-platform USB stack for embedded system
https://www.tinyusb.org
MIT License
4.93k stars 1.03k forks source link

Add MTP class device support #1079

Open zhangshengping opened 3 years ago

zhangshengping commented 3 years ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like some time mcu need to get file from sd card and also usb host need get file from sd card. MTP is for this solution.

diplfranzhoepfinger commented 8 months ago

I want to leave a big Plus here. What can be done to speed this Implementation up?

Niteto commented 7 months ago

There is a MTP library for the Teensy 3 & 4, but i have no clue how to get this working with TinyUSB on the EPS32. https://github.com/WMXZ-EU/MTP_t4

pwsoftwaredesigns commented 2 days ago

I was trudging through the ST's implementation of MTP in the latest release of their USB library (the only USB stack I could find that has support for MTP). However, it's poorly-written, difficult to understand, and requires that you do everything in an ISR.

So, I'm feeling (foolishly) optimistic that I might be able to implement the MTP class in TinyUSB (even though I am just learning how the USB stack works). I'm reading through the MTP spec and ST's implementation, and making use of Wireshark to see if it's possible.

Though I'd much prefer someone who is actually an expert in TinyUSB and the USB stack in general to implement this.