diff options
| author | Jean-François Milants <jf@codingfield.com> | 2024-07-23 19:27:19 +0200 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2024-08-05 20:34:41 +0200 |
| commit | 3a0d673df420411a4db3a2acf57d04436446430c (patch) | |
| tree | 45b94f7999fe704f4d3fb5c0a17463da9b200915 /src/displayapp/screens | |
| parent | 53dc9dafe7c4b3a9be89724df2226715d6626651 (diff) | |
Display the SPI flash JEDEC IDs in SystemInformation.
This is needed since a new memory chip will be used in future batches of PineTimes.
Diffstat (limited to 'src/displayapp/screens')
| -rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 11 | ||||
| -rw-r--r-- | src/displayapp/screens/SystemInfo.h | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 18fb7ad2..dd39f88a 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -38,7 +38,8 @@ SystemInfo::SystemInfo(Pinetime::Applications::DisplayApp* app, const Pinetime::Controllers::Ble& bleController, const Pinetime::Drivers::Watchdog& watchdog, Pinetime::Controllers::MotionController& motionController, - const Pinetime::Drivers::Cst816S& touchPanel) + const Pinetime::Drivers::Cst816S& touchPanel, + const Pinetime::Drivers::SpiNorFlash& spiNorFlash) : app {app}, dateTimeController {dateTimeController}, batteryController {batteryController}, @@ -47,6 +48,7 @@ SystemInfo::SystemInfo(Pinetime::Applications::DisplayApp* app, watchdog {watchdog}, motionController {motionController}, touchPanel {touchPanel}, + spiNorFlash {spiNorFlash}, screens {app, 0, {[this]() -> std::unique_ptr<Screen> { @@ -186,10 +188,12 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() { lv_obj_t* label = lv_label_create(lv_scr_act(), nullptr); lv_label_set_recolor(label, true); const auto& bleAddr = bleController.Address(); + auto spiFlashId = spiNorFlash.GetIdentification(); lv_label_set_text_fmt(label, "#808080 BLE MAC#\n" - " %02x:%02x:%02x:%02x:%02x:%02x" + " %02x:%02x:%02x:%02x:%02x:%02x\n" "\n" + "#808080 SPI Flash# %02x-%02x-%02x\n" "\n" "#808080 Memory heap#\n" " #808080 Free# %d\n" @@ -202,6 +206,9 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() { bleAddr[2], bleAddr[1], bleAddr[0], + spiFlashId.manufacturer, + spiFlashId.type, + spiFlashId.density, xPortGetFreeHeapSize(), xPortGetMinimumEverFreeHeapSize(), mallocFailedCount, diff --git a/src/displayapp/screens/SystemInfo.h b/src/displayapp/screens/SystemInfo.h index 199af51e..3129c463 100644 --- a/src/displayapp/screens/SystemInfo.h +++ b/src/displayapp/screens/SystemInfo.h @@ -29,7 +29,8 @@ namespace Pinetime { const Pinetime::Controllers::Ble& bleController, const Pinetime::Drivers::Watchdog& watchdog, Pinetime::Controllers::MotionController& motionController, - const Pinetime::Drivers::Cst816S& touchPanel); + const Pinetime::Drivers::Cst816S& touchPanel, + const Pinetime::Drivers::SpiNorFlash& spiNorFlash); ~SystemInfo() override; bool OnTouchEvent(TouchEvents event) override; @@ -42,6 +43,7 @@ namespace Pinetime { const Pinetime::Drivers::Watchdog& watchdog; Pinetime::Controllers::MotionController& motionController; const Pinetime::Drivers::Cst816S& touchPanel; + const Pinetime::Drivers::SpiNorFlash& spiNorFlash; ScreenList<5> screens; |
