|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 II2C
IOException
II2C.start()
public void stop() throws IOException
II2C
stop
in interface II2C
IOException
II2C.stop()
public byte receive(boolean ack) throws IOException
receive
in interface II2C
ack
- indicates whether an ack is to be transmitted
IOException
II2C.receive(boolean)
public boolean transmit(byte d) throws IOException
transmit
in interface II2C
d
- a byte to be transmitted
IOException
II2C.transmit(byte)
public boolean isIdle() throws IOException
II2C
isIdle
in interface II2C
IOException
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |