2323# cython: language_level=3str
2424from python_hackrf import __version__
2525from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
26- from .__android import hackrf_device_list
26+ from .__android import get_hackrf_device_list
2727from . cimport chackrf_android as chackrf
2828from libc.stdlib cimport malloc, free
2929
@@ -132,7 +132,7 @@ cdef class PyHackRFDeviceList:
132132 cdef list __hackrf_device_list
133133
134134 def __cinit__ (self ):
135- self .__hackrf_device_list = hackrf_device_list ()
135+ self .__hackrf_device_list = get_hackrf_device_list ()
136136
137137 property device_count :
138138 def __get__ (self ):
@@ -688,12 +688,12 @@ def pyhackrf_device_list_open(pyhackrf_device_list: PyHackRFDeviceList, index: i
688688
689689
690690def pyhackrf_open() -> PyHackrfDevice | None:
691- device_list = hackrf_device_list (1 )
691+ hackrf_device_list = get_hackrf_device_list (1 )
692692 result = chackrf.hackrf_error.HACKRF_ERROR_NOT_FOUND
693693
694- if len(device_list ):
694+ if len(hackrf_device_list ):
695695 pyhackrf_device = PyHackrfDevice()
696- result = chackrf.hackrf_open_on_android(device_list [0 ][0 ], pyhackrf_device.get_hackrf_device_double_ptr())
696+ result = chackrf.hackrf_open_on_android(hackrf_device_list [0 ][0 ], pyhackrf_device.get_hackrf_device_double_ptr())
697697 if result == chackrf.hackrf_error.HACKRF_SUCCESS:
698698 pyhackrf_device._setup_device()
699699 return pyhackrf_device
@@ -705,11 +705,11 @@ def pyhackrf_open_by_serial(desired_serial_number: str) -> PyHackrfDevice | None
705705 if desired_serial_number in (None , ''):
706706 return pyhackrf_open()
707707
708- device_list = hackrf_device_list ()
708+ hackrf_device_list = get_hackrf_device_list ()
709709 result = chackrf.hackrf_error.HACKRF_ERROR_NOT_FOUND
710710
711- if len (device_list ):
712- for file_descriptor, board_id, serial_number in device_list :
711+ if len (hackrf_device_list ):
712+ for file_descriptor, board_id, serial_number in hackrf_device_list :
713713 if serial_number == desired_serial_number:
714714 pyhackrf_device = PyHackrfDevice()
715715 result = chackrf.hackrf_open_on_android(file_descriptor, pyhackrf_device.get_hackrf_device_double_ptr())
0 commit comments