[][src]Function dht_hal_drv::dht_split_read_customizable

pub fn dht_split_read_customizable<Error>(
    dht: DhtType,
    input_pin: &mut dyn InputPin<Error = Error>,
    delay_us: &mut dyn FnMut(u16),
    reads_threshold: u32,
    reads_error_rate: u32
) -> Result<DhtValue, DhtError>

Advanced customizable read function, you probably would not need to use it directly. Call it immediately after initialization to acquire proper sensor readings.

Arguments

  • dht - DHT sensor type
  • input_pin - Input pin trait for DHT data pin
  • `delay_us' - Closure with delay/sleep/whatever API with microseconds as input, NOTE that for low frequency CPUs (about 2Mhz or less) you should pass empty closure.
  • reads_threshold - Initial threshold (cycles count) before reading cycle starts.
  • reads_error_rate - If actual cycles count in one pin state would exceed last threshold at provided rate it would cause an error.