fixing Android
This commit is contained in:
parent
d31cb79119
commit
faedd3e665
|
@ -19,6 +19,7 @@ import java.util.List;
|
|||
|
||||
public class AndroidSerial implements IoStream {
|
||||
private static final int ST_CDC = 0x5740;
|
||||
private final IncomingDataBuffer dataBuffer;
|
||||
|
||||
private boolean isClosed;
|
||||
private UsbSerialPort usbSerialPort;
|
||||
|
@ -31,18 +32,14 @@ public class AndroidSerial implements IoStream {
|
|||
return prober.findAllDrivers(usbManager);
|
||||
}
|
||||
|
||||
public AndroidSerial(UsbSerialPort usbSerialPort) {
|
||||
public AndroidSerial(UsbSerialPort usbSerialPort, Logger logger) {
|
||||
this.usbSerialPort = usbSerialPort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDataBuffer(IncomingDataBuffer dataBuffer) {
|
||||
|
||||
dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncomingDataBuffer getDataBuffer() {
|
||||
return null;
|
||||
return dataBuffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -233,7 +233,7 @@ public class rusEFI extends Activity {
|
|||
port.open(connection);
|
||||
port.setParameters(115200, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE);
|
||||
|
||||
AndroidSerial serial = new AndroidSerial(port);
|
||||
AndroidSerial serial = new AndroidSerial(port, Logger.CONSOLE);
|
||||
mResultView.append("Switching to DFU\n");
|
||||
DfuHelper.sendDfuRebootCommand(serial, new StringBuilder(), Logger.CONSOLE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue