Skip to content

Commit 5d378e0

Browse files
committed
Remove 'RADIO_CONFIG_LEGACY'
1 parent f4f29bd commit 5d378e0

3 files changed

Lines changed: 9 additions & 14 deletions

File tree

firmware/common/radio.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,6 @@ bool radio_set_config_mode(radio_t* const radio, const radio_config_mode_t mode)
957957
{
958958
// Check if the requested mode is supported.
959959
switch (mode) {
960-
case RADIO_CONFIG_LEGACY:
961960
case RADIO_CONFIG_STANDARD:
962961
// supported on all boards
963962
break;
@@ -984,7 +983,6 @@ bool radio_set_config_mode(radio_t* const radio, const radio_config_mode_t mode)
984983
if (IS_PRALINE) {
985984
fpga_bitstream_index_t bitstream_index;
986985
switch (mode) {
987-
case RADIO_CONFIG_LEGACY:
988986
case RADIO_CONFIG_STANDARD:
989987
bitstream_index = FPGA_BITSTREAM_STANDARD;
990988
break;

firmware/common/radio.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@ typedef enum {
4141
} radio_error_t;
4242

4343
/* radio configuration modes */
44-
// TODO are we sure we need a legacy mode?
4544
typedef enum {
46-
RADIO_CONFIG_LEGACY = 0,
47-
RADIO_CONFIG_STANDARD = 1,
45+
RADIO_CONFIG_STANDARD = 0,
4846
#ifdef IS_PRALINE
49-
RADIO_CONFIG_EXT_PRECISION_RX = 2,
50-
RADIO_CONFIG_EXT_PRECISION_TX = 3,
51-
RADIO_CONFIG_HALF_PRECISION = 4,
47+
RADIO_CONFIG_EXT_PRECISION_RX = 1,
48+
RADIO_CONFIG_EXT_PRECISION_TX = 2,
49+
RADIO_CONFIG_HALF_PRECISION = 3,
5250
#endif
5351
} radio_config_mode_t;
5452

host/libhackrf/src/hackrf.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -952,11 +952,10 @@ enum clkin_ctrl_signal {
952952
* Used by @ref hackrf_open, @ref hackrf_open_mode_by_serial and @ref hackrf_device_list_open_mode to set the active configuration mode.
953953
*/
954954
enum radio_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,
955+
RADIO_CONFIG_STANDARD = 0,
956+
RADIO_CONFIG_EXT_PRECISION_RX = 1,
957+
RADIO_CONFIG_EXT_PRECISION_TX = 2,
958+
RADIO_CONFIG_HALF_PRECISION = 3,
960959
};
961960

962961
/**
@@ -2467,7 +2466,7 @@ extern ADDAPI int ADDCALL hackrf_radio_lock_register(
24672466
* Switches the radio configuration mode.
24682467
*
24692468
* @param[in] device device to configure
2470-
* @param[in] mode configuration mode. Defaults to RADIO_CONFIG_LEGACY. Available modes are defined in @ref radio_config_mode.
2469+
* @param[in] mode configuration mode. Defaults to RADIO_CONFIG_STANDARD. Available modes are defined in @ref radio_config_mode.
24712470
* @return @ref HACKRF_SUCCESS on success or @ref hackrf_error variant
24722471
* @ingroup configuration
24732472
*/

0 commit comments

Comments
 (0)