1.1.3.4 Library Interface

Memory driver library provides the following interfaces:

Functions

NameDescription
DRV_MEMORY_InitializeInitializes the Memory instance for the specified driver index
DRV_MEMORY_StatusGets the current status of the Memory driver module
DRV_MEMORY_TasksMaintains the Memory driver's internal state machine
DRV_MEMORY_OpenOpens the specified Memory driver instance and returns a handle to it
DRV_MEMORY_CloseCloses an opened-instance of the Memory driver
DRV_MEMORY_AsyncEraseErase the specified number of memory blocks in Asynchronous mode
DRV_MEMORY_SyncEraseErase the specified number of memory blocks in Synchronous mode
DRV_MEMORY_AsyncEraseWriteErase and Write data for the specified number of memory blocks in Asynchronous mode
DRV_MEMORY_SyncEraseWriteErase and Write data for the specified number of memory blocks in Synchronous mode
DRV_MEMORY_AsyncWriteWrites data for the specified number of memory blocks in Asynchronous mode
DRV_MEMORY_SyncWriteWrites data for the specified number of memory blocks in Synchronous mode
DRV_MEMORY_AsyncReadReads data for the specified number of memory blocks in Asynchronous mode
DRV_MEMORY_SyncReadReads data for the specified number of memory blocks in Synchronous mode
DRV_MEMORY_GeometryGetReturns the geometry of the memory device
DRV_MEMORY_TransferStatusGetGets the current status of the transfer request on attached device
DRV_MEMORY_CommandStatusGetGets the current status of the command
DRV_MEMORY_TransferHandlerSetSets the pointer to the function (and it's context) to be called when queued operation has completed
DRV_MEMORY_IsAttachedReturns the physical attach status of the Media
DRV_MEMORY_IsWriteProtectedReturns the write protect status of the Memory
DRV_MEMORY_AddressGetReturns the Memory media start address
DRV_MEMORY_EraseInterface to the file system to perform a erase operation in Synchronous mode
DRV_MEMORY_EraseWriteInterface to the file system to perform a erase-write operation in Synchronous mode
DRV_MEMORY_WriteInterface to the file system to perform a write operation in Synchronous mode
DRV_MEMORY_ReadInterface to the file system to perform a read operation in Synchronous mode

Data types and constants

NameTypeDescription
DRV_MEMORY_COMMAND_HANDLETypedefHandle to identify commands queued in the driver
DRV_MEMORY_COMMAND_HANDLE_INVALIDMacroThis value defines the Memory Driver's Invalid Command Handle
DRV_MEMORY_EVENTEnumIdentifies the possible events that can result from a request
DRV_MEMORY_COMMAND_STATUSEnumMemory Driver command Status
DRV_MEMORY_TRANSFER_HANDLERTypedefPointer to a Memory Driver Event handler function
MEMORY_DEVICE_TRANSFER_STATUSEnumMemory Device Transfer Status
MEMORY_DEVICE_GEOMETRYStructMemory Device Geometry Table
DRV_MEMORY_DEVICE_INTERFACEStructMemory Device API Interface
DRV_MEMORY_INITStructMemory Driver Initialization Data