<< Previous | Next >> | |
|
int sdspi_initDevice( int indx, sd_dev_interface * sd_dev );
Description
- Initializes the SD card pointed to by
sd_dev
and adds information about the cards interface to the SD device array in the position pointed to byindx
. Sets up the default block size of 512 bytes used by sector read/write functions. This function should be called before any calls to other sdspi functions.Parameters
- indx
- Index into the SD device array to add the card.
- sd_dev
- Pointer to sd_dev_interface for the SD card.
Return Value
- 0: Success
-EIO
: I/O error
-EINVAL
: Invalid parameter given
-ENOMEDIUM
: No SD card in socket
-ESHAREDBUSY
: SPI port busyLibrary
- SDFLASH.LIB
Dynamic C Functions | << Previous | Next >> | rabbit.com |