flash25.h File Reference
Function library for serial Flash memory. More...
#include "cfg/cfg_flash25.h"#include <cfg/compiler.h>#include <kern/kfile.h>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. | |
Detailed Description
Function library for serial Flash memory.
- Version:
- Id
- flash25.h 2346 2009-02-16 10:02:32Z duplo
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 | ( | Flash25 * | fd | ) |
| void flash25_sectorErase | ( | Flash25 * | fd, | |
| Flash25Sector | sector | |||
| ) |
| bool flash25_test | ( | KFile * | channel | ) |
Test function for flash25.
- Note:
- : This implentation use a SPI channel.
Definition at line 54 of file flash25_hwtest.c.
