Allow to disable control of GPIO pin on rx/tx states in subghz [ci skip]

in radio settings with debug ON, settings is saved on microsd, please don't use unless you know what you are doing
This commit is contained in:
MX
2024-10-05 08:43:42 +03:00
parent 54ad331c4c
commit 1ceb1eb256
11 changed files with 102 additions and 31 deletions

View File

@@ -52,6 +52,7 @@ typedef struct {
const GpioPin* async_mirror_pin;
int8_t rolling_counter_mult;
bool ext_leds_and_amp : 1;
bool dangerous_frequency_i : 1;
} FuriHalSubGhz;
@@ -60,6 +61,7 @@ volatile FuriHalSubGhz furi_hal_subghz = {
.regulation = SubGhzRegulationTxRx,
.async_mirror_pin = NULL,
.rolling_counter_mult = 1,
.ext_leds_and_amp = true,
.dangerous_frequency_i = false,
};
@@ -79,6 +81,14 @@ void furi_hal_subghz_set_async_mirror_pin(const GpioPin* pin) {
furi_hal_subghz.async_mirror_pin = pin;
}
void furi_hal_subghz_set_ext_leds_and_amp(bool enabled) {
furi_hal_subghz.ext_leds_and_amp = enabled;
}
bool furi_hal_subghz_get_ext_leds_and_amp(void) {
return furi_hal_subghz.ext_leds_and_amp;
}
const GpioPin* furi_hal_subghz_get_data_gpio(void) {
return &gpio_cc1101_g0;
}