ioio.lib.impl
Class IOIOProtocol
java.lang.Object
ioio.lib.impl.IOIOProtocol
public class IOIOProtocol
- extends java.lang.Object
Method Summary |
void |
checkInterface(byte[] interfaceId)
|
void |
hardReset()
|
void |
i2cClose(int i2cNum)
|
void |
i2cConfigureMaster(int i2cNum,
TwiMaster.Rate rate,
boolean smbusLevels)
|
void |
i2cWriteRead(int i2cNum,
boolean tenBitAddr,
int address,
int writeSize,
int readSize,
byte[] writeData)
|
void |
icspClose()
|
void |
icspEnter()
|
void |
icspExit()
|
void |
icspOpen()
|
void |
icspRegout()
|
void |
icspSix(int instruction)
|
void |
incapClose(int incapNum)
|
void |
incapConfigure(int incapNum,
boolean double_prec,
int mode,
int clock)
|
void |
registerPeriodicDigitalSampling(int pin,
int freqScale)
|
void |
setAnalogInSampling(int pin,
boolean enable)
|
void |
setChangeNotify(int pin,
boolean changeNotify)
|
void |
setDigitalOutLevel(int pin,
boolean level)
|
void |
setPinAnalogIn(int pin)
|
void |
setPinDigitalIn(int pin,
DigitalInput.Spec.Mode mode)
|
void |
setPinDigitalOut(int pin,
boolean value,
DigitalOutput.Spec.Mode mode)
|
void |
setPinIncap(int pin,
int incapNum,
boolean enable)
|
void |
setPinPwm(int pin,
int pwmNum,
boolean enable)
|
void |
setPinSpi(int pin,
int mode,
boolean enable,
int spiNum)
|
void |
setPinUart(int pin,
int uartNum,
boolean tx,
boolean enable)
|
void |
setPwmDutyCycle(int pwmNum,
int dutyCycle,
int fraction)
|
void |
setPwmPeriod(int pwmNum,
int period,
ioio.lib.impl.IOIOProtocol.PwmScale scale)
|
void |
softReset()
|
void |
spiClose(int spiNum)
|
void |
spiConfigureMaster(int spiNum,
SpiMaster.Config config)
|
void |
spiMasterRequest(int spiNum,
int ssPin,
byte[] data,
int dataBytes,
int totalBytes,
int responseBytes)
|
void |
uartClose(int uartNum)
|
void |
uartConfigure(int uartNum,
int rate,
boolean speed4x,
Uart.StopBits stopbits,
Uart.Parity parity)
|
void |
uartData(int uartNum,
int numBytes,
byte[] data)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IOIOProtocol
public IOIOProtocol(java.io.InputStream in,
java.io.OutputStream out,
IOIOProtocol.IncomingHandler handler)
hardReset
public void hardReset()
throws java.io.IOException
- Throws:
java.io.IOException
softReset
public void softReset()
throws java.io.IOException
- Throws:
java.io.IOException
checkInterface
public void checkInterface(byte[] interfaceId)
throws java.io.IOException
- Throws:
java.io.IOException
setDigitalOutLevel
public void setDigitalOutLevel(int pin,
boolean level)
throws java.io.IOException
- Throws:
java.io.IOException
setPinPwm
public void setPinPwm(int pin,
int pwmNum,
boolean enable)
throws java.io.IOException
- Throws:
java.io.IOException
setPwmDutyCycle
public void setPwmDutyCycle(int pwmNum,
int dutyCycle,
int fraction)
throws java.io.IOException
- Throws:
java.io.IOException
setPwmPeriod
public void setPwmPeriod(int pwmNum,
int period,
ioio.lib.impl.IOIOProtocol.PwmScale scale)
throws java.io.IOException
- Throws:
java.io.IOException
setPinIncap
public void setPinIncap(int pin,
int incapNum,
boolean enable)
throws java.io.IOException
- Throws:
java.io.IOException
incapClose
public void incapClose(int incapNum)
throws java.io.IOException
- Throws:
java.io.IOException
incapConfigure
public void incapConfigure(int incapNum,
boolean double_prec,
int mode,
int clock)
throws java.io.IOException
- Throws:
java.io.IOException
i2cWriteRead
public void i2cWriteRead(int i2cNum,
boolean tenBitAddr,
int address,
int writeSize,
int readSize,
byte[] writeData)
throws java.io.IOException
- Throws:
java.io.IOException
setPinDigitalOut
public void setPinDigitalOut(int pin,
boolean value,
DigitalOutput.Spec.Mode mode)
throws java.io.IOException
- Throws:
java.io.IOException
setPinDigitalIn
public void setPinDigitalIn(int pin,
DigitalInput.Spec.Mode mode)
throws java.io.IOException
- Throws:
java.io.IOException
setChangeNotify
public void setChangeNotify(int pin,
boolean changeNotify)
throws java.io.IOException
- Throws:
java.io.IOException
registerPeriodicDigitalSampling
public void registerPeriodicDigitalSampling(int pin,
int freqScale)
throws java.io.IOException
- Throws:
java.io.IOException
setPinAnalogIn
public void setPinAnalogIn(int pin)
throws java.io.IOException
- Throws:
java.io.IOException
setAnalogInSampling
public void setAnalogInSampling(int pin,
boolean enable)
throws java.io.IOException
- Throws:
java.io.IOException
uartData
public void uartData(int uartNum,
int numBytes,
byte[] data)
throws java.io.IOException
- Throws:
java.io.IOException
uartConfigure
public void uartConfigure(int uartNum,
int rate,
boolean speed4x,
Uart.StopBits stopbits,
Uart.Parity parity)
throws java.io.IOException
- Throws:
java.io.IOException
uartClose
public void uartClose(int uartNum)
throws java.io.IOException
- Throws:
java.io.IOException
setPinUart
public void setPinUart(int pin,
int uartNum,
boolean tx,
boolean enable)
throws java.io.IOException
- Throws:
java.io.IOException
spiConfigureMaster
public void spiConfigureMaster(int spiNum,
SpiMaster.Config config)
throws java.io.IOException
- Throws:
java.io.IOException
spiClose
public void spiClose(int spiNum)
throws java.io.IOException
- Throws:
java.io.IOException
setPinSpi
public void setPinSpi(int pin,
int mode,
boolean enable,
int spiNum)
throws java.io.IOException
- Throws:
java.io.IOException
spiMasterRequest
public void spiMasterRequest(int spiNum,
int ssPin,
byte[] data,
int dataBytes,
int totalBytes,
int responseBytes)
throws java.io.IOException
- Throws:
java.io.IOException
i2cConfigureMaster
public void i2cConfigureMaster(int i2cNum,
TwiMaster.Rate rate,
boolean smbusLevels)
throws java.io.IOException
- Throws:
java.io.IOException
i2cClose
public void i2cClose(int i2cNum)
throws java.io.IOException
- Throws:
java.io.IOException
icspOpen
public void icspOpen()
throws java.io.IOException
- Throws:
java.io.IOException
icspClose
public void icspClose()
throws java.io.IOException
- Throws:
java.io.IOException
icspEnter
public void icspEnter()
throws java.io.IOException
- Throws:
java.io.IOException
icspExit
public void icspExit()
throws java.io.IOException
- Throws:
java.io.IOException
icspSix
public void icspSix(int instruction)
throws java.io.IOException
- Throws:
java.io.IOException
icspRegout
public void icspRegout()
throws java.io.IOException
- Throws:
java.io.IOException