Internal Disk Example

Status
Not open for further replies.

yeahtuna

Well-known member
I've been trying to add an internal disk to my MIDI / rawHID combo and I think I have pretty much all the hacking in place, but I'm at a loss as to how to procede.

Where and how do I specify the properties of the disk? Is there any example code for using an internal disk? How do I put stuff on it ( I realize it'll be read only)?

Regards,
Rob
 
When you program a Teensy2 with the USB Disk (internal) type, the filesystem will be initialized with a readme file that explains how to initialize the disk with your own files. Please read that file for details.
 
When you program a Teensy2 with the USB Disk (internal) type, the filesystem will be initialized with a readme file that explains how to initialize the disk with your own files. Please read that file for details.

Okay, how do I specify that I want to use internal versus sd card?
 
Okay, so because my custom type does not define USB_DISK, I have to change some code in the in my usb.c,

Code:
#include "media_internal.c"
/*
#if defined(USB_DISK_SDFLASH)
#include "media_sdcard.c"
#elif defined(USB_DISK)
#include "media_internal.c"
#else
#error "No known media type specified\n"
#endif
*/

Everything compiles now, but Windows reports problem with the descriptor. (yes I did increment the bcdDevice).... So here come some Yes / No questions.

1) Must BULK type endpoints be listed in the descriptor before INTERRUPT ones? i.e. Do my MIDI and DISK need to come before rawHID and DEBUG?
2) I've calculated the incremental offset of the DISK descriptor to be 32 (the same size as my rawHID and Debug) Does that sound right to you?

Sorry for the million question I ask.

Regards,
Rob
 
I see the size of the DISK descriptor should be 23.... I know understand that you just need to add together all the 'bLength' fields for the particular interface, so question two is answered already.
 
I've increased the bcdDevice number but windows is still giving me issues...Device works fine on my Android Tablet.
 
Paul, there must something that's not quite right. My MIDI / rahHID / Internal Disk works fine in Android 4.03 and in OSX. When plugged into my Android 4.2 phone, the drive won't mount but the device otherwise works fine. However in Windows, the device still doesn't install properly. I even tried using on a computer that I had never plugged it into before, but it still doesn't work. I know you're not much of a Windows man, but can you think of anything?
 
Status
Not open for further replies.
Back
Top