Drag and Drop Working Explanation
Hi all, I'm trying to make a bootloader that works like DAPLink -- you can update the firmware on a device by just dragging a binary over to the device after it mounts as a drive.
I'm using Mbed-OS and the USB device stack there along with the MSC class. I've been having trouble checking for new files (ie: reading the FATFs while it's also mounted by the host over USB).
After reading through some of the drag and drop code, this is my understanding of how it works:
A block device/flash interface is wrapped by a "virtual file system" that peeks at the data being written by the host. This allows the code to detect certain special file names (MSD commands) while not directly having to mount and operate on the FAT filesystem itself, which could cause conflicts with the host.
Can anyone clarify how it works a bit better? Thanks!