Lines Matching full:value

63 int BMI055::read_reg(rt_uint8_t reg, rt_uint8_t *value)  in read_reg()  argument
74 msgs[1].buf = (rt_uint8_t *)value; in read_reg()
83 int BMI055::read_buffer(rt_uint8_t reg, rt_uint8_t* value, rt_size_t size) in read_buffer() argument
94 msgs[1].buf = (rt_uint8_t *)value; in read_buffer()
103 int BMI055::write_reg(rt_uint8_t reg, rt_uint8_t value) in write_reg() argument
114 msgs[1].buf = (rt_uint8_t *)&value; in write_reg()
129 rt_uint8_t value[6] = {0}; in BMI055_Accelerometer() local
152 read_buffer(BMI055_ACCD_X_LSB, value, 6); /*ACCD_X_LSB P47 */ in BMI055_Accelerometer()
154 x += (((rt_int16_t)value[1] << 8) | value[0]); in BMI055_Accelerometer()
155 y += (((rt_int16_t)value[3] << 8) | value[2]); in BMI055_Accelerometer()
156 z += (((rt_int16_t)value[5] << 8) | value[4]); in BMI055_Accelerometer()
171 uint8_t value; in configure() local
202 read_reg(BMI055_PMU_RANGE, &value); /* PMU_RANGE P54 */ in configure()
203 value &= 0xF0; in configure()
204 value |= range; in configure()
205 write_reg(BMI055_PMU_RANGE, value); in configure()
213 uint8_t value; in activate() local
218 read_reg(BMI055_PMU_LPW, &value); /* P55 */ in activate()
219 value &= ~(0x07 << 7); in activate()
220 write_reg(BMI055_PMU_LPW, value); in activate()
226 read_reg(BMI055_PMU_LPW, &value); in activate()
227 value &= ~(0x07 << 7); in activate()
228 value |= (0x01 << 7); in activate()
229 write_reg(BMI055_PMU_LPW, value); in activate()
241 rt_uint8_t value[6]; in poll() local
253 read_buffer(0x02, value, 6); in poll()
256 x = (((rt_int16_t)value[1] << 8) | value[0]); in poll()
257 y = (((rt_int16_t)value[3] << 8) | value[2]); in poll()
258 z = (((rt_int16_t)value[5] << 8) | value[4]); in poll()
293 rt_uint8_t value[6]; in BMI055_Gyroscope() local
316 read_buffer(BMI055_RATE_X_LSB_ADDR, value, 6); in BMI055_Gyroscope()
318 x += (((rt_int16_t)value[1] << 8) | value[0]); in BMI055_Gyroscope()
319 y += (((rt_int16_t)value[3] << 8) | value[2]); in BMI055_Gyroscope()
320 z += (((rt_int16_t)value[5] << 8) | value[4]); in BMI055_Gyroscope()
334 uint8_t value; in configure() local
367 read_reg(BMI055_RANGE_ADDR, &value); in configure()
368 value &= ~0x07; in configure()
369 value |= range; in configure()
370 write_reg(BMI055_RANGE_ADDR, value); in configure()
378 uint8_t value; in activate() local
383 read_reg(BMI055_MODE_LPM1_ADDR, &value); in activate()
384 value &= ~(0x1010 << 4); //{0; 0} NORMAL mode in activate()
385 write_reg(BMI055_MODE_LPM1_ADDR, value); //P101 NORMAL mode in activate()
391 read_reg(BMI055_MODE_LPM1_ADDR, &value); in activate()
392 value &= ~(0x01 << 5); //set bit5 deep_suspend 0 in activate()
393 value |= (0x01 << 7); //set bit1 suspend 1 in activate()
394 write_reg(BMI055_MODE_LPM1_ADDR, value); //{1; 0} SUSPEND mode in activate()
406 rt_uint8_t value[6]; in poll() local
418 read_buffer(BMI055_RATE_X_LSB_ADDR, value, 6); in poll()
421 x = (((rt_int16_t)value[1] << 8) | value[0]); in poll()
422 y = (((rt_int16_t)value[3] << 8) | value[2]); in poll()
423 z = (((rt_int16_t)value[5] << 8) | value[4]); in poll()