orc
Class Orc
java.lang.Object
orc.Orc
public class Orc
- extends java.lang.Object
Represents a connection to a uOrc board.
|
Constructor Summary |
Orc(java.net.InetAddress inetaddr)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FAST_DIGIO_MODE_IN
public static final int FAST_DIGIO_MODE_IN
- See Also:
- Constant Field Values
FAST_DIGIO_MODE_OUT
public static final int FAST_DIGIO_MODE_OUT
- See Also:
- Constant Field Values
FAST_DIGIO_MODE_SERVO
public static final int FAST_DIGIO_MODE_SERVO
- See Also:
- Constant Field Values
verbose
public boolean verbose
Orc
public Orc(java.net.InetAddress inetaddr)
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
makeOrc
public static Orc makeOrc()
makeOrc
public static Orc makeOrc(java.lang.String hostname)
addListener
public void addListener(OrcListener ol)
getStatus
public OrcStatus getStatus()
i2cTransaction
public byte[] i2cTransaction(int addr,
java.lang.Object... os)
- Perform an I2C transaction at 400kHz. The transaction consists of up to
two phases, a write followed by a read. Same as i2cTransaction(addr, true, os).
- Parameters:
addr - The I2C address, [0,127]writebuf - A buffer containing data to be written. If
null, then the write phase will be skipped.readlen - The number of bytes to read after the write
phase. If zero, the read phase will be skipped.
- Returns:
- The data from the I2C read phase, or null if readlen
was zero.
i2cTransaction
public byte[] i2cTransaction(int addr,
boolean highSpeed,
java.lang.Object... os)
- Perform an I2C transaction. The transaction consists of up to
two phases, a write followed by a read.
- Parameters:
addr - The I2C address, [0,127]highSpeed - If true, the Orc will communicate with 400kHz.
If false, will communicate at 100kHz.writebuf - A buffer containing data to be written. If
null, then the write phase will be skipped.readlen - The number of bytes to read after the write
phase. If zero, the read phase will be skipped.
- Returns:
- The data from the I2C read phase, or null if readlen
was zero.
spiTransaction
public int[] spiTransaction(int slaveClk,
int spo,
int sph,
int nbits,
int[] writebuf)