projects
/
simavr
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: Increase MAX_IOs for atmega1280
[simavr]
/
simavr
/
sim
/
sim_avr.h
diff --git
a/simavr/sim/sim_avr.h
b/simavr/sim/sim_avr.h
index
199af29
..
6f6cc34
100644
(file)
--- a/
simavr/sim/sim_avr.h
+++ b/
simavr/sim/sim_avr.h
@@
-55,7
+55,7
@@
enum {
R_SREG = 32+0x3f,
// maximum number of IO registers, on normal AVRs
R_SREG = 32+0x3f,
// maximum number of IO registers, on normal AVRs
- MAX_IOs = 2
56
, // Bigger AVRs need more than 256-32 (mega1280)
+ MAX_IOs = 2
79
, // Bigger AVRs need more than 256-32 (mega1280)
};
#define AVR_DATA_TO_IO(v) ((v) - 32)
};
#define AVR_DATA_TO_IO(v) ((v) - 32)
@@
-139,6
+139,13
@@
typedef struct avr_t {
// not only to "cycles that runs" but also "cycles that might have run"
// like, sleeping.
avr_cycle_count_t cycle; // current cycle
// not only to "cycles that runs" but also "cycles that might have run"
// like, sleeping.
avr_cycle_count_t cycle; // current cycle
+
+ /**
+ * Sleep requests are accumulated in sleep_usec until the minimum sleep value
+ * is reached, at which point sleep_usec is cleared and the sleep request
+ * is passed on to the operating system.
+ */
+ uint32_t sleep_usec;
// called at init time
void (*init)(struct avr_t * avr);
// called at init time
void (*init)(struct avr_t * avr);