SunSPOT API V2.0


com.sun.spot.peripheral
Interface IDriver

All Known Subinterfaces:
IAT91_AIC, IAT91_PIO, IAT91_PowerManager, IAT91_TC, IDemoBoard, ILTC3455
All Known Implementing Classes:
ADT7411, EDemoBoard, IOPin, LIS3L02AQAccelerometer, OutputPin, RadioPolicyManager, TriColorLED

public interface IDriver

Interface for all device drivers participating in the deep sleep setUp/tearDown process controlled by the DriverRegistry.

Author:
Syntropy

Method Summary
 String name()
          An identifying name for the driver (e.g.
 void setUp()
          Activate or reactivate the driver (after a deep sleep or when another driver refused to deep sleep).
 boolean tearDown()
          Deactivate the driver (usually in preparation for deep sleep).
 

Method Detail

name

String name()
An identifying name for the driver (e.g. "AIC" for the AIC driver).

Returns:
The driver name

tearDown

boolean tearDown()
Deactivate the driver (usually in preparation for deep sleep). The driver should store any important state and release all resources it has claimed from other drivers.

Returns:
True if the driver is able to deactivate, false if it cannot deactivate (e.g. due to being busy with a data transfer). If any driver returns false, no deep sleep occurs and all other drivers will be reactivated.

setUp

void setUp()
Activate or reactivate the driver (after a deep sleep or when another driver refused to deep sleep). The driver should claim all the resources it needs from other drivers and reinitialize its hardware. It should also restore any state saved before tearDown.


SunSPOT API V2.0


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