aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/SystemInfo.cpp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2024-07-23 19:27:19 +0200
committerJF <JF002@users.noreply.github.com>2024-08-05 20:34:41 +0200
commit3a0d673df420411a4db3a2acf57d04436446430c (patch)
tree45b94f7999fe704f4d3fb5c0a17463da9b200915 /src/displayapp/screens/SystemInfo.cpp
parent53dc9dafe7c4b3a9be89724df2226715d6626651 (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/SystemInfo.cpp')
-rw-r--r--src/displayapp/screens/SystemInfo.cpp11
1 files changed, 9 insertions, 2 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,