Apps     Components     Interfaces     All Files     Source Tree     source: tos.interfaces.EEPROMRead.nc

Interface: EEPROMRead

Read interface for the non-volatile storage EEPROM

Components providing this interface:
tos.platform.mica.EEPROM
tos.platform.mica.eepromM

Components requiring this interface:
apps.TestEEPROM.EEPROM.TestEEPROMM
tos.system.LoggerM

Commands

Events

Commands - Details

read

result_t read(uint16_t line, uint8_t *buffer)

Read a line from the EEPROM. Each line is 16 bytes. Effects: try to read line line from the eeprom into buffer

Parameters:

line - the address of the line to be read

buffer - an allocated buffer to read the line into

Returns: FAIL if the component is busy or the line is invalid, SUCCESS otherwise. If SUCCESS, will signal readDone() when read completes.

Events - Details

readDone

result_t readDone(uint8_t *buffer, result_t success)

Notification that the read has been completed.

Parameters:

buffer - buffer the line has been read into

success - SUCCESS if the read was successful

Returns: SUCCESS always