From 26c987bd0447f1bc73706d886c5f4a69acfafc19 Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 24 Sep 2020 17:14:27 +0800 Subject: [PATCH] dds: add get/set for sys_clk --- src/dds.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/dds.rs b/src/dds.rs index 131c608..6414ecb 100644 --- a/src/dds.rs +++ b/src/dds.rs @@ -726,6 +726,17 @@ where } Ok(error_count) } + + // Setter function for f_sys_clk + // Warning: This does not setup the chip to generate this actual f_sys_clk + pub(crate) fn set_f_sys_clk(&mut self, f_sys_clk: f64) { + self.f_sys_clk = f_sys_clk; + } + + // Getter function for f_sys_clk + pub fn get_f_sys_clk(&mut self) -> f64 { + self.f_sys_clk + } } // Strong check for bytes passed to a register