Lines Matching full:value
65 int MPU6050::read_reg(rt_uint8_t reg, rt_uint8_t *value) in read_reg() argument
76 msgs[1].buf = (rt_uint8_t *)value; in read_reg()
85 int MPU6050::read_buffer(rt_uint8_t reg, rt_uint8_t* value, rt_size_t size) in read_buffer() argument
96 msgs[1].buf = (rt_uint8_t *)value; in read_buffer()
105 int MPU6050::write_reg(rt_uint8_t reg, rt_uint8_t value) in write_reg() argument
116 msgs[1].buf = (rt_uint8_t *)&value; in write_reg()
131 rt_uint8_t value[6] = {0}; in MPU6050_Accelerometer() local
157 read_buffer(MPU6050_ACCEL_XOUT_H, value, 6); in MPU6050_Accelerometer()
159 x += (((rt_int16_t)value[0] << 8) | value[1]); in MPU6050_Accelerometer()
160 y += (((rt_int16_t)value[2] << 8) | value[3]); in MPU6050_Accelerometer()
161 z += (((rt_int16_t)value[4] << 8) | value[5]); in MPU6050_Accelerometer()
176 uint8_t value; in configure() local
207 read_reg(MPU6050_ACCEL_CONFIG, &value); in configure()
208 value &= ~(0x3 << 2); in configure()
209 value |= range; in configure()
210 write_reg(MPU6050_ACCEL_CONFIG, value); in configure()
218 uint8_t value; in activate() local
223 read_reg(MPU6050_PWR_MGMT_2, &value); in activate()
224 value &= ~(0x07 << 2); in activate()
225 write_reg(MPU6050_PWR_MGMT_2, value); in activate()
231 read_reg(MPU6050_PWR_MGMT_2, &value); in activate()
232 value |= (0x07 << 2); in activate()
233 write_reg(MPU6050_PWR_MGMT_2, value); in activate()
245 rt_uint8_t value[6]; in poll() local
257 read_buffer(MPU6050_ACCEL_XOUT_H, value, 6); in poll()
260 x = (((rt_int16_t)value[0] << 8) | value[1]); in poll()
261 y = (((rt_int16_t)value[2] << 8) | value[3]); in poll()
262 z = (((rt_int16_t)value[4] << 8) | value[5]); in poll()
297 rt_uint8_t value[6]; in MPU6050_Gyroscope() local
321 read_buffer(MPU6050_GYRO_XOUT_H, value, 6); in MPU6050_Gyroscope()
323 x += (((rt_int16_t)value[0] << 8) | value[1]); in MPU6050_Gyroscope()
324 y += (((rt_int16_t)value[2] << 8) | value[3]); in MPU6050_Gyroscope()
325 z += (((rt_int16_t)value[4] << 8) | value[5]); in MPU6050_Gyroscope()
339 uint8_t value; in configure() local
370 read_reg(MPU6050_GYRO_CONFIG, &value); in configure()
371 value &= ~(0x3 << 2); in configure()
372 value |= range; in configure()
373 write_reg(MPU6050_GYRO_CONFIG, value); in configure()
381 uint8_t value; in activate() local
386 read_reg(MPU6050_PWR_MGMT_1, &value); in activate()
387 value &= ~(0x01 << 4); in activate()
388 write_reg(MPU6050_PWR_MGMT_1, value); in activate()
390 read_reg(MPU6050_PWR_MGMT_2, &value); in activate()
391 value &= ~(0x07 << 0); in activate()
392 write_reg(MPU6050_PWR_MGMT_2, value); in activate()
398 read_reg(MPU6050_PWR_MGMT_2, &value); in activate()
399 value |= (0x07 << 0); in activate()
400 write_reg(MPU6050_PWR_MGMT_2, value); in activate()
412 rt_uint8_t value[6]; in poll() local
424 read_buffer(MPU6050_GYRO_XOUT_H, value, 6); in poll()
427 x = (((rt_int16_t)value[0] << 8) | value[1]); in poll()
428 y = (((rt_int16_t)value[2] << 8) | value[3]); in poll()
429 z = (((rt_int16_t)value[4] << 8) | value[5]); in poll()