File nut/dev/at49bv.c


Included Files


Preprocessor definitions

#define FLASH_CHIP_BASE 0x10000000

#define FLASH_CONF_SECTOR 0x6000

#define FLASH_CONF_SIZE 512

#define FLASH_ERASE_WAIT 3000

#define FLASH_CHIP_ERASE_WAIT 50000

#define FLASH_WRITE_POLLS 1000

#define FLASH_UNLOCK( base )

#define FLASH_COMMAND( base, cmd )

#define FLASH_CMD_ERASE 0x80

#define FLASH_CMD_ERASE_CHIP 0x10

#define FLASH_CMD_ERASE_SECTOR 0x30

#define FLASH_CMD_ENTER_ID 0x90

#define FLASH_CMD_EXIT_ID 0xF0

#define FLASH_CMD_PROGRAM 0xA0


Typedef flashdat_t

typedef unsigned short flashdat_t

Typedef flashadr_t

typedef unsigned long flashadr_t

Typedef flashptr_t

typedef volatile flashdat_t* flashptr_t

Local Variables

chip
static flashptr_t chip
Used in: At49bvChipErase()  
  At49bvInit()  
  At49bvSectorErase()  
  At49bvSectorWrite()  

Global Function At49bvChipErase()

int At49bvChipErase ( void )
Prototyped in: nut/include/dev/at49bv.h
Calls: At49bvWaitReady() nut/dev/at49bv.c
References Variables: chip nut/dev/at49bv.c

Global Function At49bvInit()

unsigned long At49bvInit ( void )
Prototyped in: nut/include/dev/at49bv.h
References Variables: chip nut/dev/at49bv.c

Global Function At49bvParamRead()

int At49bvParamRead ( u_int pos, void* data, u_int len )
Prototyped in: nut/include/dev/at49bv.h
Calls: At49bvSectorRead() nut/dev/at49bv.c

Global Function At49bvParamWrite()

int At49bvParamWrite ( u_int pos, const void* data, u_int len )
Prototyped in: nut/include/dev/at49bv.h
Calls: At49bvSectorErase() nut/dev/at49bv.c
  At49bvSectorRead() nut/dev/at49bv.c
  At49bvSectorWrite() nut/dev/at49bv.c
  free(), malloc(), memcmp(), memcpy()

Global Function At49bvSectorErase()

int At49bvSectorErase ( u_int off )
Prototyped in: nut/include/dev/at49bv.h
Calls: At49bvWaitReady() nut/dev/at49bv.c
Called by: At49bvParamWrite() nut/dev/at49bv.c
References Variables: chip nut/dev/at49bv.c

Global Function At49bvSectorRead()

int At49bvSectorRead ( u_int off, void* data, u_int len )
Prototyped in: nut/include/dev/at49bv.h
Calls: memcpy()
Called by: At49bvParamRead() nut/dev/at49bv.c
  At49bvParamWrite() nut/dev/at49bv.c

Global Function At49bvSectorWrite()

int At49bvSectorWrite ( u_int off, const void* data, u_int len )
Prototyped in: nut/include/dev/at49bv.h
Calls: At49bvWaitReady() nut/dev/at49bv.c
Called by: At49bvParamWrite() nut/dev/at49bv.c
References Variables: chip nut/dev/at49bv.c

Local Function At49bvWaitReady()

static int At49bvWaitReady ( flashptr_t addr, flashdat_t data, u_long tmo, int poll )
Calls: NutSleep() nut/os/timer.c
Called by: At49bvChipErase() nut/dev/at49bv.c
  At49bvSectorErase() nut/dev/at49bv.c
  At49bvSectorWrite() nut/dev/at49bv.c