diff options
author | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2022-03-12 17:48:54 +0000 |
---|---|---|
committer | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2022-03-12 17:48:54 +0000 |
commit | ec61b3e0e6084950eb4d5c95f83e442a01765a35 (patch) | |
tree | f9dee1721080ce33bf5452cc2f82deeafb047cc7 /r820sdr/main.swift | |
parent | 4274248ca037308315f38ec77e66fddd8eae1395 (diff) | |
download | r820sdr-init-ec61b3e0e6084950eb4d5c95f83e442a01765a35.tar.gz r820sdr-init-ec61b3e0e6084950eb4d5c95f83e442a01765a35.zip |
Working project
Diffstat (limited to 'r820sdr/main.swift')
-rw-r--r-- | r820sdr/main.swift | 17 |
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)") |