Component: TestEEPROMM
This application serves as a test of off-chip EEPROM functionality. The
application is meant to be used with net/tinyos/tools/TestEEPROM.java
application; it provides interfaces for testing the reading and writing
functions of the EEPROM. The mote running this code should turn on the red
LED on initialization; from that point on the LEDs toggle. Green LED is
toggled when the app receives the command to either read or write to
EEPROM; red LED toggles when the app attempt to send a response, and yellow
LED toggles when the app thinks that the response transmission was
successful. Contents of the response can be displayed with GenericBase
and ForwarderListen tools.
- TOS_Msg buffer
- TOS_MsgPtr msg
- bool bufferInuse
-
command result_t
StdControl.init
(void)
-
command result_t
StdControl.start
(void)
-
command result_t
StdControl.stop
(void)
-
event result_t
SendResultMsg.sendDone
(TOS_MsgPtr data, result_t success)
-
void
sendAnswer
(uint8_t code)
-
event result_t
EEPROMRead.readDone
(uint8_t *buf, result_t success)
-
event result_t
EEPROMWrite.writeDone
(uint8_t *buf)
-
event result_t
EEPROMWrite.endWriteDone
(result_t success)
-
task void processPacket(void)
-
event TOS_MsgPtr
ReceiveTestMsg.receive
(TOS_MsgPtr data)
StdControl.init
command result_t StdControl.init
(void)
SendResultMsg.sendDone
event result_t SendResultMsg.sendDone
(TOS_MsgPtr data, result_t success)
sendAnswer
void sendAnswer(uint8_t code)
- 0x80 -- READ command was not accepted by the driver
- 0x82 -- WRITE command was not accepted by the driver
- 0x84 -- READ command failed
- 0x85 -- WRITE command failed to write data into the temporary buffer
- 0x86 -- WRITE command failed to flush the temporary buffer into
nonvolatile storage.
- 0x90 -- READ command succeeded
- 0x91 -- WRITE command succeeded
EEPROMRead.readDone
event result_t EEPROMRead.readDone
(uint8_t *buf, result_t success)
EEPROMWrite.writeDone
event result_t EEPROMWrite.writeDone
(uint8_t *buf)
EEPROMWrite.endWriteDone
event result_t EEPROMWrite.endWriteDone
(result_t success)