libbladeRF: RF Integrated Circuit

| libbladeRF 2.2.1-git Nuand bladeRF library

Enumerations | Macros | Functions
RF Integrated Circuit
bladeRF2-specific API » Low-level accessors

## Description

## Enumerations
enum | bladerf_rfic_rxfir { BLADERF_RFIC_RXFIR_BYPASS = 0, BLADERF_RFIC_RXFIR_CUSTOM, BLADERF_RFIC_RXFIR_DEC1, BLADERF_RFIC_RXFIR_DEC2, BLADERF_RFIC_RXFIR_DEC4 }
enum | bladerf_rfic_txfir { BLADERF_RFIC_TXFIR_BYPASS = 0, BLADERF_RFIC_TXFIR_CUSTOM, BLADERF_RFIC_TXFIR_INT1, BLADERF_RFIC_TXFIR_INT2, BLADERF_RFIC_TXFIR_INT4 }

## Macros
#define | BLADERF_RFIC_RXFIR_DEFAULT BLADERF_RFIC_RXFIR_DEC1
#define | BLADERF_RFIC_TXFIR_DEFAULT BLADERF_RFIC_TXFIR_BYPASS

## Functions
API_EXPORT int CALL_CONV | bladerf_get_rfic_register (struct bladerf *dev, uint16_t address, uint8_t *val)
API_EXPORT int CALL_CONV | bladerf_set_rfic_register (struct bladerf *dev, uint16_t address, uint8_t val)
API_EXPORT int CALL_CONV | bladerf_get_rfic_temperature (struct bladerf *dev, float *val)
API_EXPORT int CALL_CONV | bladerf_get_rfic_rssi (struct bladerf *dev, bladerf_channel ch, int32_t *pre_rssi, int32_t *sym_rssi)
API_EXPORT int CALL_CONV | bladerf_get_rfic_ctrl_out (struct bladerf *dev, uint8_t *ctrl_out)
API_EXPORT int CALL_CONV | bladerf_get_rfic_rx_fir (struct bladerf *dev, bladerf_rfic_rxfir *rxfir)
API_EXPORT int CALL_CONV | bladerf_set_rfic_rx_fir (struct bladerf *dev, bladerf_rfic_rxfir rxfir)
API_EXPORT int CALL_CONV | bladerf_get_rfic_tx_fir (struct bladerf *dev, bladerf_rfic_txfir *txfir)
API_EXPORT int CALL_CONV | bladerf_set_rfic_tx_fir (struct bladerf *dev, bladerf_rfic_txfir txfir)

## Enumeration Type Documentation

## ◆ bladerf_rfic_rxfir

enum bladerf_rfic_rxfir

RFIC RX FIR filter choices

Enumerator
BLADERF_RFIC_RXFIR_BYPASS | No filter
BLADERF_RFIC_RXFIR_CUSTOM | Custom FIR filter (currently unused)
BLADERF_RFIC_RXFIR_DEC1 | Decimate by 1 (default)
BLADERF_RFIC_RXFIR_DEC2 | Decimate by 2
BLADERF_RFIC_RXFIR_DEC4 | Decimate by 4

Definition at line 173 of file bladeRF2.h.

## ◆ bladerf_rfic_txfir

enum bladerf_rfic_txfir

RFIC TX FIR filter choices

Enumerator
BLADERF_RFIC_TXFIR_BYPASS | No filter (default)
BLADERF_RFIC_TXFIR_CUSTOM | Custom FIR filter (currently unused)
BLADERF_RFIC_TXFIR_INT1 | Interpolate by 1
BLADERF_RFIC_TXFIR_INT2 | Interpolate by 2
BLADERF_RFIC_TXFIR_INT4 | Interpolate by 4

Definition at line 187 of file bladeRF2.h.

## Macro Definition Documentation

## ◆ BLADERF_RFIC_RXFIR_DEFAULT

#define BLADERF_RFIC_RXFIR_DEFAULT BLADERF_RFIC_RXFIR_DEC1

Default RFIC RX FIR filter

Definition at line 182 of file bladeRF2.h.

## ◆ BLADERF_RFIC_TXFIR_DEFAULT

#define BLADERF_RFIC_TXFIR_DEFAULT BLADERF_RFIC_TXFIR_BYPASS

Default RFIC TX FIR filter

Definition at line 196 of file bladeRF2.h.

## Function Documentation

## ◆ bladerf_get_rfic_ctrl_out()

API_EXPORT int CALL_CONV bladerf_get_rfic_ctrl_out | ( | struct bladerf * | dev,
|  | uint8_t * | ctrl_out
| ) |  |

Read the CTRL_OUT pins from the RFIC

Note
  See AD9361 Reference Manual UG-570's "Control Output" chapter for complete information about this feature.

See also
  bladerf_set_rfic_register()

Parameters

  | dev | Device handle
  [out] | ctrl_out | Pointer for storing the retrieved value

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

## ◆ bladerf_get_rfic_register()

API_EXPORT int CALL_CONV bladerf_get_rfic_register | ( | struct bladerf * | dev,
|  | uint16_t | address,
|  | uint8_t * | val
| ) |  |

Read a RFIC register

Parameters

  | dev | Device handle
  [in] | address | Register address
  [out] | val | Register value

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

## ◆ bladerf_get_rfic_rssi()

API_EXPORT int CALL_CONV bladerf_get_rfic_rssi | ( | struct bladerf * | dev,
|  | bladerf_channel | ch,
|  | int32_t * | pre_rssi,
|  | int32_t * | sym_rssi
| ) |  |

Read the RSSI for the selected channel from the RFIC

Note
  This is a relative value, not an absolute value. If an absolute value (e.g. in dBm) is desired, a calibration should be performed against a reference signal.
  See `fpga_common/src/ad936x_params.c` for the RSSI control parameters.

Reference: AD9361 Reference Manual UG-570

Parameters

  | dev | Device handle
  | ch | Channel to query
  [out] | pre_rssi | Preamble RSSI in dB (first calculated RSSI result)
  [out] | sym_rssi | Symbol RSSI in dB (most recent RSSI result)

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

## ◆ bladerf_get_rfic_rx_fir()

API_EXPORT int CALL_CONV bladerf_get_rfic_rx_fir | ( | struct bladerf * | dev,
|  | bladerf_rfic_rxfir * | rxfir
| ) |  |

Get the current status of the RX FIR filter on the RFIC.

Parameters

  dev | Device handle
  rxfir | RX FIR selection

Note
  See `fpga_common/src/ad936x_params.c` for FIR parameters.

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

## ◆ bladerf_get_rfic_temperature()

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

Read the temperature from the RFIC

Parameters

  | dev | Device handle
  [out] | val | Temperature in degrees C

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

## ◆ bladerf_get_rfic_tx_fir()

API_EXPORT int CALL_CONV bladerf_get_rfic_tx_fir | ( | struct bladerf * | dev,
|  | bladerf_rfic_txfir * | txfir
| ) |  |

Get the current status of the TX FIR filter on the RFIC.

Parameters

  dev | Device handle
  txfir | TX FIR selection

Note
  See `fpga_common/src/ad936x_params.c` for FIR parameters.

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

## ◆ bladerf_set_rfic_register()

API_EXPORT int CALL_CONV bladerf_set_rfic_register | ( | struct bladerf * | dev,
|  | uint16_t | address,
|  | uint8_t | val
| ) |  |

Write a RFIC register

Parameters

  | dev | Device handle
  [in] | address | Register address
  [in] | val | Value to write to register

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

## ◆ bladerf_set_rfic_rx_fir()

API_EXPORT int CALL_CONV bladerf_set_rfic_rx_fir | ( | struct bladerf * | dev,
|  | bladerf_rfic_rxfir | rxfir
| ) |  |

Set the RX FIR filter on the RFIC.

Parameters

  dev | Device handle
  rxfir | RX FIR selection

Note
  See `fpga_common/src/ad936x_params.c` for FIR parameters.

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

## ◆ bladerf_set_rfic_tx_fir()

API_EXPORT int CALL_CONV bladerf_set_rfic_tx_fir | ( | struct bladerf * | dev,
|  | bladerf_rfic_txfir | txfir
| ) |  |

Set the TX FIR filter on the RFIC.

Parameters

  dev | Device handle
  txfir | TX FIR selection

Note
  See `fpga_common/src/ad936x_params.c` for FIR parameters.

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