Loading...
Searching...
No Matches
bladeRF2.h
Go to the documentation of this file.
#ifndef BLADERF2_H_
#define BLADERF2_H_
API_EXPORT
int CALL_CONV bladerf_get_bias_tee(struct bladerf *dev,
bladerf_channel ch,
bool *enable);
API_EXPORT
int CALL_CONV bladerf_set_bias_tee(struct bladerf *dev,
bladerf_channel ch,
bool enable);
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);
typedef enum {
BLADERF_RFIC_RXFIR_BYPASS = 0,
BLADERF_RFIC_RXFIR_CUSTOM,
BLADERF_RFIC_RXFIR_DEC1,
BLADERF_RFIC_RXFIR_DEC2,
BLADERF_RFIC_RXFIR_DEC4,
} bladerf_rfic_rxfir;
#define BLADERF_RFIC_RXFIR_DEFAULT BLADERF_RFIC_RXFIR_DEC1
typedef enum {
BLADERF_RFIC_TXFIR_BYPASS = 0,
BLADERF_RFIC_TXFIR_CUSTOM,
BLADERF_RFIC_TXFIR_INT1,
BLADERF_RFIC_TXFIR_INT2,
BLADERF_RFIC_TXFIR_INT4,
} bladerf_rfic_txfir;
#define BLADERF_RFIC_TXFIR_DEFAULT BLADERF_RFIC_TXFIR_BYPASS
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);
API_EXPORT
int CALL_CONV bladerf_get_pll_lock_state(struct bladerf *dev, bool *locked);
API_EXPORT
int CALL_CONV bladerf_get_pll_enable(struct bladerf *dev, bool *enabled);
API_EXPORT
int CALL_CONV bladerf_set_pll_enable(struct bladerf *dev, bool enable);
API_EXPORT
int CALL_CONV bladerf_get_pll_refclk_range(struct bladerf *dev,
const struct bladerf_range **range);
API_EXPORT
int CALL_CONV bladerf_get_pll_refclk(struct bladerf *dev, uint64_t *frequency);
API_EXPORT
int CALL_CONV bladerf_set_pll_refclk(struct bladerf *dev, uint64_t frequency);
API_EXPORT
int CALL_CONV bladerf_get_pll_register(struct bladerf *dev,
uint8_t address,
uint32_t *val);
API_EXPORT
int CALL_CONV bladerf_set_pll_register(struct bladerf *dev,
uint8_t address,
uint32_t val);
typedef enum {
BLADERF_UNKNOWN,
BLADERF_PS_DC,
BLADERF_PS_USB_VBUS
} bladerf_power_sources;
API_EXPORT
int CALL_CONV bladerf_get_power_source(struct bladerf *dev,
bladerf_power_sources *val);
typedef enum {
CLOCK_SELECT_ONBOARD,
CLOCK_SELECT_EXTERNAL
} bladerf_clock_select;
API_EXPORT
int CALL_CONV bladerf_get_clock_select(struct bladerf *dev,
bladerf_clock_select *sel);
API_EXPORT
int CALL_CONV bladerf_set_clock_select(struct bladerf *dev,
bladerf_clock_select sel);
API_EXPORT
int CALL_CONV bladerf_get_clock_output(struct bladerf *dev, bool *state);
API_EXPORT
int CALL_CONV bladerf_set_clock_output(struct bladerf *dev, bool enable);
typedef enum {
BLADERF_PMIC_CONFIGURATION,
BLADERF_PMIC_VOLTAGE_SHUNT,
BLADERF_PMIC_VOLTAGE_BUS,
BLADERF_PMIC_POWER,
BLADERF_PMIC_CURRENT,
BLADERF_PMIC_CALIBRATION,
} bladerf_pmic_register;
API_EXPORT
int CALL_CONV bladerf_get_pmic_register(struct bladerf *dev,
bladerf_pmic_register reg,
void *val);
typedef struct {
uint32_t tx1_rfic_port;
uint32_t tx1_spdt_port;
uint32_t tx2_rfic_port;
uint32_t tx2_spdt_port;
uint32_t rx1_rfic_port;
uint32_t rx1_spdt_port;
uint32_t rx2_rfic_port;
uint32_t rx2_spdt_port;
} bladerf_rf_switch_config;
API_EXPORT
int CALL_CONV bladerf_get_rf_switch_config(struct bladerf *dev,
bladerf_rf_switch_config *config);
#endif /* BLADERF2_H_ */
bladerf_get_bias_tee
API_EXPORT int CALL_CONV bladerf_get_bias_tee(struct bladerf *dev, bladerf_channel ch, bool *enable)
bladerf_set_bias_tee
API_EXPORT int CALL_CONV bladerf_set_bias_tee(struct bladerf *dev, bladerf_channel ch, bool enable)
bladerf_set_clock_output
API_EXPORT int CALL_CONV bladerf_set_clock_output(struct bladerf *dev, bool enable)
bladerf_get_clock_output
API_EXPORT int CALL_CONV bladerf_get_clock_output(struct bladerf *dev, bool *state)
bladerf_set_clock_select
API_EXPORT int CALL_CONV bladerf_set_clock_select(struct bladerf *dev, bladerf_clock_select sel)
bladerf_get_clock_select
API_EXPORT int CALL_CONV bladerf_get_clock_select(struct bladerf *dev, bladerf_clock_select *sel)
bladerf_clock_select
bladerf_clock_select
Definition bladeRF2.h:417
CLOCK_SELECT_EXTERNAL
@ CLOCK_SELECT_EXTERNAL
Definition bladeRF2.h:419
CLOCK_SELECT_ONBOARD
@ CLOCK_SELECT_ONBOARD
Definition bladeRF2.h:418
bladerf_set_pll_refclk
API_EXPORT int CALL_CONV bladerf_set_pll_refclk(struct bladerf *dev, uint64_t frequency)
bladerf_set_pll_enable
API_EXPORT int CALL_CONV bladerf_set_pll_enable(struct bladerf *dev, bool enable)
bladerf_get_pll_register
API_EXPORT int CALL_CONV bladerf_get_pll_register(struct bladerf *dev, uint8_t address, uint32_t *val)
bladerf_get_pll_enable
API_EXPORT int CALL_CONV bladerf_get_pll_enable(struct bladerf *dev, bool *enabled)
bladerf_set_pll_register
API_EXPORT int CALL_CONV bladerf_set_pll_register(struct bladerf *dev, uint8_t address, uint32_t val)
bladerf_get_pll_refclk_range
API_EXPORT int CALL_CONV bladerf_get_pll_refclk_range(struct bladerf *dev, const struct bladerf_range **range)
bladerf_get_pll_lock_state
API_EXPORT int CALL_CONV bladerf_get_pll_lock_state(struct bladerf *dev, bool *locked)
bladerf_get_pll_refclk
API_EXPORT int CALL_CONV bladerf_get_pll_refclk(struct bladerf *dev, uint64_t *frequency)
bladerf_get_pmic_register
API_EXPORT int CALL_CONV bladerf_get_pmic_register(struct bladerf *dev, bladerf_pmic_register reg, void *val)
bladerf_pmic_register
bladerf_pmic_register
Definition bladeRF2.h:493
BLADERF_PMIC_VOLTAGE_BUS
@ BLADERF_PMIC_VOLTAGE_BUS
Definition bladeRF2.h:496
BLADERF_PMIC_CALIBRATION
@ BLADERF_PMIC_CALIBRATION
Definition bladeRF2.h:499
BLADERF_PMIC_VOLTAGE_SHUNT
@ BLADERF_PMIC_VOLTAGE_SHUNT
Definition bladeRF2.h:495
BLADERF_PMIC_CONFIGURATION
@ BLADERF_PMIC_CONFIGURATION
Definition bladeRF2.h:494
BLADERF_PMIC_POWER
@ BLADERF_PMIC_POWER
Definition bladeRF2.h:497
BLADERF_PMIC_CURRENT
@ BLADERF_PMIC_CURRENT
Definition bladeRF2.h:498
bladerf_power_sources
bladerf_power_sources
Definition bladeRF2.h:380
bladerf_get_power_source
API_EXPORT int CALL_CONV bladerf_get_power_source(struct bladerf *dev, bladerf_power_sources *val)
BLADERF_PS_USB_VBUS
@ BLADERF_PS_USB_VBUS
Definition bladeRF2.h:383
BLADERF_UNKNOWN
@ BLADERF_UNKNOWN
Definition bladeRF2.h:381
BLADERF_PS_DC
@ BLADERF_PS_DC
Definition bladeRF2.h:382
bladerf_get_rf_switch_config
API_EXPORT int CALL_CONV bladerf_get_rf_switch_config(struct bladerf *dev, bladerf_rf_switch_config *config)
bladerf_get_rfic_rx_fir
API_EXPORT int CALL_CONV bladerf_get_rfic_rx_fir(struct bladerf *dev, bladerf_rfic_rxfir *rxfir)
bladerf_rfic_rxfir
bladerf_rfic_rxfir
Definition bladeRF2.h:173
bladerf_get_rfic_register
API_EXPORT int CALL_CONV bladerf_get_rfic_register(struct bladerf *dev, uint16_t address, uint8_t *val)
bladerf_set_rfic_register
API_EXPORT int CALL_CONV bladerf_set_rfic_register(struct bladerf *dev, uint16_t address, uint8_t val)
bladerf_set_rfic_tx_fir
API_EXPORT int CALL_CONV bladerf_set_rfic_tx_fir(struct bladerf *dev, bladerf_rfic_txfir txfir)
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)
bladerf_get_rfic_temperature
API_EXPORT int CALL_CONV bladerf_get_rfic_temperature(struct bladerf *dev, float *val)
bladerf_rfic_txfir
bladerf_rfic_txfir
Definition bladeRF2.h:187
bladerf_set_rfic_rx_fir
API_EXPORT int CALL_CONV bladerf_set_rfic_rx_fir(struct bladerf *dev, bladerf_rfic_rxfir rxfir)
bladerf_get_rfic_ctrl_out
API_EXPORT int CALL_CONV bladerf_get_rfic_ctrl_out(struct bladerf *dev, uint8_t *ctrl_out)
bladerf_get_rfic_tx_fir
API_EXPORT int CALL_CONV bladerf_get_rfic_tx_fir(struct bladerf *dev, bladerf_rfic_txfir *txfir)
BLADERF_RFIC_RXFIR_CUSTOM
@ BLADERF_RFIC_RXFIR_CUSTOM
Definition bladeRF2.h:175
BLADERF_RFIC_RXFIR_DEC4
@ BLADERF_RFIC_RXFIR_DEC4
Definition bladeRF2.h:178
BLADERF_RFIC_RXFIR_BYPASS
@ BLADERF_RFIC_RXFIR_BYPASS
Definition bladeRF2.h:174
BLADERF_RFIC_RXFIR_DEC2
@ BLADERF_RFIC_RXFIR_DEC2
Definition bladeRF2.h:177
BLADERF_RFIC_RXFIR_DEC1
@ BLADERF_RFIC_RXFIR_DEC1
Definition bladeRF2.h:176
BLADERF_RFIC_TXFIR_BYPASS
@ BLADERF_RFIC_TXFIR_BYPASS
Definition bladeRF2.h:188
BLADERF_RFIC_TXFIR_CUSTOM
@ BLADERF_RFIC_TXFIR_CUSTOM
Definition bladeRF2.h:189
BLADERF_RFIC_TXFIR_INT4
@ BLADERF_RFIC_TXFIR_INT4
Definition bladeRF2.h:192
BLADERF_RFIC_TXFIR_INT1
@ BLADERF_RFIC_TXFIR_INT1
Definition bladeRF2.h:190
BLADERF_RFIC_TXFIR_INT2
@ BLADERF_RFIC_TXFIR_INT2
Definition bladeRF2.h:191
bladerf_channel
int bladerf_channel
Definition libbladeRF.h:649
API_EXPORT
#define API_EXPORT
Definition libbladeRF.h:82
CALL_CONV
#define CALL_CONV
Definition libbladeRF.h:85
bladerf_range
Definition libbladeRF.h:393
bladerf_rf_switch_config
Definition bladeRF2.h:529
bladerf_rf_switch_config::tx2_spdt_port
uint32_t tx2_spdt_port
Definition bladeRF2.h:533
bladerf_rf_switch_config::tx2_rfic_port
uint32_t tx2_rfic_port
Definition bladeRF2.h:532
bladerf_rf_switch_config::rx1_spdt_port
uint32_t rx1_spdt_port
Definition bladeRF2.h:535
bladerf_rf_switch_config::tx1_spdt_port
uint32_t tx1_spdt_port
Definition bladeRF2.h:531
bladerf_rf_switch_config::rx2_rfic_port
uint32_t rx2_rfic_port
Definition bladeRF2.h:536
bladerf_rf_switch_config::tx1_rfic_port
uint32_t tx1_rfic_port
Definition bladeRF2.h:530
bladerf_rf_switch_config::rx1_rfic_port
uint32_t rx1_rfic_port
Definition bladeRF2.h:534
bladerf_rf_switch_config::rx2_spdt_port
uint32_t rx2_spdt_port
Definition bladeRF2.h:537