24 hackrf_error rc = (hackrf_error) hackrf_init();
26 if (rc != HACKRF_SUCCESS) {
27 qCritical(
"DeviceHackRF::open_hackrf: failed to initiate HackRF library %s", hackrf_error_name(rc));
52 hackrf_device *hackrf_ptr;
56 rc = (hackrf_error) hackrf_open_by_serial(serial, &hackrf_ptr);
58 if (rc == HACKRF_SUCCESS)
64 qCritical(
"DeviceHackRF::open_hackrf: error #%d: %s", (
int) rc, hackrf_error_name(rc));
71 hackrf_device_list_t *hackrf_devices = hackrf_device_list();
72 hackrf_device *hackrf_ptr;
77 rc = (hackrf_error) hackrf_device_list_open(hackrf_devices, sequence, &hackrf_ptr);
79 if (rc == HACKRF_SUCCESS)
85 qCritical(
"DeviceHackRF::open_hackrf_from_sequence: error #%d: %s", (
int) rc, hackrf_error_name(rc));
static DeviceHackRF & instance()
static hackrf_device * open_hackrf(int sequence)
static hackrf_device * open_hackrf_from_sequence(int sequence)