10 #define USE_SOFTWARE_TWI 18 #if defined(USE_SOFTWARE_TWI) 20 #include "Software/TWI.h" 21 Software::TWI<BOARD::D18, BOARD::D19>
twi;
22 #elif defined(USE_HARDWARE_TWI) 23 #include "Hardware/TWI.h" 32 #define CACHE(v) cache_ ## v 49 Serial.print(F(
"calc:eeprom.SIZE = "));
50 Serial.print(eeprom.
SIZE);
51 Serial.print(F(
", addr = "));
52 Serial.println(eeprom.alloc(0));
54 Serial.print(F(
"calc:CACHE(u).SIZE = "));
55 Serial.print(
CACHE(u).SIZE);
56 Serial.print(F(
", buf = "));
57 Serial.print((
int) &u);
58 Serial.print(F(
", addr = "));
59 Serial.println(
CACHE(u).addr());
62 for (
int i = 0; i <
CACHE(u).NMEMB; i++) {
70 for (
int i = 0; i <
CACHE(u).NMEMB; i++) {
87 #if defined(INITIATE_EEPROM) 88 Serial.println(F(
"setup:init"));
89 for (
size_t i = 0; i <
sizeof(
v) /
sizeof(v[0]); i++) {
92 strcat(w,
"Nisse badar");
95 Serial.print(F(
"setup:CACHE(v).read = "));
96 Serial.println(
CACHE(v).read());
98 Serial.print(F(
"setup:CACHE(w).read = "));
99 Serial.print(
CACHE(w).read());
100 Serial.print(F(
", \""));
110 Serial.print(F(
"loop:eeprom.SIZE = "));
111 Serial.print(eeprom.
SIZE);
112 Serial.print(F(
", addr = "));
113 Serial.println(eeprom.alloc(0));
115 Serial.print(F(
"loop:CACHE(v).SIZE = "));
116 Serial.print(
CACHE(v).SIZE);
117 Serial.print(F(
", buf = "));
118 Serial.print((
int) &v);
119 Serial.print(F(
", addr = "));
120 Serial.println(
CACHE(v).addr());
122 Serial.print(F(
"loop:CACHE(w).SIZE = "));
123 Serial.print(
CACHE(w).SIZE);
124 Serial.print(F(
", buf = "));
125 Serial.print((
int) &w);
126 Serial.print(F(
", addr = "));
127 Serial.println(
CACHE(w).addr());
130 for (
size_t i = 0; i <
sizeof(
v) /
sizeof(v[0]); i++) {
138 Serial.print(F(
"loop:CACHE(v).write = "));
139 Serial.println(
CACHE(v).write());
145 for (
size_t i = 0; i <
sizeof(
v) /
sizeof(v[0]); i++) {
150 Serial.print(F(
"loop:CACHE(v).read = "));
151 Serial.println(
CACHE(v).read());
Software::TWI< BOARD::D18, BOARD::D19 > twi