libbladeRF  1.7.2
Nuand bladeRF library
Enumerations | Functions
RX & TX module control

Description

The RX and TX modules are independently configurable. As such, many libbladeRF functions require a bladerf_module parameter to specify which module to operate on.

These functions are thread-safe.

Enumerations

enum  bladerf_module { BLADERF_MODULE_INVALID = -1, BLADERF_MODULE_RX, BLADERF_MODULE_TX }
 

Functions

API_EXPORT int CALL_CONV bladerf_enable_module (struct bladerf *dev, bladerf_module m, bool enable)
 

Enumeration Type Documentation

Module selection for those which have both RX and TX constituents

Enumerator
BLADERF_MODULE_INVALID 

Invalid module entry

BLADERF_MODULE_RX 

Receive Module

BLADERF_MODULE_TX 

Transmit Module

Definition at line 481 of file libbladeRF.h.

Function Documentation

API_EXPORT int CALL_CONV bladerf_enable_module ( struct bladerf *  dev,
bladerf_module  m,
bool  enable 
)

Enable or disable the specified RX/TX module.

RX and TX modules must always be enabled prior to streaming samples on the associated interface.

When a synchronous stream is associated with the specified module, this will shut down the underlying asynchronous stream when enable = false.

When transmitting samples, be sure to provide ample time for TX samples reach the RF front-end before calling this function with enable = false. (This can be achieved easily when using metadata, as shown on this page.)

Parameters
devDevice handle
mDevice module
enabletrue to enable, false to disable
Returns
0 on success, value from Error codes list on failure