Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
Mmc_Fat_Init
261
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function Mmc_Fat_Init() as byte
Returns
0
- if MMC/SD card was detected and successfully initialized 
1
- if FAT16 boot sector was not found 
255
- if MMC/SD card was not detected 
Description
Initializes MMC/SD card, reads MMC/SD FAT16 boot sector and extracts neces-
sary data needed by the library.
Note: MMC/SD card has to be formatted to FAT16 file system. 
Requires
Mmc_Chip_Select:
Chip Select line 
Mmc_Chip_Select_Direction:
Direction of the Chip Select pin 
must be defined before using this function. 
The appropriate hardware SPI module must be previously initialized. See the
SPI1_Init, SPI1_Init_Advanced routines. 
Example
' init the FAT library
if (Mmc_Fat_Init() = 0) then
...
end if