revert MSD fix
authorJim Morris <morris@wolfman.com>
Fri, 18 Oct 2013 20:57:38 +0000 (13:57 -0700)
committerJim Morris <morris@wolfman.com>
Fri, 18 Oct 2013 20:57:38 +0000 (13:57 -0700)
src/main.cpp

index bf59c53..524defc 100644 (file)
@@ -51,7 +51,8 @@ SDCard sd(P0_9, P0_8, P0_7, P0_6);      // this selects SPI1 as the sdcard as it
 
 USB u;
 USBSerial usbserial(&u);
-USBMSD *msc;
+USBMSD msc(&u, &sd);
+//USBMSD *msc;
 DFU dfu(&u);
 
 SDFAT mounter("sd", &sd);
@@ -99,10 +100,12 @@ int main() {
 
     // Create and initialize USB stuff
     u.init();
-    if(sdok) { // only do this if there is an sd disk
-        msc= new USBMSD(&u, &sd);
-        kernel->add_module( msc );
-    }
+    //if(sdok) { // only do this if there is an sd disk
+    //    msc= new USBMSD(&u, &sd);
+    //    kernel->add_module( msc );
+    //}
+
+    kernel->add_module( &msc );
 
     kernel->add_module( &usbserial );
     if( kernel->config->value( second_usb_serial_enable_checksum )->by_default(false)->as_bool() ){