From d0434145abb85e5d544551d3171868f6ca2d909f Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Tue, 24 Jan 2012 13:04:09 -0500 Subject: [PATCH] Initial commit --- IOIOLib/.classpath | 8 + IOIOLib/.project | 33 + IOIOLib/AndroidManifest.xml | 8 + .../android/ioio/IOIOListener.class | Bin 0 -> 312 bytes .../android/ioio/IOIOManager.class | Bin 0 -> 4459 bytes .../TwentyCodes/android/ioio/IOIOThread.class | Bin 0 -> 3025 bytes .../TwentyCodes/android/ioio/IOIOValues.class | Bin 0 -> 404 bytes .../classes/ioio/lib/api/AnalogInput.class | Bin 0 -> 336 bytes .../bin/classes/ioio/lib/api/Closeable.class | Bin 0 -> 134 bytes .../ioio/lib/api/DigitalInput$Spec$Mode.class | Bin 0 -> 1251 bytes .../ioio/lib/api/DigitalInput$Spec.class | Bin 0 -> 718 bytes .../classes/ioio/lib/api/DigitalInput.class | Bin 0 -> 398 bytes .../lib/api/DigitalOutput$Spec$Mode.class | Bin 0 -> 1201 bytes .../ioio/lib/api/DigitalOutput$Spec.class | Bin 0 -> 723 bytes .../classes/ioio/lib/api/DigitalOutput.class | Bin 0 -> 323 bytes .../ioio/lib/api/IOIO$VersionType.class | Bin 0 -> 1235 bytes IOIOLib/bin/classes/ioio/lib/api/IOIO.class | Bin 0 -> 3228 bytes .../classes/ioio/lib/api/IOIOConnection.class | Bin 0 -> 373 bytes .../classes/ioio/lib/api/IOIOFactory.class | Bin 0 -> 2709 bytes .../bin/classes/ioio/lib/api/IcspMaster.class | Bin 0 -> 444 bytes .../ioio/lib/api/PulseInput$ClockRate.class | Bin 0 -> 1372 bytes .../ioio/lib/api/PulseInput$PulseMode.class | Bin 0 -> 1408 bytes .../bin/classes/ioio/lib/api/PulseInput.class | Bin 0 -> 504 bytes .../bin/classes/ioio/lib/api/PwmOutput.class | Bin 0 -> 306 bytes .../ioio/lib/api/SpiMaster$Config.class | Bin 0 -> 757 bytes .../classes/ioio/lib/api/SpiMaster$Rate.class | Bin 0 -> 2298 bytes .../ioio/lib/api/SpiMaster$Result.class | Bin 0 -> 326 bytes .../bin/classes/ioio/lib/api/SpiMaster.class | Bin 0 -> 576 bytes .../classes/ioio/lib/api/TwiMaster$Rate.class | Bin 0 -> 1133 bytes .../ioio/lib/api/TwiMaster$Result.class | Bin 0 -> 326 bytes .../bin/classes/ioio/lib/api/TwiMaster.class | Bin 0 -> 491 bytes .../classes/ioio/lib/api/Uart$Parity.class | Bin 0 -> 1107 bytes .../classes/ioio/lib/api/Uart$StopBits.class | Bin 0 -> 1065 bytes IOIOLib/bin/classes/ioio/lib/api/Uart.class | Bin 0 -> 357 bytes .../exception/ConnectionLostException.class | Bin 0 -> 626 bytes .../exception/IncompatibilityException.class | Bin 0 -> 470 bytes .../exception/OutOfResourceException.class | Bin 0 -> 471 bytes .../bluetooth/BluetoothIOIOConnection.class | Bin 0 -> 3628 bytes .../BluetoothIOIOConnectionDiscovery.class | Bin 0 -> 2390 bytes .../classes/ioio/lib/impl/AbstractPin.class | Bin 0 -> 717 bytes .../lib/impl/AbstractResource$State.class | Bin 0 -> 1202 bytes .../ioio/lib/impl/AbstractResource.class | Bin 0 -> 1509 bytes .../ioio/lib/impl/AnalogInputImpl.class | Bin 0 -> 2221 bytes .../bin/classes/ioio/lib/impl/Constants.class | Bin 0 -> 938 bytes .../ioio/lib/impl/DigitalInputImpl.class | Bin 0 -> 2215 bytes .../ioio/lib/impl/DigitalOutputImpl.class | Bin 0 -> 1023 bytes ...owControlledOutputStream$FlushThread.class | Bin 0 -> 1943 bytes .../FlowControlledOutputStream$Sender.class | Bin 0 -> 264 bytes .../lib/impl/FlowControlledOutputStream.class | Bin 0 -> 3152 bytes ...owControlledPacketSender$FlushThread.class | Bin 0 -> 1750 bytes .../FlowControlledPacketSender$Packet.class | Bin 0 -> 264 bytes .../FlowControlledPacketSender$Sender.class | Bin 0 -> 380 bytes .../lib/impl/FlowControlledPacketSender.class | Bin 0 -> 3023 bytes .../ioio/lib/impl/IOIOImpl$State.class | Bin 0 -> 1180 bytes .../bin/classes/ioio/lib/impl/IOIOImpl.class | Bin 0 -> 20016 bytes .../impl/IOIOProtocol$IncomingHandler.class | Bin 0 -> 1199 bytes .../impl/IOIOProtocol$IncomingThread.class | Bin 0 -> 7199 bytes .../ioio/lib/impl/IOIOProtocol$PwmScale.class | Bin 0 -> 1490 bytes .../classes/ioio/lib/impl/IOIOProtocol.class | Bin 0 -> 12885 bytes .../ioio/lib/impl/IcspMasterImpl.class | Bin 0 -> 3422 bytes .../bin/classes/ioio/lib/impl/IncapImpl.class | Bin 0 -> 3619 bytes .../impl/IncomingState$ConnectionState.class | Bin 0 -> 1355 bytes .../IncomingState$DataModuleListener.class | Bin 0 -> 297 bytes .../impl/IncomingState$DataModuleState.class | Bin 0 -> 2064 bytes .../IncomingState$DisconnectListener.class | Bin 0 -> 254 bytes .../impl/IncomingState$InputPinListener.class | Bin 0 -> 247 bytes .../impl/IncomingState$InputPinState.class | Bin 0 -> 1834 bytes .../classes/ioio/lib/impl/IncomingState.class | Bin 0 -> 10140 bytes .../ioio/lib/impl/ModuleAllocator.class | Bin 0 -> 3038 bytes .../ioio/lib/impl/PinFunctionMap.class | Bin 0 -> 1828 bytes .../bin/classes/ioio/lib/impl/PwmImpl.class | Bin 0 -> 2199 bytes .../ioio/lib/impl/QueueInputStream.class | Bin 0 -> 1786 bytes .../ioio/lib/impl/SocketIOIOConnection.class | Bin 0 -> 2905 bytes .../impl/SpiMasterImpl$OutgoingPacket.class | Bin 0 -> 818 bytes .../lib/impl/SpiMasterImpl$SpiResult.class | Bin 0 -> 1141 bytes .../classes/ioio/lib/impl/SpiMasterImpl.class | Bin 0 -> 5791 bytes .../impl/TwiMasterImpl$OutgoingPacket.class | Bin 0 -> 822 bytes .../lib/impl/TwiMasterImpl$TwiResult.class | Bin 0 -> 1189 bytes .../classes/ioio/lib/impl/TwiMasterImpl.class | Bin 0 -> 4684 bytes .../bin/classes/ioio/lib/impl/UartImpl.class | Bin 0 -> 2662 bytes .../AbstractIOIOActivity$IOIOThread.class | Bin 0 -> 3701 bytes .../ioio/lib/util/AbstractIOIOActivity.class | Bin 0 -> 4822 bytes ...nnectionDiscovery$IOIOConnectionSpec.class | Bin 0 -> 646 bytes .../lib/util/IOIOConnectionDiscovery.class | Bin 0 -> 410 bytes .../util/SocketIOIOConnectionDiscovery.class | Bin 0 -> 1186 bytes IOIOLib/bin/ioiolib.jar | Bin 0 -> 97498 bytes IOIOLib/build.xml | 85 ++ IOIOLib/doc/allclasses-frame.html | 97 ++ IOIOLib/doc/allclasses-noframe.html | 97 ++ IOIOLib/doc/constant-values.html | 198 +++ IOIOLib/doc/deprecated-list.html | 146 ++ IOIOLib/doc/help-doc.html | 223 +++ IOIOLib/doc/index-files/index-1.html | 148 ++ IOIOLib/doc/index-files/index-10.html | 212 +++ IOIOLib/doc/index-files/index-11.html | 148 ++ IOIOLib/doc/index-files/index-12.html | 154 ++ IOIOLib/doc/index-files/index-13.html | 173 +++ IOIOLib/doc/index-files/index-14.html | 143 ++ IOIOLib/doc/index-files/index-15.html | 142 ++ IOIOLib/doc/index-files/index-16.html | 205 +++ IOIOLib/doc/index-files/index-17.html | 193 +++ IOIOLib/doc/index-files/index-2.html | 167 +++ IOIOLib/doc/index-files/index-3.html | 161 +++ IOIOLib/doc/index-files/index-4.html | 152 ++ IOIOLib/doc/index-files/index-5.html | 176 +++ IOIOLib/doc/index-files/index-6.html | 148 ++ IOIOLib/doc/index-files/index-7.html | 162 +++ IOIOLib/doc/index-files/index-8.html | 145 ++ IOIOLib/doc/index-files/index-9.html | 148 ++ IOIOLib/doc/index.html | 39 + IOIOLib/doc/ioio/lib/api/AnalogInput.html | 328 +++++ IOIOLib/doc/ioio/lib/api/Closeable.html | 209 +++ .../ioio/lib/api/DigitalInput.Spec.Mode.html | 360 +++++ .../doc/ioio/lib/api/DigitalInput.Spec.html | 328 +++++ IOIOLib/doc/ioio/lib/api/DigitalInput.html | 306 ++++ .../ioio/lib/api/DigitalOutput.Spec.Mode.html | 341 +++++ .../doc/ioio/lib/api/DigitalOutput.Spec.html | 330 +++++ IOIOLib/doc/ioio/lib/api/DigitalOutput.html | 269 ++++ .../doc/ioio/lib/api/IOIO.VersionType.html | 371 +++++ IOIOLib/doc/ioio/lib/api/IOIO.html | 1241 +++++++++++++++++ IOIOLib/doc/ioio/lib/api/IOIOConnection.html | 272 ++++ IOIOLib/doc/ioio/lib/api/IOIOFactory.html | 390 ++++++ IOIOLib/doc/ioio/lib/api/IcspMaster.html | 403 ++++++ .../ioio/lib/api/PulseInput.ClockRate.html | 407 ++++++ .../ioio/lib/api/PulseInput.PulseMode.html | 425 ++++++ IOIOLib/doc/ioio/lib/api/PulseInput.html | 527 +++++++ IOIOLib/doc/ioio/lib/api/PwmOutput.html | 347 +++++ .../doc/ioio/lib/api/SpiMaster.Config.html | 339 +++++ IOIOLib/doc/ioio/lib/api/SpiMaster.Rate.html | 697 +++++++++ .../doc/ioio/lib/api/SpiMaster.Result.html | 222 +++ IOIOLib/doc/ioio/lib/api/SpiMaster.html | 424 ++++++ IOIOLib/doc/ioio/lib/api/TwiMaster.Rate.html | 341 +++++ .../doc/ioio/lib/api/TwiMaster.Result.html | 223 +++ IOIOLib/doc/ioio/lib/api/TwiMaster.html | 363 +++++ IOIOLib/doc/ioio/lib/api/Uart.Parity.html | 351 +++++ IOIOLib/doc/ioio/lib/api/Uart.StopBits.html | 333 +++++ IOIOLib/doc/ioio/lib/api/Uart.html | 314 +++++ .../ioio/lib/api/class-use/AnalogInput.html | 180 +++ .../doc/ioio/lib/api/class-use/Closeable.html | 247 ++++ .../api/class-use/DigitalInput.Spec.Mode.html | 237 ++++ .../lib/api/class-use/DigitalInput.Spec.html | 216 +++ .../ioio/lib/api/class-use/DigitalInput.html | 197 +++ .../class-use/DigitalOutput.Spec.Mode.html | 239 ++++ .../lib/api/class-use/DigitalOutput.Spec.html | 228 +++ .../ioio/lib/api/class-use/DigitalOutput.html | 209 +++ .../lib/api/class-use/IOIO.VersionType.html | 205 +++ IOIOLib/doc/ioio/lib/api/class-use/IOIO.html | 197 +++ .../lib/api/class-use/IOIOConnection.html | 197 +++ .../ioio/lib/api/class-use/IOIOFactory.html | 144 ++ .../ioio/lib/api/class-use/IcspMaster.html | 181 +++ .../api/class-use/PulseInput.ClockRate.html | 208 +++ .../api/class-use/PulseInput.PulseMode.html | 218 +++ .../ioio/lib/api/class-use/PulseInput.html | 193 +++ .../doc/ioio/lib/api/class-use/PwmOutput.html | 190 +++ .../lib/api/class-use/SpiMaster.Config.html | 185 +++ .../lib/api/class-use/SpiMaster.Rate.html | 262 ++++ .../lib/api/class-use/SpiMaster.Result.html | 187 +++ .../doc/ioio/lib/api/class-use/SpiMaster.html | 212 +++ .../lib/api/class-use/TwiMaster.Rate.html | 208 +++ .../lib/api/class-use/TwiMaster.Result.html | 186 +++ .../doc/ioio/lib/api/class-use/TwiMaster.html | 183 +++ .../ioio/lib/api/class-use/Uart.Parity.html | 223 +++ .../ioio/lib/api/class-use/Uart.StopBits.html | 223 +++ IOIOLib/doc/ioio/lib/api/class-use/Uart.html | 198 +++ .../exception/ConnectionLostException.html | 259 ++++ .../exception/IncompatibilityException.html | 245 ++++ .../api/exception/OutOfResourceException.html | 247 ++++ .../class-use/ConnectionLostException.html | 643 +++++++++ .../class-use/IncompatibilityException.html | 180 +++ .../class-use/OutOfResourceException.html | 144 ++ .../ioio/lib/api/exception/package-frame.html | 36 + .../lib/api/exception/package-summary.html | 167 +++ .../ioio/lib/api/exception/package-tree.html | 160 +++ .../ioio/lib/api/exception/package-use.html | 178 +++ IOIOLib/doc/ioio/lib/api/package-frame.html | 102 ++ IOIOLib/doc/ioio/lib/api/package-summary.html | 284 ++++ IOIOLib/doc/ioio/lib/api/package-tree.html | 170 +++ IOIOLib/doc/ioio/lib/api/package-use.html | 323 +++++ .../ioio/lib/util/AbstractIOIOActivity.html | 258 ++++ ...onnectionDiscovery.IOIOConnectionSpec.html | 283 ++++ .../lib/util/IOIOConnectionDiscovery.html | 226 +++ .../util/SocketIOIOConnectionDiscovery.html | 277 ++++ .../util/class-use/AbstractIOIOActivity.html | 144 ++ ...onnectionDiscovery.IOIOConnectionSpec.html | 188 +++ .../class-use/IOIOConnectionDiscovery.html | 180 +++ .../SocketIOIOConnectionDiscovery.html | 144 ++ IOIOLib/doc/ioio/lib/util/package-frame.html | 47 + .../doc/ioio/lib/util/package-summary.html | 179 +++ IOIOLib/doc/ioio/lib/util/package-tree.html | 161 +++ IOIOLib/doc/ioio/lib/util/package-use.html | 176 +++ IOIOLib/doc/overview-frame.html | 46 + IOIOLib/doc/overview-summary.html | 164 +++ IOIOLib/doc/overview-tree.html | 179 +++ IOIOLib/doc/package-list | 3 + IOIOLib/doc/resources/inherit.gif | Bin 0 -> 57 bytes IOIOLib/doc/serialized-form.html | 194 +++ IOIOLib/doc/stylesheet.css | 29 + IOIOLib/javadoc.xml | 6 + IOIOLib/local.properties | 10 + IOIOLib/proguard.cfg | 40 + IOIOLib/project.properties | 12 + IOIOLib/res/.gitignore | 5 + .../android/ioio/IOIOListener.java | 53 + .../TwentyCodes/android/ioio/IOIOManager.java | 132 ++ .../TwentyCodes/android/ioio/IOIOThread.java | 161 +++ .../TwentyCodes/android/ioio/IOIOValues.java | 32 + IOIOLib/src/ioio/lib/api/AnalogInput.java | 104 ++ IOIOLib/src/ioio/lib/api/Closeable.java | 5 + IOIOLib/src/ioio/lib/api/DigitalInput.java | 140 ++ IOIOLib/src/ioio/lib/api/DigitalOutput.java | 120 ++ IOIOLib/src/ioio/lib/api/IOIO.java | 638 +++++++++ IOIOLib/src/ioio/lib/api/IOIOConnection.java | 44 + IOIOLib/src/ioio/lib/api/IOIOFactory.java | 121 ++ IOIOLib/src/ioio/lib/api/IcspMaster.java | 145 ++ IOIOLib/src/ioio/lib/api/PulseInput.java | 322 +++++ IOIOLib/src/ioio/lib/api/PwmOutput.java | 126 ++ IOIOLib/src/ioio/lib/api/SpiMaster.java | 211 +++ IOIOLib/src/ioio/lib/api/TwiMaster.java | 148 ++ IOIOLib/src/ioio/lib/api/Uart.java | 108 ++ .../exception/ConnectionLostException.java | 45 + .../exception/IncompatibilityException.java | 41 + .../api/exception/OutOfResourceException.java | 14 + .../bluetooth/BluetoothIOIOConnection.java | 112 ++ .../BluetoothIOIOConnectionDiscovery.java | 37 + IOIOLib/src/ioio/lib/impl/AbstractPin.java | 45 + .../src/ioio/lib/impl/AbstractResource.java | 74 + .../src/ioio/lib/impl/AnalogInputImpl.java | 90 ++ IOIOLib/src/ioio/lib/impl/Constants.java | 45 + .../src/ioio/lib/impl/DigitalInputImpl.java | 91 ++ .../src/ioio/lib/impl/DigitalOutputImpl.java | 50 + .../lib/impl/FlowControlledOutputStream.java | 128 ++ .../lib/impl/FlowControlledPacketSender.java | 118 ++ IOIOLib/src/ioio/lib/impl/IOIOImpl.java | 654 +++++++++ IOIOLib/src/ioio/lib/impl/IOIOProtocol.java | 798 +++++++++++ IOIOLib/src/ioio/lib/impl/IcspMasterImpl.java | 135 ++ IOIOLib/src/ioio/lib/impl/IncapImpl.java | 109 ++ IOIOLib/src/ioio/lib/impl/IncomingState.java | 460 ++++++ .../src/ioio/lib/impl/ModuleAllocator.java | 106 ++ IOIOLib/src/ioio/lib/impl/PinFunctionMap.java | 76 + IOIOLib/src/ioio/lib/impl/PwmImpl.java | 101 ++ .../src/ioio/lib/impl/QueueInputStream.java | 79 ++ .../ioio/lib/impl/SocketIOIOConnection.java | 140 ++ IOIOLib/src/ioio/lib/impl/SpiMasterImpl.java | 198 +++ IOIOLib/src/ioio/lib/impl/TwiMasterImpl.java | 169 +++ IOIOLib/src/ioio/lib/impl/UartImpl.java | 107 ++ .../ioio/lib/util/AbstractIOIOActivity.java | 295 ++++ .../lib/util/IOIOConnectionDiscovery.java | 17 + .../util/SocketIOIOConnectionDiscovery.java | 15 + 248 files changed, 32773 insertions(+) create mode 100755 IOIOLib/.classpath create mode 100755 IOIOLib/.project create mode 100755 IOIOLib/AndroidManifest.xml create mode 100644 IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOListener.class create mode 100644 IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOManager.class create mode 100644 IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOThread.class create mode 100644 IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOValues.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/AnalogInput.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/Closeable.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/DigitalInput$Spec$Mode.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/DigitalInput$Spec.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/DigitalInput.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/DigitalOutput$Spec$Mode.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/DigitalOutput$Spec.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/DigitalOutput.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/IOIO$VersionType.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/IOIO.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/IOIOConnection.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/IOIOFactory.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/IcspMaster.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/PulseInput$ClockRate.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/PulseInput$PulseMode.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/PulseInput.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/PwmOutput.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/SpiMaster$Config.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/SpiMaster$Rate.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/SpiMaster$Result.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/SpiMaster.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/TwiMaster$Rate.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/TwiMaster$Result.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/TwiMaster.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/Uart$Parity.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/Uart$StopBits.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/Uart.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/exception/ConnectionLostException.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/exception/IncompatibilityException.class create mode 100644 IOIOLib/bin/classes/ioio/lib/api/exception/OutOfResourceException.class create mode 100644 IOIOLib/bin/classes/ioio/lib/bluetooth/BluetoothIOIOConnection.class create mode 100644 IOIOLib/bin/classes/ioio/lib/bluetooth/BluetoothIOIOConnectionDiscovery.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/AbstractPin.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/AbstractResource$State.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/AbstractResource.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/AnalogInputImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/Constants.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/DigitalInputImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/DigitalOutputImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/FlowControlledOutputStream$FlushThread.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/FlowControlledOutputStream$Sender.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/FlowControlledOutputStream.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender$FlushThread.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender$Packet.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender$Sender.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IOIOImpl$State.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IOIOImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol$IncomingHandler.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol$IncomingThread.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol$PwmScale.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IcspMasterImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncapImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncomingState$ConnectionState.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncomingState$DataModuleListener.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncomingState$DataModuleState.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncomingState$DisconnectListener.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncomingState$InputPinListener.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncomingState$InputPinState.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/IncomingState.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/ModuleAllocator.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/PinFunctionMap.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/PwmImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/QueueInputStream.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/SocketIOIOConnection.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl$OutgoingPacket.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl$SpiResult.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/TwiMasterImpl$OutgoingPacket.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/TwiMasterImpl$TwiResult.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/TwiMasterImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/impl/UartImpl.class create mode 100644 IOIOLib/bin/classes/ioio/lib/util/AbstractIOIOActivity$IOIOThread.class create mode 100644 IOIOLib/bin/classes/ioio/lib/util/AbstractIOIOActivity.class create mode 100644 IOIOLib/bin/classes/ioio/lib/util/IOIOConnectionDiscovery$IOIOConnectionSpec.class create mode 100644 IOIOLib/bin/classes/ioio/lib/util/IOIOConnectionDiscovery.class create mode 100644 IOIOLib/bin/classes/ioio/lib/util/SocketIOIOConnectionDiscovery.class create mode 100644 IOIOLib/bin/ioiolib.jar create mode 100644 IOIOLib/build.xml create mode 100644 IOIOLib/doc/allclasses-frame.html create mode 100644 IOIOLib/doc/allclasses-noframe.html create mode 100644 IOIOLib/doc/constant-values.html create mode 100644 IOIOLib/doc/deprecated-list.html create mode 100644 IOIOLib/doc/help-doc.html create mode 100644 IOIOLib/doc/index-files/index-1.html create mode 100644 IOIOLib/doc/index-files/index-10.html create mode 100644 IOIOLib/doc/index-files/index-11.html create mode 100644 IOIOLib/doc/index-files/index-12.html create mode 100644 IOIOLib/doc/index-files/index-13.html create mode 100644 IOIOLib/doc/index-files/index-14.html create mode 100644 IOIOLib/doc/index-files/index-15.html create mode 100644 IOIOLib/doc/index-files/index-16.html create mode 100644 IOIOLib/doc/index-files/index-17.html create mode 100644 IOIOLib/doc/index-files/index-2.html create mode 100644 IOIOLib/doc/index-files/index-3.html create mode 100644 IOIOLib/doc/index-files/index-4.html create mode 100644 IOIOLib/doc/index-files/index-5.html create mode 100644 IOIOLib/doc/index-files/index-6.html create mode 100644 IOIOLib/doc/index-files/index-7.html create mode 100644 IOIOLib/doc/index-files/index-8.html create mode 100644 IOIOLib/doc/index-files/index-9.html create mode 100644 IOIOLib/doc/index.html create mode 100644 IOIOLib/doc/ioio/lib/api/AnalogInput.html create mode 100644 IOIOLib/doc/ioio/lib/api/Closeable.html create mode 100644 IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.Mode.html create mode 100644 IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.html create mode 100644 IOIOLib/doc/ioio/lib/api/DigitalInput.html create mode 100644 IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.Mode.html create mode 100644 IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.html create mode 100644 IOIOLib/doc/ioio/lib/api/DigitalOutput.html create mode 100644 IOIOLib/doc/ioio/lib/api/IOIO.VersionType.html create mode 100644 IOIOLib/doc/ioio/lib/api/IOIO.html create mode 100644 IOIOLib/doc/ioio/lib/api/IOIOConnection.html create mode 100644 IOIOLib/doc/ioio/lib/api/IOIOFactory.html create mode 100644 IOIOLib/doc/ioio/lib/api/IcspMaster.html create mode 100644 IOIOLib/doc/ioio/lib/api/PulseInput.ClockRate.html create mode 100644 IOIOLib/doc/ioio/lib/api/PulseInput.PulseMode.html create mode 100644 IOIOLib/doc/ioio/lib/api/PulseInput.html create mode 100644 IOIOLib/doc/ioio/lib/api/PwmOutput.html create mode 100644 IOIOLib/doc/ioio/lib/api/SpiMaster.Config.html create mode 100644 IOIOLib/doc/ioio/lib/api/SpiMaster.Rate.html create mode 100644 IOIOLib/doc/ioio/lib/api/SpiMaster.Result.html create mode 100644 IOIOLib/doc/ioio/lib/api/SpiMaster.html create mode 100644 IOIOLib/doc/ioio/lib/api/TwiMaster.Rate.html create mode 100644 IOIOLib/doc/ioio/lib/api/TwiMaster.Result.html create mode 100644 IOIOLib/doc/ioio/lib/api/TwiMaster.html create mode 100644 IOIOLib/doc/ioio/lib/api/Uart.Parity.html create mode 100644 IOIOLib/doc/ioio/lib/api/Uart.StopBits.html create mode 100644 IOIOLib/doc/ioio/lib/api/Uart.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/AnalogInput.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/Closeable.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.Mode.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.Mode.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/IOIO.VersionType.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/IOIO.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/IOIOConnection.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/IOIOFactory.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/IcspMaster.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/PulseInput.ClockRate.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/PulseInput.PulseMode.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/PulseInput.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/PwmOutput.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Config.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Rate.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Result.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Rate.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Result.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/Uart.Parity.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/Uart.StopBits.html create mode 100644 IOIOLib/doc/ioio/lib/api/class-use/Uart.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/ConnectionLostException.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/IncompatibilityException.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/OutOfResourceException.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/class-use/ConnectionLostException.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/class-use/IncompatibilityException.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/class-use/OutOfResourceException.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/package-frame.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/package-summary.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/package-tree.html create mode 100644 IOIOLib/doc/ioio/lib/api/exception/package-use.html create mode 100644 IOIOLib/doc/ioio/lib/api/package-frame.html create mode 100644 IOIOLib/doc/ioio/lib/api/package-summary.html create mode 100644 IOIOLib/doc/ioio/lib/api/package-tree.html create mode 100644 IOIOLib/doc/ioio/lib/api/package-use.html create mode 100644 IOIOLib/doc/ioio/lib/util/AbstractIOIOActivity.html create mode 100644 IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.IOIOConnectionSpec.html create mode 100644 IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.html create mode 100644 IOIOLib/doc/ioio/lib/util/SocketIOIOConnectionDiscovery.html create mode 100644 IOIOLib/doc/ioio/lib/util/class-use/AbstractIOIOActivity.html create mode 100644 IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.IOIOConnectionSpec.html create mode 100644 IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.html create mode 100644 IOIOLib/doc/ioio/lib/util/class-use/SocketIOIOConnectionDiscovery.html create mode 100644 IOIOLib/doc/ioio/lib/util/package-frame.html create mode 100644 IOIOLib/doc/ioio/lib/util/package-summary.html create mode 100644 IOIOLib/doc/ioio/lib/util/package-tree.html create mode 100644 IOIOLib/doc/ioio/lib/util/package-use.html create mode 100644 IOIOLib/doc/overview-frame.html create mode 100644 IOIOLib/doc/overview-summary.html create mode 100644 IOIOLib/doc/overview-tree.html create mode 100644 IOIOLib/doc/package-list create mode 100644 IOIOLib/doc/resources/inherit.gif create mode 100644 IOIOLib/doc/serialized-form.html create mode 100644 IOIOLib/doc/stylesheet.css create mode 100644 IOIOLib/javadoc.xml create mode 100644 IOIOLib/local.properties create mode 100755 IOIOLib/proguard.cfg create mode 100644 IOIOLib/project.properties create mode 100644 IOIOLib/res/.gitignore create mode 100644 IOIOLib/src/com/TwentyCodes/android/ioio/IOIOListener.java create mode 100644 IOIOLib/src/com/TwentyCodes/android/ioio/IOIOManager.java create mode 100644 IOIOLib/src/com/TwentyCodes/android/ioio/IOIOThread.java create mode 100644 IOIOLib/src/com/TwentyCodes/android/ioio/IOIOValues.java create mode 100644 IOIOLib/src/ioio/lib/api/AnalogInput.java create mode 100644 IOIOLib/src/ioio/lib/api/Closeable.java create mode 100644 IOIOLib/src/ioio/lib/api/DigitalInput.java create mode 100644 IOIOLib/src/ioio/lib/api/DigitalOutput.java create mode 100644 IOIOLib/src/ioio/lib/api/IOIO.java create mode 100755 IOIOLib/src/ioio/lib/api/IOIOConnection.java create mode 100644 IOIOLib/src/ioio/lib/api/IOIOFactory.java create mode 100755 IOIOLib/src/ioio/lib/api/IcspMaster.java create mode 100755 IOIOLib/src/ioio/lib/api/PulseInput.java create mode 100644 IOIOLib/src/ioio/lib/api/PwmOutput.java create mode 100755 IOIOLib/src/ioio/lib/api/SpiMaster.java create mode 100755 IOIOLib/src/ioio/lib/api/TwiMaster.java create mode 100644 IOIOLib/src/ioio/lib/api/Uart.java create mode 100644 IOIOLib/src/ioio/lib/api/exception/ConnectionLostException.java create mode 100755 IOIOLib/src/ioio/lib/api/exception/IncompatibilityException.java create mode 100644 IOIOLib/src/ioio/lib/api/exception/OutOfResourceException.java create mode 100644 IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnection.java create mode 100644 IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnectionDiscovery.java create mode 100755 IOIOLib/src/ioio/lib/impl/AbstractPin.java create mode 100755 IOIOLib/src/ioio/lib/impl/AbstractResource.java create mode 100755 IOIOLib/src/ioio/lib/impl/AnalogInputImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/Constants.java create mode 100755 IOIOLib/src/ioio/lib/impl/DigitalInputImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/DigitalOutputImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/FlowControlledOutputStream.java create mode 100755 IOIOLib/src/ioio/lib/impl/FlowControlledPacketSender.java create mode 100755 IOIOLib/src/ioio/lib/impl/IOIOImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/IOIOProtocol.java create mode 100755 IOIOLib/src/ioio/lib/impl/IcspMasterImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/IncapImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/IncomingState.java create mode 100755 IOIOLib/src/ioio/lib/impl/ModuleAllocator.java create mode 100755 IOIOLib/src/ioio/lib/impl/PinFunctionMap.java create mode 100755 IOIOLib/src/ioio/lib/impl/PwmImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/QueueInputStream.java create mode 100755 IOIOLib/src/ioio/lib/impl/SocketIOIOConnection.java create mode 100755 IOIOLib/src/ioio/lib/impl/SpiMasterImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/TwiMasterImpl.java create mode 100755 IOIOLib/src/ioio/lib/impl/UartImpl.java create mode 100755 IOIOLib/src/ioio/lib/util/AbstractIOIOActivity.java create mode 100644 IOIOLib/src/ioio/lib/util/IOIOConnectionDiscovery.java create mode 100644 IOIOLib/src/ioio/lib/util/SocketIOIOConnectionDiscovery.java diff --git a/IOIOLib/.classpath b/IOIOLib/.classpath new file mode 100755 index 0000000..a4763d1 --- /dev/null +++ b/IOIOLib/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/IOIOLib/.project b/IOIOLib/.project new file mode 100755 index 0000000..196f1c5 --- /dev/null +++ b/IOIOLib/.project @@ -0,0 +1,33 @@ + + + IOIOLib + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/IOIOLib/AndroidManifest.xml b/IOIOLib/AndroidManifest.xml new file mode 100755 index 0000000..dd1ec24 --- /dev/null +++ b/IOIOLib/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOListener.class b/IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOListener.class new file mode 100644 index 0000000000000000000000000000000000000000..1adc0b0d49e9d175687de578a7644e4ae143487e GIT binary patch literal 312 zcmZ8c%TB{U3>>$ift0pz;TzgZSK`XCfK(|`4piK?8w+g})=_qO{Tc^8fR94B6|Zu! zJ!8+jvis=r z;m%a+4ZB1bN?1q;T60Y}o0dCecsSm(GZ;(!Q literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOManager.class b/IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOManager.class new file mode 100644 index 0000000000000000000000000000000000000000..fc3d8e05d40f663ddcf47b0e36f930c4ff6e034d GIT binary patch literal 4459 zcmbtXYgZfB72Q|J9uO03WDLf%jzWx$z@R4XBLU*pCIQP8vM~e~oTMG3u^13D>SzR} zO=~Aj+dTSyH);AzOW%!K2kd&Su6*dH{(%06uJ$)H-S^Jufs6|)`G98TzRo`T>~rqn zAOHR9-vB&}TN*+Fy%}dYF}-Tq-rA^>HH!(u&bp43O<0cQB$DTo=O+x?$eFH&u)zLB zW5r114Lg@OKfh>ZJPmsV;ya#^vWlK*o322^^yzVdXsUY9l;>J@Zdl;HQO7QNhV9K5 z`I6a)W`X7!00NE6(+jR?WQzjr{sAS=$|pvh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8gl^fCs`HlB=>j2C z`xHdbOW@3;W_0Oex~<0h({?gVnCgQ)!w)1?V9{QRejJdopHuYMPfWo<3`i(7jcgX; zxmE|4fUs#u_&=mzNaXH|n`W{UhcPVUh=iJg_7tS0;3!7;Os6be^v4$*ZW;=3R*ow; zfs<6E;+mEeioI@#Q3X*49+L(n}uX=SRGK?mU7Xot2#EtYk!IB_BE~DaBbyC|qTFsKg5XUddCG-aK5_ zguX>p$UBGCp_QnaL#^1?g_`G3KkHmx$KN$hz)kR>g#^5T4AqJ%GE5CN<0ReUc(MYQrz2e6+6Wp zfAfv&)UdSO62!*qo5x-+BHY)ziaw7})X!s(pCaz+u0ZzAz(>PZ998W#9Gl79cCO4r zb^XkPZ06phWF|AzHr!gC)DG7b;& ze}+~b>bVu`VJX8uKX~Gt%9uDV6PTSc#xrQnnvDxZ92xOgvSxOMVZ7o%?+a?jftd9M zA~ZsspqlNxC8)+9T0?5dKka}c{g`!r;#BOih(Gs){o+qN`e?uuPUd`h*)!p5ExGDJ XU!T&~XaC{r3`tVF!?V2Y!E65lHdU!d literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOValues.class b/IOIOLib/bin/classes/com/TwentyCodes/android/ioio/IOIOValues.class new file mode 100644 index 0000000000000000000000000000000000000000..bb8be43c6952b1471b3808d249e638e5ccf636b8 GIT binary patch literal 404 zcma)1O-sW-6r9&jt*xo`1H_Xjtp^u+RRpOP3enUy)MMDDi*8AGAxRZ~mM6i3KfoU) zz72vNz05MR^WK~J{CfWY(8FFGCBji`mm+*tCV%PMxypnz^VI6O&{kV942Ho}CM%WI zQ6aP!@=1zBngCe^@O*95?P@twX((rjB6NHk%Va83?f8#a$sct_ z==%R`a>iLEc9q6zpxsjMx8$koheJ;5B9^d^Dr(H?1zTgj{)adChg?*~7CS`2f$GT{ cHeZX8Hlter9AJylS=oRNw)rLOFqW|U4Yi|H3IG5A literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/AnalogInput.class b/IOIOLib/bin/classes/ioio/lib/api/AnalogInput.class new file mode 100644 index 0000000000000000000000000000000000000000..319adff977b376567b15b6ce66cd42a722cca51f GIT binary patch literal 336 zcmZ8d!Ab)$6r5~pqqXYlK|FcZO9TFa6bl7GQ1G7JK9`h`EZMC1Z65ppKT4cESgnT~ zW-@PP-uwJ|{{V1PSP{B>M~EGhMEmi1PoailQc@s}S1 zvxp(E1HJBJm$x$tGv+?ZizEp(lgCNyn$b_OPqi%FP_6v4+I;B1J=l?NkJlJ+SB-t5 Z1EL8EOfe&OOm4Wt$^SnpODYSTeghD+R0IG3 literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/Closeable.class b/IOIOLib/bin/classes/ioio/lib/api/Closeable.class new file mode 100644 index 0000000000000000000000000000000000000000..59016db29aba937319d9be010f265a3ff07fdc27 GIT binary patch literal 134 zcmX^0Z`VEs1_mPrPId++Mh3CW{LFm)oXjNs#DYwH=bZfF)WoEmRCWdyMh1bb#Ii*F zoW#6zegCAa)Z`LI2G(Sd3PuKI4b3n{2Cm@z(xT*4x6B-%5FcE#9!MV>BLh$w&?W{3 TMxa@&3~V4413QppV&DJ(pQj!} literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/DigitalInput$Spec$Mode.class b/IOIOLib/bin/classes/ioio/lib/api/DigitalInput$Spec$Mode.class new file mode 100644 index 0000000000000000000000000000000000000000..aefaf8bd62b8f0ecf077cc6e94c6f505f5ecdc8c GIT binary patch literal 1251 zcma)6TTdE67(L?xi@5cIEf%%*B3eKzwXIqMFVU= zZ#Ua+!f2Yc#D3$WsUpBIe9TXI#^QE8vun3c7{YscaqBQ&c+D`U_ra27P!CGF{-Jch zFzC&8ibn;8q1{4hKT+P&OS=Zc{QEx1!nv9yY~gM&D9KcrA+Swa!w5#eFsfk;QHD^i z2Z<&1YXgSs2)mxmr^!@9q%cOa?0j$YbZ)R4jxh7~`{ zw#8emtZ(aowAVIdb|?uEqtSM1=AMv8IOdPtlEjijL)2~VwjEku^HIwFTwgLbXd5kW z+ot2`GFvKMFwFcvsVY_(;x}UGrOI1DgS;1;%aja-E>mDLE+YicNa^uL3Jx$jDPtoM z6r>?&gug{qhiduR`VLl!4lCyvIm5VD+zEI^%q#8&y&@j^K{%z0aibFGB4$*AUBrzu zOnoJi0oy;5QWb;24iDLNn0QUD3pMb2w|zWttt=*WGTP}C=!>O)CwCJJ4zhht4Ii` z7d${8s_I!20XO{I?ELJ^d}n9>{`+$e;2X9aSb|lZ>NJRTJ5YTc9O$mjR2(M#QC2acmbcOIS`dDORRlzRg2EFBFx(V;fd z=AQ3+$81^Phe;9*_G2|1MneZ1g7S+dc*#=rycP^jmD z(hR55{d_-nKfhn!0G=>OkqF#tr=2vql&aS9S#Nbvrm%GzQuG8yJN2%lQFbfe${khQ z?F&pgpxn5IRB1?{=Sgh@PNuW9K=$%kQ603iO^S1YhkvfZ2J*hG18ojVDJ}%&9cKC? zkh!y#)tT$nHQ|5}7=9=n7S6AfX`_MZdbVQerE7gf3mr|3kFT0X6AUYu&*w%p4Y9jh zcGpophCD87s+c+^KAz9xIOQKE{Gb$PTn)JDBSD5C_bzeO?eSz3_c6vb=ZvQ}9CsM( E0b}}O?*IS* literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/DigitalOutput$Spec$Mode.class b/IOIOLib/bin/classes/ioio/lib/api/DigitalOutput$Spec$Mode.class new file mode 100644 index 0000000000000000000000000000000000000000..8c514a3d877630255ab2c5dec4128094059aa217 GIT binary patch literal 1201 zcma)5ZBG+H5Pp^`y|x@ss}y-rd@0Ztq=I6MZAcp^rm-)ClO~OcW?Rp?do!~;^UO1|v%h|Sy8y6(O%)>y3DFhZj47HK-V>P}(H0Ij zYp&CCorK;qT8T>cqoE?eFmcF_c*f*bJ5#jW4nwe7+piSL3`^xI}>8h6M@bTBfjsv&En!Q+0;GHc<>=Gy;Z64N=@8Zn=R=JXyZt ztvj}`+SyX79wy)08b%QeL6t^agNmTk?rI1jOi*QE8CAE_H0-y$X&MZ%a<|3JI=6+i zz0C*|OcDj>v*=USBW}6|DXC;?$a*4pfJZ7GGDLkmkNb|%(eM}vhA_8ne%$Kzjv3Pa zYHH0xqvd2vz5@SlQH2bu$ENm);gvsZ(1g@*{gwqLH7p{79a74E#kyf%S!}gdNeHBj`7XCAt zDmEBqZ+4=qm9Kz=dqp9a%kuzKr(_c^3%wAPqzHlzJoPl z$_Zk6BXEK#{S?z*DPjaO^p8^(pg@Sb7{_Z&V-K^)(~=%? z(X~lrGVzY2J>+Sj5r*BTYUsS0u*L=UDy;c5|G9w1=>QRZl*_8p#+TWU!8B Lgv&^Ko}c*xr5F%q literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/DigitalOutput$Spec.class b/IOIOLib/bin/classes/ioio/lib/api/DigitalOutput$Spec.class new file mode 100644 index 0000000000000000000000000000000000000000..f513599572d56d2219d7c33f916dcc5255355bf0 GIT binary patch literal 723 zcma)3T}vB56g_vd&34!IE3F?fRvS$vhSCLJ6;YHzAR4F==v!yEi;k|lA=&hQDTvSq ze?Wg!@yr@5eGq+_d+wck&pC7F&)?to0JgBbRgc}KHi{gP{oIXw}R=8PUGXzRTvLWRhZCQrISS}>8XJ> z`M7B3=XxlpzvO|I?PlAERZ(-WBxt+tGfr!bi5d>$p@Vh7(({tEXFiI-EEshvmH5FHBNsy?W-a3i4KSZz_MIK3 zZ@P5{zg4>>_!R@;&kAgwKX@wo4l#uY?^*fyIEFdQGb2GEBLy--M%cx|SZ1Hy y7Vq3v?FNf?`0!7_D=scMk`%=AkBv{n?wHuZDhVtK*BL8Bf;BWKQYHGdSA75^<@z27UlPs_JC` z$-~q6ecZi!{ylvE0C>QnKqgpPZ@qH1R=Tt5(e7;2ZZpJghy`-Ne6K&Wa=P8AO}#e_ ztEYmSgjG2ojINy#Og?)XiTU08{hOeC`f5xUt#3ntbHO^{nZKs0eA`l+bFV(ce-Z_@ ze&`$XY)A1$VsAY<6U<&n?JK84FkCVhtdb=O=XTqfhVDk-8G;kWgx?`NwZIv(DYKkd TBEyXD3>Ua0maJVdt}#6V4){~x literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/IOIO$VersionType.class b/IOIOLib/bin/classes/ioio/lib/api/IOIO$VersionType.class new file mode 100644 index 0000000000000000000000000000000000000000..ca2c7b407d3e51177e151d7aa11a4dfa5fc1c08c GIT binary patch literal 1235 zcmah}ZBN=z7(Lel<)u?(PABSg&P~7<#+>d2VnoHP8H%CELiWKFR zP}Ho3UN;Nvb4`ScVfakFP~(PbR^u77Rb!Cer1QJ)()rABF_UMQ&Hh&-NebJ!Tp^oF z?`HB{N-%wRc)Ta)_xmaV-a9LAcMAfUgQNY0Vmf=2Q5fdl4{YI0RSezKo0|+mBwA!} z?bJVLUby{W7?lvhT?S98S27;S_Dv~GOE;@YIa>5l?L7%@c)SofxGzEEz{|mu1TP0Z z4jxGG!NXT`68s1-jAV6FJ80F)npIHChQ<)e)+?$}R4tujd(#gAqcmLeRBzBc7pl?H zXfYp&4zlP+1Thg&hM;5gcB84)BrIW>!KYf5+OE{k+YB+M!Cd)Ft2C3c!}IMHnPw2} zF>)siYff74T%rTco?ChbtiwvP#cY;qv;>Pz5yO63W#5+x2%e`r}Ja;@g%JB z8d@uQ)l{1;i}n)^Db7m`7;KY-CD}AJ%brAQh+cNuC6N zo)iN6N%wC*>FR-Cm|r|qx+oVC?htR7&?mzDQ}_l}3XKR?2wq~$2IDRpOxR%3ZG*54 zrad;85x)~j=wM7KxjL9oO70HAO3Bl~jB<(DFQhw!hxGk~;s>121Xb#MiV5fl;|vS< zh(#DkpoZtrFmE$Bi{60VgbDJ;9g4A~=_@?yi+ZR4J(6UvMG_>d)a)^}>>AvlW8w7i z4rWVlh1g9g#i!mErmnHL{F#2~j@VVBaN9dvV+E@{jTqJNUj7h^T_gSj?B6_r{;as> T8X4lxb!>1Z@flv=)z;*1Rb2*o literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/IOIO.class b/IOIOLib/bin/classes/ioio/lib/api/IOIO.class new file mode 100644 index 0000000000000000000000000000000000000000..3fea9fd08dc374878b6040b045cd0079e52993a9 GIT binary patch literal 3228 zcmb_eTX)+;5dO9a*(Pn=hD%#FP0~^U4wo2OZpA50>LgU)#3oJ+G(eGU#i%HfjwBQM z$~%9EbKnQ?qY9&yvyxU;atiomz2AIu(ah}Z{`KtlKLOmr0mm7JIm@-&s%>?vhG$jv zrrzY3WVram_}Qr1hBK%(yHCts$Z$^I>8v;OjmIs0hk@w~vvt=ALc<9=hCMVV{-z%T zZ)^(61UUgi>Bz9cE!QWiBg{-xmOBhHo4@o-FSN)2#|4I!Oc>^|usTvBUc(JSsl+kI zP%Y5Wot}H>8KKp+Y%6>!mB?$~3VO$Z%#9-3kQm1+42#K^>rQC;{?H4}e#*#n;2wm# zW?)iIrhhd2{^);cV21jkXLn3Lpm-T>R~nfJqvUEM>E2V%tSvVZU+vJhoI#B;?|P=Q zVGXR%uyw~9l9#)Rp|n(MduER;Wjv(`WOA{hpG>G%^kM_TgSPGVqkvCxGnb0IISfVU zYvV(Y#c}M9##@ak6#Z5~a48#cbf+1*UeQmZEEQ!+Msp$h$aTlC-NC3j3pt&XnBt#} zG+IZ8u?dFN(^I0BOKOw3YZd(@aY=X^+JQL=@7M9}gfuQdwx}(stJQ6{_tUNsnzcfT zV2j>RQ=8bKpzod4_EJjfwMhM6Yl~#=9m!dK-mars7CGn#(%W7b+YFZrXq0$4#yDCh*pqXJROEk-wi>f+%~9ubJY=|(aW5$hQ}OZO z_?lsUJW2E&l_WX`9Q!IyHlW~fe5ZPo1dhiHS29jglZ}HqFZi7`uzDbgt6B4IBQ7CkgylCnwS zyiCZY3{oQGat^sdeqxJ}R>ZlA`5baBhb$<_B9?N<^&D~|hrFsFH=!xWYj{0}yrCc! zEa#9n733|vokQMHkQG#O$h$e@Jq5Xi+Y0hNK1d@}s}Dt0Kf=efcBu+?P{UoS@Tc@| zZLN%T)Wv?2{zd!GNMEP*b2P9+Ym?S5Y2C#hI;8g%t>4i85xy1c_xJ%_+V^NR*UJ9@ D!as-k literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/IOIOConnection.class b/IOIOLib/bin/classes/ioio/lib/api/IOIOConnection.class new file mode 100644 index 0000000000000000000000000000000000000000..1b8929ce6b54cca8498d97840631930bfeb50120 GIT binary patch literal 373 zcmZ8dOK!q25PichG;M*Z3o3B|*kGyKE-R2CA!UKoy$KdF3U-t@z}dR!0eUFJq1_+&< z)NX3?Gm}ssj=l)tWS^+45*7g-2;&=TbpgeHz|0ozDq@4BE|OC^hpd!~Ojf$N%az;^ z`oq!eZx)`{13m~{rpBf7xNjcUN0=PWZJ8%(s#8UHy*of0uPN^p4#vUCjUh literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/IOIOFactory.class b/IOIOLib/bin/classes/ioio/lib/api/IOIOFactory.class new file mode 100644 index 0000000000000000000000000000000000000000..179048c9ef1ea54f5684d197cf744bff64c06cbe GIT binary patch literal 2709 zcma)8TU!%X6kUfT48(vW3K*?*w6%tS#$u}$s5cNz=b;$#Bly)XR> zee092_67Lrr`Fg0m;Qr(wd+h`W+<`k135W6`|Q2;+UxAY?|=RJ3cxrv6m$t3G9A;& zS!OAx)y!OeF~2yg>7L_mDu@aUJki#*oTb_2++yj8p?dKG}MOnw2X!`kLX%I*8q7 zRi)-1}O_th&jKBv4r)rR1yR4dZb=`0`)eYC-u41@s)k$P!t41ZQp{%W9M~Vtg3#dU3 zpQ#1Mn{^uYN;?x3LcUIf0(ACc8~X~LrmxLwwN~rn?I3kY%ee$T!{-7=n%xfiHnVAK zRg==OHU(xnVEuoj1p)moT##M3C@`McE2)rcC-wyn=xtRs%k@>03bD|lkrzXA%M|#5 z4j={MK^%dj{|ZFG6{>2t%B8;ZlzSYPaZNUJnjQO(dW!NITu)#YH>lTD$89S9WCvcu z0`|)!aS`Mb_zJfKdU#uWD~sE8UEaA4V?KceEDH2XS2;u6h8#TXbtX(l^FTP8Yphzl zw7JkB=KdN51$RhPAj%Go2`u5Rz&_j9$opeUr$A5bO4zVG;Lb>mCSXJMHTgd6RkCq%) z!8MlMM&cLWrJtYj0PqF&^E1(OzyOlm^>TzAphX@o`@w+Yse@Y>ioQf-Ig(7i+2J#= zgA>nhy}-%k)TwQZy!Jy3VhCeIB@^`f=w@lT!P$^+CmJTQGeiZP>B^cWXy+kJVv3=Z6xJk|9HeyMM3;?3!W5PhYP>LE6ck|ar*&WQxkG^_| z;fZMEeC!!g>F8i=bTBr)g`0&RVuG7jKfnEBEFIm#+(axL8{NX~g=a`kL|>q|occB$ z-NwDwr{Cb=Pw4YakGG+{KK&aWJ}2B5F0i-~^GSxUv0=a}ttMOegvG7lL#`QA$*oOK zhXmAc1y3=<^(N|AgogqexXX1J8-9%sSRc{1iF?!{E=G?P7_9dK$y%itB8)NA`j%i9 zE6f~aj5M=Kn$NPgYq0ojiipk-N0d0gGhMXFXb!(My=uO{{D(63me9KuJXKIvs1*hL ccM<(>aR`yXDioCdM4y7l0GVhoY8Tf31{FM_umAu6 literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/IcspMaster.class b/IOIOLib/bin/classes/ioio/lib/api/IcspMaster.class new file mode 100644 index 0000000000000000000000000000000000000000..5114d2a53c6b888a2d4c39dc527aa69920b3c2b4 GIT binary patch literal 444 zcmZXQK~BRk5JkU3+LQooDNuH-%chaILIqMJ5D291opcnrO6|yYAZKI20XP(5Qk9m% z!m?)k{-5#x{CfWYaD#D#K;TjtWs*{5iL6wT=B|2>&XbK03JjO>RVJm>Me>*}Dfbb& z0^>c&tTc{fRubc+S@~p5VdZM2bRlpsxtfIqqcH&`sT* zXOO~?0)r!6d7-)Cl<+eIFBq;UxQYOSD|uQM4Ck5y=50$iHxt=xq~M|AYYLojxgkp! zc>9KD`V`1K6}WlEBZ1D~nUDexTzogGK*1#jUrsl*mD)~8v)0v;p)vS# zm9lCSR7>ZvNO~b5%Gr%E1pY;;!D&LFIofG5drPm9R9iI5o@&%I3P!_`i|FLVEzHWe z&CuC0`hL~cb`-=hNB5;#mbzcA?Cvu}Te+;3wzaaI$hK(qH$|E;$b!o1ONO~t*r~3O z3tS?XA)(+7k_@x0J<^6+ttMIyK5N<>f*X|V=FL}XR#|(jbE$nzXHW7Tokj*;aBYY=C?+ML+&%S^a{aupZe~8Nm2#T=V;qMV)uL%2{{s9pV zig3u~zahe5`742?I)eG4qmJHu(OJh}zUZoBIDdeVkJP^nH|c+r3=NzR)8Fth(EDK+ zU~L#-5+;~~oa96jzYrD(j-oeq%5;(Dbx>Z3j`bZP67Bzl@n+`^t_JhM#oEc#is%p^ zJk?`T=)iX|QbHmQQ{ejX`QtP{*D+AXNO4Ju9v72*m}RN=2s7g!=u3mSi|XlsGiDw# p*4@({QL5ozy?z!w!o6=`=i?;Y7d_|kK&&Y&a3tXw9^z4|`wtTiCPV-L literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/PulseInput$PulseMode.class b/IOIOLib/bin/classes/ioio/lib/api/PulseInput$PulseMode.class new file mode 100644 index 0000000000000000000000000000000000000000..a8e2574191612cf83e8a9d98b028fc921f7ea7c3 GIT binary patch literal 1408 zcma)5TT@a|6#ljcIDkh*D#%-DpaGhsrB;wZgvNxII?4>wgL9yh9fym<#Toxq;W#=q zIX(AFy5C-^m!`EhC_Ll@Gl#vubJqIS`o6vP+dnUl08Aq;ql00@C>q6J&d3C{Z6ml^ z&6V{;VY^!KitSSIi7vy$(7mPYXu+IT*bK%C)jWfBbwy3AB~oz)Px8MUAxc<|FGlML zriDlGhYSi|Hq=-&8Q-|h(A5H`W*OviR?8WMO$L@==!`F~FL_hZ zMrEEs^7&H?rWgsb!fXe_Sq10dVz7i8A#Pu?sZykR8`BBZItmv2VuE3T`0G zFw@Er%W36usHN};X;TEBQJOisTCA3``hvl&?r9G9B#$I@sqEOIFq9?s9BgWu9z8zXD4;os#JQXZGM0sLxbK{Q?b|>u5-zixyc#4hwWi zb~ps|SYH#5RD)Yhn`-D+)8-n6)U>6BVKpt+;8FK5`hp5};4=MBQggt2lJJ3=`$)t4 z34{0y556FPub9F&I?3<2gCAJLJNQH<&!#KbkZ_+2G0}S^Fg|zye_&`I6U_?U!mgiW z#V@M$TQImNpW>-HH;C_o^hk6CuTsUjF|%Y0H`-OhX!?N^I7)}Pv?Xca5YrRS=}TRK xh2lZaac4H__hy45Kr#HQ-N^!nxb+6?^gIc-1?N0z<=hcOc_!sE+{L{}-(OW}GiCq) literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/PulseInput.class b/IOIOLib/bin/classes/ioio/lib/api/PulseInput.class new file mode 100644 index 0000000000000000000000000000000000000000..8f875713a6695ca63f6a2c033fec5faaad61b277 GIT binary patch literal 504 zcmaKp-%7(U6vn@7y1K2pIp=0?1i=fvS-~e5R4W5T(I-f|!^kX2ZBzfenioER4<()s zY@LV~A?JML`|``l$LHHSfHQaw8UkZwl<^Z4`7%}hZIR?O(`jKHYzXw1@=5xM)C>P6 zT2jnvOJKBS2@;c&j1m&)F36r2nY7Aif#%6+DA2ihi773W+(B31u#TK*OIcQ=mgdzV z2ipRZwF~Gwzz>Yp48d7fCbyMGVE8PRU9n&OBygE0%;>Qo9ltWly(zMoLRGT%>ZeXh zBmsBE=~ljr3|R>VI4-^jGF zQj}UU46JlB?+)3aYGF8;Pd^yqw|ylWr%Y`l^cm8-K>0W1nW<}vAl=efcUxi@l5OF& zl`FM&U#;)r>icf|wvuzzW+k`cY1^4vGIZ!Y(WM=_Btn-^k5EW|Ow0ho2j)&g(}eT^ GUVZ_BR7a%% literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/SpiMaster$Config.class b/IOIOLib/bin/classes/ioio/lib/api/SpiMaster$Config.class new file mode 100644 index 0000000000000000000000000000000000000000..e8378f5cf0782348e478c558cc3ca4ce547e75ce GIT binary patch literal 757 zcmaJ;T~8B16g{(BX}hik3sw;-0+rAuaT8xPhNOv!NtHxMANn?}Lm3!mo85(ffgi8> zD|~23eDDYOql{;^6<>gtIrrYV_ntFne*gLT3&0C(mEj3Ab)u8l=s_&UI^G}acQVUW z+Ug|sP>;$e2`n7Ta~T_HNAcd^SPgT5QYv%B;qDF7A9(#zpsMY;O7o665fFWD%H-+T zs6Bg-N^P_q3Cz9HR_Ct;HnwkF*6+7_Fr9}y@2Ga zPT*aEU_Uuahw6=XytONTpF2+l!nf9{v}0tJsjQ53fyVWY(x`tw(h^v?zNzJGr%4X5 zP7yvo+9%Q)M#33WAZ;OftWYD*keOj#A}&RjxEJkAun?_IP>-4uEd40D8$27_1zfQ6 z6V3gM8opo=U-6LDXgZHaSZ2me1+OR~$Ltl6<93DcP?<4!XmZ}e6RZ*IjQC5~pu$b!v)$#t=slMg literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/SpiMaster$Rate.class b/IOIOLib/bin/classes/ioio/lib/api/SpiMaster$Rate.class new file mode 100644 index 0000000000000000000000000000000000000000..5ed0359bb62b9a0f916ad3f3a1f7fa17c849d107 GIT binary patch literal 2298 zcmai#+gBS^6vn?HkQ)a$g!`>l#Y!j=l8_Vy5u~(I2vi2Ju~i(x6o!U`CIQ9!{jPtD zP9NH(%Pyb&qg?L2Ck=T}%tOBY+q3tXGjqOk=C8khdki3fp95$xFyIuOVl40M#H=GH zW*#{it6Z^5!|PVX4xrIM>w$G*#qw5RFSb}XJ~R+qpWj&APR5rF46U5gJzXnJQK{E8 z$z5KUny7{8L@k_3QW%mu#1q_CjVHOJ8mH5>I5EMac=?2k=*7w8**K}Xn$#7ZfLD{Q z8)r&t0^WTyPb%WuNs7H}qLxi;*T?BvJ}G&xda{;H)r~Pl+2+O7&CKxD{L1E{Y2d=` z|9gWoxx7rhC(Mp7sDG0T@2j}Zz^;%^f0`o z(8JKn@Qy++Lmxvoiw9I;BOeU+=Y@13OolUaGUelN5P?d@Pe#yK5j` z-&VCr^jstI<9w;`8NM=*s_$ONTjla}-7RawolT#Q4LS_MX7RX`v#&Y)%35nD%{Uj* zW0}rg!KxgW=whsHJZ_#jcW$#ZwpuC_?2=5zE(h?Vf$o1lnP^G)WSfiAg8Jwf?4Rr7 zeF2ctmJp@gAW9oSl=grq*YrqHHt6WS8GrL|C2=(cVbx+CU-$h%Z`S7`YGxZ6hd^&d|n-6lxp~1;fOK%2w(gOU`EXAdENm)f#WZi+NgY zxXy&~&APl`yZ#^yu5X?R)!lo|O?ELPjgm0k%jLhKnZ*z!LVOP~<-SSdm~i<&XdVQj z?V8N%-XlYnv1@C-cb*BO9(MZEM;Oi}x}ABO5(~tbFxi9X{RH*9o+1dpTmv9k^bkt4 Z7Nt<&2$j4;Q3XyglE0EF;S^`8{00bLRe}Hj literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/SpiMaster.class b/IOIOLib/bin/classes/ioio/lib/api/SpiMaster.class new file mode 100644 index 0000000000000000000000000000000000000000..294df27c1281fa4eaf2470b408dd0c0244b65058 GIT binary patch literal 576 zcmZ`$%T5A85Ud8=k%x#c6cJAz;KC+ey{JT!O)w^qc=0qWBN?*U-RulLe$9g);71vI zMHkU5?O%@7EX##?34KCm5vaf9o{fAmP-Yg`GgcZ# zv&2`|I-RPT5xQvtLdD~dNiUGbC?02z&{`qL<2>jI!I@tK4hYQ^+<~-gR!ECLbG7C? zBx}wuybnU2&l>ME&pQ)X=U0(m4ss}=@`Y9ZVVkIZV+F1y=5BFM4%^t_ddQl)jMrId OpKIg1!5HDlDSiUnS&_Z~ literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/TwiMaster$Rate.class b/IOIOLib/bin/classes/ioio/lib/api/TwiMaster$Rate.class new file mode 100644 index 0000000000000000000000000000000000000000..8ca690ee161404e6668aed461b7db05230e4109a GIT binary patch literal 1133 zcmah}QBTuQ7(JJ6>sBh@(CHW;>eOu@WeU7(ArLa-!UhS2C5sQ{Zq|88=}6aM@K@=0 zfM_H>`=gBCEd~0ZV@q~>ZqGSA-~GPs_n+?<0A68L#Rx-2bVb*&Ma$qv!r1#P>b&P! zZg!V@mWl|&*a1K0hRvOhQE~c*45PandzJUarKPR6Ul?X;Lkvn+?B#%+xYX9AarsoQ$ zQ>x}03F6+<5k)KxRe}dPR0-k|OzDUtCaj*Mwtj_YYf^yT@C$#gMFZ+uUw& zS4iw{YEUpidAv`eM-h&>-M8psE|(u(lZGswt9VB7Ls?Jg_z!iwK#n27U6-GXeXtpls=m8zj4uePX42GtL-^O2z#mIViqA9~cXoCO_uykuAjt2b@l>y<)}ytccE zFGqyBu9@Aw+qT{ad1PbPQ?)3GRF)|^4)^*l-84deQd}OIZH>J3s^eI$AI9pbSY}B5 zdjzQ^a*EfB)KG;+KC+&cod;;8ru!@P8V=vSi^Xi#_eG3)QjJ2bk% zBa0MNMpX;*(`R^eBa9INfk@^f3g%>XO8yv60{JS{C*`RDGR-ZeaM3KwOm!u5j;9M> z>CR=0OE-Gy{2l3$Ml7^d4hEL|wMc&}vPeeX*H~Fk{{^w9 B^WOjf literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/TwiMaster$Result.class b/IOIOLib/bin/classes/ioio/lib/api/TwiMaster$Result.class new file mode 100644 index 0000000000000000000000000000000000000000..2ed4389d61261b079f81c0f014044084742c906e GIT binary patch literal 326 zcmY+A!Ab)$5QhI*HF4Kks|Rm-@}QRne1)P=PztRlZ|QcBl#nc&tkqZZ-~;$j(h+f` zmxQ1B=bvxp>-*yqz%9-+3c`hpE*kHa#x~A8ZQP?xncJ&5r_N`MeZpvMU#;;ryqMW? z&2=V}8|(6%?dqMdcYX6rsP5isZnBFZX_SQVPA>ly%_N2(5#oD@DfdkpM}*7&LDL`* zZP#R8^&T0rh+SLrz4J^M_ORohKEhxs(e1?Blvp4}g!3JU-cL}!>nVcp%QXO!MGv4v ZYf%aX4pGTF5LMt9L-{MI5>9Zc$}Jn3Rh|F< literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/TwiMaster.class b/IOIOLib/bin/classes/ioio/lib/api/TwiMaster.class new file mode 100644 index 0000000000000000000000000000000000000000..cad1e63e8ce373d394154067abf4dd138486c176 GIT binary patch literal 491 zcmZ`$O-lnY5PehEjs39Js?{QT@?bAr@ajb^3JVpXda9>%8zf~($|kk?*F5+G{88ep zA6qIE5?*HVX5O3RKtETdGKr|51p zQHd7_|5x-<>y#X&icp?s+N*(*V?y;b9zI^hygEZd<@zO2Q?IRY0#!nHNmTt^Mm=i` z%P_BRoiB<6HVMZIGqGWZ*=*|7xZn`#h5V&^H3^}!@X%ipET%jeC^t*}IXk?!vn)|J zIv=E75W2Z2p%$~Rtd~mX6i={AI9%0GdTtO57zFkSN2_?>!i4b00Y58YjrTf#O^Kgg qV1uJFM1wrxPeUo literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/Uart$Parity.class b/IOIOLib/bin/classes/ioio/lib/api/Uart$Parity.class new file mode 100644 index 0000000000000000000000000000000000000000..2ccb9483b19d0d9eaac83e14237052be16497942 GIT binary patch literal 1107 zcmaJ>?{Csj6g_VR3aoC7DI2i)6BRlHQMWIUWy^*Mk-@Zsg!t)!6}yzOl(K~XO4)}k z8W%tNM;Y%cIGPyNguZuQ&$;j1dv5ss=leB)SJ;uUz_4!gjeg!V+IfCv}Qpemj zoRJJ4!_p}~=XsM`-F(>^_85G%dacZmsLrDm2~%#CYYbBT@Q`7#Tx%Sqn)}s8Sz}0k zyp0$vbxgxDoLwTPGfm2L(Ep?d;SYl$qF@D4hCpcwiKVMEb(&)vR<~HmG(&{FtH6&y z5V8o?6v!e7iXfpNh=AB_CY;Lfp3bsM9|iF{s{h>g`j#;}k2N z3jZBZi43x4xD?%U0c*C&r--J=)C!@JnApay9 zV&7g|7!A-$9=j{q3q%saT!A3F7oiaT4n-r1#k2ndtQB37F0p)pRX4cjbAy;0toz*{ z9{5Q(X^d5^ej|39?X&j2!JU`XeJ0Aih8J;M|eD??@-Nx9vdUsdMByZt&-4rBqgu# zB>R=VOr%Y+u^R~?vR$3#PzfXQhoelr!qzXa`8)|ZH)kF%-L*h}9>gR*!)t8s#s31S C-sV35 literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/Uart$StopBits.class b/IOIOLib/bin/classes/ioio/lib/api/Uart$StopBits.class new file mode 100644 index 0000000000000000000000000000000000000000..9571d8c10791d3cda9c0baf5a92ef0f1a93b1181 GIT binary patch literal 1065 zcmaJ=ZBNrs6n-w<)~ys6Q#Qwo_yW2OT!BQtY#~!J6XMuDluakb-J6=3gH?Wog=I3mv%#C-5gO}3~HdE z@tI*G3>%i7ANOr#F*zNp$TK_-gLiD+@0UUu|FMnK%dS&LHPantCRTmdaV#&8VbQ#8FwFipR}Ar+iL7i=9~GKjrIM9B256`D z0?B#VT)K(Su3?hmbn-ruFQ4KMuy$%nxxn-}Qh{?f5;$|wpLC_1A!W8BXP7h3k@-f5 z31sP=rYu047~f+G2gu+9=JAe}jF5|_a+qtAlu2!BVQujO3nP*k1z-r$16#$S6itGc zaDNDYL8&A>eTGc?jZ(O3m!+~jW#JOb>tE^STGBNe{kXx2Nv%}dGBaRod=?~_QTj~G+ literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/exception/ConnectionLostException.class b/IOIOLib/bin/classes/ioio/lib/api/exception/ConnectionLostException.class new file mode 100644 index 0000000000000000000000000000000000000000..78c9bb96522390dab545d689ef88b2c11c153df3 GIT binary patch literal 626 zcmb7B%TB^T6g|VMq=LKz5yj|AUZKY53d069(KKv8_5)5}Ozn`isK4ck#DyQ=M;UJm ziW)X9Iy2|Yxo6J3egAlU18{k@Q%@?}=qTG3BmZbB*Sq}U zHAEP4_xzC?7PrU7_XR`R6^`WAKsYW{-CkcXup5RXIk_IUy#cpoB03ItGv$2alp%I5 zZRxcciWPH>VXHb|h;-DQ&=JOF0ye6PaN>x?vv?zCEVdybvIW_2oR1ZIhaY-vWVP*Diw EPX*PEA^-pY literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/exception/IncompatibilityException.class b/IOIOLib/bin/classes/ioio/lib/api/exception/IncompatibilityException.class new file mode 100644 index 0000000000000000000000000000000000000000..6f505543506bce3cee871605725c48709eb2db3b GIT binary patch literal 470 zcmb7AJx>Bb5PfrenF9ntFfp;P5;c0!7DI!YU@kT&{oc93HODTw+cWCFvNEyo2iR)i zKd~{y0lx}kVKcMu&CGkV^EkPG0I-Xt0vv*;j51!N0#A&UC$B;|w#sO)r$aLu3#$SZ zDSLhJRVW}!s9%Un;YC6Zz3&2{n#fp*XdvT+6;6Bm1Ue#=yGAEgXgd&5Ds!(lFK?6Q zr!7K$PibX4ghtE%5$xMo>0x_)K*)B@nRJoCd}UJWfY}j88-mNkYvxAzKPI zX8cKJ?YT+_JN`fa)+S^|$#AOrYafE!H)$NoLpAkX`RhL0(@Cs?rTEH(W#o|OTwvs2 zj$f>VBF7Rl9p)U)`Hjsxly7G}6^`zVUE|pns*IZ-U06Vk5%;5x#hF%vk%Q(tm(X~V literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/api/exception/OutOfResourceException.class b/IOIOLib/bin/classes/ioio/lib/api/exception/OutOfResourceException.class new file mode 100644 index 0000000000000000000000000000000000000000..390554f0fa2be8adadc6fd0c0d48f3732519fc1a GIT binary patch literal 471 zcmb7AJx>Bb6r6W_nFAD2Fwx4y!jI@Cwip`JsJTc2O26O=YmQxVw`cq%{tqh?3lm#< z|Bmr-YACd^d2eU-y_wyae!RQ_IK)~39${ZwZAGa2LQb?$4+AxE+8WVLT>G}8Vw*$* zb@D?OkR`0&$$Ke6X@;Vc7^lbcdqO2vk(OakMKQ}3T*6FX^KPlk!gy-gp_ zMxCv9LjFh_?V5zzb}-lNx=5R0W2Z;Rw(O1ak-=gKK8l2;KpSScqfhw2(uddx4RM z1wOG3id;*~G@0|b=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dEvJPH4LD{A&e*(W*w^l zm0cC17-JKd@~tD#SwX02)~JFn1a6%XTFLnUA{bY34-*0k16$E{S+jb?a_2VVE1Goc z5x_%CD)_pNBqc2sQA`O0*x@Z2kd4Q?u6Ge10O!~fU>3ce8-IyrrA z69+JlaRo6FrAo6Acm*xYzvK3FU ztRTS*R*P2UhKdy=$zV;_Kgmi3Vbd-9cPgGC#d>UOg%z*Dp0sz3LV?39Y;A?h)gP-$$L15Oi|J%C{bV+Pb!;ej&LUR2 z#H&HV%Bk4I3jx7SxO+2d<|Es z$>DTSv=Uzh`Yu9Baw}8M!}c0vmxVN{dmI(GeHLPg3sk>R8{4NLaKEd5rXK87=IXN= z%hj0v*N_vKr~zd-Qx^zfhEBGn94-51S=%em{6NYo+FAL?aBqeF^RAjPw}=92oY$i5 zF~ps4!GF$SPDA!GpGH32P|(b^g;%c+0X~F48-FiR65%SiHV%D2`+HBNgTGClP(_gM zYDoc~p_5;v2f7Gy)ziJ^f`|+aH1T`)BSOm~hq$>idW72ola22X3pE~LP~Zp6%88=-ezjUQ(8!Uz~dt<`LOPu|5o6qXfs z(;u<6KJxo}&#l+c@DhHwPA_@xUSZ^&lyouTs|e#7Cvu2?I=b-yJscf9Sj2VGJ%lv( zHQYpoS~_#K#dQb0$n%D91D`1cRSult;WfUeRX<+g2cGoN!gHR^(qb4B#E{&}Fvpw3 z@*zhIH&vyR+dNs)H>kfu=`j4qbhSx=Q1Dbiw?e}T#|&nVnRQ=D?ry$x%l3vxd~|M? NYk*+WEU$@{zX9thih=+D literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/AbstractPin.class b/IOIOLib/bin/classes/ioio/lib/impl/AbstractPin.class new file mode 100644 index 0000000000000000000000000000000000000000..4d7f20798e2c0a382b9df36bc06025d13d1fe056 GIT binary patch literal 717 zcmZ`$ZA;r=6g{_%Mr*Y7U1z6u^QDbqz^}?+$_9lpryKn$X$Fs@R4lSbjf! z5+?e*8-xP8qv9Xu?Nfo&1;hI)R_PZ(x!U-*vwp;f414ujQ&9MJ8HAlw={T`5CfMm0 z`yJ(luSxGv$8i{#x`s~Dev`mD)MsG)DC&>Oee|{?7z!etkSt%VHI3}D zgGGEW!j>JZV4f8Q?6iOiKHK;tnCq`3JIpJngEg!RMlw8Ji7KkSmHx^u@?DvkN^gYj z{Pizh88MY(?$#Z~-SQ1eS9Eij;&&oTtrKE{ z<(rshY_(TT;8}WX#2n@cXRHNMgNx94~6IhRv@{QPna;3;-gOfY1uuGP)kRx59H&g}et%ky2{ z_TQRbx97IajNxM4<|BSA!}*RDcByQAEVuqJ|ja4AWK1F>Ad}%XE); z%QhL3)oz>H4enY3%f&bpB*>5d(elW`Ik$Tz-RN0;%y4mJu%cp_as*8GJ>TqTSVfj0 z#$A{9+ugH1LoOJt-a0kgexVXb`+JGvGN{r`{R6|x;Mnj)^zjZ~1YFmk;|ardP^M&a z&npD>{-Zm}A=*QAh#RtDuPkwhvws(FL+~l4VVyYK@43Wz5s(!c#qqrE(q3A{aZFd5 zGd&g08J7NET86M}{@y12_6of(p}l!g5`eDM4|%0(0Eq=r48fqPOhP06EkYf_;`U;QNKhcvLJ2z@{l5$08=*SHNn(@g&P#VeLEEzvmQeNQFE$<#mhx On`n~e8J=N#Z|)Z?X%4mk literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/AbstractResource.class b/IOIOLib/bin/classes/ioio/lib/impl/AbstractResource.class new file mode 100644 index 0000000000000000000000000000000000000000..8f74d33e709d78d1c51c6d944a1ac4c9aefd22d1 GIT binary patch literal 1509 zcma)5YflqV5Iwh)7RrK90Z|01@+ehU6-4DF*jCe|QniG{PiDK^z{;{qb{C?5z<;9O zH7bcD^4%Y0Ja=15DZbLAvv=;ynKLuze*f|H8-Ux$#t{)1wp`2AZL6YNyL-02TJZzV zFoWmPclSM0#t{|heq|gOx@|aHda3eCnn4^ff&O}?v1jR7+x4YUv6;~(FkQb3Q45ag z?pn@PIWPh_nzMY#{}eR2A&|(wHsxMmxsD%4Pa}ENnEZ9AXRD+cS9JZLo+J>>x|=eA7W8W9 zM4v!QdUB&37jQ9-0fEu~=}5yRBnVY{nqO;&z-0~XNT{!24IR(~&J`_3uI=wuq_?gH zEs!j_reSXwo~6z;XEfNhe1TL`$IWx(c%q7zfVNrRhul=G$2CkSF0pK}RLcw!=XPM&)wb6nITET~msFDlcb*~Z&ZIrj2=;F<}+Nm2!em$cn zLfex$#QDre^nb=+=K5z0eV{Xf5&kEc430j^op)fG?deF-(_c+w;j26m0@qkd@H~n> zS_S`vF@iRk`Gmob7<-2Vi=CO^kF2q(is&WC7&XZH~Tz6{hCjQRu2;DCZv2c7sr=JT1a-@?dokyhem{bZ4 f6eiA4h>)_{))JO!ll;2C(L7igpcGc{FxK`H2ftL^ literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/AnalogInputImpl.class b/IOIOLib/bin/classes/ioio/lib/impl/AnalogInputImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..54e69eb72d217ab78755864747656c85febb25bb GIT binary patch literal 2221 zcmZuzU31$+6g{$(D0a6^>XbBX(l45p#BF0}3xzr@364VrZXA-3((n-!d7COxBqPZM zo)}*E5glH5p>NEz^kW8QfMeBWg%r+SckN?W3#LSwEyh9uacNI4p=PnKIUUJJa~-eUfgdBMab4JY@c zwftCyVY3m-dKWhhMS)jwfk2_O>p4=qEO13F2u56%_hcx2M;fy$SFW&>5m8k2X+KGI zOuR{Mdmx=!Rl+a`bGU}Ro|bYT5YGc4LL|p1}L4vM(dmz3j{LJ<83cM`Kw= zK{IsZL=vl%#UhqW)L5cUeOssPf9(Z6P$**FS}E5S7c1q}%DgfE%^zeS>Tcw;dO=c9 z9Uls;D2{!O7ewrP9Ulp-wM1DL_!yJiQ=l7Je2NVdpRxJ(lW3P);B(lNs1XKn-~=A? z8}G?anJ%T<%u0hJP)AOK$v)vJ*~sA@?wi=saQwd@ZBGFg+dR;$ce^K7Y#s?-3nV*f zt*hFzK*LE9c{^FPPFJx=D~YrVt~!iI+5yu0YFfEaCX2@_lF$8Fd(ep;2{_a6Z8AAq>)Xh_e}v>T@`+ zJ;&jPFpWnr^q+C`F&A|l<8Oarat_D&p5Zgbrw_QUubju#+aGrMbULRN`XrpRVI4=YOm|nE>}HuJ%iWrM(X-4 z!IdJ#Cph{LBV*qqKX%x_4><5EuHAisw|*~-JwvJR6lWh&4TCz6;*C9Nk5dKUI&~>g z!x=){V4gQIjoAcxq!qrSOA+r-4R!{-3}lWSVa<85(MnaITbGb)Dyu01mLI|7u+ZXh zkc0IEw}1TSFSW;6>AU>0uX1nIyG3fA02MaU0*h2(nQ!4VtS&vKQc|sM&`o`aTzCbf z(v&zV{A}R`R@+H;H^3s}*Vu|nT`{vAjd^pVfgG|@8jmv29g@BK6rXU|)SpALRjZF_ zXJ8m3*h%^4IR{qxyT;W!IEuSn7^7Xh`NxANd`ETWE?qM45pc}&Z4nKGv!fIsLbHG1 EUkM7xfB*mh literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/Constants.class b/IOIOLib/bin/classes/ioio/lib/impl/Constants.class new file mode 100644 index 0000000000000000000000000000000000000000..1115ed1b437fbbaa525eeb4bc5d2852f9f130a92 GIT binary patch literal 938 zcmZ{hZ%@-u6vm&sc564vs0?945fB)ErQlnM$ru}H?AnEH!^w-Kn~j!qo!K8hj^DxX z!o;W_zz=0Sx9hZ$_~y31=REhEbI+25y&v7at!LZ^Dyn*I>UCrx%@U`+F7>%7^ zJdz+XsJG5XNAsQFoo01!-QJi%Hk-9hT{mq8rZddXF0>qf;tG`blwpB;N@mHhE<-Dq z)kv;i*E%)pqG?oYE~lvocQ;E{jkr$5!z^}PkIO~%+}3I9-BLFR;!h(j;+6`P#Yo`7VD+*t4gEuZ-ib6nOB=WS-9az(|XyiM~Zyb z^S!_uzhn^h_FD{MdGOXv)3pr+i^%c6rwW#klcunvpnz2_?<#nN9KFc!0@s}MyY8^z zbbXh4F$O)yZ#hG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q>a|)Rf(m0Sl7k96ZwW(KZb35If}{g!Gu=%b9M?wTlaxAkmWfvxBk6_KuDnVA jw>TebEk3gipDEm>X$l+Ir0n79Iu!0t_Y;o?Khya?2vf@z literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/DigitalOutputImpl.class b/IOIOLib/bin/classes/ioio/lib/impl/DigitalOutputImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..0e7c67a46b132eb56606400b87f10bb0c22f0488 GIT binary patch literal 1023 zcmZuwZBNrs7(I6z)YT%&%K$-PzQ8tM6?}Kb#GockhLB*E$QRPp2CkI0+3wIE;D7Nm z34uft{qB!4o?Av?V4BF|e)arV$tY|axGGRhi#4c!nzUD)6l~Gn|A<=erfZsF&O!+V0fQ3h%9e==77Wav?_WxCy3@iUsx+?ct20CD z{=OejYspEDX5xW%e2K=C>Yv?x*ACop+fG|kD>n>06c|o&ylu`}nxg~zF0sTW2mKg5 z0q8BF^8@tD+g)|zZqv+-sMGTNcT%^ta3-yLYpa@yCK8^bkM}*p!CS#^p0gaICM?bz zR%CUqGCy^Ufdfu6806bbw#=d*bGXj+%t;w;V2CRXHjEL%=-DU=tS({<{LD@sq5K^Kt3P3WTsVgP`+#6Mf)@C1W)lg8MEN|Ui;PwYZ&Sw7IXT5t fP7#mrmeDXA1{6~qz*O$kkDB1#eU=4OSZH}__4_LkCd zeCnIyOs9R)w?1V?ed&y))CcXfZ~hg|_#gNO7|-5|4SjG-<|cbS_UzenerM15{qJ9X z1u%-TfewZ-=}I?k%Tiias&;zLb~k5SM|rMoi*nvqRbLg9C(O#=obA`vi|fSG$tXkb zhI!pg+orRY4z&z1wJvLeXBbksR^3j}sY&TbHN|i`+4`}eC5GsXTNYhl=;qjmSR4`T z=P=O25J_r-13Br4OMay!yrNmM1w&uXwM=`-^rV(|l~Elw!?~7k--`t$5b=CRUw(+= zAbR3>5ic8f={bb*r43;zj#qSW(M?mTIF8_`fdoUcRjfFU;W$I5X<4Ec;M^8sS$*Y6 zj#n|*bn+&{<#u4t1y%Qzw9}UBSia{8N2N2iYh9Dh+M+LfG0~0Jku>lI!^!`*<`_bX z!H~7tN>yzIrMs#l9p*T_H{DU~HqCJc6mzsDZ&Ep_%#_txj2jqZ=xM&l1yikaoWomW zQ;`nCzGOD5ZI9q>j(0#+`xnNu3?uCzu#(Y%yvs3#_vrC@qT*hsQ2LWYAvQrrg!P^< zF#TLunJp#axPTds_c6=RRU*ZbY5QR=86DpT93LXvjE@p)C%){^l74~n969~gx*S)@ zFSn*`Tl>Dmk;mnx?{S9Jc5-jMLkhwv3y+?{6%-8=7}Bl2^1<*Z$4AgTUL!{Yb8;m^ znHl(m;b^nWSw{)a^Q%gfXKz@ds-#P`jwx6BU|<9zlMMR{%CxR6nAM=+4SdFMu<3-R zm%AB`hj_vDJxk0-S`%_Del|26VNDrpzmYa(Yap?^4y@z9I|vN+bRwb9f5~&)G$vp4}~Ip(kg7y zcMCW04cXttP1IqNx3BOcz7Ft9g&6JPm&Y`gag`9fi~e11k@|XtbP;??_s^p<+Mo(W z3^FpPc@S$*&qqmQBvN4#4J4Y|q+D(2T51EJfx{pbJwSs}>cHpZvIAehB-%$DBabEG KuMo9jo&NyrFZ9s> literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledOutputStream$Sender.class b/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledOutputStream$Sender.class new file mode 100644 index 0000000000000000000000000000000000000000..3024cf9e2bf0353333f398aaad6edf461a86128b GIT binary patch literal 264 zcma)%I|>3p5Jao}?5;oX1||lYIN%W!1S5k56QfyeWMpUgeW9s}!goU=P{NYNq;Px_*j z)$XV^#fkTk(5hrjNG7|*db%Zab6i3CO?bp8dkMyO#q3t?n5)v_O!^_N>bIx9S@3q(7^ZQ?~e+4jzZ!}a1#BI;^ z5{|u;u-7wAV#4t@lAas*p5s{Q>0FS>1+#%~nd=%N0{b7BkIV!ON>2o|tmURH|DM3W zRHb-bv&v>fp!Q+T%2_n-no{t&z;+TT&rRig-*SV*xZ|bPYmiJ2*U zRoxyJ(4~XTIZr0a8(PZovX)$lMJ9dTcJ1JTz)-w$|9Q$Ld*%fqNiS{1P>uI=?8jk& z>Uht*h8BSnWmz2aeRK0IDq}c;_oZ$&wM%bzos9EzoR%1fEfyy@HWJHHtTR_&~SQE?Sm`PxwLl;XAo=yzGFgR;2% zIAvu5+jFxTSm1qyo|&B9K8fKX#x;xyG^tai&FQ5FRw~eulvzYJOgpH@Wn9rPA<$X2 zrf-!~$H$N&w6mAjGr^`3#9|az1?nf=!1DcECa}^mjN+QC&vk(V@siG9m$S!MhbV3c z91NSjebvmiFIkq`9*S4PO@Y>8$R)trxl!Nby1fLt+%2-WXEtEJTr)HIO4Mxlc0ftr z!lH%+frg?V*|s`v<8$Ws$aHen^fHN!kN1>#QLQZ*yQ||K?z14?^0MXcNHZjPq-Rl< zU`a??0nqmEzqdXqHqPux*R}klV`j6m()A^iO~Y3lJQdHxa8`3xgbRv= z9myZB#%abW##OVNwA`)Zx(YFVbM~oy&NlVtWK(CHgzC*X$hS_L{W!qqL4N&!h{7E+ zUgD7P21ge5M(`3xx6sC~jsmdv4()PnfcxImgmd2*5Qk1_Tn61c?3CREG^L(ln` zTUmx#%n|KVTGykty1JQjdM4Jy(B}!TGxXPVAgh{uEA&nodds&zq`@|&Y!2g$w8(vOoBJfvWL)rmm{ClRLpwhfWv<0pgOSo&?_SuMK<+B4Tta1o^ zh4xYbdyRiSCN8`(CT&0MFfmF@GG)E=?ex-H zV)77v887`iz4VosWD(>|x*5EzUair>!WEf)H<=tBm2q=wr< OLG}gLU-JERZS)@w=gcnv literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender$FlushThread.class b/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender$FlushThread.class new file mode 100644 index 0000000000000000000000000000000000000000..07e4ac863b43a118a6347cf3f69ef67f3451ad9f GIT binary patch literal 1750 zcmb7E%~KRd6#wlq@XDweyowf(w#-uv}?zxVO_@0Y&<7{juO z1jD%Wq-VLZXvu2LwPsy!bJ|mZ@42ohE!a*)1WQ7dgrAvp!+LqS>a z<%GU3RA5cHo>P%(eK8cFm`r03855r|41QRf<8yq$V9NSTwHDlsSihm;%5vl|wD0Mc zP3AVQ-8juLf>C0tCPamyH=BzCh$=4TbJ7GAo7E_PnYf; zpmEPe>Ab=*rFk@bQT1+%G`_>EiJ4}2i_ti~#}AZ`I?V$b9F04^$NOY%#l(*cC-w(N zUIoJU!&)FpGj|+O3#6wQ+LrQ57M3_bfcG;F-hxSLZ;Ug$ewR_fM1`Tp58 zs;wD#UMb;EyLP=UsNd5ECK}Nb7YA+PXfZ&8rG+LX>*~_eg?0)0n`ou`HrkETS>L3F zhM&^%9Q;Y7(@CpAIzSO!wDM@5!bj+)6NQ3~7=aBCzD9UR#=S$oAhlX}wM9_0dxpbW zY~zy`_>|$%?w|4T)VteZhTmbm0QJ`6-9KWRb6Tu!5C3<0`0U4BvB?!Ng-9xM>2yAs&Wqoh*GkKyZMNhkJzlL^wxaB>zI2iGJe^uA3;lMPkh)kOZ#M=LF`lK=K$p&ZvzR RX>XCdX0%c<_hZRu{Rf)D)R+JO literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender$Packet.class b/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender$Packet.class new file mode 100644 index 0000000000000000000000000000000000000000..aa53dff866b6879890ad46611fc88cceb0f5b5f8 GIT binary patch literal 264 zcma)%O$x#=5QSg-X=+vQ25wx`jRCJvD7aGS31T~x)R;(H6+D^?58$E1(XItI^O(ou z%{R~2{Q+Q&sYFje8E?F@X0OcgWL0YYHSw;ky|q;Abbg>VBUezp=oX2Az^u|2t*myX z+U_gLTLD>e(A-F%A1^loQRdHePN}hM&41UfK2-vfjdN5dRyPeb5@Uh*Uoe57Lkj@D Z&cCrTc~f51x*+e-(;n@2$q3JOB+;~HeP(;3-a_1}8v2lS)F*f|UK zl9z;+j literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender.class b/IOIOLib/bin/classes/ioio/lib/impl/FlowControlledPacketSender.class new file mode 100644 index 0000000000000000000000000000000000000000..eb76ced0395be95c3fbf3f2e939fdf52c3a60515 GIT binary patch literal 3023 zcmb7G-BuG<7~O}2ObCM@R&7Q3QP3m`5fyBKLII&f@fVB*wK@z37#U{bWKzpR^a1Q` zFTCkRT}xnD*Q)n@mG&9h?lTiYptLLDB6H51^X+ec`}-Mw|LfP^09-*qL!CgZTHor>-e5)+j9AyVXjMmPCCod(-0MCd0~8KWNgD(&D>pjAx&RED+I^S z1o~&I#p(_rhXrCUi?S$b+&vpW7k$gln66_MJx@A*X2N#Ob<0`3udeZa!<@D17=F={ z0*|UN8L6IA80_#Uy=eZLCyiy&8m!)a+AbE><^w}Q=n7zS-c^wjM`Vd=+HOGxyG2Gm zVmX#SDsU}Xy^oS^shmJ`(p{DbL~vZkQJfHnBvUyJp9)+!RLODAGdB0hnZQY$QpRmW zOJ-BK1_+$dp&_oJgT$&%XGQ1ef7VX8(D1Sr z>u`e8I$WTOb1lN}aXnhqaO0{~4Pd@);JOY8?l}^JH3wqwGlw4tG@x>iIGwlt_Ek<_%6!*KtS>* zhN?&oy@8hA#&x>C@FULfar!-m1YZCB=NlZE{eXdm)~|Lj@ljoPjiwKnT4?=x2icEr zi3Oa(8Qdh6VtkfjfrB7|5ehfVlTorABhzs*oZt+;QNeVm#I&7p&f+%F?$Ejsu}GwK zLc`5O3#s45J<{AyeVYzcp2qf3Z&%bWzQ_GKa{q(eZ~qT>M*J}3-$sVJ{Lcr8o*{Ua z{AYM_3mxQ^BD2e+GKBk#=s^%eXGo!}_87jw0%PbXMN_vI&9QPci)iB&RU@}(uHxO3Nbw{zIbWxPDZjTXWfGGamCyW%vm*90HHgUgf1J9aWVT6xGwc zq6%RbSx}Ez$xi}UJv1o6cHwy$Y>+1kEdDQ?M8N(TWqMwL5f3q1;xMp8OBHEP38P-+ z=NG;R<5QIh)~~8u3PBSS%ZHfs{CvQqzrsXfrDSrRAWF|zx{Xrq#T&Y*v{}X4A#PF! inO)j-Ls%=I@B-_6o?>3w31D-*!KWLGBhRN7i~j=_*v(@A literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IOIOImpl$State.class b/IOIOLib/bin/classes/ioio/lib/impl/IOIOImpl$State.class new file mode 100644 index 0000000000000000000000000000000000000000..5785c2ef23ef456474f0804b6db614b17c79b04d GIT binary patch literal 1180 zcmah}ZBN=z7(Lelg<9X3!*`vV+W?)Qo9+c-bl4@$5SA24$UYU;v6@m$DQ5nw4L@kM z%=zn$8?(+&F!`rLV8KBFw7TkqvjZ5g>tE+6)M^;gQ}Mb<-HF(75!~d zqZYf`4y_JqrTx97>P~TAGZ+>=-qkUhZ#cGV`&$fBGF7EMh4v>aim(EPF%@y#V~FJY zC5dG5TDswTw%g3ZYH%zB$dN#*mQGtXp66b%hJEZ5xbh;Kz7L%zv94bg6EhEJ+8c=@R z@vWAMWvtMdnx1DKH`<5C4C$c1a{a(+_&Ggb`ErRoGsr?k`7^_Mkk&tz)a@tF4P{k4 z!y3azkX~@iPA3<5=2gFI{X8_32E}N1y@vJ9=7%6(7mqrGgP9p~n6 z*S1ByRo!(hPl&NPGF~wx{+~^Tun6{cmhM!d*C4z-#ghQgNFfj--M<*=>VeT|e(_Wp zqFksLBHl2euY~!h@)N8UACXQmdV+BQ5+MO51egj7FfG7rM1VQ@7m=hM#*JF2hY6z= z?qS-fMS7SsPO$Ku`VL@`eia&lJYFD&hhmlQP|Eu%*2n{QA*YvTPx0uQ7@-36NvfF3 zSmJgl&yVq>Pv0c#oSx`mq4r)%pV#tS*`73WhNmmvXy-!4MK^XOAx249?e|Di4S$vr hXX!I!euLf2ljvWE_k2!<__%>h&Llp=OT6Bm{09wK_)Gu* literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IOIOImpl.class b/IOIOLib/bin/classes/ioio/lib/impl/IOIOImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..153fa9bad8cae1058e3e52c699b3046173877fde GIT binary patch literal 20016 zcmb_^d0T$la``fV-0&$;i-n>Ujn{_$%|-g56f z_bi{Y-23kI`TsupI1$ZPzcNTM9UX~AqI0?<9djZ*ecf|{4fro^4DvALZwYM+&FK#H zZkp53u_fG@Fer!VC}%{dFQNw+Iuh@U_V$8AT_m0e z_l9FkSuItkFcs9LCTUK@FrtzvZ&kE6o(T0O)`q(K!(Pf`@+LWBDr%}Zy*1cWQ{5h{ zZ>edjty)#n9;{|k8&)#q+Ve!Bz3ohs>Kv|;%!0J=fp$zZCgNr@eZWXDFu)h>3->lg zdgJJ;HmnC<@}gxRf@j?p?2Px}p3#)oH_%hn-5u==C89CBJ1)hHroATG)!!XgcnoHy0c{*LZ2`enRth8p#IUtcVmh;~N1(Pv`D^rFy4yBTxm zK;a3Yb?hkp1QKQ1l;}CLta)9qW!0(eEmbS)YRW{zWdKkaG+ZV`%hrZtap<>YdtX?z z6oi&e?Cg&8MiR?m_USX$GI>@-yTU$Vnqkry8p|}cF47yW@9*gd$67)VN{|7~b*~M@ zBJym%%sJ5}Q#w7x<|w9}vDQynG{>ZJI>DfMOeGEwM%vX+b7_t+v(TghDwMkllg3ez z+$}NbXzOm7NypH5gH8ml(y3)w(n}&|BAC=)aX>rashzTiw? zy%E;WGU-?ud^U9$6ap60Sx@@51u>I4X$n*ktPg5cgiV@EQ-sVWlk({(G$l4i;!NXH z5U`AD2QOeW3t<5MG!Tj;YNIjR=b8L9=XQqs#QEa}p+hQY35LSS#yP1VQ5TIToIwWl zG0ky!PahMMP|_DlL^>kfk;HaqkVqXfDK0YkRyEYu*Q{!(sg}3>CT-J_R@YQj`>BWK z_#xzWlg^{_;nSh6uF>M=0vGZ}VtJHMTRCH`mo9`0tb;ZX8A>-sW2K_1gz(5WGlE{al4-Jgy8hm-aIAZ~ z%$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e~+IRLcP-<6zT{q+*Gk($%5PP;U&4? zRbO>|c)@~KzUW!Isn)c8A> z>vKt=Et@S-0rZC7-;c1{?e;7uVHTWfNIS})-@J66{ryLMU4Q?v4nKS|`SKg`GNo(1 zKc_CkZx}8IKUdO3brqGWt7$5()6@>c)}6FS?LvIrNhhjnT>PHo;ulaV7&k88E5A0j zwehgc=jwgxzP4w{vuE7_^(|!A(*pa{cd+%I(|}doIy`(A5826wy?F2>A0EMjVLh}x ztnS-`pqWp_U~vdX98Q2^4p9InN-A(&Oe<&=t`>lDv>j5%W<;e^$#*J(o~#+*8*%wF zM5m?y0f?llQje-(TyH>>ZC8(}#}Q`yP{CD-L`YEm-;rg=`#dJ1;>T4^;tJiUG^Nk$*pbOVG b@%$Ek_3(C%7x90t`bCac{Sw!AbG-i#$hc81 literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol$IncomingHandler.class b/IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol$IncomingHandler.class new file mode 100644 index 0000000000000000000000000000000000000000..05b920c2e43791df2a8b276c68d7e4ab9da3b9e5 GIT binary patch literal 1199 zcmZ`&+invv5FM8^+k{>cXla|a6le?E0u6*OfE0u!M4|+EAWzQL*|==&)vkl!*LdIq z_$Y)glWd4oMao&vIdeQ7d;a|W^&0?M@G5{M0%t-A)l9^&DX!C`NjtRD&6HM=N{*?F z)U}ZDdnPXvo&``MP`hH^Su14Iz{yPzeWb?C9;~lZg{e;D(;HewvBlk&lcH1IG_W!+q##1W|{7!+;p=Px;XaA#@mUq z&6rbOFwF=AA*H_SJB5jF!lxh8)314|p9*h}E@q9kg}}S6I9FH0_AK`XSK5mHb2V#p z#qv$S+~y=PSB+*aVmn)uh$Yb|PrchT*#yuI4`?O6l-}%sHD9Es{8sjE+-s~OCnJV= z=5f!(7K*hpUqQ96CRxPaiNrL%K0h$$b~XsCQuF?^cEa+U=K;JV(71WX%*$UGvoZlQ z6lO#L4$QzULmBMg1+e0?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wv=j=)NN35Pqg1w;Yq<7aE-{W%#9rtSMSi$7*#a>W=DD-S*rYMcz6c zyk{7^Lz9c_MRd`LXX(VjoJW%n?1=1to+cc8;e#^jsseg-|68LU3tNV!xOr*VGQCM& zm8H%2y;kuRSA@5-YVz12{E^%5;I+e_ujG< zU*=%1%*A7J9voJnUX%;*ihKlb$U?j;i*Q&LDv?fQ$zoM4OVk)y zroysZO_obkE63Aig*sC%RULAfnkOGqi#aZr%hgJWsmr8Ct(JAlkt@_XNvJ;QRhu|o zCn@!5=~H*h$JGvw`y`_dNLIbd@vpL8y(b&gVc9H(Tq!=eO3LLEQY`~AUapn~xmHe= z>*RF8X37?sFQ1ePId;nRvRH1AAdu=$GQ%r^{J zrlBmqVOrIOWrYl%)nNFo<2g3*dzulj&N9lZcEh%28WmQ=sMJk@szR+k-SbVtIBSZk z(M^I}%A3+?&O~0vOmAlB-?Lqqu@`6LX9o)~b2dUAOgXqsjUlfg20Fc&`6Amz-F}$N z{j*hw?T3Y@_x}OcIyV-(X!rnEg z4iskWpBJbJ8q2Qv0#!?na`w!vE{81x^iT8J@>XGHJi!LYg;~?sAM5UrF<~dHXFlBu zsaG*G$D5Guf!WW%uh`n;*raKIhPZ&qWwS=*5FPBdZ})jJsK4w$lbo4lI-z0ws|9nC+FBM zd(?R+saMCq&f)lxqz$876J25wcqR@L^Ab@K08A#e%P`iH{y_#_TQx%gk>lNSq=aP* z;`;;ZM%&*oc|y5NtfV=^uB-ftHH;LJ!)Y!+JEbXjwTbaBe)aqm)u1MFtYK5U4c)5I L{R>sMngskGraP{^ literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol$PwmScale.class b/IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol$PwmScale.class new file mode 100644 index 0000000000000000000000000000000000000000..73a9d447f6c3cc9252b93849104f74e8ffdb2172 GIT binary patch literal 1490 zcma)6Yi|-k6g|^rS)gmBtG1Q4TJ1yFsuxl33G||Lp z{WpG4YNOF;{Opf1-Wh01j3#`5J7?y;&Yd&+>-X0m0OpWW(8Dn9c#fB>I2%c)`mB=7 z7xTqCzE}4wuQGAxMb)s(imf2P(6?niHCJS9;NgaeN zQAoHIy>OYNMKn`@pxBN6QsI`;Wd2AzUlC*>hF9J7kLG)U1!rZ z>kXgI7dsl^RnuLSS)u0CyzAP&U}M)5WEo=re?`P)|21Z2==LRg!b;{OS0q4|#3(H3 zP*{>6dGvF!kkzhlCVsAJ&Gvh=_j-!e1S*bz{;8?1*Fe7wu?alPX?l)pujPK zN91Tm7I;+P)4_hypx78wzEc9Ji9w?rXd-5mn^vGvS>7#o{=qCbum_E#*AwV8)sQ0(TZHJh=6S>C3Y&2YG zv(m&2_`F(E2+;Gqh-ACc0@dMX15KPQ-;(qn2};CSso|rpD_LYuTrlMN=djX&Q@?u*bG+5^6wYJ Jb==4d{Q(C{J30UW literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol.class b/IOIOLib/bin/classes/ioio/lib/impl/IOIOProtocol.class new file mode 100644 index 0000000000000000000000000000000000000000..ddf69679139d087cebab5472119ce10b758a1a5d GIT binary patch literal 12885 zcma)C3w%@Obw9_FbtPHG7aRG3ZLoR82pmWNr@NgttI-y}fWq|LhS*{)lkTbn-CuItuyY1hZzV`cyIeOFgkl1=mD z$G!J_uk%08?|h&9gJh~-0JD1uLj)Wu8Y$l(HXHo{a znaq1)Ct_PtvGmNA$kBTe@jR1%f8WT!0CaR&L51W<`XWgPE0EX zN5}g1424JcPxeQKhX?z|!jWN29*yiB)01T&Gu8F)AMC$lGCVvsII_2|e^8nMthuaN z=0qdIqk~Kh;5-=(4^Iw+_l3v$h9)E9V=~Ld6qGJU^W@Or!NDQvge=V?gVD%Hu^%e{ zMsmT(-Znwp5l!YA44orc?=IxD)9O#49YsUMaN7!|5SP4*D zXe#K_rv?o4jr9qJWlVvBe9|FpbugA1WPuwyY@=E+8Vy^EkBH0TOye2UOCU*w({uBAtd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{RQh7@^DRp4#z#_ryD7lnW z>Ks~f1l6?rEexHOD=u(VQj6_6>8m!7O4_Y+N~7rspHuqd>#RxcZ1KP z;PaSLkiG#ely;2G`!}y%d63ppJb~45Kg{pJ>hE22^?i%1ev5^@CS*1X_7d3Y-j8wU z;qxe_KHyli#cShQt{ML&c^Ka52`vgo4WYg@BX7Hz%Ex0k}zdcge;O7|MR z06jddRh4+21;2Dn(r5q#W M6Rw7t&+cyif8Kz|t^fc4 literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IcspMasterImpl.class b/IOIOLib/bin/classes/ioio/lib/impl/IcspMasterImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..d60563fd652727dc1ac6754732245f51b62eb5b4 GIT binary patch literal 3422 zcmb7GTYD4N6=oYzE63WiH0h zmOz^H-X>{!N$DkR+I+n9B?&R1d|%V&{*ylRFEm~IXsnCjA%#z#(K-9RtI}BS^o&n2Kepm`l zhbmMr8|cViwAbyCFmOsEdM#@pHRr69?I84&fdkw3N2?1ZySy@zD+g*tdD$@@vb>F1 zwPrhIMyFpRXP|4q_I>3Aj$8JRJHEYCQbq188fYCYlxP`@8Hf)K%^OHex64pRx z-YwXrdE0a3d$hQd=L@UTb|w1WG8%#E9n5dzbtX3>qGbhadTOJfDmpC_Uuo1p1X5d@ zBa?2qtO{b6cm1GtD2+HCw(w;>+NhBHVP(|4D{UVaLdXi&^jJPSTfvu?z4&e<@q!>L=)gQx7`yyH72F0nJ}s!Q2dI^*GybDFwo5O{p~G$PogAdPEDPZ z#NM#*eO(@s*sNM{Lz0jzlw6+^F^(Tu_yIc8ERUa9_^DP)@8xJM?d$l3>YPzUF@Mv- z&&0@}@CM8I0m)8i;hn;{uV-aWTI*L9el0`Qbo{BcN^n`$-nH;s+|b3p=B`u9U4xCC z8FiO5_wOzI0q=-z$zi@Il zGnZ?;$5;~g-el;fVsXTfgsGpLkX+fp>o*3AAI?djeUDrST(i)M4s_C@i{D21lz$za z#wK>%fSI_7MEqm)e8|N(`uMj+n>>QOe2?+7kDnxB)-lp5vzv?kTuSiUe(iH!qX4=y z!?!Vzxr+k}w=wt$GMV@%I4F)|+Hoh(0FTny5Rqkg=N-~Px^GY}?5WqY!;` ze1?ghy@kb1oWF^k`McP^Kn2uiAM$j9K00uL)}m=O>tkG<;OZp(9!D=uG{o?zD*uDS|0|VK8f72+Z>YlP8#I`aMZ7r~V%>6;i&PnQP2d*xlQ}Oz$RM zA)0BS=3t$gHpXnG=0&18%hi`C@B%42r_nrAby$;TF9I!1S42{5i=^3zq_9R(3-Rs8 zx-Q<2=|(zfQjpz*$;SqzJD7YQJNf+fM|kyv&;O%gOWh=kQa4-DzJ3pz!z|fnYWOoO zCg42r+mvgGbHFC{A{A2@#)`H)3Wvh4HZVLH<#e=3?lh8Sykjv+hQl|i>oGp14Xn&< z{7{f>;>Y#At`@aR1QkYqMMtr!_ED66naq)|Y~(9NUq5Hgx;GoUBc!8s4y{WKj#81M zwEXId96d%(1yoB<2R^_0H@;Q9ROi=~hSM#03vYA3AHTpmw36}FsL$2N)8S@)GI#Jx zgV#b`qkn6SI9=}GHwONR(M|kL0#}=?hfcv8F@ft;;x%${ouOXG!+4_s%;6}N>R64N f@!gF6M;?sfJ^YDJ>3ON;KOfseH}B)GEv^3pc0$YX literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IncapImpl.class b/IOIOLib/bin/classes/ioio/lib/impl/IncapImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..6ef1255d042f05bf319dac8ba815b1f025d3b2dd GIT binary patch literal 3619 zcmai1YkL#d5q^&?yp~vVi_JYm218_VQ5-03V+zPdCL;0$+ZZry-L_^Y5c`NgTfZacl?y=Os1T_4|dgYv-I&XnS^Gpt;_kRdiBAWw&H!y<$03Xz5R1m^gbbb1pNH z%M2)}EZ2H{uM}EdIA*zJyOFr#3Tx*4f<2+IC%5c>rL7Kamd@>Ng{UJT4V34o(c)UA z@KialLdW;`uFh~jbm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@xnVPq7)5^3l+rR~vE|)@3GW pw$4zrYN!FXbyV-+4xiiUxQ}IDJh_cu26yrP$*oMyeLQGt{vVuGBBKBR literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IncomingState$ConnectionState.class b/IOIOLib/bin/classes/ioio/lib/impl/IncomingState$ConnectionState.class new file mode 100644 index 0000000000000000000000000000000000000000..9cfeb3f7d8a35f7b5cede5c166d9562b6d6feb83 GIT binary patch literal 1355 zcmb7DT~8B16g|VX-F8_8s~}&Z2x>oo0t$Y#BDK`Gv9!c(n>0R{ZC&eV>d zjFtz8M&h$S%6Mm}u$pMneb_r^=H5H^+&TBh&o8F{*03pKh#_gYmYcGzddh0;+bPXy zxGl?R>K&tFF63OtF&iDrbp)0XV7RUWg@fBF6omL{LB%jshLM8hn8j|ZZhB>-Zktp?!EG3J)$lBi z#ijxYQL41_!D>@+2Zr4>X|WQE55``>B9>(=F^u|H9kx4WOGOGR^b&^W8HWvb|BxZ! z=U%GskrvXLuN}X)s2>cnD5~_HA?pw8w=6!;BXPP9RIFm1VcnlCXB+Ky+E>DP`U^T- zmLxDmce`H0d|`=}{vqsT?o3p5tLYe>u17t8=F7)fCQo@p&ge4&fOBw=3r?`SBB0y@pgv%5^Lg*u5{x!dX z)uN-)F|Hh8On~bF0VV{P3JNeSz>SaqvjW_b1(*weqYP3HV|p#n!-QT7_Ass2LOsmt zHMxg5{Rs1)>8c^zp}#^FNFs{_?uuQ0LgUmgY?bJ7f^s4`bBuczfgy50KS&j888Oa~ z1}9GYXS_D3D?EI>hxytoDRElM@cMS7=@TRuKheoq8E4tpc?l8H(ON%8f_(U0N|Yr| eaQ{2lzvCoqh@21cNZ7}C!Xqi3A&sY76TblbH8q6* literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IncomingState$DataModuleListener.class b/IOIOLib/bin/classes/ioio/lib/impl/IncomingState$DataModuleListener.class new file mode 100644 index 0000000000000000000000000000000000000000..817f3b515f64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mV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IncomingState$DisconnectListener.class b/IOIOLib/bin/classes/ioio/lib/impl/IncomingState$DisconnectListener.class new file mode 100644 index 0000000000000000000000000000000000000000..d7ce05e02e2b36667f9b6639e4adfe52307190ac GIT binary patch literal 254 zcmaKnO$x#=5QSgrPin0oZr!@jO#@y*5ekBfg8Q@$B_&OysUFUS2k=nh=t2;|%{-WS z^Ua(4<9Y+I#)KnaNVL;V7@Z5r}u zBW)!Pc}-J>xcpdE$~1ZKF(;IpO3gHQnGY%AAyS(#Sr9&oHmWRd6j# z#m_}8OUDpd>2je5$>6WkP0kQ!?a-IzKk4-a11}FSi-ub-T+|?d{3L2)7qV-K-@jbtHz@3Lu6GN_PcMP*_ zI6}6=&S_fTIl5=`!*-$;s$SA3?z`NUWLGq#p`{SRvWCl;QSk{wWmK<@ZH3NO>%&(P zcEr0uDN`t7Spw-A&LJV+DjKGw{r+*!SJ%QDqr!PTa$Ab+llu+)m>L zZmGB#`9DgXhR^Uh*=%&Fx^wyO{f z7PPs9!+Z8I6>?TDzfVsel1=H|<3D-hi`O-LCv&3;ce~g3epa!`urSKjFh|>tV>>Bq zV41eza<6TeK5@nM#=w;w4R@uAc%Snl6%B^#6LS2Xw`uI+2Mu*>(dTtc7XhSNw(oTK zjtJ8E);X~%6;eGL7M%h?{yBvq6P+H>4jHDSuHZny5+x``XHguA3>39gYAHz4MX>@h z8JSpmF38V>#u7Ak9y2sEL#-M;v6{X-1)J4aM|^r~Q= TBmy~l+eH=+5=okr#gD-MhToQn literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/IncomingState.class b/IOIOLib/bin/classes/ioio/lib/impl/IncomingState.class new file mode 100644 index 0000000000000000000000000000000000000000..98e9961d190fc682d28f36d6c7ea64c63e5e91ce GIT binary patch literal 10140 zcmbta3wT_`b^b?MX{FV*B};zG0vU|a)50>wfQ`X=*j^B_@%n)=ul4S=w6NM0cULx$ z0!;!932A^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1&soX6R&tE^HzZ2S1UlWjln8^uDOGynhq literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/ModuleAllocator.class b/IOIOLib/bin/classes/ioio/lib/impl/ModuleAllocator.class new file mode 100644 index 0000000000000000000000000000000000000000..8d06f1ffddfbd827f2aa732352c9f23d58d22f02 GIT binary patch literal 3038 zcmaJ@TUQfT7~LlUf^kp*MdhM_N+lqqSnmN95j7a3iekC+GLT~!on+!1yBXi%(svU8{mP-|NZS5fW!DEgn&Sc zVHsA;G-hH(CTGS*tW?321Ey)s>W*cHP$976wmz@NOg)>9jn3SbvyMPLPYhF^F{S5_ zNaf!W*q(GP3yxvN#-tM$*fM6Mv$|8TrNDvpU;DhR8#a-3WLnzs({!oVz2q`g8oDy8 zXCzb9m3WOgwvkQKrK-=!8qR5fu8xu%gO+I$tYKy28=a!#0%yxxmj_lpM8%+$l3@f< zt3gAZK(He^9>Pw6+BGV!+ftH_FzV5u%ytXxEuT6b9p3_e)liA55SrG7xuoak+%S!( zRaW~nY(bS;MKpx5Rq=0R<&{EaM%vevHi|ClXpZZ)q4xe^g)?X51@WgW}2EwH;|Dp8K}FzY>}p&LB{p|o_8MxOoHNb6|X_;Ka% zilV(nATX66z>ZA=A5npiDtR`GCJ@f(3tnfEL&11Gn;DlcEre5S^0n?5ux))&RT0KX z)P~WIGa;~-y#^{B4-IEAz^dnUvmi%rxs~`umzu@5Vh}?ioEO-(mPTdJZ~+(Dqk1YO zu*+}3lDUpYCpqmUG%6?dfiMKxUpOvboIuT(qtD(M(Q|&Y#Wq!@d<4b96(!dwJBrM5 zPAhdqQ3$;(sCYSe3aBc|GjIbpL!fWX8Uvgi4Xx{NOwL(!$8|D83ihlVDjtXM20PRZ?b7GnMCS^InUZ!jcuz&ISdoln%ZTm! z<|Edvh%=`S?iOU;k*SEo**FymV;Z_Dc;*F7{Oc_`t}Id-Bq({6p3BKBheGd3DG)3LdY<7lap&WGyGMD4j^LNmF6mgU*;^Zu?v?)Rnx`Yu(i+wnqU&D{rYF zpXDIx)ZNcrh`Ru)x#umvZqK`(-$Fd&rA8aiavQeu^gb%wIIW#a*wMLy`iZV3?0Sqn zTsKZEq4_adIuAX@{$Jc=t^C`-guoFx9>oqELlcf8f)i-tX~YYLmvDeP5N11GW@5EE zNEiWhaIN_#?TB)vV0H4Zf|I1bDl6RC^%Px)mJm~U1N7z@e}Op5>nq6>Ud{;co;NOHj0t;p4QgMkDLHL=<5v zkl@)Gm)^Hwe!J{q4E%$d5C%mJZTax6;!L_YeFF;;9TY9QDjq)nYXj`d44KkR>k z*(XRZ;m+@#nJKW0oWLLGPpXryWz16!E?c-<1(xk-2vd|f7~$rOv5 zcFQA71;FpRlT_?oyyr6?ggD3`@6*_8=kI*H!zvg1j*aj^06!qIf_on3kBPbI2_Dpa zUPS$+i`p|**w$PX=oiN@#SxSgInBYCBfmxo$l=w|7$!*7z^Xk6vYX4VxD4Ry{{XXv Bx5@wj literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/PinFunctionMap.class b/IOIOLib/bin/classes/ioio/lib/impl/PinFunctionMap.class new file mode 100644 index 0000000000000000000000000000000000000000..04464a0a8d85b42198860f8e35f5a8440f311c7f GIT binary patch literal 1828 zcmcgsO-~zF6g|&&Y-0wPlBA@A4TBAd?bJ3OO`2em6e6NnbpZv6M7xNF@yNVnn3)da zs8Toi0hPMyBI&A9{ykBlcq%{H8NZGHEVWd;Jn8>q!TI=lZTK<-?Yg+=NP1iK+ZNrzmj}DVdVZsdJIIrLX3{cWwPaX(NG|wueE^x`* zv&_ev9nW+9;9%J?Y`5KTybhIvTJpSaMlZL4kA z%YM7FZ#lv0x2EN>VJS=qjGe@72EKIKD;;UKEI$pMh$x$$K@NEqUl6!hZ2mjG&Qfxi zQE(Yo1d@j5Sx$=@MIuiHN6G7Hl*j_T1=TYcN1ht)Nk>35$ji;ZFdx$}MJ>$!qYoRFFTFj>H|($% zX?#jnpRU6@4(rw;kn59Xy%SKa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Ws3V%r1o@B@`c*;hIEsIW^V!AI? z%87a`?vBt$(r39VsC#MA(tvcDQdsG}q7+fm*Q`HEj(BirFV)_pwRrYqws1D{9_RTC zZep|{p4h~t9bicn<_zCw3F;ido>zd3dWZ%f4O5tA*k%e!1S4D>{|()*(3LV?zCk>- z=f!L6`GA?FEnNASVbbAesV7^wy2JHeRm2!`jbjiKD&K*6q=10qxX!{j<%}OeD5+Dv zfyvJ>T%<-Y=$W2po0!`vETPnw$!l&`0zF8elcyF2m9U?e=F?l4?pLMlYc49qqK3-T znSrLN>P%ii2l7mKm1A;ECGM*S3KI7-u~gPWXtyYZRE-?)4jhwvg^DJcHQrF{FffLH|yf-hyB0@O>XL)#-hUw;ch;Fiy1$6V`If5ltv&>%ILmKz#^^jgB zXQDvzimJ*hJaXc@J-~CSHaRR&*lK{&IMI-fG2bIK%31E$r70eZ$5>%*>G)nmJKFz7 QT+?ppu!Jp#+7O=n3*x$;7ytkO literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/QueueInputStream.class b/IOIOLib/bin/classes/ioio/lib/impl/QueueInputStream.class new file mode 100644 index 0000000000000000000000000000000000000000..104aa9f9f4332614ceee5856eab6e5588a59893a GIT binary patch literal 1786 zcmaJ>T~`}b6x}x;Oc;i*6iUCSp;bxJN?J;(nv_B+Rca{K)F7bNNixve4l{8w0r9~n z|Ac+2PrUS{E?Zi=mip|Q|HEJ4a*6v+BBU&qFEew`xo4kq_St8C|L5ml0F0xmAtZ2G zy3)=VKuBdr`GU`zGs>18X^Km?wcEChS%C00v%teyLScp3xU7k%T|0= zptC5~9Mf-jmcZGA{#?^wo6cG$zvWxmDMn}&+pSww;)!K~=cFV3DS>b@RT79?cdM3; zFnSGi!O+kzFuI?$;yRUv=UI-QnejYxD{s4%2hv#!y3x^xBPwiwILWzGsS^T64MfqQ zzK$8_gf7rqkdAe$v0k>kJ7(Et-SL83G3}D+Np)@+BmO;E7f2NTpEouXA%E4NfjI$v z_UnpO^Q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( z_lYV8)YYi)l@+P2q<+9sqEp>U(tfCJm{|~QWO5u3zkFZwAkCf{N@%KX`9zn}6hVF7 zKqzQV#=HFnIM<%)S|-@@Dy?Zw%C?zy;X z71b1-;M~QX-~1zy=l*X{e;4bXpmk&g2cK28RUUqXcZU5>&@sZZh83I;<+9Rk%`YCH zwE2aw3E4J0uUSSXZ^Esxy_Jht$-}y3yq^s$B5W5Ct}#NyKhphN+_|1s+wS5m5$Pq< z*a7<&+U7Jfnn}#cP#203lVjdMe}zUzKa^7H&Qva429RBcl;5wVUfLg1yj%V zzIe7sFkOV8jaP5OVS5}xisT4_=Is#_)&fRx2VdYzjt}t|-*UW;U+^>SiXmvZ1s}gh z87;_P(sqK{fqEP#6(`&C$c|2k>DPq7%B z71KLAOS0nAD1U`bZb+BinE3-muh7N?`{>MTibUdEd`4eW`Ndptn%ycJ=AvxN8Jhl1 z(;bAZn$|+wFPTPYJ4B+WB-bLbw`?tB`Mp<2Y(x;-oF(=iD(FT=XCJ^7S!AHC*hTq{ z5<~vDadZ$rU_Z7vAK?U9oaBEfQ>Y@ATY1YpylVrJ6nTnXX?o2P|Am5w5y~LckU>MD zHTa)TiRYrYRv$m$ZP-&-z^b>xF7MnfBj;;hM{<&)2kfqpEwX~PAfX=IV4|A^1yp7V pDC53Ektm=P5&<1$9JZx5Wxny|%%3vzXUy>V|H%9a>nOslzW^K#p{f7? literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl$OutgoingPacket.class b/IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl$OutgoingPacket.class new file mode 100644 index 0000000000000000000000000000000000000000..f36f0706aba8313591d2fe7dcb7c846286f1bbeb GIT binary patch literal 818 zcmaJfgc5PjpMc4JIy!Z)Q*AV3-r2E+}71VNR80<9F(3kTRFtFUG3t=1bV@te3H zfsi=x1Nc#hS=SX9i5|Q&Z~WeT?f(4r{Re>iSdS18ddeu1X*JH&?w-y@d+LQKoU{W* zoz1zM8I{kr#N@qn5t@W_M|=>O7WpjO9Ph{pM?*qZ&$6M-e&6KI8m;B@Ks}QARNBq~ zAjJDtIXO}vzC9DqX4b;YX z$f+KwT)D@DweFG3^=(44Z>F*Z!l?vHSdP)anFJ}$5*l4kSRSfezMSulrF|vFS`ykr zGZA`QSmkjQZ2IO1w~s3L&xX0vXeOPXt}Hh2ZCp+eVUZU!GIKkT8>*~WoA8dm6hbn{ zb7}ip6oo7zbO_!0TK<18yrRQPzDZcA%WAa~U|?)UTHR2mGZt!Rj`94;cGM+`IJ^Cwt#;`g6%S$7jeK;0ez2nUsEv3s_-9xQNv% v!#&n}Uex=7OVQg;><0KFfBu&|s^kF=;8|C2m2I271zf}RaFG+;Ko|H8aLK$> literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl$SpiResult.class b/IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl$SpiResult.class new file mode 100644 index 0000000000000000000000000000000000000000..3c681673af9e1263d1254187725a8ec62656c44d GIT binary patch literal 1141 zcmaJ=+foxj5IvKGtceSWfQTR{5Fi93$i)i*L;_Z&3{XWV9^}EAY_?<}WK+8vFTdgk z=(84Jl@ES^zv4frXO^%OVDYds(=*+D`ke0l_2Aw^8*pL^B_*p5IXZ&%D11a9fL z2|bQ5I&`$6Qy`ok+fgrFI%0?mB#Kte+-Mw@O=nw{tENDE(KcjtM>>|Wo0kz)sKDrT z;OAPg;E19r5PL5zZ%fe^h_8Jx%(`dUHCMxZfyscflFdAO%;xP{jndMuXuDnzq+vjy z|GWW(8hhk4>YiB%d=%3m9Vx{$qM#Mk5gi(C#E?ct!7HH*e9IVTFvla1@kNnc|n{{DYCzU$PTcChWzA9bUq}225c2L!Y2_@09 z;a;S+fs?Px<-bK0hFCL;M3!>I|g- literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl.class b/IOIOLib/bin/classes/ioio/lib/impl/SpiMasterImpl.class new file mode 100644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4PaiE!{BPOJ}W zd+AIIxxSI+Y$TWE*n=wx|5LeaSV8`Sk@GTk6L2*@CkKi74o3VMG~ik+#C2FqH!r56 zEx3_9zkzvhGo{>0DLV=BZ9I9qf_RJTb{^uvJj8=}hzIi!59T2r%tJhwgLneJGVY*U zjrLghGM*vi{gnPBzQU5VnHJZ>H$rzp3<8<-touV=Y1k#>BH8r{JU)J|K2@%W_0?RQ ziiy=n1%3*vh% z$}35s3gwlLW_$zRJ7%({u7J%)#>v zqI6*nUf`)Ro~}{Qdlby9;v-b!Q>ptbQ6<1`?h;*|`ze;^99qJ&5`ds&liF<~^Bt9KXm|shg!}tw{-|}znFkZ?{=MCfK+;o0n zy3n02CYVPSc`n?8iDB=Q+0Akz4SRVX%kV(CdVthEC<#;rO-MBx_ z)uXJr#~8n(eES4bQth literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/TwiMasterImpl$OutgoingPacket.class b/IOIOLib/bin/classes/ioio/lib/impl/TwiMasterImpl$OutgoingPacket.class new file mode 100644 index 0000000000000000000000000000000000000000..5683aa92ac4e756f63df8ece29de4068ce5e0eb2 GIT binary patch literal 822 zcmaJfgc5Pjn$cH^2h4d0ZH00B~iFd%Lqq&BEhP-u}-^#BLh#H+Bywb6P*Bz_YY zBoGn@egHoTG3&SjBhka|%sjm}Gdr_Ce|`S}-~mDp4k1*T%A!P#BX#&biT38|xyX&w z1CF}8Gc(OpI(;D~@1*fiC$tX42N5MAokqLk136*TB}COM+etR>XQ|OylE`?W9?3M8 zy1NJn{#+{~N9v<|O`yRM@KhMVfb(jLuxwsi9;P^EHbb~u)L zPmB{uXb-cANcM$RHZH-sZH{o~xPt#onLG8S(%9D(#Rj&GP5=)}Jfu-J(-XO^ii(vN z-nEM%1cNk{x}S(Vm$`=f0#E8jp9 zeqomp6!t`kuUOk^+0ioY@L5Bf)hF3|$gxHI@b*`n3cumZ=Yn&dZeM-FZ_Zl-kVSCI`|`h_Ltl%eMu`79dzwYGA z2llGr2bNc)m!-F1`3)yf5f@1B8t;s}W7OW}*DJf0$=ifLZiim7;W4`OFeHXV>iDg+TxCwaD$Iku8CE z!L3?J2y|%B(2|0JE)A`?DWD9GY{@UTG^l8nZ?`q1a6_Q2WY?^<#(u@}%0|Vp7+rEr z!`U)CTl%M$aYaC$^qtS9SmXG-Mm?~q5k_`Cq+wWg9+w1?&@rZBRG=rSc2#f< zkC3D2eqaO^XEk`K*~N+3RZ24^O7pZLo3KhEC1Xnra#?eOq3+|Js!lwyw{%qVZo{+qG zrsbZ|q~%W1j}h03HlAsEW%>$jmp*!gcKtg#b>#>dee4L`UqkdAo*iM{31-YOb`qVK zLJ#jVjAktEqL)^_^|4kA4{(p1qy-YR{m6#Z9KH+Q4Sj~HA7fBIMCK#XH0_5N`G)+b zzrUq(j47IDUkFto31rwBFimfU?M<`z9Fxw6B(#&1rzEC{Yl5OEovbxOCx%&q!88g# T%;RN3F3bX!7P=XzqX7H^PVW?i literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/impl/TwiMasterImpl.class b/IOIOLib/bin/classes/ioio/lib/impl/TwiMasterImpl.class new file mode 100644 index 0000000000000000000000000000000000000000..74ec6439a77408bbc7aa00f4ebd855698c6d3e01 GIT binary patch literal 4684 zcmb7H`F|AU8UIeQ+1cF;S0La*zyJ}F4Ix6IEm?{sG04^&ki^h{f|K1zGGw!}%+3-5 z9$0#zwbojxqSjh1v8`>TB>}{Wg`W04?Ol8P75$;<_kCwGdr zlg+!cM%IWb2=_4=FjJ#O zLIN8?4Q>>2YZa8&H}nUgV3meSXe#Oy)EC2geRx7xjWt5fS_PX*?YsW590{VX;sy=# zFkhI^s9^!B6wITk1~DHr>^^-k$D-#wZhH!X?VYY%QtE!la*+}RuvRJFAuszR>KEC zb_7gjr0!TYQ?0(CfVZ*Se6$iDM5~JJ^er!9c2z?gZl$i2al}!uXjVc}PYpMB4<4j> zQ58EB+*BN>BG2>u4`C-hq=M|7FI5$Y(QvzP%Ac|v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lvPMp+hO9Sh7Wf&@HQeHSxmD&OTHI+dCy^e_B7B_ zqI2={ND{NSrD0Cs$j&mTm(nqhT-;Eqx5+YXnk(b|i*2~g`|W@wv4mv}cLes|w;o#T zcf*{m)uxWSSYd@1WjHN^z$%jFfpmX15_K%MXt4X)i^TLXRyBMg&}F#=-?IxwIkX)k z>lJl;3c43mJ(J$8x%;M{)8SzCdM6qtw}aCv|6tlG#pTeFcf26#opl`rWK^owRnhau z#C;tP;4rk2l%mWmrK60RaCLa8Wur$che@<@ zEO2e3PB#uw=P*wRp5DMw?tY==7OqBSU<*B&ztFp!>AJRslbh({>Gbjz(wi8_987HD zZ06V|1$#Cz^qeY9c!$5o2@JSMBSUm}p65&G!@KCmFa~iM7x;Ri>Vi_2c%n1D4->Jw#PggXWC3a;{3!OTWM0Fs#(7#QfOVDu$|WTbzU;Tes*ortU?Yu=I= z!+7K^iHXRYz+}zxPxO?ahhAEqdVvqPob4H?VCFY;&ZHL3RM-jRChJRD;23KK0LInJ_S zD|J@&*s8!oJc?}@v8@)`8Tg$>tL4=iIasYzZmB6h#*Tr z6@#M{eEyO`wX|$@&;7_qcU7>K+je}#g5nnn&mzQM;~TCio;41WZ(G|~_}}4&*0%ou DxL`?+ literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/util/AbstractIOIOActivity$IOIOThread.class b/IOIOLib/bin/classes/ioio/lib/util/AbstractIOIOActivity$IOIOThread.class new file mode 100644 index 0000000000000000000000000000000000000000..837784eeaf1997567eee648ff23fd5ac9738ae71 GIT binary patch literal 3701 zcmb7GZEzIz8UOt+mu&7_6he{)un=g3*e@tSs4YyTlUkiZ$F~VEgO1Z_opw6?&>6>(Ow!-8d)d3g zORHb@*?r#MpM8DiH>Uxt#}73`6xP~~?IhE7e=_gc>Ezb_oaY***S)iQ=T_6R58B>n zi+t=JaxG&(LsVhm0pp;NOdFZOWPnwu7A+4cEKY^$jI5m$!A^x5qu+5olGVKmans3U zEYq_Fh^WqGEt9a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/IOIOConnectionDiscovery.class b/IOIOLib/bin/classes/ioio/lib/util/IOIOConnectionDiscovery.class new file mode 100644 index 0000000000000000000000000000000000000000..1cc95f68f12cddeda46cfa075d2ce14b27a1ef72 GIT binary patch literal 410 zcmbV|!D_-l5QhIzYfP%G^d|J!g1vO1r-IT;iVzTT2<>S`0A6q#phtMrPCH@rM%0xyB1w}pcGjxA($2nXpSztZzXJ>i z)2-Y|VWcfYy4kXVFe+4)eW~0NX7hDBZ`Z`mn7B7pYE*0V9v~IaR%g965 zV8dR#wTvipb(yP`HVnD%%Kq86bY# Y6^7gg-1RWx2-_;cHRp&YV~!hyN4o-d=l}o! literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/classes/ioio/lib/util/SocketIOIOConnectionDiscovery.class b/IOIOLib/bin/classes/ioio/lib/util/SocketIOIOConnectionDiscovery.class new file mode 100644 index 0000000000000000000000000000000000000000..884afb9217186139be3f61ad93b9e36e714279e4 GIT binary patch literal 1186 zcmbtUU2oD*7=8{g3SH+0GIV}ShoEJ+)vpT^mfc`XNXSU6VwhK@oZy+IC8f;lXL%#h zMH6rRQO5Tawo%jV#*3cQ^Y(q8=lyt2fB*UZ6TmaPP>^7#2~T*2BYMUp5RPGb_9q@R z+s$^vb6su+!gF7VvF#mm|3pEGVeQB|whYH|2S&ShL>>y#43#L%B>)WRJ>iOApCPGN zI}E9Y*XJsdSk|B*!?4;CEV*bfVjf9D(FR-|HdBXQ*TWDz#G-y7}T)+)VvIvYR}`W;d7nHN|~% ziU;5DFoE}yBuStkh!m|F1+S1CG?a-#5*BA*b3%f}W9$&|Zs;wul@^(K0#E3az*G7c NfpAC&RO54G{{lr&H$(sc literal 0 HcmV?d00001 diff --git a/IOIOLib/bin/ioiolib.jar b/IOIOLib/bin/ioiolib.jar new file mode 100644 index 0000000000000000000000000000000000000000..d5c0f7be3bd88a7361a561f737fabc7819153b01 GIT binary patch literal 97498 zcmbrlbx_=Ew?h@SH-5nZt3mV*lySux)yE{Px!#U@@G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ZC zlc$agvWoajvQ<|BRKEaXq6cs@Z&o0*6dIlA%dQFgB|3i10oncn+0fcvqp+fovs(7T zEna#xhXBHjgK!Ec`xW`KAx;jF?2+vVplJ z%#aW%HRRW`z^-TE9(^7fV5Vm1C(vfH4dcw7bRIP+_s`ALUHf2fKBk#oM*N3-kRGd8 zYj}~Uka#s@v2R*Qj7I*4EI5@!P59>kUMPurSaG9ELgC=AXMtT3r^v49d!P-ZL(7sw zlrau>D3+DY?4OxcpHrXYyl{A4v^@0uFkYc26Snc}c-WFeiKAamqE$=2h>3JGGp6U@XNBqf1&-k3bK~G z>eFeoAB!vYU0?p0#5c{*?a9NqkM8RC^i1RVdJz5Cque`I-(+4oGza^^Itr0a4Pv0E zyTGg5#5l=ZarlxZB1do-H*AXY3CRvyy#I5X_RR8pHajfV`vzzRb86~<3d;B7r@%c46NY{%uSM5O0PB@{7V znw5z483(&WklqH-LxVJIoS^0Wu^TZla=|QXnh#1=nUU_^nBVB8lA#i3I*b28Rxr}r z1iD^IE#nBrwgS>E0on>9t5|VAHWq%_3doD!Xe&sq-c6&C4o1Y=tP zd6phM;b<~p#i6e@u?mJf2Z&x7Q_T@1wrBsQoy2F&0QspO-5AE~ekB8J10X*(>rK^F zc-y;`m5N?r|5yW0NRAjfe;gWM)d2a07F{W=f`{$C)` literal 0 HcmV?d00001 diff --git a/IOIOLib/build.xml b/IOIOLib/build.xml new file mode 100644 index 0000000..4fc1ec4 --- /dev/null +++ b/IOIOLib/build.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IOIOLib/doc/allclasses-frame.html b/IOIOLib/doc/allclasses-frame.html new file mode 100644 index 0000000..0a58d5a --- /dev/null +++ b/IOIOLib/doc/allclasses-frame.html @@ -0,0 +1,97 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
AbstractIOIOActivity +
+AnalogInput +
+Closeable +
+ConnectionLostException +
+DigitalInput +
+DigitalInput.Spec +
+DigitalInput.Spec.Mode +
+DigitalOutput +
+DigitalOutput.Spec +
+DigitalOutput.Spec.Mode +
+IcspMaster +
+IncompatibilityException +
+IOIO +
+IOIO.VersionType +
+IOIOConnection +
+IOIOConnectionDiscovery +
+IOIOConnectionDiscovery.IOIOConnectionSpec +
+IOIOFactory +
+OutOfResourceException +
+PulseInput +
+PulseInput.ClockRate +
+PulseInput.PulseMode +
+PwmOutput +
+SocketIOIOConnectionDiscovery +
+SpiMaster +
+SpiMaster.Config +
+SpiMaster.Rate +
+SpiMaster.Result +
+TwiMaster +
+TwiMaster.Rate +
+TwiMaster.Result +
+Uart +
+Uart.Parity +
+Uart.StopBits +
+
+ + + diff --git a/IOIOLib/doc/allclasses-noframe.html b/IOIOLib/doc/allclasses-noframe.html new file mode 100644 index 0000000..40b2aaa --- /dev/null +++ b/IOIOLib/doc/allclasses-noframe.html @@ -0,0 +1,97 @@ + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
AbstractIOIOActivity +
+AnalogInput +
+Closeable +
+ConnectionLostException +
+DigitalInput +
+DigitalInput.Spec +
+DigitalInput.Spec.Mode +
+DigitalOutput +
+DigitalOutput.Spec +
+DigitalOutput.Spec.Mode +
+IcspMaster +
+IncompatibilityException +
+IOIO +
+IOIO.VersionType +
+IOIOConnection +
+IOIOConnectionDiscovery +
+IOIOConnectionDiscovery.IOIOConnectionSpec +
+IOIOFactory +
+OutOfResourceException +
+PulseInput +
+PulseInput.ClockRate +
+PulseInput.PulseMode +
+PwmOutput +
+SocketIOIOConnectionDiscovery +
+SpiMaster +
+SpiMaster.Config +
+SpiMaster.Rate +
+SpiMaster.Result +
+TwiMaster +
+TwiMaster.Rate +
+TwiMaster.Result +
+Uart +
+Uart.Parity +
+Uart.StopBits +
+
+ + + diff --git a/IOIOLib/doc/constant-values.html b/IOIOLib/doc/constant-values.html new file mode 100644 index 0000000..0550057 --- /dev/null +++ b/IOIOLib/doc/constant-values.html @@ -0,0 +1,198 @@ + + + + + + +Constant Field Values + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + + + + + + +
+ioio.lib.*
+ +

+ + + + + + + + + + + + + + + + + +
ioio.lib.api.IOIO
+public static final intINVALID_PIN-1
+public static final intLED_PIN0
+ +

+ +

+ + + + + + + + + + + + +
ioio.lib.api.IOIOFactory
+public static final intIOIO_PORT4545
+ +

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/deprecated-list.html b/IOIOLib/doc/deprecated-list.html new file mode 100644 index 0000000..fdfdaa9 --- /dev/null +++ b/IOIOLib/doc/deprecated-list.html @@ -0,0 +1,146 @@ + + + + + + +Deprecated List + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Deprecated API

+
+
+Contents
    +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/help-doc.html b/IOIOLib/doc/help-doc.html new file mode 100644 index 0000000..12529cb --- /dev/null +++ b/IOIOLib/doc/help-doc.html @@ -0,0 +1,223 @@ + + + + + + +API Help + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Overview

+
+ +

+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+

+Package

+
+ +

+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

    +
  • Interfaces (italic)
  • Classes
  • Enums
  • Exceptions
  • Errors
  • Annotation Types
+
+

+Class/Interface

+
+ +

+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description +

    +

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary +

    +

  • Field Detail
  • Constructor Detail
  • Method Detail
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+ +

+Annotation Type

+
+ +

+Each annotation type has its own separate page with the following sections:

    +
  • Annotation Type declaration
  • Annotation Type description
  • Required Element Summary
  • Optional Element Summary
  • Element Detail
+
+ +

+Enum

+
+ +

+Each enum has its own separate page with the following sections:

    +
  • Enum declaration
  • Enum description
  • Enum Constant Summary
  • Enum Constant Detail
+
+

+Use

+
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+

+Tree (Class Hierarchy)

+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
    +
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+

+Deprecated API

+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+

+Index

+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+

+Serialized Form

+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. +

+

+Constant Field Values

+The Constant Field Values page lists the static final fields and their values. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/index-files/index-1.html b/IOIOLib/doc/index-files/index-1.html new file mode 100644 index 0000000..6ba87cc --- /dev/null +++ b/IOIOLib/doc/index-files/index-1.html @@ -0,0 +1,148 @@ + + + + + + +A-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+A

+
+
AbstractIOIOActivity - Class in ioio.lib.util
A convenience class for easy creation of IOIO-based applications.
AbstractIOIOActivity() - +Constructor for class ioio.lib.util.AbstractIOIOActivity +
  +
AnalogInput - Interface in ioio.lib.api
A pin used for analog input.
args - +Variable in class ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-10.html b/IOIOLib/doc/index-files/index-10.html new file mode 100644 index 0000000..8b3de9a --- /dev/null +++ b/IOIOLib/doc/index-files/index-10.html @@ -0,0 +1,212 @@ + + + + + + +O-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+O

+
+
openAnalogInput(int) - +Method in interface ioio.lib.api.IOIO +
Open a pin for analog input. +
openDigitalInput(DigitalInput.Spec) - +Method in interface ioio.lib.api.IOIO +
Open a pin for digital input. +
openDigitalInput(int) - +Method in interface ioio.lib.api.IOIO +
Shorthand for openDigitalInput(new DigitalInput.Spec(pin)). +
openDigitalInput(int, DigitalInput.Spec.Mode) - +Method in interface ioio.lib.api.IOIO +
Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)). +
openDigitalOutput(DigitalOutput.Spec, boolean) - +Method in interface ioio.lib.api.IOIO +
Open a pin for digital output. +
openDigitalOutput(int, DigitalOutput.Spec.Mode, boolean) - +Method in interface ioio.lib.api.IOIO +
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode), + startValue). +
openDigitalOutput(int, boolean) - +Method in interface ioio.lib.api.IOIO +
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), startValue). +
openDigitalOutput(int) - +Method in interface ioio.lib.api.IOIO +
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), false). +
openIcspMaster() - +Method in interface ioio.lib.api.IOIO +
Open an ICSP channel, enabling Flash programming of an external PIC MCU, + and in particular, another IOIO board. +
openPulseInput(DigitalInput.Spec, PulseInput.ClockRate, PulseInput.PulseMode, boolean) - +Method in interface ioio.lib.api.IOIO +
Open a pin for pulse input. +
openPulseInput(int, PulseInput.PulseMode) - +Method in interface ioio.lib.api.IOIO +
Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode, + true), i.e. +
openPwmOutput(DigitalOutput.Spec, int) - +Method in interface ioio.lib.api.IOIO +
Open a pin for PWM (Pulse-Width Modulation) output. +
openPwmOutput(int, int) - +Method in interface ioio.lib.api.IOIO +
Shorthand for openPwmOutput(new DigitalOutput.Spec(pin), freqHz). +
openSpiMaster(DigitalInput.Spec, DigitalOutput.Spec, DigitalOutput.Spec, DigitalOutput.Spec[], SpiMaster.Config) - +Method in interface ioio.lib.api.IOIO +
Open a SPI master module, enabling communication with multiple + SPI-enabled slave modules. +
openSpiMaster(int, int, int, int[], SpiMaster.Rate) - +Method in interface ioio.lib.api.IOIO +
Shorthand for {@link #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. +
openSpiMaster(int, int, int, int, SpiMaster.Rate) - +Method in interface ioio.lib.api.IOIO +
Shorthand for {@link #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. +
openTwiMaster(int, TwiMaster.Rate, boolean) - +Method in interface ioio.lib.api.IOIO +
Open a TWI (Two-Wire Interface, such as I2C/SMBus) master module, + enabling communication with multiple TWI-enabled slave modules. +
openUart(DigitalInput.Spec, DigitalOutput.Spec, int, Uart.Parity, Uart.StopBits) - +Method in interface ioio.lib.api.IOIO +
Open a UART module, enabling a bulk transfer of byte buffers. +
openUart(int, int, int, Uart.Parity, Uart.StopBits) - +Method in interface ioio.lib.api.IOIO +
Shorthand for + #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + , where the input pins use their default specs. +
OutOfResourceException - Exception in ioio.lib.api.exception
The IOIO board does not have anymore of the requested resource.
OutOfResourceException(String) - +Constructor for exception ioio.lib.api.exception.OutOfResourceException +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-11.html b/IOIOLib/doc/index-files/index-11.html new file mode 100644 index 0000000..1949977 --- /dev/null +++ b/IOIOLib/doc/index-files/index-11.html @@ -0,0 +1,148 @@ + + + + + + +P-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+P

+
+
pin - +Variable in class ioio.lib.api.DigitalInput.Spec +
The pin number, as labeled on the board. +
pin - +Variable in class ioio.lib.api.DigitalOutput.Spec +
The pin number, as labeled on the board. +
PulseInput - Interface in ioio.lib.api
An interface for pulse width and frequency measurements of digital signals.
PulseInput.ClockRate - Enum in ioio.lib.api
Suported clock rate enum.
PulseInput.PulseMode - Enum in ioio.lib.api
An enumeration for describing the module's operating mode.
PwmOutput - Interface in ioio.lib.api
A pin used for PWM (Pulse-Width Modulation) output.
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-12.html b/IOIOLib/doc/index-files/index-12.html new file mode 100644 index 0000000..46c8198 --- /dev/null +++ b/IOIOLib/doc/index-files/index-12.html @@ -0,0 +1,154 @@ + + + + + + +R-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+R

+
+
rate - +Variable in class ioio.lib.api.SpiMaster.Config +
Data rate. +
read() - +Method in interface ioio.lib.api.AnalogInput +
Gets the analog input reading, as a scaled real value between 0 and 1. +
read() - +Method in interface ioio.lib.api.DigitalInput +
Read the value sensed on the pin. +
readVisi() - +Method in interface ioio.lib.api.IcspMaster +
Request a read of the VISI register on the slave MCU. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-13.html b/IOIOLib/doc/index-files/index-13.html new file mode 100644 index 0000000..6215dce --- /dev/null +++ b/IOIOLib/doc/index-files/index-13.html @@ -0,0 +1,173 @@ + + + + + + +S-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+S

+
+
sampleOnTrailing - +Variable in class ioio.lib.api.SpiMaster.Config +
Whether to do the input and output sampling on the trailing clock + edge. +
scaling - +Variable in enum ioio.lib.api.PulseInput.PulseMode +
The scaling factor as an integer. +
setDutyCycle(float) - +Method in interface ioio.lib.api.PwmOutput +
Sets the duty cycle of the PWM output. +
setPulseWidth(int) - +Method in interface ioio.lib.api.PwmOutput +
Sets the pulse width of the PWM output. +
setPulseWidth(float) - +Method in interface ioio.lib.api.PwmOutput +
The same as PwmOutput.setPulseWidth(int), but with sub-microsecond + precision. +
SocketIOIOConnectionDiscovery - Class in ioio.lib.util
 
SocketIOIOConnectionDiscovery() - +Constructor for class ioio.lib.util.SocketIOIOConnectionDiscovery +
  +
softReset() - +Method in interface ioio.lib.api.IOIO +
Resets the entire state (returning to initial state), without dropping + the connection. +
SpiMaster - Interface in ioio.lib.api
An interface for controlling an SPI module, in SPI bus-master mode, enabling + communication with multiple SPI-enabled slave modules.
SpiMaster.Config - Class in ioio.lib.api
SPI configuration structure.
SpiMaster.Config(SpiMaster.Rate, boolean, boolean) - +Constructor for class ioio.lib.api.SpiMaster.Config +
Constructor. +
SpiMaster.Config(SpiMaster.Rate) - +Constructor for class ioio.lib.api.SpiMaster.Config +
Constructor with common defaults. +
SpiMaster.Rate - Enum in ioio.lib.api
Possible data rates for SPI, in Hz.
SpiMaster.Result - Interface in ioio.lib.api
An object that can be waited on for asynchronous calls.
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-14.html b/IOIOLib/doc/index-files/index-14.html new file mode 100644 index 0000000..b43df85 --- /dev/null +++ b/IOIOLib/doc/index-files/index-14.html @@ -0,0 +1,143 @@ + + + + + + +T-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+T

+
+
TwiMaster - Interface in ioio.lib.api
An interface for controlling a TWI module, in TWI bus-master mode, enabling + communication with multiple TWI-enabled slave modules.
TwiMaster.Rate - Enum in ioio.lib.api
 
TwiMaster.Result - Interface in ioio.lib.api
An object that can be waited on for asynchronous calls.
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-15.html b/IOIOLib/doc/index-files/index-15.html new file mode 100644 index 0000000..cd553fe --- /dev/null +++ b/IOIOLib/doc/index-files/index-15.html @@ -0,0 +1,142 @@ + + + + + + +U-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+U

+
+
Uart - Interface in ioio.lib.api
An interface for controlling a UART module.
Uart.Parity - Enum in ioio.lib.api
Parity-bit mode.
Uart.StopBits - Enum in ioio.lib.api
Number of stop-bits.
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-16.html b/IOIOLib/doc/index-files/index-16.html new file mode 100644 index 0000000..db5fab8 --- /dev/null +++ b/IOIOLib/doc/index-files/index-16.html @@ -0,0 +1,205 @@ + + + + + + +V-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+V

+
+
valueOf(String) - +Static method in enum ioio.lib.api.DigitalInput.Spec.Mode +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.DigitalOutput.Spec.Mode +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.IOIO.VersionType +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.PulseInput.ClockRate +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.PulseInput.PulseMode +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.SpiMaster.Rate +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.TwiMaster.Rate +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.Uart.Parity +
Returns the enum constant of this type with the specified name. +
valueOf(String) - +Static method in enum ioio.lib.api.Uart.StopBits +
Returns the enum constant of this type with the specified name. +
values() - +Static method in enum ioio.lib.api.DigitalInput.Spec.Mode +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.DigitalOutput.Spec.Mode +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.IOIO.VersionType +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.PulseInput.ClockRate +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.PulseInput.PulseMode +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.SpiMaster.Rate +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.TwiMaster.Rate +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.Uart.Parity +
Returns an array containing the constants of this enum type, in +the order they are declared. +
values() - +Static method in enum ioio.lib.api.Uart.StopBits +
Returns an array containing the constants of this enum type, in +the order they are declared. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-17.html b/IOIOLib/doc/index-files/index-17.html new file mode 100644 index 0000000..151f190 --- /dev/null +++ b/IOIOLib/doc/index-files/index-17.html @@ -0,0 +1,193 @@ + + + + + + +W-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+W

+
+
waitForConnect() - +Method in interface ioio.lib.api.IOIO +
Establishes connection with the IOIO board. +
waitForConnect() - +Method in interface ioio.lib.api.IOIOConnection +
  +
waitForDisconnect() - +Method in interface ioio.lib.api.IOIO +
Blocks until IOIO has been disconnected and all connection-related + resources have been freed, so that a new connection can be attempted. +
waitForValue(boolean) - +Method in interface ioio.lib.api.DigitalInput +
Block until a desired logical level is sensed. +
waitPulseGetDuration() - +Method in interface ioio.lib.api.PulseInput +
Reads a single measurement from the queue. +
waitReady() - +Method in interface ioio.lib.api.SpiMaster.Result +
Wait until the asynchronous call which returned this instance is + complete. +
waitReady() - +Method in interface ioio.lib.api.TwiMaster.Result +
Wait until the asynchronous call which returned this instance is + complete. +
waitVisiResult() - +Method in interface ioio.lib.api.IcspMaster +
Wait and return a result of a call to IcspMaster.readVisi(). +
write(boolean) - +Method in interface ioio.lib.api.DigitalOutput +
Set the output of the pin. +
writeRead(int, byte[], int, int, byte[], int) - +Method in interface ioio.lib.api.SpiMaster +
Perform a single SPI transaction which includes optional transmission and + optional reception of data to a single slave. +
writeRead(byte[], int, int, byte[], int) - +Method in interface ioio.lib.api.SpiMaster +
Shorthand for SpiMaster.writeRead(int, byte[], int, int, byte[], int) for + the single-slave case. +
writeRead(int, boolean, byte[], int, byte[], int) - +Method in interface ioio.lib.api.TwiMaster +
Perform a single TWI transaction which includes optional transmission and + optional reception of data to a single slave. +
writeReadAsync(int, byte[], int, int, byte[], int) - +Method in interface ioio.lib.api.SpiMaster +
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. +
writeReadAsync(int, boolean, byte[], int, byte[], int) - +Method in interface ioio.lib.api.TwiMaster +
Asynchronous version of + TwiMaster.writeRead(int, boolean, byte[], int, byte[], int). +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-2.html b/IOIOLib/doc/index-files/index-2.html new file mode 100644 index 0000000..390ad81 --- /dev/null +++ b/IOIOLib/doc/index-files/index-2.html @@ -0,0 +1,167 @@ + + + + + + +C-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+C

+
+
className - +Variable in class ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec +
  +
close() - +Method in interface ioio.lib.api.Closeable +
  +
Closeable - Interface in ioio.lib.api
 
ConnectionLostException - Exception in ioio.lib.api.exception
Thrown when the connection between Android and IOIO has been lost or + disconnected.
ConnectionLostException(Exception) - +Constructor for exception ioio.lib.api.exception.ConnectionLostException +
  +
ConnectionLostException() - +Constructor for exception ioio.lib.api.exception.ConnectionLostException +
  +
create() - +Static method in class ioio.lib.api.IOIOFactory +
Create a IOIO instance. +
create(String, Object...) - +Static method in class ioio.lib.api.IOIOFactory +
Create a IOIO instance with a user-provided underlying connection class. +
create(IOIOConnection) - +Static method in class ioio.lib.api.IOIOFactory +
  +
createConnectionDynamically(String, Object...) - +Static method in class ioio.lib.api.IOIOFactory +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-3.html b/IOIOLib/doc/index-files/index-3.html new file mode 100644 index 0000000..83e7d5b --- /dev/null +++ b/IOIOLib/doc/index-files/index-3.html @@ -0,0 +1,161 @@ + + + + + + +D-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+D

+
+
DigitalInput - Interface in ioio.lib.api
A pin used for digital input.
DigitalInput.Spec - Class in ioio.lib.api
A digital input pin specification, used when opening digital inputs.
DigitalInput.Spec(int, DigitalInput.Spec.Mode) - +Constructor for class ioio.lib.api.DigitalInput.Spec +
Constructor. +
DigitalInput.Spec(int) - +Constructor for class ioio.lib.api.DigitalInput.Spec +
Shorthand for Spec(pin, Mode.FLOATING). +
DigitalInput.Spec.Mode - Enum in ioio.lib.api
Input pin mode.
DigitalOutput - Interface in ioio.lib.api
A pin used for digital output.
DigitalOutput.Spec - Class in ioio.lib.api
A digital output pin specification, used when opening digital outputs.
DigitalOutput.Spec(int, DigitalOutput.Spec.Mode) - +Constructor for class ioio.lib.api.DigitalOutput.Spec +
Constructor. +
DigitalOutput.Spec(int) - +Constructor for class ioio.lib.api.DigitalOutput.Spec +
Shorthand for Spec(pin, Mode.NORMAL). +
DigitalOutput.Spec.Mode - Enum in ioio.lib.api
Output pin mode.
disconnect() - +Method in interface ioio.lib.api.IOIO +
Closes the connection to the board, or aborts a connection process + started with waitForConnect(). +
disconnect() - +Method in interface ioio.lib.api.IOIOConnection +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-4.html b/IOIOLib/doc/index-files/index-4.html new file mode 100644 index 0000000..3826e58 --- /dev/null +++ b/IOIOLib/doc/index-files/index-4.html @@ -0,0 +1,152 @@ + + + + + + +E-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+E

+
+
enterProgramming() - +Method in interface ioio.lib.api.IcspMaster +
Initiate a sequence that will put the slave device in programming mode. +
executeInstruction(int) - +Method in interface ioio.lib.api.IcspMaster +
Execute a single instruction on the slave MCU. +
exitProgramming() - +Method in interface ioio.lib.api.IcspMaster +
Initiate a sequence that will put the slave device out of programming + mode. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-5.html b/IOIOLib/doc/index-files/index-5.html new file mode 100644 index 0000000..4d778e9 --- /dev/null +++ b/IOIOLib/doc/index-files/index-5.html @@ -0,0 +1,176 @@ + + + + + + +G-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+G

+
+
getDuration() - +Method in interface ioio.lib.api.PulseInput +
Gets the pulse duration in case of pulse measurement mode, or the period + in case of frequency mode. +
getFrequency() - +Method in interface ioio.lib.api.PulseInput +
Gets the momentary frequency of the measured signal. +
getImplVersion(IOIO.VersionType) - +Method in interface ioio.lib.api.IOIO +
Query the implementation version of the system's components. +
getInputStream() - +Method in interface ioio.lib.api.IOIOConnection +
  +
getInputStream() - +Method in interface ioio.lib.api.Uart +
Gets the input stream. +
getOutputStream() - +Method in interface ioio.lib.api.IOIOConnection +
  +
getOutputStream() - +Method in interface ioio.lib.api.Uart +
Gets the output stream. +
getReference() - +Method in interface ioio.lib.api.AnalogInput +
Gets the maximum value against which AnalogInput.read() values are scaled. +
getSpecs(Collection<IOIOConnectionDiscovery.IOIOConnectionSpec>) - +Method in interface ioio.lib.util.IOIOConnectionDiscovery +
  +
getSpecs(Collection<IOIOConnectionDiscovery.IOIOConnectionSpec>) - +Method in class ioio.lib.util.SocketIOIOConnectionDiscovery +
  +
getVoltage() - +Method in interface ioio.lib.api.AnalogInput +
Gets the analog input reading, as an absolute voltage in Volt units. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-6.html b/IOIOLib/doc/index-files/index-6.html new file mode 100644 index 0000000..f4a9dd3 --- /dev/null +++ b/IOIOLib/doc/index-files/index-6.html @@ -0,0 +1,148 @@ + + + + + + +H-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+H

+
+
hardReset() - +Method in interface ioio.lib.api.IOIO +
Equivalent to disconnecting and reconnecting the board power supply. +
hertz - +Variable in enum ioio.lib.api.PulseInput.ClockRate +
The value in Hertz units. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-7.html b/IOIOLib/doc/index-files/index-7.html new file mode 100644 index 0000000..6fcb8af --- /dev/null +++ b/IOIOLib/doc/index-files/index-7.html @@ -0,0 +1,162 @@ + + + + + + +I-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+I

+
+
IcspMaster - Interface in ioio.lib.api
An interface for controlling an ICSP channel, enabling Flash programming of + an external PIC MCU, and in particular, another IOIO board.
IncompatibilityException - Exception in ioio.lib.api.exception
Thrown when an incompatibility of system components is detected, such as when + an unsupported board hardware or software version is encountered.
IncompatibilityException(String) - +Constructor for exception ioio.lib.api.exception.IncompatibilityException +
  +
INVALID_PIN - +Static variable in interface ioio.lib.api.IOIO +
An invalid pin number. +
invertClk - +Variable in class ioio.lib.api.SpiMaster.Config +
Whether to invert clock polarity. +
IOIO - Interface in ioio.lib.api
This interface provides control over all the IOIO board functions.
ioio.lib.api - package ioio.lib.api
 
ioio.lib.api.exception - package ioio.lib.api.exception
 
ioio.lib.util - package ioio.lib.util
 
IOIO.VersionType - Enum in ioio.lib.api
A versioned component in the system.
IOIO_PORT - +Static variable in class ioio.lib.api.IOIOFactory +
The TCP port used for communicating with the IOIO board. +
IOIOConnection - Interface in ioio.lib.api
 
IOIOConnectionDiscovery - Interface in ioio.lib.util
 
IOIOConnectionDiscovery.IOIOConnectionSpec - Class in ioio.lib.util
 
IOIOConnectionDiscovery.IOIOConnectionSpec(String, Object[]) - +Constructor for class ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec +
  +
IOIOFactory - Class in ioio.lib.api
Factory class for creating instances of the IOIO interface.
IOIOFactory() - +Constructor for class ioio.lib.api.IOIOFactory +
  +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-8.html b/IOIOLib/doc/index-files/index-8.html new file mode 100644 index 0000000..192e9c3 --- /dev/null +++ b/IOIOLib/doc/index-files/index-8.html @@ -0,0 +1,145 @@ + + + + + + +L-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+L

+
+
LED_PIN - +Static variable in interface ioio.lib.api.IOIO +
The pin number used to designate the on-board 'stat' LED. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index-files/index-9.html b/IOIOLib/doc/index-files/index-9.html new file mode 100644 index 0000000..fa0fdd1 --- /dev/null +++ b/IOIOLib/doc/index-files/index-9.html @@ -0,0 +1,148 @@ + + + + + + +M-Index + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+

+M

+
+
mode - +Variable in class ioio.lib.api.DigitalInput.Spec +
The pin mode. +
mode - +Variable in class ioio.lib.api.DigitalOutput.Spec +
The pin mode. +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +A C D E G H I L M O P R S T U V W
+ + + diff --git a/IOIOLib/doc/index.html b/IOIOLib/doc/index.html new file mode 100644 index 0000000..faba50a --- /dev/null +++ b/IOIOLib/doc/index.html @@ -0,0 +1,39 @@ + + + + + + +Generated Documentation (Untitled) + + + + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="overview-summary.html">Non-frame version.</A> + + + diff --git a/IOIOLib/doc/ioio/lib/api/AnalogInput.html b/IOIOLib/doc/ioio/lib/api/AnalogInput.html new file mode 100644 index 0000000..d862adf --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/AnalogInput.html @@ -0,0 +1,328 @@ + + + + + + +AnalogInput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface AnalogInput

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface AnalogInput
extends Closeable
+ + +

+A pin used for analog input. +

+ An analog input pin can be used to measure voltage. AnalogInput instances are + obtained by calling IOIO.openAnalogInput(int). +

+ Floating-point values scaled from 0 to 1 can be obtained by calling + read(). Absolute voltage levels can be obtained by calling + getVoltage(). +

+ The instance is alive since its creation. The first read() call + block for a few milliseconds until the initial value is updated. If the + connection with the IOIO drops at any point, the instance transitions to a + disconnected state, in which every attempt to use the pin (except + Closeable.close()) will throw a ConnectionLostException. Whenever + Closeable.close() is invoked the instance may no longer be used. Any resources + associated with it are freed and can be reused. +

+ Typical usage: + +

+ AnalogInput potentiometer = ioio.openAnalogInput(40);
+ float value = potentiometer.read();
+ ...
+ potentiometer.close();  // pin 40 can now be used for something else.
+ 
+

+ +

+

+
See Also:
IOIO.openAnalogInput(int)
+
+ +

+ + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ floatgetReference() + +
+          Gets the maximum value against which read() values are scaled.
+ floatgetVoltage() + +
+          Gets the analog input reading, as an absolute voltage in Volt units.
+ floatread() + +
+          Gets the analog input reading, as a scaled real value between 0 and 1.
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+getVoltage

+
+float getVoltage()
+                 throws java.lang.InterruptedException,
+                        ConnectionLostException
+
+
Gets the analog input reading, as an absolute voltage in Volt units. +

+ It typically takes a few milliseconds between when the instance is + created and until the first value can be read. In this case, the method + may block shortly. If this is a problem, the calling thread can be + interrupted. +

+ If a scaled value is desired, consider using read(). +

+

+
+
+
+ +
Returns:
The voltage, in Volt units. +
Throws: +
java.lang.InterruptedException - The calling thread has been interrupted. +
ConnectionLostException - The connection with the IOIO is lost.
See Also:
read()
+
+
+
+ +

+getReference

+
+float getReference()
+
+
Gets the maximum value against which read() values are scaled. +

+

+
+
+
+ +
Returns:
The voltage, in Volts.
+
+
+
+ +

+read

+
+float read()
+           throws java.lang.InterruptedException,
+                  ConnectionLostException
+
+
Gets the analog input reading, as a scaled real value between 0 and 1. +

+ It typically takes a few milliseconds between when the instance is + created and until the first value can be read. In this case, the method + may block shortly. If this is a problem, the calling thread can be + interrupted. +

+ If an absolute value is desired, consider using getVoltage(). +

+

+
+
+
+ +
Returns:
The voltage, in scaled units. +
Throws: +
java.lang.InterruptedException - The calling thread has been interrupted. +
ConnectionLostException - The connection with the IOIO is lost.
See Also:
getVoltage()
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/Closeable.html b/IOIOLib/doc/ioio/lib/api/Closeable.html new file mode 100644 index 0000000..ecd6bda --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/Closeable.html @@ -0,0 +1,209 @@ + + + + + + +Closeable + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface Closeable

+
+
All Known Subinterfaces:
AnalogInput, DigitalInput, DigitalOutput, IcspMaster, PulseInput, PwmOutput, SpiMaster, TwiMaster, Uart
+
+
+
+
public interface Closeable
+ + +

+


+ +

+ + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+           
+  +

+ + + + + + + + +
+Method Detail
+ +

+close

+
+void close()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.Mode.html b/IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.Mode.html new file mode 100644 index 0000000..1ea3682 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.Mode.html @@ -0,0 +1,360 @@ + + + + + + +DigitalInput.Spec.Mode + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum DigitalInput.Spec.Mode

+
+java.lang.Object
+  extended by java.lang.Enum<DigitalInput.Spec.Mode>
+      extended by ioio.lib.api.DigitalInput.Spec.Mode
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DigitalInput.Spec.Mode>
+
+
+
Enclosing class:
DigitalInput.Spec
+
+
+
+
public static enum DigitalInput.Spec.Mode
extends java.lang.Enum<DigitalInput.Spec.Mode>
+ + +

+Input pin mode. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Enum Constant Summary
FLOATING + +
+          Pin is floating.
PULL_DOWN + +
+          Internal pull-down resistor is used.
PULL_UP + +
+          Internal pull-up resistor is used.
+  + + + + + + + + + + + + + + + +
+Method Summary
+static DigitalInput.Spec.ModevalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static DigitalInput.Spec.Mode[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+FLOATING

+
+public static final DigitalInput.Spec.Mode FLOATING
+
+
Pin is floating. When the pin is left disconnected the value + sensed is undefined. Use this mode when an external pull-up or + pull-down resistor is used or when interfacing push-pull type + logic circuits. +

+

+
+
+
+ +

+PULL_UP

+
+public static final DigitalInput.Spec.Mode PULL_UP
+
+
Internal pull-up resistor is used. When the pin is left + disconnected, a logical "HIGH" (true) will be sensed. This is + useful for interfacing with open drain circuits or for + interacting with a switch connected between the pin and ground. +

+

+
+
+
+ +

+PULL_DOWN

+
+public static final DigitalInput.Spec.Mode PULL_DOWN
+
+
Internal pull-down resistor is used. When the pin is left + disconnected, a logical "LOW" (false) will be sensed. This is + useful for interacting with a switch connected between the pin + and Vdd. +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static DigitalInput.Spec.Mode[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (DigitalInput.Spec.Mode c : DigitalInput.Spec.Mode.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static DigitalInput.Spec.Mode valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.html b/IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.html new file mode 100644 index 0000000..a174a4d --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/DigitalInput.Spec.html @@ -0,0 +1,328 @@ + + + + + + +DigitalInput.Spec + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Class DigitalInput.Spec

+
+java.lang.Object
+  extended by ioio.lib.api.DigitalInput.Spec
+
+
+
Enclosing interface:
DigitalInput
+
+
+
+
public static class DigitalInput.Spec
extends java.lang.Object
+ + +

+A digital input pin specification, used when opening digital inputs. +

+ +

+


+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classDigitalInput.Spec.Mode + +
+          Input pin mode.
+ + + + + + + + + + + + + + +
+Field Summary
+ DigitalInput.Spec.Modemode + +
+          The pin mode.
+ intpin + +
+          The pin number, as labeled on the board.
+  + + + + + + + + + + + + + +
+Constructor Summary
DigitalInput.Spec(int pin) + +
+          Shorthand for Spec(pin, Mode.FLOATING).
DigitalInput.Spec(int pin, + DigitalInput.Spec.Mode mode) + +
+          Constructor.
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+pin

+
+public int pin
+
+
The pin number, as labeled on the board. +

+

+
+
+
+ +

+mode

+
+public DigitalInput.Spec.Mode mode
+
+
The pin mode. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DigitalInput.Spec

+
+public DigitalInput.Spec(int pin,
+                         DigitalInput.Spec.Mode mode)
+
+
Constructor. +

+

+
Parameters:
pin - Pin number, as labeled on the board.
mode - Pin mode.
+
+
+ +

+DigitalInput.Spec

+
+public DigitalInput.Spec(int pin)
+
+
Shorthand for Spec(pin, Mode.FLOATING). +

+

+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/DigitalInput.html b/IOIOLib/doc/ioio/lib/api/DigitalInput.html new file mode 100644 index 0000000..5a35e4a --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/DigitalInput.html @@ -0,0 +1,306 @@ + + + + + + +DigitalInput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface DigitalInput

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface DigitalInput
extends Closeable
+ + +

+A pin used for digital input. +

+ A digital input pin can be used to read logic-level signals. DigitalInput + instances are obtained by calling IOIO#openDigitalInput(Spec). +

+ The value of the pin is obtained by calling read(). It is also + possible for the client to block until a certain level is sensed, by using + waitForValue(boolean). +

+ The instance is alive since its creation. The first read() call + block for a few milliseconds until the initial value is updated. If the + connection with the IOIO drops at any point, the instance transitions to a + disconnected state, in which every attempt to use the pin (except + Closeable.close()) will throw a ConnectionLostException. Whenever + Closeable.close() is invoked the instance may no longer be used. Any resources + associated with it are freed and can be reused. +

+ Typical usage: + +

+ DigitalInput button = ioio.openDigitalInput(10);  // used an external pull-up
+ button.waitForValue(false);  // wait for press
+ ...
+ button.close();  // pin 10 can now be used for something else.
+ 
+

+ +

+


+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classDigitalInput.Spec + +
+          A digital input pin specification, used when opening digital inputs.
+  + + + + + + + + + + + + + + + +
+Method Summary
+ booleanread() + +
+          Read the value sensed on the pin.
+ voidwaitForValue(boolean value) + +
+          Block until a desired logical level is sensed.
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+read

+
+boolean read()
+             throws java.lang.InterruptedException,
+                    ConnectionLostException
+
+
Read the value sensed on the pin. May block for a few milliseconds if + called right after creation of the instance. If this is a problem, the + calling thread may be interrupted. +

+

+
+
+
+ +
Returns:
True for logical "HIGH", false for logical "LOW". +
Throws: +
java.lang.InterruptedException - The calling thread has been interrupted. +
ConnectionLostException - The connection with the IOIO has been lost.
+
+
+
+ +

+waitForValue

+
+void waitForValue(boolean value)
+                  throws java.lang.InterruptedException,
+                         ConnectionLostException
+
+
Block until a desired logical level is sensed. The calling thread can be + interrupted for aborting this operation. +

+

+
+
+
+
Parameters:
value - The desired logical level. true for "HIGH", false for "LOW". +
Throws: +
java.lang.InterruptedException - The calling thread has been interrupted. +
ConnectionLostException - The connection with the IOIO has been lost.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.Mode.html b/IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.Mode.html new file mode 100644 index 0000000..35c7f40 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.Mode.html @@ -0,0 +1,341 @@ + + + + + + +DigitalOutput.Spec.Mode + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum DigitalOutput.Spec.Mode

+
+java.lang.Object
+  extended by java.lang.Enum<DigitalOutput.Spec.Mode>
+      extended by ioio.lib.api.DigitalOutput.Spec.Mode
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DigitalOutput.Spec.Mode>
+
+
+
Enclosing class:
DigitalOutput.Spec
+
+
+
+
public static enum DigitalOutput.Spec.Mode
extends java.lang.Enum<DigitalOutput.Spec.Mode>
+ + +

+Output pin mode. +

+ +

+


+ +

+ + + + + + + + + + + + + +
+Enum Constant Summary
NORMAL + +
+          Pin operates in push-pull mode, i.e.
OPEN_DRAIN + +
+          Pin operates in open-drain mode, i.e.
+  + + + + + + + + + + + + + + + +
+Method Summary
+static DigitalOutput.Spec.ModevalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static DigitalOutput.Spec.Mode[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+NORMAL

+
+public static final DigitalOutput.Spec.Mode NORMAL
+
+
Pin operates in push-pull mode, i.e. a logical "HIGH" is + represented by a voltage of Vdd on the pin and a logical "LOW" by + a voltage of 0 (ground). +

+

+
+
+
+ +

+OPEN_DRAIN

+
+public static final DigitalOutput.Spec.Mode OPEN_DRAIN
+
+
Pin operates in open-drain mode, i.e. a logical "HIGH" is + represented by a high impedance on the pin (as if it is + disconnected) and a logical "LOW" by a voltage of 0 (ground). + This mode is most commonly used for generating 5V logical signal + on a 3.3V pin: 5V tolerant pins must be used; a pull-up resistor + is connected between the pin and 5V, and the pin is used in open- + drain mode. +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static DigitalOutput.Spec.Mode[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (DigitalOutput.Spec.Mode c : DigitalOutput.Spec.Mode.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static DigitalOutput.Spec.Mode valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.html b/IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.html new file mode 100644 index 0000000..6abcd91 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/DigitalOutput.Spec.html @@ -0,0 +1,330 @@ + + + + + + +DigitalOutput.Spec + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Class DigitalOutput.Spec

+
+java.lang.Object
+  extended by ioio.lib.api.DigitalOutput.Spec
+
+
+
Enclosing interface:
DigitalOutput
+
+
+
+
public static class DigitalOutput.Spec
extends java.lang.Object
+ + +

+A digital output pin specification, used when opening digital outputs. +

+ +

+


+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classDigitalOutput.Spec.Mode + +
+          Output pin mode.
+ + + + + + + + + + + + + + +
+Field Summary
+ DigitalOutput.Spec.Modemode + +
+          The pin mode.
+ intpin + +
+          The pin number, as labeled on the board.
+  + + + + + + + + + + + + + +
+Constructor Summary
DigitalOutput.Spec(int pin) + +
+          Shorthand for Spec(pin, Mode.NORMAL).
DigitalOutput.Spec(int pin, + DigitalOutput.Spec.Mode mode) + +
+          Constructor.
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+pin

+
+public int pin
+
+
The pin number, as labeled on the board. +

+

+
+
+
+ +

+mode

+
+public DigitalOutput.Spec.Mode mode
+
+
The pin mode. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DigitalOutput.Spec

+
+public DigitalOutput.Spec(int pin,
+                          DigitalOutput.Spec.Mode mode)
+
+
Constructor. +

+

+
Parameters:
pin - Pin number, as labeled on the board.
mode - Pin mode.
+
+
+ +

+DigitalOutput.Spec

+
+public DigitalOutput.Spec(int pin)
+
+
Shorthand for Spec(pin, Mode.NORMAL). +

+

+
See Also:
#Spec(int, Mode)
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/DigitalOutput.html b/IOIOLib/doc/ioio/lib/api/DigitalOutput.html new file mode 100644 index 0000000..4d01b46 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/DigitalOutput.html @@ -0,0 +1,269 @@ + + + + + + +DigitalOutput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface DigitalOutput

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface DigitalOutput
extends Closeable
+ + +

+A pin used for digital output. +

+ A digital input pin can be used to generate logic-level signals. + DigitalOutput instances are obtained by calling + IOIO#openDigitalOutput(Spec, boolean). +

+ The value of the pin is set by calling write(boolean). +

+ The instance is alive since its creation. If the connection with the IOIO + drops at any point, the instance transitions to a disconnected state, in + which every attempt to use the pin (except Closeable.close()) will throw a + ConnectionLostException. Whenever Closeable.close() is invoked the + instance may no longer be used. Any resources associated with it are freed + and can be reused. +

+ Typical usage: + +

+ DigitalOutput led = ioio.openDigitalInput(2);  // LED anode on pin 2.
+ led.write(true);  // turn LED on.
+ ...
+ led.close();  // pin 2 can now be used for something else.
+ 
+

+ +

+


+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classDigitalOutput.Spec + +
+          A digital output pin specification, used when opening digital outputs.
+  + + + + + + + + + + + +
+Method Summary
+ voidwrite(boolean val) + +
+          Set the output of the pin.
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+write

+
+void write(boolean val)
+           throws ConnectionLostException
+
+
Set the output of the pin. +

+

+
+
+
+
Parameters:
val - The output. true is logical "HIGH", false is logical "LOW". +
Throws: +
ConnectionLostException - The connection with the IOIO has been lost.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/IOIO.VersionType.html b/IOIOLib/doc/ioio/lib/api/IOIO.VersionType.html new file mode 100644 index 0000000..5b747da --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/IOIO.VersionType.html @@ -0,0 +1,371 @@ + + + + + + +IOIO.VersionType + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum IOIO.VersionType

+
+java.lang.Object
+  extended by java.lang.Enum<IOIO.VersionType>
+      extended by ioio.lib.api.IOIO.VersionType
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IOIO.VersionType>
+
+
+
Enclosing interface:
IOIO
+
+
+
+
public static enum IOIO.VersionType
extends java.lang.Enum<IOIO.VersionType>
+ + +

+A versioned component in the system. +

+ +

+

+
See Also:
IOIO.getImplVersion(VersionType)
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Enum Constant Summary
APP_FIRMWARE_VER + +
+          Application layer firmware version.
BOOTLOADER_VER + +
+          Bootloader version.
HARDWARE_VER + +
+          Hardware version.
IOIOLIB_VER + +
+          IOIOLib version.
+  + + + + + + + + + + + + + + + +
+Method Summary
+static IOIO.VersionTypevalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static IOIO.VersionType[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+HARDWARE_VER

+
+public static final IOIO.VersionType HARDWARE_VER
+
+
Hardware version. +

+

+
+
+
+ +

+BOOTLOADER_VER

+
+public static final IOIO.VersionType BOOTLOADER_VER
+
+
Bootloader version. +

+

+
+
+
+ +

+APP_FIRMWARE_VER

+
+public static final IOIO.VersionType APP_FIRMWARE_VER
+
+
Application layer firmware version. +

+

+
+
+
+ +

+IOIOLIB_VER

+
+public static final IOIO.VersionType IOIOLIB_VER
+
+
IOIOLib version. +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static IOIO.VersionType[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (IOIO.VersionType c : IOIO.VersionType.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static IOIO.VersionType valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/IOIO.html b/IOIOLib/doc/ioio/lib/api/IOIO.html new file mode 100644 index 0000000..48d56a9 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/IOIO.html @@ -0,0 +1,1241 @@ + + + + + + +IOIO + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface IOIO

+
+
+
public interface IOIO
+ + +

+This interface provides control over all the IOIO board functions. +

+ An instance of this interface is typically obtained by using the + IOIOFactory class. Initially, a connection should be established, by + calling waitForConnect(). This method will block until the board is + connected an a connection has been established. +

+ During the connection process, this library verifies that the IOIO firmware + is compatible with the required version. If not, waitForConnect() + will throw a IncompatibilityException, putting the IOIO + instance in a "zombie" state: nothing could be done with it except calling + disconnect(), or waiting for the physical connection to drop via + waitForDisconnect(). +

+ As soon as a connection is established, the IOIO can be used, typically, by + calling the openXXX() functions to obtain additional interfaces for + controlling specific function of the board. +

+ Whenever a connection is lost as a result of physically disconnecting the + board or as a result of calling disconnect(), this instance and all + the interfaces obtained from it become invalid, and will throw a + ConnectionLostException on every operation. Once the connection is + lost, those instances cannot be recycled, but rather it is required to create + new ones and wait for a connection again. +

+ Initially all pins are tri-stated (floating), and all functions are disabled. + Whenever a connection is lost or dropped, the board will immediately return + to the this initial state. +

+ Typical usage: + +

+ IOIO ioio = IOIOFactory.create();
+ try {
+   ioio.waitForConnect();
+   DigitalOutput out = ioio.openDigitalOutput(10);
+   out.write(true);
+   ...
+ } catch (ConnectionLostException e) {
+ } catch (Exception e) {
+   ioio.disconnect();
+ } finally {
+   ioio.waitForDisconnect();
+ }
+ 
+

+ +

+

+
See Also:
IOIOFactory.create()
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classIOIO.VersionType + +
+          A versioned component in the system.
+ + + + + + + + + + + + + + +
+Field Summary
+static intINVALID_PIN + +
+          An invalid pin number.
+static intLED_PIN + +
+          The pin number used to designate the on-board 'stat' LED.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voiddisconnect() + +
+          Closes the connection to the board, or aborts a connection process + started with waitForConnect().
+ java.lang.StringgetImplVersion(IOIO.VersionType v) + +
+          Query the implementation version of the system's components.
+ voidhardReset() + +
+          Equivalent to disconnecting and reconnecting the board power supply.
+ AnalogInputopenAnalogInput(int pin) + +
+          Open a pin for analog input.
+ DigitalInputopenDigitalInput(DigitalInput.Spec spec) + +
+          Open a pin for digital input.
+ DigitalInputopenDigitalInput(int pin) + +
+          Shorthand for openDigitalInput(new DigitalInput.Spec(pin)).
+ DigitalInputopenDigitalInput(int pin, + DigitalInput.Spec.Mode mode) + +
+          Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)).
+ DigitalOutputopenDigitalOutput(DigitalOutput.Spec spec, + boolean startValue) + +
+          Open a pin for digital output.
+ DigitalOutputopenDigitalOutput(int pin) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), false).
+ DigitalOutputopenDigitalOutput(int pin, + boolean startValue) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), startValue).
+ DigitalOutputopenDigitalOutput(int pin, + DigitalOutput.Spec.Mode mode, + boolean startValue) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode), + startValue).
+ IcspMasteropenIcspMaster() + +
+          Open an ICSP channel, enabling Flash programming of an external PIC MCU, + and in particular, another IOIO board.
+ PulseInputopenPulseInput(DigitalInput.Spec spec, + PulseInput.ClockRate rate, + PulseInput.PulseMode mode, + boolean doublePrecision) + +
+          Open a pin for pulse input.
+ PulseInputopenPulseInput(int pin, + PulseInput.PulseMode mode) + +
+          Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode, + true), i.e.
+ PwmOutputopenPwmOutput(DigitalOutput.Spec spec, + int freqHz) + +
+          Open a pin for PWM (Pulse-Width Modulation) output.
+ PwmOutputopenPwmOutput(int pin, + int freqHz) + +
+          Shorthand for openPwmOutput(new DigitalOutput.Spec(pin), freqHz).
+ SpiMasteropenSpiMaster(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.
+ SpiMasteropenSpiMaster(int miso, + int mosi, + int clk, + int[] slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+ SpiMasteropenSpiMaster(int miso, + int mosi, + int clk, + int slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+ TwiMasteropenTwiMaster(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.
+ UartopenUart(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.
+ UartopenUart(int rx, + int tx, + int baud, + Uart.Parity parity, + Uart.StopBits stopbits) + +
+          Shorthand for + #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + , where the input pins use their default specs.
+ voidsoftReset() + +
+          Resets the entire state (returning to initial state), without dropping + the connection.
+ voidwaitForConnect() + +
+          Establishes connection with the IOIO board.
+ voidwaitForDisconnect() + +
+          Blocks until IOIO has been disconnected and all connection-related + resources have been freed, so that a new connection can be attempted.
+  +

+ + + + + + + + +
+Field Detail
+ +

+INVALID_PIN

+
+static final int INVALID_PIN
+
+
An invalid pin number. +

+

+
See Also:
Constant Field Values
+
+
+ +

+LED_PIN

+
+static final int LED_PIN
+
+
The pin number used to designate the on-board 'stat' LED. +

+

+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Method Detail
+ +

+waitForConnect

+
+void waitForConnect()
+                    throws ConnectionLostException,
+                           IncompatibilityException
+
+
Establishes connection with the IOIO board. +

+ This method is blocking until connection is established. This method can + be aborted by calling disconnect(). In this case, it will throw + a ConnectionLostException. +

+

+ +
Throws: +
ConnectionLostException - An error occurred during connection or disconnect() has been + called during connection. The instance state is disconnected. +
IncompatibilityException - An incompatible board firmware of hardware has been detected. + The instance state is disconnected.
See Also:
disconnect(), +waitForDisconnect()
+
+
+
+ +

+disconnect

+
+void disconnect()
+
+
Closes the connection to the board, or aborts a connection process + started with waitForConnect(). +

+ Once this method is called, this IOIO instance and all the instances + obtain from it become invalid and will throw an exception on every + operation. +

+ This method is asynchronous, i.e. it returns immediately, but it is not + guaranteed that all connection-related resources has already been freed + and can be reused upon return. In cases when this is important, client + can call waitForDisconnect(), which will block until all + resources have been freed. +

+

+
+
+
+
+ +

+waitForDisconnect

+
+void waitForDisconnect()
+                       throws java.lang.InterruptedException
+
+
Blocks until IOIO has been disconnected and all connection-related + resources have been freed, so that a new connection can be attempted. +

+

+ +
Throws: +
java.lang.InterruptedException - When interrupt() has been called on this thread. This might + mean that an immediate attempt to create and connect a new + IOIO object might fail for resource contention.
See Also:
disconnect(), +waitForConnect()
+
+
+
+ +

+softReset

+
+void softReset()
+               throws ConnectionLostException
+
+
Resets the entire state (returning to initial state), without dropping + the connection. +

+ It is equivalent to calling Closeable.close() on every interface + obtained from this instance. A connection must have been established + prior to calling this method, by invoking waitForConnect(). +

+

+ +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
See Also:
hardReset()
+
+
+
+ +

+hardReset

+
+void hardReset()
+               throws ConnectionLostException
+
+
Equivalent to disconnecting and reconnecting the board power supply. +

+ The connection will be dropped and not reestablished. Full boot sequence + will take place, so firmware upgrades can be performed. A connection must + have been established prior to calling this method, by invoking + waitForConnect(). +

+

+ +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
See Also:
softReset()
+
+
+
+ +

+getImplVersion

+
+java.lang.String getImplVersion(IOIO.VersionType v)
+                                throws ConnectionLostException
+
+
Query the implementation version of the system's components. The + implementation version uniquely identifies a hardware revision or a + software build. Returned version IDs are always 8-character long, + according to the IOIO versioning system: first 4 characters are the + version authority and last 4 characters are the revision. +

+

+
Parameters:
v - The component whose version we query. +
Returns:
An 8-character implementation version ID. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
+
+
+
+ +

+openDigitalInput

+
+DigitalInput openDigitalInput(DigitalInput.Spec spec)
+                              throws ConnectionLostException
+
+
Open a pin for digital input. +

+ A digital input pin can be used to read logic-level signals. The pin will + operate in this mode until close() is invoked on the returned interface. + It is illegal to open a pin that has already been opened and has not been + closed. A connection must have been established prior to calling this + method, by invoking waitForConnect(). +

+

+
Parameters:
spec - Pin specification, consisting of the pin number, as labeled on + the board, and the mode, which determines whether the pin will + be floating, pull-up or pull-down. See + DigitalInput.Spec.Mode for more information. +
Returns:
Interface of the assigned pin. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
See Also:
DigitalInput
+
+
+
+ +

+openDigitalInput

+
+DigitalInput openDigitalInput(int pin)
+                              throws ConnectionLostException
+
+
Shorthand for openDigitalInput(new DigitalInput.Spec(pin)). +

+

+ +
Throws: +
ConnectionLostException
See Also:
openDigitalInput(ioio.lib.api.DigitalInput.Spec)
+
+
+
+ +

+openDigitalInput

+
+DigitalInput openDigitalInput(int pin,
+                              DigitalInput.Spec.Mode mode)
+                              throws ConnectionLostException
+
+
Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)). +

+

+ +
Throws: +
ConnectionLostException
See Also:
openDigitalInput(ioio.lib.api.DigitalInput.Spec)
+
+
+
+ +

+openDigitalOutput

+
+DigitalOutput openDigitalOutput(DigitalOutput.Spec spec,
+                                boolean startValue)
+                                throws ConnectionLostException
+
+
Open a pin for digital output. +

+ A digital output pin can be used to generate logic-level signals. The pin + will operate in this mode until close() is invoked on the returned + interface. It is illegal to open a pin that has already been opened and + has not been closed. A connection must have been established prior to + calling this method, by invoking waitForConnect(). +

+

+
Parameters:
spec - Pin specification, consisting of the pin number, as labeled on + the board, and the mode, which determines whether the pin will + be normal or open-drain. See DigitalOutput.Spec.Mode + for more information.
startValue - The initial logic level this pin will generate as soon at it + is open. +
Returns:
Interface of the assigned pin. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
See Also:
DigitalOutput
+
+
+
+ +

+openDigitalOutput

+
+DigitalOutput openDigitalOutput(int pin,
+                                DigitalOutput.Spec.Mode mode,
+                                boolean startValue)
+                                throws ConnectionLostException
+
+
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode), + startValue). +

+

+ +
Throws: +
ConnectionLostException
See Also:
openDigitalOutput(ioio.lib.api.DigitalOutput.Spec, boolean)
+
+
+
+ +

+openDigitalOutput

+
+DigitalOutput openDigitalOutput(int pin,
+                                boolean startValue)
+                                throws ConnectionLostException
+
+
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), startValue). + Pin mode will be "normal" (as opposed to "open-drain". +

+

+ +
Throws: +
ConnectionLostException
See Also:
openDigitalOutput(ioio.lib.api.DigitalOutput.Spec, boolean)
+
+
+
+ +

+openDigitalOutput

+
+DigitalOutput openDigitalOutput(int pin)
+                                throws ConnectionLostException
+
+
Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), false). Pin + mode will be "normal" (as opposed to "open-drain". +

+

+ +
Throws: +
ConnectionLostException
See Also:
openDigitalOutput(ioio.lib.api.DigitalOutput.Spec, boolean)
+
+
+
+ +

+openAnalogInput

+
+AnalogInput openAnalogInput(int pin)
+                            throws ConnectionLostException
+
+
Open a pin for analog input. +

+ An analog input pin can be used to measure voltage. Note that not every + pin can be used as an analog input. See board documentation for the legal + pins and permitted voltage range. +

+ The pin will operate in this mode until close() is invoked on the + returned interface. It is illegal to open a pin that has already been + opened and has not been closed. A connection must have been established + prior to calling this method, by invoking waitForConnect(). +

+

+
Parameters:
pin - Pin number, as labeled on the board. +
Returns:
Interface of the assigned pin. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
See Also:
AnalogInput
+
+
+
+ +

+openPwmOutput

+
+PwmOutput openPwmOutput(DigitalOutput.Spec spec,
+                        int freqHz)
+                        throws ConnectionLostException
+
+
Open a pin for PWM (Pulse-Width Modulation) output. +

+ A PWM pin produces a logic-level PWM signal. These signals are typically + used for simulating analog outputs for controlling the intensity of LEDs, + the rotation speed of motors, etc. They are also frequently used for + controlling hobby servo motors. +

+ Note that not every pin can be used as PWM output. In addition, the total + number of concurrent PWM modules in use is limited. See board + documentation for the legal pins and limit on concurrent usage. +

+ The pin will operate in this mode until close() is invoked on the + returned interface. It is illegal to open a pin that has already been + opened and has not been closed. A connection must have been established + prior to calling this method, by invoking waitForConnect(). +

+

+
Parameters:
spec - Pin specification, consisting of the pin number, as labeled on + the board, and the mode, which determines whether the pin will + be normal or open-drain. See DigitalOutput.Spec.Mode + for more information.
freqHz - PWM frequency, in Hertz. +
Returns:
Interface of the assigned pin. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method. +
OutOfResourceException - This is a runtime exception, so it is not necessary to catch + it if the client guarantees that the total number of + concurrent PWM resources is not exceeded.
See Also:
PwmOutput
+
+
+
+ +

+openPwmOutput

+
+PwmOutput openPwmOutput(int pin,
+                        int freqHz)
+                        throws ConnectionLostException
+
+
Shorthand for openPwmOutput(new DigitalOutput.Spec(pin), freqHz). +

+

+ +
Throws: +
ConnectionLostException
See Also:
openPwmOutput(ioio.lib.api.DigitalOutput.Spec, int)
+
+
+
+ +

+openPulseInput

+
+PulseInput openPulseInput(DigitalInput.Spec spec,
+                          PulseInput.ClockRate rate,
+                          PulseInput.PulseMode mode,
+                          boolean doublePrecision)
+                          throws ConnectionLostException
+
+
Open a pin for pulse input. +

+ The pulse input module is quite flexible. It enables several kinds of + timing measurements on a digital signal: pulse width measurement + (positive or negative pulse), and frequency of a periodic signal. +

+ Note that not every pin can be used as pulse input. In addition, the + total number of concurrent pulse input modules in use is limited. See + board documentation for the legal pins and limit on concurrent usage. +

+ The pin will operate in this mode until close() is invoked on the + returned interface. It is illegal to open a pin that has already been + opened and has not been closed. A connection must have been established + prior to calling this method, by invoking waitForConnect(). +

+

+
Parameters:
spec - Pin specification, consisting of the pin number, as labeled on + the board, and the mode, which determines whether the pin will + be floating, pull-up or pull-down. See + DigitalInput.Spec.Mode for more information.
rate - The clock rate to use for timing the signal. A faster clock + rate will result in better precision but will only be able to + measure narrow pulses / high frequencies.
mode - The mode in which to operate. Determines whether the module + will measure pulse durations or frequency.
doublePrecision - Whether to open a double-precision pulse input module. Double- + precision modules enable reading of much longer pulses and + lower frequencies with high accuracy than single precision + modules. However, their number is limited, so when possible, + and if the resources are all needed, use single-precision. For + more details on the exact spec of single- vs. double- + precision, see PulseInput. +
Returns:
An instance of the PulseInput, which can be used to + obtain the data. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method. +
OutOfResourceException - This is a runtime exception, so it is not necessary to catch + it if the client guarantees that the total number of + concurrent PWM resources is not exceeded.
See Also:
PulseInput
+
+
+
+ +

+openPulseInput

+
+PulseInput openPulseInput(int pin,
+                          PulseInput.PulseMode mode)
+                          throws ConnectionLostException
+
+
Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode, + true), i.e. opens a double-precision, 16MHz pulse input on the given pin + with the given mode. +

+

+ +
Throws: +
ConnectionLostException
See Also:
#openPulseInput(ioio.lib.api.DigitalInput.Spec, + ioio.lib.api.PulseInput.ClockRate, PulseMode, boolean)
+
+
+
+ +

+openUart

+
+Uart openUart(DigitalInput.Spec rx,
+              DigitalOutput.Spec tx,
+              int baud,
+              Uart.Parity parity,
+              Uart.StopBits stopbits)
+              throws ConnectionLostException
+
+
Open a UART module, enabling a bulk transfer of byte buffers. +

+ UART is a very common hardware communication protocol, enabling full- + duplex, asynchronous point-to-point data transfer. It typically serves + for opening consoles or as a basis for higher-level protocols, such as + MIDI RS-232, and RS-485. +

+ Note that not every pin can be used for UART RX or TX. In addition, the + total number of concurrent UART modules in use is limited. See board + documentation for the legal pins and limit on concurrent usage. +

+ The UART module will operate, and the pins will work in their respective + modes until close() is invoked on the returned interface. It is illegal + to use pins that have already been opened and has not been closed. A + connection must have been established prior to calling this method, by + invoking waitForConnect(). +

+

+
Parameters:
rx - Pin specification for the RX pin, consisting of the pin + number, as labeled on the board, and the mode, which + determines whether the pin will be floating, pull-up or + pull-down. See DigitalInput.Spec.Mode for more + information. null can be passed to designate that we do not + want RX input to this module.
tx - Pin specification for the TX pin, consisting of the pin + number, as labeled on the board, and the mode, which + determines whether the pin will be normal or open-drain. See + DigitalOutput.Spec.Mode for more information. null can + be passed to designate that we do not want TX output to this + module.
baud - The clock frequency of the UART module in Hz.
parity - The parity mode, as in Uart.Parity.
stopbits - Number of stop bits, as in Uart.StopBits. +
Returns:
Interface of the assigned module. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method. +
OutOfResourceException - This is a runtime exception, so it is not necessary to catch + it if the client guarantees that the total number of + concurrent UART resources is not exceeded.
See Also:
Uart
+
+
+
+ +

+openUart

+
+Uart openUart(int rx,
+              int tx,
+              int baud,
+              Uart.Parity parity,
+              Uart.StopBits stopbits)
+              throws ConnectionLostException
+
+
Shorthand for + #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + , where the input pins use their default specs. INVALID_PIN can + be used on either pin if a TX- or RX-only UART is needed. +

+

+ +
Throws: +
ConnectionLostException
See Also:
#openUart(ioio.lib.api.DigitalInput.Spec, + ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits)
+
+
+
+ +

+openSpiMaster

+
+SpiMaster openSpiMaster(DigitalInput.Spec miso,
+                        DigitalOutput.Spec mosi,
+                        DigitalOutput.Spec clk,
+                        DigitalOutput.Spec[] slaveSelect,
+                        SpiMaster.Config config)
+                        throws ConnectionLostException
+
+
Open a SPI master module, enabling communication with multiple + SPI-enabled slave modules. +

+ SPI is a common hardware communication protocol, enabling full-duplex, + synchronous point-to-multi-point data transfer. It requires MOSI, MISO + and CLK lines shared by all nodes, as well as a SS line per slave, + connected between this slave and a respective pin on the master. The MISO + line should operate in pull-up mode, using either the internal pull-up or + an external resistor. +

+ Note that not every pin can be used for SPI MISO, MOSI or CLK. In + addition, the total number of concurrent SPI modules in use is limited. + See board documentation for the legal pins and limit on concurrent usage. +

+ The SPI module will operate, and the pins will work in their respective + modes until close() is invoked on the returned interface. It is illegal + to use pins that have already been opened and has not been closed. A + connection must have been established prior to calling this method, by + invoking waitForConnect(). +

+

+
Parameters:
miso - Pin specification for the MISO (Master In Slave Out) pin, + consisting of the pin number, as labeled on the board, and the + mode, which determines whether the pin will be floating, + pull-up or pull-down. See DigitalInput.Spec.Mode for + more information.
mosi - Pin specification for the MOSI (Master Out Slave In) pin, + consisting of the pin number, as labeled on the board, and the + mode, which determines whether the pin will be normal or + open-drain. See DigitalOutput.Spec.Mode for more + information.
clk - Pin specification for the CLK pin, consisting of the pin + number, as labeled on the board, and the mode, which + determines whether the pin will be normal or open-drain. See + DigitalOutput.Spec.Mode for more information.
slaveSelect - An array of pin specifications for each of the slaves' SS + (Slave Select) pin. The index of this array designates the + slave index, used later to refer to this slave. The spec is + consisting of the pin number, as labeled on the board, and the + mode, which determines whether the pin will be normal or + open-drain. See DigitalOutput.Spec.Mode for more + information.
config - The configuration of the SPI module. See + SpiMaster.Config for details. +
Returns:
Interface of the assigned module. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method. +
OutOfResourceException - This is a runtime exception, so it is not necessary to catch + it if the client guarantees that the total number of + concurrent SPI resources is not exceeded.
See Also:
SpiMaster
+
+
+
+ +

+openSpiMaster

+
+SpiMaster openSpiMaster(int miso,
+                        int mosi,
+                        int clk,
+                        int[] slaveSelect,
+                        SpiMaster.Rate rate)
+                        throws ConnectionLostException
+
+
Shorthand for {@link #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. +

+

+ +
Throws: +
ConnectionLostException
See Also:
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)
+
+
+
+ +

+openSpiMaster

+
+SpiMaster openSpiMaster(int miso,
+                        int mosi,
+                        int clk,
+                        int slaveSelect,
+                        SpiMaster.Rate rate)
+                        throws ConnectionLostException
+
+
Shorthand for {@link #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. + In this version, a single slave is used. +

+

+ +
Throws: +
ConnectionLostException
See Also:
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)
+
+
+
+ +

+openTwiMaster

+
+TwiMaster openTwiMaster(int twiNum,
+                        TwiMaster.Rate rate,
+                        boolean smbus)
+                        throws ConnectionLostException
+
+
Open a TWI (Two-Wire Interface, such as I2C/SMBus) master module, + enabling communication with multiple TWI-enabled slave modules. +

+ TWI is a common hardware communication protocol, enabling half-duplex, + synchronous point-to-multi-point data transfer. It requires a physical + connection of two lines (SDA, SCL) shared by all the bus nodes, where the + SDA is open-drain and externally pulled-up. +

+ Note that there is a fixed number of TWI modules, and the pins they use + are static. Client has to make sure these pins are not already opened + before calling this method. See board documentation for the number of + modules and the respective pins they use. +

+ The TWI module will operate, and the pins will work in their respective + modes until close() is invoked on the returned interface. It is illegal + to use pins that have already been opened and has not been closed. A + connection must have been established prior to calling this method, by + invoking waitForConnect(). +

+

+
Parameters:
twiNum - The TWI module index to use. Will also determine the pins + used.
rate - The clock rate. Can be 100KHz / 400KHz / 1MHz.
smbus - When true, will use SMBus voltage levels. When false, I2C + voltage levels. +
Returns:
Interface of the assigned module. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
See Also:
TwiMaster
+
+
+
+ +

+openIcspMaster

+
+IcspMaster openIcspMaster()
+                          throws ConnectionLostException
+
+
Open an ICSP channel, enabling Flash programming of an external PIC MCU, + and in particular, another IOIO board. +

+ ICSP (In-Circuit Serial Programming) is a protocol intended for + programming of PIC MCUs. It is a serial protocol over three wires: PGC + (clock), PGD (data) and MCLR (reset), where PGC and MCLR are controlled + by the master and PGD is shared by the master and slave, depending on the + transaction state. +

+ Note that there is only one ICSP modules, and the pins it uses are + static. Client has to make sure that the ICSP module is not already in + use, as well as those dedicated pins. See board documentation for the + actual pins used for ICSP. +

+

+ +
Returns:
Interface of the ICSP module. +
Throws: +
ConnectionLostException - Connection was lost before or during the execution of this + method.
See Also:
IcspMaster
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/IOIOConnection.html b/IOIOLib/doc/ioio/lib/api/IOIOConnection.html new file mode 100644 index 0000000..aa22fa9 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/IOIOConnection.html @@ -0,0 +1,272 @@ + + + + + + +IOIOConnection + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface IOIOConnection

+
+
+
public interface IOIOConnection
+ + +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voiddisconnect() + +
+           
+ java.io.InputStreamgetInputStream() + +
+           
+ java.io.OutputStreamgetOutputStream() + +
+           
+ voidwaitForConnect() + +
+           
+  +

+ + + + + + + + +
+Method Detail
+ +

+waitForConnect

+
+void waitForConnect()
+                    throws ConnectionLostException
+
+
+ +
Throws: +
ConnectionLostException
+
+
+
+ +

+disconnect

+
+void disconnect()
+
+
+
+
+
+
+ +

+getInputStream

+
+java.io.InputStream getInputStream()
+                                   throws ConnectionLostException
+
+
+ +
Throws: +
ConnectionLostException
+
+
+
+ +

+getOutputStream

+
+java.io.OutputStream getOutputStream()
+                                     throws ConnectionLostException
+
+
+ +
Throws: +
ConnectionLostException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/IOIOFactory.html b/IOIOLib/doc/ioio/lib/api/IOIOFactory.html new file mode 100644 index 0000000..806ed9b --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/IOIOFactory.html @@ -0,0 +1,390 @@ + + + + + + +IOIOFactory + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Class IOIOFactory

+
+java.lang.Object
+  extended by ioio.lib.api.IOIOFactory
+
+
+
+
public class IOIOFactory
extends java.lang.Object
+ + +

+Factory class for creating instances of the IOIO interface. +

+ This class acts as the single entry-point to the IOIO API. It creates the + bootstrapping between a specific implementation of the IOIO interface and any + dependencies it might have, such as the underlying connection logic. +

+ Typical usage: + +

+ IOIO ioio = IOIOFactory.create();
+ try {
+   ioio.waitForConnect();
+   ...
+   ioio.disconnect();
+ } catch (ConnectionLostException e) {
+ } finally {
+   ioio.waitForDisconnect();
+ }
+ 
+

+ +

+


+ +

+ + + + + + + + + + + +
+Field Summary
+static intIOIO_PORT + +
+          The TCP port used for communicating with the IOIO board.
+  + + + + + + + + + + +
+Constructor Summary
IOIOFactory() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static IOIOcreate() + +
+          Create a IOIO instance.
+static IOIOcreate(IOIOConnection connection) + +
+           
+static IOIOcreate(java.lang.String connectionClassName, + java.lang.Object... args) + +
+          Create a IOIO instance with a user-provided underlying connection class.
+static IOIOConnectioncreateConnectionDynamically(java.lang.String connectionClassName, + java.lang.Object... args) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+IOIO_PORT

+
+public static final int IOIO_PORT
+
+
The TCP port used for communicating with the IOIO board. +

+

+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+IOIOFactory

+
+public IOIOFactory()
+
+
+ + + + + + + + +
+Method Detail
+ +

+create

+
+public static IOIO create()
+
+
Create a IOIO instance. This specific implementation creates a IOIO + instance which works with the actual IOIO board connected via a TCP + connection (typically over a wired USB connection). +

+

+ +
Returns:
The IOIO instance.
+
+
+
+ +

+create

+
+public static IOIO create(java.lang.String connectionClassName,
+                          java.lang.Object... args)
+                   throws java.lang.ClassNotFoundException
+
+
Create a IOIO instance with a user-provided underlying connection class. + This method should be used for establishing a non-standard connection to + the IOIO board. +

+

+
Parameters:
connectionClassName - The name of the connection class. Must have a public default + constructor. +
Returns:
The IOIO instance. +
Throws: +
java.lang.ClassNotFoundException - The given class name was not found.
+
+
+
+ +

+create

+
+public static IOIO create(IOIOConnection connection)
+
+
+
+
+
+
+ +

+createConnectionDynamically

+
+public static IOIOConnection createConnectionDynamically(java.lang.String connectionClassName,
+                                                         java.lang.Object... args)
+                                                  throws java.lang.ClassNotFoundException
+
+
+ +
Throws: +
java.lang.ClassNotFoundException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/IcspMaster.html b/IOIOLib/doc/ioio/lib/api/IcspMaster.html new file mode 100644 index 0000000..ae05bcc --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/IcspMaster.html @@ -0,0 +1,403 @@ + + + + + + +IcspMaster + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface IcspMaster

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface IcspMaster
extends Closeable
+ + +

+An interface for controlling an ICSP channel, enabling Flash programming of + an external PIC MCU, and in particular, another IOIO board. +

+ ICSP (In-Circuit Serial Programming) is a protocol intended for programming + of PIC MCUs. It is a serial protocol over three wires: PGC (clock), PGD + (data) and MCLR (reset), where PGC and MCLR are controlled by the master and + PGD is shared by the master and slave, depending on the transaction state. + IcspMaster instances are obtained by calling IOIO.openIcspMaster(). +

+ This interface is very low level: it allows direct access to the atomic + operations of the ICSP protocol: +

+

+ The ICSP module uses fixed pins for its lines. See the user guide for details + for your specific board. ICSP is a special feature, introduced for the + purpose of programming a IOIO board with another IOIO board. It does not + necessarily play nicely when used concurrently with other features, in the + sense that it may introduce latencies in other modules. It is thus + recommended not to use ICSP in conjunction with latency-sensitive features. +

+ The instance is alive since its creation. If the connection with the IOIO + drops at any point, the instance transitions to a disconnected state, in + which every attempt to use it (except Closeable.close()) will throw a + ConnectionLostException. Whenever Closeable.close() is invoked the + instance may no longer be used. Any resources associated with it are freed + and can be reused. +

+ Typical usage: + +

+ IcspMaster icsp = ioio.openIcspMaster();
+ icsp.enterProgramming();
+ icsp.executeInstruction(0x212340);  // mov #0x1234, w0
+ icsp.executeInstruction(0x883C20);  // mov w0, 0x784 (VISI)
+ icsp.executeInstruction(0x000000);  // nop
+ icsp.readVisi();
+ int visi = icsp.waitVisiResult();   // should read 0x1234
+ icsp.exitProgramming();
+ icsp.close();                       // free ICSP module and pins
+ 
+

+ +

+

+
See Also:
IOIO.openIcspMaster()
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidenterProgramming() + +
+          Initiate a sequence that will put the slave device in programming mode.
+ voidexecuteInstruction(int instruction) + +
+          Execute a single instruction on the slave MCU.
+ voidexitProgramming() + +
+          Initiate a sequence that will put the slave device out of programming + mode.
+ voidreadVisi() + +
+          Request a read of the VISI register on the slave MCU.
+ intwaitVisiResult() + +
+          Wait and return a result of a call to readVisi().
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+enterProgramming

+
+void enterProgramming()
+                      throws ConnectionLostException
+
+
Initiate a sequence that will put the slave device in programming mode. + This sequence is necessary for executing instructions and reading + register values. +

+

+
+
+
+ +
Throws: +
ConnectionLostException - Connection to the IOIO has been lost.
+
+
+
+ +

+exitProgramming

+
+void exitProgramming()
+                     throws ConnectionLostException
+
+
Initiate a sequence that will put the slave device out of programming + mode. It will be held in reset. +

+

+
+
+
+ +
Throws: +
ConnectionLostException - Connection to the IOIO has been lost.
+
+
+
+ +

+executeInstruction

+
+void executeInstruction(int instruction)
+                        throws ConnectionLostException
+
+
Execute a single instruction on the slave MCU. +

+

+
+
+
+
Parameters:
instruction - a 24-bit PIC instruction. +
Throws: +
ConnectionLostException - Connection to the IOIO has been lost.
+
+
+
+ +

+readVisi

+
+void readVisi()
+              throws ConnectionLostException,
+                     java.lang.InterruptedException
+
+
Request a read of the VISI register on the slave MCU. This is an + asynchronous call, in which the 16-bit result is obtained by + waitVisiResult(). + This method may block if the read queue on the IOIO is full, but this + should be for short periods only. +

+

+
+
+
+ +
Throws: +
ConnectionLostException - Connection to the IOIO has been lost. +
java.lang.InterruptedException - Interrupted while blocking.
+
+
+
+ +

+waitVisiResult

+
+int waitVisiResult()
+                   throws ConnectionLostException,
+                          java.lang.InterruptedException
+
+
Wait and return a result of a call to 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. +

+

+
+
+
+ +
Returns:
The result - an unsigned 16-bit number. +
Throws: +
ConnectionLostException - Connection to the IOIO has been lost. +
java.lang.InterruptedException - Interrupted while blocking.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/PulseInput.ClockRate.html b/IOIOLib/doc/ioio/lib/api/PulseInput.ClockRate.html new file mode 100644 index 0000000..afb23c0 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/PulseInput.ClockRate.html @@ -0,0 +1,407 @@ + + + + + + +PulseInput.ClockRate + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum PulseInput.ClockRate

+
+java.lang.Object
+  extended by java.lang.Enum<PulseInput.ClockRate>
+      extended by ioio.lib.api.PulseInput.ClockRate
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PulseInput.ClockRate>
+
+
+
Enclosing interface:
PulseInput
+
+
+
+
public static enum PulseInput.ClockRate
extends java.lang.Enum<PulseInput.ClockRate>
+ + +

+Suported clock rate enum. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + +
+Enum Constant Summary
RATE_16MHz + +
+          16MHz
RATE_250KHz + +
+          250KHz
RATE_2MHz + +
+          2MHz
RATE_62KHz + +
+          62.5KHz
+ + + + + + + + + + +
+Field Summary
+ inthertz + +
+          The value in Hertz units.
+  + + + + + + + + + + + + + + + +
+Method Summary
+static PulseInput.ClockRatevalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static PulseInput.ClockRate[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+RATE_16MHz

+
+public static final PulseInput.ClockRate RATE_16MHz
+
+
16MHz +

+

+
+
+
+ +

+RATE_2MHz

+
+public static final PulseInput.ClockRate RATE_2MHz
+
+
2MHz +

+

+
+
+
+ +

+RATE_250KHz

+
+public static final PulseInput.ClockRate RATE_250KHz
+
+
250KHz +

+

+
+
+
+ +

+RATE_62KHz

+
+public static final PulseInput.ClockRate RATE_62KHz
+
+
62.5KHz +

+

+
+
+ + + + + + + + +
+Field Detail
+ +

+hertz

+
+public final int hertz
+
+
The value in Hertz units. +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static PulseInput.ClockRate[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (PulseInput.ClockRate c : PulseInput.ClockRate.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static PulseInput.ClockRate valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/PulseInput.PulseMode.html b/IOIOLib/doc/ioio/lib/api/PulseInput.PulseMode.html new file mode 100644 index 0000000..6bb6805 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/PulseInput.PulseMode.html @@ -0,0 +1,425 @@ + + + + + + +PulseInput.PulseMode + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum PulseInput.PulseMode

+
+java.lang.Object
+  extended by java.lang.Enum<PulseInput.PulseMode>
+      extended by ioio.lib.api.PulseInput.PulseMode
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PulseInput.PulseMode>
+
+
+
Enclosing interface:
PulseInput
+
+
+
+
public static enum PulseInput.PulseMode
extends java.lang.Enum<PulseInput.PulseMode>
+ + +

+An enumeration for describing the module's operating mode. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + +
+Enum Constant Summary
FREQ + +
+          Frequency measurement (rising-edge-to-rising-edge).
FREQ_SCALE_16 + +
+          Frequency measurement (rising-edge-to-rising-edge) with 16x scaling.
FREQ_SCALE_4 + +
+          Frequency measurement (rising-edge-to-rising-edge) with 4x scaling.
NEGATIVE + +
+          Negative pulse measurement (falling-edge-to-rising-edge).
POSITIVE + +
+          Positive pulse measurement (rising-edge-to-falling-edge).
+ + + + + + + + + + +
+Field Summary
+ intscaling + +
+          The scaling factor as an integer.
+  + + + + + + + + + + + + + + + +
+Method Summary
+static PulseInput.PulseModevalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static PulseInput.PulseMode[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+POSITIVE

+
+public static final PulseInput.PulseMode POSITIVE
+
+
Positive pulse measurement (rising-edge-to-falling-edge). +

+

+
+
+
+ +

+NEGATIVE

+
+public static final PulseInput.PulseMode NEGATIVE
+
+
Negative pulse measurement (falling-edge-to-rising-edge). +

+

+
+
+
+ +

+FREQ

+
+public static final PulseInput.PulseMode FREQ
+
+
Frequency measurement (rising-edge-to-rising-edge). +

+

+
+
+
+ +

+FREQ_SCALE_4

+
+public static final PulseInput.PulseMode FREQ_SCALE_4
+
+
Frequency measurement (rising-edge-to-rising-edge) with 4x scaling. +

+

+
+
+
+ +

+FREQ_SCALE_16

+
+public static final PulseInput.PulseMode FREQ_SCALE_16
+
+
Frequency measurement (rising-edge-to-rising-edge) with 16x scaling. +

+

+
+
+ + + + + + + + +
+Field Detail
+ +

+scaling

+
+public final int scaling
+
+
The scaling factor as an integer. +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static PulseInput.PulseMode[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (PulseInput.PulseMode c : PulseInput.PulseMode.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static PulseInput.PulseMode valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/PulseInput.html b/IOIOLib/doc/ioio/lib/api/PulseInput.html new file mode 100644 index 0000000..ad9575c --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/PulseInput.html @@ -0,0 +1,527 @@ + + + + + + +PulseInput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface PulseInput

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface PulseInput
extends Closeable
+ + +

+An interface for pulse width and frequency measurements of digital signals. +

+ PulseInput (commonly known as "input capture") is a versatile module which + enables extraction of various timing information from a digital signal. There + are two main use cases: pulse duration measurement and frequency measurement. + In pulse width measurement we measure the duration of a positive ("high") or + negative ("low") pulse, i.e. the elapsed time between a rise and a fall or + vice versa. This mode is useful, for example, for decoding a PWM signal or + measuring the delay of a sonar return signal. In frequency measurement we + measure the duration between a rising edge to the following rising edge. This + gives us a momentary reading of a signal's frequency or period. This is + commonly used, for example, in conjunction with an optical or magnetic sensor + for measuring a turning shaft's speed. +

+ PulseInput instances are obtained by calling + IOIO#openPulseInput(ioio.lib.api.DigitalInput.Spec, ClockRate, PulseMode, boolean) + . When created, some important configuration decisions have to be made: the + precision (single or double), the clock rate and the mode of operation. Modes + are straightforward: PulseInput.PulseMode.POSITIVE is used for measuring a + positive pulse, PulseInput.PulseMode.NEGATIVE a negative pulse, and + PulseInput.PulseMode.FREQ / PulseInput.PulseMode.FREQ_SCALE_4 / + PulseInput.PulseMode.FREQ_SCALE_16 are used for measuring frequency. The + difference between the three scaling modes is that without scaling, the + frequency is determined by measurement of a single + (rising-edge-to-rising-edge) period. In x4 scaling, 4 consecutive periods are + measured and the time is divided by 4, providing some smoothing as well as + better resolution. Similarly for x16 scaling. Note that scaling affects the + range of signals to be measured, as discussed below. +

+ The choice of single vs. double-precision is important to understand: IOIO + internally uses either 16-bit counters or 32-bit counters for the timing. 16- + counters force us to either limit the maximum duration (and the minimum + frequency) or compromise accuracy as compared to 32-bit counters. However, if + you need many concurrent pulse measurements in your application, you may have + no choice but to use single-precision. +

+ The clock rate selection is important (and even critical when working in + single-precision) and requires the user to make some assumptions about the + nature of the measured signal. The higher the clock rate, the more precise + the measurement, but the longest pulse that can be measured decreases (or + lowest frequency that can be measured increases). Using the scaling option + when operating in frequency mode also affects these sizes. combinations. It + is always recommended to choose the most precise mode, which exceeds the + maximum expected pulse width (or inverse frequency). If a pulse is received + whom duration exceeds the longest allowed pulse, it will be "folded" into the + valid range and product garbage readings. +

+ The following table (sorted by longest pulse) summarizes all possible clock / + mode combinations. The table applies for single-precision operation. + For double-precision, simply multiply the longest pulse by 65536 and divide + the lowest frequency by the same amount. Interestingly, the number written in + [ms] units in the longest pulse column, roughly corresponds to the same + number in minutes when working with double precsion, since 1[min] = + 60000[ms]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClockScalingResolutionLongest pulseLowest frequency
62.5KHz116us1.048s0.95Hz
250KHz14us262.1ms3.81Hz
62.5KHz44us262.1ms3.81Hz
250KHz41us65.54ms15.26Hz
62.5KHz161us65.54ms15.26Hz
2MHz1500ns32.77ms30.52Hz
250KHz16250us16.38ms61.0Hz
2MHz4125ns8.192ms122.1Hz
16MHz162.5ns4.096ms244.1Hz
2MHz1631.25ns2.048ms488.3Hz
16MHz415.6ns1.024ms976.6Hz
16MHz163.9ns256us3.906KHz
+ +

+ In some applications it is desirable to measure every incoming pulse rather + than repetitively query the result of the last measurement. For that purpose + the waitPulseGetDuration() method exists: every incoming pulse width + is pushed into a small internal queue from which it can be read. The client + waits for data to be available, then reads it and data that comes in in the + meanwhile is stored. The queue has limited size, so it is important to read + quickly if no pulses are to be lost. Note that once a pulse is detected, the + next one must have its leading edge at least 5ms after the leading edge of + the current one, or else it will be skipped. This throttling has been + introduced on purpose, in order to prevent saturation the communication + channel when the input signal is very high frequency. Effectively, this means + that the maximum sample rate is 200Hz. This rate has been chosen as it + enables measure R/C servo signals without missing pulses. + +

+ Typical usage (servo signal pulse width measurement): + +

+ // Open pulse input at 16MHz, double-precision
+ PulseInput in = ioio.openPulseInput(3, PulseMode.POSITIVE);
+ ...
+ float widthSec = in.getDuration();
+ OR:
+ float widthSec = in.waitPulseGetDuration();
+ ... 
+ in.close();  // pin 3 can now be used for something else.
+ 
+ 
+ +

+ Typical usage (frequency measurement): + +

+ // Signal is known to be slightly over 150Hz. Single precision can be used.
+ PulseInput in = ioio.openPulseInput(3,
+                                     ClockRate.RATE_2MHz,
+                                     PulseMode.FREQ_SCALE_4,
+                                     false);
+ ...
+ float freqHz = in.getFrequency();
+ ... 
+ in.close();  // pin 3 can now be used for something else.
+ 
+ 
+

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Nested Class Summary
+static classPulseInput.ClockRate + +
+          Suported clock rate enum.
+static classPulseInput.PulseMode + +
+          An enumeration for describing the module's operating mode.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ floatgetDuration() + +
+          Gets the pulse duration in case of pulse measurement mode, or the period + in case of frequency mode.
+ floatgetFrequency() + +
+          Gets the momentary frequency of the measured signal.
+ floatwaitPulseGetDuration() + +
+          Reads a single measurement from the queue.
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+getDuration

+
+float getDuration()
+                  throws java.lang.InterruptedException,
+                         ConnectionLostException
+
+
Gets the pulse duration in case of pulse measurement mode, or the period + in case of frequency mode. When scaling is used, this is compensated for + here, so the duration of a single cycle will be returned. +

+ The first call to this method may block shortly until the first data + update arrives. The client may interrupt the calling thread. +

+

+
+
+
+ +
Returns:
The duration, in seconds. +
Throws: +
java.lang.InterruptedException - The calling thread has been interrupted. +
ConnectionLostException - The connection with the IOIO has been lost.
+
+
+
+ +

+waitPulseGetDuration

+
+float waitPulseGetDuration()
+                           throws java.lang.InterruptedException,
+                                  ConnectionLostException
+
+
Reads a single measurement from the queue. If the queue is empty, will + block until more data arrives. The calling thread may be interrupted in + order to abort the call. See interface documentation for further + explanation regarding the read queue. +

+ This method may not be used if the interface has was opened in frequency + mode. +

+

+
+
+
+ +
Returns:
The duration, in seconds. +
Throws: +
java.lang.InterruptedException - The calling thread has been interrupted. +
ConnectionLostException - The connection with the IOIO has been lost.
+
+
+
+ +

+getFrequency

+
+float getFrequency()
+                   throws java.lang.InterruptedException,
+                          ConnectionLostException
+
+
Gets the momentary frequency of the measured signal. When scaling is + used, this is compensated for here, so the true frequency of the signal + will be returned. +

+ The first call to this method may block shortly until the first data + update arrives. The client may interrupt the calling thread. +

+

+
+
+
+ +
Returns:
The frequency, in Hz. +
Throws: +
java.lang.InterruptedException - The calling thread has been interrupted. +
ConnectionLostException - The connection with the IOIO has been lost.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/PwmOutput.html b/IOIOLib/doc/ioio/lib/api/PwmOutput.html new file mode 100644 index 0000000..f54b0cc --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/PwmOutput.html @@ -0,0 +1,347 @@ + + + + + + +PwmOutput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface PwmOutput

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface PwmOutput
extends Closeable
+ + +

+A pin used for PWM (Pulse-Width Modulation) output. +

+ A PWM pin produces a logic-level PWM signal. These signals are typically used + for simulating analog outputs for controlling the intensity of LEDs, the + rotation speed of motors, etc. They are also frequently used for controlling + hobby servo motors. PwmOutput instances are obtained by calling + IOIO.openPwmOutput(ioio.lib.api.DigitalOutput.Spec, int). +

+ When used for motors and LEDs, a frequency of several KHz is typically used, + where there is a trade-off between switching power-loses and smoothness of + operation. The pulse width is typically set by specifying the duty cycle, + with the setDutyCycle(float) method. A duty cycle of 0 is "off", a + duty cycle of 1 is "on", and every intermediate value produces an + intermediate intensity. Please note that any devices consuming more than 20mA + of current (e.g. motors) should not by directly connected the the IOIO pins, + but rather through an amplification circuit suited for the specific load. +

+ When used for hobby servos, the PWM signal is rather used for encoding of the + desired angle the motor should go to. By standard, a 100Hz signal is used and + the pulse width is varied between 1ms and 2ms (corresponding to both extremes + of the shaft angle), using setPulseWidth(int). +

+ The instance is alive since its creation. If the connection with the IOIO + drops at any point, the instance transitions to a disconnected state, in + which every attempt to use the pin (except Closeable.close()) will throw a + ConnectionLostException. Whenever Closeable.close() is invoked the + instance may no longer be used. Any resources associated with it are freed + and can be reused. +

+ Typical usage (fading LED): + +

+ PwmOutput servo = ioio.openPwmOutput(12, 1000);  // LED anode on pin 12
+ ...
+ servo.setDutyCycle(0.0f);  // LED off
+ ... 
+ servo.setDutyCycle(0.5f);  // 50% intensity
+ ... 
+ servo.setDutyCycle(1.0f);  // 100% intensity
+ ... 
+ servo.close();  // pin 12 can now be used for something else.
+ 
+

+ Typical usage (servo): + +

+ PwmOutput servo = ioio.openPwmOutput(12, 100);
+ ...
+ servo.setPulseWidth(1000);  // 1000us = 1ms = one extreme
+ ... 
+ servo.setPulseWidth(1500);  // 1500us = 1.5ms = center
+ ... 
+ servo.setPulseWidth(2000);  // 2000us = 2ms = other extreme
+ ... 
+ servo.close();  // pin 12 can now be used for something else.
+ 
+

+ +

+

+
See Also:
IOIO.openPwmOutput(ioio.lib.api.DigitalOutput.Spec, int)
+
+ +

+ + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidsetDutyCycle(float dutyCycle) + +
+          Sets the duty cycle of the PWM output.
+ voidsetPulseWidth(float pulseWidthUs) + +
+          The same as setPulseWidth(int), but with sub-microsecond + precision.
+ voidsetPulseWidth(int pulseWidthUs) + +
+          Sets the pulse width of the PWM output.
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+setDutyCycle

+
+void setDutyCycle(float dutyCycle)
+                  throws ConnectionLostException
+
+
Sets the duty cycle of the PWM output. The duty cycle is defined to be + the pulse width divided by the total cycle period. For absolute control + of the pulse with, consider using setPulseWidth(int). +

+

+
+
+
+
Parameters:
dutyCycle - The duty cycle, as a real value from 0.0 to 1.0. +
Throws: +
ConnectionLostException - The connection to the IOIO has been lost.
See Also:
setPulseWidth(int)
+
+
+
+ +

+setPulseWidth

+
+void setPulseWidth(int pulseWidthUs)
+                   throws ConnectionLostException
+
+
Sets the pulse width of the PWM output. The pulse width is duration of + the high-time within a single period of the signal. For relative control + of the pulse with, consider using setDutyCycle(float). +

+

+
+
+
+
Parameters:
pulseWidthUs - The pulse width, in microsecond units. +
Throws: +
ConnectionLostException - The connection to the IOIO has been lost.
See Also:
setDutyCycle(float)
+
+
+
+ +

+setPulseWidth

+
+void setPulseWidth(float pulseWidthUs)
+                   throws ConnectionLostException
+
+
The same as setPulseWidth(int), but with sub-microsecond + precision. +

+

+
+
+
+ +
Throws: +
ConnectionLostException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/SpiMaster.Config.html b/IOIOLib/doc/ioio/lib/api/SpiMaster.Config.html new file mode 100644 index 0000000..af6ae24 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/SpiMaster.Config.html @@ -0,0 +1,339 @@ + + + + + + +SpiMaster.Config + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Class SpiMaster.Config

+
+java.lang.Object
+  extended by ioio.lib.api.SpiMaster.Config
+
+
+
Enclosing interface:
SpiMaster
+
+
+
+
public static class SpiMaster.Config
extends java.lang.Object
+ + +

+SPI configuration structure. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+ booleaninvertClk + +
+          Whether to invert clock polarity.
+ SpiMaster.Raterate + +
+          Data rate.
+ booleansampleOnTrailing + +
+          Whether to do the input and output sampling on the trailing clock + edge.
+  + + + + + + + + + + + + + +
+Constructor Summary
SpiMaster.Config(SpiMaster.Rate rate) + +
+          Constructor with common defaults.
SpiMaster.Config(SpiMaster.Rate rate, + boolean invertClk, + boolean sampleOnTrailing) + +
+          Constructor.
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+rate

+
+public SpiMaster.Rate rate
+
+
Data rate. +

+

+
+
+
+ +

+invertClk

+
+public boolean invertClk
+
+
Whether to invert clock polarity. +

+

+
+
+
+ +

+sampleOnTrailing

+
+public boolean sampleOnTrailing
+
+
Whether to do the input and output sampling on the trailing clock + edge. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+SpiMaster.Config

+
+public SpiMaster.Config(SpiMaster.Rate rate,
+                        boolean invertClk,
+                        boolean sampleOnTrailing)
+
+
Constructor. +

+

+
Parameters:
rate - Data rate.
invertClk - Whether to invert clock polarity.
sampleOnTrailing - Whether to do the input and output sampling on the + trailing clock edge.
+
+
+ +

+SpiMaster.Config

+
+public SpiMaster.Config(SpiMaster.Rate rate)
+
+
Constructor with common defaults. Equivalent to Config(rate, false, + false) +

+

+
See Also:
#Config(Rate, boolean, boolean)
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/SpiMaster.Rate.html b/IOIOLib/doc/ioio/lib/api/SpiMaster.Rate.html new file mode 100644 index 0000000..df5dd56 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/SpiMaster.Rate.html @@ -0,0 +1,697 @@ + + + + + + +SpiMaster.Rate + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum SpiMaster.Rate

+
+java.lang.Object
+  extended by java.lang.Enum<SpiMaster.Rate>
+      extended by ioio.lib.api.SpiMaster.Rate
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SpiMaster.Rate>
+
+
+
Enclosing interface:
SpiMaster
+
+
+
+
public static enum SpiMaster.Rate
extends java.lang.Enum<SpiMaster.Rate>
+ + +

+Possible data rates for SPI, in Hz. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Enum Constant Summary
RATE_1_3M + +
+           
RATE_125K + +
+           
RATE_142K + +
+           
RATE_166K + +
+           
RATE_1M + +
+           
RATE_2_2M + +
+           
RATE_2_6M + +
+           
RATE_200K + +
+           
RATE_250K + +
+           
RATE_2M + +
+           
RATE_3_2M + +
+           
RATE_31K + +
+           
RATE_333K + +
+           
RATE_35K + +
+           
RATE_41K + +
+           
RATE_4M + +
+           
RATE_5_3M + +
+           
RATE_500K + +
+           
RATE_50K + +
+           
RATE_571K + +
+           
RATE_62K + +
+           
RATE_666K + +
+           
RATE_800K + +
+           
RATE_83K + +
+           
RATE_8M + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+static SpiMaster.RatevalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static SpiMaster.Rate[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+RATE_31K

+
+public static final SpiMaster.Rate RATE_31K
+
+
+
+
+
+ +

+RATE_35K

+
+public static final SpiMaster.Rate RATE_35K
+
+
+
+
+
+ +

+RATE_41K

+
+public static final SpiMaster.Rate RATE_41K
+
+
+
+
+
+ +

+RATE_50K

+
+public static final SpiMaster.Rate RATE_50K
+
+
+
+
+
+ +

+RATE_62K

+
+public static final SpiMaster.Rate RATE_62K
+
+
+
+
+
+ +

+RATE_83K

+
+public static final SpiMaster.Rate RATE_83K
+
+
+
+
+
+ +

+RATE_125K

+
+public static final SpiMaster.Rate RATE_125K
+
+
+
+
+
+ +

+RATE_142K

+
+public static final SpiMaster.Rate RATE_142K
+
+
+
+
+
+ +

+RATE_166K

+
+public static final SpiMaster.Rate RATE_166K
+
+
+
+
+
+ +

+RATE_200K

+
+public static final SpiMaster.Rate RATE_200K
+
+
+
+
+
+ +

+RATE_250K

+
+public static final SpiMaster.Rate RATE_250K
+
+
+
+
+
+ +

+RATE_333K

+
+public static final SpiMaster.Rate RATE_333K
+
+
+
+
+
+ +

+RATE_500K

+
+public static final SpiMaster.Rate RATE_500K
+
+
+
+
+
+ +

+RATE_571K

+
+public static final SpiMaster.Rate RATE_571K
+
+
+
+
+
+ +

+RATE_666K

+
+public static final SpiMaster.Rate RATE_666K
+
+
+
+
+
+ +

+RATE_800K

+
+public static final SpiMaster.Rate RATE_800K
+
+
+
+
+
+ +

+RATE_1M

+
+public static final SpiMaster.Rate RATE_1M
+
+
+
+
+
+ +

+RATE_1_3M

+
+public static final SpiMaster.Rate RATE_1_3M
+
+
+
+
+
+ +

+RATE_2M

+
+public static final SpiMaster.Rate RATE_2M
+
+
+
+
+
+ +

+RATE_2_2M

+
+public static final SpiMaster.Rate RATE_2_2M
+
+
+
+
+
+ +

+RATE_2_6M

+
+public static final SpiMaster.Rate RATE_2_6M
+
+
+
+
+
+ +

+RATE_3_2M

+
+public static final SpiMaster.Rate RATE_3_2M
+
+
+
+
+
+ +

+RATE_4M

+
+public static final SpiMaster.Rate RATE_4M
+
+
+
+
+
+ +

+RATE_5_3M

+
+public static final SpiMaster.Rate RATE_5_3M
+
+
+
+
+
+ +

+RATE_8M

+
+public static final SpiMaster.Rate RATE_8M
+
+
+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static SpiMaster.Rate[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (SpiMaster.Rate c : SpiMaster.Rate.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static SpiMaster.Rate valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/SpiMaster.Result.html b/IOIOLib/doc/ioio/lib/api/SpiMaster.Result.html new file mode 100644 index 0000000..cec75e8 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/SpiMaster.Result.html @@ -0,0 +1,222 @@ + + + + + + +SpiMaster.Result + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface SpiMaster.Result

+
+
Enclosing interface:
SpiMaster
+
+
+
+
public static interface SpiMaster.Result
+ + +

+An object that can be waited on for asynchronous calls. +

+ +

+


+ +

+ + + + + + + + + + + + +
+Method Summary
+ voidwaitReady() + +
+          Wait until the asynchronous call which returned this instance is + complete.
+  +

+ + + + + + + + +
+Method Detail
+ +

+waitReady

+
+void waitReady()
+               throws ConnectionLostException,
+                      java.lang.InterruptedException
+
+
Wait until the asynchronous call which returned this instance is + complete. +

+

+ +
Throws: +
ConnectionLostException - Connection with the IOIO has been lost. +
java.lang.InterruptedException - This operation has been interrupted.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/SpiMaster.html b/IOIOLib/doc/ioio/lib/api/SpiMaster.html new file mode 100644 index 0000000..7cbef2d --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/SpiMaster.html @@ -0,0 +1,424 @@ + + + + + + +SpiMaster + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface SpiMaster

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface SpiMaster
extends Closeable
+ + +

+An interface for controlling an SPI module, in SPI bus-master mode, enabling + communication with multiple SPI-enabled slave modules. +

+ SPI is a common hardware communication protocol, enabling full-duplex, + synchronous point-to-multi-point data transfer. It requires MOSI, MISO and + CLK lines shared by all nodes, as well as a SS line per slave, connected + between this slave and a respective pin on the master. The MISO line should + operate in pull-up mode, using either the internal pull-up or an external + resistor. SpiMaster instances are obtained by calling + IOIO#openSpiMaster(Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], Config). +

+ The SPI protocol is comprised of simultaneous sending and receiving of data + between the bus master and a single slave. By the very nature of this + protocol, the amount of bytes sent is equal to the amount of bytes received. + However, by padding the sent data with garbage data, and by ignoring the + leading bytes of the received data arbitrarily-sized packets can be sent and + received. +

+ A very common practice for SPI-based slave devices (although not always the + case), is to have a fixed request and response length and a fixed lag between + them, based on the request type. For example, an SPI-based sensor may define + the the protocol for obtaining its measured value is by sending a 2-byte + message, whereas the returned 3-byte value has its first byte overlapping the + second value of the response, as illustrated below: + +

+ Master: M1   M2   GG   GG
+ Slave:  GG   S1   S2   S3
+ 
+ + M1, M2: the master's request
+ S1, S2, S3: the slave's response
+ GG: garbage bytes used for padding. +

+ The IOIO SPI interface supports such fixed length message protocols using a + single method, writeRead(int, byte[], int, int, byte[], int), which + gets the request data, and the lengths of the request, the response and the + total transaction bytes. + +

+ The instance is alive since its creation. If the connection with the IOIO + drops at any point, the instance transitions to a disconnected state, in + which every attempt to use it (except Closeable.close()) will throw a + ConnectionLostException. Whenever Closeable.close() is invoked the + instance may no longer be used. Any resources associated with it are freed + and can be reused. +

+ Typical usage (single slave, as per the example above): + +

+ // MISO, MOSI, CLK, SS on pins 3, 4, 5, 6, respectively.
+ SpiMaster spi = ioio.openSpiMaster(3, 4, 5, 6, SpiMaster.Rate.RATE_125K);
+ final byte[] request = new byte[]{ 0x23, 0x45 };
+ final byte[] response = new byte[3];
+ spi.writeRead(request, 2, 4, response, 3);
+ ...
+ spi.close();  // free SPI module and pins
+ 
+

+ +

+

+
See Also:
IOIO#openSpiMaster(Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], Config)
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Nested Class Summary
+static classSpiMaster.Config + +
+          SPI configuration structure.
+static classSpiMaster.Rate + +
+          Possible data rates for SPI, in Hz.
+static interfaceSpiMaster.Result + +
+          An object that can be waited on for asynchronous calls.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidwriteRead(byte[] writeData, + int writeSize, + int totalSize, + byte[] readData, + int readSize) + +
+          Shorthand for writeRead(int, byte[], int, int, byte[], int) for + the single-slave case.
+ voidwriteRead(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.
+ SpiMaster.ResultwriteReadAsync(int slave, + byte[] writeData, + int writeSize, + int totalSize, + byte[] readData, + int readSize) + +
+          The same as writeRead(int, byte[], int, int, byte[], int), but + returns immediately and returns a SpiMaster.Result object that can be + waited on.
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+writeRead

+
+void writeRead(int slave,
+               byte[] writeData,
+               int writeSize,
+               int totalSize,
+               byte[] readData,
+               int readSize)
+               throws ConnectionLostException,
+                      java.lang.InterruptedException
+
+
Perform a single SPI transaction which includes optional transmission and + optional reception of data to a single slave. This is a blocking + operation that can take a few milliseconds to a few tens of milliseconds. + To abort this operation, client can interrupt the blocked thread. If + readSize is 0, the call returns immediately. +

+

+
+
+
+
Parameters:
slave - The slave index. It is determined by the index of its + slave-select pin, as per the array passed to + IOIO#openSpiMaster(Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], Config) + .
writeData - A byte array of data to write. May be null if writeSize is 0.
writeSize - Number of bytes to write. Valid values are 0 to totalSize.
totalSize - Total transaction length, in bytes. Valid values are 1 to 64.
readData - An array where the response is to be stored. May be null if + readSize is 0.
readSize - The number of expected response bytes. Valid values are 0 to + totalSize. +
Throws: +
ConnectionLostException - Connection to the IOIO has been lost. +
java.lang.InterruptedException - Calling thread has been interrupted.
+
+
+
+ +

+writeRead

+
+void writeRead(byte[] writeData,
+               int writeSize,
+               int totalSize,
+               byte[] readData,
+               int readSize)
+               throws ConnectionLostException,
+                      java.lang.InterruptedException
+
+
Shorthand for writeRead(int, byte[], int, int, byte[], int) for + the single-slave case. +

+

+
+
+
+ +
Throws: +
ConnectionLostException +
java.lang.InterruptedException
See Also:
writeRead(int, byte[], int, int, byte[], int)
+
+
+
+ +

+writeReadAsync

+
+SpiMaster.Result writeReadAsync(int slave,
+                                byte[] writeData,
+                                int writeSize,
+                                int totalSize,
+                                byte[] readData,
+                                int readSize)
+                                throws ConnectionLostException
+
+
The same as writeRead(int, byte[], int, int, byte[], int), but + returns immediately and returns a SpiMaster.Result object that can be + waited on. If readSize is 0, the result object is ready immediately. +

+

+
+
+
+ +
Throws: +
ConnectionLostException
See Also:
writeRead(int, byte[], int, int, byte[], int)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/TwiMaster.Rate.html b/IOIOLib/doc/ioio/lib/api/TwiMaster.Rate.html new file mode 100644 index 0000000..cb003bb --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/TwiMaster.Rate.html @@ -0,0 +1,341 @@ + + + + + + +TwiMaster.Rate + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum TwiMaster.Rate

+
+java.lang.Object
+  extended by java.lang.Enum<TwiMaster.Rate>
+      extended by ioio.lib.api.TwiMaster.Rate
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TwiMaster.Rate>
+
+
+
Enclosing interface:
TwiMaster
+
+
+
+
public static enum TwiMaster.Rate
extends java.lang.Enum<TwiMaster.Rate>
+ + +

+


+ +

+ + + + + + + + + + + + + + + + +
+Enum Constant Summary
RATE_100KHz + +
+           
RATE_1MHz + +
+           
RATE_400KHz + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+static TwiMaster.RatevalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static TwiMaster.Rate[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+RATE_100KHz

+
+public static final TwiMaster.Rate RATE_100KHz
+
+
+
+
+
+ +

+RATE_400KHz

+
+public static final TwiMaster.Rate RATE_400KHz
+
+
+
+
+
+ +

+RATE_1MHz

+
+public static final TwiMaster.Rate RATE_1MHz
+
+
+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static TwiMaster.Rate[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (TwiMaster.Rate c : TwiMaster.Rate.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static TwiMaster.Rate valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/TwiMaster.Result.html b/IOIOLib/doc/ioio/lib/api/TwiMaster.Result.html new file mode 100644 index 0000000..9e0d983 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/TwiMaster.Result.html @@ -0,0 +1,223 @@ + + + + + + +TwiMaster.Result + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface TwiMaster.Result

+
+
Enclosing interface:
TwiMaster
+
+
+
+
public static interface TwiMaster.Result
+ + +

+An object that can be waited on for asynchronous calls. +

+ +

+


+ +

+ + + + + + + + + + + + +
+Method Summary
+ booleanwaitReady() + +
+          Wait until the asynchronous call which returned this instance is + complete.
+  +

+ + + + + + + + +
+Method Detail
+ +

+waitReady

+
+boolean waitReady()
+                  throws ConnectionLostException,
+                         java.lang.InterruptedException
+
+
Wait until the asynchronous call which returned this instance is + complete. +

+

+ +
Returns:
true if TWI transaction succeeded. +
Throws: +
ConnectionLostException - Connection with the IOIO has been lost. +
java.lang.InterruptedException - This operation has been interrupted.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/TwiMaster.html b/IOIOLib/doc/ioio/lib/api/TwiMaster.html new file mode 100644 index 0000000..53f0b48 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/TwiMaster.html @@ -0,0 +1,363 @@ + + + + + + +TwiMaster + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface TwiMaster

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface TwiMaster
extends Closeable
+ + +

+An interface for controlling a TWI module, in TWI bus-master mode, enabling + communication with multiple TWI-enabled slave modules. +

+ TWI (Two-Wire Interface) is a common hardware communication protocol, + enabling half-duplex, synchronous point-to-multi-point data transfer. It + requires a physical connection of two lines (SDA, SCL) shared by all the bus + nodes, where the SDA is open-drain and externally pulled-up. TwiMaster + instances are obtained by calling + IOIO#openTwiMaster(int, Rate, boolean). +

+ TWI is the generic name for the specific I2C and SMBus protocols, differing + mostly by the voltage levels they require. This module supports both. +

+ A TWI transaction is comprised of optional sending of a data buffer from the + master to a single slave, followed by an optional reception of a data buffer + from that slave. Slaves are designated by addresses, which may be 7-bit + (common) or 10-bit (less common). TWI transactions may fail, as a result of + the slave not responding or as result of the slave NACK'ing the request. Such + a transaction is executed using the + writeRead(int, boolean, byte[], int, byte[], int) method. +

+ The instance is alive since its creation. If the connection with the IOIO + drops at any point, the instance transitions to a disconnected state, in +

+ The instance is alive since its creation. If the connection with the IOIO + drops at any point, the instance transitions to a disconnected state, in + which every attempt to use it (except Closeable.close()) will throw a + ConnectionLostException. Whenever Closeable.close() is invoked the + instance may no longer be used. Any resources associated with it are freed + and can be reused. +

+ Typical usage: + +

+ // Uses the SDA1/SCL1 pins, I2C volatege levels at 100KHz. 
+ TwiMaster twi = ioio.openTwiMaster(1, TwiMaster.RATE_100KHz, false);
+ final byte[] request = new byte[]{ 0x23, 0x45 };
+ final byte[] response = new byte[3];
+ if (twi.writeRead(0x19, false, request, 2, response, 3)) {
+   // response is valid
+   ...
+ } else {
+   // handle error
+ }
+ twi.close();  // free TWI module and pins
+ 
+

+ +

+

+
See Also:
IOIO#openTwiMaster(int, Rate, boolean)
+
+ +

+ + + + + + + + + + + + + + + +
+Nested Class Summary
+static classTwiMaster.Rate + +
+           
+static interfaceTwiMaster.Result + +
+          An object that can be waited on for asynchronous calls.
+  + + + + + + + + + + + + + + + +
+Method Summary
+ booleanwriteRead(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.
+ TwiMaster.ResultwriteReadAsync(int address, + boolean tenBitAddr, + byte[] writeData, + int writeSize, + byte[] readData, + int readSize) + +
+          Asynchronous version of + writeRead(int, boolean, byte[], int, byte[], int).
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+writeRead

+
+boolean writeRead(int address,
+                  boolean tenBitAddr,
+                  byte[] writeData,
+                  int writeSize,
+                  byte[] readData,
+                  int readSize)
+                  throws ConnectionLostException,
+                         java.lang.InterruptedException
+
+
Perform a single TWI transaction which includes optional transmission and + optional reception of data to a single slave. This is a blocking + operation that can take a few milliseconds to a few tens of milliseconds. + To abort this operation, client can interrupt the blocked thread. +

+

+
+
+
+
Parameters:
address - The slave address, either 7-bit or 10-bit. Note that in some + TWI device documentation the documented addresses are actually + 2x the address values used here, as they regard the trailing + 0-bit as part of the address.
tenBitAddr - Whether this is a 10-bit addressing mode.
writeData - The request data.
writeSize - The number of bytes to write. Valid value are 0-255.
readData - The array where the response should be stored.
readSize - The expected number of response bytes. Valid value are 0-255. +
Returns:
Whether operation succeeded. +
Throws: +
ConnectionLostException - Connection to the IOIO has been lost. +
java.lang.InterruptedException - Calling thread has been interrupted.
+
+
+
+ +

+writeReadAsync

+
+TwiMaster.Result writeReadAsync(int address,
+                                boolean tenBitAddr,
+                                byte[] writeData,
+                                int writeSize,
+                                byte[] readData,
+                                int readSize)
+                                throws ConnectionLostException
+
+
Asynchronous version of + writeRead(int, boolean, byte[], int, byte[], int). Returns + immediately and provides a TwiMaster.Result object on which the client can + wait for the result. +

+

+
+
+
+ +
Throws: +
ConnectionLostException
See Also:
writeRead(int, boolean, byte[], int, byte[], int)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/Uart.Parity.html b/IOIOLib/doc/ioio/lib/api/Uart.Parity.html new file mode 100644 index 0000000..bafd70a --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/Uart.Parity.html @@ -0,0 +1,351 @@ + + + + + + +Uart.Parity + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum Uart.Parity

+
+java.lang.Object
+  extended by java.lang.Enum<Uart.Parity>
+      extended by ioio.lib.api.Uart.Parity
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Uart.Parity>
+
+
+
Enclosing interface:
Uart
+
+
+
+
public static enum Uart.Parity
extends java.lang.Enum<Uart.Parity>
+ + +

+Parity-bit mode. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Enum Constant Summary
EVEN + +
+          Even parity.
NONE + +
+          No parity.
ODD + +
+          Odd parity.
+  + + + + + + + + + + + + + + + +
+Method Summary
+static Uart.ParityvalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static Uart.Parity[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+NONE

+
+public static final Uart.Parity NONE
+
+
No parity. +

+

+
+
+
+ +

+EVEN

+
+public static final Uart.Parity EVEN
+
+
Even parity. +

+

+
+
+
+ +

+ODD

+
+public static final Uart.Parity ODD
+
+
Odd parity. +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static Uart.Parity[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (Uart.Parity c : Uart.Parity.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static Uart.Parity valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/Uart.StopBits.html b/IOIOLib/doc/ioio/lib/api/Uart.StopBits.html new file mode 100644 index 0000000..d7c9ca1 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/Uart.StopBits.html @@ -0,0 +1,333 @@ + + + + + + +Uart.StopBits + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Enum Uart.StopBits

+
+java.lang.Object
+  extended by java.lang.Enum<Uart.StopBits>
+      extended by ioio.lib.api.Uart.StopBits
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Uart.StopBits>
+
+
+
Enclosing interface:
Uart
+
+
+
+
public static enum Uart.StopBits
extends java.lang.Enum<Uart.StopBits>
+ + +

+Number of stop-bits. +

+ +

+


+ +

+ + + + + + + + + + + + + +
+Enum Constant Summary
ONE + +
+          One stop bit.
TWO + +
+          Two stop bits.
+  + + + + + + + + + + + + + + + +
+Method Summary
+static Uart.StopBitsvalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static Uart.StopBits[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+ONE

+
+public static final Uart.StopBits ONE
+
+
One stop bit. +

+

+
+
+
+ +

+TWO

+
+public static final Uart.StopBits TWO
+
+
Two stop bits. +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static Uart.StopBits[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
+for (Uart.StopBits c : Uart.StopBits.values())
+    System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they are declared
+
+
+
+ +

+valueOf

+
+public static Uart.StopBits valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name +
java.lang.NullPointerException - if the argument is null
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/Uart.html b/IOIOLib/doc/ioio/lib/api/Uart.html new file mode 100644 index 0000000..56f260e --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/Uart.html @@ -0,0 +1,314 @@ + + + + + + +Uart + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api +
+Interface Uart

+
+
All Superinterfaces:
Closeable
+
+
+
+
public interface Uart
extends Closeable
+ + +

+An interface for controlling a UART module. +

+ UART is a very common hardware communication protocol, enabling full- duplex, + asynchronous point-to-point data transfer. It typically serves for opening + consoles or as a basis for higher-level protocols, such as MIDI, RS-232 and + RS-485. Uart instances are obtained by calling + IOIO#openUart(Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits). +

+ The UART protocol is completely symmetric - there is no "master" and "slave" + at this layer. Each end may send any number of bytes at arbitrary times, + making it very useful for terminals and terminal-controllable devices. +

+ Working with UART is very intuitive - it just provides a standard InputStream + and/or OutputStream. Optionally, one could create a read-only or write-only + UART instances, by passing null (or INVALID_PIN) for either TX or RX pins. +

+ The instance is alive since its creation. If the connection with the IOIO + drops at any point, the instance transitions to a disconnected state, which + every attempt to use it (except Closeable.close()) will throw a + ConnectionLostException. Whenever Closeable.close() is invoked the + instance may no longer be used. Any resources associated with it are freed + and can be reused. +

+ Typical usage: + +

+ Uart uart = ioio.openUart(3, 4, 19200, Parity.NONE, StopBits.ONE);
+ InputStream in = uart.getInputStream();
+ OutputStream out = uart.getOutputStream();
+ out.write(new String("Hello").getBytes());
+ int i = in.read();  // blocking
+ ...
+ uart.close();  // free UART module and pins
+ 
+

+ +

+

+
See Also:
IOIO#openUart(Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, + StopBits)
+
+ +

+ + + + + + + + + + + + + + + +
+Nested Class Summary
+static classUart.Parity + +
+          Parity-bit mode.
+static classUart.StopBits + +
+          Number of stop-bits.
+  + + + + + + + + + + + + + + + +
+Method Summary
+ java.io.InputStreamgetInputStream() + +
+          Gets the input stream.
+ java.io.OutputStreamgetOutputStream() + +
+          Gets the output stream.
+ + + + + + + +
Methods inherited from interface ioio.lib.api.Closeable
close
+  +

+ + + + + + + + +
+Method Detail
+ +

+getInputStream

+
+java.io.InputStream getInputStream()
+
+
Gets the input stream. +

+

+
+
+
+ +
Returns:
An input stream.
+
+
+
+ +

+getOutputStream

+
+java.io.OutputStream getOutputStream()
+
+
Gets the output stream. +

+

+
+
+
+ +
Returns:
An output stream.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/AnalogInput.html b/IOIOLib/doc/ioio/lib/api/class-use/AnalogInput.html new file mode 100644 index 0000000..84305a2 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/AnalogInput.html @@ -0,0 +1,180 @@ + + + + + + +Uses of Interface ioio.lib.api.AnalogInput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.AnalogInput

+
+ + + + + + + + + +
+Packages that use AnalogInput
ioio.lib.api  
+  +

+ + + + + +
+Uses of AnalogInput in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api that return AnalogInput
+ AnalogInputIOIO.openAnalogInput(int pin) + +
+          Open a pin for analog input.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/Closeable.html b/IOIOLib/doc/ioio/lib/api/class-use/Closeable.html new file mode 100644 index 0000000..0f8046a --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/Closeable.html @@ -0,0 +1,247 @@ + + + + + + +Uses of Interface ioio.lib.api.Closeable + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.Closeable

+
+ + + + + + + + + +
+Packages that use Closeable
ioio.lib.api  
+  +

+ + + + + +
+Uses of Closeable in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Subinterfaces of Closeable in ioio.lib.api
+ interfaceAnalogInput + +
+          A pin used for analog input.
+ interfaceDigitalInput + +
+          A pin used for digital input.
+ interfaceDigitalOutput + +
+          A pin used for digital output.
+ interfaceIcspMaster + +
+          An interface for controlling an ICSP channel, enabling Flash programming of + an external PIC MCU, and in particular, another IOIO board.
+ interfacePulseInput + +
+          An interface for pulse width and frequency measurements of digital signals.
+ interfacePwmOutput + +
+          A pin used for PWM (Pulse-Width Modulation) output.
+ interfaceSpiMaster + +
+          An interface for controlling an SPI module, in SPI bus-master mode, enabling + communication with multiple SPI-enabled slave modules.
+ interfaceTwiMaster + +
+          An interface for controlling a TWI module, in TWI bus-master mode, enabling + communication with multiple TWI-enabled slave modules.
+ interfaceUart + +
+          An interface for controlling a UART module.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.Mode.html b/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.Mode.html new file mode 100644 index 0000000..8b4294d --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.Mode.html @@ -0,0 +1,237 @@ + + + + + + +Uses of Class ioio.lib.api.DigitalInput.Spec.Mode + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.DigitalInput.Spec.Mode

+
+ + + + + + + + + +
+Packages that use DigitalInput.Spec.Mode
ioio.lib.api  
+  +

+ + + + + +
+Uses of DigitalInput.Spec.Mode in ioio.lib.api
+  +

+ + + + + + + + + +
Fields in ioio.lib.api declared as DigitalInput.Spec.Mode
+ DigitalInput.Spec.ModeDigitalInput.Spec.mode + +
+          The pin mode.
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return DigitalInput.Spec.Mode
+static DigitalInput.Spec.ModeDigitalInput.Spec.Mode.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static DigitalInput.Spec.Mode[]DigitalInput.Spec.Mode.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + +
Methods in ioio.lib.api with parameters of type DigitalInput.Spec.Mode
+ DigitalInputIOIO.openDigitalInput(int pin, + DigitalInput.Spec.Mode mode) + +
+          Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)).
+  +

+ + + + + + + + +
Constructors in ioio.lib.api with parameters of type DigitalInput.Spec.Mode
DigitalInput.Spec(int pin, + DigitalInput.Spec.Mode mode) + +
+          Constructor.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.html b/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.html new file mode 100644 index 0000000..4392eeb --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.Spec.html @@ -0,0 +1,216 @@ + + + + + + +Uses of Class ioio.lib.api.DigitalInput.Spec + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.DigitalInput.Spec

+
+ + + + + + + + + +
+Packages that use DigitalInput.Spec
ioio.lib.api  
+  +

+ + + + + +
+Uses of DigitalInput.Spec in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + + + + + +
Methods in ioio.lib.api with parameters of type DigitalInput.Spec
+ DigitalInputIOIO.openDigitalInput(DigitalInput.Spec spec) + +
+          Open a pin for digital input.
+ PulseInputIOIO.openPulseInput(DigitalInput.Spec spec, + PulseInput.ClockRate rate, + PulseInput.PulseMode mode, + boolean doublePrecision) + +
+          Open a pin for pulse input.
+ SpiMasterIOIO.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.
+ UartIOIO.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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.html b/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.html new file mode 100644 index 0000000..8477e5e --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/DigitalInput.html @@ -0,0 +1,197 @@ + + + + + + +Uses of Interface ioio.lib.api.DigitalInput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.DigitalInput

+
+ + + + + + + + + +
+Packages that use DigitalInput
ioio.lib.api  
+  +

+ + + + + +
+Uses of DigitalInput in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + +
Methods in ioio.lib.api that return DigitalInput
+ DigitalInputIOIO.openDigitalInput(DigitalInput.Spec spec) + +
+          Open a pin for digital input.
+ DigitalInputIOIO.openDigitalInput(int pin) + +
+          Shorthand for openDigitalInput(new DigitalInput.Spec(pin)).
+ DigitalInputIOIO.openDigitalInput(int pin, + DigitalInput.Spec.Mode mode) + +
+          Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)).
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.Mode.html b/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.Mode.html new file mode 100644 index 0000000..75777ad --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.Mode.html @@ -0,0 +1,239 @@ + + + + + + +Uses of Class ioio.lib.api.DigitalOutput.Spec.Mode + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.DigitalOutput.Spec.Mode

+
+ + + + + + + + + +
+Packages that use DigitalOutput.Spec.Mode
ioio.lib.api  
+  +

+ + + + + +
+Uses of DigitalOutput.Spec.Mode in ioio.lib.api
+  +

+ + + + + + + + + +
Fields in ioio.lib.api declared as DigitalOutput.Spec.Mode
+ DigitalOutput.Spec.ModeDigitalOutput.Spec.mode + +
+          The pin mode.
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return DigitalOutput.Spec.Mode
+static DigitalOutput.Spec.ModeDigitalOutput.Spec.Mode.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static DigitalOutput.Spec.Mode[]DigitalOutput.Spec.Mode.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + +
Methods in ioio.lib.api with parameters of type DigitalOutput.Spec.Mode
+ DigitalOutputIOIO.openDigitalOutput(int pin, + DigitalOutput.Spec.Mode mode, + boolean startValue) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode), + startValue).
+  +

+ + + + + + + + +
Constructors in ioio.lib.api with parameters of type DigitalOutput.Spec.Mode
DigitalOutput.Spec(int pin, + DigitalOutput.Spec.Mode mode) + +
+          Constructor.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.html b/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.html new file mode 100644 index 0000000..0bdce09 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.Spec.html @@ -0,0 +1,228 @@ + + + + + + +Uses of Class ioio.lib.api.DigitalOutput.Spec + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.DigitalOutput.Spec

+
+ + + + + + + + + +
+Packages that use DigitalOutput.Spec
ioio.lib.api  
+  +

+ + + + + +
+Uses of DigitalOutput.Spec in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Methods in ioio.lib.api with parameters of type DigitalOutput.Spec
+ DigitalOutputIOIO.openDigitalOutput(DigitalOutput.Spec spec, + boolean startValue) + +
+          Open a pin for digital output.
+ PwmOutputIOIO.openPwmOutput(DigitalOutput.Spec spec, + int freqHz) + +
+          Open a pin for PWM (Pulse-Width Modulation) output.
+ SpiMasterIOIO.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.
+ SpiMasterIOIO.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.
+ UartIOIO.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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.html b/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.html new file mode 100644 index 0000000..026f835 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/DigitalOutput.html @@ -0,0 +1,209 @@ + + + + + + +Uses of Interface ioio.lib.api.DigitalOutput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.DigitalOutput

+
+ + + + + + + + + +
+Packages that use DigitalOutput
ioio.lib.api  
+  +

+ + + + + +
+Uses of DigitalOutput in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + + + + + +
Methods in ioio.lib.api that return DigitalOutput
+ DigitalOutputIOIO.openDigitalOutput(DigitalOutput.Spec spec, + boolean startValue) + +
+          Open a pin for digital output.
+ DigitalOutputIOIO.openDigitalOutput(int pin) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), false).
+ DigitalOutputIOIO.openDigitalOutput(int pin, + boolean startValue) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), startValue).
+ DigitalOutputIOIO.openDigitalOutput(int pin, + DigitalOutput.Spec.Mode mode, + boolean startValue) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode), + startValue).
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/IOIO.VersionType.html b/IOIOLib/doc/ioio/lib/api/class-use/IOIO.VersionType.html new file mode 100644 index 0000000..b8c24ae --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/IOIO.VersionType.html @@ -0,0 +1,205 @@ + + + + + + +Uses of Class ioio.lib.api.IOIO.VersionType + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.IOIO.VersionType

+
+ + + + + + + + + +
+Packages that use IOIO.VersionType
ioio.lib.api  
+  +

+ + + + + +
+Uses of IOIO.VersionType in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return IOIO.VersionType
+static IOIO.VersionTypeIOIO.VersionType.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static IOIO.VersionType[]IOIO.VersionType.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + +
Methods in ioio.lib.api with parameters of type IOIO.VersionType
+ java.lang.StringIOIO.getImplVersion(IOIO.VersionType v) + +
+          Query the implementation version of the system's components.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/IOIO.html b/IOIOLib/doc/ioio/lib/api/class-use/IOIO.html new file mode 100644 index 0000000..cc2e5d6 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/IOIO.html @@ -0,0 +1,197 @@ + + + + + + +Uses of Interface ioio.lib.api.IOIO + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.IOIO

+
+ + + + + + + + + +
+Packages that use IOIO
ioio.lib.api  
+  +

+ + + + + +
+Uses of IOIO in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + +
Methods in ioio.lib.api that return IOIO
+static IOIOIOIOFactory.create() + +
+          Create a IOIO instance.
+static IOIOIOIOFactory.create(IOIOConnection connection) + +
+           
+static IOIOIOIOFactory.create(java.lang.String connectionClassName, + java.lang.Object... args) + +
+          Create a IOIO instance with a user-provided underlying connection class.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/IOIOConnection.html b/IOIOLib/doc/ioio/lib/api/class-use/IOIOConnection.html new file mode 100644 index 0000000..b9acf91 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/IOIOConnection.html @@ -0,0 +1,197 @@ + + + + + + +Uses of Interface ioio.lib.api.IOIOConnection + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.IOIOConnection

+
+ + + + + + + + + +
+Packages that use IOIOConnection
ioio.lib.api  
+  +

+ + + + + +
+Uses of IOIOConnection in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api that return IOIOConnection
+static IOIOConnectionIOIOFactory.createConnectionDynamically(java.lang.String connectionClassName, + java.lang.Object... args) + +
+           
+  +

+ + + + + + + + + +
Methods in ioio.lib.api with parameters of type IOIOConnection
+static IOIOIOIOFactory.create(IOIOConnection connection) + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/IOIOFactory.html b/IOIOLib/doc/ioio/lib/api/class-use/IOIOFactory.html new file mode 100644 index 0000000..fe0537c --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/IOIOFactory.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class ioio.lib.api.IOIOFactory + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.IOIOFactory

+
+No usage of ioio.lib.api.IOIOFactory +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/IcspMaster.html b/IOIOLib/doc/ioio/lib/api/class-use/IcspMaster.html new file mode 100644 index 0000000..eb4f014 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/IcspMaster.html @@ -0,0 +1,181 @@ + + + + + + +Uses of Interface ioio.lib.api.IcspMaster + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.IcspMaster

+
+ + + + + + + + + +
+Packages that use IcspMaster
ioio.lib.api  
+  +

+ + + + + +
+Uses of IcspMaster in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api that return IcspMaster
+ IcspMasterIOIO.openIcspMaster() + +
+          Open an ICSP channel, enabling Flash programming of an external PIC MCU, + and in particular, another IOIO board.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.ClockRate.html b/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.ClockRate.html new file mode 100644 index 0000000..4fb5d41 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.ClockRate.html @@ -0,0 +1,208 @@ + + + + + + +Uses of Class ioio.lib.api.PulseInput.ClockRate + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.PulseInput.ClockRate

+
+ + + + + + + + + +
+Packages that use PulseInput.ClockRate
ioio.lib.api  
+  +

+ + + + + +
+Uses of PulseInput.ClockRate in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return PulseInput.ClockRate
+static PulseInput.ClockRatePulseInput.ClockRate.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static PulseInput.ClockRate[]PulseInput.ClockRate.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + +
Methods in ioio.lib.api with parameters of type PulseInput.ClockRate
+ PulseInputIOIO.openPulseInput(DigitalInput.Spec spec, + PulseInput.ClockRate rate, + PulseInput.PulseMode mode, + boolean doublePrecision) + +
+          Open a pin for pulse input.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.PulseMode.html b/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.PulseMode.html new file mode 100644 index 0000000..928bc10 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.PulseMode.html @@ -0,0 +1,218 @@ + + + + + + +Uses of Class ioio.lib.api.PulseInput.PulseMode + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.PulseInput.PulseMode

+
+ + + + + + + + + +
+Packages that use PulseInput.PulseMode
ioio.lib.api  
+  +

+ + + + + +
+Uses of PulseInput.PulseMode in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return PulseInput.PulseMode
+static PulseInput.PulseModePulseInput.PulseMode.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static PulseInput.PulseMode[]PulseInput.PulseMode.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api with parameters of type PulseInput.PulseMode
+ PulseInputIOIO.openPulseInput(DigitalInput.Spec spec, + PulseInput.ClockRate rate, + PulseInput.PulseMode mode, + boolean doublePrecision) + +
+          Open a pin for pulse input.
+ PulseInputIOIO.openPulseInput(int pin, + PulseInput.PulseMode mode) + +
+          Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode, + true), i.e.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.html b/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.html new file mode 100644 index 0000000..078d572 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/PulseInput.html @@ -0,0 +1,193 @@ + + + + + + +Uses of Interface ioio.lib.api.PulseInput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.PulseInput

+
+ + + + + + + + + +
+Packages that use PulseInput
ioio.lib.api  
+  +

+ + + + + +
+Uses of PulseInput in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return PulseInput
+ PulseInputIOIO.openPulseInput(DigitalInput.Spec spec, + PulseInput.ClockRate rate, + PulseInput.PulseMode mode, + boolean doublePrecision) + +
+          Open a pin for pulse input.
+ PulseInputIOIO.openPulseInput(int pin, + PulseInput.PulseMode mode) + +
+          Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode, + true), i.e.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/PwmOutput.html b/IOIOLib/doc/ioio/lib/api/class-use/PwmOutput.html new file mode 100644 index 0000000..f9b0deb --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/PwmOutput.html @@ -0,0 +1,190 @@ + + + + + + +Uses of Interface ioio.lib.api.PwmOutput + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.PwmOutput

+
+ + + + + + + + + +
+Packages that use PwmOutput
ioio.lib.api  
+  +

+ + + + + +
+Uses of PwmOutput in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return PwmOutput
+ PwmOutputIOIO.openPwmOutput(DigitalOutput.Spec spec, + int freqHz) + +
+          Open a pin for PWM (Pulse-Width Modulation) output.
+ PwmOutputIOIO.openPwmOutput(int pin, + int freqHz) + +
+          Shorthand for openPwmOutput(new DigitalOutput.Spec(pin), freqHz).
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Config.html b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Config.html new file mode 100644 index 0000000..bd057b5 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Config.html @@ -0,0 +1,185 @@ + + + + + + +Uses of Class ioio.lib.api.SpiMaster.Config + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.SpiMaster.Config

+
+ + + + + + + + + +
+Packages that use SpiMaster.Config
ioio.lib.api  
+  +

+ + + + + +
+Uses of SpiMaster.Config in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api with parameters of type SpiMaster.Config
+ SpiMasterIOIO.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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Rate.html b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Rate.html new file mode 100644 index 0000000..9c1ccb1 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Rate.html @@ -0,0 +1,262 @@ + + + + + + +Uses of Class ioio.lib.api.SpiMaster.Rate + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.SpiMaster.Rate

+
+ + + + + + + + + +
+Packages that use SpiMaster.Rate
ioio.lib.api  
+  +

+ + + + + +
+Uses of SpiMaster.Rate in ioio.lib.api
+  +

+ + + + + + + + + +
Fields in ioio.lib.api declared as SpiMaster.Rate
+ SpiMaster.RateSpiMaster.Config.rate + +
+          Data rate.
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return SpiMaster.Rate
+static SpiMaster.RateSpiMaster.Rate.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static SpiMaster.Rate[]SpiMaster.Rate.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api with parameters of type SpiMaster.Rate
+ SpiMasterIOIO.openSpiMaster(int miso, + int mosi, + int clk, + int[] slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+ SpiMasterIOIO.openSpiMaster(int miso, + int mosi, + int clk, + int slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+  +

+ + + + + + + + + + + +
Constructors in ioio.lib.api with parameters of type SpiMaster.Rate
SpiMaster.Config(SpiMaster.Rate rate) + +
+          Constructor with common defaults.
SpiMaster.Config(SpiMaster.Rate rate, + boolean invertClk, + boolean sampleOnTrailing) + +
+          Constructor.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Result.html b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Result.html new file mode 100644 index 0000000..9710584 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.Result.html @@ -0,0 +1,187 @@ + + + + + + +Uses of Interface ioio.lib.api.SpiMaster.Result + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.SpiMaster.Result

+
+ + + + + + + + + +
+Packages that use SpiMaster.Result
ioio.lib.api  
+  +

+ + + + + +
+Uses of SpiMaster.Result in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api that return SpiMaster.Result
+ SpiMaster.ResultSpiMaster.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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.html b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.html new file mode 100644 index 0000000..8d3f29e --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/SpiMaster.html @@ -0,0 +1,212 @@ + + + + + + +Uses of Interface ioio.lib.api.SpiMaster + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.SpiMaster

+
+ + + + + + + + + +
+Packages that use SpiMaster
ioio.lib.api  
+  +

+ + + + + +
+Uses of SpiMaster in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + +
Methods in ioio.lib.api that return SpiMaster
+ SpiMasterIOIO.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.
+ SpiMasterIOIO.openSpiMaster(int miso, + int mosi, + int clk, + int[] slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+ SpiMasterIOIO.openSpiMaster(int miso, + int mosi, + int clk, + int slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Rate.html b/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Rate.html new file mode 100644 index 0000000..44d9536 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Rate.html @@ -0,0 +1,208 @@ + + + + + + +Uses of Class ioio.lib.api.TwiMaster.Rate + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.TwiMaster.Rate

+
+ + + + + + + + + +
+Packages that use TwiMaster.Rate
ioio.lib.api  
+  +

+ + + + + +
+Uses of TwiMaster.Rate in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return TwiMaster.Rate
+static TwiMaster.RateTwiMaster.Rate.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static TwiMaster.Rate[]TwiMaster.Rate.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + +
Methods in ioio.lib.api with parameters of type TwiMaster.Rate
+ TwiMasterIOIO.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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Result.html b/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Result.html new file mode 100644 index 0000000..dd076d6 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.Result.html @@ -0,0 +1,186 @@ + + + + + + +Uses of Interface ioio.lib.api.TwiMaster.Result + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.TwiMaster.Result

+
+ + + + + + + + + +
+Packages that use TwiMaster.Result
ioio.lib.api  
+  +

+ + + + + +
+Uses of TwiMaster.Result in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api that return TwiMaster.Result
+ TwiMaster.ResultTwiMaster.writeReadAsync(int address, + boolean tenBitAddr, + byte[] writeData, + int writeSize, + byte[] readData, + int readSize) + +
+          Asynchronous version of + TwiMaster.writeRead(int, boolean, byte[], int, byte[], int).
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.html b/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.html new file mode 100644 index 0000000..f1c62ad --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/TwiMaster.html @@ -0,0 +1,183 @@ + + + + + + +Uses of Interface ioio.lib.api.TwiMaster + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.TwiMaster

+
+ + + + + + + + + +
+Packages that use TwiMaster
ioio.lib.api  
+  +

+ + + + + +
+Uses of TwiMaster in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api that return TwiMaster
+ TwiMasterIOIO.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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/Uart.Parity.html b/IOIOLib/doc/ioio/lib/api/class-use/Uart.Parity.html new file mode 100644 index 0000000..b880359 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/Uart.Parity.html @@ -0,0 +1,223 @@ + + + + + + +Uses of Class ioio.lib.api.Uart.Parity + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.Uart.Parity

+
+ + + + + + + + + +
+Packages that use Uart.Parity
ioio.lib.api  
+  +

+ + + + + +
+Uses of Uart.Parity in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return Uart.Parity
+static Uart.ParityUart.Parity.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static Uart.Parity[]Uart.Parity.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api with parameters of type Uart.Parity
+ UartIOIO.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.
+ UartIOIO.openUart(int rx, + int tx, + int baud, + Uart.Parity parity, + Uart.StopBits stopbits) + +
+          Shorthand for + #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + , where the input pins use their default specs.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/Uart.StopBits.html b/IOIOLib/doc/ioio/lib/api/class-use/Uart.StopBits.html new file mode 100644 index 0000000..7daf2c3 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/Uart.StopBits.html @@ -0,0 +1,223 @@ + + + + + + +Uses of Class ioio.lib.api.Uart.StopBits + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.Uart.StopBits

+
+ + + + + + + + + +
+Packages that use Uart.StopBits
ioio.lib.api  
+  +

+ + + + + +
+Uses of Uart.StopBits in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return Uart.StopBits
+static Uart.StopBitsUart.StopBits.valueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static Uart.StopBits[]Uart.StopBits.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api with parameters of type Uart.StopBits
+ UartIOIO.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.
+ UartIOIO.openUart(int rx, + int tx, + int baud, + Uart.Parity parity, + Uart.StopBits stopbits) + +
+          Shorthand for + #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + , where the input pins use their default specs.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/class-use/Uart.html b/IOIOLib/doc/ioio/lib/api/class-use/Uart.html new file mode 100644 index 0000000..e5b52f5 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/class-use/Uart.html @@ -0,0 +1,198 @@ + + + + + + +Uses of Interface ioio.lib.api.Uart + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.api.Uart

+
+ + + + + + + + + +
+Packages that use Uart
ioio.lib.api  
+  +

+ + + + + +
+Uses of Uart in ioio.lib.api
+  +

+ + + + + + + + + + + + + +
Methods in ioio.lib.api that return Uart
+ UartIOIO.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.
+ UartIOIO.openUart(int rx, + int tx, + int baud, + Uart.Parity parity, + Uart.StopBits stopbits) + +
+          Shorthand for + #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + , where the input pins use their default specs.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/ConnectionLostException.html b/IOIOLib/doc/ioio/lib/api/exception/ConnectionLostException.html new file mode 100644 index 0000000..632f70f --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/ConnectionLostException.html @@ -0,0 +1,259 @@ + + + + + + +ConnectionLostException + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api.exception +
+Class ConnectionLostException

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by ioio.lib.api.exception.ConnectionLostException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class ConnectionLostException
extends java.lang.Exception
+ + +

+Thrown when the connection between Android and IOIO has been lost or + disconnected. +

+ +

+

+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
ConnectionLostException() + +
+           
ConnectionLostException(java.lang.Exception e) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+ConnectionLostException

+
+public ConnectionLostException(java.lang.Exception e)
+
+
+
+ +

+ConnectionLostException

+
+public ConnectionLostException()
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/IncompatibilityException.html b/IOIOLib/doc/ioio/lib/api/exception/IncompatibilityException.html new file mode 100644 index 0000000..fceae13 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/IncompatibilityException.html @@ -0,0 +1,245 @@ + + + + + + +IncompatibilityException + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api.exception +
+Class IncompatibilityException

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by ioio.lib.api.exception.IncompatibilityException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class IncompatibilityException
extends java.lang.Exception
+ + +

+Thrown when an incompatibility of system components is detected, such as when + an unsupported board hardware or software version is encountered. +

+ +

+

+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
IncompatibilityException(java.lang.String msg) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+IncompatibilityException

+
+public IncompatibilityException(java.lang.String msg)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/OutOfResourceException.html b/IOIOLib/doc/ioio/lib/api/exception/OutOfResourceException.html new file mode 100644 index 0000000..4a622bb --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/OutOfResourceException.html @@ -0,0 +1,247 @@ + + + + + + +OutOfResourceException + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.api.exception +
+Class OutOfResourceException

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by java.lang.RuntimeException
+              extended by ioio.lib.api.exception.OutOfResourceException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class OutOfResourceException
extends java.lang.RuntimeException
+ + +

+The IOIO board does not have anymore of the requested resource. This + exceptions do not need to be handled if the client guarantees that the limits + on concurrent resource usage are never exceeded. +

+ +

+

+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
OutOfResourceException(java.lang.String msg) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+OutOfResourceException

+
+public OutOfResourceException(java.lang.String msg)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/class-use/ConnectionLostException.html b/IOIOLib/doc/ioio/lib/api/exception/class-use/ConnectionLostException.html new file mode 100644 index 0000000..2c7cdc0 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/class-use/ConnectionLostException.html @@ -0,0 +1,643 @@ + + + + + + +Uses of Class ioio.lib.api.exception.ConnectionLostException + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.exception.ConnectionLostException

+
+ + + + + + + + + +
+Packages that use ConnectionLostException
ioio.lib.api  
+  +

+ + + + + +
+Uses of ConnectionLostException in ioio.lib.api
+  +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Methods in ioio.lib.api that throw ConnectionLostException
+ voidIcspMaster.enterProgramming() + +
+          Initiate a sequence that will put the slave device in programming mode.
+ voidIcspMaster.executeInstruction(int instruction) + +
+          Execute a single instruction on the slave MCU.
+ voidIcspMaster.exitProgramming() + +
+          Initiate a sequence that will put the slave device out of programming + mode.
+ floatPulseInput.getDuration() + +
+          Gets the pulse duration in case of pulse measurement mode, or the period + in case of frequency mode.
+ floatPulseInput.getFrequency() + +
+          Gets the momentary frequency of the measured signal.
+ java.lang.StringIOIO.getImplVersion(IOIO.VersionType v) + +
+          Query the implementation version of the system's components.
+ java.io.InputStreamIOIOConnection.getInputStream() + +
+           
+ java.io.OutputStreamIOIOConnection.getOutputStream() + +
+           
+ floatAnalogInput.getVoltage() + +
+          Gets the analog input reading, as an absolute voltage in Volt units.
+ voidIOIO.hardReset() + +
+          Equivalent to disconnecting and reconnecting the board power supply.
+ AnalogInputIOIO.openAnalogInput(int pin) + +
+          Open a pin for analog input.
+ DigitalInputIOIO.openDigitalInput(DigitalInput.Spec spec) + +
+          Open a pin for digital input.
+ DigitalInputIOIO.openDigitalInput(int pin) + +
+          Shorthand for openDigitalInput(new DigitalInput.Spec(pin)).
+ DigitalInputIOIO.openDigitalInput(int pin, + DigitalInput.Spec.Mode mode) + +
+          Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)).
+ DigitalOutputIOIO.openDigitalOutput(DigitalOutput.Spec spec, + boolean startValue) + +
+          Open a pin for digital output.
+ DigitalOutputIOIO.openDigitalOutput(int pin) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), false).
+ DigitalOutputIOIO.openDigitalOutput(int pin, + boolean startValue) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), startValue).
+ DigitalOutputIOIO.openDigitalOutput(int pin, + DigitalOutput.Spec.Mode mode, + boolean startValue) + +
+          Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode), + startValue).
+ IcspMasterIOIO.openIcspMaster() + +
+          Open an ICSP channel, enabling Flash programming of an external PIC MCU, + and in particular, another IOIO board.
+ PulseInputIOIO.openPulseInput(DigitalInput.Spec spec, + PulseInput.ClockRate rate, + PulseInput.PulseMode mode, + boolean doublePrecision) + +
+          Open a pin for pulse input.
+ PulseInputIOIO.openPulseInput(int pin, + PulseInput.PulseMode mode) + +
+          Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode, + true), i.e.
+ PwmOutputIOIO.openPwmOutput(DigitalOutput.Spec spec, + int freqHz) + +
+          Open a pin for PWM (Pulse-Width Modulation) output.
+ PwmOutputIOIO.openPwmOutput(int pin, + int freqHz) + +
+          Shorthand for openPwmOutput(new DigitalOutput.Spec(pin), freqHz).
+ SpiMasterIOIO.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.
+ SpiMasterIOIO.openSpiMaster(int miso, + int mosi, + int clk, + int[] slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+ SpiMasterIOIO.openSpiMaster(int miso, + int mosi, + int clk, + int slaveSelect, + SpiMaster.Rate rate) + +
+          Shorthand for {@link #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.
+ TwiMasterIOIO.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.
+ UartIOIO.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.
+ UartIOIO.openUart(int rx, + int tx, + int baud, + Uart.Parity parity, + Uart.StopBits stopbits) + +
+          Shorthand for + #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + , where the input pins use their default specs.
+ booleanDigitalInput.read() + +
+          Read the value sensed on the pin.
+ floatAnalogInput.read() + +
+          Gets the analog input reading, as a scaled real value between 0 and 1.
+ voidIcspMaster.readVisi() + +
+          Request a read of the VISI register on the slave MCU.
+ voidPwmOutput.setDutyCycle(float dutyCycle) + +
+          Sets the duty cycle of the PWM output.
+ voidPwmOutput.setPulseWidth(float pulseWidthUs) + +
+          The same as PwmOutput.setPulseWidth(int), but with sub-microsecond + precision.
+ voidPwmOutput.setPulseWidth(int pulseWidthUs) + +
+          Sets the pulse width of the PWM output.
+ voidIOIO.softReset() + +
+          Resets the entire state (returning to initial state), without dropping + the connection.
+ voidIOIOConnection.waitForConnect() + +
+           
+ voidIOIO.waitForConnect() + +
+          Establishes connection with the IOIO board.
+ voidDigitalInput.waitForValue(boolean value) + +
+          Block until a desired logical level is sensed.
+ floatPulseInput.waitPulseGetDuration() + +
+          Reads a single measurement from the queue.
+ booleanTwiMaster.Result.waitReady() + +
+          Wait until the asynchronous call which returned this instance is + complete.
+ voidSpiMaster.Result.waitReady() + +
+          Wait until the asynchronous call which returned this instance is + complete.
+ intIcspMaster.waitVisiResult() + +
+          Wait and return a result of a call to IcspMaster.readVisi().
+ voidDigitalOutput.write(boolean val) + +
+          Set the output of the pin.
+ voidSpiMaster.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.
+ booleanTwiMaster.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.
+ voidSpiMaster.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.ResultTwiMaster.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.ResultSpiMaster.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.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/class-use/IncompatibilityException.html b/IOIOLib/doc/ioio/lib/api/exception/class-use/IncompatibilityException.html new file mode 100644 index 0000000..6fe013b --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/class-use/IncompatibilityException.html @@ -0,0 +1,180 @@ + + + + + + +Uses of Class ioio.lib.api.exception.IncompatibilityException + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.exception.IncompatibilityException

+
+ + + + + + + + + +
+Packages that use IncompatibilityException
ioio.lib.api  
+  +

+ + + + + +
+Uses of IncompatibilityException in ioio.lib.api
+  +

+ + + + + + + + + +
Methods in ioio.lib.api that throw IncompatibilityException
+ voidIOIO.waitForConnect() + +
+          Establishes connection with the IOIO board.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/class-use/OutOfResourceException.html b/IOIOLib/doc/ioio/lib/api/exception/class-use/OutOfResourceException.html new file mode 100644 index 0000000..bba6af4 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/class-use/OutOfResourceException.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class ioio.lib.api.exception.OutOfResourceException + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.api.exception.OutOfResourceException

+
+No usage of ioio.lib.api.exception.OutOfResourceException +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/package-frame.html b/IOIOLib/doc/ioio/lib/api/exception/package-frame.html new file mode 100644 index 0000000..3d06db5 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/package-frame.html @@ -0,0 +1,36 @@ + + + + + + +ioio.lib.api.exception + + + + + + + + + + + +ioio.lib.api.exception + + + + +
+Exceptions  + +
+ConnectionLostException +
+IncompatibilityException +
+OutOfResourceException
+ + + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/package-summary.html b/IOIOLib/doc/ioio/lib/api/exception/package-summary.html new file mode 100644 index 0000000..492b825 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/package-summary.html @@ -0,0 +1,167 @@ + + + + + + +ioio.lib.api.exception + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package ioio.lib.api.exception +

+ + + + + + + + + + + + + + + + + +
+Exception Summary
ConnectionLostExceptionThrown when the connection between Android and IOIO has been lost or + disconnected.
IncompatibilityExceptionThrown when an incompatibility of system components is detected, such as when + an unsupported board hardware or software version is encountered.
OutOfResourceExceptionThe IOIO board does not have anymore of the requested resource.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/package-tree.html b/IOIOLib/doc/ioio/lib/api/exception/package-tree.html new file mode 100644 index 0000000..567e61a --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/package-tree.html @@ -0,0 +1,160 @@ + + + + + + +ioio.lib.api.exception Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package ioio.lib.api.exception +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/exception/package-use.html b/IOIOLib/doc/ioio/lib/api/exception/package-use.html new file mode 100644 index 0000000..42c0377 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/exception/package-use.html @@ -0,0 +1,178 @@ + + + + + + +Uses of Package ioio.lib.api.exception + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
ioio.lib.api.exception

+
+ + + + + + + + + +
+Packages that use ioio.lib.api.exception
ioio.lib.api  
+  +

+ + + + + + + + + + + +
+Classes in ioio.lib.api.exception used by ioio.lib.api
ConnectionLostException + +
+          Thrown when the connection between Android and IOIO has been lost or + disconnected.
IncompatibilityException + +
+          Thrown when an incompatibility of system components is detected, such as when + an unsupported board hardware or software version is encountered.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/package-frame.html b/IOIOLib/doc/ioio/lib/api/package-frame.html new file mode 100644 index 0000000..d787a7a --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/package-frame.html @@ -0,0 +1,102 @@ + + + + + + +ioio.lib.api + + + + + + + + + + + +ioio.lib.api + + + + +
+Interfaces  + +
+AnalogInput +
+Closeable +
+DigitalInput +
+DigitalOutput +
+IcspMaster +
+IOIO +
+IOIOConnection +
+PulseInput +
+PwmOutput +
+SpiMaster +
+SpiMaster.Result +
+TwiMaster +
+TwiMaster.Result +
+Uart
+ + + + + + +
+Classes  + +
+DigitalInput.Spec +
+DigitalOutput.Spec +
+IOIOFactory +
+SpiMaster.Config
+ + + + + + +
+Enums  + +
+DigitalInput.Spec.Mode +
+DigitalOutput.Spec.Mode +
+IOIO.VersionType +
+PulseInput.ClockRate +
+PulseInput.PulseMode +
+SpiMaster.Rate +
+TwiMaster.Rate +
+Uart.Parity +
+Uart.StopBits
+ + + + diff --git a/IOIOLib/doc/ioio/lib/api/package-summary.html b/IOIOLib/doc/ioio/lib/api/package-summary.html new file mode 100644 index 0000000..d5eb330 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/package-summary.html @@ -0,0 +1,284 @@ + + + + + + +ioio.lib.api + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package ioio.lib.api +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Interface Summary
AnalogInputA pin used for analog input.
Closeable 
DigitalInputA pin used for digital input.
DigitalOutputA pin used for digital output.
IcspMasterAn interface for controlling an ICSP channel, enabling Flash programming of + an external PIC MCU, and in particular, another IOIO board.
IOIOThis interface provides control over all the IOIO board functions.
IOIOConnection 
PulseInputAn interface for pulse width and frequency measurements of digital signals.
PwmOutputA pin used for PWM (Pulse-Width Modulation) output.
SpiMasterAn interface for controlling an SPI module, in SPI bus-master mode, enabling + communication with multiple SPI-enabled slave modules.
SpiMaster.ResultAn object that can be waited on for asynchronous calls.
TwiMasterAn interface for controlling a TWI module, in TWI bus-master mode, enabling + communication with multiple TWI-enabled slave modules.
TwiMaster.ResultAn object that can be waited on for asynchronous calls.
UartAn interface for controlling a UART module.
+  + +

+ + + + + + + + + + + + + + + + + + + + + +
+Class Summary
DigitalInput.SpecA digital input pin specification, used when opening digital inputs.
DigitalOutput.SpecA digital output pin specification, used when opening digital outputs.
IOIOFactoryFactory class for creating instances of the IOIO interface.
SpiMaster.ConfigSPI configuration structure.
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Enum Summary
DigitalInput.Spec.ModeInput pin mode.
DigitalOutput.Spec.ModeOutput pin mode.
IOIO.VersionTypeA versioned component in the system.
PulseInput.ClockRateSuported clock rate enum.
PulseInput.PulseModeAn enumeration for describing the module's operating mode.
SpiMaster.RatePossible data rates for SPI, in Hz.
TwiMaster.Rate 
Uart.ParityParity-bit mode.
Uart.StopBitsNumber of stop-bits.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/package-tree.html b/IOIOLib/doc/ioio/lib/api/package-tree.html new file mode 100644 index 0000000..82d8718 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/package-tree.html @@ -0,0 +1,170 @@ + + + + + + +ioio.lib.api Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package ioio.lib.api +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+ +

+Enum Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/api/package-use.html b/IOIOLib/doc/ioio/lib/api/package-use.html new file mode 100644 index 0000000..cd0d47d --- /dev/null +++ b/IOIOLib/doc/ioio/lib/api/package-use.html @@ -0,0 +1,323 @@ + + + + + + +Uses of Package ioio.lib.api + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
ioio.lib.api

+
+ + + + + + + + + +
+Packages that use ioio.lib.api
ioio.lib.api  
+  +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Classes in ioio.lib.api used by ioio.lib.api
AnalogInput + +
+          A pin used for analog input.
Closeable + +
+           
DigitalInput + +
+          A pin used for digital input.
DigitalInput.Spec + +
+          A digital input pin specification, used when opening digital inputs.
DigitalInput.Spec.Mode + +
+          Input pin mode.
DigitalOutput + +
+          A pin used for digital output.
DigitalOutput.Spec + +
+          A digital output pin specification, used when opening digital outputs.
DigitalOutput.Spec.Mode + +
+          Output pin mode.
IcspMaster + +
+          An interface for controlling an ICSP channel, enabling Flash programming of + an external PIC MCU, and in particular, another IOIO board.
IOIO + +
+          This interface provides control over all the IOIO board functions.
IOIO.VersionType + +
+          A versioned component in the system.
IOIOConnection + +
+           
PulseInput + +
+          An interface for pulse width and frequency measurements of digital signals.
PulseInput.ClockRate + +
+          Suported clock rate enum.
PulseInput.PulseMode + +
+          An enumeration for describing the module's operating mode.
PwmOutput + +
+          A pin used for PWM (Pulse-Width Modulation) output.
SpiMaster + +
+          An interface for controlling an SPI module, in SPI bus-master mode, enabling + communication with multiple SPI-enabled slave modules.
SpiMaster.Config + +
+          SPI configuration structure.
SpiMaster.Rate + +
+          Possible data rates for SPI, in Hz.
SpiMaster.Result + +
+          An object that can be waited on for asynchronous calls.
TwiMaster + +
+          An interface for controlling a TWI module, in TWI bus-master mode, enabling + communication with multiple TWI-enabled slave modules.
TwiMaster.Rate + +
+           
TwiMaster.Result + +
+          An object that can be waited on for asynchronous calls.
Uart + +
+          An interface for controlling a UART module.
Uart.Parity + +
+          Parity-bit mode.
Uart.StopBits + +
+          Number of stop-bits.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/AbstractIOIOActivity.html b/IOIOLib/doc/ioio/lib/util/AbstractIOIOActivity.html new file mode 100644 index 0000000..20545f6 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/AbstractIOIOActivity.html @@ -0,0 +1,258 @@ + + + + + + +AbstractIOIOActivity + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.util +
+Class AbstractIOIOActivity

+
+java.lang.Object
+  extended by Activity
+      extended by ioio.lib.util.AbstractIOIOActivity
+
+
+
+
public abstract class AbstractIOIOActivity
extends Activity
+ + +

+A convenience class for easy creation of IOIO-based applications. + + It is used by creating a concrete Activity in your application, which extends + this class. This class then takes care of proper creation and abortion of the + IOIO connection and of a dedicated thread for IOIO communication. + + In the basic usage the client should extend this class and implement + createIOIOThread(), which should return an implementation of the + IOIOThread abstract class. In this implementation, the client + implements the IOIOThread#setup() method, which gets called as soon + as communication with the IOIO is established, and the #loop() method, which gets called repetitively as long as the IOIO is + connected. Both methods should access the IOIOThread#ioio_ field for + controlling the IOIO. + + In addition, the IOIOThread#disconnected() method may be overridden + in order to execute logic as soon as a disconnection occurs for whichever + reason. The IOIOThread#incompatible() method may be overridden in + order to take action in case where a IOIO whose firmware is incompatible with + the IOIOLib version that application is built with. + + In a more advanced use case, more than one IOIO is available. In this case, a + thread will be created for each IOIO, whose semantics are as defined above. + If the client needs to be able to distinguish between them, it is possible to + override createIOIOThread(String, Object[]) instead of + createIOIOThread(). The first argument provided will contain the + connection class name, such as ioio.lib.impl.SocketIOIOConnection for a + connection established over a TCP socket (which is used over ADB). The second + argument will contain information specific to the connection type. For + example, in the case of SocketIOIOConnection, the array will contain an + Integer representing the local port number. +

+ +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
AbstractIOIOActivity() + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+AbstractIOIOActivity

+
+public AbstractIOIOActivity()
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.IOIOConnectionSpec.html b/IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.IOIOConnectionSpec.html new file mode 100644 index 0000000..ec5341b --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.IOIOConnectionSpec.html @@ -0,0 +1,283 @@ + + + + + + +IOIOConnectionDiscovery.IOIOConnectionSpec + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.util +
+Class IOIOConnectionDiscovery.IOIOConnectionSpec

+
+java.lang.Object
+  extended by ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec
+
+
+
Enclosing interface:
IOIOConnectionDiscovery
+
+
+
+
public static class IOIOConnectionDiscovery.IOIOConnectionSpec
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+ java.lang.Object[]args + +
+           
+ java.lang.StringclassName + +
+           
+  + + + + + + + + + + +
+Constructor Summary
IOIOConnectionDiscovery.IOIOConnectionSpec(java.lang.String c, + java.lang.Object[] a) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+className

+
+public final java.lang.String className
+
+
+
+
+
+ +

+args

+
+public final java.lang.Object[] args
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+IOIOConnectionDiscovery.IOIOConnectionSpec

+
+public IOIOConnectionDiscovery.IOIOConnectionSpec(java.lang.String c,
+                                                  java.lang.Object[] a)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.html b/IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.html new file mode 100644 index 0000000..c21e1e3 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/IOIOConnectionDiscovery.html @@ -0,0 +1,226 @@ + + + + + + +IOIOConnectionDiscovery + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.util +
+Interface IOIOConnectionDiscovery

+
+
All Known Implementing Classes:
SocketIOIOConnectionDiscovery
+
+
+
+
public interface IOIOConnectionDiscovery
+ + +

+


+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classIOIOConnectionDiscovery.IOIOConnectionSpec + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidgetSpecs(java.util.Collection<IOIOConnectionDiscovery.IOIOConnectionSpec> result) + +
+           
+  +

+ + + + + + + + +
+Method Detail
+ +

+getSpecs

+
+void getSpecs(java.util.Collection<IOIOConnectionDiscovery.IOIOConnectionSpec> result)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/SocketIOIOConnectionDiscovery.html b/IOIOLib/doc/ioio/lib/util/SocketIOIOConnectionDiscovery.html new file mode 100644 index 0000000..d8d24ab --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/SocketIOIOConnectionDiscovery.html @@ -0,0 +1,277 @@ + + + + + + +SocketIOIOConnectionDiscovery + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +ioio.lib.util +
+Class SocketIOIOConnectionDiscovery

+
+java.lang.Object
+  extended by ioio.lib.util.SocketIOIOConnectionDiscovery
+
+
+
All Implemented Interfaces:
IOIOConnectionDiscovery
+
+
+
+
public class SocketIOIOConnectionDiscovery
extends java.lang.Object
implements IOIOConnectionDiscovery
+ + +

+


+ +

+ + + + + + + +
+Nested Class Summary
+ + + + + + + +
Nested classes/interfaces inherited from interface ioio.lib.util.IOIOConnectionDiscovery
IOIOConnectionDiscovery.IOIOConnectionSpec
+  + + + + + + + + + + + +
+Constructor Summary
SocketIOIOConnectionDiscovery() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ voidgetSpecs(java.util.Collection<IOIOConnectionDiscovery.IOIOConnectionSpec> result) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+SocketIOIOConnectionDiscovery

+
+public SocketIOIOConnectionDiscovery()
+
+
+ + + + + + + + +
+Method Detail
+ +

+getSpecs

+
+public void getSpecs(java.util.Collection<IOIOConnectionDiscovery.IOIOConnectionSpec> result)
+
+
+
Specified by:
getSpecs in interface IOIOConnectionDiscovery
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/class-use/AbstractIOIOActivity.html b/IOIOLib/doc/ioio/lib/util/class-use/AbstractIOIOActivity.html new file mode 100644 index 0000000..9d1f4e3 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/class-use/AbstractIOIOActivity.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class ioio.lib.util.AbstractIOIOActivity + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.util.AbstractIOIOActivity

+
+No usage of ioio.lib.util.AbstractIOIOActivity +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.IOIOConnectionSpec.html b/IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.IOIOConnectionSpec.html new file mode 100644 index 0000000..0a9e0e0 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.IOIOConnectionSpec.html @@ -0,0 +1,188 @@ + + + + + + +Uses of Class ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec

+
+ + + + + + + + + +
+Packages that use IOIOConnectionDiscovery.IOIOConnectionSpec
ioio.lib.util  
+  +

+ + + + + +
+Uses of IOIOConnectionDiscovery.IOIOConnectionSpec in ioio.lib.util
+  +

+ + + + + + + + + + + + + +
Method parameters in ioio.lib.util with type arguments of type IOIOConnectionDiscovery.IOIOConnectionSpec
+ voidSocketIOIOConnectionDiscovery.getSpecs(java.util.Collection<IOIOConnectionDiscovery.IOIOConnectionSpec> result) + +
+           
+ voidIOIOConnectionDiscovery.getSpecs(java.util.Collection<IOIOConnectionDiscovery.IOIOConnectionSpec> result) + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.html b/IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.html new file mode 100644 index 0000000..1fc7342 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/class-use/IOIOConnectionDiscovery.html @@ -0,0 +1,180 @@ + + + + + + +Uses of Interface ioio.lib.util.IOIOConnectionDiscovery + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Interface
ioio.lib.util.IOIOConnectionDiscovery

+
+ + + + + + + + + +
+Packages that use IOIOConnectionDiscovery
ioio.lib.util  
+  +

+ + + + + +
+Uses of IOIOConnectionDiscovery in ioio.lib.util
+  +

+ + + + + + + + + +
Classes in ioio.lib.util that implement IOIOConnectionDiscovery
+ classSocketIOIOConnectionDiscovery + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/class-use/SocketIOIOConnectionDiscovery.html b/IOIOLib/doc/ioio/lib/util/class-use/SocketIOIOConnectionDiscovery.html new file mode 100644 index 0000000..0c2b6c8 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/class-use/SocketIOIOConnectionDiscovery.html @@ -0,0 +1,144 @@ + + + + + + +Uses of Class ioio.lib.util.SocketIOIOConnectionDiscovery + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
ioio.lib.util.SocketIOIOConnectionDiscovery

+
+No usage of ioio.lib.util.SocketIOIOConnectionDiscovery +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/package-frame.html b/IOIOLib/doc/ioio/lib/util/package-frame.html new file mode 100644 index 0000000..b137e0e --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/package-frame.html @@ -0,0 +1,47 @@ + + + + + + +ioio.lib.util + + + + + + + + + + + +ioio.lib.util + + + + +
+Interfaces  + +
+IOIOConnectionDiscovery
+ + + + + + +
+Classes  + +
+AbstractIOIOActivity +
+IOIOConnectionDiscovery.IOIOConnectionSpec +
+SocketIOIOConnectionDiscovery
+ + + + diff --git a/IOIOLib/doc/ioio/lib/util/package-summary.html b/IOIOLib/doc/ioio/lib/util/package-summary.html new file mode 100644 index 0000000..b3adc14 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/package-summary.html @@ -0,0 +1,179 @@ + + + + + + +ioio.lib.util + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package ioio.lib.util +

+ + + + + + + + + +
+Interface Summary
IOIOConnectionDiscovery 
+  + +

+ + + + + + + + + + + + + + + + + +
+Class Summary
AbstractIOIOActivityA convenience class for easy creation of IOIO-based applications.
IOIOConnectionDiscovery.IOIOConnectionSpec 
SocketIOIOConnectionDiscovery 
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/package-tree.html b/IOIOLib/doc/ioio/lib/util/package-tree.html new file mode 100644 index 0000000..8d4dccb --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/package-tree.html @@ -0,0 +1,161 @@ + + + + + + +ioio.lib.util Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package ioio.lib.util +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/ioio/lib/util/package-use.html b/IOIOLib/doc/ioio/lib/util/package-use.html new file mode 100644 index 0000000..55b2995 --- /dev/null +++ b/IOIOLib/doc/ioio/lib/util/package-use.html @@ -0,0 +1,176 @@ + + + + + + +Uses of Package ioio.lib.util + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
ioio.lib.util

+
+ + + + + + + + + +
+Packages that use ioio.lib.util
ioio.lib.util  
+  +

+ + + + + + + + + + + +
+Classes in ioio.lib.util used by ioio.lib.util
IOIOConnectionDiscovery + +
+           
IOIOConnectionDiscovery.IOIOConnectionSpec + +
+           
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/overview-frame.html b/IOIOLib/doc/overview-frame.html new file mode 100644 index 0000000..e37fff0 --- /dev/null +++ b/IOIOLib/doc/overview-frame.html @@ -0,0 +1,46 @@ + + + + + + +Overview List + + + + + + + + + + + + + + + +
+
+ + + + + +
All Classes +

+ +Packages +
+ioio.lib.api +
+ioio.lib.api.exception +
+ioio.lib.util +
+

+ +

+  + + diff --git a/IOIOLib/doc/overview-summary.html b/IOIOLib/doc/overview-summary.html new file mode 100644 index 0000000..16a3890 --- /dev/null +++ b/IOIOLib/doc/overview-summary.html @@ -0,0 +1,164 @@ + + + + + + +Overview + + + + + + + + + + + + +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+IOIOLib Documentation +

+
+ + + + + + + + + + + + + + + + + +
+Packages
ioio.lib.api 
ioio.lib.api.exception 
ioio.lib.util 
+ +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/overview-tree.html b/IOIOLib/doc/overview-tree.html new file mode 100644 index 0000000..1e14ac0 --- /dev/null +++ b/IOIOLib/doc/overview-tree.html @@ -0,0 +1,179 @@ + + + + + + +Class Hierarchy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For All Packages

+
+
+
Package Hierarchies:
ioio.lib.api, ioio.lib.api.exception, ioio.lib.util
+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+ +

+Enum Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/package-list b/IOIOLib/doc/package-list new file mode 100644 index 0000000..6bb3c0a --- /dev/null +++ b/IOIOLib/doc/package-list @@ -0,0 +1,3 @@ +ioio.lib.api +ioio.lib.api.exception +ioio.lib.util diff --git a/IOIOLib/doc/resources/inherit.gif b/IOIOLib/doc/resources/inherit.gif new file mode 100644 index 0000000000000000000000000000000000000000..c814867a13deb0ca7ea2156c6ca1d5a03372af7e GIT binary patch literal 57 zcmZ?wbhEHbIIT!9-C*e{wE9>Kx3D)-;0v)C; KYxQGgum%9JOA&7X literal 0 HcmV?d00001 diff --git a/IOIOLib/doc/serialized-form.html b/IOIOLib/doc/serialized-form.html new file mode 100644 index 0000000..6320e89 --- /dev/null +++ b/IOIOLib/doc/serialized-form.html @@ -0,0 +1,194 @@ + + + + + + +Serialized Form + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Serialized Form

+
+
+ + + + + +
+Package ioio.lib.api.exception
+ +

+ + + + + +
+Class ioio.lib.api.exception.ConnectionLostException extends java.lang.Exception implements Serializable
+ +

+serialVersionUID: 7422862446246046772L + +

+ +

+ + + + + +
+Class ioio.lib.api.exception.IncompatibilityException extends java.lang.Exception implements Serializable
+ +

+serialVersionUID: -613939818063932627L + +

+ +

+ + + + + +
+Class ioio.lib.api.exception.OutOfResourceException extends java.lang.RuntimeException implements Serializable
+ +

+serialVersionUID: -4482605241361881899L + +

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/IOIOLib/doc/stylesheet.css b/IOIOLib/doc/stylesheet.css new file mode 100644 index 0000000..6ea9e51 --- /dev/null +++ b/IOIOLib/doc/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + diff --git a/IOIOLib/javadoc.xml b/IOIOLib/javadoc.xml new file mode 100644 index 0000000..37a8671 --- /dev/null +++ b/IOIOLib/javadoc.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/IOIOLib/local.properties b/IOIOLib/local.properties new file mode 100644 index 0000000..10fa6fa --- /dev/null +++ b/IOIOLib/local.properties @@ -0,0 +1,10 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must *NOT* be checked in Version Control Systems, +# as it contains information specific to your local configuration. + +# location of the SDK. This is only used by Ant +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=/Users/ytai/android-sdk-mac_x86 diff --git a/IOIOLib/proguard.cfg b/IOIOLib/proguard.cfg new file mode 100755 index 0000000..b1cdf17 --- /dev/null +++ b/IOIOLib/proguard.cfg @@ -0,0 +1,40 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/IOIOLib/project.properties b/IOIOLib/project.properties new file mode 100644 index 0000000..f28bc83 --- /dev/null +++ b/IOIOLib/project.properties @@ -0,0 +1,12 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +android.library=true +# Project target. +target=android-15 diff --git a/IOIOLib/res/.gitignore b/IOIOLib/res/.gitignore new file mode 100644 index 0000000..76bedae --- /dev/null +++ b/IOIOLib/res/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore + diff --git a/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOListener.java b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOListener.java new file mode 100644 index 0000000..8f81c76 --- /dev/null +++ b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOListener.java @@ -0,0 +1,53 @@ +/** + * IOIOListener.java + * @date Jan 24, 2012 + * @author ricky barrette + * @author Twenty Codes, LLC + * + * Copyright 2012 Richard Barrette + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.TwentyCodes.android.ioio; + +import ioio.lib.api.IOIO; +import ioio.lib.api.exception.ConnectionLostException; + +/** + * This is a simple interface used to pass information from the IOIO thread to the manager + * @author ricky barrette + */ +public interface IOIOListener { + + /** + * Called when a IOIO is connected. + * here is a good time to init ports + * @param ioio + * @author ricky barrette + */ + public void onConnected(IOIO ioio) throws ConnectionLostException; + + /** + * Called when the IOIO thread loops. + * Here you want to update the ports + * @author ricky barrette + */ + public void loop() throws ConnectionLostException; + + /** + * Called when the IOIO is disconnected. + * @author ricky barrette + */ + public void onDisconnected(); + +} diff --git a/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOManager.java b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOManager.java new file mode 100644 index 0000000..db14bec --- /dev/null +++ b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOManager.java @@ -0,0 +1,132 @@ +/** + * IOIOManager.java + * @date Jan 21, 2012 + * @author ricky barrette + * @author Twenty Codes, LLC + * + * Copyright 2012 Richard Barrette + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.TwentyCodes.android.ioio; + +import ioio.lib.bluetooth.BluetoothIOIOConnectionDiscovery; +import ioio.lib.util.IOIOConnectionDiscovery; +import ioio.lib.util.SocketIOIOConnectionDiscovery; +import ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec; + +import java.util.Collection; +import java.util.LinkedList; + +import android.util.Log; + +/** + * This class manages the IOIO connectivity threads. It is based on the AbstractIOIOActivity + * Remember that onConnected(), loop(), and onDisconnected() are called from the one of the IOIO threads + * @author ricky barrette + */ +public abstract class IOIOManager implements IOIOListener{ + + private static final String TAG = "IOIOManager"; + private Collection mThreads = new LinkedList(); + + /** + * Aborts the IOIO connectivity threads and joins them + * @throws InterruptedException + * @author ricky barrette + */ + public void abort() throws InterruptedException { + for (IOIOThread thread : mThreads) + thread.abort(); + joinAllThreads(); + } + + /** + * Joins all the threads + * @throws InterruptedException + * @author ricky barrette + */ + private void joinAllThreads() throws InterruptedException { + for (IOIOThread thread : mThreads) + thread.join(); + } + + /** + * Creates all the required IOIO connectivity threads + * @author ricky barrette + */ + private void createAllThreads() { + mThreads.clear(); + Collection specs = getConnectionSpecs(); + for (IOIOConnectionSpec spec : specs) + mThreads.add(new IOIOThread(spec.className, spec.args, this)); + } + + /** + * Starts IOIO connectivity threads + * @author ricky barrette + */ + public void start() { + createAllThreads(); + for (IOIOThread thread : mThreads) + thread.start(); + } + + /** + * @return + * @author Ytai Ben-Tsvi + */ + private Collection getConnectionSpecs() { + Collection result = new LinkedList(); + addConnectionSpecs(SocketIOIOConnectionDiscovery.class.getName(),result); + addConnectionSpecs(BluetoothIOIOConnectionDiscovery.class.getName(), result); + return result; + } + + /** + * @param discoveryClassName + * @param result + * @author Ytai Ben-Tsvi + */ + private void addConnectionSpecs(String discoveryClassName, Collection result) { + try { + Class cls = Class.forName(discoveryClassName); + IOIOConnectionDiscovery discovery = (IOIOConnectionDiscovery) cls.newInstance(); + discovery.getSpecs(result); + } catch (ClassNotFoundException e) { + Log.d(TAG, "Discovery class not found: " + discoveryClassName+ ". Not adding."); + } catch (Exception e) { + Log.w(TAG,"Exception caught while discovering connections - not adding connections of class "+ discoveryClassName, e); + } + } + + /** + * @param isStatLedEnabled the isStatLedEnabled to set + * @author ricky barrette + */ + public void setStatLedEnabled(boolean isStatLedEnabled) { + for(IOIOThread thread : mThreads) + thread.setStatLedEnabled(isStatLedEnabled); + } + + /** + * Sets the update interval of the IOIO thread + * @param ms + * @author ricky barrette + */ + public void setUpdateInverval(long ms){ + for(IOIOThread thread : mThreads) + thread.setUpdateInverval(ms); + } + +} \ No newline at end of file diff --git a/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOThread.java b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOThread.java new file mode 100644 index 0000000..3f61254 --- /dev/null +++ b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOThread.java @@ -0,0 +1,161 @@ +/** + * IOIOThread.java + * @date Jan 11, 2012 + * @author ricky barrette + * @author Ytai Ben-Tsvi + * @author Twenty Codes, LLC + * + * Copyright 2012 Richard Barrette + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.TwentyCodes.android.ioio; + +import ioio.lib.api.DigitalOutput; +import ioio.lib.api.IOIO; +import ioio.lib.api.IOIOFactory; +import ioio.lib.api.exception.ConnectionLostException; + +/** + * This is the thread that maintains the IOIO interaction. + * + * It first creates a IOIO instance and wait for a connection to be + * established. + * + * Whenever a connection drops, it tries to reconnect, unless this is a + * result of abort(). + * + * @author Ytai Ben-Tsvi + * @author ricky barrette + */ +public class IOIOThread extends Thread{ + + private IOIO mIOIO; + private boolean isAborted = false; + private long mUpdateInterval = 10; + private boolean isStatLedEnabled = false; + private IOIOListener mListener; + private String mClassName; + private Object[] mArgs; + + public IOIOThread(IOIOListener listener){ + super(); + mListener = listener; + } + + public IOIOThread(String className, Object[] args, IOIOListener listener) { + super(); + mListener = listener; + mClassName = className; + mArgs = args; + } + + /** + * Abort the connection. + * + * This is a little tricky synchronization-wise: we need to be handle + * the case of abortion happening before the IOIO instance is created or + * during its creation. + */ + synchronized public void abort() { + isAborted = true; + if (mIOIO != null) { + mIOIO.disconnect(); + } + } + + /** + * @return the isStatLedEnabled + */ + public boolean isStatLedEnabled() { + return isStatLedEnabled; + } + + + /** + * Thread Body + * (non-Javadoc) + * @see java.lang.Thread#run() + */ + @Override + public void run() { + while (true) { + synchronized (this) { + if (isAborted) { + break; + } + if(mClassName == null || mArgs == null) + mIOIO = IOIOFactory.create(); + else + try { + mIOIO = IOIOFactory.create(mClassName, mArgs); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + } + try { + /* + * Here we will try to connect to the IOIO board. + * + * the waitForConnect() is blocking until it can connect + */ + mIOIO.waitForConnect(); + + /* + * Here we register and initialize each port + */ + DigitalOutput statLed = mIOIO.openDigitalOutput(IOIOValues.STAT_LED_PORT, true); + mListener.onConnected(mIOIO); + + /* + * Here we will update the ports every 10 ms (default) + */ + while (true) { + mListener.loop(); + statLed.write(!isStatLedEnabled); + sleep(mUpdateInterval ); + } + } catch (ConnectionLostException e) { + mListener.onDisconnected(); + } catch (Exception e) { + e.printStackTrace(); + mIOIO.disconnect(); + mListener.onDisconnected(); + break; + } finally { + try { + mIOIO.waitForDisconnect(); + mListener.onDisconnected(); + } catch (InterruptedException e) { + } + } + } + } + + /** + * Sets the stat led on / off + * @param isStatLedEnabled the isStatLedEnabled to set + */ + public synchronized void setStatLedEnabled(boolean isStatLedEnabled) { + this.isStatLedEnabled = isStatLedEnabled; + } + + /** + * Sets the update interval of the IOIO thread + * @param ms + */ + public synchronized void setUpdateInverval(long ms){ + mUpdateInterval = ms; + } + +} \ No newline at end of file diff --git a/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOValues.java b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOValues.java new file mode 100644 index 0000000..cbdbab1 --- /dev/null +++ b/IOIOLib/src/com/TwentyCodes/android/ioio/IOIOValues.java @@ -0,0 +1,32 @@ +/** + * IOIOValues.java + * @date Jan 24, 2012 + * @author ricky barrette + * @author Twenty Codes, LLC + * + * Copyright 2012 Richard Barrette + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.TwentyCodes.android.ioio; + +/** + * This class contains values for the IOIO + * @author ricky barrette + */ +public class IOIOValues { + + public static final int STAT_LED_PORT = 0 ; + + public static final int RC_PWM_FRQ = 50; +} \ No newline at end of file diff --git a/IOIOLib/src/ioio/lib/api/AnalogInput.java b/IOIOLib/src/ioio/lib/api/AnalogInput.java new file mode 100644 index 0000000..dab37f8 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/AnalogInput.java @@ -0,0 +1,104 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ + +package ioio.lib.api; + +import ioio.lib.api.exception.ConnectionLostException; + +/** + * A pin used for analog input. + *

+ * An analog input pin can be used to measure voltage. AnalogInput instances are + * obtained by calling {@link IOIO#openAnalogInput(int)}. + *

+ * Floating-point values scaled from 0 to 1 can be obtained by calling + * {@link #read()}. Absolute voltage levels can be obtained by calling + * {@link #getVoltage()}. + *

+ * The instance is alive since its creation. The first {@link #read()} call + * block for a few milliseconds until the initial value is updated. If the + * connection with the IOIO drops at any point, the instance transitions to a + * disconnected state, in which every attempt to use the pin (except + * {@link #close()}) will throw a {@link ConnectionLostException}. Whenever + * {@link #close()} is invoked the instance may no longer be used. Any resources + * associated with it are freed and can be reused. + *

+ * Typical usage: + * + *

+ * AnalogInput potentiometer = ioio.openAnalogInput(40);
+ * float value = potentiometer.read();
+ * ...
+ * potentiometer.close();  // pin 40 can now be used for something else.
+ * 
+ * + * @see IOIO#openAnalogInput(int) + */ +public interface AnalogInput extends Closeable { + /** + * Gets the analog input reading, as an absolute voltage in Volt units. + *

+ * It typically takes a few milliseconds between when the instance is + * created and until the first value can be read. In this case, the method + * may block shortly. If this is a problem, the calling thread can be + * interrupted. + *

+ * If a scaled value is desired, consider using {@link #read()}. + * + * @return The voltage, in Volt units. + * @throws InterruptedException The calling thread has been interrupted. + * @throws ConnectionLostException The connection with the IOIO is lost. + * @see #read() + */ + public float getVoltage() throws InterruptedException, + ConnectionLostException; + + /** + * Gets the maximum value against which {@link #read()} values are scaled. + * @return The voltage, in Volts. + */ + public float getReference(); + + /** + * Gets the analog input reading, as a scaled real value between 0 and 1. + *

+ * It typically takes a few milliseconds between when the instance is + * created and until the first value can be read. In this case, the method + * may block shortly. If this is a problem, the calling thread can be + * interrupted. + *

+ * If an absolute value is desired, consider using {@link #getVoltage()}. + * + * @return The voltage, in scaled units. + * @throws InterruptedException The calling thread has been interrupted. + * @throws ConnectionLostException The connection with the IOIO is lost. + * @see #getVoltage() + */ + public float read() throws InterruptedException, ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/Closeable.java b/IOIOLib/src/ioio/lib/api/Closeable.java new file mode 100644 index 0000000..353c95d --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/Closeable.java @@ -0,0 +1,5 @@ +package ioio.lib.api; + +public interface Closeable { + void close(); +} diff --git a/IOIOLib/src/ioio/lib/api/DigitalInput.java b/IOIOLib/src/ioio/lib/api/DigitalInput.java new file mode 100644 index 0000000..63567e2 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/DigitalInput.java @@ -0,0 +1,140 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.exception.ConnectionLostException; + +/** + * A pin used for digital input. + *

+ * A digital input pin can be used to read logic-level signals. DigitalInput + * instances are obtained by calling {@link IOIO#openDigitalInput(Spec)}. + *

+ * The value of the pin is obtained by calling {@link #read()}. It is also + * possible for the client to block until a certain level is sensed, by using + * {@link #waitForValue(boolean)}. + *

+ * The instance is alive since its creation. The first {@link #read()} call + * block for a few milliseconds until the initial value is updated. If the + * connection with the IOIO drops at any point, the instance transitions to a + * disconnected state, in which every attempt to use the pin (except + * {@link #close()}) will throw a {@link ConnectionLostException}. Whenever + * {@link #close()} is invoked the instance may no longer be used. Any resources + * associated with it are freed and can be reused. + *

+ * Typical usage: + * + *

+ * DigitalInput button = ioio.openDigitalInput(10);  // used an external pull-up
+ * button.waitForValue(false);  // wait for press
+ * ...
+ * button.close();  // pin 10 can now be used for something else.
+ * 
+ */ +public interface DigitalInput extends Closeable { + /** + * A digital input pin specification, used when opening digital inputs. + */ + static public class Spec { + /** Input pin mode. */ + public enum Mode { + /** + * Pin is floating. When the pin is left disconnected the value + * sensed is undefined. Use this mode when an external pull-up or + * pull-down resistor is used or when interfacing push-pull type + * logic circuits. + */ + FLOATING, + /** + * Internal pull-up resistor is used. When the pin is left + * disconnected, a logical "HIGH" (true) will be sensed. This is + * useful for interfacing with open drain circuits or for + * interacting with a switch connected between the pin and ground. + */ + PULL_UP, + /** + * Internal pull-down resistor is used. When the pin is left + * disconnected, a logical "LOW" (false) will be sensed. This is + * useful for interacting with a switch connected between the pin + * and Vdd. + */ + PULL_DOWN + } + + /** The pin number, as labeled on the board. */ + public int pin; + /** The pin mode. */ + public Mode mode; + + /** + * Constructor. + * + * @param pin + * Pin number, as labeled on the board. + * @param mode + * Pin mode. + */ + public Spec(int pin, Mode mode) { + this.pin = pin; + this.mode = mode; + } + + /** Shorthand for Spec(pin, Mode.FLOATING). */ + public Spec(int pin) { + this(pin, Mode.FLOATING); + } + } + + /** + * Read the value sensed on the pin. May block for a few milliseconds if + * called right after creation of the instance. If this is a problem, the + * calling thread may be interrupted. + * + * @return True for logical "HIGH", false for logical "LOW". + * @throws InterruptedException + * The calling thread has been interrupted. + * @throws ConnectionLostException + * The connection with the IOIO has been lost. + */ + public boolean read() throws InterruptedException, ConnectionLostException; + + /** + * Block until a desired logical level is sensed. The calling thread can be + * interrupted for aborting this operation. + * + * @param value + * The desired logical level. true for "HIGH", false for "LOW". + * @throws InterruptedException + * The calling thread has been interrupted. + * @throws ConnectionLostException + * The connection with the IOIO has been lost. + */ + public void waitForValue(boolean value) throws InterruptedException, + ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/DigitalOutput.java b/IOIOLib/src/ioio/lib/api/DigitalOutput.java new file mode 100644 index 0000000..fe8a09d --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/DigitalOutput.java @@ -0,0 +1,120 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.exception.ConnectionLostException; + +/** + * A pin used for digital output. + *

+ * A digital input pin can be used to generate logic-level signals. + * DigitalOutput instances are obtained by calling + * {@link IOIO#openDigitalOutput(Spec, boolean)}. + *

+ * The value of the pin is set by calling {@link #write(boolean)}. + *

+ * The instance is alive since its creation. If the connection with the IOIO + * drops at any point, the instance transitions to a disconnected state, in + * which every attempt to use the pin (except {@link #close()}) will throw a + * {@link ConnectionLostException}. Whenever {@link #close()} is invoked the + * instance may no longer be used. Any resources associated with it are freed + * and can be reused. + *

+ * Typical usage: + * + *

+ * DigitalOutput led = ioio.openDigitalInput(2);  // LED anode on pin 2.
+ * led.write(true);  // turn LED on.
+ * ...
+ * led.close();  // pin 2 can now be used for something else.
+ * 
+ */ +public interface DigitalOutput extends Closeable { + /** + * A digital output pin specification, used when opening digital outputs. + */ + public static class Spec { + /** Output pin mode. */ + public enum Mode { + /** + * Pin operates in push-pull mode, i.e. a logical "HIGH" is + * represented by a voltage of Vdd on the pin and a logical "LOW" by + * a voltage of 0 (ground). + */ + NORMAL, + /** + * Pin operates in open-drain mode, i.e. a logical "HIGH" is + * represented by a high impedance on the pin (as if it is + * disconnected) and a logical "LOW" by a voltage of 0 (ground). + * This mode is most commonly used for generating 5V logical signal + * on a 3.3V pin: 5V tolerant pins must be used; a pull-up resistor + * is connected between the pin and 5V, and the pin is used in open- + * drain mode. + */ + OPEN_DRAIN, + } + + /** The pin number, as labeled on the board. */ + public int pin; + /** The pin mode. */ + public Mode mode; + + /** + * Constructor. + * + * @param pin + * Pin number, as labeled on the board. + * @param mode + * Pin mode. + */ + public Spec(int pin, Mode mode) { + this.pin = pin; + this.mode = mode; + } + + /** + * Shorthand for Spec(pin, Mode.NORMAL). + * + * @see #Spec(int, Mode) + */ + public Spec(int pin) { + this(pin, Mode.NORMAL); + } + } + + /** + * Set the output of the pin. + * + * @param val + * The output. true is logical "HIGH", false is logical "LOW". + * @throws ConnectionLostException + * The connection with the IOIO has been lost. + */ + public void write(boolean val) throws ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/IOIO.java b/IOIOLib/src/ioio/lib/api/IOIO.java new file mode 100644 index 0000000..4851f5c --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/IOIO.java @@ -0,0 +1,638 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.PulseInput.PulseMode; +import ioio.lib.api.TwiMaster.Rate; +import ioio.lib.api.Uart.Parity; +import ioio.lib.api.Uart.StopBits; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.api.exception.IncompatibilityException; +import ioio.lib.api.exception.OutOfResourceException; + +import java.io.Closeable; + +/** + * This interface provides control over all the IOIO board functions. + *

+ * An instance of this interface is typically obtained by using the + * {@link IOIOFactory} class. Initially, a connection should be established, by + * calling {@link #waitForConnect()}. This method will block until the board is + * connected an a connection has been established. + *

+ * During the connection process, this library verifies that the IOIO firmware + * is compatible with the required version. If not, {@link #waitForConnect()} + * will throw a {@link IncompatibilityException}, putting the {@link IOIO} + * instance in a "zombie" state: nothing could be done with it except calling + * {@link #disconnect()}, or waiting for the physical connection to drop via + * {@link #waitForDisconnect()}. + *

+ * As soon as a connection is established, the IOIO can be used, typically, by + * calling the openXXX() functions to obtain additional interfaces for + * controlling specific function of the board. + *

+ * Whenever a connection is lost as a result of physically disconnecting the + * board or as a result of calling {@link #disconnect()}, this instance and all + * the interfaces obtained from it become invalid, and will throw a + * {@link ConnectionLostException} on every operation. Once the connection is + * lost, those instances cannot be recycled, but rather it is required to create + * new ones and wait for a connection again. + *

+ * Initially all pins are tri-stated (floating), and all functions are disabled. + * Whenever a connection is lost or dropped, the board will immediately return + * to the this initial state. + *

+ * Typical usage: + * + *

+ * IOIO ioio = IOIOFactory.create();
+ * try {
+ *   ioio.waitForConnect();
+ *   DigitalOutput out = ioio.openDigitalOutput(10);
+ *   out.write(true);
+ *   ...
+ * } catch (ConnectionLostException e) {
+ * } catch (Exception e) {
+ *   ioio.disconnect();
+ * } finally {
+ *   ioio.waitForDisconnect();
+ * }
+ * 
+ * + * @see IOIOFactory#create() + */ +public interface IOIO { + /** An invalid pin number. */ + public static final int INVALID_PIN = -1; + /** The pin number used to designate the on-board 'stat' LED. */ + public static final int LED_PIN = 0; + + /** + * A versioned component in the system. + * + * @see IOIO#getImplVersion(VersionType) + */ + public enum VersionType { + /** Hardware version. */ + HARDWARE_VER, + /** Bootloader version. */ + BOOTLOADER_VER, + /** Application layer firmware version. */ + APP_FIRMWARE_VER, + /** IOIOLib version. */ + IOIOLIB_VER + } + + /** + * Establishes connection with the IOIO board. + *

+ * This method is blocking until connection is established. This method can + * be aborted by calling {@link #disconnect()}. In this case, it will throw + * a {@link ConnectionLostException}. + * + * @throws ConnectionLostException + * An error occurred during connection or disconnect() has been + * called during connection. The instance state is disconnected. + * @throws IncompatibilityException + * An incompatible board firmware of hardware has been detected. + * The instance state is disconnected. + * @see #disconnect() + * @see #waitForDisconnect() + */ + public void waitForConnect() throws ConnectionLostException, + IncompatibilityException; + + /** + * Closes the connection to the board, or aborts a connection process + * started with waitForConnect(). + *

+ * Once this method is called, this IOIO instance and all the instances + * obtain from it become invalid and will throw an exception on every + * operation. + *

+ * This method is asynchronous, i.e. it returns immediately, but it is not + * guaranteed that all connection-related resources has already been freed + * and can be reused upon return. In cases when this is important, client + * can call {@link #waitForDisconnect()}, which will block until all + * resources have been freed. + */ + public void disconnect(); + + /** + * Blocks until IOIO has been disconnected and all connection-related + * resources have been freed, so that a new connection can be attempted. + * + * @throws InterruptedException + * When interrupt() has been called on this thread. This might + * mean that an immediate attempt to create and connect a new + * IOIO object might fail for resource contention. + * @see #disconnect() + * @see #waitForConnect() + */ + public void waitForDisconnect() throws InterruptedException; + + /** + * Resets the entire state (returning to initial state), without dropping + * the connection. + *

+ * It is equivalent to calling {@link Closeable#close()} on every interface + * obtained from this instance. A connection must have been established + * prior to calling this method, by invoking {@link #waitForConnect()}. + * + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @see #hardReset() + */ + public void softReset() throws ConnectionLostException; + + /** + * Equivalent to disconnecting and reconnecting the board power supply. + *

+ * The connection will be dropped and not reestablished. Full boot sequence + * will take place, so firmware upgrades can be performed. A connection must + * have been established prior to calling this method, by invoking + * {@link #waitForConnect()}. + * + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @see #softReset() + */ + public void hardReset() throws ConnectionLostException; + + /** + * Query the implementation version of the system's components. The + * implementation version uniquely identifies a hardware revision or a + * software build. Returned version IDs are always 8-character long, + * according to the IOIO versioning system: first 4 characters are the + * version authority and last 4 characters are the revision. + * + * @param v + * The component whose version we query. + * @return An 8-character implementation version ID. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + */ + public String getImplVersion(VersionType v) throws ConnectionLostException; + + /** + * Open a pin for digital input. + *

+ * A digital input pin can be used to read logic-level signals. The pin will + * operate in this mode until close() is invoked on the returned interface. + * It is illegal to open a pin that has already been opened and has not been + * closed. A connection must have been established prior to calling this + * method, by invoking {@link #waitForConnect()}. + * + * @param spec + * Pin specification, consisting of the pin number, as labeled on + * the board, and the mode, which determines whether the pin will + * be floating, pull-up or pull-down. See + * {@link DigitalInput.Spec.Mode} for more information. + * @return Interface of the assigned pin. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @see DigitalInput + */ + public DigitalInput openDigitalInput(DigitalInput.Spec spec) + throws ConnectionLostException; + + /** + * Shorthand for openDigitalInput(new DigitalInput.Spec(pin)). + * + * @see #openDigitalInput(ioio.lib.api.DigitalInput.Spec) + */ + public DigitalInput openDigitalInput(int pin) + throws ConnectionLostException; + + /** + * Shorthand for openDigitalInput(new DigitalInput.Spec(pin, mode)). + * + * @see #openDigitalInput(ioio.lib.api.DigitalInput.Spec) + */ + public DigitalInput openDigitalInput(int pin, DigitalInput.Spec.Mode mode) + throws ConnectionLostException; + + /** + * Open a pin for digital output. + *

+ * A digital output pin can be used to generate logic-level signals. The pin + * will operate in this mode until close() is invoked on the returned + * interface. It is illegal to open a pin that has already been opened and + * has not been closed. A connection must have been established prior to + * calling this method, by invoking {@link #waitForConnect()}. + * + * @param spec + * Pin specification, consisting of the pin number, as labeled on + * the board, and the mode, which determines whether the pin will + * be normal or open-drain. See {@link DigitalOutput.Spec.Mode} + * for more information. + * @param startValue + * The initial logic level this pin will generate as soon at it + * is open. + * @return Interface of the assigned pin. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @see DigitalOutput + */ + public DigitalOutput openDigitalOutput(DigitalOutput.Spec spec, + boolean startValue) throws ConnectionLostException; + + /** + * Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin, mode), + * startValue). + * + * @see #openDigitalOutput(ioio.lib.api.DigitalOutput.Spec, boolean) + */ + public DigitalOutput openDigitalOutput(int pin, + DigitalOutput.Spec.Mode mode, boolean startValue) + throws ConnectionLostException; + + /** + * Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), startValue). + * Pin mode will be "normal" (as opposed to "open-drain". + * + * @see #openDigitalOutput(ioio.lib.api.DigitalOutput.Spec, boolean) + */ + public DigitalOutput openDigitalOutput(int pin, boolean startValue) + throws ConnectionLostException; + + /** + * Shorthand for openDigitalOutput(new DigitalOutput.Spec(pin), false). Pin + * mode will be "normal" (as opposed to "open-drain". + * + * @see #openDigitalOutput(ioio.lib.api.DigitalOutput.Spec, boolean) + */ + public DigitalOutput openDigitalOutput(int pin) + throws ConnectionLostException; + + /** + * Open a pin for analog input. + *

+ * An analog input pin can be used to measure voltage. Note that not every + * pin can be used as an analog input. See board documentation for the legal + * pins and permitted voltage range. + *

+ * The pin will operate in this mode until close() is invoked on the + * returned interface. It is illegal to open a pin that has already been + * opened and has not been closed. A connection must have been established + * prior to calling this method, by invoking {@link #waitForConnect()}. + * + * @param pin + * Pin number, as labeled on the board. + * @return Interface of the assigned pin. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @see AnalogInput + */ + public AnalogInput openAnalogInput(int pin) throws ConnectionLostException; + + /** + * Open a pin for PWM (Pulse-Width Modulation) output. + *

+ * A PWM pin produces a logic-level PWM signal. These signals are typically + * used for simulating analog outputs for controlling the intensity of LEDs, + * the rotation speed of motors, etc. They are also frequently used for + * controlling hobby servo motors. + *

+ * Note that not every pin can be used as PWM output. In addition, the total + * number of concurrent PWM modules in use is limited. See board + * documentation for the legal pins and limit on concurrent usage. + *

+ * The pin will operate in this mode until close() is invoked on the + * returned interface. It is illegal to open a pin that has already been + * opened and has not been closed. A connection must have been established + * prior to calling this method, by invoking {@link #waitForConnect()}. + * + * @param spec + * Pin specification, consisting of the pin number, as labeled on + * the board, and the mode, which determines whether the pin will + * be normal or open-drain. See {@link DigitalOutput.Spec.Mode} + * for more information. + * @param freqHz + * PWM frequency, in Hertz. + * @return Interface of the assigned pin. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @throws OutOfResourceException + * This is a runtime exception, so it is not necessary to catch + * it if the client guarantees that the total number of + * concurrent PWM resources is not exceeded. + * @see PwmOutput + */ + public PwmOutput openPwmOutput(DigitalOutput.Spec spec, int freqHz) + throws ConnectionLostException; + + /** + * Shorthand for openPwmOutput(new DigitalOutput.Spec(pin), freqHz). + * + * @see #openPwmOutput(ioio.lib.api.DigitalOutput.Spec, int) + */ + public PwmOutput openPwmOutput(int pin, int freqHz) + throws ConnectionLostException; + + /** + * Open a pin for pulse input. + *

+ * The pulse input module is quite flexible. It enables several kinds of + * timing measurements on a digital signal: pulse width measurement + * (positive or negative pulse), and frequency of a periodic signal. + *

+ * Note that not every pin can be used as pulse input. In addition, the + * total number of concurrent pulse input modules in use is limited. See + * board documentation for the legal pins and limit on concurrent usage. + *

+ * The pin will operate in this mode until close() is invoked on the + * returned interface. It is illegal to open a pin that has already been + * opened and has not been closed. A connection must have been established + * prior to calling this method, by invoking {@link #waitForConnect()}. + * + * @param spec + * Pin specification, consisting of the pin number, as labeled on + * the board, and the mode, which determines whether the pin will + * be floating, pull-up or pull-down. See + * {@link DigitalInput.Spec.Mode} for more information. + * @param rate + * The clock rate to use for timing the signal. A faster clock + * rate will result in better precision but will only be able to + * measure narrow pulses / high frequencies. + * @param mode + * The mode in which to operate. Determines whether the module + * will measure pulse durations or frequency. + * @param doublePrecision + * Whether to open a double-precision pulse input module. Double- + * precision modules enable reading of much longer pulses and + * lower frequencies with high accuracy than single precision + * modules. However, their number is limited, so when possible, + * and if the resources are all needed, use single-precision. For + * more details on the exact spec of single- vs. double- + * precision, see {@link PulseInput}. + * @return An instance of the {@link PulseInput}, which can be used to + * obtain the data. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @throws OutOfResourceException + * This is a runtime exception, so it is not necessary to catch + * it if the client guarantees that the total number of + * concurrent PWM resources is not exceeded. + * @see PulseInput + */ + public PulseInput openPulseInput(DigitalInput.Spec spec, + PulseInput.ClockRate rate, PulseInput.PulseMode mode, + boolean doublePrecision) throws ConnectionLostException; + + /** + * Shorthand for openPulseInput(new DigitalInput.Spec(pin), rate, mode, + * true), i.e. opens a double-precision, 16MHz pulse input on the given pin + * with the given mode. + * + * @see #openPulseInput(ioio.lib.api.DigitalInput.Spec, + * ioio.lib.api.PulseInput.ClockRate, PulseMode, boolean) + */ + public PulseInput openPulseInput(int pin, PulseMode mode) + throws ConnectionLostException; + + /** + * Open a UART module, enabling a bulk transfer of byte buffers. + *

+ * UART is a very common hardware communication protocol, enabling full- + * duplex, asynchronous point-to-point data transfer. It typically serves + * for opening consoles or as a basis for higher-level protocols, such as + * MIDI RS-232, and RS-485. + *

+ * Note that not every pin can be used for UART RX or TX. In addition, the + * total number of concurrent UART modules in use is limited. See board + * documentation for the legal pins and limit on concurrent usage. + *

+ * The UART module will operate, and the pins will work in their respective + * modes until close() is invoked on the returned interface. It is illegal + * to use pins that have already been opened and has not been closed. A + * connection must have been established prior to calling this method, by + * invoking {@link #waitForConnect()}. + * + * @param rx + * Pin specification for the RX pin, consisting of the pin + * number, as labeled on the board, and the mode, which + * determines whether the pin will be floating, pull-up or + * pull-down. See {@link DigitalInput.Spec.Mode} for more + * information. null can be passed to designate that we do not + * want RX input to this module. + * @param tx + * Pin specification for the TX pin, consisting of the pin + * number, as labeled on the board, and the mode, which + * determines whether the pin will be normal or open-drain. See + * {@link DigitalOutput.Spec.Mode} for more information. null can + * be passed to designate that we do not want TX output to this + * module. + * @param baud + * The clock frequency of the UART module in Hz. + * @param parity + * The parity mode, as in {@link Parity}. + * @param stopbits + * Number of stop bits, as in {@link StopBits}. + * @return Interface of the assigned module. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @throws OutOfResourceException + * This is a runtime exception, so it is not necessary to catch + * it if the client guarantees that the total number of + * concurrent UART resources is not exceeded. + * @see Uart + */ + public Uart openUart(DigitalInput.Spec rx, DigitalOutput.Spec tx, int baud, + Parity parity, StopBits stopbits) throws ConnectionLostException; + + /** + * Shorthand for + * {@link #openUart(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits)} + * , where the input pins use their default specs. {@link #INVALID_PIN} can + * be used on either pin if a TX- or RX-only UART is needed. + * + * @see #openUart(ioio.lib.api.DigitalInput.Spec, + * ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits) + */ + public Uart openUart(int rx, int tx, int baud, Parity parity, + StopBits stopbits) throws ConnectionLostException; + + /** + * Open a SPI master module, enabling communication with multiple + * SPI-enabled slave modules. + *

+ * SPI is a common hardware communication protocol, enabling full-duplex, + * synchronous point-to-multi-point data transfer. It requires MOSI, MISO + * and CLK lines shared by all nodes, as well as a SS line per slave, + * connected between this slave and a respective pin on the master. The MISO + * line should operate in pull-up mode, using either the internal pull-up or + * an external resistor. + *

+ * Note that not every pin can be used for SPI MISO, MOSI or CLK. In + * addition, the total number of concurrent SPI modules in use is limited. + * See board documentation for the legal pins and limit on concurrent usage. + *

+ * The SPI module will operate, and the pins will work in their respective + * modes until close() is invoked on the returned interface. It is illegal + * to use pins that have already been opened and has not been closed. A + * connection must have been established prior to calling this method, by + * invoking {@link #waitForConnect()}. + * + * @param miso + * Pin specification for the MISO (Master In Slave Out) pin, + * consisting of the pin number, as labeled on the board, and the + * mode, which determines whether the pin will be floating, + * pull-up or pull-down. See {@link DigitalInput.Spec.Mode} for + * more information. + * @param mosi + * Pin specification for the MOSI (Master Out Slave In) pin, + * consisting of the pin number, as labeled on the board, and the + * mode, which determines whether the pin will be normal or + * open-drain. See {@link DigitalOutput.Spec.Mode} for more + * information. + * @param clk + * Pin specification for the CLK pin, consisting of the pin + * number, as labeled on the board, and the mode, which + * determines whether the pin will be normal or open-drain. See + * {@link DigitalOutput.Spec.Mode} for more information. + * @param slaveSelect + * An array of pin specifications for each of the slaves' SS + * (Slave Select) pin. The index of this array designates the + * slave index, used later to refer to this slave. The spec is + * consisting of the pin number, as labeled on the board, and the + * mode, which determines whether the pin will be normal or + * open-drain. See {@link DigitalOutput.Spec.Mode} for more + * information. + * @param config + * The configuration of the SPI module. See + * {@link SpiMaster.Config} for details. + * @return Interface of the assigned module. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @throws OutOfResourceException + * This is a runtime exception, so it is not necessary to catch + * it if the client guarantees that the total number of + * concurrent SPI resources is not exceeded. + * @see SpiMaster + */ + public SpiMaster openSpiMaster(DigitalInput.Spec miso, + DigitalOutput.Spec mosi, DigitalOutput.Spec clk, + DigitalOutput.Spec[] slaveSelect, SpiMaster.Config config) + throws ConnectionLostException; + +/** + * Shorthand for {@link #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. + * @see #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) + */ + public SpiMaster openSpiMaster(int miso, int mosi, int clk, + int[] slaveSelect, SpiMaster.Rate rate) + throws ConnectionLostException; + + /** + * Shorthand for {@link #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. + * In this version, a single slave is used. + * @see #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) + */ + public SpiMaster openSpiMaster(int miso, int mosi, int clk, + int slaveSelect, SpiMaster.Rate rate) + throws ConnectionLostException; + + /** + * Open a TWI (Two-Wire Interface, such as I2C/SMBus) master module, + * enabling communication with multiple TWI-enabled slave modules. + *

+ * TWI is a common hardware communication protocol, enabling half-duplex, + * synchronous point-to-multi-point data transfer. It requires a physical + * connection of two lines (SDA, SCL) shared by all the bus nodes, where the + * SDA is open-drain and externally pulled-up. + *

+ * Note that there is a fixed number of TWI modules, and the pins they use + * are static. Client has to make sure these pins are not already opened + * before calling this method. See board documentation for the number of + * modules and the respective pins they use. + *

+ * The TWI module will operate, and the pins will work in their respective + * modes until close() is invoked on the returned interface. It is illegal + * to use pins that have already been opened and has not been closed. A + * connection must have been established prior to calling this method, by + * invoking {@link #waitForConnect()}. + * + * @param twiNum + * The TWI module index to use. Will also determine the pins + * used. + * @param rate + * The clock rate. Can be 100KHz / 400KHz / 1MHz. + * @param smbus + * When true, will use SMBus voltage levels. When false, I2C + * voltage levels. + * @return Interface of the assigned module. + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + * @see TwiMaster + */ + public TwiMaster openTwiMaster(int twiNum, Rate rate, boolean smbus) + throws ConnectionLostException; + + /** + * Open an ICSP channel, enabling Flash programming of an external PIC MCU, + * and in particular, another IOIO board. + *

+ * ICSP (In-Circuit Serial Programming) is a protocol intended for + * programming of PIC MCUs. It is a serial protocol over three wires: PGC + * (clock), PGD (data) and MCLR (reset), where PGC and MCLR are controlled + * by the master and PGD is shared by the master and slave, depending on the + * transaction state. + *

+ * Note that there is only one ICSP modules, and the pins it uses are + * static. Client has to make sure that the ICSP module is not already in + * use, as well as those dedicated pins. See board documentation for the + * actual pins used for ICSP. + * + * @return Interface of the ICSP module. + * @see IcspMaster + * @throws ConnectionLostException + * Connection was lost before or during the execution of this + * method. + */ + public IcspMaster openIcspMaster() throws ConnectionLostException; +} \ No newline at end of file diff --git a/IOIOLib/src/ioio/lib/api/IOIOConnection.java b/IOIOLib/src/ioio/lib/api/IOIOConnection.java new file mode 100755 index 0000000..8a9d02c --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/IOIOConnection.java @@ -0,0 +1,44 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import java.io.InputStream; +import java.io.OutputStream; + +import ioio.lib.api.exception.ConnectionLostException; + +public interface IOIOConnection { + void waitForConnect() throws ConnectionLostException; + + void disconnect(); + + InputStream getInputStream() throws ConnectionLostException; + + OutputStream getOutputStream() throws ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/IOIOFactory.java b/IOIOLib/src/ioio/lib/api/IOIOFactory.java new file mode 100644 index 0000000..947c48e --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/IOIOFactory.java @@ -0,0 +1,121 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import java.lang.reflect.Constructor; + +import ioio.lib.impl.IOIOImpl; +import ioio.lib.impl.SocketIOIOConnection; + +/** + * Factory class for creating instances of the IOIO interface. + *

+ * This class acts as the single entry-point to the IOIO API. It creates the + * bootstrapping between a specific implementation of the IOIO interface and any + * dependencies it might have, such as the underlying connection logic. + *

+ * Typical usage: + * + *

+ * IOIO ioio = IOIOFactory.create();
+ * try {
+ *   ioio.waitForConnect();
+ *   ...
+ *   ioio.disconnect();
+ * } catch (ConnectionLostException e) {
+ * } finally {
+ *   ioio.waitForDisconnect();
+ * }
+ * 
+ */ +public class IOIOFactory { + /** The TCP port used for communicating with the IOIO board. */ + public static final int IOIO_PORT = 4545; + + /** + * Create a IOIO instance. This specific implementation creates a IOIO + * instance which works with the actual IOIO board connected via a TCP + * connection (typically over a wired USB connection). + * + * @return The IOIO instance. + */ + public static IOIO create() { + try { + return create(SocketIOIOConnection.class.getName(), IOIO_PORT); + } catch (ClassNotFoundException e) { + // we shouldn't get here - this class must always exist. + throw new RuntimeException("Something is very wrong here"); + } + } + + /** + * Create a IOIO instance with a user-provided underlying connection class. + * This method should be used for establishing a non-standard connection to + * the IOIO board. + * + * @param connectionClassName + * The name of the connection class. Must have a public default + * constructor. + * + * @return The IOIO instance. + * @throws ClassNotFoundException The given class name was not found. + */ + public static IOIO create(String connectionClassName, Object... args) throws ClassNotFoundException { + IOIOConnection connection = createConnectionDynamically(connectionClassName, args); + return create(connection); + } + + public static IOIO create(IOIOConnection connection) { + return new IOIOImpl(connection); + } + + public static IOIOConnection createConnectionDynamically( + String connectionClassName, Object... args) + throws ClassNotFoundException { + Class cls; + cls = Class.forName(connectionClassName); + Object instance; + try { + Class[] argTypes = new Class[args.length]; + for (int i = 0; i < args.length; ++i) { + argTypes[i] = args[i].getClass(); + } + Constructor constructor = cls.getConstructor(argTypes); + instance = constructor.newInstance(args); + } catch (Exception e) { + throw new IllegalArgumentException( + "Provided class does not have a public ctor with the right signature", e); + } + if (!(instance instanceof IOIOConnection)) { + throw new IllegalArgumentException( + "Provided class does not implement IOIOConnection"); + } + return (IOIOConnection) instance; + } +} diff --git a/IOIOLib/src/ioio/lib/api/IcspMaster.java b/IOIOLib/src/ioio/lib/api/IcspMaster.java new file mode 100755 index 0000000..69b1257 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/IcspMaster.java @@ -0,0 +1,145 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.exception.ConnectionLostException; + +/** + * An interface for controlling an ICSP channel, enabling Flash programming of + * an external PIC MCU, and in particular, another IOIO board. + *

+ * ICSP (In-Circuit Serial Programming) is a protocol intended for programming + * of PIC MCUs. It is a serial protocol over three wires: PGC (clock), PGD + * (data) and MCLR (reset), where PGC and MCLR are controlled by the master and + * PGD is shared by the master and slave, depending on the transaction state. + * IcspMaster instances are obtained by calling {@link IOIO#openIcspMaster()}. + *

+ * This interface is very low level: it allows direct access to the atomic + * operations of the ICSP protocol: + *

    + *
  • Enter / exit programming mode ( {@link #enterProgramming()} / + * {@link #exitProgramming()}, respectively).
  • + *
  • Executing a single instruction on the slave MCU ( + * {@link #executeInstruction(int)}).
  • + *
  • Reading the value of the VISI register of the slave MCU into a read queue + * ({@link #readVisi()}).
  • + *
+ *

+ * The ICSP module uses fixed pins for its lines. See the user guide for details + * for your specific board. ICSP is a special feature, introduced for the + * purpose of programming a IOIO board with another IOIO board. It does not + * necessarily play nicely when used concurrently with other features, in the + * sense that it may introduce latencies in other modules. It is thus + * recommended not to use ICSP in conjunction with latency-sensitive features. + *

+ * The instance is alive since its creation. If the connection with the IOIO + * drops at any point, the instance transitions to a disconnected state, in + * which every attempt to use it (except {@link #close()}) will throw a + * {@link ConnectionLostException}. Whenever {@link #close()} is invoked the + * instance may no longer be used. Any resources associated with it are freed + * and can be reused. + *

+ * Typical usage: + * + *

+ * {@code
+ * IcspMaster icsp = ioio.openIcspMaster();
+ * icsp.enterProgramming();
+ * icsp.executeInstruction(0x212340);  // mov #0x1234, w0
+ * icsp.executeInstruction(0x883C20);  // mov w0, 0x784 (VISI)
+ * icsp.executeInstruction(0x000000);  // nop
+ * icsp.readVisi();
+ * int visi = icsp.waitVisiResult();   // should read 0x1234
+ * icsp.exitProgramming();
+ * icsp.close();                       // free ICSP module and pins
+ * }
+ * + * @see IOIO#openIcspMaster() + */ +public interface IcspMaster extends Closeable { + /** + * Initiate a sequence that will put the slave device in programming mode. + * This sequence is necessary for executing instructions and reading + * register values. + * + * @throws ConnectionLostException + * Connection to the IOIO has been lost. + */ + public void enterProgramming() throws ConnectionLostException; + + /** + * Initiate a sequence that will put the slave device out of programming + * mode. It will be held in reset. + * + * @throws ConnectionLostException + * Connection to the IOIO has been lost. + */ + public void exitProgramming() throws ConnectionLostException; + + /** + * Execute a single instruction on the slave MCU. + * + * @param instruction + * a 24-bit PIC instruction. + * @throws ConnectionLostException + * Connection to the IOIO has been lost. + */ + public void executeInstruction(int instruction) + throws ConnectionLostException; + + /** + * Request a read of the VISI register on the slave MCU. This is an + * asynchronous call, in which the 16-bit result is obtained by + * {@link #waitVisiResult()}. + * This method may block if the read queue on the IOIO is full, but this + * should be for short periods only. + * + * @throws ConnectionLostException + * Connection to the IOIO has been lost. + * @throws InterruptedException + * Interrupted while blocking. + */ + public void readVisi() throws ConnectionLostException, InterruptedException; + + /** + * Wait and return a result of a call to {@link #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. + * + * @return The result - an unsigned 16-bit number. + * @throws ConnectionLostException + * Connection to the IOIO has been lost. + * @throws InterruptedException + * Interrupted while blocking. + */ + public int waitVisiResult() throws ConnectionLostException, + InterruptedException; +} diff --git a/IOIOLib/src/ioio/lib/api/PulseInput.java b/IOIOLib/src/ioio/lib/api/PulseInput.java new file mode 100755 index 0000000..ca4d366 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/PulseInput.java @@ -0,0 +1,322 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.exception.ConnectionLostException; + +/** + * An interface for pulse width and frequency measurements of digital signals. + *

+ * PulseInput (commonly known as "input capture") is a versatile module which + * enables extraction of various timing information from a digital signal. There + * are two main use cases: pulse duration measurement and frequency measurement. + * In pulse width measurement we measure the duration of a positive ("high") or + * negative ("low") pulse, i.e. the elapsed time between a rise and a fall or + * vice versa. This mode is useful, for example, for decoding a PWM signal or + * measuring the delay of a sonar return signal. In frequency measurement we + * measure the duration between a rising edge to the following rising edge. This + * gives us a momentary reading of a signal's frequency or period. This is + * commonly used, for example, in conjunction with an optical or magnetic sensor + * for measuring a turning shaft's speed. + *

+ * {@link PulseInput} instances are obtained by calling + * {@link IOIO#openPulseInput(ioio.lib.api.DigitalInput.Spec, ClockRate, PulseMode, boolean)} + * . When created, some important configuration decisions have to be made: the + * precision (single or double), the clock rate and the mode of operation. Modes + * are straightforward: {@link PulseMode#POSITIVE} is used for measuring a + * positive pulse, {@link PulseMode#NEGATIVE} a negative pulse, and + * {@link PulseMode#FREQ} / {@link PulseMode#FREQ_SCALE_4} / + * {@link PulseMode#FREQ_SCALE_16} are used for measuring frequency. The + * difference between the three scaling modes is that without scaling, the + * frequency is determined by measurement of a single + * (rising-edge-to-rising-edge) period. In x4 scaling, 4 consecutive periods are + * measured and the time is divided by 4, providing some smoothing as well as + * better resolution. Similarly for x16 scaling. Note that scaling affects the + * range of signals to be measured, as discussed below. + *

+ * The choice of single vs. double-precision is important to understand: IOIO + * internally uses either 16-bit counters or 32-bit counters for the timing. 16- + * counters force us to either limit the maximum duration (and the minimum + * frequency) or compromise accuracy as compared to 32-bit counters. However, if + * you need many concurrent pulse measurements in your application, you may have + * no choice but to use single-precision. + *

+ * The clock rate selection is important (and even critical when working in + * single-precision) and requires the user to make some assumptions about the + * nature of the measured signal. The higher the clock rate, the more precise + * the measurement, but the longest pulse that can be measured decreases (or + * lowest frequency that can be measured increases). Using the scaling option + * when operating in frequency mode also affects these sizes. combinations. It + * is always recommended to choose the most precise mode, which exceeds the + * maximum expected pulse width (or inverse frequency). If a pulse is received + * whom duration exceeds the longest allowed pulse, it will be "folded" into the + * valid range and product garbage readings. + *

+ * The following table (sorted by longest pulse) summarizes all possible clock / + * mode combinations. The table applies for single-precision operation. + * For double-precision, simply multiply the longest pulse by 65536 and divide + * the lowest frequency by the same amount. Interestingly, the number written in + * [ms] units in the longest pulse column, roughly corresponds to the same + * number in minutes when working with double precsion, since 1[min] = + * 60000[ms]. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
ClockScalingResolutionLongest pulseLowest frequency
62.5KHz116us1.048s0.95Hz
250KHz14us262.1ms3.81Hz
62.5KHz44us262.1ms3.81Hz
250KHz41us65.54ms15.26Hz
62.5KHz161us65.54ms15.26Hz
2MHz1500ns32.77ms30.52Hz
250KHz16250us16.38ms61.0Hz
2MHz4125ns8.192ms122.1Hz
16MHz162.5ns4.096ms244.1Hz
2MHz1631.25ns2.048ms488.3Hz
16MHz415.6ns1.024ms976.6Hz
16MHz163.9ns256us3.906KHz
+ * + *

+ * In some applications it is desirable to measure every incoming pulse rather + * than repetitively query the result of the last measurement. For that purpose + * the {@link #waitPulseGetDuration()} method exists: every incoming pulse width + * is pushed into a small internal queue from which it can be read. The client + * waits for data to be available, then reads it and data that comes in in the + * meanwhile is stored. The queue has limited size, so it is important to read + * quickly if no pulses are to be lost. Note that once a pulse is detected, the + * next one must have its leading edge at least 5ms after the leading edge of + * the current one, or else it will be skipped. This throttling has been + * introduced on purpose, in order to prevent saturation the communication + * channel when the input signal is very high frequency. Effectively, this means + * that the maximum sample rate is 200Hz. This rate has been chosen as it + * enables measure R/C servo signals without missing pulses. + * + *

+ * Typical usage (servo signal pulse width measurement): + * + *

+ * {@code
+ * // Open pulse input at 16MHz, double-precision
+ * PulseInput in = ioio.openPulseInput(3, PulseMode.POSITIVE);
+ * ...
+ * float widthSec = in.getDuration();
+ * OR:
+ * float widthSec = in.waitPulseGetDuration();
+ * ... 
+ * in.close();  // pin 3 can now be used for something else.
+ * }
+ * 
+ * + *

+ * Typical usage (frequency measurement): + * + *

+ * {@code
+ * // Signal is known to be slightly over 150Hz. Single precision can be used.
+ * PulseInput in = ioio.openPulseInput(3,
+ *                                     ClockRate.RATE_2MHz,
+ *                                     PulseMode.FREQ_SCALE_4,
+ *                                     false);
+ * ...
+ * float freqHz = in.getFrequency();
+ * ... 
+ * in.close();  // pin 3 can now be used for something else.
+ * }
+ * 
+ */ +public interface PulseInput extends Closeable { + /** An enumeration for describing the module's operating mode. */ + public enum PulseMode { + /** Positive pulse measurement (rising-edge-to-falling-edge). */ + POSITIVE(1), + /** Negative pulse measurement (falling-edge-to-rising-edge). */ + NEGATIVE(1), + /** Frequency measurement (rising-edge-to-rising-edge). */ + FREQ(1), + /** Frequency measurement (rising-edge-to-rising-edge) with 4x scaling. */ + FREQ_SCALE_4(4), + /** Frequency measurement (rising-edge-to-rising-edge) with 16x scaling. */ + FREQ_SCALE_16(16); + + /** The scaling factor as an integer. */ + public final int scaling; + + private PulseMode(int s) { + scaling = s; + } + } + + /** Suported clock rate enum. */ + public enum ClockRate { + /** 16MHz */ + RATE_16MHz(16000000), + /** 2MHz */ + RATE_2MHz(2000000), + /** 250KHz */ + RATE_250KHz(250000), + /** 62.5KHz */ + RATE_62KHz(62500); + + /** The value in Hertz units. */ + public final int hertz; + + private ClockRate(int h) { + hertz = h; + } + } + + /** + * Gets the pulse duration in case of pulse measurement mode, or the period + * in case of frequency mode. When scaling is used, this is compensated for + * here, so the duration of a single cycle will be returned. + *

+ * The first call to this method may block shortly until the first data + * update arrives. The client may interrupt the calling thread. + * + * @return The duration, in seconds. + * @throws InterruptedException + * The calling thread has been interrupted. + * @throws ConnectionLostException + * The connection with the IOIO has been lost. + */ + public float getDuration() throws InterruptedException, + ConnectionLostException; + + /** + * Reads a single measurement from the queue. If the queue is empty, will + * block until more data arrives. The calling thread may be interrupted in + * order to abort the call. See interface documentation for further + * explanation regarding the read queue. + *

+ * This method may not be used if the interface has was opened in frequency + * mode. + * + * @return The duration, in seconds. + * @throws InterruptedException + * The calling thread has been interrupted. + * @throws ConnectionLostException + * The connection with the IOIO has been lost. + */ + public float waitPulseGetDuration() throws InterruptedException, + ConnectionLostException; + + /** + * Gets the momentary frequency of the measured signal. When scaling is + * used, this is compensated for here, so the true frequency of the signal + * will be returned. + *

+ * The first call to this method may block shortly until the first data + * update arrives. The client may interrupt the calling thread. + * + * @return The frequency, in Hz. + * @throws InterruptedException + * The calling thread has been interrupted. + * @throws ConnectionLostException + * The connection with the IOIO has been lost. + */ + public float getFrequency() throws InterruptedException, + ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/PwmOutput.java b/IOIOLib/src/ioio/lib/api/PwmOutput.java new file mode 100644 index 0000000..63c408b --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/PwmOutput.java @@ -0,0 +1,126 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.exception.ConnectionLostException; + +/** + * A pin used for PWM (Pulse-Width Modulation) output. + *

+ * A PWM pin produces a logic-level PWM signal. These signals are typically used + * for simulating analog outputs for controlling the intensity of LEDs, the + * rotation speed of motors, etc. They are also frequently used for controlling + * hobby servo motors. PwmOutput instances are obtained by calling + * {@link IOIO#openPwmOutput(ioio.lib.api.DigitalOutput.Spec, int)}. + *

+ * When used for motors and LEDs, a frequency of several KHz is typically used, + * where there is a trade-off between switching power-loses and smoothness of + * operation. The pulse width is typically set by specifying the duty cycle, + * with the {@link #setDutyCycle(float)} method. A duty cycle of 0 is "off", a + * duty cycle of 1 is "on", and every intermediate value produces an + * intermediate intensity. Please note that any devices consuming more than 20mA + * of current (e.g. motors) should not by directly connected the the IOIO pins, + * but rather through an amplification circuit suited for the specific load. + *

+ * When used for hobby servos, the PWM signal is rather used for encoding of the + * desired angle the motor should go to. By standard, a 100Hz signal is used and + * the pulse width is varied between 1ms and 2ms (corresponding to both extremes + * of the shaft angle), using {@link #setPulseWidth(int)}. + *

+ * The instance is alive since its creation. If the connection with the IOIO + * drops at any point, the instance transitions to a disconnected state, in + * which every attempt to use the pin (except {@link #close()}) will throw a + * {@link ConnectionLostException}. Whenever {@link #close()} is invoked the + * instance may no longer be used. Any resources associated with it are freed + * and can be reused. + *

+ * Typical usage (fading LED): + * + *

+ * PwmOutput servo = ioio.openPwmOutput(12, 1000);  // LED anode on pin 12
+ * ...
+ * servo.setDutyCycle(0.0f);  // LED off
+ * ... 
+ * servo.setDutyCycle(0.5f);  // 50% intensity
+ * ... 
+ * servo.setDutyCycle(1.0f);  // 100% intensity
+ * ... 
+ * servo.close();  // pin 12 can now be used for something else.
+ * 
+ *

+ * Typical usage (servo): + * + *

+ * PwmOutput servo = ioio.openPwmOutput(12, 100);
+ * ...
+ * servo.setPulseWidth(1000);  // 1000us = 1ms = one extreme
+ * ... 
+ * servo.setPulseWidth(1500);  // 1500us = 1.5ms = center
+ * ... 
+ * servo.setPulseWidth(2000);  // 2000us = 2ms = other extreme
+ * ... 
+ * servo.close();  // pin 12 can now be used for something else.
+ * 
+ * + * @see IOIO#openPwmOutput(ioio.lib.api.DigitalOutput.Spec, int) + */ +public interface PwmOutput extends Closeable { + /** + * Sets the duty cycle of the PWM output. The duty cycle is defined to be + * the pulse width divided by the total cycle period. For absolute control + * of the pulse with, consider using {@link #setPulseWidth(int)}. + * + * @param dutyCycle + * The duty cycle, as a real value from 0.0 to 1.0. + * @throws ConnectionLostException + * The connection to the IOIO has been lost. + * @see #setPulseWidth(int) + */ + public void setDutyCycle(float dutyCycle) throws ConnectionLostException; + + /** + * Sets the pulse width of the PWM output. The pulse width is duration of + * the high-time within a single period of the signal. For relative control + * of the pulse with, consider using {@link #setDutyCycle(float)}. + * + * @param pulseWidthUs + * The pulse width, in microsecond units. + * @throws ConnectionLostException + * The connection to the IOIO has been lost. + * @see #setDutyCycle(float) + */ + public void setPulseWidth(int pulseWidthUs) throws ConnectionLostException; + + /** + * The same as {@link #setPulseWidth(int)}, but with sub-microsecond + * precision. + */ + public void setPulseWidth(float pulseWidthUs) + throws ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/SpiMaster.java b/IOIOLib/src/ioio/lib/api/SpiMaster.java new file mode 100755 index 0000000..6cf0db4 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/SpiMaster.java @@ -0,0 +1,211 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.DigitalInput.Spec; +import ioio.lib.api.exception.ConnectionLostException; + +/** + * An interface for controlling an SPI module, in SPI bus-master mode, enabling + * communication with multiple SPI-enabled slave modules. + *

+ * SPI is a common hardware communication protocol, enabling full-duplex, + * synchronous point-to-multi-point data transfer. It requires MOSI, MISO and + * CLK lines shared by all nodes, as well as a SS line per slave, connected + * between this slave and a respective pin on the master. The MISO line should + * operate in pull-up mode, using either the internal pull-up or an external + * resistor. SpiMaster instances are obtained by calling + * {@link IOIO#openSpiMaster(Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], Config)}. + *

+ * The SPI protocol is comprised of simultaneous sending and receiving of data + * between the bus master and a single slave. By the very nature of this + * protocol, the amount of bytes sent is equal to the amount of bytes received. + * However, by padding the sent data with garbage data, and by ignoring the + * leading bytes of the received data arbitrarily-sized packets can be sent and + * received. + *

+ * A very common practice for SPI-based slave devices (although not always the + * case), is to have a fixed request and response length and a fixed lag between + * them, based on the request type. For example, an SPI-based sensor may define + * the the protocol for obtaining its measured value is by sending a 2-byte + * message, whereas the returned 3-byte value has its first byte overlapping the + * second value of the response, as illustrated below: + * + *

+ * Master: M1   M2   GG   GG
+ * Slave:  GG   S1   S2   S3
+ * 
+ * + * M1, M2: the master's request
+ * S1, S2, S3: the slave's response
+ * GG: garbage bytes used for padding. + *

+ * The IOIO SPI interface supports such fixed length message protocols using a + * single method, {@link #writeRead(int, byte[], int, int, byte[], int)}, which + * gets the request data, and the lengths of the request, the response and the + * total transaction bytes. + * + *

+ * The instance is alive since its creation. If the connection with the IOIO + * drops at any point, the instance transitions to a disconnected state, in + * which every attempt to use it (except {@link #close()}) will throw a + * {@link ConnectionLostException}. Whenever {@link #close()} is invoked the + * instance may no longer be used. Any resources associated with it are freed + * and can be reused. + *

+ * Typical usage (single slave, as per the example above): + * + *

+ * {@code
+ * // MISO, MOSI, CLK, SS on pins 3, 4, 5, 6, respectively.
+ * SpiMaster spi = ioio.openSpiMaster(3, 4, 5, 6, SpiMaster.Rate.RATE_125K);
+ * final byte[] request = new byte[]{ 0x23, 0x45 };
+ * final byte[] response = new byte[3];
+ * spi.writeRead(request, 2, 4, response, 3);
+ * ...
+ * spi.close();  // free SPI module and pins
+ * }
+ * + * @see IOIO#openSpiMaster(Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], Config) + */ +public interface SpiMaster extends Closeable { + /** Possible data rates for SPI, in Hz. */ + enum Rate { + RATE_31K, RATE_35K, RATE_41K, RATE_50K, RATE_62K, RATE_83K, RATE_125K, RATE_142K, RATE_166K, RATE_200K, RATE_250K, RATE_333K, RATE_500K, RATE_571K, RATE_666K, RATE_800K, RATE_1M, RATE_1_3M, RATE_2M, RATE_2_2M, RATE_2_6M, RATE_3_2M, RATE_4M, RATE_5_3M, RATE_8M + } + + /** An object that can be waited on for asynchronous calls. */ + public interface Result { + /** + * Wait until the asynchronous call which returned this instance is + * complete. + * + * @throws ConnectionLostException + * Connection with the IOIO has been lost. + * @throws InterruptedException + * This operation has been interrupted. + */ + public void waitReady() throws ConnectionLostException, + InterruptedException; + } + + /** SPI configuration structure. */ + static class Config { + /** Data rate. */ + public Rate rate; + /** Whether to invert clock polarity. */ + public boolean invertClk; + /** + * Whether to do the input and output sampling on the trailing clock + * edge. + */ + public boolean sampleOnTrailing; + + /** + * Constructor. + * + * @param rate + * Data rate. + * @param invertClk + * Whether to invert clock polarity. + * @param sampleOnTrailing + * Whether to do the input and output sampling on the + * trailing clock edge. + */ + public Config(Rate rate, boolean invertClk, boolean sampleOnTrailing) { + this.rate = rate; + this.invertClk = invertClk; + this.sampleOnTrailing = sampleOnTrailing; + } + + /** + * Constructor with common defaults. Equivalent to Config(rate, false, + * false) + * + * @see #Config(Rate, boolean, boolean) + */ + public Config(Rate rate) { + this(rate, false, false); + } + } + + /** + * Perform a single SPI transaction which includes optional transmission and + * optional reception of data to a single slave. This is a blocking + * operation that can take a few milliseconds to a few tens of milliseconds. + * To abort this operation, client can interrupt the blocked thread. If + * readSize is 0, the call returns immediately. + * + * @param slave + * The slave index. It is determined by the index of its + * slave-select pin, as per the array passed to + * {@link IOIO#openSpiMaster(Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], Config)} + * . + * @param writeData + * A byte array of data to write. May be null if writeSize is 0. + * @param writeSize + * Number of bytes to write. Valid values are 0 to totalSize. + * @param totalSize + * Total transaction length, in bytes. Valid values are 1 to 64. + * @param readData + * An array where the response is to be stored. May be null if + * readSize is 0. + * @param readSize + * The number of expected response bytes. Valid values are 0 to + * totalSize. + * @throws ConnectionLostException + * Connection to the IOIO has been lost. + * @throws InterruptedException + * Calling thread has been interrupted. + */ + public void writeRead(int slave, byte[] writeData, int writeSize, + int totalSize, byte[] readData, int readSize) + throws ConnectionLostException, InterruptedException; + + /** + * Shorthand for {@link #writeRead(int, byte[], int, int, byte[], int)} for + * the single-slave case. + * + * @see #writeRead(int, byte[], int, int, byte[], int) + */ + public void writeRead(byte[] writeData, int writeSize, int totalSize, + byte[] readData, int readSize) throws ConnectionLostException, + InterruptedException; + + /** + * The same as {@link #writeRead(int, byte[], int, int, byte[], int)}, but + * returns immediately and returns a {@link Result} object that can be + * waited on. If readSize is 0, the result object is ready immediately. + * + * @see #writeRead(int, byte[], int, int, byte[], int) + */ + public Result writeReadAsync(int slave, byte[] writeData, int writeSize, + int totalSize, byte[] readData, int readSize) + throws ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/TwiMaster.java b/IOIOLib/src/ioio/lib/api/TwiMaster.java new file mode 100755 index 0000000..9d25f12 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/TwiMaster.java @@ -0,0 +1,148 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.exception.ConnectionLostException; + +/** + * An interface for controlling a TWI module, in TWI bus-master mode, enabling + * communication with multiple TWI-enabled slave modules. + *

+ * TWI (Two-Wire Interface) is a common hardware communication protocol, + * enabling half-duplex, synchronous point-to-multi-point data transfer. It + * requires a physical connection of two lines (SDA, SCL) shared by all the bus + * nodes, where the SDA is open-drain and externally pulled-up. TwiMaster + * instances are obtained by calling + * {@link IOIO#openTwiMaster(int, Rate, boolean)}. + *

+ * TWI is the generic name for the specific I2C and SMBus protocols, differing + * mostly by the voltage levels they require. This module supports both. + *

+ * A TWI transaction is comprised of optional sending of a data buffer from the + * master to a single slave, followed by an optional reception of a data buffer + * from that slave. Slaves are designated by addresses, which may be 7-bit + * (common) or 10-bit (less common). TWI transactions may fail, as a result of + * the slave not responding or as result of the slave NACK'ing the request. Such + * a transaction is executed using the + * {@link #writeRead(int, boolean, byte[], int, byte[], int)} method. + *

+ * The instance is alive since its creation. If the connection with the IOIO + * drops at any point, the instance transitions to a disconnected state, in + *

+ * The instance is alive since its creation. If the connection with the IOIO + * drops at any point, the instance transitions to a disconnected state, in + * which every attempt to use it (except {@link #close()}) will throw a + * {@link ConnectionLostException}. Whenever {@link #close()} is invoked the + * instance may no longer be used. Any resources associated with it are freed + * and can be reused. + *

+ * Typical usage: + * + *

+ * {@code
+ * // Uses the SDA1/SCL1 pins, I2C volatege levels at 100KHz. 
+ * TwiMaster twi = ioio.openTwiMaster(1, TwiMaster.RATE_100KHz, false);
+ * final byte[] request = new byte[]{ 0x23, 0x45 };
+ * final byte[] response = new byte[3];
+ * if (twi.writeRead(0x19, false, request, 2, response, 3)) {
+ *   // response is valid
+ *   ...
+ * } else {
+ *   // handle error
+ * }
+ * twi.close();  // free TWI module and pins
+ * }
+ * + * @see IOIO#openTwiMaster(int, Rate, boolean) + */ +public interface TwiMaster extends Closeable { + enum Rate { + RATE_100KHz, RATE_400KHz, RATE_1MHz + } + + /** An object that can be waited on for asynchronous calls. */ + public interface Result { + /** + * Wait until the asynchronous call which returned this instance is + * complete. + * + * @return true if TWI transaction succeeded. + * + * @throws ConnectionLostException + * Connection with the IOIO has been lost. + * @throws InterruptedException + * This operation has been interrupted. + */ + public boolean waitReady() throws ConnectionLostException, + InterruptedException; + } + + /** + * Perform a single TWI transaction which includes optional transmission and + * optional reception of data to a single slave. This is a blocking + * operation that can take a few milliseconds to a few tens of milliseconds. + * To abort this operation, client can interrupt the blocked thread. + * + * @param address + * The slave address, either 7-bit or 10-bit. Note that in some + * TWI device documentation the documented addresses are actually + * 2x the address values used here, as they regard the trailing + * 0-bit as part of the address. + * @param tenBitAddr + * Whether this is a 10-bit addressing mode. + * @param writeData + * The request data. + * @param writeSize + * The number of bytes to write. Valid value are 0-255. + * @param readData + * The array where the response should be stored. + * @param readSize + * The expected number of response bytes. Valid value are 0-255. + * @return Whether operation succeeded. + * @throws ConnectionLostException + * Connection to the IOIO has been lost. + * @throws InterruptedException + * Calling thread has been interrupted. + */ + public boolean writeRead(int address, boolean tenBitAddr, byte[] writeData, + int writeSize, byte[] readData, int readSize) + throws ConnectionLostException, InterruptedException; + + /** + * Asynchronous version of + * {@link #writeRead(int, boolean, byte[], int, byte[], int)}. Returns + * immediately and provides a {@link Result} object on which the client can + * wait for the result. + * + * @see #writeRead(int, boolean, byte[], int, byte[], int) + */ + public Result writeReadAsync(int address, boolean tenBitAddr, + byte[] writeData, int writeSize, byte[] readData, int readSize) + throws ConnectionLostException; +} diff --git a/IOIOLib/src/ioio/lib/api/Uart.java b/IOIOLib/src/ioio/lib/api/Uart.java new file mode 100644 index 0000000..309f478 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/Uart.java @@ -0,0 +1,108 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api; + +import ioio.lib.api.DigitalInput.Spec; +import ioio.lib.api.exception.ConnectionLostException; + +import java.io.InputStream; +import java.io.OutputStream; + +/** + * An interface for controlling a UART module. + *

+ * UART is a very common hardware communication protocol, enabling full- duplex, + * asynchronous point-to-point data transfer. It typically serves for opening + * consoles or as a basis for higher-level protocols, such as MIDI, RS-232 and + * RS-485. Uart instances are obtained by calling + * {@link IOIO#openUart(Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, StopBits)}. + *

+ * The UART protocol is completely symmetric - there is no "master" and "slave" + * at this layer. Each end may send any number of bytes at arbitrary times, + * making it very useful for terminals and terminal-controllable devices. + *

+ * Working with UART is very intuitive - it just provides a standard InputStream + * and/or OutputStream. Optionally, one could create a read-only or write-only + * UART instances, by passing null (or INVALID_PIN) for either TX or RX pins. + *

+ * The instance is alive since its creation. If the connection with the IOIO + * drops at any point, the instance transitions to a disconnected state, which + * every attempt to use it (except {@link #close()}) will throw a + * {@link ConnectionLostException}. Whenever {@link #close()} is invoked the + * instance may no longer be used. Any resources associated with it are freed + * and can be reused. + *

+ * Typical usage: + * + *

+ * Uart uart = ioio.openUart(3, 4, 19200, Parity.NONE, StopBits.ONE);
+ * InputStream in = uart.getInputStream();
+ * OutputStream out = uart.getOutputStream();
+ * out.write(new String("Hello").getBytes());
+ * int i = in.read();  // blocking
+ * ...
+ * uart.close();  // free UART module and pins
+ * 
+ * + * @see IOIO#openUart(Spec, ioio.lib.api.DigitalOutput.Spec, int, Parity, + * StopBits) + */ +public interface Uart extends Closeable { + /** Parity-bit mode. */ + enum Parity { + /** No parity. */ + NONE, + /** Even parity. */ + EVEN, + /** Odd parity. */ + ODD + } + + /** Number of stop-bits. */ + enum StopBits { + /** One stop bit. */ + ONE, + /** Two stop bits. */ + TWO + } + + /** + * Gets the input stream. + * + * @return An input stream. + */ + public InputStream getInputStream(); + + /** + * Gets the output stream. + * + * @return An output stream. + */ + public OutputStream getOutputStream(); +} diff --git a/IOIOLib/src/ioio/lib/api/exception/ConnectionLostException.java b/IOIOLib/src/ioio/lib/api/exception/ConnectionLostException.java new file mode 100644 index 0000000..2461b40 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/exception/ConnectionLostException.java @@ -0,0 +1,45 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api.exception; + +/** + * Thrown when the connection between Android and IOIO has been lost or + * disconnected. + */ +public class ConnectionLostException extends Exception { + private static final long serialVersionUID = 7422862446246046772L; + + public ConnectionLostException(Exception e) { + super(e); + } + + public ConnectionLostException() { + super("Connection lost"); + } +} \ No newline at end of file diff --git a/IOIOLib/src/ioio/lib/api/exception/IncompatibilityException.java b/IOIOLib/src/ioio/lib/api/exception/IncompatibilityException.java new file mode 100755 index 0000000..355c273 --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/exception/IncompatibilityException.java @@ -0,0 +1,41 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.api.exception; + +/** + * Thrown when an incompatibility of system components is detected, such as when + * an unsupported board hardware or software version is encountered. + */ +public class IncompatibilityException extends Exception { + private static final long serialVersionUID = -613939818063932627L; + + public IncompatibilityException(String msg) { + super(msg); + } +} diff --git a/IOIOLib/src/ioio/lib/api/exception/OutOfResourceException.java b/IOIOLib/src/ioio/lib/api/exception/OutOfResourceException.java new file mode 100644 index 0000000..6a5cd9c --- /dev/null +++ b/IOIOLib/src/ioio/lib/api/exception/OutOfResourceException.java @@ -0,0 +1,14 @@ +package ioio.lib.api.exception; + +/** + * The IOIO board does not have anymore of the requested resource. This + * exceptions do not need to be handled if the client guarantees that the limits + * on concurrent resource usage are never exceeded. + */ +public class OutOfResourceException extends RuntimeException { + private static final long serialVersionUID = -4482605241361881899L; + + public OutOfResourceException(String msg) { + super(msg); + } +} \ No newline at end of file diff --git a/IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnection.java b/IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnection.java new file mode 100644 index 0000000..59179ec --- /dev/null +++ b/IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnection.java @@ -0,0 +1,112 @@ +package ioio.lib.bluetooth; + +import ioio.lib.api.IOIOConnection; +import ioio.lib.api.exception.ConnectionLostException; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.UUID; + +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothSocket; +import android.util.Log; + +public class BluetoothIOIOConnection implements IOIOConnection { + private static final String TAG = "BluetoothIOIOConnection"; + private BluetoothSocket socket_ = null; + private boolean disconnect_ = false; + private final String name_; + private final String address_; + + public BluetoothIOIOConnection(String name, String address) { + name_ = name; + address_ = address; + } + + @Override + public void waitForConnect() throws ConnectionLostException { + final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + final BluetoothDevice ioioDevice = adapter.getRemoteDevice(address_); + synchronized (this) { + if (disconnect_) { + throw new ConnectionLostException(); + } + Log.e(TAG, name_ + " Creating socket"); + try { + socket_ = createSocket(ioioDevice); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + Log.e(TAG, name_ + " Created socket"); + } + // keep trying to connect as long as we're not aborting + while (true) { + try { + Log.e(TAG, name_ + "Connecting"); + socket_.connect(); + Log.e(TAG, "Established connection to device " + name_ + + " address: " + address_); + break; // if we got here, we're connected + } catch (Exception e) { + if (disconnect_) { + throw new ConnectionLostException(e); + } + try { + Thread.sleep(1000); + } catch (InterruptedException e1) { + } + } + } + } + + public BluetoothSocket createSocket(final BluetoothDevice device) + throws IOException { + try { + // We're trying to create an insecure socket, which is + // only supported + // in API 10 and up. If we fail, we try a secure socket + // with is in API + // 7 and up. + return device.createInsecureRfcommSocketToServiceRecord(UUID + .fromString("00001101-0000-1000-8000-00805F9B34FB")); + } catch (NoSuchMethodError e) { + return device.createRfcommSocketToServiceRecord(UUID + .fromString("00001101-0000-1000-8000-00805F9B34FB")); + } + } + + @Override + public synchronized void disconnect() { + if (disconnect_) { + return; + } + Log.d(TAG, "Client initiated disconnect"); + disconnect_ = true; + if (socket_ != null) { + try { + socket_.close(); + } catch (IOException e) { + } + } + } + + @Override + public InputStream getInputStream() throws ConnectionLostException { + try { + return socket_.getInputStream(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + public OutputStream getOutputStream() throws ConnectionLostException { + try { + return socket_.getOutputStream(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } +} diff --git a/IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnectionDiscovery.java b/IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnectionDiscovery.java new file mode 100644 index 0000000..0fb6b86 --- /dev/null +++ b/IOIOLib/src/ioio/lib/bluetooth/BluetoothIOIOConnectionDiscovery.java @@ -0,0 +1,37 @@ +package ioio.lib.bluetooth; + +import ioio.lib.util.IOIOConnectionDiscovery; + +import java.util.Collection; +import java.util.Set; + +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothDevice; +import android.util.Log; + +public class BluetoothIOIOConnectionDiscovery implements + IOIOConnectionDiscovery { + + private static final String TAG = "BluetoothIOIOConnectionDiscovery"; + + @Override + public void getSpecs(Collection result) { + try { + final BluetoothAdapter adapter = BluetoothAdapter + .getDefaultAdapter(); + Set bondedDevices = adapter.getBondedDevices(); + for (BluetoothDevice device : bondedDevices) { + if (device.getName().startsWith("IOIO")) { + result.add(new IOIOConnectionSpec( + BluetoothIOIOConnection.class.getName(), + new Object[] { device.getName(), + device.getAddress() })); + } + } + } catch (SecurityException e) { + Log.e(TAG, + "Did you forget to declare uses-permission of android.permission.BLUETOOTH?"); + throw e; + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/AbstractPin.java b/IOIOLib/src/ioio/lib/impl/AbstractPin.java new file mode 100755 index 0000000..e10b0c0 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/AbstractPin.java @@ -0,0 +1,45 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.exception.ConnectionLostException; + +public abstract class AbstractPin extends AbstractResource { + protected final int pinNum_; + + AbstractPin(IOIOImpl ioio, int pinNum) throws ConnectionLostException { + super(ioio); + pinNum_ = pinNum; + } + + synchronized public void close() { + super.close(); + ioio_.closePin(pinNum_); + } +} diff --git a/IOIOLib/src/ioio/lib/impl/AbstractResource.java b/IOIOLib/src/ioio/lib/impl/AbstractResource.java new file mode 100755 index 0000000..f985674 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/AbstractResource.java @@ -0,0 +1,74 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.IncomingState.DisconnectListener; +import ioio.lib.api.Closeable; + +public class AbstractResource implements Closeable, DisconnectListener { + enum State { + OPEN, + CLOSED, + DISCONNECTED + } + + protected State state_ = State.OPEN; + protected final IOIOImpl ioio_; + + public AbstractResource(IOIOImpl ioio) throws ConnectionLostException { + ioio_ = ioio; + } + + @Override + synchronized public void disconnected() { + if (state_ != State.CLOSED) { + state_ = State.DISCONNECTED; + } + } + + synchronized public void close() { + if (state_ == State.CLOSED) { + throw new IllegalStateException("Trying to use a closed resouce"); + } else if (state_ == State.DISCONNECTED) { + state_ = State.CLOSED; + return; + } + state_ = State.CLOSED; + ioio_.removeDisconnectListener(this); + } + + protected synchronized void checkState() throws ConnectionLostException { + if (state_ == State.CLOSED) { + throw new IllegalStateException("Trying to use a closed resouce"); + } else if (state_ == State.DISCONNECTED) { + throw new ConnectionLostException(); + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/AnalogInputImpl.java b/IOIOLib/src/ioio/lib/impl/AnalogInputImpl.java new file mode 100755 index 0000000..c5a99ed --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/AnalogInputImpl.java @@ -0,0 +1,90 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import java.io.IOException; + +import ioio.lib.api.AnalogInput; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.IncomingState.InputPinListener; + +public class AnalogInputImpl extends AbstractPin implements AnalogInput, InputPinListener { + private int value_; + private boolean valid_ = false; + + AnalogInputImpl(IOIOImpl ioio, int pin) throws ConnectionLostException { + super(ioio, pin); + } + + @Override + public float getVoltage() throws InterruptedException, ConnectionLostException { + return read() * getReference(); + } + + @Override + public float getReference() { + return 3.3f; + } + + @Override + synchronized public void setValue(int value) { + // Log.v("AnalogInputImpl", "Pin " + pinNum_ + " value is " + value); + assert(value >= 0 || value < 1024); + value_ = value; + if (!valid_) { + valid_ = true; + notifyAll(); + } + } + + @Override + synchronized public float read() throws InterruptedException, ConnectionLostException { + checkState(); + while (!valid_ && state_ != State.DISCONNECTED) { + wait(); + } + checkState(); + return (float) value_ / 1023.0f; + } + + @Override + public synchronized void disconnected() { + super.disconnected(); + notifyAll(); + } + + @Override + public synchronized void close() { + super.close(); + try { + ioio_.protocol_.setAnalogInSampling(pinNum_, false); + } catch (IOException e) { + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/Constants.java b/IOIOLib/src/ioio/lib/impl/Constants.java new file mode 100755 index 0000000..aa82221 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/Constants.java @@ -0,0 +1,45 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +class Constants { + static final int NUM_PINS = 49; + static final int NUM_ANALOG_PINS = 16; + static final int NUM_PWM_MODULES = 9; + static final int NUM_UART_MODULES = 4; + static final int NUM_SPI_MODULES = 3; + static final int NUM_TWI_MODULES = 3; + static final int[] INCAP_MODULES_DOUBLE = new int[] { 0, 2, 4}; + static final int[] INCAP_MODULES_SINGLE = new int[] { 6, 7, 8}; + static final int BUFFER_SIZE = 1024; + static final int PACKET_BUFFER_SIZE = 256; + + static final int[][] TWI_PINS = new int[][] {{ 4, 5 }, { 47, 48 }, { 26, 25 }}; + static final int[] ICSP_PINS = new int[] { 36, 37, 38 }; +} diff --git a/IOIOLib/src/ioio/lib/impl/DigitalInputImpl.java b/IOIOLib/src/ioio/lib/impl/DigitalInputImpl.java new file mode 100755 index 0000000..65413d4 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/DigitalInputImpl.java @@ -0,0 +1,91 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.DigitalInput; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.IncomingState.InputPinListener; + +import java.io.IOException; + +public class DigitalInputImpl extends AbstractPin implements DigitalInput, + InputPinListener { + private boolean value_; + private boolean valid_ = false; + + DigitalInputImpl(IOIOImpl ioio, int pin) throws ConnectionLostException { + super(ioio, pin); + } + + @Override + synchronized public void setValue(int value) { + // Log.v("DigitalInputImpl", "Pin " + pinNum_ + " value is " + value); + assert (value == 0 || value == 1); + value_ = (value == 1); + if (!valid_) { + valid_ = true; + } + notifyAll(); + } + + synchronized public void waitForValue(boolean value) + throws InterruptedException, ConnectionLostException { + checkState(); + while ((!valid_ || value_ != value) && state_ != State.DISCONNECTED) { + wait(); + } + checkState(); + } + + @Override + synchronized public void close() { + super.close(); + try { + ioio_.protocol_.setChangeNotify(pinNum_, false); + } catch (IOException e) { + } + } + + @Override + synchronized public boolean read() throws InterruptedException, + ConnectionLostException { + checkState(); + while (!valid_ && state_ != State.DISCONNECTED) { + wait(); + } + checkState(); + return value_; + } + + @Override + public synchronized void disconnected() { + super.disconnected(); + notifyAll(); + } +} diff --git a/IOIOLib/src/ioio/lib/impl/DigitalOutputImpl.java b/IOIOLib/src/ioio/lib/impl/DigitalOutputImpl.java new file mode 100755 index 0000000..2e20457 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/DigitalOutputImpl.java @@ -0,0 +1,50 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.DigitalOutput; +import ioio.lib.api.exception.ConnectionLostException; + +import java.io.IOException; + +public class DigitalOutputImpl extends AbstractPin implements DigitalOutput { + DigitalOutputImpl(IOIOImpl ioio, int pin) throws ConnectionLostException { + super(ioio, pin); + } + + @Override + synchronized public void write(boolean val) throws ConnectionLostException { + checkState(); + try { + ioio_.protocol_.setDigitalOutLevel(pinNum_, val); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/FlowControlledOutputStream.java b/IOIOLib/src/ioio/lib/impl/FlowControlledOutputStream.java new file mode 100755 index 0000000..05cfce5 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/FlowControlledOutputStream.java @@ -0,0 +1,128 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; + +public class FlowControlledOutputStream extends OutputStream { + interface Sender { + void send(byte[] data, int size); + } + + private final Sender sender_; + private final BlockingQueue queue_ = new ArrayBlockingQueue( + Constants.BUFFER_SIZE); + private final FlushThread thread_ = new FlushThread(); + private final int maxPacket_; + private final byte[] packet_; + + private int readyToSend_ = 0; + private boolean closed_ = false; + + public FlowControlledOutputStream(Sender sender, int maxPacket) { + sender_ = sender; + maxPacket_ = maxPacket; + packet_ = new byte[maxPacket]; + thread_.start(); + } + + @Override + synchronized public void flush() throws IOException { + try { + while (!closed_ && !queue_.isEmpty()) { + wait(); + } + } catch (InterruptedException e) { + throw new IOException("Interrupted"); + } + if (closed_) { + throw new IOException("Stream has been closed"); + } + } + + @Override + synchronized public void write(int oneByte) throws IOException { + try { + while (!closed_ && !queue_.offer((byte) oneByte)) { + wait(); + } + } catch (InterruptedException e) { + throw new IOException("Interrupted"); + } + if (closed_) { + throw new IOException("Stream has been closed"); + } + notifyAll(); + } + + synchronized public void readyToSend(int numBytes) { + readyToSend_ += numBytes; + notifyAll(); + } + + @Override + synchronized public void close() { + closed_ = true; + notifyAll(); + thread_.interrupt(); + } + + synchronized public void kill() { + thread_.interrupt(); + } + + class FlushThread extends Thread { + @Override + public void run() { + super.run(); + try { + while (true) { + int toSend; + synchronized (FlowControlledOutputStream.this) { + while (readyToSend_ == 0 || queue_.isEmpty()) { + FlowControlledOutputStream.this.wait(); + } + toSend = Math.min(maxPacket_, + Math.min(readyToSend_, queue_.size())); + for (int i = 0; i < toSend; ++i) { + packet_[i] = queue_.remove(); + } + readyToSend_ -= toSend; + FlowControlledOutputStream.this.notifyAll(); + } + sender_.send(packet_, toSend); + } + } catch (InterruptedException e) { + } + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/FlowControlledPacketSender.java b/IOIOLib/src/ioio/lib/impl/FlowControlledPacketSender.java new file mode 100755 index 0000000..2546c91 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/FlowControlledPacketSender.java @@ -0,0 +1,118 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import java.io.IOException; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; + +public class FlowControlledPacketSender { + interface Packet { + int getSize(); + } + + interface Sender { + void send(Packet packet); + } + + private final Sender sender_; + private final BlockingQueue queue_ = new ArrayBlockingQueue( + Constants.PACKET_BUFFER_SIZE); + private final FlushThread thread_ = new FlushThread(); + + private int readyToSend_ = 0; + private boolean closed_ = false; + + public FlowControlledPacketSender(Sender sender) { + sender_ = sender; + thread_.start(); + } + + synchronized public void flush() throws IOException { + try { + while (!closed_ && !queue_.isEmpty()) { + wait(); + } + } catch (InterruptedException e) { + throw new IOException("Interrupted"); + } + if (closed_) { + throw new IllegalStateException("Stream has been closed"); + } + } + + synchronized public void write(Packet packet) throws IOException { + try { + while (!closed_ && !queue_.offer(packet)) { + wait(); + } + } catch (InterruptedException e) { + throw new IOException("Interrupted"); + } + if (closed_) { + throw new IllegalStateException("Stream has been closed"); + } + notifyAll(); + } + + synchronized public void readyToSend(int numBytes) { + readyToSend_ += numBytes; + notifyAll(); + } + + synchronized public void close() { + closed_ = true; + thread_.interrupt(); + } + + synchronized public void kill() { + thread_.interrupt(); + } + + class FlushThread extends Thread { + @Override + public void run() { + super.run(); + try { + while (true) { + synchronized (FlowControlledPacketSender.this) { + while (queue_.isEmpty() + || readyToSend_ < queue_.peek().getSize()) { + FlowControlledPacketSender.this.wait(); + } + FlowControlledPacketSender.this.notifyAll(); + readyToSend_ -= queue_.peek().getSize(); + } + sender_.send(queue_.remove()); + } + } catch (InterruptedException e) { + } + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/IOIOImpl.java b/IOIOLib/src/ioio/lib/impl/IOIOImpl.java new file mode 100755 index 0000000..a115186 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/IOIOImpl.java @@ -0,0 +1,654 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.AnalogInput; +import ioio.lib.api.DigitalInput; +import ioio.lib.api.DigitalInput.Spec; +import ioio.lib.api.DigitalInput.Spec.Mode; +import ioio.lib.api.DigitalOutput; +import ioio.lib.api.IOIO; +import ioio.lib.api.IOIOConnection; +import ioio.lib.api.IcspMaster; +import ioio.lib.api.PulseInput; +import ioio.lib.api.PulseInput.ClockRate; +import ioio.lib.api.PulseInput.PulseMode; +import ioio.lib.api.PwmOutput; +import ioio.lib.api.SpiMaster; +import ioio.lib.api.TwiMaster; +import ioio.lib.api.TwiMaster.Rate; +import ioio.lib.api.Uart; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.api.exception.IncompatibilityException; +import ioio.lib.impl.IOIOProtocol.PwmScale; +import ioio.lib.impl.IncomingState.DisconnectListener; + +import java.io.IOException; + +import android.util.Log; + +public class IOIOImpl implements IOIO, DisconnectListener { + private static final String TAG = "IOIOImpl"; + + enum State { + INIT, CONNECTED, INCOMPATIBLE, DEAD + } + + private static final byte[] REQUIRED_INTERFACE_ID = new byte[] { 'I', 'O', + 'I', 'O', '0', '0', '0', '3' }; + + private final IOIOConnection connection_; + private final IncomingState incomingState_ = new IncomingState(); + private final boolean openPins_[] = new boolean[Constants.NUM_PINS]; + private final boolean openTwi_[] = new boolean[Constants.NUM_TWI_MODULES]; + private boolean openIcsp_ = false; + private final ModuleAllocator pwmAllocator_ = new ModuleAllocator( + Constants.NUM_PWM_MODULES, "PWM"); + private final ModuleAllocator uartAllocator_ = new ModuleAllocator( + Constants.NUM_UART_MODULES, "UART"); + private final ModuleAllocator spiAllocator_ = new ModuleAllocator( + Constants.NUM_SPI_MODULES, "SPI"); + private final ModuleAllocator incapAllocatorDouble_ = new ModuleAllocator( + Constants.INCAP_MODULES_DOUBLE, "INCAP_DOUBLE"); + private final ModuleAllocator incapAllocatorSingle_ = new ModuleAllocator( + Constants.INCAP_MODULES_SINGLE, "INCAP_SINGLE"); + IOIOProtocol protocol_; + private State state_ = State.INIT; + + public IOIOImpl(IOIOConnection con) { + connection_ = con; + } + + @Override + synchronized public void waitForConnect() throws ConnectionLostException, + IncompatibilityException { + if (state_ == State.CONNECTED) { + return; + } + if (state_ == State.DEAD) { + throw new ConnectionLostException(); + } + addDisconnectListener(this); + Log.d(TAG, "Waiting for IOIO connection"); + try { + try { + Log.d(TAG, "Waiting for underlying connection"); + connection_.waitForConnect(); + protocol_ = new IOIOProtocol(connection_.getInputStream(), + connection_.getOutputStream(), incomingState_); + } catch (ConnectionLostException e) { + incomingState_.handleConnectionLost(); + throw e; + } + Log.d(TAG, "Waiting for handshake"); + incomingState_.waitConnectionEstablished(); + Log.d(TAG, "Querying for required interface ID"); + checkInterfaceVersion(); + Log.d(TAG, "Required interface ID is supported"); + state_ = State.CONNECTED; + Log.i(TAG, "IOIO connection established"); + } catch (ConnectionLostException e) { + Log.d(TAG, "Connection lost / aborted"); + state_ = State.DEAD; + throw e; + } catch (InterruptedException e) { + Log.e(TAG, "Unexpected exception", e); + } + } + + @Override + public void disconnect() { + connection_.disconnect(); + } + + @Override + public void disconnected() { + state_ = State.DEAD; + // The IOIOConnection doesn't necessarily know about the disconnect + disconnect(); + } + + public void waitForDisconnect() throws InterruptedException { + incomingState_.waitDisconnect(); + } + + private void checkInterfaceVersion() throws IncompatibilityException, + ConnectionLostException, InterruptedException { + try { + protocol_.checkInterface(REQUIRED_INTERFACE_ID); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + if (!incomingState_.waitForInterfaceSupport()) { + state_ = State.INCOMPATIBLE; + Log.e(TAG, "Required interface ID is not supported"); + throw new IncompatibilityException( + "IOIO firmware does not support required firmware: " + + new String(REQUIRED_INTERFACE_ID)); + } + } + + synchronized void removeDisconnectListener(DisconnectListener listener) { + incomingState_.removeDisconnectListener(listener); + } + + synchronized void addDisconnectListener(DisconnectListener listener) + throws ConnectionLostException { + incomingState_.addDisconnectListener(listener); + } + + synchronized void closePin(int pin) { + try { + checkState(); + if (!openPins_[pin]) { + throw new IllegalStateException("Pin not open: " + pin); + } + protocol_.setPinDigitalIn(pin, DigitalInput.Spec.Mode.FLOATING); + openPins_[pin] = false; + } catch (IOException e) { + } catch (ConnectionLostException e) { + } + } + + synchronized void closePwm(int pwmNum) { + try { + checkState(); + pwmAllocator_.releaseModule(pwmNum); + protocol_.setPwmPeriod(pwmNum, 0, IOIOProtocol.PwmScale.SCALE_1X); + } catch (IOException e) { + } catch (ConnectionLostException e) { + } + } + + synchronized void closeUart(int uartNum) { + try { + checkState(); + uartAllocator_.releaseModule(uartNum); + protocol_.uartClose(uartNum); + } catch (IOException e) { + } catch (ConnectionLostException e) { + } + } + + synchronized void closeTwi(int twiNum) { + try { + checkState(); + if (!openTwi_[twiNum]) { + throw new IllegalStateException("TWI not open: " + twiNum); + } + openTwi_[twiNum] = false; + openPins_[Constants.TWI_PINS[twiNum][0]] = false; + openPins_[Constants.TWI_PINS[twiNum][1]] = false; + protocol_.i2cClose(twiNum); + } catch (IOException e) { + } catch (ConnectionLostException e) { + } + } + + synchronized void closeIcsp() { + try { + checkState(); + if (!openIcsp_) { + throw new IllegalStateException("ICSP not open"); + } + openIcsp_ = false; + openPins_[Constants.ICSP_PINS[0]] = false; + openPins_[Constants.ICSP_PINS[1]] = false; + protocol_.icspClose(); + } catch (ConnectionLostException e) { + } catch (IOException e) { + } + } + + synchronized void closeSpi(int spiNum) { + try { + checkState(); + spiAllocator_.releaseModule(spiNum); + protocol_.spiClose(spiNum); + } catch (IOException e) { + } catch (ConnectionLostException e) { + } + } + + synchronized void closeIncap(int incapNum, boolean doublePrecision) { + try { + checkState(); + if (doublePrecision) { + incapAllocatorDouble_.releaseModule(incapNum); + } else { + incapAllocatorSingle_.releaseModule(incapNum); + } + protocol_.incapClose(incapNum); + } catch (IOException e) { + } catch (ConnectionLostException e) { + } + } + + @Override + synchronized public void softReset() throws ConnectionLostException { + checkState(); + try { + protocol_.softReset(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + synchronized public void hardReset() throws ConnectionLostException { + checkState(); + try { + protocol_.hardReset(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + public String getImplVersion(VersionType v) throws ConnectionLostException { + checkState(); + switch (v) { + case HARDWARE_VER: + return incomingState_.hardwareId_; + case BOOTLOADER_VER: + return incomingState_.bootloaderId_; + case APP_FIRMWARE_VER: + return incomingState_.firmwareId_; + case IOIOLIB_VER: + return "IOIO0311"; + } + return null; + } + + @Override + public DigitalInput openDigitalInput(int pin) + throws ConnectionLostException { + return openDigitalInput(new DigitalInput.Spec(pin)); + } + + @Override + public DigitalInput openDigitalInput(int pin, Mode mode) + throws ConnectionLostException { + return openDigitalInput(new DigitalInput.Spec(pin, mode)); + } + + @Override + synchronized public DigitalInput openDigitalInput(DigitalInput.Spec spec) + throws ConnectionLostException { + checkState(); + PinFunctionMap.checkValidPin(spec.pin); + checkPinFree(spec.pin); + DigitalInputImpl result = new DigitalInputImpl(this, spec.pin); + addDisconnectListener(result); + openPins_[spec.pin] = true; + incomingState_.addInputPinListener(spec.pin, result); + try { + protocol_.setPinDigitalIn(spec.pin, spec.mode); + protocol_.setChangeNotify(spec.pin, true); + } catch (IOException e) { + result.close(); + throw new ConnectionLostException(e); + } + return result; + } + + @Override + public DigitalOutput openDigitalOutput(int pin, + ioio.lib.api.DigitalOutput.Spec.Mode mode, boolean startValue) + throws ConnectionLostException { + return openDigitalOutput(new DigitalOutput.Spec(pin, mode), startValue); + } + + @Override + synchronized public DigitalOutput openDigitalOutput( + DigitalOutput.Spec spec, boolean startValue) + throws ConnectionLostException { + checkState(); + PinFunctionMap.checkValidPin(spec.pin); + checkPinFree(spec.pin); + DigitalOutputImpl result = new DigitalOutputImpl(this, spec.pin); + addDisconnectListener(result); + openPins_[spec.pin] = true; + try { + protocol_.setPinDigitalOut(spec.pin, startValue, spec.mode); + } catch (IOException e) { + result.close(); + throw new ConnectionLostException(e); + } + return result; + } + + @Override + public DigitalOutput openDigitalOutput(int pin, boolean startValue) + throws ConnectionLostException { + return openDigitalOutput(new DigitalOutput.Spec(pin), startValue); + } + + @Override + public DigitalOutput openDigitalOutput(int pin) + throws ConnectionLostException { + return openDigitalOutput(new DigitalOutput.Spec(pin), false); + } + + @Override + synchronized public AnalogInput openAnalogInput(int pin) + throws ConnectionLostException { + checkState(); + PinFunctionMap.checkSupportsAnalogInput(pin); + checkPinFree(pin); + AnalogInputImpl result = new AnalogInputImpl(this, pin); + addDisconnectListener(result); + openPins_[pin] = true; + incomingState_.addInputPinListener(pin, result); + try { + protocol_.setPinAnalogIn(pin); + protocol_.setAnalogInSampling(pin, true); + } catch (IOException e) { + result.close(); + throw new ConnectionLostException(e); + } + return result; + } + + @Override + public PwmOutput openPwmOutput(int pin, int freqHz) + throws ConnectionLostException { + return openPwmOutput(new DigitalOutput.Spec(pin), freqHz); + } + + @Override + synchronized public PwmOutput openPwmOutput(DigitalOutput.Spec spec, + int freqHz) throws ConnectionLostException { + checkState(); + PinFunctionMap.checkSupportsPeripheralOutput(spec.pin); + checkPinFree(spec.pin); + int pwmNum = pwmAllocator_.allocateModule(); + + int scale = 0; + float baseUs; + int period; + while (true) { + final int clk = 16000000 / IOIOProtocol.PwmScale.values()[scale].scale; + period = clk / freqHz; + if (period <= 65536) { + baseUs = 1000000.0f / clk; + break; + } + if (++scale >= PwmScale.values().length) { + throw new IllegalArgumentException("Frequency too low: " + + freqHz); + } + } + + PwmImpl pwm = new PwmImpl(this, spec.pin, pwmNum, period, baseUs); + addDisconnectListener(pwm); + openPins_[spec.pin] = true; + try { + protocol_.setPinDigitalOut(spec.pin, false, spec.mode); + protocol_.setPinPwm(spec.pin, pwmNum, true); + protocol_.setPwmPeriod(pwmNum, period - 1, + IOIOProtocol.PwmScale.values()[scale]); + } catch (IOException e) { + pwm.close(); + throw new ConnectionLostException(e); + } + return pwm; + } + + @Override + public Uart openUart(int rx, int tx, int baud, Uart.Parity parity, + Uart.StopBits stopbits) throws ConnectionLostException { + return openUart(rx == INVALID_PIN ? null : new DigitalInput.Spec(rx), + tx == INVALID_PIN ? null : new DigitalOutput.Spec(tx), baud, + parity, stopbits); + } + + @Override + synchronized public Uart openUart(DigitalInput.Spec rx, + DigitalOutput.Spec tx, int baud, Uart.Parity parity, + Uart.StopBits stopbits) throws ConnectionLostException { + checkState(); + if (rx != null) { + PinFunctionMap.checkSupportsPeripheralInput(rx.pin); + checkPinFree(rx.pin); + } + if (tx != null) { + PinFunctionMap.checkSupportsPeripheralOutput(tx.pin); + checkPinFree(tx.pin); + } + int rxPin = rx != null ? rx.pin : INVALID_PIN; + int txPin = tx != null ? tx.pin : INVALID_PIN; + int uartNum = uartAllocator_.allocateModule(); + UartImpl uart = new UartImpl(this, txPin, rxPin, uartNum); + addDisconnectListener(uart); + incomingState_.addUartListener(uartNum, uart); + try { + if (rx != null) { + openPins_[rx.pin] = true; + protocol_.setPinDigitalIn(rx.pin, rx.mode); + protocol_.setPinUart(rx.pin, uartNum, false, true); + } + if (tx != null) { + openPins_[tx.pin] = true; + protocol_.setPinDigitalOut(tx.pin, true, tx.mode); + protocol_.setPinUart(tx.pin, uartNum, true, true); + } + boolean speed4x = true; + int rate = Math.round(4000000.0f / baud) - 1; + if (rate > 65535) { + speed4x = false; + rate = Math.round(1000000.0f / baud) - 1; + } + protocol_.uartConfigure(uartNum, rate, speed4x, stopbits, parity); + } catch (IOException e) { + uart.close(); + throw new ConnectionLostException(e); + } + return uart; + } + + @Override + synchronized public TwiMaster openTwiMaster(int twiNum, Rate rate, + boolean smbus) throws ConnectionLostException { + checkState(); + checkTwiFree(twiNum); + checkPinFree(Constants.TWI_PINS[twiNum][0]); + checkPinFree(Constants.TWI_PINS[twiNum][1]); + openPins_[Constants.TWI_PINS[twiNum][0]] = true; + openPins_[Constants.TWI_PINS[twiNum][1]] = true; + openTwi_[twiNum] = true; + TwiMasterImpl twi = new TwiMasterImpl(this, twiNum); + addDisconnectListener(twi); + incomingState_.addTwiListener(twiNum, twi); + try { + protocol_.i2cConfigureMaster(twiNum, rate, smbus); + } catch (IOException e) { + twi.close(); + throw new ConnectionLostException(e); + } + return twi; + } + + @Override + synchronized public IcspMaster openIcspMaster() + throws ConnectionLostException { + checkState(); + checkIcspFree(); + checkPinFree(Constants.ICSP_PINS[0]); + checkPinFree(Constants.ICSP_PINS[1]); + checkPinFree(Constants.ICSP_PINS[2]); + openPins_[Constants.ICSP_PINS[0]] = true; + openPins_[Constants.ICSP_PINS[1]] = true; + openPins_[Constants.ICSP_PINS[2]] = true; + openIcsp_ = true; + IcspMasterImpl icsp = new IcspMasterImpl(this); + addDisconnectListener(icsp); + incomingState_.addIcspListener(icsp); + try { + protocol_.icspOpen(); + } catch (IOException e) { + icsp.close(); + throw new ConnectionLostException(e); + } + return icsp; + } + + @Override + public SpiMaster openSpiMaster(int miso, int mosi, int clk, + int slaveSelect, SpiMaster.Rate rate) + throws ConnectionLostException { + return openSpiMaster(miso, mosi, clk, new int[] { slaveSelect }, rate); + } + + @Override + public SpiMaster openSpiMaster(int miso, int mosi, int clk, + int[] slaveSelect, SpiMaster.Rate rate) + throws ConnectionLostException { + DigitalOutput.Spec[] slaveSpecs = new DigitalOutput.Spec[slaveSelect.length]; + for (int i = 0; i < slaveSelect.length; ++i) { + slaveSpecs[i] = new DigitalOutput.Spec(slaveSelect[i]); + } + return openSpiMaster(new DigitalInput.Spec(miso, Mode.PULL_UP), + new DigitalOutput.Spec(mosi), new DigitalOutput.Spec(clk), + slaveSpecs, new SpiMaster.Config(rate)); + } + + @Override + synchronized public SpiMaster openSpiMaster(DigitalInput.Spec miso, + DigitalOutput.Spec mosi, DigitalOutput.Spec clk, + DigitalOutput.Spec[] slaveSelect, SpiMaster.Config config) + throws ConnectionLostException { + checkState(); + int ssPins[] = new int[slaveSelect.length]; + checkPinFree(miso.pin); + PinFunctionMap.checkSupportsPeripheralInput(miso.pin); + checkPinFree(mosi.pin); + PinFunctionMap.checkSupportsPeripheralOutput(mosi.pin); + checkPinFree(clk.pin); + PinFunctionMap.checkSupportsPeripheralOutput(clk.pin); + for (int i = 0; i < slaveSelect.length; ++i) { + checkPinFree(slaveSelect[i].pin); + ssPins[i] = slaveSelect[i].pin; + } + + int spiNum = spiAllocator_.allocateModule(); + SpiMasterImpl spi = new SpiMasterImpl(this, spiNum, mosi.pin, miso.pin, + clk.pin, ssPins); + addDisconnectListener(spi); + + openPins_[miso.pin] = true; + openPins_[mosi.pin] = true; + openPins_[clk.pin] = true; + for (int i = 0; i < slaveSelect.length; ++i) { + openPins_[slaveSelect[i].pin] = true; + } + + incomingState_.addSpiListener(spiNum, spi); + try { + protocol_.setPinDigitalIn(miso.pin, miso.mode); + protocol_.setPinSpi(miso.pin, 1, true, spiNum); + protocol_.setPinDigitalOut(mosi.pin, true, mosi.mode); + protocol_.setPinSpi(mosi.pin, 0, true, spiNum); + protocol_.setPinDigitalOut(clk.pin, config.invertClk, clk.mode); + protocol_.setPinSpi(clk.pin, 2, true, spiNum); + for (DigitalOutput.Spec spec : slaveSelect) { + protocol_.setPinDigitalOut(spec.pin, true, spec.mode); + } + protocol_.spiConfigureMaster(spiNum, config); + } catch (IOException e) { + spi.close(); + throw new ConnectionLostException(e); + } + return spi; + } + + @Override + public PulseInput openPulseInput(Spec spec, ClockRate rate, PulseMode mode, + boolean doublePrecision) throws ConnectionLostException { + checkState(); + checkPinFree(spec.pin); + PinFunctionMap.checkSupportsPeripheralInput(spec.pin); + int incapNum = doublePrecision ? incapAllocatorDouble_.allocateModule() + : incapAllocatorSingle_.allocateModule(); + IncapImpl incap = new IncapImpl(this, mode, incapNum, spec.pin, + rate.hertz, mode.scaling, doublePrecision); + addDisconnectListener(incap); + incomingState_.addIncapListener(incapNum, incap); + openPins_[spec.pin] = true; + try { + protocol_.setPinDigitalIn(spec.pin, spec.mode); + protocol_.setPinIncap(spec.pin, incapNum, true); + protocol_.incapConfigure(incapNum, doublePrecision, + mode.ordinal() + 1, rate.ordinal()); + } catch (IOException e) { + incap.close(); + throw new ConnectionLostException(e); + } + return incap; + } + + @Override + public PulseInput openPulseInput(int pin, PulseMode mode) + throws ConnectionLostException { + return openPulseInput(new DigitalInput.Spec(pin), ClockRate.RATE_16MHz, + mode, true); + } + + private void checkPinFree(int pin) { + if (openPins_[pin]) { + throw new IllegalArgumentException("Pin already open: " + pin); + } + } + + private void checkTwiFree(int twi) { + if (openTwi_[twi]) { + throw new IllegalArgumentException("TWI already open: " + twi); + } + } + + private void checkIcspFree() { + if (openIcsp_) { + throw new IllegalArgumentException("ICSP already open"); + } + } + + private void checkState() throws ConnectionLostException { + if (state_ == State.DEAD) { + throw new ConnectionLostException(); + } + if (state_ == State.INCOMPATIBLE) { + throw new IllegalStateException( + "Incompatibility has been reported - IOIO cannot be used"); + } + if (state_ != State.CONNECTED) { + throw new IllegalStateException( + "Connection has not yet been established"); + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/IOIOProtocol.java b/IOIOLib/src/ioio/lib/impl/IOIOProtocol.java new file mode 100755 index 0000000..1975e10 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/IOIOProtocol.java @@ -0,0 +1,798 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.DigitalInput; +import ioio.lib.api.DigitalOutput; +import ioio.lib.api.SpiMaster; +import ioio.lib.api.TwiMaster.Rate; +import ioio.lib.api.Uart; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import android.util.Log; + +public class IOIOProtocol { + static final int HARD_RESET = 0x00; + static final int ESTABLISH_CONNECTION = 0x00; + static final int SOFT_RESET = 0x01; + static final int CHECK_INTERFACE = 0x02; + static final int CHECK_INTERFACE_RESPONSE = 0x02; + static final int SET_PIN_DIGITAL_OUT = 0x03; + static final int SET_DIGITAL_OUT_LEVEL = 0x04; + static final int REPORT_DIGITAL_IN_STATUS = 0x04; + static final int SET_PIN_DIGITAL_IN = 0x05; + static final int REPORT_PERIODIC_DIGITAL_IN_STATUS = 0x05; + static final int SET_CHANGE_NOTIFY = 0x06; + static final int REGISTER_PERIODIC_DIGITAL_SAMPLING = 0x07; + static final int SET_PIN_PWM = 0x08; + static final int SET_PWM_DUTY_CYCLE = 0x09; + static final int SET_PWM_PERIOD = 0x0A; + static final int SET_PIN_ANALOG_IN = 0x0B; + static final int REPORT_ANALOG_IN_STATUS = 0x0B; + static final int SET_ANALOG_IN_SAMPLING = 0x0C; + static final int REPORT_ANALOG_IN_FORMAT = 0x0C; + static final int UART_CONFIG = 0x0D; + static final int UART_STATUS = 0x0D; + static final int UART_DATA = 0x0E; + static final int SET_PIN_UART = 0x0F; + static final int UART_REPORT_TX_STATUS = 0x0F; + static final int SPI_CONFIGURE_MASTER = 0x10; + static final int SPI_STATUS = 0x10; + static final int SPI_MASTER_REQUEST = 0x11; + static final int SPI_DATA = 0x11; + static final int SET_PIN_SPI = 0x12; + static final int SPI_REPORT_TX_STATUS = 0x12; + static final int I2C_CONFIGURE_MASTER = 0x13; + static final int I2C_STATUS = 0x13; + static final int I2C_WRITE_READ = 0x14; + static final int I2C_RESULT = 0x14; + static final int I2C_REPORT_TX_STATUS = 0x15; + static final int ICSP_SIX = 0x16; + static final int ICSP_REPORT_RX_STATUS = 0x16; + static final int ICSP_REGOUT = 0x17; + static final int ICSP_RESULT = 0x17; + static final int ICSP_PROG_ENTER = 0x18; + static final int ICSP_PROG_EXIT = 0x19; + static final int ICSP_CONFIG = 0x1A; + static final int INCAP_CONFIGURE = 0x1B; + static final int INCAP_STATUS = 0x1B; + static final int SET_PIN_INCAP = 0x1C; + static final int INCAP_REPORT = 0x1C; + + static final int[] SCALE_DIV = new int[] { + 0x1F, // 31.25 + 0x1E, // 35.714 + 0x1D, // 41.667 + 0x1C, // 50 + 0x1B, // 62.5 + 0x1A, // 83.333 + 0x17, // 125 + 0x16, // 142.857 + 0x15, // 166.667 + 0x14, // 200 + 0x13, // 250 + 0x12, // 333.333 + 0x0F, // 500 + 0x0E, // 571.429 + 0x0D, // 666.667 + 0x0C, // 800 + 0x0B, // 1000 + 0x0A, // 1333.333 + 0x07, // 2000 + 0x06, // 2285.714 + 0x05, // 2666.667 + 0x04, // 3200 + 0x03, // 4000 + 0x02, // 5333.333 + 0x01 // 8000 + }; + + private static final String TAG = "IOIOProtocol"; + + enum PwmScale { + SCALE_1X(1, 0), SCALE_8X(8, 3), SCALE_64X(64, 2), SCALE_256X(256, 1); + + public final int scale; + private final int encoding; + + PwmScale(int scale, int encoding) { + this.scale = scale; + this.encoding = encoding; + } + } + + private byte[] outbuf_ = new byte[128]; + private int pos_ = 0; + + private void writeByte(int b) { + assert (b >= 0 && b < 256); + //Log.v(TAG, "sending: 0x" + Integer.toHexString(b)); + outbuf_[pos_++] = (byte) b; + } + + private void flush() throws IOException { + try { + out_.write(outbuf_, 0, pos_); + } finally { + pos_ = 0; + } + } + + private void writeTwoBytes(int i) throws IOException { + writeByte(i & 0xFF); + writeByte(i >> 8); + } + + private void writeThreeBytes(int i) throws IOException { + writeByte(i & 0xFF); + writeByte((i >> 8) & 0xFF); + writeByte((i >> 16) & 0xFF); + } + + synchronized public void hardReset() throws IOException { + writeByte(HARD_RESET); + writeByte('I'); + writeByte('O'); + writeByte('I'); + writeByte('O'); + flush(); + } + + synchronized public void softReset() throws IOException { + writeByte(SOFT_RESET); + flush(); + } + + synchronized public void checkInterface(byte[] interfaceId) + throws IOException { + if (interfaceId.length != 8) { + throw new IllegalArgumentException( + "interface ID must be exactly 8 bytes long"); + } + writeByte(CHECK_INTERFACE); + for (int i = 0; i < 8; ++i) { + writeByte(interfaceId[i]); + } + flush(); + } + + synchronized public void setDigitalOutLevel(int pin, boolean level) + throws IOException { + writeByte(SET_DIGITAL_OUT_LEVEL); + writeByte(pin << 2 | (level ? 1 : 0)); + flush(); + } + + synchronized public void setPinPwm(int pin, int pwmNum, boolean enable) + throws IOException { + writeByte(SET_PIN_PWM); + writeByte(pin & 0x3F); + writeByte((enable ? 0x80 : 0x00) | (pwmNum & 0x0F)); + flush(); + } + + synchronized public void setPwmDutyCycle(int pwmNum, int dutyCycle, + int fraction) throws IOException { + writeByte(SET_PWM_DUTY_CYCLE); + writeByte(pwmNum << 2 | fraction); + writeTwoBytes(dutyCycle); + flush(); + } + + synchronized public void setPwmPeriod(int pwmNum, int period, PwmScale scale) + throws IOException { + writeByte(SET_PWM_PERIOD); + writeByte(((scale.encoding & 0x02) << 6) | (pwmNum << 1) + | (scale.encoding & 0x01)); + writeTwoBytes(period); + flush(); + } + + synchronized public void setPinIncap(int pin, int incapNum, boolean enable) + throws IOException { + writeByte(SET_PIN_INCAP); + writeByte(pin); + writeByte(incapNum | (enable ? 0x80 : 0x00)); + flush(); + } + + synchronized public void incapClose(int incapNum) throws IOException { + writeByte(INCAP_CONFIGURE); + writeByte(incapNum); + writeByte(0x00); + flush(); + } + + synchronized public void incapConfigure(int incapNum, boolean double_prec, + int mode, int clock) throws IOException { + writeByte(INCAP_CONFIGURE); + writeByte(incapNum); + writeByte((double_prec ? 0x80 : 0x00) | (mode << 3) | clock); + flush(); + } + + synchronized public void i2cWriteRead(int i2cNum, boolean tenBitAddr, + int address, int writeSize, int readSize, byte[] writeData) + throws IOException { + writeByte(I2C_WRITE_READ); + writeByte(((address >> 8) << 6) | (tenBitAddr ? 0x20 : 0x00) | i2cNum); + writeByte(address & 0xFF); + writeByte(writeSize); + writeByte(readSize); + for (int i = 0; i < writeSize; ++i) { + writeByte(((int) writeData[i]) & 0xFF); + } + flush(); + } + + synchronized public void setPinDigitalOut(int pin, boolean value, + DigitalOutput.Spec.Mode mode) throws IOException { + writeByte(SET_PIN_DIGITAL_OUT); + writeByte((pin << 2) + | (mode == DigitalOutput.Spec.Mode.OPEN_DRAIN ? 0x01 : 0x00) + | (value ? 0x02 : 0x00)); + flush(); + } + + synchronized public void setPinDigitalIn(int pin, + DigitalInput.Spec.Mode mode) throws IOException { + int pull = 0; + if (mode == DigitalInput.Spec.Mode.PULL_UP) { + pull = 1; + } else if (mode == DigitalInput.Spec.Mode.PULL_DOWN) { + pull = 2; + } + writeByte(SET_PIN_DIGITAL_IN); + writeByte((pin << 2) | pull); + flush(); + } + + synchronized public void setChangeNotify(int pin, boolean changeNotify) + throws IOException { + writeByte(SET_CHANGE_NOTIFY); + writeByte((pin << 2) | (changeNotify ? 0x01 : 0x00)); + flush(); + } + + synchronized public void registerPeriodicDigitalSampling(int pin, + int freqScale) throws IOException { + // TODO: implement + } + + synchronized public void setPinAnalogIn(int pin) throws IOException { + writeByte(SET_PIN_ANALOG_IN); + writeByte(pin); + flush(); + } + + synchronized public void setAnalogInSampling(int pin, boolean enable) + throws IOException { + writeByte(SET_ANALOG_IN_SAMPLING); + writeByte((enable ? 0x80 : 0x00) | (pin & 0x3F)); + flush(); + } + + synchronized public void uartData(int uartNum, int numBytes, byte data[]) + throws IOException { + if (numBytes > 64) { + throw new IllegalArgumentException( + "A maximum of 64 bytes can be sent in one uartData message. Got: " + + numBytes); + } + writeByte(UART_DATA); + writeByte((numBytes - 1) | uartNum << 6); + for (int i = 0; i < numBytes; ++i) { + writeByte(((int) data[i]) & 0xFF); + } + flush(); + } + + synchronized public void uartConfigure(int uartNum, int rate, + boolean speed4x, Uart.StopBits stopbits, Uart.Parity parity) + throws IOException { + int parbits = parity == Uart.Parity.EVEN ? 1 + : (parity == Uart.Parity.ODD ? 2 : 0); + writeByte(UART_CONFIG); + writeByte((uartNum << 6) | (speed4x ? 0x08 : 0x00) + | (stopbits == Uart.StopBits.TWO ? 0x04 : 0x00) | parbits); + writeTwoBytes(rate); + flush(); + } + + synchronized public void uartClose(int uartNum) throws IOException { + writeByte(UART_CONFIG); + writeByte(uartNum << 6); + writeTwoBytes(0); + flush(); + } + + synchronized public void setPinUart(int pin, int uartNum, boolean tx, + boolean enable) throws IOException { + writeByte(SET_PIN_UART); + writeByte(pin); + writeByte((enable ? 0x80 : 0x00) | (tx ? 0x40 : 0x00) | uartNum); + flush(); + } + + synchronized public void spiConfigureMaster(int spiNum, + SpiMaster.Config config) throws IOException { + writeByte(SPI_CONFIGURE_MASTER); + writeByte((spiNum << 5) | SCALE_DIV[config.rate.ordinal()]); + writeByte((config.sampleOnTrailing ? 0x00 : 0x02) + | (config.invertClk ? 0x01 : 0x00)); + flush(); + } + + synchronized public void spiClose(int spiNum) throws IOException { + writeByte(SPI_CONFIGURE_MASTER); + writeByte(spiNum << 5); + writeByte(0x00); + flush(); + } + + synchronized public void setPinSpi(int pin, int mode, boolean enable, + int spiNum) throws IOException { + writeByte(SET_PIN_SPI); + writeByte(pin); + writeByte((1 << 4) | (mode << 2) | spiNum); + flush(); + } + + synchronized public void spiMasterRequest(int spiNum, int ssPin, + byte data[], int dataBytes, int totalBytes, int responseBytes) + throws IOException { + final boolean dataNeqTotal = (dataBytes != totalBytes); + final boolean resNeqTotal = (responseBytes != totalBytes); + writeByte(SPI_MASTER_REQUEST); + writeByte((spiNum << 6) | ssPin); + writeByte((dataNeqTotal ? 0x80 : 0x00) | (resNeqTotal ? 0x40 : 0x00) + | totalBytes - 1); + if (dataNeqTotal) { + writeByte(dataBytes); + } + if (resNeqTotal) { + writeByte(responseBytes); + } + for (int i = 0; i < dataBytes; ++i) { + writeByte(((int) data[i]) & 0xFF); + } + flush(); + } + + synchronized public void i2cConfigureMaster(int i2cNum, Rate rate, + boolean smbusLevels) throws IOException { + int rateBits = (rate == Rate.RATE_1MHz ? 3 + : (rate == Rate.RATE_400KHz ? 2 : 1)); + writeByte(I2C_CONFIGURE_MASTER); + writeByte((smbusLevels ? 0x80 : 0) | (rateBits << 5) | i2cNum); + flush(); + } + + synchronized public void i2cClose(int i2cNum) throws IOException { + writeByte(I2C_CONFIGURE_MASTER); + writeByte(i2cNum); + flush(); + } + + public void icspOpen() throws IOException { + writeByte(ICSP_CONFIG); + writeByte(0x01); + flush(); + } + + public void icspClose() throws IOException { + writeByte(ICSP_CONFIG); + writeByte(0x00); + flush(); + } + + public void icspEnter() throws IOException { + writeByte(ICSP_PROG_ENTER); + flush(); + } + + public void icspExit() throws IOException { + writeByte(ICSP_PROG_EXIT); + flush(); + } + + public void icspSix(int instruction) throws IOException { + writeByte(ICSP_SIX); + writeThreeBytes(instruction); + flush(); + } + + public void icspRegout() throws IOException { + writeByte(ICSP_REGOUT); + flush(); + } + + public interface IncomingHandler { + public void handleEstablishConnection(byte[] hardwareId, + byte[] bootloaderId, byte[] firmwareId); + + public void handleConnectionLost(); + + public void handleSoftReset(); + + public void handleCheckInterfaceResponse(boolean supported); + + public void handleSetChangeNotify(int pin, boolean changeNotify); + + public void handleReportDigitalInStatus(int pin, boolean level); + + public void handleRegisterPeriodicDigitalSampling(int pin, int freqScale); + + public void handleReportPeriodicDigitalInStatus(int frameNum, + boolean values[]); + + public void handleAnalogPinStatus(int pin, boolean open); + + public void handleReportAnalogInStatus(int pins[], int values[]); + + public void handleUartOpen(int uartNum); + + public void handleUartClose(int uartNum); + + public void handleUartData(int uartNum, int numBytes, byte data[]); + + public void handleUartReportTxStatus(int uartNum, int bytesRemaining); + + public void handleSpiOpen(int spiNum); + + public void handleSpiClose(int spiNum); + + public void handleSpiData(int spiNum, int ssPin, byte data[], + int dataBytes); + + public void handleSpiReportTxStatus(int spiNum, int bytesRemaining); + + public void handleI2cOpen(int i2cNum); + + public void handleI2cClose(int i2cNum); + + public void handleI2cResult(int i2cNum, int size, byte[] data); + + public void handleI2cReportTxStatus(int spiNum, int bytesRemaining); + + void handleIcspOpen(); + + void handleIcspClose(); + + void handleIcspReportRxStatus(int bytesRemaining); + + void handleIcspResult(int size, byte[] data); + + public void handleIncapReport(int incapNum, int size, byte[] data); + + public void handleIncapClose(int incapNum); + + public void handleIncapOpen(int incapNum); + } + + class IncomingThread extends Thread { + private int readOffset_ = 0; + private int validBytes_ = 0; + private byte[] inbuf_ = new byte[64]; + + private int[] analogFramePins_ = new int[0]; + private Set removedPins_ = new HashSet( + Constants.NUM_ANALOG_PINS); + private Set addedPins_ = new HashSet( + Constants.NUM_ANALOG_PINS); + + private void findDelta(int[] newPins) { + removedPins_.clear(); + addedPins_.clear(); + for (int i : analogFramePins_) { + removedPins_.add(i); + } + for (int i : newPins) { + addedPins_.add(i); + } + for (Iterator it = removedPins_.iterator(); it.hasNext();) { + Integer current = it.next(); + if (addedPins_.contains(current)) { + it.remove(); + addedPins_.remove(current); + } + } + } + + private void fillBuf() throws IOException { + try { + validBytes_ = in_.read(inbuf_, 0, inbuf_.length); + if (validBytes_ <= 0) { + throw new IOException("Unexpected stream closure"); + } + //Log.v(TAG, "received " + validBytes_ + " bytes"); + readOffset_ = 0; + } catch (IOException e) { + Log.i(TAG, "IOIO disconnected"); + throw e; + } + } + + private int readByte() throws IOException { + if (readOffset_ == validBytes_) { + fillBuf(); + } + int b = inbuf_[readOffset_++]; + b &= 0xFF; // make unsigned + //Log.v(TAG, "received: 0x" + Integer.toHexString(b)); + return b; + } + + private void readBytes(int size, byte[] buffer) throws IOException { + for (int i = 0; i < size; ++i) { + buffer[i] = (byte) readByte(); + } + } + + @Override + public void run() { + super.run(); + setPriority(MAX_PRIORITY); + int arg1; + int arg2; + int numPins; + int size; + byte[] data = new byte[256]; + try { + while (true) { + switch (arg1 = readByte()) { + case ESTABLISH_CONNECTION: + if (readByte() != 'I' || readByte() != 'O' + || readByte() != 'I' || readByte() != 'O') { + throw new IOException( + "Bad establish connection magic"); + } + byte[] hardwareId = new byte[8]; + byte[] bootloaderId = new byte[8]; + byte[] firmwareId = new byte[8]; + readBytes(8, hardwareId); + readBytes(8, bootloaderId); + readBytes(8, firmwareId); + + handler_.handleEstablishConnection(hardwareId, + bootloaderId, firmwareId); + break; + + case SOFT_RESET: + handler_.handleSoftReset(); + break; + + case REPORT_DIGITAL_IN_STATUS: + arg1 = readByte(); + handler_.handleReportDigitalInStatus(arg1 >> 2, + (arg1 & 0x01) == 1); + break; + + case SET_CHANGE_NOTIFY: + arg1 = readByte(); + handler_.handleSetChangeNotify(arg1 >> 2, + (arg1 & 0x01) == 1); + break; + + case REGISTER_PERIODIC_DIGITAL_SAMPLING: + // TODO: implement + break; + + case REPORT_PERIODIC_DIGITAL_IN_STATUS: + // TODO: implement + break; + + case REPORT_ANALOG_IN_FORMAT: + numPins = readByte(); + int[] newFormat = new int[numPins]; + for (int i = 0; i < numPins; ++i) { + newFormat[i] = readByte(); + } + findDelta(newFormat); + for (Integer i : removedPins_) { + handler_.handleAnalogPinStatus(i, false); + } + for (Integer i : addedPins_) { + handler_.handleAnalogPinStatus(i, true); + } + analogFramePins_ = newFormat; + break; + + case REPORT_ANALOG_IN_STATUS: + numPins = analogFramePins_.length; + int header = 0; + int[] values = new int[numPins]; + for (int i = 0; i < numPins; ++i) { + if (i % 4 == 0) { + header = readByte(); + } + values[i] = (readByte() << 2) | (header & 0x03); + header >>= 2; + } + handler_.handleReportAnalogInStatus(analogFramePins_, + values); + break; + + case UART_REPORT_TX_STATUS: + arg1 = readByte(); + arg2 = readByte(); + handler_.handleUartReportTxStatus(arg1 & 0x03, + (arg1 >> 2) | (arg2 << 6)); + break; + + case UART_DATA: + arg1 = readByte(); + for (int i = 0; i < (arg1 & 0x3F) + 1; ++i) { + data[i] = (byte) readByte(); + } + handler_.handleUartData(arg1 >> 6, (arg1 & 0x3F) + 1, + data); + break; + + case UART_STATUS: + arg1 = readByte(); + if ((arg1 & 0x80) != 0) { + handler_.handleUartOpen(arg1 & 0x03); + } else { + handler_.handleUartClose(arg1 & 0x03); + } + break; + + case SPI_DATA: + arg1 = readByte(); + arg2 = readByte(); + for (int i = 0; i < (arg1 & 0x3F) + 1; ++i) { + data[i] = (byte) readByte(); + } + handler_.handleSpiData(arg1 >> 6, arg2 & 0x3F, data, + (arg1 & 0x3F) + 1); + break; + + case SPI_REPORT_TX_STATUS: + arg1 = readByte(); + arg2 = readByte(); + handler_.handleSpiReportTxStatus(arg1 & 0x03, + (arg1 >> 2) | (arg2 << 6)); + break; + + case SPI_STATUS: + arg1 = readByte(); + if ((arg1 & 0x80) != 0) { + handler_.handleSpiOpen(arg1 & 0x03); + } else { + handler_.handleSpiClose(arg1 & 0x03); + } + break; + + case I2C_STATUS: + arg1 = readByte(); + if ((arg1 & 0x80) != 0) { + handler_.handleI2cOpen(arg1 & 0x03); + } else { + handler_.handleI2cClose(arg1 & 0x03); + } + break; + + case I2C_RESULT: + arg1 = readByte(); + arg2 = readByte(); + if (arg2 != 0xFF) { + for (int i = 0; i < arg2; ++i) { + data[i] = (byte) readByte(); + } + } + handler_.handleI2cResult(arg1 & 0x03, arg2, data); + break; + + case I2C_REPORT_TX_STATUS: + arg1 = readByte(); + arg2 = readByte(); + handler_.handleI2cReportTxStatus(arg1 & 0x03, + (arg1 >> 2) | (arg2 << 6)); + break; + + case CHECK_INTERFACE_RESPONSE: + arg1 = readByte(); + handler_.handleCheckInterfaceResponse((arg1 & 0x01) == 1); + break; + + case ICSP_REPORT_RX_STATUS: + arg1 = readByte(); + arg2 = readByte(); + handler_.handleIcspReportRxStatus(arg1 | (arg2 << 8)); + break; + + case ICSP_RESULT: + data[0] = (byte) readByte(); + data[1] = (byte) readByte(); + handler_.handleIcspResult(2, data); + break; + + case ICSP_CONFIG: + arg1 = readByte(); + if ((arg1 & 0x01) == 1) { + handler_.handleIcspOpen(); + } else { + handler_.handleIcspClose(); + } + break; + + case INCAP_STATUS: + arg1 = readByte(); + if ((arg1 & 0x80) != 0) { + handler_.handleIncapOpen(arg1 & 0x0F); + } else { + handler_.handleIncapClose(arg1 & 0x0F); + } + break; + + case INCAP_REPORT: + arg1 = readByte(); + size = arg1 >> 6; + if (size == 0) { + size = 4; + } + readBytes(size, data); + handler_.handleIncapReport(arg1 & 0x0F, size, data); + break; + + default: + in_.close(); + IOException e = new IOException( + "Received unexpected command: 0x" + + Integer.toHexString(arg1)); + Log.e("IOIOProtocol", "Protocol error", e); + throw e; + } + } + } catch (IOException e) { + handler_.handleConnectionLost(); + } + } + } + + private final InputStream in_; + private final OutputStream out_; + private final IncomingHandler handler_; + private final IncomingThread thread_ = new IncomingThread(); + + public IOIOProtocol(InputStream in, OutputStream out, + IncomingHandler handler) { + in_ = in; + out_ = out; + handler_ = handler; + thread_.start(); + } +} diff --git a/IOIOLib/src/ioio/lib/impl/IcspMasterImpl.java b/IOIOLib/src/ioio/lib/impl/IcspMasterImpl.java new file mode 100755 index 0000000..35b7789 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/IcspMasterImpl.java @@ -0,0 +1,135 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.IcspMaster; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.IncomingState.DataModuleListener; + +import java.io.IOException; +import java.util.LinkedList; +import java.util.Queue; + +public class IcspMasterImpl extends AbstractResource implements IcspMaster, + DataModuleListener { + private Queue resultQueue_ = new LinkedList(); + private int rxRemaining_ = 0; + + public IcspMasterImpl(IOIOImpl ioio) throws ConnectionLostException { + super(ioio); + } + + @Override + synchronized public void dataReceived(byte[] data, int size) { + assert (size == 2); + int result = (byteToInt(data[1]) << 8) | byteToInt(data[0]); + resultQueue_.add(result); + notifyAll(); + } + + @Override + synchronized public void reportAdditionalBuffer(int bytesToAdd) { + rxRemaining_ += bytesToAdd; + notifyAll(); + } + + @Override + synchronized public void enterProgramming() throws ConnectionLostException { + checkState(); + try { + ioio_.protocol_.icspEnter(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + synchronized public void exitProgramming() throws ConnectionLostException { + checkState(); + try { + ioio_.protocol_.icspExit(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + synchronized public void executeInstruction(int instruction) + throws ConnectionLostException { + checkState(); + try { + ioio_.protocol_.icspSix(instruction); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + synchronized public void readVisi() throws ConnectionLostException, + InterruptedException { + checkState(); + while (rxRemaining_ < 2 && state_ == State.OPEN) { + wait(); + } + checkState(); + rxRemaining_ -= 2; + try { + ioio_.protocol_.icspRegout(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + synchronized public void close() { + super.close(); + ioio_.closeIcsp(); + } + + @Override + public synchronized void disconnected() { + super.disconnected(); + notifyAll(); + } + + private static int byteToInt(byte b) { + return ((int) b) & 0xFF; + } + + @Override + public synchronized int waitVisiResult() throws ConnectionLostException, + InterruptedException { + checkState(); + while (resultQueue_.isEmpty() && state_ == State.OPEN) { + wait(); + } + checkState(); + return resultQueue_.remove(); + } +} diff --git a/IOIOLib/src/ioio/lib/impl/IncapImpl.java b/IOIOLib/src/ioio/lib/impl/IncapImpl.java new file mode 100755 index 0000000..a4c56c5 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/IncapImpl.java @@ -0,0 +1,109 @@ +package ioio.lib.impl; + +import ioio.lib.api.PulseInput; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.IncomingState.DataModuleListener; + +import java.util.LinkedList; +import java.util.Queue; + +public class IncapImpl extends AbstractPin implements DataModuleListener, + PulseInput { + private static final int MAX_QUEUE_LEN = 32; + private final PulseMode mode_; + private final int incapNum_; + private long lastDuration_; + private final float timeBase_; + private final boolean doublePrecision_; + private boolean valid_ = false; + // TODO: a fixed-size array would have been much better than a linked list. + private Queue pulseQueue_ = new LinkedList(); + + public IncapImpl(IOIOImpl ioio, PulseMode mode, int incapNum, int pin, + int clockRate, int scale, boolean doublePrecision) + throws ConnectionLostException { + super(ioio, pin); + mode_ = mode; + incapNum_ = incapNum; + timeBase_ = 1.0f / (scale * clockRate); + doublePrecision_ = doublePrecision; + } + + @Override + public float getFrequency() throws InterruptedException, + ConnectionLostException { + if (mode_ != PulseMode.FREQ && mode_ != PulseMode.FREQ_SCALE_4 + && mode_ != PulseMode.FREQ_SCALE_16) { + throw new IllegalStateException( + "Cannot query frequency when module was not opened in frequency mode."); + } + return 1.0f / getDuration(); + } + + @Override + public synchronized float getDuration() throws InterruptedException, + ConnectionLostException { + checkState(); + while (!valid_) { + wait(); + checkState(); + } + return timeBase_ * lastDuration_; + } + + @Override + public synchronized float waitPulseGetDuration() + throws InterruptedException, ConnectionLostException { + if (mode_ != PulseMode.POSITIVE && mode_ != PulseMode.NEGATIVE) { + throw new IllegalStateException( + "Cannot wait for pulse when module was not opened in pulse mode."); + } + checkState(); + while (pulseQueue_.isEmpty() && state_ == State.OPEN) { + wait(); + } + checkState(); + return timeBase_ * pulseQueue_.remove(); + } + + @Override + public synchronized void dataReceived(byte[] data, int size) { + lastDuration_ = ByteArrayToLong(data, size); + if (pulseQueue_.size() == MAX_QUEUE_LEN) { + pulseQueue_.remove(); + } + pulseQueue_.add(lastDuration_); + valid_ = true; + notifyAll(); + } + + private static long ByteArrayToLong(byte[] data, int size) { + long result = 0; + int i = size; + while (i-- > 0) { + result <<= 8; + result |= ((int) data[i]) & 0xFF; + } + if (result == 0) { + result = 1 << (size * 8); + } + return result; + } + + @Override + public synchronized void reportAdditionalBuffer(int bytesToAdd) { + } + + @Override + public synchronized void close() { + ioio_.closeIncap(incapNum_, doublePrecision_); + super.close(); + } + + @Override + public synchronized void disconnected() { + notifyAll(); + super.disconnected(); + } + +} diff --git a/IOIOLib/src/ioio/lib/impl/IncomingState.java b/IOIOLib/src/ioio/lib/impl/IncomingState.java new file mode 100755 index 0000000..02c48c2 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/IncomingState.java @@ -0,0 +1,460 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.IOIOProtocol.IncomingHandler; + +import java.util.HashSet; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.ConcurrentLinkedQueue; + +import android.util.Log; + +public class IncomingState implements IncomingHandler { + enum ConnectionState { + INIT, ESTABLISHED, CONNECTED, DISCONNECTED, UNSUPPORTED_IID + } + + interface InputPinListener { + void setValue(int value); + } + + interface DisconnectListener { + void disconnected(); + } + + interface DataModuleListener { + void dataReceived(byte[] data, int size); + + void reportAdditionalBuffer(int bytesToAdd); + } + + class InputPinState { + private Queue listeners_ = new ConcurrentLinkedQueue(); + private boolean currentOpen_ = false; + + void pushListener(InputPinListener listener) { + listeners_.add(listener); + } + + void closeCurrentListener() { + if (currentOpen_) { + currentOpen_ = false; + listeners_.remove(); + } + } + + void openNextListener() { + assert (!listeners_.isEmpty()); + if (!currentOpen_) { + currentOpen_ = true; + } + } + + void setValue(int v) { + assert (currentOpen_); + listeners_.peek().setValue(v); + } + } + + class DataModuleState { + private Queue listeners_ = new ConcurrentLinkedQueue(); + private boolean currentOpen_ = false; + + void pushListener(DataModuleListener listener) { + listeners_.add(listener); + } + + void closeCurrentListener() { + if (currentOpen_) { + currentOpen_ = false; + listeners_.remove(); + } + } + + void openNextListener() { + assert (!listeners_.isEmpty()); + if (!currentOpen_) { + currentOpen_ = true; + } + } + + void dataReceived(byte[] data, int size) { + assert (currentOpen_); + listeners_.peek().dataReceived(data, size); + } + + public void reportAdditionalBuffer(int bytesRemaining) { + assert (currentOpen_); + listeners_.peek().reportAdditionalBuffer(bytesRemaining); + } + } + + private final InputPinState[] intputPinStates_ = new InputPinState[Constants.NUM_PINS]; + private final DataModuleState[] uartStates_ = new DataModuleState[Constants.NUM_UART_MODULES]; + private final DataModuleState[] twiStates_ = new DataModuleState[Constants.NUM_TWI_MODULES]; + private final DataModuleState[] spiStates_ = new DataModuleState[Constants.NUM_SPI_MODULES]; + private final DataModuleState[] incapStates_ = new DataModuleState[2 + * Constants.INCAP_MODULES_DOUBLE.length + + Constants.INCAP_MODULES_SINGLE.length]; + private final DataModuleState icspState_ = new DataModuleState(); + private final Set disconnectListeners_ = new HashSet(); + private ConnectionState connection_ = ConnectionState.INIT; + public String hardwareId_; + public String bootloaderId_; + public String firmwareId_; + + public IncomingState() { + for (int i = 0; i < intputPinStates_.length; ++i) { + intputPinStates_[i] = new InputPinState(); + } + for (int i = 0; i < uartStates_.length; ++i) { + uartStates_[i] = new DataModuleState(); + } + for (int i = 0; i < twiStates_.length; ++i) { + twiStates_[i] = new DataModuleState(); + } + for (int i = 0; i < spiStates_.length; ++i) { + spiStates_[i] = new DataModuleState(); + } + for (int i = 0; i < incapStates_.length; ++i) { + incapStates_[i] = new DataModuleState(); + } + } + + synchronized public void waitConnectionEstablished() + throws InterruptedException, ConnectionLostException { + while (connection_ == ConnectionState.INIT) { + wait(); + } + if (connection_ == ConnectionState.DISCONNECTED) { + throw new ConnectionLostException(); + } + } + + synchronized public boolean waitForInterfaceSupport() + throws InterruptedException, ConnectionLostException { + if (connection_ == ConnectionState.INIT) { + throw new IllegalStateException( + "Have to connect before waiting for interface support"); + } + while (connection_ == ConnectionState.ESTABLISHED) { + wait(); + } + if (connection_ == ConnectionState.DISCONNECTED) { + throw new ConnectionLostException(); + } + return connection_ == ConnectionState.CONNECTED; + } + + synchronized public void waitDisconnect() throws InterruptedException { + while (connection_ != ConnectionState.DISCONNECTED) { + wait(); + } + } + + public void addInputPinListener(int pin, InputPinListener listener) { + intputPinStates_[pin].pushListener(listener); + } + + public void addUartListener(int uartNum, DataModuleListener listener) { + uartStates_[uartNum].pushListener(listener); + } + + public void addTwiListener(int twiNum, DataModuleListener listener) { + twiStates_[twiNum].pushListener(listener); + } + + public void addIncapListener(int incapNum, DataModuleListener listener) { + incapStates_[incapNum].pushListener(listener); + } + + public void addIcspListener(DataModuleListener listener) { + icspState_.pushListener(listener); + } + + public void addSpiListener(int spiNum, DataModuleListener listener) { + spiStates_[spiNum].pushListener(listener); + } + + synchronized public void addDisconnectListener(DisconnectListener listener) + throws ConnectionLostException { + checkNotDisconnected(); + disconnectListeners_.add(listener); + } + + synchronized public void removeDisconnectListener( + DisconnectListener listener) { + if (connection_ != ConnectionState.DISCONNECTED) { + disconnectListeners_.remove(listener); + } + } + + @Override + public void handleConnectionLost() { + // logMethod("handleConnectionLost"); + synchronized (this) { + connection_ = ConnectionState.DISCONNECTED; + } + for (DisconnectListener listener : disconnectListeners_) { + listener.disconnected(); + } + disconnectListeners_.clear(); + synchronized (this) { + notifyAll(); + } + } + + @Override + public void handleSoftReset() { + // logMethod("handleSoftReset"); + for (InputPinState pinState : intputPinStates_) { + pinState.closeCurrentListener(); + } + for (DataModuleState uartState : uartStates_) { + uartState.closeCurrentListener(); + } + for (DataModuleState twiState : twiStates_) { + twiState.closeCurrentListener(); + } + for (DataModuleState spiState : spiStates_) { + spiState.closeCurrentListener(); + } + for (DataModuleState incapState : incapStates_) { + incapState.closeCurrentListener(); + } + icspState_.closeCurrentListener(); + } + + @Override + synchronized public void handleCheckInterfaceResponse(boolean supported) { + // logMethod("handleCheckInterfaceResponse", supported); + connection_ = supported ? ConnectionState.CONNECTED + : ConnectionState.UNSUPPORTED_IID; + notifyAll(); + } + + @Override + public void handleSetChangeNotify(int pin, boolean changeNotify) { + // logMethod("handleSetChangeNotify", pin, changeNotify); + if (changeNotify) { + intputPinStates_[pin].openNextListener(); + } else { + intputPinStates_[pin].closeCurrentListener(); + } + } + + @Override + public void handleRegisterPeriodicDigitalSampling(int pin, int freqScale) { + // logMethod("handleRegisterPeriodicDigitalSampling", pin, freqScale); + assert (false); + } + + @Override + public void handleAnalogPinStatus(int pin, boolean open) { + // logMethod("handleAnalogPinStatus", pin, open); + if (open) { + intputPinStates_[pin].openNextListener(); + } else { + intputPinStates_[pin].closeCurrentListener(); + } + } + + @Override + public void handleUartData(int uartNum, int numBytes, byte[] data) { + // logMethod("handleUartData", uartNum, numBytes, data); + uartStates_[uartNum].dataReceived(data, numBytes); + } + + @Override + public void handleUartOpen(int uartNum) { + // logMethod("handleUartOpen", uartNum); + uartStates_[uartNum].openNextListener(); + } + + @Override + public void handleUartClose(int uartNum) { + // logMethod("handleUartClose", uartNum); + uartStates_[uartNum].closeCurrentListener(); + } + + @Override + public void handleSpiOpen(int spiNum) { + // logMethod("handleSpiOpen", spiNum); + spiStates_[spiNum].openNextListener(); + } + + @Override + public void handleSpiClose(int spiNum) { + // logMethod("handleSpiClose", spiNum); + spiStates_[spiNum].closeCurrentListener(); + } + + @Override + public void handleI2cOpen(int i2cNum) { + // logMethod("handleI2cOpen", i2cNum); + twiStates_[i2cNum].openNextListener(); + } + + @Override + public void handleI2cClose(int i2cNum) { + // logMethod("handleI2cClose", i2cNum); + twiStates_[i2cNum].closeCurrentListener(); + } + + @Override + public void handleIcspOpen() { + // logMethod("handleIcspOpen"); + icspState_.openNextListener(); + } + + @Override + public void handleIcspClose() { + // logMethod("handleIcspClose"); + icspState_.closeCurrentListener(); + } + + @Override + public void handleEstablishConnection(byte[] hardwareId, + byte[] bootloaderId, byte[] firmwareId) { + hardwareId_ = new String(hardwareId); + bootloaderId_ = new String(bootloaderId); + firmwareId_ = new String(firmwareId); + + Log.i("IncomingState", "IOIO Connection established. Hardware ID: " + + hardwareId_ + " Bootloader ID: " + bootloaderId_ + + " Firmware ID: " + firmwareId_); + synchronized (this) { + connection_ = ConnectionState.ESTABLISHED; + notifyAll(); + } + } + + @Override + public void handleUartReportTxStatus(int uartNum, int bytesRemaining) { + // logMethod("handleUartReportTxStatus", uartNum, bytesRemaining); + uartStates_[uartNum].reportAdditionalBuffer(bytesRemaining); + } + + @Override + public void handleI2cReportTxStatus(int i2cNum, int bytesRemaining) { + // logMethod("handleI2cReportTxStatus", i2cNum, bytesRemaining); + twiStates_[i2cNum].reportAdditionalBuffer(bytesRemaining); + } + + @Override + public void handleSpiData(int spiNum, int ssPin, byte[] data, int dataBytes) { + // logMethod("handleSpiData", spiNum, ssPin, data, dataBytes); + spiStates_[spiNum].dataReceived(data, dataBytes); + } + + @Override + public void handleIcspReportRxStatus(int bytesRemaining) { + // logMethod("handleIcspReportRxStatus", bytesRemaining); + icspState_.reportAdditionalBuffer(bytesRemaining); + } + + @Override + public void handleReportDigitalInStatus(int pin, boolean level) { + // logMethod("handleReportDigitalInStatus", pin, level); + intputPinStates_[pin].setValue(level ? 1 : 0); + } + + @Override + public void handleReportPeriodicDigitalInStatus(int frameNum, + boolean[] values) { + // logMethod("handleReportPeriodicDigitalInStatus", frameNum, values); + } + + @Override + public void handleReportAnalogInStatus(int pins[], int values[]) { + // logMethod("handleReportAnalogInStatus", pins, values); + for (int i = 0; i < pins.length; ++i) { + intputPinStates_[pins[i]].setValue(values[i]); + } + } + + @Override + public void handleSpiReportTxStatus(int spiNum, int bytesRemaining) { + // logMethod("handleSpiReportTxStatus", spiNum, bytesRemaining); + spiStates_[spiNum].reportAdditionalBuffer(bytesRemaining); + } + + @Override + public void handleI2cResult(int i2cNum, int size, byte[] data) { + // logMethod("handleI2cResult", i2cNum, size, data); + twiStates_[i2cNum].dataReceived(data, size); + } + + @Override + public void handleIncapReport(int incapNum, int size, byte[] data) { + // logMethod("handleIncapReport", incapNum, size, data); + incapStates_[incapNum].dataReceived(data, size); + } + + @Override + public void handleIncapClose(int incapNum) { + // logMethod("handleIncapClose", incapNum); + incapStates_[incapNum].closeCurrentListener(); + } + + @Override + public void handleIncapOpen(int incapNum) { + // logMethod("handleIncapOpen", incapNum); + incapStates_[incapNum].openNextListener(); + } + + @Override + public void handleIcspResult(int size, byte[] data) { + // logMethod("handleIcspResult", size, data); + icspState_.dataReceived(data, size); + } + + private void checkNotDisconnected() throws ConnectionLostException { + if (connection_ == ConnectionState.DISCONNECTED) { + throw new ConnectionLostException(); + } + } + +// private void logMethod(String name, Object... args) { +// StringBuffer msg = new StringBuffer(name); +// msg.append('('); +// for (int i = 0; i < args.length; ++i) { +// if (i != 0) { +// msg.append(", "); +// } +// msg.append(args[i]); +// } +// msg.append(')'); +// +// Log.v("IncomingState", msg.toString()); +// } +} diff --git a/IOIOLib/src/ioio/lib/impl/ModuleAllocator.java b/IOIOLib/src/ioio/lib/impl/ModuleAllocator.java new file mode 100755 index 0000000..41f7273 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/ModuleAllocator.java @@ -0,0 +1,106 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.exception.OutOfResourceException; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +/** + * Utility to allocate and assign unique module ids. + * A module id is requested via {@link #allocateModule()} + * and released via {@link #releaseModule(int)}. + * + * @author birmiwal + */ +public class ModuleAllocator { + private final Set availableModuleIds_; + private final Set allocatedModuleIds_; + private final String name_; + + public ModuleAllocator(Collection availableModuleIds, String name) { + this.availableModuleIds_ = new TreeSet(availableModuleIds); + allocatedModuleIds_ = new HashSet(); + name_ = name; + } + + public ModuleAllocator(int[] availableModuleIds, String name) { + this(getList(availableModuleIds), name); + } + + public ModuleAllocator(int maxModules, String name) { + this(getList(maxModules), name); + } + + private static Collection getList(int maxModules) { + List availableModuleIds = new ArrayList(); + for (int i = 0; i < maxModules; i++) { + availableModuleIds.add(i); + } + return availableModuleIds; + } + + private static Collection getList(int[] array) { + List availableModuleIds = new ArrayList(array.length); + for (int i : array) { + availableModuleIds.add(i); + } + return availableModuleIds; + } + + /** + * @return a module id that was allocated, or {@code null} if nothing was available + */ + public synchronized Integer allocateModule() { + if (availableModuleIds_.isEmpty()) { + throw new OutOfResourceException("No more resources of the requested type: " + name_); + } + Integer moduleId = availableModuleIds_.iterator().next(); + availableModuleIds_.remove(moduleId); + allocatedModuleIds_.add(moduleId); + return moduleId; + } + + /** + * @param moduleId the moduleId to be released; throws {@link IllegalArgumentException} if + * a moduleId is re-returned, or an invalid moduleId is provided + */ + public synchronized void releaseModule(int moduleId) { + if (!allocatedModuleIds_.contains(moduleId)) { + throw new IllegalArgumentException("moduleId: " + moduleId+ "; not yet allocated"); + } + availableModuleIds_.add(moduleId); + allocatedModuleIds_.remove(moduleId); + } +} diff --git a/IOIOLib/src/ioio/lib/impl/PinFunctionMap.java b/IOIOLib/src/ioio/lib/impl/PinFunctionMap.java new file mode 100755 index 0000000..3bf8cce --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/PinFunctionMap.java @@ -0,0 +1,76 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + + +public class PinFunctionMap { + private static final boolean[] PERIPHERAL_OUT = new boolean[] { true, + false, false, true, true, true, true, true, false, false, true, + true, true, true, true, false, false, false, false, false, false, + false, false, false, false, false, false, true, true, true, true, + true, true, false, true, true, true, true, true, true, true, false, + false, false, false, true, true, true, true }; + + private static final boolean[] PERIPHERAL_IN = new boolean[] { true, + false, false, true, true, true, true, true, false, true, true, + true, true, true, true, false, false, false, false, false, false, + false, false, false, false, false, false, true, true, true, true, + true, true, false, true, true, true, true, true, true, true, false, + false, false, false, true, true, true, true }; + + static void checkSupportsAnalogInput(int pin) { + checkValidPin(pin); + if (pin < 31 || pin > 46) { + throw new IllegalArgumentException("Pin " + pin + + " does not support analog input"); + } + } + + static void checkSupportsPeripheralInput(int pin) { + checkValidPin(pin); + if (!PERIPHERAL_IN[pin]) { + throw new IllegalArgumentException("Pin " + pin + + " does not support peripheral input"); + } + } + + static void checkSupportsPeripheralOutput(int pin) { + checkValidPin(pin); + if (!PERIPHERAL_OUT[pin]) { + throw new IllegalArgumentException("Pin " + pin + + " does not support peripheral output"); + } + } + + static void checkValidPin(int pin) { + if (pin < 0 || pin > 48) { + throw new IllegalArgumentException("Illegal pin: " + pin); + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/PwmImpl.java b/IOIOLib/src/ioio/lib/impl/PwmImpl.java new file mode 100755 index 0000000..ce0d440 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/PwmImpl.java @@ -0,0 +1,101 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.PwmOutput; +import ioio.lib.api.exception.ConnectionLostException; + +import java.io.IOException; + +public class PwmImpl extends AbstractResource implements PwmOutput { + private final int pwmNum_; + private final int pinNum_; + private final float baseUs_; + private final int period_; + + public PwmImpl(IOIOImpl ioio, int pinNum, int pwmNum, int period, + float baseUs) throws ConnectionLostException { + super(ioio); + pwmNum_ = pwmNum; + pinNum_ = pinNum; + baseUs_ = baseUs; + period_ = period; + } + + @Override + public synchronized void close() { + super.close(); + ioio_.closePwm(pwmNum_); + ioio_.closePin(pinNum_); + } + + @Override + public void setDutyCycle(float dutyCycle) throws ConnectionLostException { + assert (dutyCycle <= 1 && dutyCycle >= 0); + setPulseWidthInClocks(period_ * dutyCycle); + } + + @Override + public void setPulseWidth(int pulseWidthUs) throws ConnectionLostException { + setPulseWidth((float) pulseWidthUs); + } + + @Override + public void setPulseWidth(float pulseWidthUs) + throws ConnectionLostException { + assert (pulseWidthUs >= 0); + float p = pulseWidthUs / baseUs_; + setPulseWidthInClocks(p); + } + + synchronized private void setPulseWidthInClocks(float p) + throws ConnectionLostException { + checkState(); + if (p > period_) { + p = period_; + } + int pw; + int fraction; + p -= 1; // period parameter is one less than the actual period length + // yes, there is 0 and then 2 (no 1) - this is not a bug, that + // is how the hardware PWM module works. + if (p < 1) { + pw = 0; + fraction = 0; + } else { + pw = (int) p; + fraction = ((int) p * 4) & 0x03; + } + try { + ioio_.protocol_.setPwmDutyCycle(pwmNum_, pw, fraction); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/QueueInputStream.java b/IOIOLib/src/ioio/lib/impl/QueueInputStream.java new file mode 100755 index 0000000..42ce41a --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/QueueInputStream.java @@ -0,0 +1,79 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Queue; +import java.util.concurrent.ArrayBlockingQueue; + +import android.util.Log; + +public class QueueInputStream extends InputStream { + private final Queue queue_ = new ArrayBlockingQueue( + Constants.BUFFER_SIZE); + private boolean closed_ = false; + + @Override + synchronized public int read() throws IOException { + try { + while (!closed_ && queue_.isEmpty()) { + wait(); + } + if (closed_) { + throw new IOException("Stream has been closed"); + } + return ((int) queue_.remove()) & 0xFF; + } catch (InterruptedException e) { + throw new IOException("Interrupted"); + } + } + + synchronized public void write(byte[] data, int size) { + for (int i = 0; i < size; ++i) { + if (queue_.size() == Constants.BUFFER_SIZE) { + Log.e("QueueInputStream", "Buffer overflow, discarding data"); + break; + } + queue_.add(data[i]); + } + notifyAll(); + } + + @Override + synchronized public int available() throws IOException { + return queue_.size(); + } + + @Override + synchronized public void close() { + closed_ = true; + } + +} diff --git a/IOIOLib/src/ioio/lib/impl/SocketIOIOConnection.java b/IOIOLib/src/ioio/lib/impl/SocketIOIOConnection.java new file mode 100755 index 0000000..d712b27 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/SocketIOIOConnection.java @@ -0,0 +1,140 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.IOIOConnection; +import ioio.lib.api.exception.ConnectionLostException; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.SocketException; + +import android.util.Log; + +public class SocketIOIOConnection implements IOIOConnection { + private final int port_; + private ServerSocket server_ = null; + private Socket socket_ = null; + private boolean disconnect_ = false; + private boolean server_owned_by_connect_ = true; + private boolean socket_owned_by_connect_ = true; + + public SocketIOIOConnection(Integer port) { + port_ = port; + } + + @Override + public void waitForConnect() throws ConnectionLostException { + try { + synchronized (this) { + if (disconnect_) { + throw new ConnectionLostException(); + } + Log.d("SocketIOIOConnection", "Creating server socket"); + server_ = new ServerSocket(port_); + server_owned_by_connect_ = false; + } + Log.d("SocketIOIOConnection", "Waiting for TCP connection"); + socket_ = server_.accept(); + Log.d("SocketIOIOConnection", "TCP connected"); + synchronized (this) { + if (disconnect_) { + socket_.close(); + throw new ConnectionLostException(); + } + socket_owned_by_connect_ = false; + } + } catch (IOException e) { + synchronized (this) { + disconnect_ = true; + if (server_owned_by_connect_ && server_ != null) { + try { + server_.close(); + } catch (IOException e1) { + Log.e("SocketIOIOConnection", "Unexpected exception", e1); + } + } + if (socket_owned_by_connect_ && socket_ != null) { + try { + socket_.close(); + } catch (IOException e1) { + Log.e("SocketIOIOConnection", "Unexpected exception", e1); + } + } + if (e instanceof SocketException && e.getMessage().equals("Permission denied")) { + Log.e("SocketIOIOConnection", "Did you forget to declare uses-permission of android.permission.INTERNET?"); + } + throw new ConnectionLostException(e); + } + } + } + + @Override + synchronized public void disconnect() { + if (disconnect_) { + return; + } + Log.d("SocketIOIOConnection", "Client initiated disconnect"); + disconnect_ = true; + if (!server_owned_by_connect_) { + try { + server_.close(); + } catch (IOException e1) { + Log.e("SocketIOIOConnection", "Unexpected exception", e1); + } + } + if (!socket_owned_by_connect_) { + try { + socket_.shutdownOutput(); + } catch (IOException e1) { + } + } + } + + @Override + public InputStream getInputStream() throws ConnectionLostException { + try { + return socket_.getInputStream(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } + + @Override + public OutputStream getOutputStream() throws ConnectionLostException { + try { + return socket_.getOutputStream(); + } catch (IOException e) { + throw new ConnectionLostException(e); + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/SpiMasterImpl.java b/IOIOLib/src/ioio/lib/impl/SpiMasterImpl.java new file mode 100755 index 0000000..bdd88ef --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/SpiMasterImpl.java @@ -0,0 +1,198 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.SpiMaster; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.FlowControlledPacketSender.Packet; +import ioio.lib.impl.FlowControlledPacketSender.Sender; +import ioio.lib.impl.IncomingState.DataModuleListener; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; + +import android.util.Log; + +public class SpiMasterImpl extends AbstractResource implements SpiMaster, + DataModuleListener, Sender { + public class SpiResult implements Result { + boolean ready_; + final byte[] data_; + + SpiResult(byte[] data) { + data_ = data; + } + + @Override + public synchronized void waitReady() throws ConnectionLostException, + InterruptedException { + while (!ready_ && state_ != State.DISCONNECTED) { + wait(); + } + checkState(); + } + } + + class OutgoingPacket implements Packet { + int writeSize_; + byte[] writeData_; + int ssPin_; + int readSize_; + int totalSize_; + + @Override + public int getSize() { + return writeSize_ + 4; + } + } + + private final Queue pendingRequests_ = new ConcurrentLinkedQueue(); + private final FlowControlledPacketSender outgoing_ = new FlowControlledPacketSender( + this); + + private final int spiNum_; + private final Map ssPinToIndex_; + private final int[] indexToSsPin_; + private final int mosiPinNum_; + private final int misoPinNum_; + private final int clkPinNum_; + + SpiMasterImpl(IOIOImpl ioio, int spiNum, int mosiPinNum, int misoPinNum, + int clkPinNum, int[] ssPins) throws ConnectionLostException { + super(ioio); + spiNum_ = spiNum; + mosiPinNum_ = mosiPinNum; + misoPinNum_ = misoPinNum; + clkPinNum_ = clkPinNum; + indexToSsPin_ = ssPins.clone(); + ssPinToIndex_ = new HashMap(ssPins.length); + for (int i = 0; i < ssPins.length; ++i) { + ssPinToIndex_.put(ssPins[i], i); + } + } + + @Override + synchronized public void disconnected() { + super.disconnected(); + outgoing_.kill(); + for (SpiResult tr : pendingRequests_) { + synchronized (tr) { + tr.notify(); + } + } + } + + @Override + public void writeRead(int slave, byte[] writeData, int writeSize, + int totalSize, byte[] readData, int readSize) + throws ConnectionLostException, InterruptedException { + Result result = writeReadAsync(slave, writeData, writeSize, + totalSize, readData, readSize); + result.waitReady(); + } + + @Override + public SpiResult writeReadAsync(int slave, byte[] writeData, + int writeSize, int totalSize, byte[] readData, int readSize) + throws ConnectionLostException { + checkState(); + SpiResult result = new SpiResult(readData); + + OutgoingPacket p = new OutgoingPacket(); + p.writeSize_ = writeSize; + p.writeData_ = writeData; + p.readSize_ = readSize; + p.ssPin_ = indexToSsPin_[slave]; + p.totalSize_ = totalSize; + + if (p.readSize_ > 0) { + synchronized (this) { + pendingRequests_.add(result); + } + } else { + result.ready_ = true; + } + try { + outgoing_.write(p); + } catch (IOException e) { + Log.e("SpiMasterImpl", "Exception caught", e); + } + return result; + } + + @Override + public void writeRead(byte[] writeData, int writeSize, int totalSize, + byte[] readData, int readSize) throws ConnectionLostException, + InterruptedException { + writeRead(0, writeData, writeSize, totalSize, readData, readSize); + } + + @Override + public void dataReceived(byte[] data, int size) { + SpiResult result = pendingRequests_.remove(); + synchronized (result) { + result.ready_ = true; + System.arraycopy(data, 0, result.data_, 0, size); + result.notify(); + } + } + + @Override + public void reportAdditionalBuffer(int bytesRemaining) { + outgoing_.readyToSend(bytesRemaining); + } + + @Override + synchronized public void close() { + super.close(); + outgoing_.close(); + ioio_.closeSpi(spiNum_); + ioio_.closePin(mosiPinNum_); + ioio_.closePin(misoPinNum_); + ioio_.closePin(clkPinNum_); + for (int pin : indexToSsPin_) { + ioio_.closePin(pin); + } + } + + @Override + public void send(Packet packet) { + OutgoingPacket p = (OutgoingPacket) packet; + try { + ioio_.protocol_.spiMasterRequest(spiNum_, p.ssPin_, p.writeData_, + p.writeSize_, p.totalSize_, p.readSize_); + } catch (IOException e) { + Log.e("SpiImpl", "Caught exception", e); + } + } + +} diff --git a/IOIOLib/src/ioio/lib/impl/TwiMasterImpl.java b/IOIOLib/src/ioio/lib/impl/TwiMasterImpl.java new file mode 100755 index 0000000..bfe2023 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/TwiMasterImpl.java @@ -0,0 +1,169 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.TwiMaster; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.FlowControlledPacketSender.Packet; +import ioio.lib.impl.FlowControlledPacketSender.Sender; +import ioio.lib.impl.IncomingState.DataModuleListener; + +import java.io.IOException; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; + +import android.util.Log; + +public class TwiMasterImpl extends AbstractResource implements TwiMaster, + DataModuleListener, Sender { + class TwiResult implements Result { + boolean ready_ = false; + boolean success_; + final byte[] data_; + + public TwiResult(byte[] data) { + data_ = data; + } + + @Override + public synchronized boolean waitReady() throws ConnectionLostException, + InterruptedException { + while (!ready_ && state_ != State.DISCONNECTED) { + wait(); + } + checkState(); + return success_; + } + } + + class OutgoingPacket implements Packet { + int writeSize_; + byte[] writeData_; + boolean tenBitAddr_; + int addr_; + int readSize_; + + @Override + public int getSize() { + return writeSize_ + 4; + } + + } + + private final Queue pendingRequests_ = new ConcurrentLinkedQueue(); + private final FlowControlledPacketSender outgoing_ = new FlowControlledPacketSender( + this); + private final int twiNum_; + + TwiMasterImpl(IOIOImpl ioio, int twiNum) throws ConnectionLostException { + super(ioio); + twiNum_ = twiNum; + } + + @Override + synchronized public void disconnected() { + super.disconnected(); + outgoing_.kill(); + for (TwiResult tr : pendingRequests_) { + synchronized (tr) { + tr.notify(); + } + } + } + + @Override + public boolean writeRead(int address, boolean tenBitAddr, byte[] writeData, + int writeSize, byte[] readData, int readSize) + throws ConnectionLostException, InterruptedException { + Result result = writeReadAsync(address, tenBitAddr, writeData, + writeSize, readData, readSize); + return result.waitReady(); + } + + @Override + public Result writeReadAsync(int address, boolean tenBitAddr, + byte[] writeData, int writeSize, byte[] readData, int readSize) + throws ConnectionLostException { + checkState(); + TwiResult result = new TwiResult(readData); + + OutgoingPacket p = new OutgoingPacket(); + p.writeSize_ = writeSize; + p.writeData_ = writeData; + p.tenBitAddr_ = tenBitAddr; + p.readSize_ = readSize; + p.addr_ = address; + + synchronized (this) { + pendingRequests_.add(result); + try { + outgoing_.write(p); + } catch (IOException e) { + Log.e("SpiMasterImpl", "Exception caught", e); + } + } + return result; + } + + @Override + public void dataReceived(byte[] data, int size) { + TwiResult result = pendingRequests_.remove(); + synchronized (result) { + result.ready_ = true; + result.success_ = (size != 0xFF); + if (result.success_) { + System.arraycopy(data, 0, result.data_, 0, size); + } + result.notify(); + } + } + + @Override + public void reportAdditionalBuffer(int bytesRemaining) { + outgoing_.readyToSend(bytesRemaining); + } + + @Override + synchronized public void close() { + super.close(); + outgoing_.close(); + ioio_.closeTwi(twiNum_); + } + + @Override + public void send(Packet packet) { + OutgoingPacket p = (OutgoingPacket) packet; + try { + ioio_.protocol_.i2cWriteRead(twiNum_, p.tenBitAddr_, p.addr_, + p.writeSize_, p.readSize_, p.writeData_); + } catch (IOException e) { + Log.e("TwiImpl", "Caught exception", e); + } + } +} diff --git a/IOIOLib/src/ioio/lib/impl/UartImpl.java b/IOIOLib/src/ioio/lib/impl/UartImpl.java new file mode 100755 index 0000000..4cd7a28 --- /dev/null +++ b/IOIOLib/src/ioio/lib/impl/UartImpl.java @@ -0,0 +1,107 @@ +/* + * Copyright 2011 Ytai Ben-Tsvi. All rights reserved. + * + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARSHAN POURSOHI OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied. + */ +package ioio.lib.impl; + +import ioio.lib.api.IOIO; +import ioio.lib.api.Uart; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.impl.FlowControlledOutputStream.Sender; +import ioio.lib.impl.IncomingState.DataModuleListener; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import android.util.Log; + +public class UartImpl extends AbstractResource implements DataModuleListener, Sender, Uart { + private static final int MAX_PACKET = 64; + + private final int uartNum_; + private final int rxPinNum_; + private final int txPinNum_; + private final FlowControlledOutputStream outgoing_ = new FlowControlledOutputStream(this, MAX_PACKET); + private final QueueInputStream incoming_ = new QueueInputStream(); + + public UartImpl(IOIOImpl ioio, int txPin, int rxPin, int uartNum) throws ConnectionLostException { + super(ioio); + uartNum_ = uartNum; + rxPinNum_ = rxPin; + txPinNum_ = txPin; + } + + @Override + public void dataReceived(byte[] data, int size) { + incoming_.write(data, size); + } + + @Override + public void send(byte[] data, int size) { + try { + ioio_.protocol_.uartData(uartNum_, size, data); + } catch (IOException e) { + Log.e("UartImpl", e.getMessage()); + } + } + + @Override + synchronized public void close() { + super.close(); + incoming_.close(); + outgoing_.close(); + ioio_.closeUart(uartNum_); + if (rxPinNum_ != IOIO.INVALID_PIN) { + ioio_.closePin(rxPinNum_); + } + if (txPinNum_ != IOIO.INVALID_PIN) { + ioio_.closePin(txPinNum_); + } + } + + @Override + synchronized public void disconnected() { + super.disconnected(); + outgoing_.kill(); + } + + @Override + public InputStream getInputStream() { + return incoming_; + } + + @Override + public OutputStream getOutputStream() { + return outgoing_; + } + + @Override + public void reportAdditionalBuffer(int bytesRemaining) { + outgoing_.readyToSend(bytesRemaining); + } +} diff --git a/IOIOLib/src/ioio/lib/util/AbstractIOIOActivity.java b/IOIOLib/src/ioio/lib/util/AbstractIOIOActivity.java new file mode 100755 index 0000000..e2e4c1b --- /dev/null +++ b/IOIOLib/src/ioio/lib/util/AbstractIOIOActivity.java @@ -0,0 +1,295 @@ +package ioio.lib.util; + +import ioio.lib.api.IOIO; +import ioio.lib.api.IOIOFactory; +import ioio.lib.api.exception.ConnectionLostException; +import ioio.lib.api.exception.IncompatibilityException; +import ioio.lib.util.IOIOConnectionDiscovery.IOIOConnectionSpec; + +import java.util.Collection; +import java.util.LinkedList; + +import android.app.Activity; +import android.os.Looper; +import android.util.Log; + +/** + * A convenience class for easy creation of IOIO-based applications. + * + * It is used by creating a concrete Activity in your application, which extends + * this class. This class then takes care of proper creation and abortion of the + * IOIO connection and of a dedicated thread for IOIO communication. + * + * In the basic usage the client should extend this class and implement + * {@link #createIOIOThread()}, which should return an implementation of the + * {@link IOIOThread} abstract class. In this implementation, the client + * implements the {@link IOIOThread#setup()} method, which gets called as soon + * as communication with the IOIO is established, and the {@link IOIOThread + * #loop()} method, which gets called repetitively as long as the IOIO is + * connected. Both methods should access the {@link IOIOThread#ioio_} field for + * controlling the IOIO. + * + * In addition, the {@link IOIOThread#disconnected()} method may be overridden + * in order to execute logic as soon as a disconnection occurs for whichever + * reason. The {@link IOIOThread#incompatible()} method may be overridden in + * order to take action in case where a IOIO whose firmware is incompatible with + * the IOIOLib version that application is built with. + * + * In a more advanced use case, more than one IOIO is available. In this case, a + * thread will be created for each IOIO, whose semantics are as defined above. + * If the client needs to be able to distinguish between them, it is possible to + * override {@link #createIOIOThread(String, Object[])} instead of + * {@link #createIOIOThread()}. The first argument provided will contain the + * connection class name, such as ioio.lib.impl.SocketIOIOConnection for a + * connection established over a TCP socket (which is used over ADB). The second + * argument will contain information specific to the connection type. For + * example, in the case of SocketIOIOConnection, the array will contain an + * {@link Integer} representing the local port number. + * + */ +public abstract class AbstractIOIOActivity extends Activity { + private static final String TAG = "AbstractIOIOActivity"; + private IOIOConnectionSpec currentSpec_; + private Collection threads_ = new LinkedList(); + + /** + * Subclasses should call this method from their own onResume() if + * overloaded. It takes care of connecting with the IOIO. + */ + @Override + protected void onResume() { + super.onResume(); + createAllThreads(); + startAllThreads(); + } + + /** + * Subclasses should call this method from their own onPause() if + * overloaded. It takes care of disconnecting from the IOIO. + */ + @Override + protected void onPause() { + super.onPause(); + abortAllThreads(); + try { + joinAllThreads(); + } catch (InterruptedException e) { + } + } + + /** + * Subclasses should implement this method by returning a concrete subclass + * of {@link IOIOThread}. null may be returned if the client + * is not interested to connect a thread for this IOIO. In multi-IOIO + * scenarios, where you want to identify which IOIO the thread is for, + * consider using {@link #createIOIOThread()} instead. + * + * @return An implementation of {@link IOIOThread}, or null to + * skip. + */ + protected IOIOThread createIOIOThread() { + return null; + } + + /** + * Subclasses should implement this method by returning a concrete subclass + * of {@link IOIOThread}. This overload is useful in multi-IOIO scenarios, + * where you want to identify which IOIO the thread is for. The provided + * arguments should provide enough information to be unique per connection. + * null may be returned if the client is not interested to + * connect a thread for this IOIO. This can be used in order to filter out + * unwanted connections, for example if the application is only intended for + * wireless connection, any wired connection attempts may be rejected, thus + * saving resources used for listening for incoming wired connections. + * + * @param connectionClass + * The fully-qualified name of the connection class used to + * connect to the IOIO. + * @param connectionArgs + * A list of arguments passed to the constructor of the + * connection class. Should provide information that enables + * distinguishing between different IOIO instances using the same + * connection class. + * + * @return An implementation of {@link IOIOThread}, or null to + * skip. + */ + protected IOIOThread createIOIOThread(String connectionClass, + Object[] connectionArgs) { + return createIOIOThread(); + } + + /** + * An abstract class, which facilitates a thread dedicated for communication + * with a single physical IOIO device. + */ + protected abstract class IOIOThread extends Thread { + /** Subclasses should use this field for controlling the IOIO. */ + protected IOIO ioio_; + private boolean abort_ = false; + private boolean connected_ = true; + private final IOIOConnectionSpec spec_ = currentSpec_; + + /** + * Subclasses should override this method for performing operations to + * be done once as soon as IOIO communication is established. Typically, + * this will include opening pins and modules using the openXXX() + * methods of the {@link #ioio_} field. + */ + protected void setup() throws ConnectionLostException, + InterruptedException { + } + + /** + * Subclasses should override this method for performing operations to + * be done repetitively as long as IOIO communication persists. + * Typically, this will be the main logic of the application, processing + * inputs and producing outputs. + */ + protected void loop() throws ConnectionLostException, + InterruptedException { + sleep(100000); + } + + /** + * Subclasses should override this method for performing operations to + * be done once as soon as IOIO communication is lost or closed. + * Typically, this will include GUI changes corresponding to the change. + * This method will only be called if setup() has been called. The + * {@link #ioio_} member must not be used from within this method. + */ + protected void disconnected() throws InterruptedException { + } + + /** + * Subclasses should override this method for performing operations to + * be done if an incompatible IOIO firmware is detected. The + * {@link #ioio_} member must not be used from within this method. This + * method will only be called once, until a compatible IOIO is connected + * (i.e. {@link #setup()} gets called). + */ + protected void incompatible() { + } + + /** Not relevant to subclasses. */ + @Override + public final void run() { + super.run(); + Looper.prepare(); + while (true) { + try { + synchronized (this) { + if (abort_) { + break; + } + ioio_ = IOIOFactory.create(spec_.className, spec_.args); + } + ioio_.waitForConnect(); + connected_ = true; + setup(); + while (!abort_) { + loop(); + } + ioio_.disconnect(); + } catch (ConnectionLostException e) { + if (abort_) { + break; + } + } catch (InterruptedException e) { + ioio_.disconnect(); + break; + } catch (IncompatibilityException e) { + Log.e(TAG, "Incompatible IOIO firmware", e); + incompatible(); + // nothing to do - just wait until physical disconnection + try { + ioio_.waitForDisconnect(); + } catch (InterruptedException e1) { + ioio_.disconnect(); + } + } catch (Exception e) { + Log.e(TAG, "Unexpected exception caught", e); + ioio_.disconnect(); + break; + } finally { + try { + if (ioio_ != null) { + ioio_.waitForDisconnect(); + if (connected_) { + disconnected(); + } + } + } catch (InterruptedException e) { + } + } + } + } + + /** Not relevant to subclasses. */ + public synchronized final void abort() { + abort_ = true; + if (ioio_ != null) { + ioio_.disconnect(); + } + if (connected_) { + interrupt(); + } + } + } + + private void abortAllThreads() { + for (IOIOThread thread : threads_) { + thread.abort(); + } + } + + private void joinAllThreads() throws InterruptedException { + for (IOIOThread thread : threads_) { + thread.join(); + } + } + + private void createAllThreads() { + threads_.clear(); + Collection specs = getConnectionSpecs(); + for (IOIOConnectionSpec spec : specs) { + currentSpec_ = spec; + IOIOThread thread = createIOIOThread(spec.className, spec.args); + if (thread != null) { + threads_.add(thread); + } + } + } + + private void startAllThreads() { + for (IOIOThread thread : threads_) { + thread.start(); + } + } + + private Collection getConnectionSpecs() { + Collection result = new LinkedList(); + addConnectionSpecs("ioio.lib.util.SocketIOIOConnectionDiscovery", + result); + addConnectionSpecs( + "ioio.lib.bluetooth.BluetoothIOIOConnectionDiscovery", result); + return result; + } + + private void addConnectionSpecs(String discoveryClassName, + Collection result) { + try { + Class cls = Class.forName(discoveryClassName); + IOIOConnectionDiscovery discovery = (IOIOConnectionDiscovery) cls + .newInstance(); + discovery.getSpecs(result); + } catch (ClassNotFoundException e) { + Log.d(TAG, "Discovery class not found: " + discoveryClassName + + ". Not adding."); + } catch (Exception e) { + Log.w(TAG, + "Exception caught while discovering connections - not adding connections of class " + + discoveryClassName, e); + } + } +} diff --git a/IOIOLib/src/ioio/lib/util/IOIOConnectionDiscovery.java b/IOIOLib/src/ioio/lib/util/IOIOConnectionDiscovery.java new file mode 100644 index 0000000..3802fb4 --- /dev/null +++ b/IOIOLib/src/ioio/lib/util/IOIOConnectionDiscovery.java @@ -0,0 +1,17 @@ +package ioio.lib.util; + +import java.util.Collection; + +public interface IOIOConnectionDiscovery { + public static class IOIOConnectionSpec { + public final String className; + public final Object[] args; + + public IOIOConnectionSpec(String c, Object[] a) { + className = c; + args = a; + } + } + + public void getSpecs(Collection result); +} diff --git a/IOIOLib/src/ioio/lib/util/SocketIOIOConnectionDiscovery.java b/IOIOLib/src/ioio/lib/util/SocketIOIOConnectionDiscovery.java new file mode 100644 index 0000000..88f76ee --- /dev/null +++ b/IOIOLib/src/ioio/lib/util/SocketIOIOConnectionDiscovery.java @@ -0,0 +1,15 @@ +package ioio.lib.util; + +import ioio.lib.api.IOIOFactory; +import ioio.lib.impl.SocketIOIOConnection; + +import java.util.Collection; + +public class SocketIOIOConnectionDiscovery implements IOIOConnectionDiscovery { + + @Override + public void getSpecs(Collection result) { + result.add(new IOIOConnectionSpec(SocketIOIOConnection.class.getName(), + new Object[] { new Integer(IOIOFactory.IOIO_PORT) })); + } +}