docs: protected void writeRegister(int register, int value) throws IOException {
  
          // create packet in data buffer
          byte packet[] = new byte[3];
          packet[0] = (byte)(register);     // register byte
          packet[1] = (byte)(value>>8);     // value MSB
          packet[2] = (byte)(value & 0xFF); // value LSB
  
          // write data to I2C device
          device.write(packet, 0, 3);
      }