[][src]Struct tle5012::Tle5012

pub struct Tle5012<SPI, CS> { /* fields omitted */ }

TLE5012 driver

Methods

impl<SPI, CS, E> Tle5012<SPI, CS> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    CS: OutputPin
[src]

pub fn new(spi: SPI, cs: CS) -> Result<Self, E>[src]

Create a new driver from a SPI peripheral and a NCS pin

pub fn read_status(&mut self) -> Result<u16, Error<E>>[src]

Status of module

pub fn read_upd_status(&mut self) -> Result<u16, Error<E>>[src]

Updated status of module

pub fn read_activation_status(&mut self) -> Result<u16, Error<E>>[src]

Activation status of module

pub fn read_angle_value(&mut self) -> Result<i16, Error<E>>[src]

Read angle value. Sensor return 15 bit signed integer

pub fn read_update_angle_value(&mut self) -> Result<i16, Error<E>>[src]

Read update angle value. Sensor return 15 bit signed integer

pub fn read_angle_speed(&mut self) -> Result<i16, Error<E>>[src]

Read angle speed. Sensor return 15 bit signed integer

pub fn read_update_angle_speed(&mut self) -> Result<i16, Error<E>>[src]

Read update angle speed. Sensor return 15 bit signed integer

pub fn read_angle_revolution(&mut self) -> Result<i16, Error<E>>[src]

Read angle revolution. Sensor return 9 bit signed integer

pub fn read_update_angle_revolution(&mut self) -> Result<i16, Error<E>>[src]

Read update angle revolution. Sensor return 9 bit signed integer

pub fn read_temp(&mut self) -> Result<i16, Error<E>>[src]

Read temp value. Sensor return 9 bit signed integer

pub fn read_raw_x(&mut self) -> Result<i16, Error<E>>[src]

Read raw X value.

pub fn read_raw_y(&mut self) -> Result<i16, Error<E>>[src]

Read raw Y value.

pub fn read_int_mode_1(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_sil(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_int_mode_2(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_int_mode_3(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_offset_x(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_offset_y(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_synch(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_ifab(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_int_mode_4(&mut self) -> Result<u16, Error<E>>[src]

pub fn read_temp_coeff(&mut self) -> Result<u16, Error<E>>[src]

pub fn write_activation_status(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_int_mode_1(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_sil(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_int_mode_2(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_int_mode_3(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_offset_x(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_offset_y(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_synch(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_ifab(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_int_mode_4(&mut self, data: u16) -> Result<bool, Error<E>>[src]

pub fn write_temp_coeff(&mut self, data: u16) -> Result<bool, Error<E>>[src]

Auto Trait Implementations

impl<SPI, CS> Send for Tle5012<SPI, CS> where
    CS: Send,
    SPI: Send

impl<SPI, CS> Sync for Tle5012<SPI, CS> where
    CS: Sync,
    SPI: Sync

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]