mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-13 03:34:35 +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:
parent
b0a3f680e5
commit
77016b9a40
@ -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);
|
||||
|
@ -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];
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user