Struct l3gd20::L3gd20
[−]
[src]
pub struct L3gd20<SPI, CS> { /* fields omitted */ }
L3GD20 driver
Methods
impl<SPI, CS, E> L3gd20<SPI, CS> where
SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
CS: OutputPin,
[src]
SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
CS: OutputPin,
fn new(spi: SPI, cs: CS) -> Result<Self, E>
[src]
Creates a new driver from a SPI peripheral and a NCS pin
fn all(&mut self) -> Result<Measurements, E>
[src]
Temperature measurement + gyroscope measurements
fn gyro(&mut self) -> Result<I16x3, E>
[src]
Gyroscope measurements
fn temp(&mut self) -> Result<i8, E>
[src]
Temperature sensor measurement
fn who_am_i(&mut self) -> Result<u8, E>
[src]
Reads the WHO_AM_I register; should return 0xD4