SimAVR
AVR Simulator
EEPROM

Data Structures

struct  avr_eeprom_t
 
struct  avr_eeprom_desc_t
 

Macros

#define AVR_IOCTL_EEPROM_GET   AVR_IOCTL_DEF('e','e','g','p')
 
#define AVR_IOCTL_EEPROM_SET   AVR_IOCTL_DEF('e','e','s','p')
 
#define AVR_EEPROM_DECLARE(_vector)
 The eeprom block seems to be very similar across AVRs, so here is a macro to declare a "typical" one in a core. More...
 
#define AVR_EEPROM_DECLARE_NOEEPM(_vector)
 no EEPM registers in atmega128 More...
 
#define AVR_EEPROM_DECLARE_8BIT(_vector)
 macro definition without a high address bit register, which is not implemented in some tiny AVRs. More...
 

Typedefs

typedef struct avr_eeprom_t avr_eeprom_t
 
typedef struct avr_eeprom_desc_t avr_eeprom_desc_t
 

Functions

void avr_eeprom_init (avr_t *avr, avr_eeprom_t *port)
 

Detailed Description

Macro Definition Documentation

#define AVR_EEPROM_DECLARE (   _vector)
Value:
.eeprom = { \
.size = E2END+1, \
.r_eearh = EEARH, \
.r_eearl = EEARL, \
.r_eedr = EEDR, \
.r_eecr = EECR, \
.eepm = { AVR_IO_REGBIT(EECR, EEPM0), AVR_IO_REGBIT(EECR, EEPM1) }, \
.eempe = AVR_IO_REGBIT(EECR, EEMPE), \
.eepe = AVR_IO_REGBIT(EECR, EEPE), \
.eere = AVR_IO_REGBIT(EECR, EERE), \
.ready = { \
.enable = AVR_IO_REGBIT(EECR, EERIE), \
.vector = _vector, \
}, \
}
#define AVR_IO_REGBIT(_io, _bit)
Definition: sim_regbit.h:150

The eeprom block seems to be very similar across AVRs, so here is a macro to declare a "typical" one in a core.

#define AVR_EEPROM_DECLARE_8BIT (   _vector)
Value:
.eeprom = { \
.size = E2END+1, \
.r_eearl = EEARL, \
.r_eedr = EEDR, \
.r_eecr = EECR, \
.eepm = { AVR_IO_REGBIT(EECR, EEPM0), AVR_IO_REGBIT(EECR, EEPM1) }, \
.eempe = AVR_IO_REGBIT(EECR, EEMPE), \
.eepe = AVR_IO_REGBIT(EECR, EEPE), \
.eere = AVR_IO_REGBIT(EECR, EERE), \
.ready = { \
.enable = AVR_IO_REGBIT(EECR, EERIE), \
.vector = _vector, \
}, \
}
#define AVR_IO_REGBIT(_io, _bit)
Definition: sim_regbit.h:150

macro definition without a high address bit register, which is not implemented in some tiny AVRs.

#define AVR_EEPROM_DECLARE_NOEEPM (   _vector)
Value:
.eeprom = { \
.size = E2END+1, \
.r_eearh = EEARH, \
.r_eearl = EEARL, \
.r_eedr = EEDR, \
.r_eecr = EECR, \
.eepm = { }, \
.eempe = AVR_IO_REGBIT(EECR, EEMWE), \
.eepe = AVR_IO_REGBIT(EECR, EEWE), \
.eere = AVR_IO_REGBIT(EECR, EERE), \
.ready = { \
.enable = AVR_IO_REGBIT(EECR, EERIE), \
.vector = _vector, \
}, \
}
#define AVR_IO_REGBIT(_io, _bit)
Definition: sim_regbit.h:150

no EEPM registers in atmega128

#define AVR_IOCTL_EEPROM_GET   AVR_IOCTL_DEF('e','e','g','p')
#define AVR_IOCTL_EEPROM_SET   AVR_IOCTL_DEF('e','e','s','p')

Typedef Documentation

typedef struct avr_eeprom_t avr_eeprom_t

Function Documentation

void avr_eeprom_init ( avr_t avr,
avr_eeprom_t port 
)

Here is the call graph for this function:

Here is the caller graph for this function: