Wrap baseband sampling rate function to radio:: function.

This commit is contained in:
Jared Boone 2016-02-05 16:36:36 -08:00
parent 0294165481
commit 682c87e3ff
3 changed files with 6 additions and 1 deletions

View File

@ -148,6 +148,10 @@ void set_baseband_filter_bandwidth(const uint32_t bandwidth_minimum) {
second_if.set_lpf_rf_bandwidth(bandwidth_minimum);
}
void set_baseband_rate(const uint32_t rate) {
portapack::clock_manager.set_sampling_frequency(rate);
}
void set_baseband_decimation_by(const size_t n) {
baseband_cpld.set_decimation_by(n);
}

View File

@ -41,6 +41,7 @@ void set_lna_gain(const int_fast8_t db);
void set_vga_gain(const int_fast8_t db);
void set_sampling_frequency(const uint32_t frequency);
void set_baseband_filter_bandwidth(const uint32_t bandwidth_minimum);
void set_baseband_rate(const uint32_t rate);
void set_baseband_decimation_by(const size_t n);
void set_antenna_bias(const bool on);

View File

@ -304,7 +304,7 @@ void ReceiverModel::update_baseband_configuration() {
// Disabling baseband while changing sampling rates seems like a good idea...
baseband_disable();
clock_manager.set_sampling_frequency(sampling_rate() * baseband_oversampling());
radio::set_baseband_rate(sampling_rate() * baseband_oversampling());
update_tuning_frequency();
radio::set_baseband_decimation_by(baseband_oversampling());