mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Move CPLD management into PortaPack::init().
This commit is contained in:
parent
5390c45e04
commit
c0b9761fe5
@ -24,8 +24,6 @@
|
|||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
#include "portapack_shared_memory.hpp"
|
#include "portapack_shared_memory.hpp"
|
||||||
|
|
||||||
#include "cpld_update.hpp"
|
|
||||||
|
|
||||||
#include "message_queue.hpp"
|
#include "message_queue.hpp"
|
||||||
|
|
||||||
#include "ui.hpp"
|
#include "ui.hpp"
|
||||||
@ -72,14 +70,6 @@ static void event_loop() {
|
|||||||
int main(void) {
|
int main(void) {
|
||||||
portapack::init();
|
portapack::init();
|
||||||
|
|
||||||
if( !cpld_update_if_necessary() ) {
|
|
||||||
chSysHalt();
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !cpld_hackrf_load_sram() ) {
|
|
||||||
chSysHalt();
|
|
||||||
}
|
|
||||||
|
|
||||||
portapack::io.init();
|
portapack::io.init();
|
||||||
portapack::display.init();
|
portapack::display.init();
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ using namespace hackrf::one;
|
|||||||
#include "touch_adc.hpp"
|
#include "touch_adc.hpp"
|
||||||
#include "audio.hpp"
|
#include "audio.hpp"
|
||||||
|
|
||||||
|
#include "cpld_update.hpp"
|
||||||
|
|
||||||
namespace portapack {
|
namespace portapack {
|
||||||
|
|
||||||
portapack::IO io {
|
portapack::IO io {
|
||||||
@ -149,6 +151,14 @@ void init() {
|
|||||||
radio::init();
|
radio::init();
|
||||||
|
|
||||||
touch::adc::init();
|
touch::adc::init();
|
||||||
|
|
||||||
|
if( !cpld_update_if_necessary() ) {
|
||||||
|
chSysHalt();
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !cpld_hackrf_load_sram() ) {
|
||||||
|
chSysHalt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void shutdown() {
|
void shutdown() {
|
||||||
|
Loading…
Reference in New Issue
Block a user