Information Technology Reference
In-Depth Information
Figure 10-1: A mass-storage master performs these actions to read the
contents of a file.
Reading from a File
The FILEopen function above can prepare to read from a file. Because stor-
age media typically requires reading complete sectors, each read from the
media reads a sector's worth of data even if the firmware requires just one or
a few bytes.
Tasks
To read a file's contents, firmware must perform the following actions
(shown in Figure 10-1):
1. Get the file's size and the number of the file's first cluster from the direc-
tory entry and convert the cluster number to an LBA sector number.
2. Read data from the cluster's sector(s).
 
Search WWH ::




Custom Search