refactoring

This commit is contained in:
Bernd Herzog 2023-04-01 18:36:57 +02:00
parent bb90fdc5fc
commit 893df7272f
15 changed files with 40 additions and 1062 deletions

View file

@ -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 */