mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Move HackRF firmware launch out of portapack::shutdown
This commit is contained in:
parent
96babc3e84
commit
e6a3cba14e
@ -33,9 +33,6 @@ using namespace hackrf::one;
|
||||
|
||||
#include "touch_adc.hpp"
|
||||
|
||||
#include "m4_startup.hpp"
|
||||
#include "spi_image.hpp"
|
||||
|
||||
namespace portapack {
|
||||
|
||||
portapack::IO io {
|
||||
@ -157,11 +154,6 @@ void shutdown() {
|
||||
|
||||
chSysDisable();
|
||||
hackrf::one::reset();
|
||||
m4_init(portapack::spi_flash::hackrf, reinterpret_cast<void*>(0x10000000));
|
||||
|
||||
while(true) {
|
||||
__WFE();
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
@ -28,6 +28,9 @@
|
||||
#include "ui_receiver.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
#include "m4_startup.hpp"
|
||||
#include "spi_image.hpp"
|
||||
using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
|
||||
@ -98,7 +101,7 @@ void NavigationView::focus() {
|
||||
|
||||
SystemMenuView::SystemMenuView(NavigationView& nav) {
|
||||
add_items<7>({ {
|
||||
{ "Receiver", [&nav](){ nav.push(new ReceiverView { nav, portapack::receiver_model }); } },
|
||||
{ "Receiver", [&nav](){ nav.push(new ReceiverView { nav, receiver_model }); } },
|
||||
{ "Capture", [&nav](){ nav.push(new NotImplementedView { nav }); } },
|
||||
{ "Analyze", [&nav](){ nav.push(new NotImplementedView { nav }); } },
|
||||
{ "Setup", [&nav](){ nav.push(new SetupMenuView { nav }); } },
|
||||
@ -151,7 +154,13 @@ Context& SystemView::context() const {
|
||||
|
||||
HackRFFirmwareView::HackRFFirmwareView(NavigationView& nav) {
|
||||
button_yes.on_select = [&nav](Button&){
|
||||
portapack::shutdown();
|
||||
shutdown();
|
||||
|
||||
m4_init(spi_flash::hackrf, reinterpret_cast<void*>(0x10000000));
|
||||
|
||||
while(true) {
|
||||
__WFE();
|
||||
}
|
||||
};
|
||||
|
||||
button_no.on_select = [&nav](Button&){
|
||||
|
Loading…
Reference in New Issue
Block a user