[−][src]Struct nrf52832_hal::Temp
Integrated temperature sensor.
Methods
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
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self