diff options
author | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2024-12-04 11:07:17 +0000 |
---|---|---|
committer | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2024-12-04 11:07:17 +0000 |
commit | abbe14bebb2935b017b980e6fc2bfc5e94052049 (patch) | |
tree | f762cf4b77463a01250d96be7977e3d6e2f1dcb8 /Radio/Utils/TestAirSpyHF | |
parent | 23fc08c8798d7c325a72fbee4175813efe4fe70f (diff) | |
download | PrySDR-abbe14bebb2935b017b980e6fc2bfc5e94052049.tar.gz PrySDR-abbe14bebb2935b017b980e6fc2bfc5e94052049.zip |
AirSpyHFIQ: read samples from airspyhf and dump those to fc32 file
Diffstat (limited to 'Radio/Utils/TestAirSpyHF')
-rw-r--r-- | Radio/Utils/TestAirSpyHF/main.swift | 19 |
1 files changed, 17 insertions, 2 deletions
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..<ndev { + let serialPtr: UnsafeMutablePointer<UInt64> = .allocate(capacity: 1) + airspyhf_list_devices(serialPtr, i+1) + + print("Device \(i): \(serialPtr.pointee)") +} + + |