[][src]Struct nrf52832_hal::Temp

pub struct Temp(_);

Integrated temperature sensor.


impl Temp[src]

pub fn new(raw: TEMP) -> Temp[src]

Creates a new Temp, taking ownership of the temperature sensor's register block.

pub fn measure(&mut self) -> Q<i32, UInt<UInt<UTerm, B1>, B0>>[src]

Starts a new measurement and blocks until completion.

If a measurement was already started, it will be canceled.

pub fn start_measurement(&mut self)[src]

Kicks off a temperature measurement.

The measurement can be retrieved by calling read.

pub fn stop_measurement(&mut self)[src]

Cancels an in-progress temperature measurement.

pub fn read(&mut self) -> Result<Q<i32, UInt<UInt<UTerm, B1>, B0>>, Error<Void>>[src]

Tries to read a started measurement (non-blocking).

Before calling this, start_measurement must be called.

Returns the measured temperature in °C.

Auto Trait Implementations

impl Send for Temp

impl !Sync for Temp

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 

impl<T> Borrow for T where
    T: ?Sized

impl<T> BorrowMut for T where
    T: ?Sized

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

impl<T> Same for T

type Output = T

Should always be Self