From afeca1a09c450d8e59f004bd5a4c27823ee05be7 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Wed, 8 Jun 2022 16:23:52 -0600 Subject: [PATCH] Remove python bindings to convert method The convert method from the Channel class had no functionality and the read method performs the desired operation without requiring external loops. Removing the method and dependent ctype definitions. Signed-off-by: Travis F. Collins --- bindings/python/iio.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/bindings/python/iio.py b/bindings/python/iio.py index df27e399a..0d43f5aaa 100644 --- a/bindings/python/iio.py +++ b/bindings/python/iio.py @@ -593,10 +593,6 @@ class ChannelType(Enum): _channel_get_type.restype = c_int _channel_get_type.argtypes = (_ChannelPtr,) -_channel_convert = _lib.iio_channel_convert -_channel_convert.restype = None -_channel_convert.argtypes = (_ChannelPtr, c_void_p, c_void_p) - _channel_convert_inverse = _lib.iio_channel_convert_inverse _channel_convert_inverse.restype = None _channel_convert_inverse.argtypes = (_ChannelPtr, c_void_p, c_void_p) @@ -966,19 +962,6 @@ def type(self): """ return ChannelType(_channel_get_type(self._channel)) - def convert(self, dst, src): - """ - Convert src and saves the result in dst, using current channel's data format. - - :param dst: type=list - The variable where the result is stored. - :param src: type=list - Data to be converted. - """ - src_ptr = cast((c_char * (len(src) * self.data_format.length))(*src), c_void_p) - dst_ptr = cast((c_char * (len(dst) * self.data_format.length))(*dst), c_void_p) - _channel_convert(self._channel, src_ptr, dst_ptr) - def convert_inverse(self, dst, src): """ Convert the sample from host format to hardware format.