![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
main.c
- Committer:
- Kovalev_D
- Date:
- 2017-09-04
- Revision:
- 216:189b0ea1dc38
- Parent:
- 215:b58b887fd367
- Child:
- 220:04c54405b82d
File content as of revision 216:189b0ea1dc38:
//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" /****************************************************************************** ** Main Function main() ******************************************************************************/ unsigned int addres; uint32_t Result[5]; extern uint32_t CMD_Mode; unsigned int secPuls; float DACF, K_DAC; int tempAMP; int temp=1; unsigned int status; unsigned int Para; int main (void) { SystemInit1(); // Инициализация контроллера: установка тактовых частот SystemCoreClockUpdate1(); // расчет тактовой частоты процессора перед инициализацией UART - 103MHz InitMCPWM(); Param_init(); GLD_Init(); /*if(Gyro.LG_Type==1) Gyro.RgConA = 0xff; else Gyro.RgConA = 0xfd; Gyro.RgConB = 0x4;*/ BackLightOFF LightUpOFF UART_InitSet (0, 921600, 0x03); UART_InitSet (1, 921600, 0x03); /* UART_InitSet (0, 115200, 0x03); UART_InitSet (1, 115200, 0x03); */ Out_G_photo(Gyro.Gain_Sin, Gyro.Gain_Cos); for(int q=0; q<300; q++) { BuffADC_1Point[CountV255] =0; } while ( 1 ) { if(Time1Hz<5) { ADC_64Point=0; ADC_32PointD=0; for(int q=0; q<64; q++) { BuffADC_znak [q] = 0; BuffADC_64Point [q] = 0; Buff_Restored_Mod [q] = 0; } } Event_1250Hz(); Event_100KHz(); Event_2KHz(); Event_1KHz(); Event_500Hz(); Event_250Hz(); Event_1Hz(); Event_Vibro(); G_Photo_Exchange(); Concol (); // Проврка 0 консоли (вход и выход) Concol1 (); // Проврка 1 консоли (вход и выход) Read_CMD(); if (OutBufConCount) OutBufConCount--; if (OutBufCon1Count) OutBufCon1Count--; TechLog();//технологическая выдача //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////выдача параметров через Rate//////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// M_RateA(); AllRegul(); ///////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////Работа с Flash////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// switch(Gyro.FlashMod) { case 1: GoBoot(); break; case 2: WriteFlash(); break; case 3: ReadFlash(); break; case 4: EraseFlash(); break; } BackLightOFF BackLightOFF BackLightOFF } }//main /****************************************************************************** ** End Of File ******************************************************************************/