blob: 8f048db75fac4717c7a1676cd656c98864564347 (
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
27
28
|
//
// 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)")
|