SunSPOT API V5.0


com.sun.spot.peripheral
Interface ISpot

All Known Implementing Classes:
Spot

public interface ISpot

The interface to the root object of the Spot base library.

This interface provides access to the LED on the Spot board, to the AT91 peripherals, and to other resources such as the software SPI implementation.


Field Summary
static int MCLK_FREQUENCY
          Frequency of ARM master clock
static String PROPERTY_SPOT_DIAGNOSTICS
          System property that if true enables output of log messages on System.err
static int SYSTEM_TICKER_TICKS_PER_MILLISECOND
           
 
Method Summary
 void flashConfigPage(ConfigPage configPage)
          Write a ConfigPage into the flash.
 IAT91_AIC getAT91_AIC()
          Get access to the AT91 Interrupt Controller
 IAT91_PIO getAT91_PIO(int pioSelector)
          Get access to the AT91 Parallel I/O Controller.
 IAT91_PowerManager getAT91_PowerManager()
          Get the singleton AT91 chip power manager
 IAT91_TC getAT91_TC(int index)
          Get access to an AT91 Timer-Counter.
 ConfigPage getConfigPage()
          Get the configuration page held in flash
 IDMAMemoryManager getDMAMemoryManager()
          Get the singleton DMA Memory Manager.
 IDriverRegistry getDriverRegistry()
          Get the Driver Registry.
 Hashtable getExternalBoardMap()
          Get the map of external boards.
 IFiqInterruptDaemon getFiqInterruptDaemon()
          Get the FiqInterruptDaemon.
 IFlashMemoryDevice getFlashMemoryDevice()
          Get access to the flash memory on the Spot
 ILed getGreenLed()
          Get access to the green LED on the Spot processor board.
 int getHardwareType()
          Get the hardware type code for this device.
 II2C getI2C()
          Get access to the I2C interface.
 I802_15_4_MAC[] getI802_15_4_MACs()
          Get access to the I802.15.4 MAC layers
 I802_15_4_PHY getI802_15_4_PHY()
          Get access to the physical I802.15.4 radio device
 IProprietaryRadio getIProprietaryRadio()
          Get access to the radio via its proprietary (non-I802.15.4) interface.
 ILTC3455 getLTC3455()
          power control chip driver
 IOTACommandServer getOTACommandServer()
          Get the OTA Command Server, creating one if necessary
 Properties getPersistentProperties()
          Get all the persistent properties, as held in the flash memory
 String getPersistentProperty(String key)
          Get a persistent property, as held in the flash memory
 IPowerController getPowerController()
          Get the PowerController - the AVR on the spot.
 byte[] getPublicKey()
          Get the Public Key used to sign and verify application and library suites, and the config page.
 IRadioPolicyManager getRadioPolicyManager()
          Get the singleton radio policy manager
 ILed getRedLed()
          Get access to the red LED on the Spot processor board.
 IRemotePrintManager getRemotePrintManager()
          Get the singleton remote print manager
 IResourceRegistry getResourceRegistry()
          Get the singleton resource registry
 ISecuredSiliconArea getSecuredSiliconArea()
          Get the SecuredSiliconArea
 ISleepManager getSleepManager()
          Get access to the sleep manager for the Spot
 ISpiMaster getSPI()
          Get access to the SPI interface.
 ISpotPins getSpotPins()
          Get the singleton SpotPins instance.
 int getSystemTicks()
          Return a tick count in the range of zero to SYSTEM_TICKER_TICKS_PER_MILLISECOND.
 IUSBPowerDaemon getUsbPowerDaemon()
          Get the usb power daemon
 boolean isMasterIsolate()
           
 boolean isRunningOnHost()
           
 void resetExternalBoardMap()
          Clear the cache of external board properties.
 void setPersistentProperties(Properties props)
          Set one or more persistent property in the flash memory
 void setPersistentProperty(String key, String value)
          Set a persistent property in the flash memory
 void setProperty(String key, String value)
          Set the system property "key" to have the value "value"
 void storeProperties(Properties props)
          Replace the persistent properties held in the flash memory
 

Field Detail

MCLK_FREQUENCY

static final int MCLK_FREQUENCY
Frequency of ARM master clock

See Also:
Constant Field Values

SYSTEM_TICKER_TICKS_PER_MILLISECOND

static final int SYSTEM_TICKER_TICKS_PER_MILLISECOND
See Also:
Constant Field Values

PROPERTY_SPOT_DIAGNOSTICS

static final String PROPERTY_SPOT_DIAGNOSTICS
System property that if true enables output of log messages on System.err

See Also:
Constant Field Values
Method Detail

isRunningOnHost

boolean isRunningOnHost()
Returns:
true if running on the host, false if on the SPOT

isMasterIsolate

boolean isMasterIsolate()
Returns:
true if this method has been called in the context of the master isolate

getHardwareType

int getHardwareType()
Get the hardware type code for this device.

Returns:
the hardware type code

getSpotPins

ISpotPins getSpotPins()
Get the singleton SpotPins instance.

Returns:
ISpotPins the SpotPins

getGreenLed

ILed getGreenLed()
Get access to the green LED on the Spot processor board. Use with caution as this LED is intended for system use.

Returns:
ILed the green LED on the Spot processor board

getRedLed

ILed getRedLed()
Get access to the red LED on the Spot processor board. Use with caution as this LED is intended for system use.

Returns:
The red LED on the Spot processor board

getFiqInterruptDaemon

IFiqInterruptDaemon getFiqInterruptDaemon()
Get the FiqInterruptDaemon. This handles interrupts from the power controller.

