pub struct Hts221<I>{ /* private fields */ }Expand description
An instance of the HTS221 driver using I2C transport from embedded-hal-async.
Implementations§
Source§impl<I> Hts221<I>
impl<I> Hts221<I>
Sourcepub async fn initialize(&mut self) -> Result<(), Hts221Error<I::Error>>
pub async fn initialize(&mut self) -> Result<(), Hts221Error<I::Error>>
Initialize the driver. Must be run before reading sensor values.
Sourcepub async fn read(
&mut self,
) -> Result<SensorAcquisition<Celsius>, Hts221Error<I::Error>>
pub async fn read( &mut self, ) -> Result<SensorAcquisition<Celsius>, Hts221Error<I::Error>>
Read sensor values from driver.
Auto Trait Implementations§
impl<I> Freeze for Hts221<I>where
I: Freeze,
impl<I> RefUnwindSafe for Hts221<I>where
I: RefUnwindSafe,
impl<I> Send for Hts221<I>where
I: Send,
impl<I> Sync for Hts221<I>where
I: Sync,
impl<I> Unpin for Hts221<I>where
I: Unpin,
impl<I> UnwindSafe for Hts221<I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more