<< Previous | Next >> | |
|
int sdspi_set_block_length( sd_device * sd, int block_length );
Description
- This function executes protocol command 16 to set the block length for the SD card. The default block length for SD cards is 512 bytes. Please note that
sdspi_write_sector()
andsdspi_read_sector()
work on 512 byte blocks only. If you change the block size, these functions will need to be modified, or you will need to execute commands directly throughsdspi_process_command()
and internal write block and read block functions.Parameter
- sd
- Pointer to device structure of the SD card.
- block_length
- The block size in bytes for the SD card.
Return Value
- 0: Success
-EIO
: I/O error
-EINVAL
: Invalid parameter given
-ENOMEDIUM
: No SD card in socket
-ESHAREDBUSY
: Shared SPI port busyLibrary
- SDFLASH.LIB
Dynamic C Functions | << Previous | Next >> | rabbit.com |