mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-24 06:44:25 -04:00
refactoring
This commit is contained in:
parent
bb90fdc5fc
commit
893df7272f
15 changed files with 40 additions and 1062 deletions
|
@ -26,34 +26,24 @@
|
|||
namespace ui {
|
||||
|
||||
SdOverUsbView::SdOverUsbView(NavigationView& nav) : nav_ (nav) {
|
||||
|
||||
sdcDisconnect(&SDCD1);
|
||||
sdcStop(&SDCD1);
|
||||
|
||||
portapack::shutdown();
|
||||
m4_init(portapack::spi_flash::image_tag_usb_sd, portapack::memory::map::m4_code, false);
|
||||
//m4_init(portapack::spi_flash::image_tag_hackrf, portapack::memory::map::m4_code_hackrf, true);
|
||||
m0_halt(); /* will not return*/
|
||||
//baseband::run_image();
|
||||
|
||||
|
||||
add_children({
|
||||
&labels,
|
||||
&button_close
|
||||
&button_run
|
||||
});
|
||||
|
||||
button_close.on_select = [this](Button&) {
|
||||
nav_.pop();
|
||||
button_run.on_select = [this](Button&) {
|
||||
sdcDisconnect(&SDCD1);
|
||||
sdcStop(&SDCD1);
|
||||
|
||||
portapack::shutdown(true);
|
||||
m4_init(portapack::spi_flash::image_tag_usb_sd, portapack::memory::map::m4_code, false);
|
||||
m0_halt();
|
||||
/* will not return*/
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
SdOverUsbView::~SdOverUsbView() {
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
void SdOverUsbView::focus() {
|
||||
button_close.focus();
|
||||
button_run.focus();
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue