From 46b54506ff92160118cb687d161392edcdb7003a Mon Sep 17 00:00:00 2001 From: Ionut Podgoreanu Date: Wed, 14 Feb 2024 16:18:53 +0200 Subject: [PATCH] adi: adf4159: Add missing attributes These attributes are inherited from the ADF4159 and implemented through debug attributes. Signed-off-by: Ionut Podgoreanu --- adi/adf4159.py | 140 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/adi/adf4159.py b/adi/adf4159.py index c60491b38..90cc9cd3c 100644 --- a/adi/adf4159.py +++ b/adi/adf4159.py @@ -105,3 +105,143 @@ def freq_dev_time(self, value): self._set_iio_attr( "altvoltage0", "frequency_deviation_time", True, value, self._ctrl ) + + @property + def phase_value(self): + """Get/Set the PLL frequency deviation time.""" + return self._get_iio_debug_attr("adi,phase", self._ctrl) + + @phase_value.setter + def phase_value(self, value): + """Get/Set the PLL frequency deviation time.""" + self._set_iio_debug_attr_str("adi,phase", str(value), self._ctrl) + + @property + def trig_delay_en(self): + """Get/Set the txdata-trigger-delay-enable.""" + return self._get_iio_debug_attr("adi,txdata-trigger-delay-enable", self._ctrl) + + @trig_delay_en.setter + def trig_delay_en(self, value): + """Get/Set the txdata-trigger-delay-enable.""" + self._set_iio_debug_attr_str( + "adi,txdata-trigger-delay-enable", str(value), self._ctrl + ) + + @property + def sing_ful_tri(self): + """Get/Set Single-full-triangle-enable.""" + return self._get_iio_debug_attr("adi,single-full-triangle-enable", self._ctrl) + + @sing_ful_tri.setter + def sing_ful_tri(self, value): + """Get/Set Single-full-triangle-enable.""" + self._set_iio_debug_attr_str( + "adi,single-full-triangle-enable", str(value), self._ctrl + ) + + @property + def tx_trig_en(self): + """Get/Set tx data trigger enable.""" + return self._get_iio_debug_attr("adi,txdata-trigger-enable", self._ctrl) + + @tx_trig_en.setter + def tx_trig_en(self, value): + """Get/Set tx data trigger enable.""" + self._set_iio_debug_attr_str( + "adi,txdata-trigger-enable", str(value), self._ctrl + ) + + @property + def ramp_delay_en(self): + """Get/Set ramp delay enable.""" + return self._get_iio_debug_attr("adi,ramp-delay-enable", self._ctrl) + + @ramp_delay_en.setter + def ramp_delay_en(self, value): + """Get/Set ramp delay enable.""" + self._set_iio_debug_attr_str("adi,ramp-delay-enable", str(value), self._ctrl) + + @property + def delay_clk(self): + """Get/Set the clk delay enable.""" + return self._get_iio_debug_attr( + "adi,delay-clk-sel-pfd-x-clk1-enable", self._ctrl + ) + + @delay_clk.setter + def delay_clk(self, value): + """Get/Set the clk delay enable.""" + self._set_iio_debug_attr_str( + "adi,delay-clk-sel-pfd-x-clk1-enable", str(value), self._ctrl + ) + + @property + def delay_start_en(self): + """Get/Set the delay start enable.""" + return self._get_iio_debug_attr("adi,delay-start-enable", self._ctrl) + + @delay_start_en.setter + def delay_start_en(self, value): + """Get/Set the delay start enable.""" + self._set_iio_debug_attr_str("adi,delay-start-enable", str(value), self._ctrl) + + @property + def delay_word(self): + """Get/Set the delay word.""" + return self._get_iio_debug_attr("adi,delay-start-word", self._ctrl) + + @delay_word.setter + def delay_word(self, value): + """Get/Set the delay word.""" + self._set_iio_debug_attr_str("adi,delay-start-word", str(value), self._ctrl) + + @property + def clk1_mode(self): + """Get/Set the mode of 1st clk.""" + return self._get_iio_debug_attr("adi,clk-div-mode", self._ctrl) + + @clk1_mode.setter + def clk1_mode(self, value): + """Get/Set the mode of 1st clk.""" + self._set_iio_debug_attr_str("adi,clk-div-mode", str(value), self._ctrl) + + @property + def ramp_en(self): + """Get/Set the ramp enable.""" + return self._get_iio_debug_attr("adi,ramp-enable", self._ctrl) + + @ramp_en.setter + def ramp_en(self, value): + """Get/Set the ramp enable.""" + self._set_iio_debug_attr_str("adi,ramp-enable", str(value), self._ctrl) + + @property + def clk1_div_value(self): + """Get/Set the PLL frequency deviation time.""" + return self._get_iio_debug_attr("adi,clk1-div", self._ctrl) + + @clk1_div_value.setter + def clk1_div_value(self, value): + """Get/Set the PLL frequency deviation time.""" + self._set_iio_debug_attr_str("adi,clk1-div", str(value), self._ctrl) + + @property + def clk2_div_value(self): + """Get/Set the PLL frequency deviation time.""" + return self._get_iio_debug_attr("adi,clk2-timer-div", self._ctrl) + + @clk2_div_value.setter + def clk2_div_value(self, value): + """Get/Set the PLL frequency deviation time.""" + self._set_iio_debug_attr_str("adi,clk2-timer-div", str(value), self._ctrl) + + @property + def muxout_sel(self): + """Get/Set the PLL frequency deviation time.""" + return self._get_iio_debug_attr("adi,muxout-select", self._ctrl) + + @muxout_sel.setter + def muxout_sel(self, value): + """Get/Set the PLL frequency deviation time.""" + self._set_iio_debug_attr_str("adi,muxout-select", str(value), self._ctrl)