From 467a72cf8e9d4631cb553f0a1a67e91c2fe85885 Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Tue, 24 Feb 2026 20:26:24 -0500 Subject: [PATCH] Remove fractional sample rate radio register --- firmware/common/radio.h | 40 ++++++++++++---------------- host/hackrf-tools/src/hackrf_debug.c | 2 +- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/firmware/common/radio.h b/firmware/common/radio.h index 5922977f..59f9592a 100644 --- a/firmware/common/radio.h +++ b/firmware/common/radio.h @@ -106,88 +106,82 @@ typedef enum { * Sample rate (as seen by MCU/host) in 1/(2**24) Hz. */ RADIO_SAMPLE_RATE = 6, - /** - * Sample rate (as seen by MCU/host) in fractional format. The - * numerator is stored in the low 32 bits. The denominator is stored in - * the high 32 bits. - */ - RADIO_SAMPLE_RATE_FRAC = 7, /** * Base two logarithm of TX decimation ratio (0 means a ratio of 1). */ - RADIO_RESAMPLE_TX = 8, + RADIO_RESAMPLE_TX = 7, /** * Base two logarithm of RX decimation ratio (0 means a ratio of 1). */ - RADIO_RESAMPLE_RX = 9, + RADIO_RESAMPLE_RX = 8, /** * TX RF amplifier enable of type bool. */ - RADIO_GAIN_TX_RF = 10, + RADIO_GAIN_TX_RF = 9, /** * TX IF amplifier gain in dB. */ - RADIO_GAIN_TX_IF = 11, + RADIO_GAIN_TX_IF = 10, /** * RX RF amplifier enable of type bool. */ - RADIO_GAIN_RX_RF = 12, + RADIO_GAIN_RX_RF = 11, /** * RX IF amplifier gain in dB. */ - RADIO_GAIN_RX_IF = 13, + RADIO_GAIN_RX_IF = 12, /** * RX baseband amplifier gain in dB. */ - RADIO_GAIN_RX_BB = 14, + RADIO_GAIN_RX_BB = 13, /** * TX baseband bandwidth in Hz. This controls analog baseband filter * settings but is specified as the desired bandwidth centered in * digital baseband as seen by the MCU/host. */ - RADIO_BB_BANDWIDTH_TX = 15, + RADIO_BB_BANDWIDTH_TX = 14, /** * RX baseband bandwidth in Hz. This controls analog baseband filter * settings but is specified as the desired bandwidth centered in * digital baseband as seen by the MCU/host. */ - RADIO_BB_BANDWIDTH_RX = 16, + RADIO_BB_BANDWIDTH_RX = 15, /** * Quadrature transceiver TX baseband LPF bandwidth in Hz. If no * rotation is performed, this is set to match RADIO_BB_BANDWIDTH. * Currently unused. */ - RADIO_XCVR_TX_LPF = 17, + RADIO_XCVR_TX_LPF = 16, /** * Quadrature transceiver RX baseband LPF bandwidth in Hz. If no * rotation is performed, this is set to match RADIO_BB_BANDWIDTH. * Currently unused. */ - RADIO_XCVR_RX_LPF = 18, + RADIO_XCVR_RX_LPF = 17, /** * Quadrature transceiver RX baseband HPF bandwidth in Hz. Currently * unused. */ - RADIO_XCVR_RX_HPF = 19, + RADIO_XCVR_RX_HPF = 18, /** * Narrowband RX analog baseband LPF enable of type bool. Currently unused. */ - RADIO_RX_NARROW_LPF = 20, + RADIO_RX_NARROW_LPF = 19, /** * RF port bias tee enable of type bool. */ - RADIO_BIAS_TEE = 21, + RADIO_BIAS_TEE = 20, /** * Trigger input enable of type bool. */ - RADIO_TRIGGER = 22, + RADIO_TRIGGER = 21, /** * DC block enable of type bool. */ - RADIO_DC_BLOCK = 23, + RADIO_DC_BLOCK = 22, } radio_register_t; -#define RADIO_NUM_REGS (24) +#define RADIO_NUM_REGS (23) #define RADIO_UNSET (0xffffffffffffffff) /** diff --git a/host/hackrf-tools/src/hackrf_debug.c b/host/hackrf-tools/src/hackrf_debug.c index 5f8785b5..52ede9cb 100644 --- a/host/hackrf-tools/src/hackrf_debug.c +++ b/host/hackrf-tools/src/hackrf_debug.c @@ -501,7 +501,7 @@ int radio_read_register( return result; } -#define RADIO_NUM_REGS (24) +#define RADIO_NUM_REGS (23) int radio_read_registers(hackrf_device* device, const uint8_t bank) {