USB composite device example program, drag-and-drop flash writer.

Dependencies:   SWD USBDevice mbed BaseDAP

tests/test2_USBMSD_Drop.cpp

Committer:
va009039
Date:
2013-09-28
Revision:
1:ea8e179320d7

File content as of revision 1:ea8e179320d7:

// test2_USBMSD_Drop.cpp 2013/9/26
#if 0
#include "mbed.h"
#include "USBMSD_Drop.h"

Serial pc(USBTX, USBRX);
USBMSD_Drop* host;

void callback(const uint8_t* data, int len, int offset, int total)
{
    for(int i = 0; i < len && (offset+i) < total; i++) {
        pc.putc(data[i]);
    }
}

int main()
{
    pc.baud(921600);
    //pc.baud(9600);
    pc.printf("%s\n", __FILE__);

    host = new USBMSD_Drop();
    host->attach(callback);
    while(1); // forever
}
#endif