|
SunSPOT API V4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAT91_PowerManager
Interface to the AT91 power manager for the Sun SPOT, allowing peripheral power consumption to be controlled by switching the peripheral clocks on or off.
Field Summary | |
---|---|
static int[] |
PERIPHERAL_BUS_SPEEDS
Speed of the peripheral bus in each of the shallow sleep modes. |
static int |
SHALLOW_SLEEP_CLOCK_MODE_18_MHZ
Mode to specify in setShallowSleepClockMode(int) to select PCK/MCK of 18.432MHz/18.432MHz. |
static int |
SHALLOW_SLEEP_CLOCK_MODE_45_MHZ
Mode to specify in setShallowSleepClockMode(int) to select PCK/MCK of 45MHz/45MHz. |
static int |
SHALLOW_SLEEP_CLOCK_MODE_9_MHZ
Mode to specify in setShallowSleepClockMode(int) to select PCK/MCK of 9.216MHz/9.216MHz. |
static int |
SHALLOW_SLEEP_CLOCK_MODE_NORMAL
Mode to specify in setShallowSleepClockMode(int) to select PCK/MCK of 180MHz/60MHz. |
Method Summary | |
---|---|
void |
disablePeripheralClock(int mask)
Disable the clocks for peripherals whose bits are set in the mask. |
void |
enablePeripheralClock(int mask)
Enable the clocks for peripherals whose bits are set in the mask. |
int |
getEnabledPeripheralClocks()
Return a mask containing a set bit for each peripheral whose clock is enabled. |
void |
setShallowSleepClockMode(int mode)
Select the clock mode to use when shallow sleeping. |
void |
setUsartEnable(boolean enable)
Enable or disable UART0 and USART1 support (initially it is enabled). |
void |
setUsbEnable(boolean enable)
Enable or disable USB support (initially it is enabled). |
Methods inherited from interface com.sun.spot.peripheral.IDriver |
---|
getDriverName, setUp, shutDown, tearDown |
Field Detail |
---|
static final int SHALLOW_SLEEP_CLOCK_MODE_NORMAL
setShallowSleepClockMode(int)
to select PCK/MCK of 180MHz/60MHz.
This is the default setting.
static final int SHALLOW_SLEEP_CLOCK_MODE_45_MHZ
setShallowSleepClockMode(int)
to select PCK/MCK of 45MHz/45MHz.
NOTE: in this mode timer-counters active during shallow sleep that are connected to MCK will count
at the slower speed during shallow sleep
NOTE: USARTs will not function at the correct baud rate during shallow sleep with this mode selected
static final int SHALLOW_SLEEP_CLOCK_MODE_18_MHZ
setShallowSleepClockMode(int)
to select PCK/MCK of 18.432MHz/18.432MHz.
NOTE: in this mode timer-counters active during shallow sleep that are connected to MCK will count
at the slower speed during shallow sleep
NOTE: USARTs will not function at the correct baud rate during shallow sleep with this mode selected
static final int SHALLOW_SLEEP_CLOCK_MODE_9_MHZ
setShallowSleepClockMode(int)
to select PCK/MCK of 9.216MHz/9.216MHz.
NOTE: in this mode timer-counters active during shallow sleep that are connected to MCK will count
at the slower speed during shallow sleep
NOTE: USARTs will not function at the correct baud rate during shallow sleep with this mode selected
static final int[] PERIPHERAL_BUS_SPEEDS
PERIPHERAL_BUS_SPEEDS
[SHALLOW_SLEEP_CLOCK_MODE_18_MHZ
]
Method Detail |
---|
void enablePeripheralClock(int mask)
mask
- containing one bit that is the peripheral clock to enablevoid disablePeripheralClock(int mask)
mask
- containing one bit that is the peripheral clock to disableint getEnabledPeripheralClocks()
void setUsbEnable(boolean enable)
enable
- true if USB support is to be enabled, false otherwisevoid setUsartEnable(boolean enable)
enable
- true if USART support is to be enabled, false otherwisevoid setShallowSleepClockMode(int mode)
mode
- a mode as specified in IAT91_PowerManager
.
|
SunSPOT API V4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |