capsules_extra

Module bmm150

Source
Expand description

SyscallDriver for the Bosch BMM150 geomagnetic sensor.

https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmm150-ds001.pdf

The BMM150 is a standalone geomagnetic sensor for consumer market applications. It allows measurements of the magnetic field in three perpendicular axes. Based on Bosch’s proprietary FlipCore technology, performance and features of BMM150 are carefully tuned and perfectly match the demanding requirements of all 3-axis mobile applications such as electronic compass, navigation or augmented reality.

§//! Driver Semantics

This driver exposes the BMM150’s functionality via the NineDof and NineDofClient HIL interfaces. If gyroscope or accelerometer data is requested, the driver will return a ErrorCode.

§//! Usage


let bmm150_i2c = static_init!(
    capsules::virtual_i2c::I2CDevice,
    capsules::virtual_i2c::I2CDevice::new(i2c_bus, 0x10));
let bmm150 = static_init!(
    capsules::bmm150::BMM150<'static>,
    capsules::bmm150::BMM150::new(bmm150_i2c,
        &mut capsules::BMM150::BUFFER));
bmm150_i2c.set_client(bmm150);

Structs§