Skip to content

Commit aa62a28

Browse files
committed
Update USBMSC.ino
Changes to USB Mass Storage (MSC) example code in Arduino USB library * Added MSC.isWritable(true) line to set the disk as writable
1 parent ceed1f8 commit aa62a28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/USB/examples/USBMSC/USBMSC.ino

+3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ void setup() {
152152
MSC.onStartStop(onStartStop);
153153
MSC.onRead(onRead);
154154
MSC.onWrite(onWrite);
155+
155156
MSC.mediaPresent(true);
157+
MSC.isWritable(true); // true if writable, false if read-only
158+
156159
MSC.begin(DISK_SECTOR_COUNT, DISK_SECTOR_SIZE);
157160
USB.begin();
158161
}

0 commit comments

Comments
 (0)