summaryrefslogtreecommitdiff
path: root/r820sdr
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2022-03-12 17:48:54 +0000
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2022-03-12 17:48:54 +0000
commitec61b3e0e6084950eb4d5c95f83e442a01765a35 (patch)
treef9dee1721080ce33bf5452cc2f82deeafb047cc7 /r820sdr
parent4274248ca037308315f38ec77e66fddd8eae1395 (diff)
downloadr820sdr-init-ec61b3e0e6084950eb4d5c95f83e442a01765a35.tar.gz
r820sdr-init-ec61b3e0e6084950eb4d5c95f83e442a01765a35.zip
Working project
Diffstat (limited to 'r820sdr')
-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)")