Removing unused code
This commit is contained in:
parent
585613f48f
commit
c518797d08
18
src/main.rs
18
src/main.rs
|
@ -823,16 +823,16 @@ const APP: () = {
|
|||
|
||||
let dds_output = &mut c.resources.dds_output;
|
||||
if let Some(pounder) = c.resources.pounder {
|
||||
let profile = pounder
|
||||
.ad9959
|
||||
.serialize_profile(
|
||||
pounder::Channel::Out0.into(),
|
||||
100_000_000_f32,
|
||||
0.0_f32,
|
||||
*adc0 as f32 / 0xFFFF as f32,
|
||||
)
|
||||
.unwrap();
|
||||
dds_output.lock(|dds_output| {
|
||||
let profile = pounder
|
||||
.ad9959
|
||||
.serialize_profile(
|
||||
pounder::Channel::Out0.into(),
|
||||
100_000_000_f32,
|
||||
0.0_f32,
|
||||
*adc0 as f32 / 0xFFFF as f32,
|
||||
)
|
||||
.unwrap();
|
||||
dds_output.push(profile);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
return Err(Error::Qspi);
|
||||
}
|
||||
|
@ -136,34 +136,6 @@ impl QspiInterface {
|
|||
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue