1.1.7.4 Library Interface

SDSPI driver library provides the following interfaces:

Functions

NameDescription
DRV_SDSPI_InitializeInitializes the SD Card driver
DRV_SDSPI_StatusProvides the current status of the SDSPI driver module
DRV_SDSPI_OpenOpens the specified SD Card driver instance and returns a handle to it
DRV_SDSPI_CloseCloses an opened-instance of the SD Card driver
DRV_SDSPI_TasksMaintains the driver's state machine
DRV_SDSPI_SyncReadReads blocks of data from the specified block address of the SD Card
DRV_SDSPI_AsyncReadReads blocks of data from the specified block address of the SD Card
DRV_SDSPI_SyncWriteWrites blocks of data starting at the specified address of the SD Card
DRV_SDSPI_AsyncWriteWrites blocks of data starting at the specified address of the SD Card
DRV_SDSPI_IsAttachedReturns the physical attach status of the SD Card
DRV_SDSPI_IsWriteProtectedReturns the write protect status of the SD Card
DRV_SDSPI_GeometryGetReturns the geometry of the device
DRV_SDSPI_EventHandlerSetAllows a client to identify an event handling function for the driver to call back when queued operation has completed. For the synchronous SDSPI driver, the event handler is only used by the file system
DRV_SDSPI_CommandStatusGetGets the current status of the command. For synchronous mode, the command status is only used by the file system
DRV_SDSPI_ReadThis routine provides interface to the file system to perform a media read operation in synchronous mode of the SDSPI driver
DRV_SDSPI_WriteThis routine provides interface to the file system to perform a media write operation in synchronous mode of the SDSPI driver

Data types and constants

NameTypeDescription
DRV_SDSPI_EVENTEnumIdentifies the possible events that can result from a request
DRV_SDSPI_COMMAND_STATUSEnumIdentifies the possible events that can result from a request
DRV_SDSPI_COMMAND_HANDLETypedefHandle identifying commands queued in the driver
DRV_SDSPI_COMMAND_HANDLE_INVALIDMacroSDSPI Driver's Invalid Command Handle
DRV_SDSPI_EVENT_HANDLERTypedefPointer to a SDSPI Driver Event handler function