From ec61b3e0e6084950eb4d5c95f83e442a01765a35 Mon Sep 17 00:00:00 2001 From: Arturs Artamonovs Date: Sat, 12 Mar 2022 17:48:54 +0000 Subject: Working project --- r820sdr/main.swift | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'r820sdr/main.swift') diff --git a/r820sdr/main.swift b/r820sdr/main.swift index 3cb4a16..8f048db 100644 --- a/r820sdr/main.swift +++ b/r820sdr/main.swift @@ -7,5 +7,22 @@ import Foundation + + + print("Hello, World!") +//var dev:UnsafePointer = 0 +var devPtr: UnsafePointer +var dev:OpaquePointer? +let count = rtlsdr_get_device_count() + +if count <= 0 { + print("All gona blow up there is no dongles") +} + +rtlsdr_open(&dev, 0) + +rtlsdr_close(dev) + +print("Number of devices \(count)") -- cgit v1.2.3