From d00123ed24cee6cc6a0a841c8bb60eda680bfde2 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 8 Sep 2013 15:20:47 -0700 Subject: [PATCH] Update RFFC5071 enable state when switching RF path direction. TODO: There's some stuff here that needs refactoring -- duplicate code is showing up. --- firmware/hackrf_usb/rf_path.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/firmware/hackrf_usb/rf_path.c b/firmware/hackrf_usb/rf_path.c index 6c5365ec..0444ae0e 100644 --- a/firmware/hackrf_usb/rf_path.c +++ b/firmware/hackrf_usb/rf_path.c @@ -77,6 +77,11 @@ void rf_path_set_direction(const rf_path_direction_t direction) { switchctrl &= ~SWITCHCTRL_NO_TX_AMP_PWR; } rffc5071_tx(); + if( switchctrl & SWITCHCTRL_MIX_BYPASS ) { + rffc5071_disable(); + } else { + rffc5071_enable(); + } break; case RF_PATH_DIRECTION_RX: @@ -86,6 +91,11 @@ void rf_path_set_direction(const rf_path_direction_t direction) { switchctrl &= ~SWITCHCTRL_NO_RX_AMP_PWR; } rffc5071_rx(); + if( switchctrl & SWITCHCTRL_MIX_BYPASS ) { + rffc5071_disable(); + } else { + rffc5071_enable(); + } break; case RF_PATH_DIRECTION_OFF: