C
BYTE MDD_SDSPI_SectorRead( DWORD sector_addr, BYTE* buffer );
Description
The MDD_SDSPI_SectorRead function reads 512 bytes of data from the SD card starting at the sector address and stores them in the location pointed to by 'buffer.'
Preconditions
The MDD_SectorRead function pointer must be pointing towards this function.
Parameters
Parameters |
Description |
sector_addr |
The address of the sector on the card. |
byffer |
The buffer where the retrieved data will be stored. If buffer is NULL, do not store the data anywhere. |
Return Values
Side Effects
None
Remarks
The card expects the address field in the command packet to be a byte address. The sector_addr value is converted to a byte address by shifting it left nine times (multiplying by 512).