diff Discovery/Src/base.c @ 132:135eae957389 FlipDisplay

Add compile switch to disable optimization for specific function
author Ideenmodellierer
date Tue, 19 Feb 2019 18:13:18 +0100
parents b848056057ce
children cc9c18075e00
line wrap: on
line diff
--- a/Discovery/Src/base.c	Sun Feb 17 21:29:38 2019 +0100
+++ b/Discovery/Src/base.c	Tue Feb 19 18:13:18 2019 +0100
@@ -589,12 +589,14 @@
     case BaseMenu:
     case BaseInfo:
         updateSetpointStateUsed();
+
         DateEx_copy_to_dataOut();
-        DataEX_call();
         DataEX_copy_to_LifeData(&modeChange);
 //foto session :-)  stateRealGetPointerWrite()->lifeData.battery_charge = 99;
 //foto session :-)  stateSimGetPointerWrite()->lifeData.battery_charge = 99;
         DataEX_copy_to_deco();
+        DataEX_call();
+
         if(stateUsed == stateSimGetPointer())
             simulation_UpdateLifeData(1);
         check_warning();
@@ -602,7 +604,7 @@
             logbook_InitAndWrite();
         updateMiniLiveLogbook(1);
         timer_UpdateSecond(1);
-base_tempLightLevel =			TIM_BACKLIGHT_adjust();
+        base_tempLightLevel = TIM_BACKLIGHT_adjust();
         tCCR_tick();
         tHome_tick();
         if(status.base == BaseHome)
@@ -1097,7 +1099,7 @@
 }
 
 
-void delayMicros(uint32_t micros)
+__attribute__((optimize("O0"))) void delayMicros(uint32_t micros)
 {
     micros = micros * (168/4) - 10;
     while(micros--);