-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings to librtlsdr -- -- Bindings to librtlsdr. Turns your Realtek RTL2832 based DVB dongle -- into a SDR receiver. -- -- For more information see: -- http://sdr.osmocom.org/trac/wiki/rtl-sdr -- -- This library is a straightforward wrapper around the C library -- functions. See the C library documentation: -- https://github.com/steve-m/librtlsdr/blob/master/include/rtl-sdr.h @package rtlsdr @version 0.1.0.4 -- | This library is a straightforward wrapper around the C library -- functions. See the C library documentation: -- https://github.com/steve-m/librtlsdr/blob/master/include/rtl-sdr.h -- -- Example usage: -- --
--   import Data.List
--   import Foreign.Marshal.Array
--   import RTLSDR
--   
--   bufSize    = 16384
--   sampleRate = 1280000
--   frequency  = 90200000
--   
--   main = do
--       dev <- open 0
--       case dev of
--           Nothing -> putStrLn "Error opening device"
--           Just dev -> do
--               setSampleRate    dev sampleRate
--               setCenterFreq    dev frequency
--               setTunerGainMode dev False
--               resetBuffer      dev
--               allocaArray bufSize $ \ptr -> do
--                   res <- readSync dev ptr bufSize
--                   case res of 
--                       False -> putStrLn "Error reading from device"
--                       True  -> do
--                           res <- peekArray bufSize ptr
--                           putStrLn $ intercalate " " $ map show res
--   
module RTLSDR getDeviceCount :: IO Word32 getDeviceName :: Word32 -> IO String getDeviceUSBString :: Word32 -> IO (Maybe (String, String, String)) data GIBSError [NameNull] :: GIBSError [NoDevices] :: GIBSError [NoMatching] :: GIBSError getIndexBySerial :: String -> IO (Either GIBSError Int) data RTLSDR open :: Word32 -> IO (Maybe RTLSDR) close :: RTLSDR -> IO () setXtalFreq :: RTLSDR -> Word32 -> Word32 -> IO Bool getXtalFreq :: RTLSDR -> IO (Maybe (Word32, Word32)) getUSBStrings :: RTLSDR -> IO (Maybe (String, String, String)) data EEPROMError [InvalidHandle] :: EEPROMError [SizeExceeded] :: EEPROMError [NoEEPROM] :: EEPROMError writeEEPROM :: RTLSDR -> [Word8] -> Int -> IO (Maybe EEPROMError) readEEPROM :: RTLSDR -> Int -> Int -> IO (Either EEPROMError [Word8]) setCenterFreq :: RTLSDR -> Word32 -> IO Bool getCenterFreq :: RTLSDR -> IO (Maybe Word32) setFreqCorrection :: RTLSDR -> Int32 -> IO Bool getFreqCorrection :: RTLSDR -> IO Int32 data Tuner [RtlsdrTunerUnknown] :: Tuner [RtlsdrTunerE4000] :: Tuner [RtlsdrTunerFc0012] :: Tuner [RtlsdrTunerFc0013] :: Tuner [RtlsdrTunerFc2580] :: Tuner [RtlsdrTunerR820t] :: Tuner [RtlsdrTunerR828d] :: Tuner getTunerType :: RTLSDR -> IO Tuner getTunerGains :: RTLSDR -> IO (Maybe [Int]) setTunerGain :: RTLSDR -> Int32 -> IO Bool getTunerGain :: RTLSDR -> IO (Maybe Int32) setTunerIFGain :: RTLSDR -> Int -> Int -> IO Bool setTunerGainMode :: RTLSDR -> Bool -> IO Bool setSampleRate :: RTLSDR -> Word32 -> IO Bool getSampleRate :: RTLSDR -> IO (Maybe Word32) setTestMode :: RTLSDR -> Bool -> IO Bool setAGCMode :: RTLSDR -> Bool -> IO Bool data DirectSamplingMode [DSDisabled] :: DirectSamplingMode [DSI] :: DirectSamplingMode [DSQ] :: DirectSamplingMode setDirectSampling :: RTLSDR -> DirectSamplingMode -> IO Bool getDirectSampling :: RTLSDR -> IO (Maybe DirectSamplingMode) setOffsetTuning :: RTLSDR -> Bool -> IO Bool getOffsetTuning :: RTLSDR -> IO (Maybe Bool) resetBuffer :: RTLSDR -> IO Int readSync :: RTLSDR -> Ptr CUChar -> Int -> IO Bool type ReadCallback = Ptr CUChar -> Word32 -> Ptr CInt -> IO () readAsync :: RTLSDR -> Word32 -> Word32 -> (Ptr CUChar -> Int -> IO ()) -> IO Bool cancelAsync :: RTLSDR -> IO Bool instance Eq DirectSamplingMode instance Show DirectSamplingMode instance Enum DirectSamplingMode instance Eq Tuner instance Show Tuner instance Show EEPROMError instance Show GIBSError instance Enum Tuner