summaryrefslogtreecommitdiff
path: root/r820sdr/main.swift
blob: 8b122ee1c99d75eaec3bd2f1bc6a753868623d18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//
//  main.swift
//  r820sdr
//
//  Created by Jacky Jack on 10/03/2022.
//

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)")