Returns:
the FiqInterruptDaemon

getAT91_PIO

IAT91_PIO getAT91_PIO(int pioSelector)
Get access to the AT91 Parallel I/O Controller.

Parameters:
pioSelector - selects the PIO required (use one of the selector symbols found in IAT91_PIO)
Returns:
the AT91 Parallel Input-Output Controller.

getAT91_AIC

IAT91_AIC getAT91_AIC()
Get access to the AT91 Interrupt Controller

Returns:
the AT91 Interrupt Controller

getI802_15_4_PHY

I802_15_4_PHY getI802_15_4_PHY()
Get access to the physical I802.15.4 radio device

Returns:
the I802.15.4 physical radio device

getI802_15_4_MACs

I802_15_4_MAC[] getI802_15_4_MACs()
Get access to the I802.15.4 MAC layers

Returns:
the I802.15.4 MAC layers

getIProprietaryRadio

IProprietaryRadio getIProprietaryRadio()
Get access to the radio via its proprietary (non-I802.15.4) interface.

Returns:
the proprietary interface to the radio device

getSPI

ISpiMaster getSPI()
Get access to the SPI interface. This interface is used to communicate with the radio and the sensor boards

Returns:
the SPI interface.

getI2C

II2C getI2C()
Get access to the I2C interface. This interface is used to communicate with external devices using TWI

Returns:
the I2C interface.

getDriverRegistry

IDriverRegistry getDriverRegistry()
Get the Driver Registry.

Returns:
the Driver Registry

getSecuredSiliconArea

ISecuredSiliconArea getSecuredSiliconArea()
Get the SecuredSiliconArea

Returns:
the SecuredSiliconArea

getAT91_TC

IAT91_TC getAT91_TC(int index)
Get access to an AT91 Timer-Counter.

Parameters:
index - The index of the required TC in the range 0-5
Returns:
The AT91 TC

getConfigPage

ConfigPage getConfigPage()
Get the configuration page held in flash

Returns:
the configuration page

getPublicKey

byte[] getPublicKey()
Get the Public Key used to sign and verify application and library suites, and the config page.

Returns:
byte[] The Public Key

flashConfigPage

void flashConfigPage(ConfigPage configPage)
Write a ConfigPage into the flash.


getExternalBoardMap

Hashtable getExternalBoardMap()
Get the map of external boards. This returns a Hashtable containing an entry for each detected board. The key of the entry is the PeripheralChipSelect used as the chip select for the board, and the value is a Properties object containing the properties read from its serial flash memory.

Returns:
a Hashtable as described above

resetExternalBoardMap

void resetExternalBoardMap()
Clear the cache of external board properties. The cache will be re-read from the boards next time it is used.


getFlashMemoryDevice

IFlashMemoryDevice getFlashMemoryDevice()
Get access to the flash memory on the Spot

Returns:
the flash memory controller as an IFlashMemoryDevice

getSleepManager

ISleepManager getSleepManager()
Get access to the sleep manager for the Spot

Returns:
The sleep manager

getLTC3455

ILTC3455 getLTC3455()
power control chip driver

Returns:
the power control chip driver

getUsbPowerDaemon

IUSBPowerDaemon getUsbPowerDaemon()
Get the usb power daemon

Returns:
the usb power daemon

getPowerController

IPowerController getPowerController()
Get the PowerController - the AVR on the spot.

Returns:
the PowerController

setPersistentProperty

void setPersistentProperty(String key,
                           String value)
Set a persistent property in the flash memory

Parameters:
key -
value - the value required or null to erase

setPersistentProperties

void setPersistentProperties(Properties props)
Set one or more persistent property in the flash memory

Parameters:
props - the properties to set

storeProperties

void storeProperties(Properties props)
                     throws IOException
Replace the persistent properties held in the flash memory

Parameters:
props - the properties to set
Throws:
IOException

getPersistentProperty

String getPersistentProperty(String key)
Get a persistent property, as held in the flash memory

Parameters:
key -
Returns:
the value or null if no property with the specified key

getPersistentProperties

Properties getPersistentProperties()
Get all the persistent properties, as held in the flash memory

Returns:
the set of persistent properties

getOTACommandServer

IOTACommandServer getOTACommandServer()
                                      throws IOException
Get the OTA Command Server, creating one if necessary

Returns:
the OTA command server
Throws:
IOException

getRadioPolicyManager

IRadioPolicyManager getRadioPolicyManager()
Get the singleton radio policy manager

Returns:
the radio policy manager

setProperty

void setProperty(String key,
                 String value)
Set the system property "key" to have the value "value"

Parameters:
key -
value -

getSystemTicks

int getSystemTicks()
Return a tick count in the range of zero to SYSTEM_TICKER_TICKS_PER_MILLISECOND. The count resets to zero every millisecond

Returns:
the tick count

getResourceRegistry

IResourceRegistry getResourceRegistry()
Get the singleton resource registry

Returns:
the resource registry

getAT91_PowerManager

IAT91_PowerManager getAT91_PowerManager()
Get the singleton AT91 chip power manager

Returns:
the AT91 power manager

getDMAMemoryManager

IDMAMemoryManager getDMAMemoryManager()
Get the singleton DMA Memory Manager. The DMA Memory Manager allocates uncached memory suitable for use as DMA buffers.

Returns:
the DMA Memory Manager

getRemotePrintManager

IRemotePrintManager getRemotePrintManager()
Get the singleton remote print manager

Returns:
the remote print manager

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.