Mikroelektronika MIKROE-350 データシート

ページ / 526
Mmc_Read_Cid
Mmc_Read_Csd
260
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function Mmc_Read_Cid(dim byref data_cid as byte[16]) as byte
Returns
0
- if CID register was read successfully 
1
- if there was an error while reading 
Description
The function reads 16-byte CID register.
Parameters:
data_cid:
buffer of minimum 16 bytes in length for storing CID register content. 
Requires
MMC/SD card must be initialized. See Mmc_Init.
Example
dim error as word
dataBuffer 
as byte[16]
...
main:
...
error = Mmc_Read_Cid(dataBuffer)
...
end.
Prototype
sub function Mmc_Read_Csd(dim byref data_for_registers as
byte
[16]) as byte
Returns
0
- if CSD register was read successfully 
1
- if there was an error while reading 
Description
The function reads 16-byte CSD register.
Parameters:
data_csd:
buffer of minimum 16 bytes in length for storing CSD register content. 
Requires
MMC/SD card must be initialized. See Mmc_Init.
Example
dim error as word
dataBuffer  
as char[16]
...
main:
...
error = Mmc_Read_Csd(dataBuffer)
...
end.