You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: host/libhackrf/src/hackrf.h
+64Lines changed: 64 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -946,6 +946,19 @@ enum clkin_ctrl_signal {
946
946
CLKIN_SIGNAL_P22=1,
947
947
};
948
948
949
+
/**
950
+
* HackRF Pro Radio Configuration Mode.
951
+
*
952
+
* Used by @ref hackrf_open, @ref hackrf_open_mode_by_serial and @ref hackrf_device_list_open_mode to set the active configuration mode.
953
+
*/
954
+
enumradio_config_mode {
955
+
RADIO_CONFIG_LEGACY=0,
956
+
RADIO_CONFIG_STANDARD=1,
957
+
RADIO_CONFIG_EXT_PRECISION_RX=2,
958
+
RADIO_CONFIG_EXT_PRECISION_TX=3,
959
+
RADIO_CONFIG_HALF_PRECISION=4,
960
+
};
961
+
949
962
/**
950
963
* Opaque struct for hackrf device info. Object can be created via @ref hackrf_open, @ref hackrf_device_list_open or @ref hackrf_open_by_serial and be destroyed via @ref hackrf_close
* @deprecated this function has been replaced by @ref hackrf_open_mode
1234
1267
* @param[out] device device handle
1235
1268
* @return @ref HACKRF_SUCCESS on success, @ref HACKRF_ERROR_INVALID_PARAM if @p device is NULL, @ref HACKRF_ERROR_NOT_FOUND if no HackRF devices are found or other @ref hackrf_error variant
* Open first available HackRF device and initialize it to the given radio configuration mode.
1275
+
*
1276
+
* Modes other than RADIO_CONFIG_STANDARD are only supported on HackRF Pro hardware.
1277
+
*
1278
+
* @param[in] mode configuration mode. Defaults to RADIO_CONFIG_STANDARD. Available modes are defined in @ref radio_config_mode.
1279
+
* @param[out] device device handle
1280
+
* @return @ref HACKRF_SUCCESS on success, @ref HACKRF_ERROR_INVALID_PARAM if @p device is NULL, @ref HACKRF_ERROR_NOT_FOUND if no HackRF devices are found or other @ref hackrf_error variant
1281
+
* @ingroup device
1282
+
*/
1283
+
externADDAPIintADDCALLhackrf_open_mode(
1284
+
constenumradio_config_modemode,
1285
+
hackrf_device**device);
1286
+
1240
1287
/**
1241
1288
* Open HackRF device by serial number
1289
+
* @deprecated this function has been replaced by @ref hackrf_open_mode_by_serial
1242
1290
* @param[in] desired_serial_number serial number of device to open. If NULL then default to first device found.
1243
1291
* @param[out] device device handle
1244
1292
* @return @ref HACKRF_SUCCESS on success, @ref HACKRF_ERROR_INVALID_PARAM if @p device is NULL, @ref HACKRF_ERROR_NOT_FOUND if no HackRF devices are found or other @ref hackrf_error variant
@@ -1248,6 +1296,22 @@ extern ADDAPI int ADDCALL hackrf_open_by_serial(
1248
1296
constchar*constdesired_serial_number,
1249
1297
hackrf_device**device);
1250
1298
1299
+
/**
1300
+
* Open HackRF device by serial number and initialize it to the given radio configuration mode.
1301
+
*
1302
+
* Modes other than RADIO_CONFIG_STANDARD are only supported on HackRF Pro hardware.
1303
+
*
1304
+
* @param[in] desired_serial_number serial number of device to open. If NULL then default to first device found.
1305
+
* @param[in] mode configuration mode. Defaults to RADIO_CONFIG_STANDARD. Available modes are defined in @ref radio_config_mode.
1306
+
* @param[out] device device handle
1307
+
* @return @ref HACKRF_SUCCESS on success, @ref HACKRF_ERROR_INVALID_PARAM if @p device is NULL, @ref HACKRF_ERROR_NOT_FOUND if no HackRF devices are found or other @ref hackrf_error variant
0 commit comments