pub struct Tc72<SPI, CS> { /* private fields */ }
Implementations§
Source§impl<SPI, CS, SpiError, PinError> Tc72<SPI, CS>
impl<SPI, CS, SpiError, PinError> Tc72<SPI, CS>
Sourcepub fn new(spi: SPI, cs: CS) -> Result<Self, Tc72Error<SpiError, PinError>>
pub fn new(spi: SPI, cs: CS) -> Result<Self, Tc72Error<SpiError, PinError>>
Takes a config object to initialize the tc72 driver
pub fn manufacturer_id(&mut self) -> Result<u8, Tc72Error<SpiError, PinError>>
pub fn control( &mut self, shutdown: bool, one_shot: bool, ) -> Result<(), Tc72Error<SpiError, PinError>>
pub fn temp_raw(&mut self) -> Result<u16, Tc72Error<SpiError, PinError>>
pub fn temp(&mut self) -> Result<f32, Tc72Error<SpiError, PinError>>
pub fn one_shot_with_150ms_delay( &mut self, delay: &mut dyn DelayMs<u8>, ) -> Result<f32, Tc72Error<SpiError, PinError>>
Auto Trait Implementations§
impl<SPI, CS> Freeze for Tc72<SPI, CS>
impl<SPI, CS> RefUnwindSafe for Tc72<SPI, CS>where
SPI: RefUnwindSafe,
CS: RefUnwindSafe,
impl<SPI, CS> Send for Tc72<SPI, CS>
impl<SPI, CS> Sync for Tc72<SPI, CS>
impl<SPI, CS> Unpin for Tc72<SPI, CS>
impl<SPI, CS> UnwindSafe for Tc72<SPI, CS>where
SPI: UnwindSafe,
CS: 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