From abbe14bebb2935b017b980e6fc2bfc5e94052049 Mon Sep 17 00:00:00 2001 From: Arturs Artamonovs Date: Wed, 4 Dec 2024 11:07:17 +0000 Subject: AirSpyHFIQ: read samples from airspyhf and dump those to fc32 file --- Radio/Utils/TestAirSpyHF/main.swift | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'Radio/Utils/TestAirSpyHF/main.swift') diff --git a/Radio/Utils/TestAirSpyHF/main.swift b/Radio/Utils/TestAirSpyHF/main.swift index 24a74f8..8166f2b 100644 --- a/Radio/Utils/TestAirSpyHF/main.swift +++ b/Radio/Utils/TestAirSpyHF/main.swift @@ -8,8 +8,23 @@ import Foundation import libairspyhf -print("Hello, World!") +print("Version \(software_version)") var libersion:airspyhf_lib_version_t = airspyhf_lib_version_t() airspyhf_lib_version(&libersion) -print("\(libersion.major_version)") +print("libairspyhf \(libersion.major_version).\(libersion.minor_version).\(libersion.revision)") + +let ndev = airspyhf_list_devices(nil, 0) +print("Found \(ndev) AirSpyHF devices") +if ndev < 0 { + exit(0) +} + +for i in 0.. = .allocate(capacity: 1) + airspyhf_list_devices(serialPtr, i+1) + + print("Device \(i): \(serialPtr.pointee)") +} + + -- cgit v1.2.3