summaryrefslogtreecommitdiff
path: root/r820sdr/main.swift
diff options
context:
space:
mode:
Diffstat (limited to 'r820sdr/main.swift')
-rw-r--r--r820sdr/main.swift17
1 files changed, 17 insertions, 0 deletions
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<rtlsdr_dev> = 0
+var devPtr: UnsafePointer<OpaquePointer?>
+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)")