Lines Matching full:this

50     this->i2c_bus = (struct rt_i2c_bus_device *)rt_device_find(iic_bus);  in BMI055()
51 if (this->i2c_bus == NULL) in BMI055()
57 this->i2c_addr = addr; in BMI055()
60 SensorManager::registerSensor(this); in BMI055()
67 msgs[0].addr = this->i2c_addr; in read_reg()
72 msgs[1].addr = this->i2c_addr; in read_reg()
77 if (rt_i2c_transfer(this->i2c_bus, msgs, 2) == 2) in read_reg()
87 msgs[0].addr = this->i2c_addr; in read_buffer()
92 msgs[1].addr = this->i2c_addr; in read_buffer()
97 if (rt_i2c_transfer(this->i2c_bus, msgs, 2) == 2) in read_buffer()
107 msgs[0].addr = this->i2c_addr; in write_reg()
112 msgs[1].addr = this->i2c_addr; in write_reg()
117 if (rt_i2c_transfer(this->i2c_bus, msgs, 2) == 2) in write_reg()
162 this->enable = RT_FALSE; in BMI055_Accelerometer()
163 this->sensitivity = SENSOR_ACCEL_SENSITIVITY_2G; in BMI055_Accelerometer()
164 this->config = config; in BMI055_Accelerometer()
182 this->sensitivity = SENSOR_ACCEL_SENSITIVITY_2G; in configure()
186 this->sensitivity = SENSOR_ACCEL_SENSITIVITY_4G; in configure()
190 this->sensitivity = SENSOR_ACCEL_SENSITIVITY_8G; in configure()
194 this->sensitivity = SENSOR_ACCEL_SENSITIVITY_16G; in configure()
215 if (enable && this->enable == RT_FALSE) in activate()
223 if (!enable && this->enable == RT_TRUE) in activate()
232 if (enable) this->enable = RT_TRUE; in activate()
233 else this->enable = RT_FALSE; in activate()
249 event->sensor = (int32_t) this; in poll()
270 event->acceleration.x = x * this->sensitivity * SENSORS_GRAVITY_STANDARD; in poll()
271 event->acceleration.y = y * this->sensitivity * SENSORS_GRAVITY_STANDARD; in poll()
272 event->acceleration.z = z * this->sensitivity * SENSORS_GRAVITY_STANDARD; in poll()
326 this->enable = RT_FALSE; in BMI055_Gyroscope()
327 this->sensitivity = SENSOR_GYRO_SENSITIVITY_250DPS; in BMI055_Gyroscope()
347 this->sensitivity = SENSOR_GYRO_SENSITIVITY_250DPS; in configure()
351 this->sensitivity = SENSOR_GYRO_SENSITIVITY_500DPS; in configure()
355 this->sensitivity = SENSOR_GYRO_SENSITIVITY_1000DPS; in configure()
359 this->sensitivity = SENSOR_GYRO_SENSITIVITY_2000DPS; in configure()
380 if (enable && this->enable == RT_FALSE) in activate()
388 if (!enable && this->enable == RT_TRUE) in activate()
397 if (enable) this->enable = RT_TRUE; in activate()
398 else this->enable = RT_FALSE; in activate()
414 event->sensor = (int32_t) this; in poll()
435 event->gyro.x = x * this->sensitivity * SENSORS_DPS_TO_RADS; in poll()
436 event->gyro.y = y * this->sensitivity * SENSORS_DPS_TO_RADS; in poll()
437 event->gyro.z = z * this->sensitivity * SENSORS_DPS_TO_RADS; in poll()