SunSPOT host API V3.0


com.sun.spot.client
Interface ITargetFlashAccess


public interface ITargetFlashAccess

ITargetFlashAccess provides sector-level access to the flash memory of a locally connected SPOT. This allows the IBootloaderTarget to reuse the FlashFile infrastructure executing on the host. Only intended as part of the implementation of bootloader commands, and subject to change without notice in future releases.


Method Summary
 void flashBytes(int sectorNumber, int memoryOffset, byte[] buffer, int bufferOffset, int length)
          Write data to a sector
 byte[] readSector(int sectorNumber)
          Read the contents of a flash sector
 

Method Detail

flashBytes

void flashBytes(int sectorNumber,
                int memoryOffset,
                byte[] buffer,
                int bufferOffset,
                int length)
                throws IOException
Write data to a sector

Parameters:
sectorNumber - the sector to write to
memoryOffset - the offset in the sector at which to write
buffer - the data to write
bufferOffset - the offset in buffer to start from
length - the number of bytes to write
Throws:
IOException

readSector

byte[] readSector(int sectorNumber)
                  throws IOException
Read the contents of a flash sector

Parameters:
sectorNumber - the sector to read
Returns:
the contents of the sector
Throws:
IOException

SunSPOT host API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.