Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
clean up
  • Loading branch information
JurajSadel committed Aug 16, 2024
commit 7bb59df5dc4cf0b971d2040075569d87ac057133
16 changes: 0 additions & 16 deletions hil-test/tests/spi_full_duplex_dma_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,8 @@ use esp_hal::{
SpiMode,
},
system::SystemControl,
timer::{timg::TimerGroup, ErasedTimer, OneShotTimer},
};

macro_rules! mk_static {
($t:ty,$val:expr) => {{
static STATIC_CELL: static_cell::StaticCell<$t> = static_cell::StaticCell::new();
#[deny(unused_attributes)]
let x = STATIC_CELL.uninit().write(($val));
x
}};
}

#[cfg(test)]
#[embedded_test::tests(executor = esp_hal_embassy::Executor::new())]
mod tests {
Expand Down Expand Up @@ -129,12 +119,6 @@ mod tests {
let system = SystemControl::new(peripherals.SYSTEM);
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks);
let timer0: ErasedTimer = timg0.timer0.into();
let timers = [OneShotTimer::new(timer0)];
let timers = mk_static!([OneShotTimer<ErasedTimer>; 1], timers);
esp_hal_embassy::init(&clocks, timers);

let io = Io::new(peripherals.GPIO, peripherals.IO_MUX);
let pcnt = Pcnt::new(peripherals.PCNT);
let sclk = io.pins.gpio0;
Expand Down