|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.sensorboard.protocol.AT91_I2C
public class AT91_I2C
Class implementing the Inter-Integrated Circuit (I-squared-C) protocol for the AT91
| Constructor Summary | |
|---|---|
AT91_I2C(IAT91_PIO pio,
int sdaPin,
int sclPin)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
isIdle()
Check if the connection is idle |
byte |
receive(boolean ack)
|
void |
start()
Generates the starting bit-sequence |
void |
stop()
Generates the stopping bit-sequence |
boolean |
transmit(byte d)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AT91_I2C(IAT91_PIO pio,
int sdaPin,
int sclPin)
throws IOException
pio - PIO interfacesdaPin - pin for the data signalsclPin - pin for the clock signal
IOException| Method Detail |
|---|
public void start()
throws IOException
II2C
start in interface II2CIOExceptionII2C.start()
public void stop()
throws IOException
II2C
stop in interface II2CIOExceptionII2C.stop()
public byte receive(boolean ack)
throws IOException
receive in interface II2Cack - indicates whether an ack is to be transmitted
IOExceptionII2C.receive(boolean)
public boolean transmit(byte d)
throws IOException
transmit in interface II2Cd - a byte to be transmitted
IOExceptionII2C.transmit(byte)
public boolean isIdle()
throws IOException
II2C
isIdle in interface II2CIOException
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||