|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectioio.lib.impl.AbstractResource
ioio.lib.impl.IcspMasterImpl
public class IcspMasterImpl
Constructor Summary | |
---|---|
IcspMasterImpl(IOIOImpl ioio)
|
Method Summary | |
---|---|
void |
close()
|
void |
dataReceived(byte[] data,
int size)
|
void |
disconnected()
|
void |
enterProgramming()
Initiate a sequence that will put the slave device in programming mode. |
void |
executeInstruction(int instruction)
Execute a single instruction on the slave MCU. |
void |
exitProgramming()
Initiate a sequence that will put the slave device out of programming mode. |
void |
readVisi()
Request a read of the VISI register on the slave MCU. |
void |
reportAdditionalBuffer(int bytesToAdd)
|
int |
waitVisiResult()
Wait and return a result of a call to IcspMaster.readVisi() . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IcspMasterImpl(IOIOImpl ioio) throws ConnectionLostException
ConnectionLostException
Method Detail |
---|
public void dataReceived(byte[] data, int size)
public void reportAdditionalBuffer(int bytesToAdd)
public void enterProgramming() throws ConnectionLostException
IcspMaster
enterProgramming
in interface IcspMaster
ConnectionLostException
- Connection to the IOIO has been lost.public void exitProgramming() throws ConnectionLostException
IcspMaster
exitProgramming
in interface IcspMaster
ConnectionLostException
- Connection to the IOIO has been lost.public void executeInstruction(int instruction) throws ConnectionLostException
IcspMaster
executeInstruction
in interface IcspMaster
instruction
- a 24-bit PIC instruction.
ConnectionLostException
- Connection to the IOIO has been lost.public void readVisi() throws ConnectionLostException, java.lang.InterruptedException
IcspMaster
IcspMaster.waitVisiResult()
.
This method may block if the read queue on the IOIO is full, but this
should be for short periods only.
readVisi
in interface IcspMaster
ConnectionLostException
- Connection to the IOIO has been lost.
java.lang.InterruptedException
- Interrupted while blocking.public void close()
close
in interface Closeable
close
in class AbstractResource
public void disconnected()
disconnected
in class AbstractResource
public int waitVisiResult() throws ConnectionLostException, java.lang.InterruptedException
IcspMaster
IcspMaster.readVisi()
.
Results will be returned in the same order as requested.
The call will block until there is data, until interrupted, or until
connection to the IOIO has been lost.
waitVisiResult
in interface IcspMaster
ConnectionLostException
- Connection to the IOIO has been lost.
java.lang.InterruptedException
- Interrupted while blocking.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |