libbladeRF: bladeRF2.h Source File

| libbladeRF 2.5.0-git Nuand bladeRF library

Loading...
Searching...
No Matches
bladeRF2.h
Go to the documentation of this file.
1
22#ifndef BLADERF2_H_
23#define BLADERF2_H_
24
48 API_EXPORT
49 int CALL_CONV bladerf_get_bias_tee(struct bladerf *dev,
50 bladerf_channel ch,
51 bool *enable);
52
62 API_EXPORT
63 int CALL_CONV bladerf_set_bias_tee(struct bladerf *dev,
64 bladerf_channel ch,
65 bool enable);
66
101 API_EXPORT
102 int CALL_CONV bladerf_get_rfic_register(struct bladerf *dev,
103 uint16_t address,
104 uint8_t *val);
114 API_EXPORT
115 int CALL_CONV bladerf_set_rfic_register(struct bladerf *dev,
116 uint16_t address,
117 uint8_t val);
118
127 API_EXPORT
128 int CALL_CONV bladerf_get_rfic_temperature(struct bladerf *dev, float *val);
129
148 API_EXPORT
149 int CALL_CONV bladerf_get_rfic_rssi(struct bladerf *dev,
150 bladerf_channel ch,
151 int32_t *pre_rssi,
152 int32_t *sym_rssi);
153
167 API_EXPORT
168 int CALL_CONV bladerf_get_rfic_ctrl_out(struct bladerf *dev, uint8_t *ctrl_out);
169
173 typedef enum {
174 BLADERF_RFIC_RXFIR_BYPASS = 0,
175 BLADERF_RFIC_RXFIR_CUSTOM,
176 BLADERF_RFIC_RXFIR_DEC1,
177 BLADERF_RFIC_RXFIR_DEC2,
178 BLADERF_RFIC_RXFIR_DEC4,
179} bladerf_rfic_rxfir;
180
182#define BLADERF_RFIC_RXFIR_DEFAULT BLADERF_RFIC_RXFIR_DEC1
183
187 typedef enum {
188 BLADERF_RFIC_TXFIR_BYPASS = 0,
189 BLADERF_RFIC_TXFIR_CUSTOM,
190 BLADERF_RFIC_TXFIR_INT1,
191 BLADERF_RFIC_TXFIR_INT2,
192 BLADERF_RFIC_TXFIR_INT4,
193} bladerf_rfic_txfir;
194
196#define BLADERF_RFIC_TXFIR_DEFAULT BLADERF_RFIC_TXFIR_BYPASS
197
208 API_EXPORT
209 int CALL_CONV bladerf_get_rfic_rx_fir(struct bladerf *dev,
210 bladerf_rfic_rxfir *rxfir);
211
222 API_EXPORT
223 int CALL_CONV bladerf_set_rfic_rx_fir(struct bladerf *dev,
224 bladerf_rfic_rxfir rxfir);
225
236 API_EXPORT
237 int CALL_CONV bladerf_get_rfic_tx_fir(struct bladerf *dev,
238 bladerf_rfic_txfir *txfir);
239
250 API_EXPORT
251 int CALL_CONV bladerf_set_rfic_tx_fir(struct bladerf *dev,
252 bladerf_rfic_txfir txfir);
253
273 API_EXPORT
274 int CALL_CONV bladerf_get_pll_lock_state(struct bladerf *dev, bool *locked);
275
284 API_EXPORT
285 int CALL_CONV bladerf_get_pll_enable(struct bladerf *dev, bool *enabled);
286
297 API_EXPORT
298 int CALL_CONV bladerf_set_pll_enable(struct bladerf *dev, bool enable);
299
308 API_EXPORT
309 int CALL_CONV bladerf_get_pll_refclk_range(struct bladerf *dev,
310 const struct bladerf_range **range);
311
321 API_EXPORT
322 int CALL_CONV bladerf_get_pll_refclk(struct bladerf *dev, uint64_t *frequency);
323
332 API_EXPORT
333 int CALL_CONV bladerf_set_pll_refclk(struct bladerf *dev, uint64_t frequency);
334
347 API_EXPORT
348 int CALL_CONV bladerf_get_pll_register(struct bladerf *dev,
349 uint8_t address,
350 uint32_t *val);
351
364 API_EXPORT
365 int CALL_CONV bladerf_set_pll_register(struct bladerf *dev,
366 uint8_t address,
367 uint32_t val);
368
380 typedef enum {
381 BLADERF_UNKNOWN,
382 BLADERF_PS_DC,
383 BLADERF_PS_USB_VBUS
384} bladerf_power_sources;
385
396 API_EXPORT
397 int CALL_CONV bladerf_get_power_source(struct bladerf *dev,
398 bladerf_power_sources *val);
399
417 typedef enum {
418 CLOCK_SELECT_ONBOARD,
419 CLOCK_SELECT_EXTERNAL
420} bladerf_clock_select;
421
432 API_EXPORT
433 int CALL_CONV bladerf_get_clock_select(struct bladerf *dev,
434 bladerf_clock_select *sel);
435
446 API_EXPORT
447 int CALL_CONV bladerf_set_clock_select(struct bladerf *dev,
448 bladerf_clock_select sel);
449
466 API_EXPORT
467 int CALL_CONV bladerf_get_clock_output(struct bladerf *dev, bool *state);
468
477 API_EXPORT
478 int CALL_CONV bladerf_set_clock_output(struct bladerf *dev, bool enable);
479
493 typedef enum {
494 BLADERF_PMIC_CONFIGURATION,
495 BLADERF_PMIC_VOLTAGE_SHUNT,
496 BLADERF_PMIC_VOLTAGE_BUS,
497 BLADERF_PMIC_POWER,
498 BLADERF_PMIC_CURRENT,
499 BLADERF_PMIC_CALIBRATION,
500} bladerf_pmic_register;
501
513 API_EXPORT
514 int CALL_CONV bladerf_get_pmic_register(struct bladerf *dev,
515 bladerf_pmic_register reg,
516 void *val);
517
529 typedef struct {
530 uint32_t tx1_rfic_port;
531 uint32_t tx1_spdt_port;
532 uint32_t tx2_rfic_port;
533 uint32_t tx2_spdt_port;
534 uint32_t rx1_rfic_port;
535 uint32_t rx1_spdt_port;
536 uint32_t rx2_rfic_port;
537 uint32_t rx2_spdt_port;
538} bladerf_rf_switch_config;
539
551 API_EXPORT
552 int CALL_CONV bladerf_get_rf_switch_config(struct bladerf *dev,
553 bladerf_rf_switch_config *config);
554
561#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