BeRTOS
|
Function library for serial Flash memory. More...
Go to the source code of this file.
Data Structures | |
struct | Flash25 |
Flash25 KFile context structure. More... | |
Defines | |
#define | KFT_FLASH25 MAKE_ID('F', 'L', '2', '5') |
ID for dataflash. | |
#define | FLASH25_AT25F2048 1 |
Memory definition. | |
Typedefs | |
typedef uint32_t | flash25Addr_t |
Type definition for serial flash memory. | |
Enumerations | |
enum | Flash25Opcode { FLASH25_WREN = 0x6, FLASH25_WRDI = 0x4, FLASH25_RDSR = 0x5, FLASH25_WRSR = 0x1, FLASH25_READ = 0x3, FLASH25_PROGRAM = 0x2, FLASH25_SECTORE_ERASE = 0x52, FLASH25_CHIP_ERASE = 0x62, FLASH25_RDID = 0x15 } |
Serial flash opcode commands. More... | |
enum | Flash25Sector { FLASH25_SECT1 = 0x0, FLASH25_SECT2 = 0x10000, FLASH25_SECT3 = 0x20000, FLASH25_SECT4 = 0x30000 } |
Serial flash sector memory address. More... | |
Functions | |
Flash25 * | FLASH25_CAST (KFile *fd) |
Convert + ASSERT from generic KFile to Flash25. | |
void | flash25_init (Flash25 *fd, KFile *ch) |
Init data flash memory interface. | |
void | flash25_chipErase (Flash25 *fd) |
Chip erase function. | |
void | flash25_sectorErase (Flash25 *fd, Flash25Sector sector) |
Sector erase function. | |
bool | flash25_test (KFile *channel) |
Test function for flash25. |
#define FLASH25_AT25F2048 1 |
Memory definition.
enum Flash25Opcode |
Serial flash opcode commands.
enum Flash25Sector |
void flash25_chipErase | ( | Flash25 * | fd | ) |
void flash25_sectorErase | ( | Flash25 * | fd, |
Flash25Sector | sector | ||
) |
bool flash25_test | ( | KFile * | channel | ) |
Test function for flash25.
Definition at line 53 of file flash25_hwtest.c.