mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-25 20:23:07 +00:00
1af3463897
* rename some pins * back-port main.h to cube project * regenerate code for gpio renaming * update target * fix subghz names
19 lines
767 B
C
19 lines
767 B
C
#include "api-hal-subghz.h"
|
|
#include <stm32wbxx_ll_gpio.h>
|
|
#include "main.h"
|
|
|
|
void api_hal_rf_band_set(RfBand band) {
|
|
if (band == RfBand1) {
|
|
LL_GPIO_ResetOutputPin(RF_SW_0_GPIO_Port, RF_SW_0_Pin);
|
|
LL_GPIO_SetOutputPin(RF_SW_1_GPIO_Port, RF_SW_1_Pin);
|
|
} else if (band == RfBand2) {
|
|
LL_GPIO_SetOutputPin(RF_SW_0_GPIO_Port, RF_SW_0_Pin);
|
|
LL_GPIO_ResetOutputPin(RF_SW_1_GPIO_Port, RF_SW_1_Pin);
|
|
} else if (band == RfBand3) {
|
|
LL_GPIO_SetOutputPin(RF_SW_0_GPIO_Port, RF_SW_0_Pin);
|
|
LL_GPIO_SetOutputPin(RF_SW_1_GPIO_Port, RF_SW_1_Pin);
|
|
} else if (band == RfBandIsolation) {
|
|
LL_GPIO_ResetOutputPin(RF_SW_0_GPIO_Port, RF_SW_0_Pin);
|
|
LL_GPIO_ResetOutputPin(RF_SW_1_GPIO_Port, RF_SW_1_Pin);
|
|
}
|
|
}
|