mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-06-20 07:28:29 +00:00
Added Reboot app to Debug menu (#1904)
This commit is contained in:
parent
24605777a6
commit
d04c781ada
@ -457,6 +457,17 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) {
|
|||||||
set_max_rows(2); // allow wider buttons
|
set_max_rows(2); // allow wider buttons
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* DebugReboot **********************************************/
|
||||||
|
|
||||||
|
DebugReboot::DebugReboot(NavigationView& nav) {
|
||||||
|
(void)nav;
|
||||||
|
|
||||||
|
LPC_RGU->RESET_CTRL[0] = (1 << 0);
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
__WFE();
|
||||||
|
}
|
||||||
|
|
||||||
/* DebugMenuView *********************************************************/
|
/* DebugMenuView *********************************************************/
|
||||||
|
|
||||||
DebugMenuView::DebugMenuView(NavigationView& nav) {
|
DebugMenuView::DebugMenuView(NavigationView& nav) {
|
||||||
@ -472,6 +483,7 @@ DebugMenuView::DebugMenuView(NavigationView& nav) {
|
|||||||
{"Peripherals", ui::Color::dark_cyan(), &bitmap_icon_peripherals, [&nav]() { nav.push<DebugPeripheralsMenuView>(); }},
|
{"Peripherals", ui::Color::dark_cyan(), &bitmap_icon_peripherals, [&nav]() { nav.push<DebugPeripheralsMenuView>(); }},
|
||||||
{"Pers. Memory", ui::Color::dark_cyan(), &bitmap_icon_memory, [&nav]() { nav.push<DebugPmemView>(); }},
|
{"Pers. Memory", ui::Color::dark_cyan(), &bitmap_icon_memory, [&nav]() { nav.push<DebugPmemView>(); }},
|
||||||
//{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
|
//{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
|
{"Reboot", ui::Color::dark_cyan(), &bitmap_icon_setup, [&nav]() { nav.push<DebugReboot>(); }},
|
||||||
{"SD Card", ui::Color::dark_cyan(), &bitmap_icon_sdcard, [&nav]() { nav.push<SDCardDebugView>(); }},
|
{"SD Card", ui::Color::dark_cyan(), &bitmap_icon_sdcard, [&nav]() { nav.push<SDCardDebugView>(); }},
|
||||||
{"Temperature", ui::Color::dark_cyan(), &bitmap_icon_temperature, [&nav]() { nav.push<TemperatureView>(); }},
|
{"Temperature", ui::Color::dark_cyan(), &bitmap_icon_temperature, [&nav]() { nav.push<TemperatureView>(); }},
|
||||||
{"Touch Test", ui::Color::dark_cyan(), &bitmap_icon_notepad, [&nav]() { nav.push<DebugScreenTest>(); }},
|
{"Touch Test", ui::Color::dark_cyan(), &bitmap_icon_notepad, [&nav]() { nav.push<DebugScreenTest>(); }},
|
||||||
|
@ -424,6 +424,11 @@ class DebugPeripheralsMenuView : public BtnGridView {
|
|||||||
std::string title() const override { return "Peripherals"; };
|
std::string title() const override { return "Peripherals"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DebugReboot : public BtnGridView {
|
||||||
|
public:
|
||||||
|
DebugReboot(NavigationView& nav);
|
||||||
|
};
|
||||||
|
|
||||||
class DebugMenuView : public BtnGridView {
|
class DebugMenuView : public BtnGridView {
|
||||||
public:
|
public:
|
||||||
DebugMenuView(NavigationView& nav);
|
DebugMenuView(NavigationView& nav);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user