Mikroelektronika MIKROE-350 データシート
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
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
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
dim error as word
sectorNo
as longword
dataBuffer
as char[512]
...
main:
...
sectorNo = 510
sectorNo = 510
error = Mmc_Read_Sector(sectorNo, dataBuffer)
...
...
end.