This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Knowning your way in a file system

Hello,
My apologies for asking a question that is not strictly Keil related, but I know that there are people here with different backgrounds of experiences - maybe one of you can help me? I am using the Keil tool set so cut me some slack...

I need to build a system that has one simple property: depending on the requested folder by the host, the device must provide the contents of differnet peripherals. to be more exact: The device itself is a USB mass storage device, and I can already display the contents of an on-board SD card, and a piece of RAM dedicated to hold FAT12. that is not the problem. the real issue is that I must be able to tell accesses to specific folder apart, in order to provide the host with the appropriate data. I have a feeling that the host, asking the device data in blocks of 64 bytes each, knows more than the device. the host knows which folder you want to browse and interrogates the device's FAT (reading even more than it needs), in which it can search for the right entry and address the disk at the proper location (again, the host asking a certain sector could also mean that the required data starts at a certain offset from the beginning of the sector - but does the device know that?). since I am operating in the realm of the device only - can I achieve the same? or: how can I make sure that browsing into folder "SD" will yield the contents of the file system of the SD card, while "xram" the content of a file system in external RAM?

0