Module capsules_extra::lps25hb
source · Expand description
SyscallDriver for the ST LPS25HB pressure sensor.
http://www.st.com/en/mems-and-sensors/lps25hb.html
§Usage
ⓘ
let buffer = static_init!([u8; capsules::lps25hb::BUF_LEN], [0; capsules::lps25hb::BUF_LEN]);
let lps25hb_i2c = static_init!(I2CDevice, I2CDevice::new(i2c_bus, 0x5C));
let lps25hb = static_init!(
capsules::lps25hb::LPS25HB<'static>,
capsules::lps25hb::LPS25HB::new(lps25hb_i2c,
&sam4l::gpio::PA[10],
buffer));
lps25hb_i2c.set_client(lps25hb);
sam4l::gpio::PA[10].set_client(lps25hb);