module LibBladeRF.Gpio ( bladeRFConfigGPIORead
, bladeRFConfigGPIOWrite
) where
import Foreign
import Foreign.C.Types
import Foreign.C.String
import Bindings.LibBladeRF
import LibBladeRF.LibBladeRF
import LibBladeRF.Types
bladeRFConfigGPIORead :: DeviceHandle
-> IO Word32
bladeRFConfigGPIORead dev = do
pv <- malloc :: IO (Ptr Word32)
c'bladerf_config_gpio_read (unDeviceHandle dev) pv
v <- peek pv
free pv
return v
bladeRFConfigGPIOWrite :: DeviceHandle
-> Word32
-> IO ()
bladeRFConfigGPIOWrite dev v = do
c'bladerf_config_gpio_write (unDeviceHandle dev) v
return ()