Datasheet
Mmc_Read_Sector
258
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function Mmc_Read_Sector(dim sector as longint, dim byref
data as byte[512]) as byte
Returns
- 0 - if reading was successful
- 1 - if an error occurred
Description
The function reads one sector (512 bytes) from MMC card.
Parameters:
-
sector: MMC/SD card sector to be read.
- dbuff: buffer of minimum 512 bytes in length for data storage.
Requires MMC/SD card must be initialized. See Mmc_Init.
Example
' read sector 510 of the MMC/SD card
dim error as word
sectorNo as longword
dataBuffer as char[512]
...
main:
...
sectorNo = 510
error = Mmc_Read_Sector(sectorNo, dataBuffer)
...
end.