File nut/boot/bootmon/nvmem.c


Included Files


Preprocessor definitions

#define EEPROM_PAGE_SIZE 64

#define I2C_SLA_RTC 0x6F

#define I2C_SLA_EEPROM 0x57

#define I2C_SLA_PLL 0x69

#define DFCMD_BUF1_FLASH 0x83

#define DFCMD_BUF1_WRITE 0x84

#define DFCMD_READ_STATUS 0xD7

#define DFCMD_CONT_READ 0xE8

#define SPI_WRITE 1

#define SPI_READ 2

#define NVMEM_BUFF_SIZE 128


Local Variables

at45d_avail
static int at45d_avail

page_buf
static unsigned char page_buf[128]

Used in: NvMemWrite()  

Global Function NvMemInit()

void NvMemInit ( void )
Prototyped in: nut/boot/bootmon/nvmem.h
Calls: TwInit()

Global Function NvMemRead()

int NvMemRead ( unsigned int addr, void* buff, unsigned int len )
Prototyped in: nut/boot/bootmon/nvmem.h
Calls: TwMasterTransact()

Global Function NvMemWrite()

int NvMemWrite ( unsigned int addr, void* buff, unsigned int len )
Prototyped in: nut/boot/bootmon/nvmem.h
Calls: NvMemWaitReady() nut/boot/bootmon/nvmem.c
  NvMemWriteEnable() nut/boot/bootmon/nvmem.c
  memcpy_() nut/boot/appload/utils.c
  TwMasterTransact()
References Variables: page_buf nut/boot/bootmon/nvmem.c

Local Function NvMemWaitReady()

static int NvMemWaitReady ( void )
Calls: Delay() nut/boot/appload/utils.c
  TwMasterTransact()
Called by: NvMemWrite() nut/boot/bootmon/nvmem.c

Local Function NvMemWriteEnable()

static int NvMemWriteEnable ( int on )
Calls: TwMasterTransact()
Called by: NvMemWrite() nut/boot/bootmon/nvmem.c