#include <board.h>
#include <assert.h>
#include "stdlib.h"
#include "string.h"
Go to the source code of this file.
Defines | |
#define | READ_DEV 0 |
#define | WRITE_DEV 1 |
#define | PAGE_SIZE 256 |
Functions | |
void | XDMAC_Handler (void) |
XDMA handler. | |
void | S25FL1D_InitFlashInterface (uint8_t Mode) |
uint32_t | S25FL1D_ReadJedecId (void) |
Reads and returns the serial flash device ID. | |
void | S25FL1D_QuadMode (uint8_t Enable) |
Enables critical writes operation on a serial flash device, such as sector protection, status register, etc. | |
void | S25FL1D_EnableWrap (uint8_t ByetAlign) |
Enables critical writes operation on a serial flash device, such as sector protection, status register, etc. | |
void | S25FL1D_SetReadLatencyControl (uint8_t Latency) |
Enables critical writes operation on a serial flash device, such as sector protection, status register, etc. | |
void | S25FL1D_SoftReset (void) |
void | S25FL1D_ContReadModeReset (void) |
Issue 'CContinuous Read Mode' command, the device can return to normal SPI command mode, in which all commands can be accepts. | |
unsigned char | S25FL1D_Unprotect (void) |
Unprotected the contents of the serial flash device. | |
unsigned char | S25FL1D_Protect (uint32_t StartAddr, uint32_t Size) |
Unprotected the contents of the serial flash device. | |
unsigned char | S25FL1D_EraseChip (void) |
Erases all the content of the memory chip. | |
unsigned char | S25FL1D_EraseSector (unsigned int address) |
Erases the specified block of the serial firmware dataflash. | |
unsigned char | S25FL1D_Erase64KBlock (unsigned int address) |
Erases the specified 64KB block of the serial firmware dataflash. | |
unsigned char | S25FL1D_Write (uint32_t *pData, uint32_t size, uint32_t address, uint8_t Secure) |
Writes data at the specified address on the serial firmware dataflash. The page(s) to program must have been erased prior to writing. This function handles page boundary crossing automatically. | |
unsigned char | S25FL1D_Read (uint32_t *pData, uint32_t size, uint32_t address) |
Reads data from the specified address on the serial flash. | |
unsigned char | S25FL1D_ReadDual (uint32_t *pData, uint32_t size, uint32_t address) |
Reads data from the specified address on the serial flash. | |
unsigned char | S25FL1D_ReadQuad (uint32_t *pData, uint32_t size, uint32_t address) |
Reads data from the specified address on the serial flash. | |
unsigned char | S25FL1D_ReadDualIO (uint32_t *pData, uint32_t size, uint32_t address, uint8_t ContMode, uint8_t Secure) |
Reads data from the specified address on the serial flash. | |
unsigned char | S25FL1D_ReadQuadIO (uint32_t *pData, uint32_t size, uint32_t address, uint8_t ContMode, uint8_t Secure) |
Reads data from the specified address on the serial flash. |
Implementation for the S25FL1 Serialflash driver.
Definition in file s25fl1.c.
void S25FL1D_EnableWrap | ( | uint8_t | ByetAlign | ) |
unsigned char S25FL1D_Erase64KBlock | ( | unsigned int | address | ) |
Erases the specified 64KB block of the serial firmware dataflash.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
address | Address of the block to erase. |
Definition at line 793 of file s25fl1.c.
unsigned char S25FL1D_EraseChip | ( | void | ) |
unsigned char S25FL1D_EraseSector | ( | unsigned int | address | ) |
Erases the specified block of the serial firmware dataflash.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
address | Address of the block to erase. |
unsigned char S25FL1D_Protect | ( | uint32_t | StartAddr, | |
uint32_t | Size | |||
) |
void S25FL1D_QuadMode | ( | uint8_t | Enable | ) |
unsigned char S25FL1D_Read | ( | uint32_t * | pData, | |
uint32_t | size, | |||
uint32_t | address | |||
) |
Reads data from the specified address on the serial flash.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
pData | Data buffer. | |
size | Number of bytes to read. | |
address | Read address. |
Definition at line 912 of file s25fl1.c.
unsigned char S25FL1D_ReadDual | ( | uint32_t * | pData, | |
uint32_t | size, | |||
uint32_t | address | |||
) |
Reads data from the specified address on the serial flash.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
pData | Data buffer. | |
size | Number of bytes to read. | |
address | Read address. |
Definition at line 954 of file s25fl1.c.
unsigned char S25FL1D_ReadDualIO | ( | uint32_t * | pData, | |
uint32_t | size, | |||
uint32_t | address, | |||
uint8_t | ContMode, | |||
uint8_t | Secure | |||
) |
Reads data from the specified address on the serial flash.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
pData | Data buffer. | |
size | Number of bytes to read. | |
address | Read address. |
Definition at line 1042 of file s25fl1.c.
uint32_t S25FL1D_ReadJedecId | ( | void | ) |
unsigned char S25FL1D_ReadQuad | ( | uint32_t * | pData, | |
uint32_t | size, | |||
uint32_t | address | |||
) |
Reads data from the specified address on the serial flash.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
pData | Data buffer. | |
size | Number of bytes to read. | |
address | Read address. |
Definition at line 999 of file s25fl1.c.
unsigned char S25FL1D_ReadQuadIO | ( | uint32_t * | pData, | |
uint32_t | size, | |||
uint32_t | address, | |||
uint8_t | ContMode, | |||
uint8_t | Secure | |||
) |
Reads data from the specified address on the serial flash.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
pData | Data buffer. | |
size | Number of bytes to read. | |
address | Read address. |
Definition at line 1094 of file s25fl1.c.
void S25FL1D_SetReadLatencyControl | ( | uint8_t | Latency | ) |
unsigned char S25FL1D_Unprotect | ( | void | ) |
unsigned char S25FL1D_Write | ( | uint32_t * | pData, | |
uint32_t | size, | |||
uint32_t | address, | |||
uint8_t | Secure | |||
) |
Writes data at the specified address on the serial firmware dataflash. The page(s) to program must have been erased prior to writing. This function handles page boundary crossing automatically.
pS25fl1 | Pointer to an S25FL1 driver instance. | |
pData | Data buffer. | |
size | Number of bytes in buffer. | |
address | Write address. |
Definition at line 846 of file s25fl1.c.