Correcting issues at high optimization levels

This commit is contained in:
Ryan Summers 2020-06-11 19:00:37 +02:00
parent 48bd35e1d8
commit b7100f2b14
3 changed files with 8 additions and 8 deletions

View File

@ -9,9 +9,10 @@ members = [
[profile.dev]
codegen-units = 1
incremental = false
opt-level = 1
opt-level = 3
[profile.release]
opt-level = 3
debug = true
lto = true
codegen-units = 1

View File

@ -152,12 +152,11 @@ where
ad9959.interface.configure_mode(desired_mode).map_err(|_| Error::Interface)?;
// Read back the CSR to ensure it specifies the mode correctly.
// TODO: This is disabled until QSPI readback issues have been resolved.
//let mut updated_csr: [u8; 1] = [0];
//ad9959.interface.read(Register::CSR as u8, &mut updated_csr).map_err(|_| Error::Interface)?;
//if updated_csr[0] != csr[0] {
// return Err(Error::Check);
//}
let mut updated_csr: [u8; 1] = [0];
ad9959.interface.read(Register::CSR as u8, &mut updated_csr).map_err(|_| Error::Interface)?;
if updated_csr[0] != csr[0] {
return Err(Error::Check);
}
// Set the clock frequency to configure the device as necessary.
ad9959.configure_system_clock(clock_frequency, multiplier)?;

@ -1 +1 @@
Subproject commit d79cb0015a6f0cbb819907efe3a817f7dce14bab
Subproject commit 40ad4687e8473e329aea4b61551d107f3dfca567