mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-07 01:21:51 +00:00
Rename CPLD "Q_INVERT" to signal to "INVERT".
Don't expose detail in name about how the task is accomplished.
This commit is contained in:
@@ -27,12 +27,12 @@ using namespace hackrf::one;
|
||||
namespace baseband {
|
||||
|
||||
void CPLD::init() {
|
||||
set_q_invert(false);
|
||||
gpio_baseband_q_invert.output();
|
||||
set_invert(false);
|
||||
gpio_baseband_invert.output();
|
||||
}
|
||||
|
||||
void CPLD::set_q_invert(const bool invert) {
|
||||
gpio_baseband_q_invert.write(invert);
|
||||
void CPLD::set_invert(const bool invert) {
|
||||
gpio_baseband_invert.write(invert);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class CPLD {
|
||||
public:
|
||||
void init();
|
||||
|
||||
void set_q_invert(const bool invert);
|
||||
void set_invert(const bool invert);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -126,7 +126,7 @@ bool set_tuning_frequency(const rf::Frequency frequency) {
|
||||
const auto result_second_if = second_if.set_frequency(tuning_config.second_lo_frequency);
|
||||
|
||||
rf_path.set_band(tuning_config.rf_path_band);
|
||||
baseband_cpld.set_q_invert(tuning_config.baseband_q_invert);
|
||||
baseband_cpld.set_invert(tuning_config.baseband_invert);
|
||||
|
||||
return result_second_if;
|
||||
} else {
|
||||
|
||||
@@ -49,8 +49,8 @@ constexpr rf::Frequency high_band_second_lo_frequency(const rf::Frequency target
|
||||
Config low_band(const rf::Frequency target_frequency) {
|
||||
const rf::Frequency first_lo_frequency = target_frequency + low_band_second_lo_frequency(target_frequency);
|
||||
const rf::Frequency second_lo_frequency = first_lo_frequency - target_frequency;
|
||||
const bool baseband_q_invert = true;
|
||||
return { first_lo_frequency, second_lo_frequency, rf::path::Band::Low, baseband_q_invert };
|
||||
const bool baseband_invert = true;
|
||||
return { first_lo_frequency, second_lo_frequency, rf::path::Band::Low, baseband_invert };
|
||||
}
|
||||
|
||||
Config mid_band(const rf::Frequency target_frequency) {
|
||||
@@ -60,8 +60,8 @@ Config mid_band(const rf::Frequency target_frequency) {
|
||||
Config high_band(const rf::Frequency target_frequency) {
|
||||
const rf::Frequency first_lo_frequency = target_frequency - high_band_second_lo_frequency(target_frequency);
|
||||
const rf::Frequency second_lo_frequency = target_frequency - first_lo_frequency;
|
||||
const bool baseband_q_invert = false;
|
||||
return { first_lo_frequency, second_lo_frequency, rf::path::Band::High, baseband_q_invert };
|
||||
const bool baseband_invert = false;
|
||||
return { first_lo_frequency, second_lo_frequency, rf::path::Band::High, baseband_invert };
|
||||
}
|
||||
|
||||
} /* namespace */
|
||||
|
||||
@@ -33,7 +33,7 @@ struct Config {
|
||||
) : first_lo_frequency(0),
|
||||
second_lo_frequency(0),
|
||||
rf_path_band(rf::path::Band::Mid),
|
||||
baseband_q_invert(false)
|
||||
baseband_invert(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ struct Config {
|
||||
rf::Frequency first_lo_frequency,
|
||||
rf::Frequency second_lo_frequency,
|
||||
rf::path::Band rf_path_band,
|
||||
bool baseband_q_invert
|
||||
bool baseband_invert
|
||||
) : first_lo_frequency(first_lo_frequency),
|
||||
second_lo_frequency(second_lo_frequency),
|
||||
rf_path_band(rf_path_band),
|
||||
baseband_q_invert(baseband_q_invert)
|
||||
baseband_invert(baseband_invert)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ struct Config {
|
||||
const rf::Frequency first_lo_frequency;
|
||||
const rf::Frequency second_lo_frequency;
|
||||
const rf::path::Band rf_path_band;
|
||||
const bool baseband_q_invert;
|
||||
const bool baseband_invert;
|
||||
};
|
||||
|
||||
Config create(const rf::Frequency target_frequency);
|
||||
|
||||
Reference in New Issue
Block a user