mirror of
https://github.com/hubaldv/bioz-firmware-rs.git
synced 2026-03-10 03:00:31 +00:00
Included setting dft number from gui.
This commit is contained in:
@@ -87,57 +87,57 @@ pub struct DspConfig {
|
||||
}
|
||||
|
||||
impl DspConfig {
|
||||
pub fn adc_mux_n(mut self, muxseln: MUXSELN) -> Self {
|
||||
pub fn adc_mux_n(&mut self, muxseln: MUXSELN) -> &mut Self {
|
||||
self.muxseln = Some(muxseln);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn adc_mux_p(mut self, muxselp: MUXSELP) -> Self {
|
||||
pub fn adc_mux_p(&mut self, muxselp: MUXSELP) -> &mut Self {
|
||||
self.muxselp = Some(muxselp);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn ctiacon(mut self, ctiacon: CTIACON) -> Self {
|
||||
pub fn ctiacon(&mut self, ctiacon: CTIACON) -> &mut Self {
|
||||
self.ctiacon = Some(ctiacon);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn rtiacon(mut self, rtiacon: RTIACON) -> Self {
|
||||
pub fn rtiacon(&mut self, rtiacon: RTIACON) -> &mut Self {
|
||||
self.rtiacon = Some(rtiacon);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn sinc3osr(mut self, sinc3osr: SINC3OSR) -> Self {
|
||||
pub fn sinc3osr(&mut self, sinc3osr: SINC3OSR) -> &mut Self {
|
||||
self.sinc3osr = Some(sinc3osr);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn sinc2osr(mut self, sinc2osr: SINC2OSR) -> Self {
|
||||
pub fn sinc2osr(&mut self, sinc2osr: SINC2OSR) -> &mut Self {
|
||||
self.sinc2osr = Some(sinc2osr);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn adcsamplerate(mut self, adcsamplerate: ADCSAMPLERATE) -> Self {
|
||||
pub fn adcsamplerate(&mut self, adcsamplerate: ADCSAMPLERATE) -> &mut Self {
|
||||
self.adcsamplerate = Some(adcsamplerate);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn dftin_sel(mut self, dftin: DFTINSEL) -> Self {
|
||||
pub fn dftin_sel(&mut self, dftin: DFTINSEL) -> &mut Self {
|
||||
self.dftin = Some(dftin);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn dftnum(mut self, dftnum: DFTNUM) -> Self {
|
||||
pub fn dftnum(&mut self, dftnum: DFTNUM) -> &mut Self {
|
||||
self.dftnum = Some(dftnum);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn hanning(mut self, hanning: bool) -> Self {
|
||||
pub fn hanning(&mut self, hanning: bool) -> &mut Self {
|
||||
self.hanning = Some(hanning);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn set_clks(mut self, fsys: u32, fadc: u32) -> Self {
|
||||
pub fn set_clks(&mut self, fsys: u32, fadc: u32) -> &mut Self {
|
||||
self.fsys = Some(fsys);
|
||||
self.fadc = Some(fadc);
|
||||
self.ratio_sys2adc_clk = Some(fsys as f32 / fadc as f32);
|
||||
@@ -156,27 +156,27 @@ pub struct SramConfig {
|
||||
}
|
||||
|
||||
impl SramConfig {
|
||||
pub fn datafifosrcsel(mut self, datafifosrcsel: DATAFIFOSRCSEL) -> Self {
|
||||
pub fn datafifosrcsel(&mut self, datafifosrcsel: DATAFIFOSRCSEL) -> &mut Self {
|
||||
self.datafifosrcsel = Some(datafifosrcsel);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn datafifoen(mut self, datafifoen: DATAFIFOEN) -> Self {
|
||||
pub fn datafifoen(&mut self, datafifoen: DATAFIFOEN) -> &mut Self {
|
||||
self.datafifoen = Some(datafifoen);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn data_size(mut self, data_mem_size: DATA_MEM_SEL) -> Self {
|
||||
pub fn data_size(&mut self, data_mem_size: DATA_MEM_SEL) -> &mut Self {
|
||||
self.data_mem_size = Some(data_mem_size);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn cmd_mode(mut self, cmd_mem_mode: CMDMEMMDE) -> Self {
|
||||
pub fn cmd_mode(&mut self, cmd_mem_mode: CMDMEMMDE) -> &mut Self {
|
||||
self.cmd_mem_mode = Some(cmd_mem_mode);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn cmd_size(mut self, cmd_mem_size: CMD_MEM_SEL) -> Self {
|
||||
pub fn cmd_size(&mut self, cmd_mem_size: CMD_MEM_SEL) -> &mut Self {
|
||||
self.cmd_mem_size = Some(cmd_mem_size);
|
||||
self
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user