PaulStoffregen / USBHost_t36

USB Host Library for Teensy 3.6 and 4.0
165 stars 85 forks source link

Fs integration msc #78

Closed KurtE closed 2 years ago

KurtE commented 2 years ago

@PaulStoffregen and others (@mjs513 @defragster @wwatson4506)

This is the branch we have been working out of for the MTP and MSC integration,

This includes the merging in of all of the MSC stuff. There also are a few extraneous things as well, like the experiment to support plugging in a RAWHID device and support for the experiment for RAWHID512 on T4.x boards.

This PR changes the whole library, by moving all of the sources into src directory (i.e. newer library format), such that it can have optional sub-directories and the like.

There is also a header file wart with the MSC stuff In that I created another header file for the MSC FS stuff as we were running into build problems when I tried to include FS.h within USBHost_t36.h

Also there may be things we can cut out of the sub-directories and maybe reduce the number of abstractions.

But figured it was about time for this all to be reviewed and cleaned up if we wish to get all of this into the next Teensyduino release, which I can imagine might be within the next month or so.

Note: if desired we can create a new branch with the stuff such that it might be able to do a clean merge.

Hope this makes sense?

PaulStoffregen commented 2 years ago

Is this essentially bringing a duplicate copy of SdFat into USBHost_t36?

KurtE commented 2 years ago

No - but is is bringing in a version of FSLib of SDFat. In particular a version of FSLib that is more partition aware.

Subtle differences like: If you ask FSLib to format a volume it will format the entire SD disk as one partition as per design by owner...

But PFSLib will extract the data from the MBR or from the GPT to know what part of the disk should be used for a partition. Which is more important when you are talking about things like Hard disks.

KurtE commented 2 years ago

Hi @paulstoffregen @mjs513 @defragster @wwatson:

Right now my impression is that the FS Integration stuff will not be in the next release is Teensuduino.

More specifically, as there has not been any progress or comments about integrating the MSC code into he usbhost code base for many months now, I am assuming that this is not likely to happen. At least not in the current state of the code base.

Also as different changes are integrated into the USBHost code, it gets harder and harder to try to keep multiple forks up to date.

As such I am planning to close out this Pull Request (https://github.com/PaulStoffregen/USBHost_t36/pull/78) And probably soon delete/archive the code branch associated with it.

To not lose this functionality I created a new branch: https://github.com/KurtE/UsbMscFat/tree/decouple Where I migrated the current state of the code for MSC in the USBHost code over to the original MSC library. Or if preferred, we could create a different library name for it. However unclear who should (or would want) to own it.

Note: with this code change I changed the msController object to be named msDevice (we could choose different name), but I wanted to totally decouple the code from the usbhost code version, as to not rely on any specific version of the code other than the higher level usbhost device classes.

I am also wondering if we should close out the integration thread on the forum and when the time is appropriate create a new one.

Let me know what you think.

PaulStoffregen commented 2 years ago

Planning on working with this in the next 2 weeks.

KurtE commented 2 years ago

@PaulStoffregen @mjs513 @wwatson4506 - This has been replaced by the work that Paul did plus

89