EVE 1.0
nRF52 nono-volatile RAM driver
Collaboration diagram for nRF52 nono-volatile RAM driver:

Macros

#define NVRAM_SIZE   (0x1000 - NVRAM_BLD_PEER_DATA_SIZE)
 
#define NVRAM_BLD_PEER_DATA_ADDR   ((void *) (0x20000000 + NRF_FICR->INFO.RAM * 1024 - NVRAM_BLD_PEER_DATA_SIZE))
 
#define NVRAM_BLD_PEER_DATA_SIZE   (0x80)
 

Typedefs

typedef uint16_t nvram_addr_t
 

Functions

void nvram_write (nvram_addr_t addr, const void *buf, uint16_t size)
 Name: nvram_write
Writes a buffer into NVRAM. More...
 
void nvram_read (nvram_addr_t addr, void *buf, uint16_t size)
 Name: nvram_write
Reads data from the NVRAM. More...
 
void nvram_init (void)
 Name: nvram_init
Initialize the NVRAM module.
 

Detailed Description

Macro Definition Documentation

#define NVRAM_SIZE   (0x1000 - NVRAM_BLD_PEER_DATA_SIZE)

Size of the NVRAM (µCU-specific)

Definition at line 48 of file nvram.h.

#define NVRAM_BLD_PEER_DATA_ADDR   ((void *) (0x20000000 + NRF_FICR->INFO.RAM * 1024 - NVRAM_BLD_PEER_DATA_SIZE))

Address of the bootloader params area

Definition at line 51 of file nvram.h.

#define NVRAM_BLD_PEER_DATA_SIZE   (0x80)

Size of the bootloader params area

Definition at line 54 of file nvram.h.

Typedef Documentation

typedef uint16_t nvram_addr_t

Address in the NVRAM space

Definition at line 57 of file nvram.h.

Function Documentation

void nvram_write ( nvram_addr_t  addr,
const void *  buf,
uint16_t  size 
)

Name: nvram_write
Writes a buffer into NVRAM.

Parameters
addrThe address in NVRAM to which the buffer should be written.
bufA pointer to the buffer from which data is to be read.
sizeThe number of bytes to write into NVRAM.
void nvram_read ( nvram_addr_t  addr,
void *  buf,
uint16_t  size 
)

Name: nvram_write
Reads data from the NVRAM.

Parameters
addrThe address in NVRAM from which the data should be read.
bufA pointer to the buffer to which the data should be stored.
sizeThe number of bytes to read.