| Package | Description |
|---|---|
| ioio.lib.api | |
| ioio.lib.util |
| Modifier and Type | Method and Description |
|---|---|
int |
AnalogInput.available()
Gets the number of samples currently in the buffer.
|
void |
IOIO.beginBatch()
Start a batch of operations.
|
void |
IOIO.endBatch()
End a batch of operations.
|
void |
IcspMaster.enterProgramming()
Initiate a sequence that will put the slave device in programming mode.
|
void |
IcspMaster.executeInstruction(int instruction)
Execute a single instruction on the slave MCU.
|
void |
IcspMaster.exitProgramming()
Initiate a sequence that will put the slave device out of programming
mode.
|
float |
PulseInput.getDuration()
Gets the pulse duration in case of pulse measurement mode, or the period
in case of frequency mode.
|
float |
PulseInput.getFrequency()
Gets the momentary frequency of the measured signal.
|
java.lang.String |
IOIO.getImplVersion(IOIO.VersionType v)
Query the implementation version of the system's components.
|
java.io.InputStream |
IOIOConnection.getInputStream() |
java.io.OutputStream |
IOIOConnection.getOutputStream() |
int |
AnalogInput.getOverflowCount()
Gets the number of samples that have been dropped as result of overflow,
since
AnalogInput.setBuffer(int) has been called. |
float |
AnalogInput.getSampleRate()
Gets the sample rate used for obtaining buffered samples.
|
float |
AnalogInput.getVoltage()
Gets the analog input reading, as an absolute voltage in Volt units.
|
float |
AnalogInput.getVoltageBuffered()
Read a sample from the internal buffer.
|
void |
IOIO.hardReset()
Equivalent to disconnecting and reconnecting the board power supply.
|
AnalogInput |
IOIO.openAnalogInput(int pin)
Open a pin for analog input.
|
CapSense |
IOIO.openCapSense(int pin)
Shorthand for openCapSense(pin, CapSense.DEFAULT_COEF).
|
CapSense |
IOIO.openCapSense(int pin,
float filterCoef)
Open a pin for cap-sense.
|
DigitalInput |
IOIO.openDigitalInput(DigitalInput.Spec spec)
Open a pin for digital input.
|
DigitalInput |
IOIO.openDigitalInput(int pin)
Shorthand for openDigitalInput(new DigitalInput.Spec(pin)).
|
DigitalInput |
IOIO.openDigitalInput(int pin,
DigitalInput.Spec.Mode mode)
Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)).
|
DigitalOutput |
IOIO.openDigitalOutput(DigitalOutput.Spec spec,
boolean startValue)
Open a pin for digital output.
|
DigitalOutput |
IOIO.openDigitalOutput(int pin)
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), false).
|
DigitalOutput |
IOIO.openDigitalOutput(int pin,
boolean startValue)
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), startValue).
|
DigitalOutput |
IOIO.openDigitalOutput(int pin,
DigitalOutput.Spec.Mode mode,
boolean startValue)
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode),
startValue).
|
IcspMaster |
IOIO.openIcspMaster()
Open an ICSP channel, enabling Flash programming of an external PIC MCU,
and in particular, another IOIO board.
|
PulseInput |
IOIO.openPulseInput(DigitalInput.Spec spec,
PulseInput.ClockRate rate,
PulseInput.PulseMode mode,
boolean doublePrecision)
Open a pin for pulse input.
|
PulseInput |
IOIO.openPulseInput(int pin,
PulseInput.PulseMode mode)
Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode,
true), i.e.
|
PwmOutput |
IOIO.openPwmOutput(DigitalOutput.Spec spec,
int freqHz)
Open a pin for PWM (Pulse-Width Modulation) output.
|
PwmOutput |
IOIO.openPwmOutput(int pin,
int freqHz)
Shorthand for openPwmOutput(new DigitalOutput.Spec(pin), freqHz).
|
SpiMaster |
IOIO.openSpiMaster(DigitalInput.Spec miso,
DigitalOutput.Spec mosi,
DigitalOutput.Spec clk,
DigitalOutput.Spec[] slaveSelect,
SpiMaster.Config config)
Open a SPI master module, enabling communication with multiple
SPI-enabled slave modules.
|
SpiMaster |
IOIO.openSpiMaster(int miso,
int mosi,
int clk,
int[] slaveSelect,
SpiMaster.Rate rate)
Shorthand for
IOIO.openSpiMaster(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], ioio.lib.api.SpiMaster.Config)
, where the pins are all open with the default modes and default
configuration values are used. |
SpiMaster |
IOIO.openSpiMaster(int miso,
int mosi,
int clk,
int slaveSelect,
SpiMaster.Rate rate)
Shorthand for
IOIO.openSpiMaster(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], ioio.lib.api.SpiMaster.Config)
, where the MISO pins is opened with pull up, and the other pins are open
with the default modes and default configuration values are used. |
TwiMaster |
IOIO.openTwiMaster(int twiNum,
TwiMaster.Rate rate,
boolean smbus)
Open a TWI (Two-Wire Interface, such as I2C/SMBus) master module,
enabling communication with multiple TWI-enabled slave modules.
|
Uart |
IOIO.openUart(DigitalInput.Spec rx,
DigitalOutput.Spec tx,
int baud,
Uart.Parity parity,
Uart.StopBits stopbits)
Open a UART module, enabling a bulk transfer of byte buffers.
|
Uart |
IOIO.openUart(int rx,
int tx,
int baud,
Uart.Parity parity,
Uart.StopBits stopbits)
Shorthand for
IOIO.openUart(DigitalInput.Spec, DigitalOutput.Spec, int, Uart.Parity, Uart.StopBits)
, where the input pins use their default specs. |
boolean |
DigitalInput.read()
Read the value sensed on the pin.
|
float |
CapSense.read()
Gets the capacitance reading.
|
float |
AnalogInput.read()
Gets the analog input reading, as a scaled real value between 0 and 1.
|
float |
AnalogInput.readBuffered()
Read a sample from the internal buffer.
|
void |
IcspMaster.readVisi()
Request a read of the VISI register on the slave MCU.
|
void |
AnalogInput.setBuffer(int capacity)
Initializes or destroys an internal buffer, used for queuing sampled
data.
|
void |
PwmOutput.setDutyCycle(float dutyCycle)
Sets the duty cycle of the PWM output.
|
void |
CapSense.setFilterCoef(float t)
Sets the low-pass filter coefficient.
|
void |
PwmOutput.setPulseWidth(float pulseWidthUs)
The same as
PwmOutput.setPulseWidth(int), but with sub-microsecond
precision. |
void |
PwmOutput.setPulseWidth(int pulseWidthUs)
Sets the pulse width of the PWM output.
|
void |
IOIO.softReset()
Resets the entire state (returning to initial state), without dropping
the connection.
|
void |
IOIOConnection.waitForConnect() |
void |
IOIO.waitForConnect()
Establishes connection with the IOIO board.
|
void |
DigitalInput.waitForValue(boolean value)
Block until a desired logical level is sensed.
|
void |
CapSense.waitOver(float threshold)
Block until sensed capacitance becomes greater than a given threshold.
|
float |
PulseInput.waitPulseGetDuration()
Reads a single measurement from the queue.
|
boolean |
TwiMaster.Result.waitReady()
Wait until the asynchronous call which returned this instance is
complete.
|
void |
SpiMaster.Result.waitReady()
Wait until the asynchronous call which returned this instance is
complete.
|
void |
CapSense.waitUnder(float threshold)
Block until sensed capacitance becomes less than a given threshold.
|
int |
IcspMaster.waitVisiResult()
Wait and return a result of a call to
IcspMaster.readVisi(). |
void |
DigitalOutput.write(boolean val)
Set the output of the pin.
|
void |
SpiMaster.writeRead(byte[] writeData,
int writeSize,
int totalSize,
byte[] readData,
int readSize)
Shorthand for
SpiMaster.writeRead(int, byte[], int, int, byte[], int) for
the single-slave case. |
boolean |
TwiMaster.writeRead(int address,
boolean tenBitAddr,
byte[] writeData,
int writeSize,
byte[] readData,
int readSize)
Perform a single TWI transaction which includes optional transmission and
optional reception of data to a single slave.
|
void |
SpiMaster.writeRead(int slave,
byte[] writeData,
int writeSize,
int totalSize,
byte[] readData,
int readSize)
Perform a single SPI transaction which includes optional transmission and
optional reception of data to a single slave.
|
TwiMaster.Result |
TwiMaster.writeReadAsync(int address,
boolean tenBitAddr,
byte[] writeData,
int writeSize,
byte[] readData,
int readSize)
Asynchronous version of
TwiMaster.writeRead(int, boolean, byte[], int, byte[], int). |
SpiMaster.Result |
SpiMaster.writeReadAsync(int slave,
byte[] writeData,
int writeSize,
int totalSize,
byte[] readData,
int readSize)
The same as
SpiMaster.writeRead(int, byte[], int, int, byte[], int), but
returns immediately and returns a SpiMaster.Result object that can be
waited on. |
| Modifier and Type | Method and Description |
|---|---|
void |
IOIOLooper.loop()
Subclasses should override this method for performing operations to be
done repetitively as long as IOIO communication persists.
|
void |
BaseIOIOLooper.loop() |
void |
IOIOLooper.setup(IOIO ioio)
Subclasses should override this method for performing operations to be
done once as soon as IOIO communication is established.
|
void |
BaseIOIOLooper.setup(IOIO ioio) |