mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 15:29:28 -05: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 "touch_adc.hpp"
|
||||||
|
|
||||||
#include "m4_startup.hpp"
|
|
||||||
#include "spi_image.hpp"
|
|
||||||
|
|
||||||
namespace portapack {
|
namespace portapack {
|
||||||
|
|
||||||
portapack::IO io {
|
portapack::IO io {
|
||||||
@ -157,11 +154,6 @@ void shutdown() {
|
|||||||
|
|
||||||
chSysDisable();
|
chSysDisable();
|
||||||
hackrf::one::reset();
|
hackrf::one::reset();
|
||||||
m4_init(portapack::spi_flash::hackrf, reinterpret_cast<void*>(0x10000000));
|
|
||||||
|
|
||||||
while(true) {
|
|
||||||
__WFE();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
#include "ui_receiver.hpp"
|
#include "ui_receiver.hpp"
|
||||||
|
|
||||||
#include "portapack.hpp"
|
#include "portapack.hpp"
|
||||||
|
#include "m4_startup.hpp"
|
||||||
|
#include "spi_image.hpp"
|
||||||
|
using namespace portapack;
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
@ -98,7 +101,7 @@ void NavigationView::focus() {
|
|||||||
|
|
||||||
SystemMenuView::SystemMenuView(NavigationView& nav) {
|
SystemMenuView::SystemMenuView(NavigationView& nav) {
|
||||||
add_items<7>({ {
|
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 }); } },
|
{ "Capture", [&nav](){ nav.push(new NotImplementedView { nav }); } },
|
||||||
{ "Analyze", [&nav](){ nav.push(new NotImplementedView { nav }); } },
|
{ "Analyze", [&nav](){ nav.push(new NotImplementedView { nav }); } },
|
||||||
{ "Setup", [&nav](){ nav.push(new SetupMenuView { nav }); } },
|
{ "Setup", [&nav](){ nav.push(new SetupMenuView { nav }); } },
|
||||||
@ -151,7 +154,13 @@ Context& SystemView::context() const {
|
|||||||
|
|
||||||
HackRFFirmwareView::HackRFFirmwareView(NavigationView& nav) {
|
HackRFFirmwareView::HackRFFirmwareView(NavigationView& nav) {
|
||||||
button_yes.on_select = [&nav](Button&){
|
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&){
|
button_no.on_select = [&nav](Button&){
|
||||||
|
Loading…
Reference in New Issue
Block a user