// // main.swift // TestAirSpyHF // // Created by Jacky Jack on 01/11/2024. // import Foundation import libairspyhf print("Version \(software_version)") var libersion:airspyhf_lib_version_t = airspyhf_lib_version_t() airspyhf_lib_version(&libersion) 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)") }