|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.spot.sensorboard.hardware.SimpleSPIControlledIOChip
com.sun.spot.sensorboard.hardware.ADT7411
public class ADT7411
Class implementing SPI access to the ADT7411 a-to-d converter. It extends SimpleSPIControlledIOChip and provides a constructor that initialises the device. This initialised ADT7411 object can then be used by the classes derived from AbstractADT7411RangeInput to communicate with the device.
| Constructor Summary | |
|---|---|
ADT7411(ISPI spi)
Constructor that initialises the device |
|
| Method Summary | |
|---|---|
String |
name()
An identifying name for the driver (e.g. |
byte |
read(byte addr)
Read a byte from the ADC |
void |
setAveraging(boolean val)
Set the global averaging bit of the ADC , if set to true then the part will internally sample 16 times before setting the average value, if false that behaviour is turned off. |
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). |
void |
write(byte addr,
byte value)
Write a byte to the ADC |
| Methods inherited from class com.sun.spot.sensorboard.hardware.SimpleSPIControlledIOChip |
|---|
claimedPins, claimPin, getSPI |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.spot.sensorboard.hardware.ISPIControlledIOChip |
|---|
claimedPins, claimPin, getSPI |
| Constructor Detail |
|---|
public ADT7411(ISPI spi)
spi - ISPI to be used to access the device| Method Detail |
|---|
public String name()
IDriver
name in interface IDriverpublic boolean tearDown()
IDriver
tearDown in interface IDriverpublic void setUp()
IDriver
setUp in interface IDriverpublic void setAveraging(boolean val)
val - state to set averaging topublic byte read(byte addr)
read in interface IADT7411addr - address to be read
public void write(byte addr,
byte value)
write in interface IADT7411addr - address to writevalue - to be written
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||