mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-08 07:49:04 +00:00
Gpio modify v3 (#3238)
* Refactor GPIO mappings and definitions for improved clarity and functionality - Updated SCU_ARRAY_SIZE definitions in pal_lld.h for PRALINE and non-PRALINE configurations. - Modified pin mappings in gpio.hpp to reflect new hardware configurations, including additional control pins for RF and audio components. - Removed obsolete GPIO definitions from hackrf_gpio.hpp and streamlined the code for better maintainability. - Added new GPIO definitions for mix bypass, amplifier control, and other RF-related functionalities to enhance the system's capabilities. * Refactor GPIO mappings and update SCU_ARRAY_SIZE for LPC43xx platform - Updated SCU_ARRAY_SIZE to 80 for PRALINE configuration and 58 for others. - Added new GPIO mappings for auxiliary power control, antenna bias, and R9 clock enable signals in gpio.hpp. - Removed commented-out PPS output mapping in hackrf_gpio.hpp. - Adjusted GPIO definitions for R9 clock signals to ensure proper functionality. * Refactor RF path initialization and configuration for improved clarity and functionality * Refactor RF path configuration and GPIO mappings for improved clarity and functionality * Potential fix for pull request finding * comment * aux power polarrity * Fix formatting of pin_aux_power_enable declaration
This commit is contained in:
@@ -41,15 +41,15 @@ namespace path {
|
||||
|
||||
#ifdef PRALINE
|
||||
/* PRALINE: MAX2831 direct path is 2320-2740 MHz */
|
||||
constexpr FrequencyRange band_low{0, 2320'000'000};
|
||||
constexpr FrequencyRange band_high{2740'000'000, 7250'000'000};
|
||||
constexpr FrequencyRange band_mid{band_low.maximum, band_high.minimum};
|
||||
constexpr Frequency TRANSITION = 2320'000'000;
|
||||
#else
|
||||
/* HackRF One: Original band boundaries */
|
||||
constexpr FrequencyRange band_low{0, 2170'000'000};
|
||||
constexpr Frequency TRANSITION = 2170'000'000;
|
||||
#endif
|
||||
|
||||
constexpr FrequencyRange band_low{0, TRANSITION};
|
||||
constexpr FrequencyRange band_high{2740'000'000, 7250'000'000};
|
||||
constexpr FrequencyRange band_mid{band_low.maximum, band_high.minimum};
|
||||
#endif
|
||||
|
||||
enum class Band {
|
||||
/* Zero-based, used as index into frequency_bands table */
|
||||
@@ -61,23 +61,20 @@ enum class Band {
|
||||
class Path {
|
||||
public:
|
||||
void init();
|
||||
|
||||
void set_direction(const Direction direction);
|
||||
void set_band(const Band band);
|
||||
void set_rf_amp(const bool rf_amp);
|
||||
void set_ant_bias(const bool ant_bias);
|
||||
bool get_ant_bias() const;
|
||||
Band get_band() const { return _band; } //_band is used solely for debugging purposes.
|
||||
Band get_band() const { return band; }
|
||||
|
||||
private:
|
||||
Direction direction{Direction::Receive};
|
||||
Band band{Band::Mid};
|
||||
bool rf_amp{false};
|
||||
bool ant_bias{false};
|
||||
bool rf_amp_en{false};
|
||||
bool ant_bias_en{false};
|
||||
|
||||
void update();
|
||||
|
||||
Band _band{Band::Mid}; //_band is solely used of debugging purposes
|
||||
};
|
||||
|
||||
} // namespace path
|
||||
|
||||
Reference in New Issue
Block a user