comparison 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
comparison
equal deleted inserted replaced
131:f35e53ef04e0 132:135eae957389
587 { 587 {
588 case BaseHome: 588 case BaseHome:
589 case BaseMenu: 589 case BaseMenu:
590 case BaseInfo: 590 case BaseInfo:
591 updateSetpointStateUsed(); 591 updateSetpointStateUsed();
592
592 DateEx_copy_to_dataOut(); 593 DateEx_copy_to_dataOut();
593 DataEX_call();
594 DataEX_copy_to_LifeData(&modeChange); 594 DataEX_copy_to_LifeData(&modeChange);
595 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99; 595 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99;
596 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99; 596 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99;
597 DataEX_copy_to_deco(); 597 DataEX_copy_to_deco();
598 DataEX_call();
599
598 if(stateUsed == stateSimGetPointer()) 600 if(stateUsed == stateSimGetPointer())
599 simulation_UpdateLifeData(1); 601 simulation_UpdateLifeData(1);
600 check_warning(); 602 check_warning();
601 if(stateUsed == stateRealGetPointer()) 603 if(stateUsed == stateRealGetPointer())
602 logbook_InitAndWrite(); 604 logbook_InitAndWrite();
603 updateMiniLiveLogbook(1); 605 updateMiniLiveLogbook(1);
604 timer_UpdateSecond(1); 606 timer_UpdateSecond(1);
605 base_tempLightLevel = TIM_BACKLIGHT_adjust(); 607 base_tempLightLevel = TIM_BACKLIGHT_adjust();
606 tCCR_tick(); 608 tCCR_tick();
607 tHome_tick(); 609 tHome_tick();
608 if(status.base == BaseHome) 610 if(status.base == BaseHome)
609 tMenuEdit_writeSettingsToFlash(); // takes 900 ms!! 611 tMenuEdit_writeSettingsToFlash(); // takes 900 ms!!
610 break; 612 break;
1095 1097
1096 return 1; 1098 return 1;
1097 } 1099 }
1098 1100
1099 1101
1100 void delayMicros(uint32_t micros) 1102 __attribute__((optimize("O0"))) void delayMicros(uint32_t micros)
1101 { 1103 {
1102 micros = micros * (168/4) - 10; 1104 micros = micros * (168/4) - 10;
1103 while(micros--); 1105 while(micros--);
1104 } 1106 }
1105 1107