A version of the USBMSD_SD library that doesn't try to connect in the constructor. I made this change to support an operation mode where USB MSD can be enabled later in program operation without hanging.
Fork of USBMSD_SD by
Revision 4:46888c9d5cd7, committed 2017-06-11
- Comitter:
- danjulio
- Date:
- Sun Jun 11 04:05:51 2017 +0000
- Parent:
- 3:cce1e689c548
- Commit message:
- Changed to not connect in constructor
Changed in this revision
USBMSD_SD.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r cce1e689c548 -r 46888c9d5cd7 USBMSD_SD.cpp --- a/USBMSD_SD.cpp Wed Nov 16 18:24:52 2016 +0000 +++ b/USBMSD_SD.cpp Sun Jun 11 04:05:51 2017 +0000 @@ -1,6 +1,8 @@ /* mbed Microcontroller Library * Copyright (c) 2006-2012 ARM Limited * + * Modified by Dan Julio 5/2017 - do not "connect" during instantiation + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -126,7 +128,9 @@ //no init _status = 0x01; - connect(); + // Modified by Dan Julio 5/2017 to prevent this object from blocking + // until manually connected by user code + //connect(); } #define R1_IDLE_STATE (1 << 0)