Hi -
I've been trying to make a very basic function that takes the contents of a file from a USB flash drive and turns the file into HEX/text for sending over a serial link (eg UART)
As a test, I've tried copying the file, a JPG image file to a Text file. When I host the image file, a 125kB file, in the MBED's LocalFileSystem, the conversion works flawlessly. I effectively can use fgetc and fputc for the entire file.
But - My issue is this:
When I am using MSCUsbHost, I am only able to read 4096 bits/512 bytes - which I'm pretty sure is the first block of the flash drive - and nothing more using fread before I get to an EOF. Is it possible to read files using fread and write them using fwrite on USB mass storage devices?
Hi -
I've been trying to make a very basic function that takes the contents of a file from a USB flash drive and turns the file into HEX/text for sending over a serial link (eg UART)
As a test, I've tried copying the file, a JPG image file to a Text file. When I host the image file, a 125kB file, in the MBED's LocalFileSystem, the conversion works flawlessly. I effectively can use fgetc and fputc for the entire file.
But - My issue is this:
When I am using MSCUsbHost, I am only able to read 4096 bits/512 bytes - which I'm pretty sure is the first block of the flash drive - and nothing more using fread before I get to an EOF. Is it possible to read files using fread and write them using fwrite on USB mass storage devices?