1.1.7.4.15 DRV_SDSPI_Read Function

C

void DRV_SDSPI_Read
(
    const DRV_HANDLE handle,
    DRV_SDSPI_COMMAND_HANDLE* commandHandle,
    void* targetBuffer,
    uint32_t blockStart,
    uint32_t nBlock
)

Summary

This routine provides interface to the file system to perform a media read operation in synchronous mode of the SDSPI driver.

Description

This function is internally used by the file system.

Preconditions

The DRV_SDSPI_Initialize routine must have been called. The DRV_SDSPI_Open must have been called to obtain a valid opened device handle.

Parameters

ParamDescription
handleA valid open-instance handle, returned from the driver's open function
commandHandlePointer to an argument that will contain the return buffer handle
targetBufferBuffer into which the data read from the SD Card will be placed
blockStartStart block address of the SD Card from where the read should begin.
nBlockTotal number of blocks to be read.

Returns

The buffer handle is returned in the commandHandle argument. It will be DRV_SDSPI_COMMAND_HANDLE_INVALID if the request was not successful.

Example

None.

Remarks

This function is internally used by the file system.