From 4606d939001c2d126f0d9e904237f1e3f96ae773 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Thu, 4 Mar 2021 18:32:02 +0000 Subject: [PATCH] Update stm32h7xx-hal I haven't done any runtime tests using Pounder, but it seems like the API change is just a consequence of making the QSPI address width runtime-configurable. --- Cargo.lock | 12 +++++++----- src/hardware/pounder/mod.rs | 8 +++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86401c7..095de10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "ad9959" version = "0.1.0" @@ -750,12 +752,12 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stm32h7" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7571f17d1ed7d67957d0004de6c52bd1ef5e736ed5ddc2bcecf001512269f77c" +checksum = "8b672c837e0ee8158ecc7fce0f9a948dd0693a9c588338e728d14b73307a0b7d" dependencies = [ "bare-metal 0.2.5", - "cortex-m 0.6.7", + "cortex-m 0.7.1", "cortex-m-rt", "vcell", ] @@ -763,11 +765,11 @@ dependencies = [ [[package]] name = "stm32h7xx-hal" version = "0.8.0" -source = "git+https://github.com/stm32-rs/stm32h7xx-hal?branch=master#08231e334a11236fe556668ac19cb1c214da2406" +source = "git+https://github.com/stm32-rs/stm32h7xx-hal?branch=master#ad2a1ae9831dd34e171cc178cdad84e770b4c0ae" dependencies = [ "bare-metal 1.0.0", "cast", - "cortex-m 0.6.7", + "cortex-m 0.7.1", "cortex-m-rt", "embedded-dma", "embedded-hal", diff --git a/src/hardware/pounder/mod.rs b/src/hardware/pounder/mod.rs index 0497a37..32a8e80 100644 --- a/src/hardware/pounder/mod.rs +++ b/src/hardware/pounder/mod.rs @@ -231,14 +231,16 @@ impl ad9959::Interface for QspiInterface { }; self.qspi - .write(encoded_address, &encoded_payload) + .write(encoded_address.into(), &encoded_payload) .map_err(|_| Error::Qspi) } ad9959::Mode::FourBitSerial => { if self.streaming { Err(Error::Qspi) } else { - self.qspi.write(addr, data).map_err(|_| Error::Qspi)?; + self.qspi + .write(addr.into(), data) + .map_err(|_| Error::Qspi)?; Ok(()) } } @@ -257,7 +259,7 @@ impl ad9959::Interface for QspiInterface { } self.qspi - .read(0x80_u8 | addr, dest) + .read((0x80_u8 | addr).into(), dest) .map_err(|_| Error::Qspi) } }