protected void killWriteThread() {
   if (writeThread != null) {
     writeThread.stopWriteThread();
     writeThread = null;
     serialBuffer.resetWriteBuffer();
   }
 }
 @Override
 public int read(UsbReadCallback mCallback) {
   if (mr1Version) {
     workerThread.setCallback(mCallback);
     workerThread
         .getUsbRequest()
         .queue(serialBuffer.getReadBuffer(), SerialBuffer.DEFAULT_READ_BUFFER_SIZE);
   } else {
     readThread.setCallback(mCallback);
     readThread.start();
   }
   return 0;
 }
 @Override
 public void write(byte[] buffer) {
   serialBuffer.putWriteBuffer(buffer);
 }
 // Debug options
 public void debug(boolean value) {
   if (serialBuffer != null) serialBuffer.debug(value);
 }