mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-04 08:55:21 -05:00
Fixed broken radio offset
This commit is contained in:
parent
d2e185a1fb
commit
51bc0f0100
@ -181,11 +181,12 @@ static PortaPackModel portapack_model() {
|
|||||||
static Optional<PortaPackModel> model;
|
static Optional<PortaPackModel> model;
|
||||||
|
|
||||||
if( !model.is_valid() ) {
|
if( !model.is_valid() ) {
|
||||||
if( audio_codec_wm8731.detected() ) {
|
// if( audio_codec_wm8731.detected() ) {
|
||||||
model = PortaPackModel::R1_20150901; // H1R1
|
// model = PortaPackModel::R1_20150901; // H1R1
|
||||||
} else {
|
// } else {
|
||||||
model = PortaPackModel::R2_20170522; // H1R2, H2+
|
// model = PortaPackModel::R2_20170522; // H1R2, H2+
|
||||||
}
|
// }
|
||||||
|
model = PortaPackModel::R2_20170522;
|
||||||
}
|
}
|
||||||
|
|
||||||
return model.value();
|
return model.value();
|
||||||
@ -361,7 +362,6 @@ bool init() {
|
|||||||
i2c0.stop();
|
i2c0.stop();
|
||||||
|
|
||||||
set_clock_config(clock_config_irc);
|
set_clock_config(clock_config_irc);
|
||||||
|
|
||||||
cgu::pll1::disable();
|
cgu::pll1::disable();
|
||||||
|
|
||||||
/* Incantation from LPC43xx UM10503 section 12.2.1.1, to bring the M4
|
/* Incantation from LPC43xx UM10503 section 12.2.1.1, to bring the M4
|
||||||
@ -411,12 +411,6 @@ bool init() {
|
|||||||
clock_manager.enable_codec_clocks();
|
clock_manager.enable_codec_clocks();
|
||||||
radio::init();
|
radio::init();
|
||||||
|
|
||||||
|
|
||||||
LPC_CREG->DMAMUX = portapack::gpdma_mux;
|
|
||||||
gpdma::controller.enable();
|
|
||||||
|
|
||||||
audio::init(portapack_audio_codec());
|
|
||||||
|
|
||||||
if( !portapack::cpld::update_if_necessary(portapack_cpld_config()) ) {
|
if( !portapack::cpld::update_if_necessary(portapack_cpld_config()) ) {
|
||||||
// If using a "2021/12 QFP100", press and hold the left button while booting. Should only need to do once.
|
// If using a "2021/12 QFP100", press and hold the left button while booting. Should only need to do once.
|
||||||
if (portapack::persistent_memory::config_cpld() != 3){
|
if (portapack::persistent_memory::config_cpld() != 3){
|
||||||
@ -429,6 +423,11 @@ bool init() {
|
|||||||
chSysHalt();
|
chSysHalt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LPC_CREG->DMAMUX = portapack::gpdma_mux;
|
||||||
|
gpdma::controller.enable();
|
||||||
|
|
||||||
|
audio::init(portapack_audio_codec());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,9 +83,6 @@ struct data_t {
|
|||||||
int32_t modem_baudrate;
|
int32_t modem_baudrate;
|
||||||
int32_t modem_repeat;
|
int32_t modem_repeat;
|
||||||
|
|
||||||
// Hardware
|
|
||||||
uint32_t hardware_config;
|
|
||||||
|
|
||||||
// Play dead unlock
|
// Play dead unlock
|
||||||
uint32_t playdead_magic;
|
uint32_t playdead_magic;
|
||||||
uint32_t playing_dead;
|
uint32_t playing_dead;
|
||||||
@ -98,6 +95,9 @@ struct data_t {
|
|||||||
uint32_t pocsag_ignore_address;
|
uint32_t pocsag_ignore_address;
|
||||||
|
|
||||||
int32_t tone_mix;
|
int32_t tone_mix;
|
||||||
|
|
||||||
|
// Hardware
|
||||||
|
uint32_t hardware_config;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(data_t) <= backup_ram.size(), "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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user