| libbladeRF 2.6.0-git-fcf94233-dirty Nuand bladeRF library

Loading...
Searching...
No Matches
Enumerations | Functions
Expansion board support
bladeRF1-specific API

## Description

This group of functions provides the ability to control and configure expansion boards such as the XB-100, XB-200, and XB-300.

These functions are thread-safe.

## Enumerations
enum | bladerf_xb200_filter { BLADERF_XB200_50M = 0 , BLADERF_XB200_144M , BLADERF_XB200_222M , BLADERF_XB200_CUSTOM , BLADERF_XB200_AUTO_1DB , BLADERF_XB200_AUTO_3DB }
enum | bladerf_xb200_path { BLADERF_XB200_BYPASS = 0 , BLADERF_XB200_MIX }
enum | bladerf_xb300_trx { BLADERF_XB300_TRX_INVAL = -1 , BLADERF_XB300_TRX_TX = 0 , BLADERF_XB300_TRX_RX , BLADERF_XB300_TRX_UNSET }
enum | bladerf_xb300_amplifier { BLADERF_XB300_AMP_INVAL = -1 , BLADERF_XB300_AMP_PA = 0 , BLADERF_XB300_AMP_LNA , BLADERF_XB300_AMP_PA_AUX }

## Functions
API_EXPORT int CALL_CONV | bladerf_xb200_set_filterbank (struct bladerf *dev, bladerf_channel ch, bladerf_xb200_filter filter)
API_EXPORT int CALL_CONV | bladerf_xb200_get_filterbank (struct bladerf *dev, bladerf_channel ch, bladerf_xb200_filter *filter)
API_EXPORT int CALL_CONV | bladerf_xb200_set_path (struct bladerf *dev, bladerf_channel ch, bladerf_xb200_path path)
API_EXPORT int CALL_CONV | bladerf_xb200_get_path (struct bladerf *dev, bladerf_channel ch, bladerf_xb200_path *path)
API_EXPORT int CALL_CONV | bladerf_xb300_set_trx (struct bladerf *dev, bladerf_xb300_trx trx)
API_EXPORT int CALL_CONV | bladerf_xb300_get_trx (struct bladerf *dev, bladerf_xb300_trx *trx)
API_EXPORT int CALL_CONV | bladerf_xb300_set_amplifier_enable (struct bladerf *dev, bladerf_xb300_amplifier amp, bool enable)
API_EXPORT int CALL_CONV | bladerf_xb300_get_amplifier_enable (struct bladerf *dev, bladerf_xb300_amplifier amp, bool *enable)
API_EXPORT int CALL_CONV | bladerf_xb300_get_output_power (struct bladerf *dev, float *val)

## Enumeration Type Documentation

## ◆ bladerf_xb200_filter

enum bladerf_xb200_filter

XB-200 filter selection options

Enumerator
BLADERF_XB200_50M | 50-54 MHz (6 meter band) filterbank
BLADERF_XB200_144M | 144-148 MHz (2 meter band) filterbank
BLADERF_XB200_222M | 222-225 MHz (1.25 meter band) filterbank. Note that this filter option is technically wider, covering 206-235 MHz.
BLADERF_XB200_CUSTOM | This option enables the RX/TX channel's custom filter bank path across the associated FILT and FILT-ANT SMA connectors on the XB-200 board. For reception, it is often possible to simply connect the RXFILT and RXFILT-ANT connectors with an SMA cable (effectively, "no filter"). This allows for reception of signals outside of the frequency range of the on-board filters, with some potential trade-off in signal quality. For transmission, always use an appropriate filter on the custom filter path to avoid spurious emissions.
BLADERF_XB200_AUTO_1DB | When this option is selected, the other filter options are automatically selected depending on the RX or TX channel's current frequency, based upon the 1dB points of the on-board filters. For frequencies outside the range of the on-board filters, the custom path is selected.
BLADERF_XB200_AUTO_3DB | When this option is selected, the other filter options are automatically selected depending on the RX or TX channel's current frequency, based upon the 3dB points of the on-board filters. For frequencies outside the range of the on-board filters, the custom path is selected.

Definition at line 1050 of file bladeRF1.h.

## ◆ bladerf_xb200_path

enum bladerf_xb200_path

XB-200 signal paths

Enumerator
BLADERF_XB200_BYPASS | Bypass the XB-200 mixer
BLADERF_XB200_MIX | Pass signals through the XB-200 mixer

Definition at line 1099 of file bladeRF1.h.

## ◆ bladerf_xb300_amplifier

enum bladerf_xb300_amplifier

XB-300 Amplifier selection

Enumerator
BLADERF_XB300_AMP_INVAL | Invalid amplifier selection
BLADERF_XB300_AMP_PA | TX Power amplifier
BLADERF_XB300_AMP_LNA | RX LNA
BLADERF_XB300_AMP_PA_AUX | Auxillary Power amplifier

Definition at line 1117 of file bladeRF1.h.

## ◆ bladerf_xb300_trx

enum bladerf_xb300_trx

XB-300 TRX setting

Enumerator
BLADERF_XB300_TRX_INVAL | Invalid TRX selection
BLADERF_XB300_TRX_TX | TRX antenna operates as TX
BLADERF_XB300_TRX_RX | TRX antenna operates as RX
BLADERF_XB300_TRX_UNSET | TRX antenna unset

Definition at line 1107 of file bladeRF1.h.

## Function Documentation

## ◆ bladerf_xb200_get_filterbank()

API_EXPORT int CALL_CONV bladerf_xb200_get_filterbank | ( | struct bladerf * | dev,
|  | bladerf_channel | ch,
|  | bladerf_xb200_filter * | filter )

Get current XB-200 filterbank

Parameters

  | dev | Device handle
  [in] | ch | Channel
  [out] | filter | Pointer to filterbank, only updated if return value is 0.

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb200_get_path()

API_EXPORT int CALL_CONV bladerf_xb200_get_path | ( | struct bladerf * | dev,
|  | bladerf_channel | ch,
|  | bladerf_xb200_path * | path )

Get current XB-200 signal path

Parameters

  | dev | Device handle
  [in] | ch | Channel
  [out] | path | Pointer to XB200 signal path

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb200_set_filterbank()

API_EXPORT int CALL_CONV bladerf_xb200_set_filterbank | ( | struct bladerf * | dev,
|  | bladerf_channel | ch,
|  | bladerf_xb200_filter | filter )

Set XB-200 filterbank

Parameters

  | dev | Device handle
  [in] | ch | Channel
  [in] | filter | XB200 filterbank

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb200_set_path()

API_EXPORT int CALL_CONV bladerf_xb200_set_path | ( | struct bladerf * | dev,
|  | bladerf_channel | ch,
|  | bladerf_xb200_path | path )

Set XB-200 signal path

Parameters

  | dev | Device handle
  [in] | ch | Channel
  [in] | path | Desired XB-200 signal path

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb300_get_amplifier_enable()

API_EXPORT int CALL_CONV bladerf_xb300_get_amplifier_enable | ( | struct bladerf * | dev,
|  | bladerf_xb300_amplifier | amp,
|  | bool * | enable )

Get state of selected XB-300 amplifier

Parameters

  | dev | Device handle
  [in] | amp | XB-300 amplifier
  [out] | enable | Set true to enable or false to disable

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb300_get_output_power()

API_EXPORT int CALL_CONV bladerf_xb300_get_output_power | ( | struct bladerf * | dev,
|  | float * | val )

Get current PA PDET output power in dBm

Parameters

  | dev | Device handle
  [out] | val | Output power in dBm

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb300_get_trx()

API_EXPORT int CALL_CONV bladerf_xb300_get_trx | ( | struct bladerf * | dev,
|  | bladerf_xb300_trx * | trx )

Get the current XB-300 signal path

Parameters

  | dev | Device handle
  [out] | trx | XB300 TRX antenna setting

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb300_set_amplifier_enable()

API_EXPORT int CALL_CONV bladerf_xb300_set_amplifier_enable | ( | struct bladerf * | dev,
|  | bladerf_xb300_amplifier | amp,
|  | bool | enable )

Enable or disable selected XB-300 amplifier

Parameters

  | dev | Device handle
  [in] | amp | XB-300 amplifier
  [in] | enable | Set true to enable or false to disable

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_xb300_set_trx()

API_EXPORT int CALL_CONV bladerf_xb300_set_trx | ( | struct bladerf * | dev,
|  | bladerf_xb300_trx | trx )

Configure the XB-300 TRX path

Parameters

  | dev | Device handle
  [in] | trx | Desired XB-300 TRX setting

Returns
  0 on success, BLADERF_ERR_* on failure