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

Interface: ReadData

General interface to read n bytes of data from 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.HighFrequencySampling.HFSRead
apps.TestEEPROM.Byte.TestByteEEPROMC
apps.TestEEPROM.ByteSpeed.ETimingM

Commands

Events

Commands - Details

read

result_t read(uint32_t offset, uint8_t *buffer, uint32_t numBytesRead)

Read data.

Parameters:

offset - Offset at which to read.

data - Where to place read data

numBytesRead - number of bytes to read

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

Events - Details

readDone

result_t readDone(uint8_t *buffer, uint32_t numBytesRead, result_t success)

Signal read completion

Parameters:

data - Address where read data was placed

numBytesRead - Number of bytes read

success - SUCCESS if read was successful, FAIL otherwise

Returns: Ignored.