Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
277
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Mmc_Fat_QuickFormat
Prototype
function Mmc_Fat_QuickFormat(var port : word; pin : word; var
mmc_fat_label : 
string[11]) : byte;
Returns
0
- if MMC/SD card was detected, successfully formated and initialized 
1
- if FAT16 format was unseccessful 
255
- if MMC/SD card was not detected 
Description
Formats to FAT16 and initializes MMC/SD card.
Parameters:
port
: chip select signal port address. 
pin
: chip select pin. 
mmc_fat_label
: volume label (11 characters in length). If less than 11 charac
ters are provided, the label will be padded with spaces. If an empty string is 
passed, the volume will not be labeled. 
Note: This routine can be used instead or in conjunction with the
Mmc_Fat_Init routine.
Note: If MMC/SD card already contains a valid boot sector, it will remain
unchanged (except volume label field) and only FAT and ROOT tables will be
erased. Also, the new volume label will be set.
Requires
The appropriate hardware SPI module must be previously initialized.
Example
// format and initialize the FAT library
if (Mmc_Fat_QuickFormat('mikroE') = 0) then
begin
...
end;