adding storage manager
This commit is contained in:
부모
a65e28aa67
커밋
a4104e21f7
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/* --------------------------------------------------------------- */
|
||||
#include <EEPROM.h>
|
||||
/* --------------------------------------------------------------- */
|
||||
int init_storage(void)
|
||||
{
|
||||
Serial.println(__func__);
|
||||
|
||||
Serial.print("eeprom length: ");
|
||||
Serial.println(EEPROM.length());
|
||||
|
||||
|
||||
}
|
||||
/* --------------------------------------------------------------- */
|
||||
/* --------------------------------------------------------------- */
|
불러오는 중...
Reference in New Issue