libbladeRF: libbladeRF.h Source File

| libbladeRF 2.2.1-git Nuand bladeRF library

libbladeRF.h
Go to the documentation of this file.
1
22 #ifndef LIBBLADERF_H_
23 #define LIBBLADERF_H_
24
25 #include <inttypes.h>
26 #include <stdint.h>
27 #include <stdlib.h>
28
54 #define LIBBLADERF_API_VERSION (0x02020100)
55
56 #ifdef __cplusplus
57 extern "C" {
58 #else
59
67 #include <stdbool.h>
68 #endif
69
70 // clang-format off
71 #if defined _WIN32 || defined __CYGWIN__
72 # include <windows.h>
73 # define CALL_CONV __cdecl
74 # ifdef __GNUC__
75 # define API_EXPORT __attribute__ ((dllexport))
76 # else
77 # define API_EXPORT __declspec(dllexport)
78 # endif
79 #elif defined _DOXYGEN_ONLY_ || defined MATLAB_LINUX_THUNK_BUILD_
80
82 # define API_EXPORT
83
85 # define CALL_CONV
86 #else
87 # define API_EXPORT __attribute__ ((visibility ("default")))
88 # define CALL_CONV
89 #endif
90 // clang-format on
91
107 struct bladerf;
108
112 typedef enum {
113 BLADERF_BACKEND_ANY,
115 BLADERF_BACKEND_LINUX,
116 BLADERF_BACKEND_LIBUSB,
117 BLADERF_BACKEND_CYPRESS,
118 BLADERF_BACKEND_DUMMY = 100,
119 } bladerf_backend;
120
122 #define BLADERF_DESCRIPTION_LENGTH 33
123
125 #define BLADERF_SERIAL_LENGTH 33
126
130 struct bladerf_devinfo {
131 bladerf_backend backend;
133 char serial[BLADERF_SERIAL_LENGTH];
134 uint8_t usb_bus;
135 uint8_t usb_addr;
136 unsigned int instance;
139 char manufacturer[BLADERF_DESCRIPTION_LENGTH];
140 char product[BLADERF_DESCRIPTION_LENGTH];
141 };
142
200 API_EXPORT
201 int CALL_CONV bladerf_open(struct bladerf **device,
202 const char *device_identifier);
203
214 API_EXPORT
215 void CALL_CONV bladerf_close(struct bladerf *device);
216
238 API_EXPORT
239 int CALL_CONV bladerf_open_with_devinfo(struct bladerf **device,
240 struct bladerf_devinfo *devinfo);
241
250 API_EXPORT
251 int CALL_CONV bladerf_get_device_list(struct bladerf_devinfo **devices);
252
258 API_EXPORT
259 void CALL_CONV bladerf_free_device_list(struct bladerf_devinfo *devices);
260
269 API_EXPORT
270 void CALL_CONV bladerf_init_devinfo(struct bladerf_devinfo *info);
271
282 API_EXPORT
283 int CALL_CONV bladerf_get_devinfo(struct bladerf *dev,
284 struct bladerf_devinfo *info);
285
298 API_EXPORT
299 int CALL_CONV bladerf_get_devinfo_from_str(const char *devstr,
300 struct bladerf_devinfo *info);
301
309 API_EXPORT
310 bool CALL_CONV bladerf_devinfo_matches(const struct bladerf_devinfo *a,
311 const struct bladerf_devinfo *b);
312
323 API_EXPORT
324 bool CALL_CONV bladerf_devstr_matches(const char *dev_str,
325 struct bladerf_devinfo *info);
326
334 API_EXPORT
335 const char *CALL_CONV bladerf_backend_str(bladerf_backend backend);
336
350 API_EXPORT
351 void CALL_CONV bladerf_set_usb_reset_on_open(bool enabled);
352
369 struct bladerf_range {
370 int64_t min;
371 int64_t max;
372 int64_t step;
373 float scale;
374 };
375
379 struct bladerf_serial {
380 char serial[BLADERF_SERIAL_LENGTH];
381 };
382
386 struct bladerf_version {
387 uint16_t major;
388 uint16_t minor;
389 uint16_t patch;
390 const char *describe;
395 };
396
400 typedef enum {
401 BLADERF_FPGA_UNKNOWN = 0,
402 BLADERF_FPGA_40KLE = 40,
403 BLADERF_FPGA_115KLE = 115,
404 BLADERF_FPGA_A4 = 49,
405 BLADERF_FPGA_A9 = 301
406 } bladerf_fpga_size;
407
412 typedef enum {
413 BLADERF_DEVICE_SPEED_UNKNOWN,
414 BLADERF_DEVICE_SPEED_HIGH,
415 BLADERF_DEVICE_SPEED_SUPER
416 } bladerf_dev_speed;
417
424 typedef enum {
425 BLADERF_FPGA_SOURCE_UNKNOWN = 0,
426 BLADERF_FPGA_SOURCE_FLASH = 1,
427 BLADERF_FPGA_SOURCE_HOST = 2
428 } bladerf_fpga_source;
429
444 API_EXPORT
445 int CALL_CONV bladerf_get_serial(struct bladerf *dev, char *serial);
446
469 API_EXPORT
470 int CALL_CONV bladerf_get_serial_struct(struct bladerf *dev,
471 struct bladerf_serial *serial);
472
482 API_EXPORT
483 int CALL_CONV bladerf_get_fpga_size(struct bladerf *dev,
484 bladerf_fpga_size *size);
485
495 API_EXPORT
496 int CALL_CONV bladerf_get_fpga_bytes(struct bladerf *dev, size_t *size);
497
511 API_EXPORT
512 int CALL_CONV bladerf_get_flash_size(struct bladerf *dev,
513 uint32_t *size,
514 bool *is_guess);
515
525 API_EXPORT
526 int CALL_CONV bladerf_fw_version(struct bladerf *dev,
527 struct bladerf_version *version);
528
537 API_EXPORT
538 int CALL_CONV bladerf_is_fpga_configured(struct bladerf *dev);
539
548 API_EXPORT
549 int CALL_CONV bladerf_fpga_version(struct bladerf *dev,
550 struct bladerf_version *version);
551
566 API_EXPORT
567 int CALL_CONV bladerf_get_fpga_source(struct bladerf *dev,
568 bladerf_fpga_source *source);
569
577 API_EXPORT
578 bladerf_dev_speed CALL_CONV bladerf_device_speed(struct bladerf *dev);
579
588 API_EXPORT
589 const char *CALL_CONV bladerf_get_board_name(struct bladerf *dev);
590
624 typedef int bladerf_channel;
625
639 #define BLADERF_CHANNEL_RX(ch) (bladerf_channel)(((ch) << 1) | 0x0)
640
654 #define BLADERF_CHANNEL_TX(ch) (bladerf_channel)(((ch) << 1) | 0x1)
655
659 #define BLADERF_CHANNEL_INVALID (bladerf_channel)(-1)
660
662 #define BLADERF_DIRECTION_MASK (0x1)
663
666 /* Backwards compatible mapping to `bladerf_module`. */
667 typedef bladerf_channel bladerf_module;
668 #define BLADERF_MODULE_INVALID BLADERF_CHANNEL_INVALID
669 #define BLADERF_MODULE_RX BLADERF_CHANNEL_RX(0)
670 #define BLADERF_MODULE_TX BLADERF_CHANNEL_TX(0)
671
676 #define BLADERF_CHANNEL_IS_TX(ch) (ch & BLADERF_TX)
677
681 typedef enum {
682 BLADERF_RX = 0,
683 BLADERF_TX = 1,
684 } bladerf_direction;
685
689 typedef enum {
690 BLADERF_RX_X1 = 0,
691 BLADERF_TX_X1 = 1,
692 BLADERF_RX_X2 = 2,
693 BLADERF_TX_X2 = 3,
694 } bladerf_channel_layout;
695
704 API_EXPORT
705 size_t CALL_CONV bladerf_get_channel_count(struct bladerf *dev,
706 bladerf_direction dir);
707
723 typedef int bladerf_gain;
724
735 typedef enum {
744 BLADERF_GAIN_DEFAULT,
745
750 BLADERF_GAIN_MGC,
751
757 BLADERF_GAIN_FASTATTACK_AGC,
758
764 BLADERF_GAIN_SLOWATTACK_AGC,
765
771 BLADERF_GAIN_HYBRID_AGC,
772 } bladerf_gain_mode;
773
775 #define BLADERF_GAIN_AUTOMATIC BLADERF_GAIN_DEFAULT
776
777 #define BLADERF_GAIN_MANUAL BLADERF_GAIN_MGC
778
782 struct bladerf_gain_modes {
783 const char *name;
784 bladerf_gain_mode mode;
785 };
786
812 API_EXPORT
813 int CALL_CONV bladerf_set_gain(struct bladerf *dev,
814 bladerf_channel ch,
815 bladerf_gain gain);
816
826 API_EXPORT
827 int CALL_CONV bladerf_get_gain(struct bladerf *dev,
828 bladerf_channel ch,
829 bladerf_gain *gain);
830
849 API_EXPORT
850 int CALL_CONV bladerf_set_gain_mode(struct bladerf *dev,
851 bladerf_channel ch,
852 bladerf_gain_mode mode);
853
867 API_EXPORT
868 int CALL_CONV bladerf_get_gain_mode(struct bladerf *dev,
869 bladerf_channel ch,
870 bladerf_gain_mode *mode);
871
890 API_EXPORT
891 int CALL_CONV bladerf_get_gain_modes(struct bladerf *dev,
892 bladerf_channel ch,
893 const struct bladerf_gain_modes **modes);
894
907 API_EXPORT
908 int CALL_CONV bladerf_get_gain_range(struct bladerf *dev,
909 bladerf_channel ch,
910 const struct bladerf_range **range);
911
924 API_EXPORT
925 int CALL_CONV bladerf_set_gain_stage(struct bladerf *dev,
926 bladerf_channel ch,
927 const char *stage,
928 bladerf_gain gain);
929
942 API_EXPORT
943 int CALL_CONV bladerf_get_gain_stage(struct bladerf *dev,
944 bladerf_channel ch,
945 const char *stage,
946 bladerf_gain *gain);
947
964 API_EXPORT
965 int CALL_CONV bladerf_get_gain_stage_range(struct bladerf *dev,
966 bladerf_channel ch,
967 const char *stage,
968 const struct bladerf_range **range);
969
984 API_EXPORT
985 int CALL_CONV bladerf_get_gain_stages(struct bladerf *dev,
986 bladerf_channel ch,
987 const char **stages,
988 size_t count);
989
1006 typedef unsigned int bladerf_sample_rate;
1007
1016 struct bladerf_rational_rate {
1017 uint64_t integer;
1018 uint64_t num;
1019 uint64_t den;
1021 };
1022
1040 API_EXPORT
1041 int CALL_CONV bladerf_set_sample_rate(struct bladerf *dev,
1042 bladerf_channel ch,
1043 bladerf_sample_rate rate,
1044 bladerf_sample_rate *actual);
1045
1060 API_EXPORT
1061 int CALL_CONV
1062 bladerf_set_rational_sample_rate(struct bladerf *dev,
1063 bladerf_channel ch,
1064 struct bladerf_rational_rate *rate,
1065 struct bladerf_rational_rate *actual);
1075 API_EXPORT
1076 int CALL_CONV bladerf_get_sample_rate(struct bladerf *dev,
1077 bladerf_channel ch,
1078 bladerf_sample_rate *rate);
1079
1089 API_EXPORT
1090 int CALL_CONV bladerf_get_sample_rate_range(struct bladerf *dev,
1091 bladerf_channel ch,
1092 const struct bladerf_range **range);
1093
1103 API_EXPORT
1104 int CALL_CONV
1105 bladerf_get_rational_sample_rate(struct bladerf *dev,
1106 bladerf_channel ch,
1107 struct bladerf_rational_rate *rate);
1108
1126 typedef unsigned int bladerf_bandwidth;
1127
1146 API_EXPORT
1147 int CALL_CONV bladerf_set_bandwidth(struct bladerf *dev,
1148 bladerf_channel ch,
1149 bladerf_bandwidth bandwidth,
1150 bladerf_bandwidth *actual);
1151
1161 API_EXPORT
1162 int CALL_CONV bladerf_get_bandwidth(struct bladerf *dev,
1163 bladerf_channel ch,
1164 bladerf_bandwidth *bandwidth);
1165
1175 API_EXPORT
1176 int CALL_CONV bladerf_get_bandwidth_range(struct bladerf *dev,
1177 bladerf_channel ch,
1178 const struct bladerf_range **range);
1179
1204 typedef uint64_t bladerf_frequency;
1205
1207 #define BLADERF_PRIuFREQ PRIu64
1208
1209 #define BLADERF_PRIxFREQ PRIx64
1210
1211 #define BLADERF_SCNuFREQ SCNu64
1212
1213 #define BLADERF_SCNxFREQ SCNx64
1214
1233 API_EXPORT
1234 int CALL_CONV bladerf_select_band(struct bladerf *dev,
1235 bladerf_channel ch,
1236 bladerf_frequency frequency);
1237
1261 API_EXPORT
1262 int CALL_CONV bladerf_set_frequency(struct bladerf *dev,
1263 bladerf_channel ch,
1264 bladerf_frequency frequency);
1274 API_EXPORT
1275 int CALL_CONV bladerf_get_frequency(struct bladerf *dev,
1276 bladerf_channel ch,
1277 bladerf_frequency *frequency);
1278
1288 API_EXPORT
1289 int CALL_CONV bladerf_get_frequency_range(struct bladerf *dev,
1290 bladerf_channel ch,
1291 const struct bladerf_range **range);
1292
1313 typedef enum {
1315 BLADERF_LB_NONE = 0,
1316
1318 BLADERF_LB_FIRMWARE,
1319
1321 BLADERF_LB_BB_TXLPF_RXVGA2,
1322
1324 BLADERF_LB_BB_TXVGA1_RXVGA2,
1325
1327 BLADERF_LB_BB_TXLPF_RXLPF,
1328
1330 BLADERF_LB_BB_TXVGA1_RXLPF,
1331
1336 BLADERF_LB_RF_LNA1,
1337
1342 BLADERF_LB_RF_LNA2,
1343
1348 BLADERF_LB_RF_LNA3,
1349
1351 BLADERF_LB_RFIC_BIST,
1352 } bladerf_loopback;
1353
1357 struct bladerf_loopback_modes {
1358 const char *name;
1359 bladerf_loopback mode;
1360 };
1361
1377 API_EXPORT
1378 int CALL_CONV bladerf_get_loopback_modes(
1379 struct bladerf *dev, const struct bladerf_loopback_modes **modes);
1380
1389 API_EXPORT bool CALL_CONV bladerf_is_loopback_mode_supported(
1390 struct bladerf *dev, bladerf_loopback mode);
1391
1405 API_EXPORT
1406 int CALL_CONV bladerf_set_loopback(struct bladerf *dev, bladerf_loopback lb);
1407
1416 API_EXPORT
1417 int CALL_CONV bladerf_get_loopback(struct bladerf *dev, bladerf_loopback *lb);
1418
1542 typedef enum {
1544 BLADERF_TRIGGER_ROLE_INVALID = -1,
1545
1550 BLADERF_TRIGGER_ROLE_DISABLED,
1551
1556 BLADERF_TRIGGER_ROLE_MASTER,
1557
1563 BLADERF_TRIGGER_ROLE_SLAVE,
1564 } bladerf_trigger_role;
1565
1581 typedef enum {
1582 BLADERF_TRIGGER_INVALID = -1,
1583 BLADERF_TRIGGER_J71_4,
1584 BLADERF_TRIGGER_J51_1,
1585 BLADERF_TRIGGER_MINI_EXP_1,
1587 BLADERF_TRIGGER_USER_0 = 128,
1588 BLADERF_TRIGGER_USER_1,
1589 BLADERF_TRIGGER_USER_2,
1590 BLADERF_TRIGGER_USER_3,
1591 BLADERF_TRIGGER_USER_4,
1592 BLADERF_TRIGGER_USER_5,
1593 BLADERF_TRIGGER_USER_6,
1594 BLADERF_TRIGGER_USER_7,
1595 } bladerf_trigger_signal;
1596
1604 struct bladerf_trigger {
1605 bladerf_channel channel;
1606 bladerf_trigger_role role;
1607 bladerf_trigger_signal signal;
1608 uint64_t options;
1610 };
1611
1627 API_EXPORT
1628 int CALL_CONV bladerf_trigger_init(struct bladerf *dev,
1629 bladerf_channel ch,
1630 bladerf_trigger_signal signal,
1631 struct bladerf_trigger *trigger);
1632
1653 API_EXPORT
1654 int CALL_CONV bladerf_trigger_arm(struct bladerf *dev,
1655 const struct bladerf_trigger *trigger,
1656 bool arm,
1657 uint64_t resv1,
1658 uint64_t resv2);
1659
1671 API_EXPORT
1672 int CALL_CONV bladerf_trigger_fire(struct bladerf *dev,
1673 const struct bladerf_trigger *trigger);
1674
1694 API_EXPORT
1695 int CALL_CONV bladerf_trigger_state(struct bladerf *dev,
1696 const struct bladerf_trigger *trigger,
1697 bool *is_armed,
1698 bool *has_fired,
1699 bool *fire_requested,
1700 uint64_t *resv1,
1701 uint64_t *resv2);
1702
1719 typedef enum {
1721 BLADERF_RX_MUX_INVALID = -1,
1722
1724 BLADERF_RX_MUX_BASEBAND = 0x0,
1725
1731 BLADERF_RX_MUX_12BIT_COUNTER = 0x1,
1732
1738 BLADERF_RX_MUX_32BIT_COUNTER = 0x2,
1739
1740 /* RX_MUX setting 0x3 is reserved for future use */
1741
1743 BLADERF_RX_MUX_DIGITAL_LOOPBACK = 0x4,
1744 } bladerf_rx_mux;
1745
1747 /* Backwards compatible mapping for `bladerf_rx_mux`. */
1748 #define BLADERF_RX_MUX_BASEBAND_LMS BLADERF_RX_MUX_BASEBAND
1749
1759 API_EXPORT
1760 int CALL_CONV bladerf_set_rx_mux(struct bladerf *dev, bladerf_rx_mux mux);
1761
1770 API_EXPORT
1771 int CALL_CONV bladerf_get_rx_mux(struct bladerf *dev, bladerf_rx_mux *mode);
1772
1793 typedef uint64_t bladerf_timestamp;
1794
1799 #define BLADERF_RETUNE_NOW (bladerf_timestamp)0
1800
1810 struct bladerf_quick_tune {
1811 union {
1812 /* bladeRF1 quick tune parameters */
1813 struct {
1814 uint8_t freqsel;
1815 uint8_t vcocap;
1816 uint16_t nint;
1817 uint32_t nfrac;
1818 uint8_t flags;
1819 uint8_t xb_gpio;
1820 };
1821 /* bladeRF2 quick tune parameters */
1822 struct {
1823 uint16_t nios_profile;
1824 uint8_t rffe_profile;
1825 uint8_t port;
1826 uint8_t spdt;
1827 };
1828 };
1829 };
1830
1860 API_EXPORT
1861 int CALL_CONV bladerf_schedule_retune(struct bladerf *dev,
1862 bladerf_channel ch,
1863 bladerf_timestamp timestamp,
1864 bladerf_frequency frequency,
1865 struct bladerf_quick_tune *quick_tune);
1866
1879 API_EXPORT
1880 int CALL_CONV bladerf_cancel_scheduled_retunes(struct bladerf *dev,
1881 bladerf_channel ch);
1882
1903 API_EXPORT
1904 int CALL_CONV bladerf_get_quick_tune(struct bladerf *dev,
1905 bladerf_channel ch,
1906 struct bladerf_quick_tune *quick_tune);
1907
1928 typedef int16_t bladerf_correction_value;
1929
1939 typedef enum {
1944 BLADERF_CORR_DCOFF_I,
1945
1950 BLADERF_CORR_DCOFF_Q,
1951
1956 BLADERF_CORR_PHASE,
1957
1962 BLADERF_CORR_GAIN
1963 } bladerf_correction;
1964
1966 /* Backwards compatible mapping to `bladerf_correction`. */
1967 #define BLADERF_CORR_LMS_DCOFF_I BLADERF_CORR_DCOFF_I
1968 #define BLADERF_CORR_LMS_DCOFF_Q BLADERF_CORR_DCOFF_Q
1969 #define BLADERF_CORR_FPGA_PHASE BLADERF_CORR_PHASE
1970 #define BLADERF_CORR_FPGA_GAIN BLADERF_CORR_GAIN
1971
1986 API_EXPORT
1987 int CALL_CONV bladerf_set_correction(struct bladerf *dev,
1988 bladerf_channel ch,
1989 bladerf_correction corr,
1990 bladerf_correction_value value);
1991
2002 API_EXPORT
2003 int CALL_CONV bladerf_get_correction(struct bladerf *dev,
2004 bladerf_channel ch,
2005 bladerf_correction corr,
2006 bladerf_correction_value *value);
2007
2021 #define BLADERF_PRIuTS PRIu64
2022
2023 #define BLADERF_PRIxTS PRIx64
2024
2025 #define BLADERF_SCNuTS SCNu64
2026
2027 #define BLADERF_SCNxTS SCNx64
2028
2040 typedef enum {
2096 BLADERF_FORMAT_SC16_Q11,
2097
2132 BLADERF_FORMAT_SC16_Q11_META,
2133 } bladerf_format;
2134
2141 /*
2142 * Metadata status bits
2143 *
2144 * These are used in conjunction with the bladerf_metadata structure's `status`
2145 * field.
2146 */
2147
2154 #define BLADERF_META_STATUS_OVERRUN (1 << 0)
2155
2164 #define BLADERF_META_STATUS_UNDERRUN (1 << 1)
2165
2166 /*
2167 * Metadata flags
2168 *
2169 * These are used in conjunction with the bladerf_metadata structure's `flags`
2170 * field.
2171 */
2172
2187 #define BLADERF_META_FLAG_TX_BURST_START (1 << 0)
2188
2215 #define BLADERF_META_FLAG_TX_BURST_END (1 << 1)
2216
2225 #define BLADERF_META_FLAG_TX_NOW (1 << 2)
2226
2245 #define BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP (1 << 3)
2246
2252 #define BLADERF_META_FLAG_RX_NOW (1 << 31)
2253
2258 #define BLADERF_META_FLAG_RX_HW_UNDERFLOW (1 << 0)
2259
2264 #define BLADERF_META_FLAG_RX_HW_MINIEXP1 (1 << 16)
2265
2270 #define BLADERF_META_FLAG_RX_HW_MINIEXP2 (1 << 17)
2271
2279 struct bladerf_metadata {
2284 bladerf_timestamp timestamp;
2285
2298 uint32_t flags;
2299
2307 uint32_t status;
2308
2322 unsigned int actual_count;
2323
2328 uint8_t reserved[32];
2329 };
2330
2377 API_EXPORT
2378 int CALL_CONV bladerf_interleave_stream_buffer(bladerf_channel_layout layout,
2379 bladerf_format format,
2380 unsigned int buffer_size,
2381 void *samples);
2382
2405 API_EXPORT
2406 int CALL_CONV bladerf_deinterleave_stream_buffer(bladerf_channel_layout layout,
2407 bladerf_format format,
2408 unsigned int buffer_size,
2409 void *samples);
2410
2433 API_EXPORT
2434 int CALL_CONV bladerf_enable_module(struct bladerf *dev,
2435 bladerf_channel ch,
2436 bool enable);
2437
2479 API_EXPORT
2480 int CALL_CONV bladerf_get_timestamp(struct bladerf *dev,
2481 bladerf_direction dir,
2482 bladerf_timestamp *timestamp);
2483
2553 API_EXPORT
2554 int CALL_CONV bladerf_sync_config(struct bladerf *dev,
2555 bladerf_channel_layout layout,
2556 bladerf_format format,
2557 unsigned int num_buffers,
2558 unsigned int buffer_size,
2559 unsigned int num_transfers,
2560 unsigned int stream_timeout);
2561
2595 API_EXPORT
2596 int CALL_CONV bladerf_sync_tx(struct bladerf *dev,
2597 const void *samples,
2598 unsigned int num_samples,
2599 struct bladerf_metadata *metadata,
2600 unsigned int timeout_ms);
2601
2635 API_EXPORT
2636 int CALL_CONV bladerf_sync_rx(struct bladerf *dev,
2637 void *samples,
2638 unsigned int num_samples,
2639 struct bladerf_metadata *metadata,
2640 unsigned int timeout_ms);
2641
2642
2665 #define BLADERF_STREAM_SHUTDOWN (NULL)
2666
2672 #define BLADERF_STREAM_NO_DATA ((void *)(-1))
2673
2675 struct bladerf_stream;
2676
2724 typedef void *(*bladerf_stream_cb)(struct bladerf *dev,
2725 struct bladerf_stream *stream,
2726 struct bladerf_metadata *meta,
2727 void *samples,
2728 size_t num_samples,
2729 void *user_data);
2730
2793 API_EXPORT
2794 int CALL_CONV bladerf_init_stream(struct bladerf_stream **stream,
2795 struct bladerf *dev,
2796 bladerf_stream_cb callback,
2797 void ***buffers,
2798 size_t num_buffers,
2799 bladerf_format format,
2800 size_t samples_per_buffer,
2801 size_t num_transfers,
2802 void *user_data);
2803
2824 API_EXPORT
2825 int CALL_CONV bladerf_stream(struct bladerf_stream *stream,
2826 bladerf_channel_layout layout);
2827
2855 API_EXPORT
2856 int CALL_CONV bladerf_submit_stream_buffer(struct bladerf_stream *stream,
2857 void *buffer,
2858 unsigned int timeout_ms);
2859
2877 API_EXPORT
2878 int CALL_CONV bladerf_submit_stream_buffer_nb(struct bladerf_stream *stream,
2879 void *buffer);
2880
2881
2893 API_EXPORT
2894 void CALL_CONV bladerf_deinit_stream(struct bladerf_stream *stream);
2895
2905 API_EXPORT
2906 int CALL_CONV bladerf_set_stream_timeout(struct bladerf *dev,
2907 bladerf_direction dir,
2908 unsigned int timeout);
2909
2920 API_EXPORT
2921 int CALL_CONV bladerf_get_stream_timeout(struct bladerf *dev,
2922 bladerf_direction dir,
2923 unsigned int *timeout);
2924
2954 API_EXPORT
2955 int CALL_CONV bladerf_flash_firmware(struct bladerf *dev, const char *firmware);
2956
2967 API_EXPORT
2968 int CALL_CONV bladerf_load_fpga(struct bladerf *dev, const char *fpga);
2969
2980 API_EXPORT
2981 int CALL_CONV bladerf_flash_fpga(struct bladerf *dev, const char *fpga_image);
2982
2990 API_EXPORT
2991 int CALL_CONV bladerf_erase_stored_fpga(struct bladerf *dev);
2992
3000 API_EXPORT
3001 int CALL_CONV bladerf_device_reset(struct bladerf *dev);
3002
3012 API_EXPORT
3013 int CALL_CONV bladerf_get_fw_log(struct bladerf *dev, const char *filename);
3014
3025 API_EXPORT
3026 int CALL_CONV bladerf_jump_to_bootloader(struct bladerf *dev);
3027
3043 API_EXPORT
3044 int CALL_CONV bladerf_get_bootloader_list(struct bladerf_devinfo **list);
3045
3069 API_EXPORT
3070 int CALL_CONV bladerf_load_fw_from_bootloader(const char *device_identifier,
3071 bladerf_backend backend,
3072 uint8_t bus,
3073 uint8_t addr,
3074 const char *file);
3075
3090 typedef enum {
3091 BLADERF_IMAGE_TYPE_INVALID = -1,
3092 BLADERF_IMAGE_TYPE_RAW,
3093 BLADERF_IMAGE_TYPE_FIRMWARE,
3094 BLADERF_IMAGE_TYPE_FPGA_40KLE,
3095 BLADERF_IMAGE_TYPE_FPGA_115KLE,
3096 BLADERF_IMAGE_TYPE_FPGA_A4,
3097 BLADERF_IMAGE_TYPE_FPGA_A9,
3098 BLADERF_IMAGE_TYPE_CALIBRATION,
3099 BLADERF_IMAGE_TYPE_RX_DC_CAL,
3100 BLADERF_IMAGE_TYPE_TX_DC_CAL,
3101 BLADERF_IMAGE_TYPE_RX_IQ_CAL,
3102 BLADERF_IMAGE_TYPE_TX_IQ_CAL,
3103 } bladerf_image_type;
3104
3106 #define BLADERF_IMAGE_MAGIC_LEN 7
3107
3109 #define BLADERF_IMAGE_CHECKSUM_LEN 32
3110
3112 #define BLADERF_IMAGE_RESERVED_LEN 128
3113
3125 struct bladerf_image {
3133 char magic[BLADERF_IMAGE_MAGIC_LEN + 1];
3134
3139 uint8_t checksum[BLADERF_IMAGE_CHECKSUM_LEN];
3140
3146 struct bladerf_version version;
3147
3149 uint64_t timestamp;
3150
3159 char serial[BLADERF_SERIAL_LENGTH + 1];
3160
3164 char reserved[BLADERF_IMAGE_RESERVED_LEN];
3165
3169 bladerf_image_type type;
3170
3175 uint32_t address;
3176
3178 uint32_t length;
3179
3181 uint8_t *data;
3182 };
3183
3207 API_EXPORT
3208 struct bladerf_image *CALL_CONV bladerf_alloc_image(struct bladerf *dev,
3209 bladerf_image_type type,
3210 uint32_t address,
3211 uint32_t length);
3212
3226 API_EXPORT
3227 struct bladerf_image *CALL_CONV bladerf_alloc_cal_image(
3228 struct bladerf *dev, bladerf_fpga_size fpga_size, uint16_t vctcxo_trim);
3229
3237 API_EXPORT
3238 void CALL_CONV bladerf_free_image(struct bladerf_image *image);
3239
3255 API_EXPORT
3256 int CALL_CONV bladerf_image_write(struct bladerf *dev,
3257 struct bladerf_image *image,
3258 const char *file);
3259
3281 API_EXPORT
3282 int CALL_CONV bladerf_image_read(struct bladerf_image *image, const char *file);
3283
3315 typedef enum {
3317 BLADERF_VCTCXO_TAMER_INVALID = -1,
3318
3320 BLADERF_VCTCXO_TAMER_DISABLED = 0,
3321
3323 BLADERF_VCTCXO_TAMER_1_PPS = 1,
3324
3326 BLADERF_VCTCXO_TAMER_10_MHZ = 2
3327 } bladerf_vctcxo_tamer_mode;
3328
3337 API_EXPORT
3338 int CALL_CONV bladerf_set_vctcxo_tamer_mode(struct bladerf *dev,
3339 bladerf_vctcxo_tamer_mode mode);
3340
3351 API_EXPORT
3352 int CALL_CONV bladerf_get_vctcxo_tamer_mode(struct bladerf *dev,
3353 bladerf_vctcxo_tamer_mode *mode);
3354
3375 API_EXPORT
3376 int CALL_CONV bladerf_get_vctcxo_trim(struct bladerf *dev, uint16_t *trim);
3377
3388 API_EXPORT
3389 int CALL_CONV bladerf_trim_dac_write(struct bladerf *dev, uint16_t val);
3390
3405 API_EXPORT
3406 int CALL_CONV bladerf_trim_dac_read(struct bladerf *dev, uint16_t *val);
3407
3439 typedef enum {
3441 BLADERF_TUNING_MODE_INVALID = -1,
3442
3447 BLADERF_TUNING_MODE_HOST,
3448
3450 BLADERF_TUNING_MODE_FPGA,
3451 } bladerf_tuning_mode;
3452
3462 API_EXPORT
3463 int CALL_CONV bladerf_set_tuning_mode(struct bladerf *dev,
3464 bladerf_tuning_mode mode);
3465
3474 API_EXPORT
3475 int CALL_CONV bladerf_get_tuning_mode(struct bladerf *dev,
3476 bladerf_tuning_mode *mode);
3477
3500 #define BLADERF_TRIGGER_REG_ARM ((uint8_t)(1 << 0))
3501
3511 #define BLADERF_TRIGGER_REG_FIRE ((uint8_t)(1 << 1))
3512
3521 #define BLADERF_TRIGGER_REG_MASTER ((uint8_t)(1 << 2))
3522
3529 #define BLADERF_TRIGGER_REG_LINE ((uint8_t)(1 << 3))
3530
3543 API_EXPORT
3544 int CALL_CONV bladerf_read_trigger(struct bladerf *dev,
3545 bladerf_channel ch,
3546 bladerf_trigger_signal signal,
3547 uint8_t *val);
3548
3560 API_EXPORT
3561 int CALL_CONV bladerf_write_trigger(struct bladerf *dev,
3562 bladerf_channel ch,
3563 bladerf_trigger_signal signal,
3564 uint8_t val);
3565
3587 API_EXPORT
3588 int CALL_CONV bladerf_config_gpio_read(struct bladerf *dev, uint32_t *val);
3589
3602 API_EXPORT
3603 int CALL_CONV bladerf_config_gpio_write(struct bladerf *dev, uint32_t val);
3604
3640 API_EXPORT
3641 int CALL_CONV bladerf_erase_flash(struct bladerf *dev,
3642 uint32_t erase_block,
3643 uint32_t count);
3644
3658 API_EXPORT
3659 int CALL_CONV bladerf_erase_flash_bytes(struct bladerf *dev,
3660 uint32_t address,
3661 uint32_t length);
3662
3682 API_EXPORT
3683 int CALL_CONV bladerf_read_flash(struct bladerf *dev,
3684 uint8_t *buf,
3685 uint32_t page,
3686 uint32_t count);
3687
3703 API_EXPORT
3704 int CALL_CONV bladerf_read_flash_bytes(struct bladerf *dev,
3705 uint8_t *buf,
3706 uint32_t address,
3707 uint32_t bytes);
3708
3727 API_EXPORT
3728 int CALL_CONV bladerf_write_flash(struct bladerf *dev,
3729 const uint8_t *buf,
3730 uint32_t page,
3731 uint32_t count);
3732
3747 API_EXPORT
3748 int CALL_CONV bladerf_write_flash_bytes(struct bladerf *dev,
3749 const uint8_t *buf,
3750 uint32_t address,
3751 uint32_t length);
3752
3763 API_EXPORT
3764 int CALL_CONV bladerf_lock_otp(struct bladerf *dev);
3765
3778 API_EXPORT
3779 int CALL_CONV bladerf_read_otp(struct bladerf *dev,
3780 uint8_t *buf);
3781
3794 API_EXPORT
3795 int CALL_CONV bladerf_write_otp(struct bladerf *dev,
3796 uint8_t *buf);
3797
3820 API_EXPORT
3821 int CALL_CONV bladerf_set_rf_port(struct bladerf *dev,
3822 bladerf_channel ch,
3823 const char *port);
3824
3834 API_EXPORT
3835 int CALL_CONV bladerf_get_rf_port(struct bladerf *dev,
3836 bladerf_channel ch,
3837 const char **port);
3838
3853 API_EXPORT
3854 int CALL_CONV bladerf_get_rf_ports(struct bladerf *dev,
3855 bladerf_channel ch,
3856 const char **ports,
3857 unsigned int count);
3858
3884 typedef enum {
3885 BLADERF_XB_NONE = 0,
3886 BLADERF_XB_100,
3890 BLADERF_XB_200,
3891 BLADERF_XB_300
3892 } bladerf_xb;
3893
3902 API_EXPORT
3903 int CALL_CONV bladerf_expansion_attach(struct bladerf *dev, bladerf_xb xb);
3904
3913 API_EXPORT
3914 int CALL_CONV bladerf_expansion_get_attached(struct bladerf *dev,
3915 bladerf_xb *xb);
3916
3933 typedef enum {
3934 BLADERF_LOG_LEVEL_VERBOSE,
3935 BLADERF_LOG_LEVEL_DEBUG,
3936 BLADERF_LOG_LEVEL_INFO,
3937 BLADERF_LOG_LEVEL_WARNING,
3938 BLADERF_LOG_LEVEL_ERROR,
3939 BLADERF_LOG_LEVEL_CRITICAL,
3940 BLADERF_LOG_LEVEL_SILENT
3941 } bladerf_log_level;
3942
3951 API_EXPORT
3952 void CALL_CONV bladerf_log_set_verbosity(bladerf_log_level level);
3953
3967 API_EXPORT
3968 void CALL_CONV bladerf_version(struct bladerf_version *version);
3969
3988 // clang-format off
3989 #define BLADERF_ERR_UNEXPECTED (-1)
3990 #define BLADERF_ERR_RANGE (-2)
3991 #define BLADERF_ERR_INVAL (-3)
3992 #define BLADERF_ERR_MEM (-4)
3993 #define BLADERF_ERR_IO (-5)
3994 #define BLADERF_ERR_TIMEOUT (-6)
3995 #define BLADERF_ERR_NODEV (-7)
3996 #define BLADERF_ERR_UNSUPPORTED (-8)
3997 #define BLADERF_ERR_MISALIGNED (-9)
3998 #define BLADERF_ERR_CHECKSUM (-10)
3999 #define BLADERF_ERR_NO_FILE (-11)
4000 #define BLADERF_ERR_UPDATE_FPGA (-12)
4001 #define BLADERF_ERR_UPDATE_FW (-13)
4002 #define BLADERF_ERR_TIME_PAST (-14)
4003 #define BLADERF_ERR_QUEUE_FULL (-15)
4005 #define BLADERF_ERR_FPGA_OP (-16)
4006 #define BLADERF_ERR_PERMISSION (-17)
4008 #define BLADERF_ERR_WOULD_BLOCK (-18)
4013 #define BLADERF_ERR_NOT_INIT (-19)
4015 // clang-format on
4016
4024 API_EXPORT
4025 const char *CALL_CONV bladerf_strerror(int error);
4026
4029 #include <bladeRF1.h>
4030 #include <bladeRF2.h>
4031
4032 #ifdef __cplusplus
4033 }
4034 #endif
4035
4036 #endif /* LIBBLADERF_H_ */
bladerf_read_flash_bytes
API_EXPORT int CALL_CONV bladerf_read_flash_bytes(struct bladerf *dev, uint8_t *buf, uint32_t address, uint32_t bytes)
BLADERF_TRIGGER_ROLE_DISABLED
@ BLADERF_TRIGGER_ROLE_DISABLED
Definition: libbladeRF.h:1550
bladerf_strerror
const API_EXPORT char *CALL_CONV bladerf_strerror(int error)
bladerf_xb
bladerf_xb
Definition: libbladeRF.h:3884
bladerf_image::timestamp
uint64_t timestamp
Definition: libbladeRF.h:3149
bladerf_write_flash_bytes
API_EXPORT int CALL_CONV bladerf_write_flash_bytes(struct bladerf *dev, const uint8_t *buf, uint32_t address, uint32_t length)
bladerf_quick_tune::xb_gpio
uint8_t xb_gpio
Definition: libbladeRF.h:1819
bladerf_get_device_list
API_EXPORT int CALL_CONV bladerf_get_device_list(struct bladerf_devinfo **devices)
bladerf_device_speed
API_EXPORT bladerf_dev_speed CALL_CONV bladerf_device_speed(struct bladerf *dev)
BLADERF_LB_RF_LNA1
@ BLADERF_LB_RF_LNA1
Definition: libbladeRF.h:1336
bladerf_set_frequency
API_EXPORT int CALL_CONV bladerf_set_frequency(struct bladerf *dev, bladerf_channel ch, bladerf_frequency frequency)
BLADERF_TRIGGER_USER_4
@ BLADERF_TRIGGER_USER_4
Definition: libbladeRF.h:1591
BLADERF_RX_X1
@ BLADERF_RX_X1
Definition: libbladeRF.h:690
bladerf_close
API_EXPORT void CALL_CONV bladerf_close(struct bladerf *device)
bladerf_is_loopback_mode_supported
API_EXPORT bool CALL_CONV bladerf_is_loopback_mode_supported(struct bladerf *dev, bladerf_loopback mode)
bladerf_get_sample_rate
API_EXPORT int CALL_CONV bladerf_get_sample_rate(struct bladerf *dev, bladerf_channel ch, bladerf_sample_rate *rate)
bladerf_trigger_signal
bladerf_trigger_signal
Definition: libbladeRF.h:1581
BLADERF_SERIAL_LENGTH
#define BLADERF_SERIAL_LENGTH
Definition: libbladeRF.h:125
BLADERF_TX_X1
@ BLADERF_TX_X1
Definition: libbladeRF.h:691
bladerf_version::major
uint16_t major
Definition: libbladeRF.h:387
bladerf_init_stream
API_EXPORT int CALL_CONV bladerf_init_stream(struct bladerf_stream **stream, struct bladerf *dev, bladerf_stream_cb callback, void ***buffers, size_t num_buffers, bladerf_format format, size_t samples_per_buffer, size_t num_transfers, void *user_data)
BLADERF_DESCRIPTION_LENGTH
#define BLADERF_DESCRIPTION_LENGTH
Definition: libbladeRF.h:122
bladerf_image
Definition: libbladeRF.h:3125
bladerf_get_fpga_bytes
API_EXPORT int CALL_CONV bladerf_get_fpga_bytes(struct bladerf *dev, size_t *size)
BLADERF_LOG_LEVEL_ERROR
@ BLADERF_LOG_LEVEL_ERROR
Definition: libbladeRF.h:3938
BLADERF_IMAGE_TYPE_FPGA_A4
@ BLADERF_IMAGE_TYPE_FPGA_A4
Definition: libbladeRF.h:3096
BLADERF_VCTCXO_TAMER_1_PPS
@ BLADERF_VCTCXO_TAMER_1_PPS
Definition: libbladeRF.h:3323
BLADERF_FPGA_UNKNOWN
@ BLADERF_FPGA_UNKNOWN
Definition: libbladeRF.h:401
bladerf_get_correction
API_EXPORT int CALL_CONV bladerf_get_correction(struct bladerf *dev, bladerf_channel ch, bladerf_correction corr, bladerf_correction_value *value)
bladerf_config_gpio_write
API_EXPORT int CALL_CONV bladerf_config_gpio_write(struct bladerf *dev, uint32_t val)
bladerf_get_channel_count
API_EXPORT size_t CALL_CONV bladerf_get_channel_count(struct bladerf *dev, bladerf_direction dir)
bladerf_read_trigger
API_EXPORT int CALL_CONV bladerf_read_trigger(struct bladerf *dev, bladerf_channel ch, bladerf_trigger_signal signal, uint8_t *val)
bladerf_quick_tune::rffe_profile
uint8_t rffe_profile
Definition: libbladeRF.h:1824
bladerf_loopback_modes
Definition: libbladeRF.h:1357
bladerf_expansion_get_attached
API_EXPORT int CALL_CONV bladerf_expansion_get_attached(struct bladerf *dev, bladerf_xb *xb)
bladerf_flash_fpga
API_EXPORT int CALL_CONV bladerf_flash_fpga(struct bladerf *dev, const char *fpga_image)
bladerf_get_rf_ports
API_EXPORT int CALL_CONV bladerf_get_rf_ports(struct bladerf *dev, bladerf_channel ch, const char **ports, unsigned int count)
bladerf_trim_dac_read
API_EXPORT int CALL_CONV bladerf_trim_dac_read(struct bladerf *dev, uint16_t *val)
BLADERF_TRIGGER_ROLE_MASTER
@ BLADERF_TRIGGER_ROLE_MASTER
Definition: libbladeRF.h:1556
bladerf_get_quick_tune
API_EXPORT int CALL_CONV bladerf_get_quick_tune(struct bladerf *dev, bladerf_channel ch, struct bladerf_quick_tune *quick_tune)
bladerf_device_reset
API_EXPORT int CALL_CONV bladerf_device_reset(struct bladerf *dev)
bladerf_gain
int bladerf_gain
Definition: libbladeRF.h:723
bladerf_metadata::actual_count
unsigned int actual_count
Definition: libbladeRF.h:2322
bladerf_devinfo::serial
char serial[BLADERF_SERIAL_LENGTH]
Definition: libbladeRF.h:133
bladerf_devinfo::usb_bus
uint8_t usb_bus
Definition: libbladeRF.h:134
bladerf_set_correction
API_EXPORT int CALL_CONV bladerf_set_correction(struct bladerf *dev, bladerf_channel ch, bladerf_correction corr, bladerf_correction_value value)
bladerf_channel
int bladerf_channel
Definition: libbladeRF.h:624
bladerf_quick_tune
Definition: libbladeRF.h:1810
BLADERF_TRIGGER_USER_7
@ BLADERF_TRIGGER_USER_7
Definition: libbladeRF.h:1594
BLADERF_FPGA_SOURCE_UNKNOWN
@ BLADERF_FPGA_SOURCE_UNKNOWN
Definition: libbladeRF.h:425
BLADERF_RX_MUX_DIGITAL_LOOPBACK
@ BLADERF_RX_MUX_DIGITAL_LOOPBACK
Definition: libbladeRF.h:1743
bladerf_quick_tune::spdt
uint8_t spdt
Definition: libbladeRF.h:1826
bladerf_write_flash
API_EXPORT int CALL_CONV bladerf_write_flash(struct bladerf *dev, const uint8_t *buf, uint32_t page, uint32_t count)
BLADERF_FPGA_SOURCE_FLASH
@ BLADERF_FPGA_SOURCE_FLASH
Definition: libbladeRF.h:426
bladerf_get_serial_struct
API_EXPORT int CALL_CONV bladerf_get_serial_struct(struct bladerf *dev, struct bladerf_serial *serial)
BLADERF_TRIGGER_USER_2
@ BLADERF_TRIGGER_USER_2
Definition: libbladeRF.h:1589
bladerf_quick_tune::flags
uint8_t flags
Definition: libbladeRF.h:1818
bladerf_set_sample_rate
API_EXPORT int CALL_CONV bladerf_set_sample_rate(struct bladerf *dev, bladerf_channel ch, bladerf_sample_rate rate, bladerf_sample_rate *actual)
BLADERF_IMAGE_TYPE_INVALID
@ BLADERF_IMAGE_TYPE_INVALID
Definition: libbladeRF.h:3091
bladerf_trigger::signal
bladerf_trigger_signal signal
Definition: libbladeRF.h:1607
bladerf_get_vctcxo_tamer_mode
API_EXPORT int CALL_CONV bladerf_get_vctcxo_tamer_mode(struct bladerf *dev, bladerf_vctcxo_tamer_mode *mode)
BLADERF_IMAGE_TYPE_RAW
@ BLADERF_IMAGE_TYPE_RAW
Definition: libbladeRF.h:3092
BLADERF_FPGA_40KLE
@ BLADERF_FPGA_40KLE
Definition: libbladeRF.h:402
BLADERF_FPGA_SOURCE_HOST
@ BLADERF_FPGA_SOURCE_HOST
Definition: libbladeRF.h:427
bladerf_set_gain_mode
API_EXPORT int CALL_CONV bladerf_set_gain_mode(struct bladerf *dev, bladerf_channel ch, bladerf_gain_mode mode)
bladerf_get_vctcxo_trim
API_EXPORT int CALL_CONV bladerf_get_vctcxo_trim(struct bladerf *dev, uint16_t *trim)
bladerf_get_fpga_size
API_EXPORT int CALL_CONV bladerf_get_fpga_size(struct bladerf *dev, bladerf_fpga_size *size)
bladerf_set_rf_port
API_EXPORT int CALL_CONV bladerf_set_rf_port(struct bladerf *dev, bladerf_channel ch, const char *port)
BLADERF_TRIGGER_USER_5
@ BLADERF_TRIGGER_USER_5
Definition: libbladeRF.h:1592
bladerf_devinfo::instance
unsigned int instance
Definition: libbladeRF.h:136
bladerf_version::patch
uint16_t patch
Definition: libbladeRF.h:389
bladerf_metadata::timestamp
bladerf_timestamp timestamp
Definition: libbladeRF.h:2284
bladerf_image::serial
char serial[BLADERF_SERIAL_LENGTH+1]
Definition: libbladeRF.h:3159
BLADERF_GAIN_HYBRID_AGC
@ BLADERF_GAIN_HYBRID_AGC
Definition: libbladeRF.h:771
bladerf_trigger::channel
bladerf_channel channel
Definition: libbladeRF.h:1605
API_EXPORT
#define API_EXPORT
Definition: libbladeRF.h:82
bladerf_trigger_role
bladerf_trigger_role
Definition: libbladeRF.h:1542
bladerf_correction_value
int16_t bladerf_correction_value
Definition: libbladeRF.h:1928
BLADERF_LB_RF_LNA2
@ BLADERF_LB_RF_LNA2
Definition: libbladeRF.h:1342
bladerf_image_read
API_EXPORT int CALL_CONV bladerf_image_read(struct bladerf_image *image, const char *file)
bladeRF2.h
bladeRF2-specific API
BLADERF_TUNING_MODE_HOST
@ BLADERF_TUNING_MODE_HOST
Definition: libbladeRF.h:3447
BLADERF_IMAGE_TYPE_RX_IQ_CAL
@ BLADERF_IMAGE_TYPE_RX_IQ_CAL
Definition: libbladeRF.h:3101
bladerf_log_set_verbosity
API_EXPORT void CALL_CONV bladerf_log_set_verbosity(bladerf_log_level level)
bladerf_enable_module
API_EXPORT int CALL_CONV bladerf_enable_module(struct bladerf *dev, bladerf_channel ch, bool enable)
BLADERF_LB_FIRMWARE
@ BLADERF_LB_FIRMWARE
Definition: libbladeRF.h:1318
bladerf_rational_rate::integer
uint64_t integer
Definition: libbladeRF.h:1017
bladerf_set_usb_reset_on_open
API_EXPORT void CALL_CONV bladerf_set_usb_reset_on_open(bool enabled)
bladerf_rational_rate::num
uint64_t num
Definition: libbladeRF.h:1018
bladerf_trigger::options
uint64_t options
Definition: libbladeRF.h:1608
BLADERF_XB_300
@ BLADERF_XB_300
Definition: libbladeRF.h:3891
BLADERF_CORR_DCOFF_I
@ BLADERF_CORR_DCOFF_I
Definition: libbladeRF.h:1944
bladerf_get_sample_rate_range
API_EXPORT int CALL_CONV bladerf_get_sample_rate_range(struct bladerf *dev, bladerf_channel ch, const struct bladerf_range **range)
bladerf_gain_mode
bladerf_gain_mode
Definition: libbladeRF.h:735
bladerf_fpga_size
bladerf_fpga_size
Definition: libbladeRF.h:400
bladerf_get_bandwidth
API_EXPORT int CALL_CONV bladerf_get_bandwidth(struct bladerf *dev, bladerf_channel ch, bladerf_bandwidth *bandwidth)
BLADERF_FPGA_A4
@ BLADERF_FPGA_A4
Definition: libbladeRF.h:404
bladerf_erase_flash
API_EXPORT int CALL_CONV bladerf_erase_flash(struct bladerf *dev, uint32_t erase_block, uint32_t count)
BLADERF_LOG_LEVEL_INFO
@ BLADERF_LOG_LEVEL_INFO
Definition: libbladeRF.h:3936
bladerf_get_gain_mode
API_EXPORT int CALL_CONV bladerf_get_gain_mode(struct bladerf *dev, bladerf_channel ch, bladerf_gain_mode *mode)
bladerf_load_fw_from_bootloader
API_EXPORT int CALL_CONV bladerf_load_fw_from_bootloader(const char *device_identifier, bladerf_backend backend, uint8_t bus, uint8_t addr, const char *file)
bladerf_stream_cb
void *(* bladerf_stream_cb)(struct bladerf *dev, struct bladerf_stream *stream, struct bladerf_metadata *meta, void *samples, size_t num_samples, void *user_data)
Definition: libbladeRF.h:2724
bladerf_devinfo_matches
API_EXPORT bool CALL_CONV bladerf_devinfo_matches(const struct bladerf_devinfo *a, const struct bladerf_devinfo *b)
bladerf_range::scale
float scale
Definition: libbladeRF.h:373
bladeRF1.h
bladeRF1-specific API
BLADERF_VCTCXO_TAMER_10_MHZ
@ BLADERF_VCTCXO_TAMER_10_MHZ
Definition: libbladeRF.h:3326
bladerf_rational_rate::den
uint64_t den
Definition: libbladeRF.h:1019
bladerf_config_gpio_read
API_EXPORT int CALL_CONV bladerf_config_gpio_read(struct bladerf *dev, uint32_t *val)
bladerf_quick_tune::port
uint8_t port
Definition: libbladeRF.h:1825
BLADERF_BACKEND_LIBUSB
@ BLADERF_BACKEND_LIBUSB
Definition: libbladeRF.h:116
bladerf_fpga_source
bladerf_fpga_source
Definition: libbladeRF.h:424
bladerf_erase_stored_fpga
API_EXPORT int CALL_CONV bladerf_erase_stored_fpga(struct bladerf *dev)
bladerf_devinfo::manufacturer
char manufacturer[BLADERF_DESCRIPTION_LENGTH]
Definition: libbladeRF.h:139
BLADERF_FORMAT_SC16_Q11
@ BLADERF_FORMAT_SC16_Q11
Definition: libbladeRF.h:2096
BLADERF_TRIGGER_USER_3
@ BLADERF_TRIGGER_USER_3
Definition: libbladeRF.h:1590
bladerf_get_fw_log
API_EXPORT int CALL_CONV bladerf_get_fw_log(struct bladerf *dev, const char *filename)
bladerf_get_devinfo_from_str
API_EXPORT int CALL_CONV bladerf_get_devinfo_from_str(const char *devstr, struct bladerf_devinfo *info)
BLADERF_TRIGGER_J51_1
@ BLADERF_TRIGGER_J51_1
Definition: libbladeRF.h:1584
bladerf_fw_version
API_EXPORT int CALL_CONV bladerf_fw_version(struct bladerf *dev, struct bladerf_version *version)
BLADERF_LB_NONE
@ BLADERF_LB_NONE
Definition: libbladeRF.h:1315
bladerf_deinterleave_stream_buffer
API_EXPORT int CALL_CONV bladerf_deinterleave_stream_buffer(bladerf_channel_layout layout, bladerf_format format, unsigned int buffer_size, void *samples)
bladerf_range::min
int64_t min
Definition: libbladeRF.h:370
BLADERF_IMAGE_TYPE_FPGA_A9
@ BLADERF_IMAGE_TYPE_FPGA_A9
Definition: libbladeRF.h:3097
bladerf_bandwidth
unsigned int bladerf_bandwidth
Definition: libbladeRF.h:1126
bladerf_alloc_cal_image
API_EXPORT struct bladerf_image *CALL_CONV bladerf_alloc_cal_image(struct bladerf *dev, bladerf_fpga_size fpga_size, uint16_t vctcxo_trim)
BLADERF_LB_RF_LNA3
@ BLADERF_LB_RF_LNA3
Definition: libbladeRF.h:1348
bladerf_deinit_stream
API_EXPORT void CALL_CONV bladerf_deinit_stream(struct bladerf_stream *stream)
bladerf_devinfo::product
char product[BLADERF_DESCRIPTION_LENGTH]
Definition: libbladeRF.h:140
bladerf_image::length
uint32_t length
Definition: libbladeRF.h:3178
bladerf_log_level
bladerf_log_level
Definition: libbladeRF.h:3933
bladerf_get_serial
API_EXPORT int CALL_CONV bladerf_get_serial(struct bladerf *dev, char *serial)
bladerf_trigger_state
API_EXPORT int CALL_CONV bladerf_trigger_state(struct bladerf *dev, const struct bladerf_trigger *trigger, bool *is_armed, bool *has_fired, bool *fire_requested, uint64_t *resv1, uint64_t *resv2)
BLADERF_RX_MUX_INVALID
@ BLADERF_RX_MUX_INVALID
Definition: libbladeRF.h:1721
bladerf_loopback_modes::name
const char * name
Definition: libbladeRF.h:1358
BLADERF_TRIGGER_USER_6
@ BLADERF_TRIGGER_USER_6
Definition: libbladeRF.h:1593
bladerf_set_stream_timeout
API_EXPORT int CALL_CONV bladerf_set_stream_timeout(struct bladerf *dev, bladerf_direction dir, unsigned int timeout)
bladerf_get_devinfo
API_EXPORT int CALL_CONV bladerf_get_devinfo(struct bladerf *dev, struct bladerf_devinfo *info)
bladerf_get_rf_port
API_EXPORT int CALL_CONV bladerf_get_rf_port(struct bladerf *dev, bladerf_channel ch, const char **port)
BLADERF_RX
@ BLADERF_RX
Definition: libbladeRF.h:682
BLADERF_XB_NONE
@ BLADERF_XB_NONE
Definition: libbladeRF.h:3885
BLADERF_LB_BB_TXLPF_RXLPF
@ BLADERF_LB_BB_TXLPF_RXLPF
Definition: libbladeRF.h:1327
bladerf_metadata::flags
uint32_t flags
Definition: libbladeRF.h:2298
bladerf_set_gain
API_EXPORT int CALL_CONV bladerf_set_gain(struct bladerf *dev, bladerf_channel ch, bladerf_gain gain)
bladerf_cancel_scheduled_retunes
API_EXPORT int CALL_CONV bladerf_cancel_scheduled_retunes(struct bladerf *dev, bladerf_channel ch)
bladerf_set_vctcxo_tamer_mode
API_EXPORT int CALL_CONV bladerf_set_vctcxo_tamer_mode(struct bladerf *dev, bladerf_vctcxo_tamer_mode mode)
BLADERF_IMAGE_CHECKSUM_LEN
#define BLADERF_IMAGE_CHECKSUM_LEN
Definition: libbladeRF.h:3109
BLADERF_TRIGGER_INVALID
@ BLADERF_TRIGGER_INVALID
Definition: libbladeRF.h:1582
BLADERF_IMAGE_TYPE_FPGA_115KLE
@ BLADERF_IMAGE_TYPE_FPGA_115KLE
Definition: libbladeRF.h:3095
bladerf_set_bandwidth
API_EXPORT int CALL_CONV bladerf_set_bandwidth(struct bladerf *dev, bladerf_channel ch, bladerf_bandwidth bandwidth, bladerf_bandwidth *actual)
bladerf_vctcxo_tamer_mode
bladerf_vctcxo_tamer_mode
Definition: libbladeRF.h:3315
bladerf_expansion_attach
API_EXPORT int CALL_CONV bladerf_expansion_attach(struct bladerf *dev, bladerf_xb xb)
bladerf_sync_rx
API_EXPORT int CALL_CONV bladerf_sync_rx(struct bladerf *dev, void *samples, unsigned int num_samples, struct bladerf_metadata *metadata, unsigned int timeout_ms)
bladerf_fpga_version
API_EXPORT int CALL_CONV bladerf_fpga_version(struct bladerf *dev, struct bladerf_version *version)
BLADERF_IMAGE_RESERVED_LEN
#define BLADERF_IMAGE_RESERVED_LEN
Definition: libbladeRF.h:3112
bladerf_get_stream_timeout
API_EXPORT int CALL_CONV bladerf_get_stream_timeout(struct bladerf *dev, bladerf_direction dir, unsigned int *timeout)
bladerf_loopback_modes::mode
bladerf_loopback mode
Definition: libbladeRF.h:1359
bladerf_load_fpga
API_EXPORT int CALL_CONV bladerf_load_fpga(struct bladerf *dev, const char *fpga)
bladerf_get_fpga_source
API_EXPORT int CALL_CONV bladerf_get_fpga_source(struct bladerf *dev, bladerf_fpga_source *source)
bladerf_get_bandwidth_range
API_EXPORT int CALL_CONV bladerf_get_bandwidth_range(struct bladerf *dev, bladerf_channel ch, const struct bladerf_range **range)
bladerf_set_tuning_mode
API_EXPORT int CALL_CONV bladerf_set_tuning_mode(struct bladerf *dev, bladerf_tuning_mode mode)
BLADERF_TRIGGER_J71_4
@ BLADERF_TRIGGER_J71_4
Definition: libbladeRF.h:1583
bladerf_get_tuning_mode
API_EXPORT int CALL_CONV bladerf_get_tuning_mode(struct bladerf *dev, bladerf_tuning_mode *mode)
bladerf_write_trigger
API_EXPORT int CALL_CONV bladerf_write_trigger(struct bladerf *dev, bladerf_channel ch, bladerf_trigger_signal signal, uint8_t val)
bladerf_set_gain_stage
API_EXPORT int CALL_CONV bladerf_set_gain_stage(struct bladerf *dev, bladerf_channel ch, const char *stage, bladerf_gain gain)
bladerf_devinfo::usb_addr
uint8_t usb_addr
Definition: libbladeRF.h:135
BLADERF_IMAGE_TYPE_RX_DC_CAL
@ BLADERF_IMAGE_TYPE_RX_DC_CAL
Definition: libbladeRF.h:3099
bladerf_submit_stream_buffer_nb
API_EXPORT int CALL_CONV bladerf_submit_stream_buffer_nb(struct bladerf_stream *stream, void *buffer)
bladerf_direction
bladerf_direction
Definition: libbladeRF.h:681
bladerf_submit_stream_buffer
API_EXPORT int CALL_CONV bladerf_submit_stream_buffer(struct bladerf_stream *stream, void *buffer, unsigned int timeout_ms)
bladerf_free_device_list
API_EXPORT void CALL_CONV bladerf_free_device_list(struct bladerf_devinfo *devices)
bladerf_metadata
Definition: libbladeRF.h:2279
BLADERF_LOG_LEVEL_CRITICAL
@ BLADERF_LOG_LEVEL_CRITICAL
Definition: libbladeRF.h:3939
bladerf_get_gain_range
API_EXPORT int CALL_CONV bladerf_get_gain_range(struct bladerf *dev, bladerf_channel ch, const struct bladerf_range **range)
bladerf_read_otp
API_EXPORT int CALL_CONV bladerf_read_otp(struct bladerf *dev, uint8_t *buf)
BLADERF_TUNING_MODE_FPGA
@ BLADERF_TUNING_MODE_FPGA
Definition: libbladeRF.h:3450
bladerf_version
Definition: libbladeRF.h:386
BLADERF_VCTCXO_TAMER_DISABLED
@ BLADERF_VCTCXO_TAMER_DISABLED
Definition: libbladeRF.h:3320
BLADERF_LOG_LEVEL_VERBOSE
@ BLADERF_LOG_LEVEL_VERBOSE
Definition: libbladeRF.h:3934
bladerf_quick_tune::vcocap
uint8_t vcocap
Definition: libbladeRF.h:1815
bladerf_get_board_name
const API_EXPORT char *CALL_CONV bladerf_get_board_name(struct bladerf *dev)
bladerf_correction
bladerf_correction
Definition: libbladeRF.h:1939
BLADERF_VCTCXO_TAMER_INVALID
@ BLADERF_VCTCXO_TAMER_INVALID
Definition: libbladeRF.h:3317
BLADERF_IMAGE_TYPE_FIRMWARE
@ BLADERF_IMAGE_TYPE_FIRMWARE
Definition: libbladeRF.h:3093
bladerf_timestamp
uint64_t bladerf_timestamp
Definition: libbladeRF.h:1793
BLADERF_IMAGE_MAGIC_LEN
#define BLADERF_IMAGE_MAGIC_LEN
Definition: libbladeRF.h:3106
bladerf_open_with_devinfo
API_EXPORT int CALL_CONV bladerf_open_with_devinfo(struct bladerf **device, struct bladerf_devinfo *devinfo)
bladerf_tuning_mode
bladerf_tuning_mode
Definition: libbladeRF.h:3439
bladerf_get_gain_stages
API_EXPORT int CALL_CONV bladerf_get_gain_stages(struct bladerf *dev, bladerf_channel ch, const char **stages, size_t count)
bladerf_select_band
API_EXPORT int CALL_CONV bladerf_select_band(struct bladerf *dev, bladerf_channel ch, bladerf_frequency frequency)
BLADERF_TRIGGER_ROLE_INVALID
@ BLADERF_TRIGGER_ROLE_INVALID
Definition: libbladeRF.h:1544
bladerf_quick_tune::nios_profile
uint16_t nios_profile
Definition: libbladeRF.h:1823
BLADERF_GAIN_SLOWATTACK_AGC
@ BLADERF_GAIN_SLOWATTACK_AGC
Definition: libbladeRF.h:764
BLADERF_IMAGE_TYPE_FPGA_40KLE
@ BLADERF_IMAGE_TYPE_FPGA_40KLE
Definition: libbladeRF.h:3094
bladerf_schedule_retune
API_EXPORT int CALL_CONV bladerf_schedule_retune(struct bladerf *dev, bladerf_channel ch, bladerf_timestamp timestamp, bladerf_frequency frequency, struct bladerf_quick_tune *quick_tune)
bladerf_backend
bladerf_backend
Definition: libbladeRF.h:112
bladerf_get_rx_mux
API_EXPORT int CALL_CONV bladerf_get_rx_mux(struct bladerf *dev, bladerf_rx_mux *mode)
bladerf_get_loopback_modes
API_EXPORT int CALL_CONV bladerf_get_loopback_modes(struct bladerf *dev, const struct bladerf_loopback_modes **modes)
BLADERF_BACKEND_CYPRESS
@ BLADERF_BACKEND_CYPRESS
Definition: libbladeRF.h:117
bladerf_format
bladerf_format
Definition: libbladeRF.h:2040
bladerf_get_gain
API_EXPORT int CALL_CONV bladerf_get_gain(struct bladerf *dev, bladerf_channel ch, bladerf_gain *gain)
BLADERF_LB_BB_TXVGA1_RXVGA2
@ BLADERF_LB_BB_TXVGA1_RXVGA2
Definition: libbladeRF.h:1324
BLADERF_TRIGGER_USER_1
@ BLADERF_TRIGGER_USER_1
Definition: libbladeRF.h:1588
bladerf_rational_rate
Definition: libbladeRF.h:1016
bladerf_image::type
bladerf_image_type type
Definition: libbladeRF.h:3169
bladerf_image::magic
char magic[BLADERF_IMAGE_MAGIC_LEN+1]
Definition: libbladeRF.h:3133
BLADERF_XB_200
@ BLADERF_XB_200
Definition: libbladeRF.h:3890
BLADERF_FPGA_A9
@ BLADERF_FPGA_A9
Definition: libbladeRF.h:405
bladerf_write_otp
API_EXPORT int CALL_CONV bladerf_write_otp(struct bladerf *dev, uint8_t *buf)
bladerf_gain_modes::mode
bladerf_gain_mode mode
Definition: libbladeRF.h:784
bladerf_range::max
int64_t max
Definition: libbladeRF.h:371
BLADERF_LOG_LEVEL_SILENT
@ BLADERF_LOG_LEVEL_SILENT
Definition: libbladeRF.h:3940
bladerf_read_flash
API_EXPORT int CALL_CONV bladerf_read_flash(struct bladerf *dev, uint8_t *buf, uint32_t page, uint32_t count)
BLADERF_IMAGE_TYPE_TX_DC_CAL
@ BLADERF_IMAGE_TYPE_TX_DC_CAL
Definition: libbladeRF.h:3100
bladerf_backend_str
const API_EXPORT char *CALL_CONV bladerf_backend_str(bladerf_backend backend)
BLADERF_XB_100
@ BLADERF_XB_100
Definition: libbladeRF.h:3886
bladerf_image::checksum
uint8_t checksum[BLADERF_IMAGE_CHECKSUM_LEN]
Definition: libbladeRF.h:3139
bladerf_get_timestamp
API_EXPORT int CALL_CONV bladerf_get_timestamp(struct bladerf *dev, bladerf_direction dir, bladerf_timestamp *timestamp)
bladerf_serial::serial
char serial[BLADERF_SERIAL_LENGTH]
Definition: libbladeRF.h:380
BLADERF_IMAGE_TYPE_TX_IQ_CAL
@ BLADERF_IMAGE_TYPE_TX_IQ_CAL
Definition: libbladeRF.h:3102
BLADERF_BACKEND_LINUX
@ BLADERF_BACKEND_LINUX
Definition: libbladeRF.h:115
BLADERF_TRIGGER_ROLE_SLAVE
@ BLADERF_TRIGGER_ROLE_SLAVE
Definition: libbladeRF.h:1563
BLADERF_FPGA_115KLE
@ BLADERF_FPGA_115KLE
Definition: libbladeRF.h:403
bladerf_dev_speed
bladerf_dev_speed
Definition: libbladeRF.h:412
BLADERF_LOG_LEVEL_WARNING
@ BLADERF_LOG_LEVEL_WARNING
Definition: libbladeRF.h:3937
bladerf_get_gain_stage_range
API_EXPORT int CALL_CONV bladerf_get_gain_stage_range(struct bladerf *dev, bladerf_channel ch, const char *stage, const struct bladerf_range **range)
bladerf_image::reserved
char reserved[BLADERF_IMAGE_RESERVED_LEN]
Definition: libbladeRF.h:3164
BLADERF_LB_RFIC_BIST
@ BLADERF_LB_RFIC_BIST
Definition: libbladeRF.h:1351
bladerf_devinfo::backend
bladerf_backend backend
Definition: libbladeRF.h:131
bladerf_sync_tx
API_EXPORT int CALL_CONV bladerf_sync_tx(struct bladerf *dev, const void *samples, unsigned int num_samples, struct bladerf_metadata *metadata, unsigned int timeout_ms)
BLADERF_BACKEND_ANY
@ BLADERF_BACKEND_ANY
Definition: libbladeRF.h:113
CALL_CONV
#define CALL_CONV
Definition: libbladeRF.h:85
bladerf_get_gain_modes
API_EXPORT int CALL_CONV bladerf_get_gain_modes(struct bladerf *dev, bladerf_channel ch, const struct bladerf_gain_modes **modes)
BLADERF_CORR_DCOFF_Q
@ BLADERF_CORR_DCOFF_Q
Definition: libbladeRF.h:1950
BLADERF_GAIN_MGC
@ BLADERF_GAIN_MGC
Definition: libbladeRF.h:750
BLADERF_IMAGE_TYPE_CALIBRATION
@ BLADERF_IMAGE_TYPE_CALIBRATION
Definition: libbladeRF.h:3098
bladerf_set_loopback
API_EXPORT int CALL_CONV bladerf_set_loopback(struct bladerf *dev, bladerf_loopback lb)
BLADERF_LOG_LEVEL_DEBUG
@ BLADERF_LOG_LEVEL_DEBUG
Definition: libbladeRF.h:3935
BLADERF_FORMAT_SC16_Q11_META
@ BLADERF_FORMAT_SC16_Q11_META
Definition: libbladeRF.h:2132
bladerf_trigger_init
API_EXPORT int CALL_CONV bladerf_trigger_init(struct bladerf *dev, bladerf_channel ch, bladerf_trigger_signal signal, struct bladerf_trigger *trigger)
bladerf_trigger_fire
API_EXPORT int CALL_CONV bladerf_trigger_fire(struct bladerf *dev, const struct bladerf_trigger *trigger)
BLADERF_CORR_PHASE
@ BLADERF_CORR_PHASE
Definition: libbladeRF.h:1956
BLADERF_RX_MUX_32BIT_COUNTER
@ BLADERF_RX_MUX_32BIT_COUNTER
Definition: libbladeRF.h:1738
bladerf_trigger
Definition: libbladeRF.h:1604
BLADERF_RX_MUX_BASEBAND
@ BLADERF_RX_MUX_BASEBAND
Definition: libbladeRF.h:1724
bladerf_channel_layout
bladerf_channel_layout
Definition: libbladeRF.h:689
bladerf_image::version
struct bladerf_version version
Definition: libbladeRF.h:3146
bladerf_image_write
API_EXPORT int CALL_CONV bladerf_image_write(struct bladerf *dev, struct bladerf_image *image, const char *file)
bladerf_image_type
bladerf_image_type
Definition: libbladeRF.h:3090
bladerf_metadata::reserved
uint8_t reserved[32]
Definition: libbladeRF.h:2328
bladerf_open
API_EXPORT int CALL_CONV bladerf_open(struct bladerf **device, const char *device_identifier)
BLADERF_TUNING_MODE_INVALID
@ BLADERF_TUNING_MODE_INVALID
Definition: libbladeRF.h:3441
bladerf_range
Definition: libbladeRF.h:369
bladerf_get_frequency
API_EXPORT int CALL_CONV bladerf_get_frequency(struct bladerf *dev, bladerf_channel ch, bladerf_frequency *frequency)
bladerf_sample_rate
unsigned int bladerf_sample_rate
Definition: libbladeRF.h:1006
bladerf_free_image
API_EXPORT void CALL_CONV bladerf_free_image(struct bladerf_image *image)
bladerf_get_gain_stage
API_EXPORT int CALL_CONV bladerf_get_gain_stage(struct bladerf *dev, bladerf_channel ch, const char *stage, bladerf_gain *gain)
bladerf_get_rational_sample_rate
API_EXPORT int CALL_CONV bladerf_get_rational_sample_rate(struct bladerf *dev, bladerf_channel ch, struct bladerf_rational_rate *rate)
BLADERF_TX
@ BLADERF_TX
Definition: libbladeRF.h:683
bladerf_lock_otp
API_EXPORT int CALL_CONV bladerf_lock_otp(struct bladerf *dev)
bladerf_image::address
uint32_t address
Definition: libbladeRF.h:3175
BLADERF_GAIN_FASTATTACK_AGC
@ BLADERF_GAIN_FASTATTACK_AGC
Definition: libbladeRF.h:757
bladerf_trigger::role
bladerf_trigger_role role
Definition: libbladeRF.h:1606
bladerf_quick_tune::freqsel
uint8_t freqsel
Definition: libbladeRF.h:1814
bladerf_quick_tune::nint
uint16_t nint
Definition: libbladeRF.h:1816
bladerf_set_rx_mux
API_EXPORT int CALL_CONV bladerf_set_rx_mux(struct bladerf *dev, bladerf_rx_mux mux)
bladerf_init_devinfo
API_EXPORT void CALL_CONV bladerf_init_devinfo(struct bladerf_devinfo *info)
bladerf_frequency
uint64_t bladerf_frequency
Definition: libbladeRF.h:1204
bladerf_range::step
int64_t step
Definition: libbladeRF.h:372
bladerf_loopback
bladerf_loopback
Definition: libbladeRF.h:1313
bladerf_trigger_arm
API_EXPORT int CALL_CONV bladerf_trigger_arm(struct bladerf *dev, const struct bladerf_trigger *trigger, bool arm, uint64_t resv1, uint64_t resv2)
bladerf_interleave_stream_buffer
API_EXPORT int CALL_CONV bladerf_interleave_stream_buffer(bladerf_channel_layout layout, bladerf_format format, unsigned int buffer_size, void *samples)
BLADERF_GAIN_DEFAULT
@ BLADERF_GAIN_DEFAULT
Definition: libbladeRF.h:744
bladerf_set_rational_sample_rate
API_EXPORT int CALL_CONV bladerf_set_rational_sample_rate(struct bladerf *dev, bladerf_channel ch, struct bladerf_rational_rate *rate, struct bladerf_rational_rate *actual)
bladerf_quick_tune::nfrac
uint32_t nfrac
Definition: libbladeRF.h:1817
BLADERF_RX_X2
@ BLADERF_RX_X2
Definition: libbladeRF.h:692
BLADERF_TRIGGER_MINI_EXP_1
@ BLADERF_TRIGGER_MINI_EXP_1
Definition: libbladeRF.h:1585
bladerf_rx_mux
bladerf_rx_mux
Definition: libbladeRF.h:1719
bladerf_version
API_EXPORT void CALL_CONV bladerf_version(struct bladerf_version *version)
bladerf_get_frequency_range
API_EXPORT int CALL_CONV bladerf_get_frequency_range(struct bladerf *dev, bladerf_channel ch, const struct bladerf_range **range)
bladerf_gain_modes::name
const char * name
Definition: libbladeRF.h:783
bladerf_image::data
uint8_t * data
Definition: libbladeRF.h:3181
bladerf_gain_modes
Definition: libbladeRF.h:782
bladerf_flash_firmware
API_EXPORT int CALL_CONV bladerf_flash_firmware(struct bladerf *dev, const char *firmware)
BLADERF_TX_X2
@ BLADERF_TX_X2
Definition: libbladeRF.h:693
bladerf_alloc_image
API_EXPORT struct bladerf_image *CALL_CONV bladerf_alloc_image(struct bladerf *dev, bladerf_image_type type, uint32_t address, uint32_t length)
bladerf_metadata::status
uint32_t status
Definition: libbladeRF.h:2307
bladerf_is_fpga_configured
API_EXPORT int CALL_CONV bladerf_is_fpga_configured(struct bladerf *dev)
bladerf_get_bootloader_list
API_EXPORT int CALL_CONV bladerf_get_bootloader_list(struct bladerf_devinfo **list)
bladerf_serial
Definition: libbladeRF.h:379
bladerf_devinfo
Definition: libbladeRF.h:130
bladerf_jump_to_bootloader
API_EXPORT int CALL_CONV bladerf_jump_to_bootloader(struct bladerf *dev)
BLADERF_LB_BB_TXLPF_RXVGA2
@ BLADERF_LB_BB_TXLPF_RXVGA2
Definition: libbladeRF.h:1321
BLADERF_LB_BB_TXVGA1_RXLPF
@ BLADERF_LB_BB_TXVGA1_RXLPF
Definition: libbladeRF.h:1330
BLADERF_BACKEND_DUMMY
@ BLADERF_BACKEND_DUMMY
Definition: libbladeRF.h:118
bladerf_sync_config
API_EXPORT int CALL_CONV bladerf_sync_config(struct bladerf *dev, bladerf_channel_layout layout, bladerf_format format, unsigned int num_buffers, unsigned int buffer_size, unsigned int num_transfers, unsigned int stream_timeout)
bladerf_trim_dac_write
API_EXPORT int CALL_CONV bladerf_trim_dac_write(struct bladerf *dev, uint16_t val)
bladerf_version::minor
uint16_t minor
Definition: libbladeRF.h:388
bladerf_version::describe
const char * describe
Definition: libbladeRF.h:390
BLADERF_CORR_GAIN
@ BLADERF_CORR_GAIN
Definition: libbladeRF.h:1962
bladerf_erase_flash_bytes
API_EXPORT int CALL_CONV bladerf_erase_flash_bytes(struct bladerf *dev, uint32_t address, uint32_t length)
bladerf_get_flash_size
API_EXPORT int CALL_CONV bladerf_get_flash_size(struct bladerf *dev, uint32_t *size, bool *is_guess)
BLADERF_TRIGGER_USER_0
@ BLADERF_TRIGGER_USER_0
Definition: libbladeRF.h:1587
bladerf_get_loopback
API_EXPORT int CALL_CONV bladerf_get_loopback(struct bladerf *dev, bladerf_loopback *lb)
bladerf_devstr_matches
API_EXPORT bool CALL_CONV bladerf_devstr_matches(const char *dev_str, struct bladerf_devinfo *info)
bladerf_stream
API_EXPORT int CALL_CONV bladerf_stream(struct bladerf_stream *stream, bladerf_channel_layout layout)
BLADERF_RX_MUX_12BIT_COUNTER
@ BLADERF_RX_MUX_12BIT_COUNTER
Definition: libbladeRF.h:1731