Jump to main content

##

# 1.1.12.1.1 How the Library Works

The AT25DF driver library is a single-client, single-instance based driver interface.

Abstraction Model

The AT25DF driver interface provides read, write and Erase functions that abstract out the internal workings of the AT25DF driver and the underlying SPI protocol.

The client can be:

- Application - Directly access the AT25DF Flash using the APIs provided by the AT25DF Driver library

- Memory Driver - Application can run a file system on the AT25DF Flash by connecting it to the Memory Driver which can further be connected to the File System Service

Working flow

- The AT25DF Driver Library registers an event handler with the underlying SPI peripheral library (PLIB). This event handler is called by the PLIB from the interrupt context to notify the AT25DF driver that the requested transfer is complete

- The library's state machine is driven from the interrupt context. Once a transfer is complete a callback (if registered by the application) is given to the application from the interrupt context

- The library does not support queuing of more than one requests. The application must check and ensure that any previous request is completed before submitting a new one. This can be done either by polling the status of the data transfer or by registering a callback