diff --git a/firmware/common/rf_path.c b/firmware/common/rf_path.c index 556f15e5..95d55db2 100644 --- a/firmware/common/rf_path.c +++ b/firmware/common/rf_path.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef JAWBREAKER /* @@ -98,6 +99,7 @@ void rf_path_set_direction(const rf_path_direction_t direction) { ssp1_set_mode_max2837(); max2837_start(); max2837_tx(); + sgpio_configure(SGPIO_DIRECTION_TX, true); break; case RF_PATH_DIRECTION_RX: @@ -117,6 +119,7 @@ void rf_path_set_direction(const rf_path_direction_t direction) { ssp1_set_mode_max2837(); max2837_start(); max2837_rx(); + sgpio_configure(SGPIO_DIRECTION_RX, true); break; case RF_PATH_DIRECTION_OFF: @@ -128,6 +131,7 @@ void rf_path_set_direction(const rf_path_direction_t direction) { max5864_shutdown(); ssp1_set_mode_max2837(); max2837_stop(); + sgpio_configure(SGPIO_DIRECTION_RX, true); break; } diff --git a/firmware/hackrf_usb/hackrf_usb.c b/firmware/hackrf_usb/hackrf_usb.c index 85d01a94..e09647fa 100644 --- a/firmware/hackrf_usb/hackrf_usb.c +++ b/firmware/hackrf_usb/hackrf_usb.c @@ -188,18 +188,15 @@ void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) { gpio_set(PORT_LED1_3, PIN_LED2); usb_endpoint_init(&usb_endpoint_bulk_in); rf_path_set_direction(RF_PATH_DIRECTION_RX); - sgpio_configure(SGPIO_DIRECTION_RX, true); } else if (transceiver_mode == TRANSCEIVER_MODE_TX) { gpio_clear(PORT_LED1_3, PIN_LED2); gpio_set(PORT_LED1_3, PIN_LED3); usb_endpoint_init(&usb_endpoint_bulk_out); rf_path_set_direction(RF_PATH_DIRECTION_TX); - sgpio_configure(SGPIO_DIRECTION_TX, true); } else { gpio_clear(PORT_LED1_3, PIN_LED2); gpio_clear(PORT_LED1_3, PIN_LED3); rf_path_set_direction(RF_PATH_DIRECTION_OFF); - sgpio_configure(SGPIO_DIRECTION_RX, true); } if( transceiver_mode != TRANSCEIVER_MODE_OFF ) {