diff --git a/simulator/rdtemp/cli.ino b/simulator/rdtemp/cli.ino index 255b45f..7ee04f0 100644 --- a/simulator/rdtemp/cli.ino +++ b/simulator/rdtemp/cli.ino @@ -69,7 +69,8 @@ prtln(""); /* --------------------------------------------------------------- */ static void clihelp() { - prtln("x\texit cli"); + prtln("x\texit cli"); + prtln("I\tinit storage"); } /* --------------------------------------------------------------- */ void phytocli(void) @@ -94,6 +95,7 @@ do { switch(key) { case 'x': flag_exit=1; break; case '?': clihelp(); break; + case 'I': init_storage(); break; } } while (!flag_exit); diff --git a/simulator/rdtemp/rdtemp.ino b/simulator/rdtemp/rdtemp.ino index c5cb36b..6016949 100644 --- a/simulator/rdtemp/rdtemp.ino +++ b/simulator/rdtemp/rdtemp.ino @@ -14,7 +14,7 @@ void setup() { Serial.print("\n"); - phytocli(); + phytocli(); /* XXX */ /* XXX */ /* changing the voltage reference of the ADC @@ -90,7 +90,14 @@ void loop() { if (foo++ > 5) { readlight(); foo = 0; - } + } + + /* check for CLI request */ + if (Serial.available() && 0x55==Serial.read()) + { + Serial.println("M cli request"); + phytocli(); + } delay(DELAI); } diff --git a/simulator/rdtemp/storage.ino b/simulator/rdtemp/storage.ino new file mode 100644 index 0000000..4a4e604 --- /dev/null +++ b/simulator/rdtemp/storage.ino @@ -0,0 +1,14 @@ +/* --------------------------------------------------------------- */ +#include +/* --------------------------------------------------------------- */ +int init_storage(void) +{ +Serial.println(__func__); + +Serial.print("eeprom length: "); +Serial.println(EEPROM.length()); + + +} +/* --------------------------------------------------------------- */ +/* --------------------------------------------------------------- */