[][src]Struct adxl345_driver::Tap

pub struct Tap { /* fields omitted */ }

Hold a collection of single/double tap non-control related values.

Structure is used by the tap() and set_tap() methods.

Implementations

impl Tap[src]

pub fn new(threshold: u8, duration: u8, latency: u8, window: u8) -> Self[src]

Tap constructor.

Arguments

  • threshold - Threshold value required to trigger a tap interrupt. The scale factor is 62.5 mg/LSB. Note: that a value of 0 may result in undesirable behavior if the single tap/double tap interrupt(s) are enabled.
  • duration - Time value representing the maximum time that an event must be above the threshold to qualify as a tap event. The scale factor is 625 μs/LSB. A value of 0 disables the single tap/double tap functions.
  • latency - Time value representing the wait time from the detection of a tap event to the start of the time window during which a possible second tap event can be detected. The scale factor is 1.25 ms/LSB. A value of 0 disables the double tap function.
  • window - Time value representing the amount of time after the expiration of the latency time during which a second valid tap can begin. The scale factor is 1.25 ms/LSB. A value of 0 disables the double tap function.

Trait Implementations

impl Clone for Tap[src]

impl Copy for Tap[src]

impl Debug for Tap[src]

impl From<[u8; 4]> for Tap[src]

impl From<(u8, u8, u8, u8)> for Tap[src]

Auto Trait Implementations

impl RefUnwindSafe for Tap

impl Send for Tap

impl Sync for Tap

impl Unpin for Tap

impl UnwindSafe for Tap

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> 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.