KurtE
Senior Member+
Not sure if some of this should go on MTP thread(https://forum.pjrc.com/threads/43050-MTP-Responder-Contribution(
and/or the MSC thread: https://forum.pjrc.com/threads/5582...er-Experiments?p=270839&viewfull=1#post270839
or ???
But for the fun of it, thought I would see how hard it would be to add one or more MSC devices to our list of MTP devices in the mtp-test sketch.
There are probably many issues and the like, with several different File Systems:
SD for SD stuff
LittleFS for the chips and the like
and currently now UsbMSCFat which is a modified version of SD (or SDFat...) stuff, maybe at some point we can combine?
So far, I have just tried to add the include files and maybe define the start of a few objects:
And the build now fails in loop()
where MAX_FILENAME_LEN is not defined...
Turns out just about every library defines some generic name like: MAX_FILENAME_LEN
And in this case, the mscFS.h file not only defines it:
It then un-defines it:
This one is probably easy to work around, as the only place this define is used in this directory is the actual header, so could change to something else.
Or could change to something in the class itself, like an enum or a static const uint16_t MAX_FILENAME_LEN=256;
But my real question here is should we just continue on the multiple different threads and/or create a new thread for Teensyduino Integration of hopefully getting
all of these capabilities working with each other and hopefully integrated into some version of Teensyduino, and/or some common place to get instructions on
how to get all of this to work?
and/or the MSC thread: https://forum.pjrc.com/threads/5582...er-Experiments?p=270839&viewfull=1#post270839
or ???
But for the fun of it, thought I would see how hard it would be to add one or more MSC devices to our list of MTP devices in the mtp-test sketch.
There are probably many issues and the like, with several different File Systems:
SD for SD stuff
LittleFS for the chips and the like
and currently now UsbMSCFat which is a modified version of SD (or SDFat...) stuff, maybe at some point we can combine?
So far, I have just tried to add the include files and maybe define the start of a few objects:
Code:
#define USE_MSC_FAT 1
...
//=============================================================================
// MSC FAT classes
//=============================================================================
#if USE_MSC_FAT == 1
#if defined(__IMXRT1062__) || defined(ARDUINO_TEENSY36)
#include <mscFS.h>
USBHost myusb;
USBHub hub1(myusb);
USBHub hub2(myusb);
// start off with one controller.
msController msDrive1(myusb);
#else
// Only those Teensy support USB
#warning "Only Teensy 3.6 and 4.x support MSC"
#endif
#endif
And the build now fails in loop()
Code:
char pathname[MAX_FILENAME_LEN];
Turns out just about every library defines some generic name like: MAX_FILENAME_LEN
And in this case, the mscFS.h file not only defines it:
It then un-defines it:
Code:
// do not expose these defines in Arduino sketches or other libraries
#undef MSCFAT_FILE
#undef MSCFAT_BASE
#undef MAX_FILENAME_LEN
This one is probably easy to work around, as the only place this define is used in this directory is the actual header, so could change to something else.
Or could change to something in the class itself, like an enum or a static const uint16_t MAX_FILENAME_LEN=256;
But my real question here is should we just continue on the multiple different threads and/or create a new thread for Teensyduino Integration of hopefully getting
all of these capabilities working with each other and hopefully integrated into some version of Teensyduino, and/or some common place to get instructions on
how to get all of this to work?