mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
Remake it more properly
still has problems, need to rewrite subghz_devices tx/rx switch code, checking strcmp every time is not good too, but better than loading whole config from microsd
This commit is contained in:
@@ -53,7 +53,7 @@ typedef struct {
|
||||
const GpioPin* async_mirror_pin;
|
||||
|
||||
uint8_t rolling_counter_mult;
|
||||
bool timestamp_file_names : 1;
|
||||
bool ext_power_amp : 1;
|
||||
bool dangerous_frequency_i : 1;
|
||||
} FuriHalSubGhz;
|
||||
|
||||
@@ -62,6 +62,7 @@ volatile FuriHalSubGhz furi_hal_subghz = {
|
||||
.regulation = SubGhzRegulationTxRx,
|
||||
.async_mirror_pin = NULL,
|
||||
.rolling_counter_mult = 1,
|
||||
.ext_power_amp = false,
|
||||
.dangerous_frequency_i = false,
|
||||
};
|
||||
|
||||
@@ -77,6 +78,14 @@ void furi_hal_subghz_set_dangerous_frequency(bool state_i) {
|
||||
furi_hal_subghz.dangerous_frequency_i = state_i;
|
||||
}
|
||||
|
||||
void furi_hal_subghz_set_ext_power_amp(bool enabled) {
|
||||
furi_hal_subghz.ext_power_amp = enabled;
|
||||
}
|
||||
|
||||
bool furi_hal_subghz_get_ext_power_amp() {
|
||||
return furi_hal_subghz.ext_power_amp;
|
||||
}
|
||||
|
||||
void furi_hal_subghz_set_async_mirror_pin(const GpioPin* pin) {
|
||||
furi_hal_subghz.async_mirror_pin = pin;
|
||||
}
|
||||
|
||||
@@ -282,6 +282,11 @@ void furi_hal_subghz_stop_async_tx();
|
||||
// */
|
||||
// void furi_hal_subghz_select_radio_type(SubGhzRadioType state);
|
||||
|
||||
// External CC1101 Ebytes power amplifier control
|
||||
void furi_hal_subghz_set_ext_power_amp(bool enabled);
|
||||
|
||||
bool furi_hal_subghz_get_ext_power_amp();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user