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:
Jared Boone
2016-08-21 11:34:46 -07:00
parent b0a3f680e5
commit 77016b9a40
7 changed files with 16 additions and 16 deletions

View File

@@ -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);
}
}

View File

@@ -30,7 +30,7 @@ class CPLD {
public:
void init();
void set_q_invert(const bool invert);
void set_invert(const bool invert);
private:
};

View File

@@ -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 {

View File

@@ -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 */

View File

@@ -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);