mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-14 09:25:30 -04:00
Merge remote-tracking branch 'upstream/master'
Conflicts: firmware/application/Makefile firmware/application/core_control.cpp firmware/application/touch.cpp firmware/application/ui_debug.cpp firmware/application/ui_debug.hpp firmware/application/ui_navigation.cpp firmware/baseband/baseband_thread.cpp
This commit is contained in:
commit
1b0da68d65
252 changed files with 10752 additions and 7183 deletions
|
@ -21,10 +21,15 @@
|
|||
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
#include "utility.hpp"
|
||||
|
||||
#include "memory_map.hpp"
|
||||
using portapack::memory::map::backup_ram;
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
|
@ -70,9 +75,9 @@ struct data_t {
|
|||
int32_t ui_config;
|
||||
};
|
||||
|
||||
static_assert(sizeof(data_t) <= 0x100, "Persistent memory structure too large for VBAT-maintained region");
|
||||
static_assert(sizeof(data_t) <= backup_ram.size(), "Persistent memory structure too large for VBAT-maintained region");
|
||||
|
||||
static data_t* const data = reinterpret_cast<data_t*>(LPC_BACKUP_REG_BASE);
|
||||
static data_t* const data = reinterpret_cast<data_t*>(backup_ram.base());
|
||||
|
||||
rf::Frequency tuned_frequency() {
|
||||
rf::tuning_range.reset_if_outside(data->tuned_frequency, tuned_frequency_reset_value);
|
||||
|
@ -89,7 +94,9 @@ ppb_t correction_ppb() {
|
|||
}
|
||||
|
||||
void set_correction_ppb(const ppb_t new_value) {
|
||||
data->correction_ppb = ppb_range.clip(new_value);
|
||||
const auto clipped_value = ppb_range.clip(new_value);
|
||||
data->correction_ppb = clipped_value;
|
||||
portapack::clock_manager.set_reference_ppb(clipped_value);
|
||||
}
|
||||
|
||||
int32_t afsk_mark_freq() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue