flash25.h File Reference
Function library for serial Flash memory. More...
#include <kern/kfile.h>
#include <cfg/compiler.h>
#include <appconfig.h>
Go to the source code of this file.
Defines | |
| #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 | |
| void | flash25_init (struct KFile *fd, struct KFile *_channel) |
| Init data flash memory interface. | |
| void | flash25_chipErase (void) |
| Chip erase function. | |
| void | flash25_sectorErase (Flash25Sector sector) |
| Sector erase function. | |
Detailed Description
Function library for serial Flash memory.
- Version:
- Id
- flash25.h 1051 2008-01-16 16:35:25Z asterix
Definition in file flash25.h.
Define Documentation
| #define FLASH25_AT25F2048 1 |
Memory definition.
- Note:
- Below are defined valid serial flash memory support to this drive. Every time we call flash25_init() function we check if memory defined are right (see flash25.c form more detail).
Enumeration Type Documentation
| enum Flash25Opcode |
Serial flash opcode commands.
- Enumerator:
| enum Flash25Sector |
Function Documentation
| void flash25_chipErase | ( | void | ) |
| void flash25_sectorErase | ( | Flash25Sector | sector | ) |
