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
154 stars 89 forks source link

Are CDRW drives supported for writing/reading files? #23

Closed maxkunes closed 2 years ago

maxkunes commented 3 years ago

I've noticed various places in the code that say CDRW drives aren't supported but I've also seen in the same code actions being taken if the current device is a CDRW. Confusing to say the least.

If they aren't supported, what actions specifically would need to be taken to support them?

I'm assuming that I can potentially write and read raw sectors onto a CDRW right now with USBX? Is that correct? However, because of the formatting, FileX doesn't support actually reading or writing files. If so, then I would think all that I would have to do is write or find a filesystem library that supports the common CDRW formats like UDF 2.01. Is that correct?

xiaocq2001 commented 3 years ago

CDRW driver can be recognized, but no FileX volume is opened for read/write. So yes, if you want to read/write CDRW driver, you need a file system library that supports CDRW formats.

maxkunes commented 3 years ago

CDRW driver can be recognized, but no FileX volume is opened for read/write. So yes, if you want to read/write CDRW driver, you need a file system library that supports CDRW formats.

Thanks for the quick response. So after the device enumerates, I can simply read and write sectors using the _ux_host_class_storage_media_write/read API? Or is there something else I have to do here.

xiaocq2001 commented 3 years ago

You can use _ux_host_class_storage_media_write/read to write/read sectors.

yuxin-azrtos commented 2 years ago

Close.