comparison Discovery/Src/base.c @ 89:ff7775cc34c4 kittz

temp! full cyclic SPI
author Dmitry Romanov <kitt@bk.ru>
date Fri, 23 Nov 2018 16:52:21 +0300
parents 5f11787b4f42
children 8b0fadd413c6
comparison
equal deleted inserted replaced
88:3db7389d49cc 89:ff7775cc34c4
518 /// to be called 518 /// to be called
519 /// 519 ///
520 // =============================================================================== 520 // ===============================================================================
521 void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) 521 void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
522 { 522 {
523 DataEX_call();
523 #ifdef DEMOMODE 524 #ifdef DEMOMODE
524 if(htim->Instance==TIM7) 525 if(htim->Instance==TIM7)
525 { 526 {
526 HAL_GPIO_EXTI_Callback(demoGetCommand()); 527 HAL_GPIO_EXTI_Callback(demoGetCommand());
527 return; 528 return;
554 case BaseHome: 555 case BaseHome:
555 case BaseMenu: 556 case BaseMenu:
556 case BaseInfo: 557 case BaseInfo:
557 updateSetpointStateUsed(); 558 updateSetpointStateUsed();
558 DateEx_copy_to_dataOut(); 559 DateEx_copy_to_dataOut();
559 DataEX_call(); 560 // DataEX_call();
560 DataEX_copy_to_LifeData(&modeChange); 561 DataEX_copy_to_LifeData(&modeChange);
561 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99; 562 //foto session :-) stateRealGetPointerWrite()->lifeData.battery_charge = 99;
562 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99; 563 //foto session :-) stateSimGetPointerWrite()->lifeData.battery_charge = 99;
563 DataEX_copy_to_deco(); 564 DataEX_copy_to_deco();
564 if(stateUsed == stateSimGetPointer()) 565 if(stateUsed == stateSimGetPointer())
574 if(status.base == BaseHome) 575 if(status.base == BaseHome)
575 tMenuEdit_writeSettingsToFlash(); // takes 900 ms!! 576 tMenuEdit_writeSettingsToFlash(); // takes 900 ms!!
576 break; 577 break;
577 case BaseStop: 578 case BaseStop:
578 DateEx_copy_to_dataOut(); 579 DateEx_copy_to_dataOut();
579 DataEX_call(); 580 // DataEX_call();
580 DataEX_control_connection_while_asking_for_sleep(); 581 DataEX_control_connection_while_asking_for_sleep();
581 break; 582 break;
582 default: 583 default:
583 case BaseComm: 584 case BaseComm:
584 if(get_globalState() == StUART_RTECONNECT) 585 if(get_globalState() == StUART_RTECONNECT)
585 { 586 {
586 DateEx_copy_to_dataOut(); 587 DateEx_copy_to_dataOut();
587 DataEX_call(); 588 // DataEX_call();
588 DataEX_copy_to_LifeData(0); 589 DataEX_copy_to_LifeData(0);
589 } 590 }
590 break; 591 break;
591 } 592 }
592 593