return (ByteWasRead ? ReadByte : _FDEV_EOF);\r
}\r
\r
+#if defined(USB_CAN_BE_BOTH)\r
+/** Event to handle mode changes in the library, to clear the FAT library's drive state structure when transitioning\r
+ * between modes. This ensures that the library always works with current disk data.\r
+ */\r
+void EVENT_USB_UIDChange(void)\r
+{\r
+ pf_mount(&DiskFATState);\r
+}\r
+#endif\r
+\r
/** Task to determine if the user is wishes to start the programming sequence, and if so executes the \r
* required functions to program the attached target (if any) with the files loaded to the dataflash.\r
*/\r