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

Interface: WriteData

General interface to write n bytes of data to a particular offset.
Author: David Gay
  Philip Levis
  Nelson Lee

Components providing this interface:
tos.platform.mica.ByteEEPROM
tos.platform.mica.ByteEEPROMC

Components requiring this interface:
apps.TestEEPROM.Byte.TestByteEEPROMC

Commands

Events

Commands - Details

write

result_t write(uint32_t offset, uint8_t *data, uint32_t numBytesWrite)

Write data.

Parameters:

offset - Offset at which to write.

data - data to write

numBytesWrite - number of bytes to write

Returns: FAIL if the write request is refused. If the result is SUCCESS, the writeDone event will be signaled.

Events - Details

writeDone

result_t writeDone(uint8_t *data, uint32_t numBytesWrite, result_t success)

Signal write completion

Parameters:

data - Address of data written

numBytesWrite - Number of bytes written

success - SUCCESS if write was successful, FAIL otherwise

Returns: Ignored.