Portability | portable |
---|---|
Stability | provisional |
Maintainer | eocallaghan@alterapraxis.com |
Safe Haskell | None |
This module encapsulates the foundational libbladeRF functions commonly used into a Monadic style. This Monadic style avoids passing around references of indirection to the device type and so on.
- withBladeRF :: (DeviceHandle -> IO a) -> IO ()
- newtype DeviceHandle = DeviceHandle {
- unDeviceHandle :: Ptr C'bladerf
- data BladeRFError
- = BLADERF_ERR_UNEXPECTED
- | BLADERF_ERR_RANGE
- | BLADERF_ERR_INVAL
- | BLADERF_ERR_MEM
- | BLADERF_ERR_IO
- | BLADERF_ERR_TIMEOUT
- | BLADERF_ERR_NODEV
- | BLADERF_ERR_UNSUPPORTED
- | BLADERF_ERR_MISALIGNED
- | BLADERF_ERR_CHECKSUM
- | BLADERF_ERR_NO_FILE
- | BLADERF_ERR_UPDATE_FPGA
- | BLADERF_ERR_UPDATE_FW
- | BLADERF_ERR_TIME_PAST
Documentation
withBladeRF :: (DeviceHandle -> IO a) -> IO ()
Essential wrapper
newtype DeviceHandle
DeviceHandle wrapper around C device descriptor pointer
DeviceHandle | |
|
data BladeRFError
Error codes returned by internal libbladeRF functions.
BLADERF_ERR_UNEXPECTED | An unexpected failure occurred |
BLADERF_ERR_RANGE | Provided parameter is out of range |
BLADERF_ERR_INVAL | Invalid operation/parameter |
BLADERF_ERR_MEM | Memory allocation error |
BLADERF_ERR_IO | FileDevice IO error |
BLADERF_ERR_TIMEOUT | Operation timed out |
BLADERF_ERR_NODEV | No device(s) available |
BLADERF_ERR_UNSUPPORTED | Operation not supported |
BLADERF_ERR_MISALIGNED | Misaligned flash access |
BLADERF_ERR_CHECKSUM | Invalid checksum |
BLADERF_ERR_NO_FILE | File not found |
BLADERF_ERR_UPDATE_FPGA | An FPGA update is required |
BLADERF_ERR_UPDATE_FW | A firmware update is requied |
BLADERF_ERR_TIME_PAST | Requested timestamp is in the past |