Remove extra call to switchctrl_set and global switchctrl variable.

This call is not required since the GPIOs are already configured in
rf_path_pin_setup(). The global switchctrl is not used anywhere else.
This commit is contained in:
Martin Ling
2022-09-21 12:08:47 +01:00
parent eec6963759
commit cf34beebb0

View File

@ -79,8 +79,6 @@
SWITCHCTRL_MIX_BYPASS | SWITCHCTRL_HP | SWITCHCTRL_NO_RX_AMP_PWR) SWITCHCTRL_MIX_BYPASS | SWITCHCTRL_HP | SWITCHCTRL_NO_RX_AMP_PWR)
#endif #endif
uint8_t switchctrl = SWITCHCTRL_SAFE;
/* /*
* Antenna port power on HackRF One is controlled by GPO1 on the RFFC5072. * Antenna port power on HackRF One is controlled by GPO1 on the RFFC5072.
* This is the only thing we use RFFC5072 GPO for on HackRF One. The value of * This is the only thing we use RFFC5072 GPO for on HackRF One. The value of
@ -343,7 +341,7 @@ void rf_path_init(rf_path_t* const rf_path)
#ifndef HACKRF_ONE #ifndef HACKRF_ONE
mixer_setup(&mixer); mixer_setup(&mixer);
#endif #endif
switchctrl_set(rf_path, switchctrl); (void) rf_path; /* silence unused param warning */
} }
void rf_path_set_direction(rf_path_t* const rf_path, const rf_path_direction_t direction) void rf_path_set_direction(rf_path_t* const rf_path, const rf_path_direction_t direction)