Poll changes
This commit is contained in:
@ -11,6 +11,7 @@ use uom::si::f32;
|
||||
|
||||
#[derive(PollVariants)]
|
||||
#[value_type = "f32::ElectricPotential"]
|
||||
#[error_type = "CriticalError"]
|
||||
pub struct AutocalPoll<'a, DeviceMutexT, ModInT, DelayerT, SST, DrdyT, SpiT>
|
||||
where
|
||||
DeviceMutexT: RawMutex,
|
||||
@ -60,11 +61,12 @@ where
|
||||
SpiT: SpiBus,
|
||||
{
|
||||
type Value = f32::ElectricPotential;
|
||||
type Error = CriticalError;
|
||||
|
||||
async fn poll(&self) -> Result<Self::Value, CriticalError> {
|
||||
let mut ads1256_guard = self.ads1256.lock().await;
|
||||
let ads1256 = ads1256_guard.deref_mut();
|
||||
//TODO: ADS1256 documentation seems to say we should be waiting for drdy low after putting
|
||||
//TODO: ADS1256 documentation seems to say we should be waiting for drdy low after
|
||||
// issuing standby command but it never goes low.
|
||||
|
||||
let result = ads1256
|
||||
|
Reference in New Issue
Block a user