|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.peripheral.external.ExternalBoard
public class ExternalBoard
Represents an external board. Used primarily to manage the properties stored in the serial flash memory of any SPOT external board. Acts as the base class for specific board implemenations.
Field Summary | |
---|---|
protected static int |
BOARD_MAGIC_WORD
|
static String |
ID_PROPERTY_NAME
|
Constructor Summary | |
---|---|
|
ExternalBoard(PeripheralChipSelect pcs)
Create an interface to the external board |
protected |
ExternalBoard(String partId)
Create an interface to an external board |
Method Summary | |
---|---|
protected void |
forceChipSelectPin(PeripheralChipSelect pin)
Force the chip select pin to be as specified. |
int |
getBoardIndex()
Returns the position of this board in the stack (0 or 1) |
Properties |
getProperties()
Get the properties of this board. |
IFlashMemoryDevice |
getSerialFlash()
Get the serial flash memory device |
protected void |
hardwareNotValid()
Handle the case where no board id matches |
boolean |
isInstalled()
|
protected BoardDeviceSPI |
newBoardDeviceSPI(int deviceAddress,
int spiConfiguration)
Get a BoardDeviceSPI for accessing a device on the board. |
void |
setProperties(Properties p)
Set the properties of this board |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ID_PROPERTY_NAME
protected static final int BOARD_MAGIC_WORD
Constructor Detail |
---|
public ExternalBoard(PeripheralChipSelect pcs)
pcs
- The chip select pin of the boardprotected ExternalBoard(String partId)
partId
- The part id to match againstMethod Detail |
---|
public Properties getProperties()
getProperties
in interface IExternalBoard
public void setProperties(Properties p) throws IOException
setProperties
in interface IExternalBoard
p
- The properties to set.
IOException
public IFlashMemoryDevice getSerialFlash()
getSerialFlash
in interface IExternalBoard
IFlashMemoryDevice
protected BoardDeviceSPI newBoardDeviceSPI(int deviceAddress, int spiConfiguration)
ISpiMaster
for
details of SPI configuration settings.
deviceAddress
- the index of the devicespiConfiguration
- value to be written into SPI_CSR for transfers to this device
protected void hardwareNotValid()
protected void forceChipSelectPin(PeripheralChipSelect pin)
pin
- SpiPcs for the boardpublic boolean isInstalled()
public int getBoardIndex()
IExternalBoard
getBoardIndex
in interface IExternalBoard
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |