mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
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:
@@ -1690,6 +1690,7 @@ Function,-,furi_hal_subghz_dump_state,void,
|
||||
Function,+,furi_hal_subghz_flush_rx,void,
|
||||
Function,+,furi_hal_subghz_flush_tx,void,
|
||||
Function,+,furi_hal_subghz_get_data_gpio,const GpioPin*,
|
||||
Function,+,furi_hal_subghz_get_ext_leds_and_amp,_Bool,
|
||||
Function,+,furi_hal_subghz_get_lqi,uint8_t,
|
||||
Function,+,furi_hal_subghz_get_rolling_counter_mult,int8_t,
|
||||
Function,+,furi_hal_subghz_get_rssi,float,
|
||||
@@ -1707,6 +1708,7 @@ Function,+,furi_hal_subghz_reset,void,
|
||||
Function,+,furi_hal_subghz_rx,void,
|
||||
Function,+,furi_hal_subghz_rx_pipe_not_empty,_Bool,
|
||||
Function,+,furi_hal_subghz_set_async_mirror_pin,void,const GpioPin*
|
||||
Function,+,furi_hal_subghz_set_ext_leds_and_amp,void,_Bool
|
||||
Function,+,furi_hal_subghz_set_frequency,uint32_t,uint32_t
|
||||
Function,+,furi_hal_subghz_set_frequency_and_path,uint32_t,uint32_t
|
||||
Function,+,furi_hal_subghz_set_path,void,FuriHalSubGhzPath
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,10 @@ bool furi_hal_subghz_is_async_tx_complete(void);
|
||||
*/
|
||||
void furi_hal_subghz_stop_async_tx(void);
|
||||
|
||||
// External CC1101 Ebytes power amplifier control is now enabled by default
|
||||
// External CC1101 Amplifier and LEDs (if present) control
|
||||
void furi_hal_subghz_set_ext_leds_and_amp(bool enabled);
|
||||
// Get state (enabled by default, can be disabled in radio setting with debug ON)
|
||||
bool furi_hal_subghz_get_ext_leds_and_amp(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user