1.1.7.4 Library Interface
SDSPI driver library provides the following interfaces:
Functions
Name | Description |
---|---|
DRV_SDSPI_Initialize | Initializes the SD Card driver |
DRV_SDSPI_Status | Provides the current status of the SDSPI driver module |
DRV_SDSPI_Open | Opens the specified SD Card driver instance and returns a handle to it |
DRV_SDSPI_Close | Closes an opened-instance of the SD Card driver |
DRV_SDSPI_Tasks | Maintains the driver's state machine |
DRV_SDSPI_SyncRead | Reads blocks of data from the specified block address of the SD Card |
DRV_SDSPI_AsyncRead | Reads blocks of data from the specified block address of the SD Card |
DRV_SDSPI_SyncWrite | Writes blocks of data starting at the specified address of the SD Card |
DRV_SDSPI_AsyncWrite | Writes blocks of data starting at the specified address of the SD Card |
DRV_SDSPI_IsAttached | Returns the physical attach status of the SD Card |
DRV_SDSPI_IsWriteProtected | Returns the write protect status of the SD Card |
DRV_SDSPI_GeometryGet | Returns the geometry of the device |
DRV_SDSPI_EventHandlerSet | Allows 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_CommandStatusGet | Gets the current status of the command. For synchronous mode, the command status is only used by the file system |
DRV_SDSPI_Read | This routine provides interface to the file system to perform a media read operation in synchronous mode of the SDSPI driver |
DRV_SDSPI_Write | This routine provides interface to the file system to perform a media write operation in synchronous mode of the SDSPI driver |
Data types and constants
Name | Type | Description |
---|---|---|
DRV_SDSPI_EVENT | Enum | Identifies the possible events that can result from a request |
DRV_SDSPI_COMMAND_STATUS | Enum | Identifies the possible events that can result from a request |
DRV_SDSPI_COMMAND_HANDLE | Typedef | Handle identifying commands queued in the driver |
DRV_SDSPI_COMMAND_HANDLE_INVALID | Macro | SDSPI Driver's Invalid Command Handle |
DRV_SDSPI_EVENT_HANDLER | Typedef | Pointer to a SDSPI Driver Event handler function |