pub struct DHTSensor<P, T, I>{ /* private fields */ }
Expand description
Interface for the DHT sensor.
Implementations§
Source§impl<P, T, I> DHTSensor<P, T, I>
impl<P, T, I> DHTSensor<P, T, I>
Sourcepub fn new(sensor: SensorType, p: P, t: T, i: I) -> DHTSensor<P, T, I>
pub fn new(sensor: SensorType, p: P, t: T, i: I) -> DHTSensor<P, T, I>
Constructs a new DHTSensor
.
The following arguments need to be provided:
sensor
the DHT sensor type.p
- a pin which can act asInputPin
,OutputPin
andIoPin
t
- a timer which implementsDelayMs
andDelayUs
.i
- an interrupt controller, which is used to disable the interrupt while reading the input line.
Auto Trait Implementations§
impl<P, T, I> Freeze for DHTSensor<P, T, I>
impl<P, T, I> RefUnwindSafe for DHTSensor<P, T, I>
impl<P, T, I> Send for DHTSensor<P, T, I>
impl<P, T, I> Sync for DHTSensor<P, T, I>
impl<P, T, I> Unpin for DHTSensor<P, T, I>
impl<P, T, I> UnwindSafe for DHTSensor<P, T, I>
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