Skip to content

Commit ba4027a

Browse files
committed
renamed function
1 parent 52e3ecb commit ba4027a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

python_hackrf/libhackrf/chackrf.pxd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ cdef extern from "hackrf.h":
160160

161161
ctypedef void (*hackrf_flush_cb_fn)(void* flush_ctx, int)
162162

163-
int hackrf_android_init(int fileDescriptor, hackrf_device** device)
164-
165163
int hackrf_init()
166164

165+
int hackrf_init_on_android(int fileDescriptor, hackrf_device** device)
166+
167167
int hackrf_exit()
168168

169169
const char* hackrf_library_version()

python_hackrf/libhackrf/pyhackrf.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,14 @@ cdef class PyHackrfDevice:
546546
def pyhackrf_init() -> int:
547547
return chackrf.hackrf_init()
548548

549-
def pyhackrf_android_init(int fileDescriptor) -> PyHackrfDevice | None:
549+
def pyhackrf_init_on_android(int fileDescriptor) -> PyHackrfDevice | None:
550550
hackrf_device = PyHackrfDevice()
551-
result = chackrf.hackrf_android_init(fileDescriptor, hackrf_device.get_hackrf_device_double_ptr())
551+
result = chackrf.hackrf_init_on_android(fileDescriptor, hackrf_device.get_hackrf_device_double_ptr())
552552
if result == chackrf.hackrf_error.HACKRF_SUCCESS:
553553
hackrf_device._setup_callbacks()
554554
return hackrf_device
555555

556-
raise RuntimeError(f'pyhackrf_android_init() failed: {chackrf.hackrf_error_name(result).decode("utf-8")} ({result})')
556+
raise RuntimeError(f'pyhackrf_init_on_android() failed: {chackrf.hackrf_error_name(result).decode("utf-8")} ({result})')
557557

558558

559559
# Should run atrer use library

python_hackrf/pyhackrf_tools/__android.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ def get_device():
7272
file_descriptor = get_usb_device_descriptor()
7373

7474
if file_descriptor is not None:
75-
device = pyhackrf.pyhackrf_android_init(file_descriptor)
75+
device = pyhackrf.pyhackrf_init_on_android(file_descriptor)
7676

7777
return device

0 commit comments

Comments
 (0)