Skip to content

Commit

Permalink
Remove python bindings to inverse convert method
Browse files Browse the repository at this point in the history
Similar to the convert method, the inverse_convert from the Channel
class had no functionality and the write method performs the
desired operation without requiring external loops. Removing the
method and dependent ctype definitions.

Signed-off-by: Travis F. Collins <travis.collins@analog.com>
  • Loading branch information
tfcollins authored and pcercuei committed Jun 16, 2022
1 parent afeca1a commit 6547886
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions bindings/python/iio.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,10 +593,6 @@ class ChannelType(Enum):
_channel_get_type.restype = c_int
_channel_get_type.argtypes = (_ChannelPtr,)

_channel_convert_inverse = _lib.iio_channel_convert_inverse
_channel_convert_inverse.restype = None
_channel_convert_inverse.argtypes = (_ChannelPtr, c_void_p, c_void_p)

_create_buffer = _lib.iio_device_create_buffer
_create_buffer.restype = _BufferPtr
_create_buffer.argtypes = (
Expand Down Expand Up @@ -962,19 +958,6 @@ def type(self):
"""
return ChannelType(_channel_get_type(self._channel))

def convert_inverse(self, dst, src):
"""
Convert the sample from host format to hardware 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_inverse(self._channel, src_ptr, dst_ptr)


class Buffer(object):
"""The class used for all I/O operations."""
Expand Down

0 comments on commit 6547886

Please sign in to comment.