summaryrefslogtreecommitdiff
path: root/Radio/HW/RtlSdr/r820/r820.swift
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2024-11-29 11:28:01 +0000
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2024-11-29 11:28:01 +0000
commit23fc08c8798d7c325a72fbee4175813efe4fe70f (patch)
tree0521f11441d267e60f7b9aa574c0defd43148b45 /Radio/HW/RtlSdr/r820/r820.swift
parent77d1cfc27fb72e442b8d8e5cbe2be143723724e5 (diff)
downloadPrySDR-23fc08c8798d7c325a72fbee4175813efe4fe70f.tar.gz
PrySDR-23fc08c8798d7c325a72fbee4175813efe4fe70f.zip
RtlSdrIQ: can read samples from rtlsdr and dump those to file
Diffstat (limited to 'Radio/HW/RtlSdr/r820/r820.swift')
-rw-r--r--Radio/HW/RtlSdr/r820/r820.swift9
1 files changed, 7 insertions, 2 deletions
diff --git a/Radio/HW/RtlSdr/r820/r820.swift b/Radio/HW/RtlSdr/r820/r820.swift
index 3f6d4a9..4c8859f 100644
--- a/Radio/HW/RtlSdr/r820/r820.swift
+++ b/Radio/HW/RtlSdr/r820/r820.swift
@@ -189,8 +189,13 @@ public class R820Tuner {
/// - len: input buffer length
/// - n_read: number of bytes received
/// - Returns: -1 if there is no device, 0 on success or one of LIBUSB error
- /// LIBUSB_ERROR_TIMEOUT, LIBUSB_ERROR_PIPE,LIBUSB_ERROR_OVERFLOW
- /// LIBUSB_ERROR_NO_DEVICE, LIBUSB_ERROR_BUSY LIBUSB_ERROR_INVALID_PARAM
+ /// on success, the number of bytes actually transferred
+ /// LIBUSB_ERROR_TIMEOUT if the transfer timed out
+ /// LIBUSB_ERROR_PIPE if the control request was not supported by the device
+ /// LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
+ /// LIBUSB_ERROR_BUSY if called from event handling context
+ /// LIBUSB_ERROR_INVALID_PARAM if the transfer size is larger than the operating system and/or hardware can support (see Transfer length limitations)
+ /// another LIBUSB_ERROR code on other failures
///
func readSync(buf:UnsafeMutableRawPointer?,len: Int32,n_read:UnsafeMutablePointer<Int32>?) -> Int32 {
return rtlsdr_read_sync(dev, buf, len, n_read);