#include <board.h>
#include <assert.h>
Go to the source code of this file.
Functions | |
void | S25FL1_Configure (S25fl1 *pS25fl1, Qspid *pQspid, uint8_t polling) |
Initializes an S25FL1 driver instance with the given SPI driver and chip select value. | |
uint8_t | S25FL1_IsBusy (S25fl1 *pS25fl1) |
Is serial flash driver busy. | |
uint8_t | S25FL1_SendCommand (uint8_t Instr, uint8_t ReadWrite) |
Sends a command to the serial flash through the SPI. The command is made up of two parts: the first is used to transmit the command byte and optionally, address and dummy bytes. The second part is the data to send or receive. This function does not block: it returns as soon as the transfer has been started. An optional callback can be invoked to notify the end of transfer. | |
const S25fl1Desc * | S25FL1_FindDevice (S25fl1 *pS25fl1, uint32_t jedecId) |
Tries to detect a serial firmware flash device given its JEDEC identifier. The JEDEC id can be retrieved by sending the correct command to the device. |
Implementation for the S25FL1 SPI driver.
Definition in file s25fl1_qspi.c.
Initializes an S25FL1 driver instance with the given SPI driver and chip select value.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
pSpid | Pointer to an SPI driver instance. | |
cs | Chip select value to communicate with the serial flash. | |
polling | Uses polling mode instead of IRQ trigger. |
Definition at line 100 of file s25fl1_qspi.c.
const S25fl1Desc* S25FL1_FindDevice | ( | S25fl1 * | pS25fl1, | |
uint32_t | jedecId | |||
) |
Tries to detect a serial firmware flash device given its JEDEC identifier. The JEDEC id can be retrieved by sending the correct command to the device.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
jedecId | JEDEC identifier of device. |
Definition at line 174 of file s25fl1_qspi.c.
uint8_t S25FL1_IsBusy | ( | S25fl1 * | pS25fl1 | ) |
Is serial flash driver busy.
pS25fl1 | Pointer to an S25fl1 driver instance. |
Definition at line 128 of file s25fl1_qspi.c.
uint8_t S25FL1_SendCommand | ( | uint8_t | Instr, | |
uint8_t | ReadWrite | |||
) |
Sends a command to the serial flash through the SPI. The command is made up of two parts: the first is used to transmit the command byte and optionally, address and dummy bytes. The second part is the data to send or receive. This function does not block: it returns as soon as the transfer has been started. An optional callback can be invoked to notify the end of transfer.
pS25fl1 | Pointer to an S25fl1 driver instance. | |
cmd | Command byte. | |
cmdSize | Size of command (command byte + address bytes + dummy bytes). | |
pData | Data buffer. | |
dataSize | Number of bytes to send/receive. | |
address | Address to transmit. | |
callback | Optional user-provided callback to invoke at end of transfer. | |
pArgument | Optional argument to the callback function. |
Definition at line 158 of file s25fl1_qspi.c.