public void writeBytes(int regAddr, int length, byte[] data, int offset) throws RuntimeIOException { /* * if (I2CDEV_SERIAL_DEBUG) { System.out.format( * "I2C (0x%x) writing %d bytes to 0x%x...%n", devAddr, length, regAddr); } */ byte[] dest = new byte[length]; System.arraycopy(data, offset, dest, 0, length); write(regAddr, SUB_ADDRESS_SIZE_1_BYTE, dest); }
private void writeBytes(int register, int length, byte[] data) throws RuntimeIOException { device.writeBytes(register, length, data); SleepUtil.sleepMillis(1); }
i2cDevice.writeBytes(MPU9150_RA_BANK_SEL, 2, tmp); i2cDevice.writeBytes(MPU9150_RA_MEM_R_W, length, data);
i2cDevice.writeBytes(MPU9150_RA_BANK_SEL, 2, tmp);
tmp[0] = 0; tmp[1] = BIT_STBY_XYZG; i2cDevice.writeBytes(MPU9150_RA_PWR_MGMT_1, 2, tmp); lp_accel_mode = false; return true; i2cDevice.writeBytes(MPU9150_RA_PWR_MGMT_1, 2, tmp); sensors = INV_XYZ_ACCEL; clk_src = ClockSource.INV_CLK_INTERNAL;