rework subghz settings, enable tx-rx state on unused gpio pin by default

This commit is contained in:
MX
2024-04-05 04:02:33 +03:00
parent f8d4d9397e
commit a830d6b511
8 changed files with 55 additions and 199 deletions

View File

@@ -1590,7 +1590,6 @@ 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_power_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,
@@ -1608,7 +1607,6 @@ 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_power_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
1 entry status name type params
1590 Function + furi_hal_subghz_flush_rx void
1591 Function + furi_hal_subghz_flush_tx void
1592 Function + furi_hal_subghz_get_data_gpio const GpioPin*
Function + furi_hal_subghz_get_ext_power_amp _Bool
1593 Function + furi_hal_subghz_get_lqi uint8_t
1594 Function + furi_hal_subghz_get_rolling_counter_mult int8_t
1595 Function + furi_hal_subghz_get_rssi float
1607 Function + furi_hal_subghz_rx void
1608 Function + furi_hal_subghz_rx_pipe_not_empty _Bool
1609 Function + furi_hal_subghz_set_async_mirror_pin void const GpioPin*
Function + furi_hal_subghz_set_ext_power_amp void _Bool
1610 Function + furi_hal_subghz_set_frequency uint32_t uint32_t
1611 Function + furi_hal_subghz_set_frequency_and_path uint32_t uint32_t
1612 Function + furi_hal_subghz_set_path void FuriHalSubGhzPath

View File

@@ -52,7 +52,6 @@ typedef struct {
const GpioPin* async_mirror_pin;
int8_t rolling_counter_mult;
bool ext_power_amp : 1;
bool dangerous_frequency_i : 1;
} FuriHalSubGhz;
@@ -61,7 +60,6 @@ volatile FuriHalSubGhz furi_hal_subghz = {
.regulation = SubGhzRegulationTxRx,
.async_mirror_pin = NULL,
.rolling_counter_mult = 1,
.ext_power_amp = false,
.dangerous_frequency_i = false,
};
@@ -77,14 +75,6 @@ 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(void) {
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;
}

View File

@@ -238,54 +238,7 @@ bool furi_hal_subghz_is_async_tx_complete(void);
*/
void furi_hal_subghz_stop_async_tx(void);
// /** Initialize and switch to power save mode Used by internal API-HAL
// * initialization routine Can be used to reinitialize device to safe state and
// * send it to sleep
// * @return true if initialisation is successfully
// */
// bool furi_hal_subghz_init_check(void);
// /** Switching between internal and external radio
// * @param state SubGhzRadioInternal or SubGhzRadioExternal
// * @return true if switching is successful
// */
// bool furi_hal_subghz_init_radio_type(SubGhzRadioType state);
// /** Get current radio
// * @return SubGhzRadioInternal or SubGhzRadioExternal
// */
// SubGhzRadioType furi_hal_subghz_get_radio_type(void);
// /** Check for a radio module
// * @return true if check is successful
// */
// bool furi_hal_subghz_check_radio(void);
// /** Turn on the power of the external radio module
// * @return true if power-up is successful
// */
// bool furi_hal_subghz_enable_ext_power(void);
// /** Turn off the power of the external radio module
// */
// void furi_hal_subghz_disable_ext_power(void);
// /** If true - disable 5v power of the external radio module
// */
// void furi_hal_subghz_set_external_power_disable(bool state);
// /** Get the current state of the external power disable flag
// */
// bool furi_hal_subghz_get_external_power_disable(void);
// /** Set what radio module we will be using
// */
// 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(void);
// External CC1101 Ebytes power amplifier control is now enabled by default
#ifdef __cplusplus
}