diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-24 14:10:28 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-24 14:10:28 +0000 |
commit | d3f11eb52809353d7f103cea8b4332f335c26697 (patch) | |
tree | be584b0f1df4272db2d20da3fbd86e736b6ddade /Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c | |
parent | 59ed10273c4f37079564d08a51bea2af1c10b96b (diff) | |
download | lufa-d3f11eb52809353d7f103cea8b4332f335c26697.tar.gz lufa-d3f11eb52809353d7f103cea8b4332f335c26697.tar.bz2 lufa-d3f11eb52809353d7f103cea8b4332f335c26697.zip |
Make the StandaloneProgrammer project seamlessly read out drive contents from either an attached FAT formatted drive when in host mode, or the onboard FAT formatted dataflash when in device mode.
Diffstat (limited to 'Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c')
-rw-r--r-- | Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c index e8a863f54..5d8652366 100644 --- a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c +++ b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c @@ -57,6 +57,16 @@ static int Disk_getchar(FILE* Stream) return (ByteWasRead ? ReadByte : _FDEV_EOF);
}
+#if defined(USB_CAN_BE_BOTH)
+/** Event to handle mode changes in the library, to clear the FAT library's drive state structure when transitioning
+ * between modes. This ensures that the library always works with current disk data.
+ */
+void EVENT_USB_UIDChange(void)
+{
+ pf_mount(&DiskFATState);
+}
+#endif
+
/** Task to determine if the user is wishes to start the programming sequence, and if so executes the
* required functions to program the attached target (if any) with the files loaded to the dataflash.
*/
|