pub fn conversion_micros(rate: DataRate) -> u32Expand description
The longest one conversion takes at a data rate, in microseconds.
A conversion takes one period of the data rate, and the datasheet allows the rate to vary by ten percent, so the period is stretched by that much. A driver waits this long after starting a single-shot conversion before it polls the operational-status bit.
§Arguments
rate- the data rate the conversion runs at.
§Returns
The period in microseconds, with the ten percent margin.
§Examples
use pamoja_sensors::ads1115::{conversion_micros, DataRate};
assert_eq!(conversion_micros(DataRate::Sps128), 8_595);
assert_eq!(conversion_micros(DataRate::Sps860), 1_280);