Cleanup
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "physical-ads1256"
|
||||
description = "Shared abstractions for ADS1256 components."
|
||||
description = "Shared node abstractions for ADS1256 components."
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
repository.workspace = true
|
||||
@ -10,17 +10,12 @@ license.workspace = true
|
||||
[features]
|
||||
embassy-sync = ["dep:embassy-sync", "ads1256/embassy-sync", "physical-node/embassy-sync"]
|
||||
poll = ["standard-multiplexer", "embassy-sync"]
|
||||
config = ["physical-ads1256-types/config"]
|
||||
standard-input = ["physical-ads1256-types/standard-input"]
|
||||
standard-multiplexer = ["standard-input"]
|
||||
standard-multiplexer = []
|
||||
|
||||
[dependencies.physical-node]
|
||||
path = "../../../node"
|
||||
[dependencies.node-poll-variants]
|
||||
path = "../../../macros/node-poll-variants"
|
||||
[dependencies.physical-ads1256-types]
|
||||
path = "../types"
|
||||
features = ["defmt"]
|
||||
[dependencies.ads1256]
|
||||
workspace = true
|
||||
[dependencies.embedded-hal]
|
||||
|
@ -1,9 +1,4 @@
|
||||
#![no_std]
|
||||
#![feature(async_fn_in_trait, impl_trait_projections)]
|
||||
|
||||
#[cfg(feature = "standard-multiplexer")]
|
||||
mod standard_multiplexer;
|
||||
#[cfg(feature = "poll")]
|
||||
mod poll;
|
||||
|
||||
pub use physical_ads1256_types::*;
|
||||
pub mod standard;
|
2
peripheral-components/ads1256/node/src/standard/mod.rs
Normal file
2
peripheral-components/ads1256/node/src/standard/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
#[cfg(feature = "standard-input")]
|
||||
pub mod multiplexer;
|
@ -38,11 +38,10 @@ where
|
||||
type Value = f32::ElectricPotential;
|
||||
|
||||
async fn poll(&self) -> Result<Self::Value, CriticalError> {
|
||||
let result = self
|
||||
.ads1256
|
||||
.lock()
|
||||
.await
|
||||
.deref_mut()
|
||||
let mut ads1256_guard = self.ads1256.lock().await;
|
||||
let ads1256 = ads1256_guard.deref_mut();
|
||||
|
||||
let result = ads1256
|
||||
.autocal_convert_m(
|
||||
self.spi,
|
||||
self.input_mod.multiplexer(),
|
Reference in New Issue
Block a user