SunSPOT API V5.0


com.sun.spot.peripheral
Interface IDriver

All Known Subinterfaces:
IAT91_AIC, IAT91_PowerManager, IAT91_TC
All Known Implementing Classes:
ADT7411, EDemoController, FiqInterruptDaemon, RadioPolicyManager

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 getDriverName()
          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).
 void shutDown()
          Notify the driver that the VM is about to exit.
 boolean tearDown()
          Deactivate the driver (usually in preparation for deep sleep).
 

Method Detail

getDriverName

String getDriverName()
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.

Drivers are torn down in the inverse order to that in which they registered, so that in general user drivers will be torn down before any underlying system 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.

Drivers are set up in the order that they registered, so that in general user drivers will be set up after any underlying system drivers.


shutDown

void shutDown()
Notify the driver that the VM is about to exit.


SunSPOT API V5.0


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