Bsongis/ram saving (#6685)
RAM saving. Stacks reduced to have some more RAM available than 2.2 on all boards
This commit is contained in:
+5
-6
@@ -490,24 +490,23 @@ void perMain()
|
||||
event_t evt = getEvent(false);
|
||||
|
||||
#if defined(RAMBACKUP)
|
||||
if (unexpectedShutdown) {
|
||||
if (globalData.unexpectedShutdown) {
|
||||
drawFatalErrorScreen(STR_EMERGENCY_MODE);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
static bool sdcard_present_before = SD_CARD_PRESENT();
|
||||
bool sdcard_present_now = SD_CARD_PRESENT();
|
||||
if (sdcard_present_now && !sdcard_present_before) {
|
||||
bool sdcardPresent = SD_CARD_PRESENT();
|
||||
if (sdcardPresent && !globalData.sdcardPresent) {
|
||||
sdMount();
|
||||
}
|
||||
sdcard_present_before = sdcard_present_now;
|
||||
globalData.sdcardPresent = sdcardPresent;
|
||||
#endif
|
||||
|
||||
#if !defined(EEPROM)
|
||||
// In case the SD card is removed during the session
|
||||
if (!SD_CARD_PRESENT() && !unexpectedShutdown) {
|
||||
if (!SD_CARD_PRESENT() && !globalData.unexpectedShutdown) {
|
||||
drawFatalErrorScreen(STR_NO_SDCARD);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user