From c5fde8563c36e7faeb1ce24d708bd02eb1661fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Wed, 3 Feb 2021 13:16:22 +0100 Subject: [PATCH] deps: bump hal and smoltcp, adapt --- Cargo.lock | 15 ++------------- src/hardware/adc.rs | 7 ++++++- src/hardware/dac.rs | 3 ++- src/hardware/mod.rs | 2 -- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee50a9a..ed15a58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -954,17 +954,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smoltcp" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe46639fd2ec79eadf8fe719f237a7a0bd4dac5d957f1ca5bbdbc1c3c39e53a" -dependencies = [ - "bitflags", - "byteorder", - "managed", -] - [[package]] name = "smoltcp" version = "0.7.0" @@ -998,7 +987,7 @@ dependencies = [ "paste", "serde", "serde-json-core", - "smoltcp 0.7.0", + "smoltcp", "stm32h7xx-hal", ] @@ -1033,7 +1022,7 @@ dependencies = [ "embedded-hal", "nb 1.0.0", "paste", - "smoltcp 0.7.0", + "smoltcp", "stm32h7", "void", ] diff --git a/src/hardware/adc.rs b/src/hardware/adc.rs index 188e436..1cb6c17 100644 --- a/src/hardware/adc.rs +++ b/src/hardware/adc.rs @@ -180,18 +180,21 @@ macro_rules! adc_input { hal::spi::Spi, PeripheralToMemory, &'static mut [u16; SAMPLE_BUFFER_SIZE], + hal::dma::DBTransfer, >, trigger_transfer: Transfer< hal::dma::dma::$trigger_stream, [< $spi CR >], MemoryToPeripheral, &'static mut [u32; 1], + hal::dma::DBTransfer, >, clear_transfer: Transfer< hal::dma::dma::$clear_stream, [< $spi IFCR >], MemoryToPeripheral, &'static mut [u32; 1], + hal::dma::DBTransfer, >, } @@ -239,6 +242,7 @@ macro_rules! adc_input { _, MemoryToPeripheral, _, + _, > = Transfer::init( clear_stream, [< $spi IFCR >]::new(clear_channel), @@ -276,6 +280,7 @@ macro_rules! adc_input { _, MemoryToPeripheral, _, + _, > = Transfer::init( trigger_stream, [< $spi CR >]::new(trigger_channel), @@ -306,7 +311,7 @@ macro_rules! adc_input { // The data transfer is always a transfer of data from the peripheral to a RAM // buffer. - let data_transfer: Transfer<_, _, PeripheralToMemory, _> = + let data_transfer: Transfer<_, _, PeripheralToMemory, _, _> = Transfer::init( data_stream, spi, diff --git a/src/hardware/dac.rs b/src/hardware/dac.rs index 09d0497..5ca65fb 100644 --- a/src/hardware/dac.rs +++ b/src/hardware/dac.rs @@ -122,6 +122,7 @@ macro_rules! dac_output { $spi, MemoryToPeripheral, &'static mut [u16; SAMPLE_BUFFER_SIZE], + hal::dma::DBTransfer, >, } @@ -164,7 +165,7 @@ macro_rules! dac_output { } // Construct the trigger stream to write from memory to the peripheral. - let transfer: Transfer<_, _, MemoryToPeripheral, _> = + let transfer: Transfer<_, _, MemoryToPeripheral, _, _> = Transfer::init( stream, $spi::new(trigger_channel, spi), diff --git a/src/hardware/mod.rs b/src/hardware/mod.rs index dc3aa25..f912057 100644 --- a/src/hardware/mod.rs +++ b/src/hardware/mod.rs @@ -37,8 +37,6 @@ pub type AFE1 = afe::ProgrammableGainAmplifier< // Type alias for the ethernet interface on Stabilizer. pub type Ethernet = smoltcp::iface::EthernetInterface< - 'static, - 'static, 'static, hal::ethernet::EthernetDMA<'static>, >;