adding storage manager
This commit is contained in:
parent
a65e28aa67
commit
a4104e21f7
@ -70,6 +70,7 @@ prtln("");
|
||||
static void clihelp()
|
||||
{
|
||||
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);
|
||||
|
@ -14,7 +14,7 @@ void setup() {
|
||||
|
||||
Serial.print("\n");
|
||||
|
||||
phytocli();
|
||||
phytocli(); /* XXX */
|
||||
|
||||
/* XXX */
|
||||
/* changing the voltage reference of the ADC
|
||||
@ -92,6 +92,13 @@ void loop() {
|
||||
readlight(); foo = 0;
|
||||
}
|
||||
|
||||
/* check for CLI request */
|
||||
if (Serial.available() && 0x55==Serial.read())
|
||||
{
|
||||
Serial.println("M cli request");
|
||||
phytocli();
|
||||
}
|
||||
|
||||
delay(DELAI);
|
||||
}
|
||||
|
||||
|
14
simulator/rdtemp/storage.ino
Normal file
14
simulator/rdtemp/storage.ino
Normal file
@ -0,0 +1,14 @@
|
||||
/* --------------------------------------------------------------- */
|
||||
#include <EEPROM.h>
|
||||
/* --------------------------------------------------------------- */
|
||||
int init_storage(void)
|
||||
{
|
||||
Serial.println(__func__);
|
||||
|
||||
Serial.print("eeprom length: ");
|
||||
Serial.println(EEPROM.length());
|
||||
|
||||
|
||||
}
|
||||
/* --------------------------------------------------------------- */
|
||||
/* --------------------------------------------------------------- */
|
Loading…
Reference in New Issue
Block a user