Jump to main content

##

# 1.1.11.1.1 How the Library Works

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

Abstraction Model

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

The client can be:

- Application - Directly access the AT25 EEPROM using the APIs provided by the AT25 Driver library

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

Working flow

- The AT25 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 AT25 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