Created
July 7, 2016 08:04
-
-
Save kiryuxxu/71eb3864f66340fda2b0324aa27f2b35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mKonashiManager.i2cStartCondition() | |
.then(mKonashiManager.<BluetoothGattCharacteristic>i2cReadPipe(1, (byte) 0x01)) | |
.then(new DonePipe<byte[], byte[], BletiaException, Void>() { | |
@Override | |
public Promise<byte[], BletiaException, Void> pipeDone(byte[] result) { | |
// 0x01 の値を処理 | |
return mKonashiManager.i2cRead(1, (byte)0x02); | |
} | |
}) | |
.then(new DonePipe<byte[], byte[], BletiaException, Void>() { | |
@Override | |
public Promise<byte[], BletiaException, Void> pipeDone(byte[] result) { | |
// 0x02 の値を処理 | |
return mKonashiManager.i2cRead(1, (byte) 0x03); | |
} | |
}) | |
.then(new DoneCallback<byte[]>() { | |
@Override | |
public void onDone(final byte[] result) { | |
// 0x03 の値を処理 | |
} | |
}) | |
.then(mKonashiManager.<byte[]>i2cStopConditionPipe()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment