The libraries only use system priorities in three cases:
1.To guarantee that application threads don't run during a system operation during which the system may be in an inconsistent state.
2.To guarantee short uninterruptible periods of operation for critical hardware interaction.
3.To ensure that the attention button is recognised.
Threads are only assigned a permanent system priority to achieve 1. or 3.
The Sun SPOT device libraries
Introduction
This section describes the contents of the Sun SPOT base library, spotlib_device.jar plus
spotlib_common.jar (the source code for both is in spotlib_source.jar).
Sun SPOT device library
The library contains drivers for:
•The
•The PIO, AIC, USART and
•The CC2420 radio chip, in the form of an IEEE 802.15.4 Physical interface
•An IEEE 802.15.4 MAC layer
•An SPI interface, used for communication with the CC2420 and
•An interface to the Sun SPOT's flash memory
It also contains:
•The basestation support code (in com.sun.spot.peripheral.basestation)
•The
•The radio policy manager
•A simple
•A framework for
com.sun.spot.interisolate)
•A handler for the attention button on the edge of the device
For details about using these devices and features see the respective Java interface:
Device | Interface |
|
LED | ILed | |
PIO | IAT91_PIO | |
AIC | IAT91_AIC | |
IAT91_TC | ||
CC2420 | I802_15_4_PHY | |
MAC layer | I802_15_4_MAC | |
RadioPolicyManager | IRadioPolicyManager | |
SPI | ISpiMaster | |
Flash memory | IFlashMemoryDevice | |
Power controller | IPowerController | |
OTA Command Server | OTACommandServer (class) | |
Attention button handler | FiqInterruptDaemon (class) |
25