mikroC

making it simple...

Cf_Init

mikroC - C Compiler for Microchip PIC microcontrollers

Prototype

void Cf_Init(char *ctrlport, char *dataport);

Description Initializes ports appropriately for communication with CF card. Specify two different ports: ctrlport and dataport.

Example

Cf_Init(&PORTB, &PORTD);

Cf_Detect

Prototype

char Cf_Detect(void);

 

 

Returns

Returns 1 if CF is present, otherwise returns 0.

 

 

Description

Checks for presence of CF card on ctrlport.

 

 

 

 

 

Example

//

Wait

until

CF card is inserted:

 

do

nop;

while

(Cf_Detect() == 0);

 

 

 

 

 

Cf_Total_Size

Prototype

unsigned long Cf_Total_Size(void);

 

 

Returns

Card size in kilobytes.

 

 

Description

Returns size of Compact Flash card in kilobytes.

 

 

Requires

Ports must be initialized. See Cf_Init.

 

 

Example

size = Cf_Total_Size();

 

 

 

 

page

 

MikroElektronika: Development tools - Books - Compilers

163