diff options
author | Ben V. Brown <[email protected]> | 2023-08-01 21:18:27 +1000 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2023-08-01 21:18:27 +1000 |
commit | 80c4b58976268849b6d1c8d38df60ac5a547f5c3 (patch) | |
tree | 939d0de6d3c86e0750323683b8f69a4ad70759c7 | |
parent | a7df1cc5be6ca855da3bd1424c0714e2f570911d (diff) | |
download | IronOS-80c4b58976268849b6d1c8d38df60ac5a547f5c3.tar.gz IronOS-80c4b58976268849b6d1c8d38df60ac5a547f5c3.zip |
Abstract out showing bootlogo
To improve support on PinecilV2
-rw-r--r-- | source/Core/BSP/BSP.h | 3 | ||||
-rw-r--r-- | source/Core/BSP/MHP30/BSP.cpp | 5 | ||||
-rw-r--r-- | source/Core/BSP/Miniware/BSP.cpp | 5 | ||||
-rw-r--r-- | source/Core/BSP/Pinecil/BSP.cpp | 5 | ||||
-rw-r--r-- | source/Core/BSP/Pinecilv2/BSP.cpp | 11 | ||||
-rw-r--r-- | source/Core/BSP/Sequre_S60/BSP.cpp | 5 | ||||
-rw-r--r-- | source/Core/Threads/GUIThread.cpp | 3 |
7 files changed, 30 insertions, 7 deletions
diff --git a/source/Core/BSP/BSP.h b/source/Core/BSP/BSP.h index 732a3adc..3874ec53 100644 --- a/source/Core/BSP/BSP.h +++ b/source/Core/BSP/BSP.h @@ -101,6 +101,9 @@ void setBuzzer(bool on); // For example, on the MHP30 this is used to figure out the resistance of the hotplate
uint8_t preStartChecks();
uint8_t preStartChecksDone();
+
+// Show the boot logo
+void showBootLogo(void);
#ifdef __cplusplus
}
#endif
diff --git a/source/Core/BSP/MHP30/BSP.cpp b/source/Core/BSP/MHP30/BSP.cpp index ad3328f9..7d42019f 100644 --- a/source/Core/BSP/MHP30/BSP.cpp +++ b/source/Core/BSP/MHP30/BSP.cpp @@ -1,6 +1,7 @@ // BSP mapping functions
#include "BSP.h"
+#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "Pins.h"
#include "Setup.h"
@@ -472,4 +473,6 @@ uint64_t getDeviceID() { uint8_t preStartChecksDone() { return 1; }
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
-uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
\ No newline at end of file +uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
+
+void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }
diff --git a/source/Core/BSP/Miniware/BSP.cpp b/source/Core/BSP/Miniware/BSP.cpp index f1461258..ef2e67c7 100644 --- a/source/Core/BSP/Miniware/BSP.cpp +++ b/source/Core/BSP/Miniware/BSP.cpp @@ -1,6 +1,7 @@ // BSP mapping functions
#include "BSP.h"
+#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "Pins.h"
#include "Setup.h"
@@ -407,4 +408,6 @@ uint8_t getTipInertia() { #else
return TIP_THERMAL_MASS;
#endif
-}
\ No newline at end of file +}
+
+void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }
diff --git a/source/Core/BSP/Pinecil/BSP.cpp b/source/Core/BSP/Pinecil/BSP.cpp index bbbfbb19..dd8c7787 100644 --- a/source/Core/BSP/Pinecil/BSP.cpp +++ b/source/Core/BSP/Pinecil/BSP.cpp @@ -1,6 +1,7 @@ // BSP mapping functions
#include "BSP.h"
+#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "IRQ.h"
#include "Pins.h"
@@ -97,4 +98,6 @@ uint8_t getTipResistanceX10() { return TIP_RESISTANCE; } uint8_t preStartChecksDone() { return 1; }
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
-uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
\ No newline at end of file +uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
+
+void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }
diff --git a/source/Core/BSP/Pinecilv2/BSP.cpp b/source/Core/BSP/Pinecilv2/BSP.cpp index 28646a18..75255ac8 100644 --- a/source/Core/BSP/Pinecilv2/BSP.cpp +++ b/source/Core/BSP/Pinecilv2/BSP.cpp @@ -1,6 +1,7 @@ // BSP mapping functions
#include "BSP.h"
+#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "IRQ.h"
#include "Pins.h"
@@ -10,6 +11,7 @@ #include "Utils.h"
#include "configuration.h"
#include "crc32.h"
+#include "hal_flash.h"
#include "history.hpp"
#include "main.hpp"
@@ -278,4 +280,11 @@ uint8_t getDeviceValidationStatus() { uint32_t programmedHash = EF_Ctrl_Get_Key_Slot_w1();
uint32_t computedHash = gethash();
return programmedHash == computedHash ? 0 : 1;
-}
\ No newline at end of file +}
+
+void showBootLogo(void) {
+ uint8_t scratch[1024];
+ flash_read(FLASH_LOGOADDR - 0x23000000, scratch, 1024);
+
+ BootLogo::handleShowingLogo(scratch);
+}
diff --git a/source/Core/BSP/Sequre_S60/BSP.cpp b/source/Core/BSP/Sequre_S60/BSP.cpp index a5eea65b..f0991fcc 100644 --- a/source/Core/BSP/Sequre_S60/BSP.cpp +++ b/source/Core/BSP/Sequre_S60/BSP.cpp @@ -1,6 +1,7 @@ // BSP mapping functions
#include "BSP.h"
+#include "BootLogo.h"
#include "HUB238.hpp"
#include "I2C_Wrapper.hpp"
#include "Pins.h"
@@ -236,4 +237,6 @@ uint8_t preStartChecksDone() { return 1; } uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint8_t getTipInertia() { return TIP_THERMAL_INERTIA; }
-void setBuzzer(bool on) {}
\ No newline at end of file +void setBuzzer(bool on) {}
+
+void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }
diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 97b0eddc..56dc6574 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -76,8 +76,7 @@ void startGUITask(void const *argument) { currentTempTargetDegC = min(sleepTempDegC, 75); } - BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); - + showBootLogo(); showWarnings(); if (getSettingValue(SettingsOptions::AutoStartMode)) { // jump directly to the autostart mode |