Skip to content

Commit

Permalink
Reapply "boards: apollo3: Remove soil moisture tests"
Browse files Browse the repository at this point in the history
This reverts commit 77b936f.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
alistair23 committed Nov 12, 2024
1 parent f0a7d27 commit c8bd5e4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
8 changes: 0 additions & 8 deletions boards/apollo3/lora_things_plus/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ static mut BME280: Option<
static mut CCS811: Option<&'static capsules_extra::ccs811::Ccs811<'static>> = None;
#[cfg(feature = "atecc508a")]
static mut ATECC508A: Option<&'static capsules_extra::atecc508a::Atecc508a<'static>> = None;
#[cfg(feature = "chirp_i2c_moisture")]
static mut CHIRP_I2C_MOISTURE: Option<
&'static capsules_extra::chirp_i2c_moisture::ChirpI2cMoisture<
'static,
capsules_core::virtualizers::virtual_i2c::I2CDevice<'static, apollo3::iom::Iom<'static>>,
>,
> = None;

/// Dummy buffer that causes the linker to reserve enough space for the stack.
#[no_mangle]
Expand Down Expand Up @@ -292,7 +285,6 @@ unsafe fn setup_chirp_i2c_moisture(
components::chirp_i2c_moisture::ChirpI2cMoistureComponent::new(mux_i2c, 0x20).finalize(
components::chirp_i2c_moisture_component_static!(apollo3::iom::Iom<'static>),
);
CHIRP_I2C_MOISTURE = Some(chirp_moisture);

let moisture = components::moisture::MoistureComponent::new(
board_kernel,
Expand Down
27 changes: 0 additions & 27 deletions boards/apollo3/lora_things_plus/src/tests/environmental_sensors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@
//! (https://www.sparkfun.com/products/14348).
use crate::tests::run_kernel_op;
#[cfg(feature = "chirp_i2c_moisture")]
use crate::CHIRP_I2C_MOISTURE;
use crate::{BME280, CCS811};
use core::cell::Cell;
use kernel::debug;
#[cfg(feature = "chirp_i2c_moisture")]
use kernel::hil::sensors::MoistureDriver;
use kernel::hil::sensors::{
AirQualityClient, AirQualityDriver, HumidityClient, HumidityDriver, MoistureClient,
TemperatureClient, TemperatureDriver,
Expand Down Expand Up @@ -102,29 +98,6 @@ impl<'a> AirQualityClient for SensorTestCallback {

static CALLBACK: SensorTestCallback = SensorTestCallback::new();

#[cfg(feature = "chirp_i2c_moisture")]
#[test_case]
fn run_chirp_i2c_moisture() {
debug!("check run Chirp I2C Moisture Sensor... ");
run_kernel_op(100);

let chirp = unsafe { CHIRP_I2C_MOISTURE.unwrap() };

// Make sure the device is ready for us.
run_kernel_op(1000);

MoistureDriver::set_client(chirp, &CALLBACK);
CALLBACK.reset();

chirp.read_moisture().unwrap();

run_kernel_op(10_000);
assert_eq!(CALLBACK.moisture_done.get(), true);

debug!(" [ok]");
run_kernel_op(100);
}

#[test_case]
fn run_bme280_temperature() {
debug!("check run BME280 Temperature... ");
Expand Down

0 comments on commit c8bd5e4

Please sign in to comment.