components

Module lsm6dsox

Source
Expand description

Component for the LSM6DSOXTR Sensor

§Usage

let lsm6dsoxtr = components::lsm6dsox::Lsm6dsoxtrI2CComponent::new(
    mux_i2c,
    capsules_extra::lsm6dsoxtr::ACCELEROMETER_BASE_ADDRESS,
    board_kernel,
    capsules_extra::lsm6dsoxtr::DRIVER_NUM,
)
.finalize(components::lsm6ds_i2c_component_static!());

let _ = lsm6dsoxtr
         .configure(
             capsules_extra::lsm6ds_definitions::LSM6DSOXGyroDataRate::LSM6DSOX_GYRO_RATE_12_5_HZ,
             capsules_extra::lsm6ds_definitions::LSM6DSOXAccelDataRate::LSM6DSOX_ACCEL_RATE_12_5_HZ,
             capsules_extra::lsm6ds_definitions::LSM6DSOXAccelRange::LSM6DSOX_ACCEL_RANGE_2_G,
             capsules_extra::lsm6ds_definitions::LSM6DSOXTRGyroRange::LSM6DSOX_GYRO_RANGE_250_DPS,
             true,
         )
         .map_err(|e| panic!("ERROR Failed LSM6DSOXTR sensor configuration ({:?})", e));

Author: Cristiana Andrei cristiana.andrei@stud.fils.upb.ro

Structs§