mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-02 05:32:34 -04:00
Move HackRF firmware launch out of portapack::shutdown
This commit is contained in:
parent
96babc3e84
commit
e6a3cba14e
2 changed files with 11 additions and 10 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue