From 77016b9a40178ab99df3ada3a137311d0dce5550 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 21 Aug 2016 11:34:46 -0700 Subject: [PATCH] Rename CPLD "Q_INVERT" to signal to "INVERT". Don't expose detail in name about how the task is accomplished. --- firmware/application/baseband_cpld.cpp | 8 ++++---- firmware/application/baseband_cpld.hpp | 2 +- firmware/application/radio.cpp | 2 +- firmware/application/tuning.cpp | 8 ++++---- firmware/application/tuning.hpp | 8 ++++---- firmware/common/hackrf_gpio.hpp | 2 +- firmware/common/pins.hpp | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/firmware/application/baseband_cpld.cpp b/firmware/application/baseband_cpld.cpp index 1c42daa0..ded20b48 100644 --- a/firmware/application/baseband_cpld.cpp +++ b/firmware/application/baseband_cpld.cpp @@ -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); } } diff --git a/firmware/application/baseband_cpld.hpp b/firmware/application/baseband_cpld.hpp index 5124ba7f..6bcb63aa 100644 --- a/firmware/application/baseband_cpld.hpp +++ b/firmware/application/baseband_cpld.hpp @@ -30,7 +30,7 @@ class CPLD { public: void init(); - void set_q_invert(const bool invert); + void set_invert(const bool invert); private: }; diff --git a/firmware/application/radio.cpp b/firmware/application/radio.cpp index 27cd253c..681f5560 100644 --- a/firmware/application/radio.cpp +++ b/firmware/application/radio.cpp @@ -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 { diff --git a/firmware/application/tuning.cpp b/firmware/application/tuning.cpp index 0ca8711b..310b3213 100644 --- a/firmware/application/tuning.cpp +++ b/firmware/application/tuning.cpp @@ -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 */ diff --git a/firmware/application/tuning.hpp b/firmware/application/tuning.hpp index 16b19fd9..16b4509a 100644 --- a/firmware/application/tuning.hpp +++ b/firmware/application/tuning.hpp @@ -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); diff --git a/firmware/common/hackrf_gpio.hpp b/firmware/common/hackrf_gpio.hpp index 62d32446..41f58fc9 100644 --- a/firmware/common/hackrf_gpio.hpp +++ b/firmware/common/hackrf_gpio.hpp @@ -71,7 +71,7 @@ constexpr GPIO gpio_max2837_txenable = gpio[GPIO2_4]; constexpr GPIO gpio_max5864_select = gpio[GPIO2_7]; -constexpr GPIO gpio_baseband_q_invert = gpio[GPIO0_13]; +constexpr GPIO gpio_baseband_invert = gpio[GPIO0_13]; constexpr GPIO gpio_cpld_tdo = gpio[GPIO5_18]; constexpr GPIO gpio_cpld_tck = gpio[GPIO3_0]; diff --git a/firmware/common/pins.hpp b/firmware/common/pins.hpp index 527e4485..76f1761d 100644 --- a/firmware/common/pins.hpp +++ b/firmware/common/pins.hpp @@ -61,7 +61,7 @@ constexpr Pin pins[] = { [P1_15] = { 1, 15, PinConfig::sgpio_inout_fast(2) }, /* SGPIO2/BANK2F3M9: CPLD.74/HOST_DATA2(IO) */ [P1_16] = { 1, 16, PinConfig::sgpio_inout_fast(2) }, /* SGPIO3/BANK2F3M10: CPLD.72/HOST_DATA3(IO) */ [P1_17] = { 1, 17, PinConfig::sgpio_out_fast_with_pullup(6) }, /* SGPIO11/P79/BANK2F3M11: CPLD.71/HOST_DIRECTION(I) */ - [P1_18] = { 1, 18, PinConfig::gpio_out_with_pulldown(0) }, /* SGPIO12/BANK2F3M12: CPLD.70/HOST_Q_INVERT(I) */ + [P1_18] = { 1, 18, PinConfig::gpio_out_with_pulldown(0) }, /* SGPIO12/BANK2F3M12: CPLD.70/HOST_INVERT(I) */ [P1_19] = { 1, 19, { .mode=1, .pd=1, .pu=0, .fast=0, .input=0, .ifilt=1 } }, /* SSP1_SCK/P39: MAX2837.SCLK(I), MAX5864.SCLK(I) */ [P1_20] = { 1, 20, { .mode=0, .pd=0, .pu=1, .fast=0, .input=0, .ifilt=1 } }, /* CS_XCVR/P53: MAX2837.CS(I) */ [P2_0] = { 2, 0, { .mode=4, .pd=0, .pu=1, .fast=0, .input=1, .ifilt=1 } }, /* U0_TXD: PortaPack P2_0/IO_STBX */