Removing unused code

This commit is contained in:
Ryan Summers 2020-11-17 10:48:31 +01:00
parent 585613f48f
commit c518797d08
2 changed files with 10 additions and 38 deletions

View File

@ -823,7 +823,6 @@ const APP: () = {
let dds_output = &mut c.resources.dds_output; let dds_output = &mut c.resources.dds_output;
if let Some(pounder) = c.resources.pounder { if let Some(pounder) = c.resources.pounder {
dds_output.lock(|dds_output| {
let profile = pounder let profile = pounder
.ad9959 .ad9959
.serialize_profile( .serialize_profile(
@ -833,6 +832,7 @@ const APP: () = {
*adc0 as f32 / 0xFFFF as f32, *adc0 as f32 / 0xFFFF as f32,
) )
.unwrap(); .unwrap();
dds_output.lock(|dds_output| {
dds_output.push(profile); dds_output.push(profile);
}); });
} }

View File

@ -115,7 +115,7 @@ impl QspiInterface {
}) })
} }
pub fn start_stream(&mut self) -> Result<(), Error> { fn start_stream(&mut self) -> Result<(), Error> {
if self.qspi.is_busy() { if self.qspi.is_busy() {
return Err(Error::Qspi); return Err(Error::Qspi);
} }
@ -136,34 +136,6 @@ impl QspiInterface {
Ok(()) Ok(())
} }
pub fn write_profile(&mut self, data: [u32; 4]) -> Result<(), Error> {
if self.streaming == false {
return Err(Error::Qspi);
}
let qspi_regs = unsafe { &*hal::stm32::QUADSPI::ptr() };
unsafe {
core::ptr::write_volatile(
&qspi_regs.dr as *const _ as *mut u32,
data[0],
);
core::ptr::write_volatile(
&qspi_regs.dr as *const _ as *mut u32,
data[1],
);
core::ptr::write_volatile(
&qspi_regs.dr as *const _ as *mut u32,
data[2],
);
core::ptr::write_volatile(
&qspi_regs.dr as *const _ as *mut u32,
data[3],
);
}
Ok(())
}
} }
impl ad9959::Interface for QspiInterface { impl ad9959::Interface for QspiInterface {