Mikroelektronika MIKROE-738 Datenbogen

Seite von 682
mikroC PRO for PIC32
MikroElektronika
291
Cf_Detect
Cf_Enable
Cf_Disable
Prototype
unsigned int Cf_Detect();
Description Checks for presence of CF card by reading the 
chip
 
detect
 pin.
Parameters None.
Returns
1
 - if CF card was detected 
0
 - otherwise 
Requires
The corresponding MCU ports must be appropriately initialized for CF card. See 
Cf_Init
.
Example
// Wait until CF card is inserted:
do
  asm nop;
while (!Cf_Detect());
Notes
PIC32 family MCU and CF card voltage levels are different. The user must ensure that MCU’s pin 
connected to CD line can read CF card Logical One correctly.
Prototype
void Cf_Enable();
Description Enables the device. Routine needs to be called only if you have disabled the device by means of the 
Cf_Disable routine. These two routines in conjunction allow you to free/occupy data line when working 
with multiple devices.
Parameters None.
Returns
Nothing.
Requires
The corresponding MCU ports must be appropriately initialized for CF card. See Cf_Init.
Example
// enable compact flash
Cf_Enable();
Notes
None.
Prototype
void Cf_Disable();
Description Routine disables the device and frees the data lines for other devices. To enable the device again, call 
Cf_Enable. These two routines in conjunction allow you to free/occupy data line when working with 
multiple devices.
Parameters None.
Returns
Nothing.
Requires
The corresponding MCU ports must be appropriately initialized for CF card. See Cf_Init.
Example
// disable compact flash
Cf_Disable();
Notes
None.