#include "sim_interrupts.h"
#include "sim_cycle_timers.h"
+typedef uint32_t avr_flashaddr_t;
+
struct avr_t;
typedef uint8_t (*avr_io_read_t)(
struct avr_t * avr,
* this is why you will see >>1 and <<1 in the decoder to handle jumps.
* It CAN be a little confusing, so concentrate, young grasshopper.
*/
- uint32_t pc;
+ avr_flashaddr_t pc;
/*
* callback when specific IO registers are read/written.
int
avr_init(
avr_t * avr);
+// Used by the cores, allocated a mutable avr_t from the const global
+avr_t *
+avr_core_allocate(
+ const avr_t * core,
+ uint32_t coreLen);
+
// resets the AVR, and the IO modules
void
avr_reset(
avr_t * avr,
uint8_t * code,
uint32_t size,
- uint32_t address);
+ avr_flashaddr_t address);
/*
* these are accessors for avr->data but allows watchpoints to be set for gdb