![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
main.c
- Committer:
- Kovalev_D
- Date:
- 2016-09-15
- Revision:
- 193:a0fe8bfc97e4
- Parent:
- 191:40028201ddad
- Child:
- 195:bcc769f5292b
File content as of revision 193:a0fe8bfc97e4:
//ssdfwewedfsfds /****************************************Copyright (c)**************************************************** **--------------File Info--------------------------------------------------------------------------------- ** File name: main.c ** Last modified Date: 2011-10-24 ** Last Version: V1.00 ** Descriptions: The main() function ** **-------------------------------------------------------------------------------------------------------- ** Created by: Electrooptica Incorp. ** Created date: 2011-08-22 ** Version: V1.00 ** Descriptions: **-------------------------------------------------------------------------------------------------------- *********************************************************************************************************/ #include "Global.h" #include "Device.h" /****************************************************************************** ** Main Function main() ******************************************************************************/ extern Device device; //Single global for all device hardware-independent algorithm unsigned int addres; uint32_t Result[5]; extern uint32_t CMD_Mode; unsigned int secPuls; float DACF, K_DAC; int tempAMP; int temp; unsigned int status; unsigned int Para; int main (void) { SystemInit1(); // Инициализация контроллера: установка тактовых частот SystemCoreClockUpdate1(); // расчет тактовой частоты процессора перед инициализацией UART - 103MHz GLD_Init(); BackLightOFF LightUpOFF //UART_InitSet (0, 115200, 0x03); UART_InitSet (0, 921600, 0x03); //UART_InitSet (1, 115200, 0x03); UART_InitSet (1, 921600, 0x03); Out_G_photo(Gyro.Gain_Sin, Gyro.Gain_Cos); // WriteCon1("\n\r 123456789...GL start programm uart ACK.... "); // WriteCon("\n\r ...GL start programm uart Tech.... "); //sprintf(Time,"\r\nCompiled: %s %s.",__DATE__, __TIME__ ); //Подготовка даты и времени компиляции // WriteCon(Time); while ( 1 ){ //основной цикл. BackLightON G_Photo_Exchange(); Concol (); // Проврка 0 консоли (вход и выход) Concol1 (); // Проврка 0 консоли (вход и выход) Read_CMD(); if (OutBufConCount) OutBufConCount--; if (OutBufCon1Count) OutBufCon1Count--; TechLog();//технологическая выдача Event_100KHz(); Event_1KHz(); Event_500Hz(); Event_1Hz(); Event_Vibro(); if(Gyro.QEIznak1) {/*событие перехода востановленного синуса от - к +*/} if(Gyro.DeltaEXT_Event){Gyro.DeltaEXT_Event=0;} /*else LoopOff*/ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////выдача параметров через Rate//////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// M_RateA(); AllRegul(); ///////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////Работа с Flash////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// if(Gyro.FlashMod == 1) {GoBoot(); } if(Gyro.FlashMod == 2) {WriteFlash(); } if(Gyro.FlashMod == 3) {ReadFlash(); } BackLightOFF } }//main /****************************************************************************** ** End Of File ******************************************************************************/