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


Global Variable wbuf

unsigned char wbuf[128]
Visible in:   nut/boot/bootmon/nvmem.c
Used in: NvMemWrite() nut/boot/bootmon/nvmem.c

Global Function NvMemInit()

void NvMemInit ( void )
Prototyped in: nut/boot/bootmon/nvmem.h
Calls: TwInit() nut/arch/avr/dev/twif.c

Global Function NvMemRead()

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

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
  TwMasterTransact() nut/arch/avr/dev/twif.c
  memcpy_()
References Variables: wbuf nut/boot/bootmon/nvmem.c

Local Function NvMemWaitReady()

static int NvMemWaitReady ( void )
Calls: Delay() nut/app/basemon/utils.c
  TwMasterTransact() nut/arch/avr/dev/twif.c
Called by: NvMemWrite() nut/boot/bootmon/nvmem.c

Local Function NvMemWriteEnable()

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