<< Previous | Next >>

nf_XD_Detect

long nf_XD_Detect( int debounceMode );

Description

This function attempts to read the xD card ID and searches the internal device table for that ID in detect mode 1. In detect mode 0 it just uses the xD card detect.

Assumes only one XD card present.

WARNING! - This should not be called to determine if it is safe to do write operations if there is a chance a removable device might be pulled between calling it and the write. It is best used to determine if a device is present to proceed with an automount after a device has been unmounted in SW and removed.

Parameters

debounceMode
0 - no debouncing
1 - busy wait for debouncing interval
2 - for use if function to be called until debouncing interval is done, e.g.,


waitfor(rc = nf_XD_Detect(1) != -EAGAIN);

-EAGAIN will be returned until done.

Return value

>0: The ID that was found on the device and in the table
-EBUSY: NAND flash device is busy
-ENODEV: No device found
-EAGAIN: if debounceMode equals 2, then not done debouncing, try again

Library

NFLASH_FAT.LIB


Dynamic C Functions << Previous | Next >> rabbit.com