Murat Kilivan / USBFileSystem

Fork of USBFileSystem by Erik -

Revision:
1:4ba08d11e36e
Parent:
0:dabe3383ef23
Child:
2:9af05743d551
diff -r dabe3383ef23 -r 4ba08d11e36e USBFileSystem.h
--- a/USBFileSystem.h	Wed Jul 31 19:15:55 2013 +0000
+++ b/USBFileSystem.h	Fri Aug 02 18:49:27 2013 +0000
@@ -90,6 +90,15 @@
     */
     bool usbSafe( void );
     
+    /** Sets the USB mode
+    *
+    * Argument = 0: USB is write protected when not available (default).
+    * Argument = 1: USB is disconnected when not available
+    *
+    * @param mode - USB safety mode
+    */
+    void usbMode( int mode );
+    
     
 protected:
     //Functions to be implemented by child:
@@ -112,6 +121,7 @@
     virtual int disk_write(const uint8_t * buffer, uint64_t sector);
     
     int local_count;
+    int usbmode;
     Timeout usb_write;
     bool usbfree;