Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LG2 by
main.c
00001 //ssdfwewedfsfds 00002 /****************************************Copyright (c)**************************************************** 00003 **--------------File Info--------------------------------------------------------------------------------- 00004 ** File name: main.c 00005 ** Last modified Date: 2011-10-24 00006 ** Last Version: V1.00 00007 ** Descriptions: The main() function 00008 ** 00009 **-------------------------------------------------------------------------------------------------------- 00010 ** Created by: Electrooptica Incorp. 00011 ** Created date: 2011-08-22 00012 ** Version: V1.00 00013 ** Descriptions: 00014 **-------------------------------------------------------------------------------------------------------- 00015 *********************************************************************************************************/ 00016 #include "Global.h" 00017 00018 /****************************************************************************** 00019 ** Main Function main() 00020 ******************************************************************************/ 00021 00022 unsigned int addres; 00023 uint32_t Result[5]; 00024 extern uint32_t CMD_Mode; 00025 unsigned int secPuls; 00026 float DACF, K_DAC; 00027 int tempAMP; 00028 int temp=1; 00029 unsigned int status,count10vOut; 00030 unsigned int Para; 00031 unsigned int AMPSUM2; 00032 int main (void) 00033 { 00034 SystemInit1(); // Инициализация контроллера: установка тактовых частот 00035 SystemCoreClockUpdate1(); // расчет тактовой частоты процессора перед инициализацией UART - 103MHz 00036 InitMCPWM(); 00037 Param_init(); 00038 GLD_Init(); 00039 00040 /*if(Gyro.LG_Type==1) Gyro.RgConA = 0xff; 00041 else Gyro.RgConA = 0xfd; 00042 Gyro.RgConB = 0x4;*/ 00043 00044 BackLightOFF 00045 LightUpOFF 00046 00047 UART_InitSet (0, 921600, 0x03); 00048 UART_InitSet (1, 921600, 0x03); 00049 /* 00050 UART_InitSet (0, 115200, 0x03); 00051 UART_InitSet (1, 115200, 0x03); */ 00052 Out_G_photo(Gyro.Gain_Sin, Gyro.Gain_Cos); 00053 for(int q=0; q<300; q++) 00054 { 00055 BuffADC_1Point[CountV255] =0; 00056 } 00057 00058 while ( 1 ) { 00059 if(Time1Hz<5) 00060 { 00061 ADC_64Point=0; 00062 ADC_32PointD=0; 00063 for(int q=0; q<64; q++) 00064 { 00065 BuffADC_znak [q] = 0; 00066 BuffADC_64Point [q] = 0; 00067 Buff_Restored_Mod [q] = 0; 00068 } 00069 } 00070 Event_1250Hz(); 00071 Event_100KHz(); 00072 Event_5KHz(); 00073 Event_1KHz(); 00074 Event_500Hz(); 00075 Event_250Hz(); 00076 Event_1Hz(); 00077 Event_Vibro(); 00078 00079 00080 G_Photo_Exchange(); 00081 Concol (); // Проврка 0 консоли (вход и выход) 00082 Concol1 (); // Проврка 1 консоли (вход и выход) 00083 Read_CMD(); 00084 if (OutBufConCount) OutBufConCount--; 00085 if (OutBufCon1Count) OutBufCon1Count--; 00086 TechLog();//технологическая выдача 00087 00088 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 00089 ////////////////////////////////////выдача параметров через Rate//////////////////////////////////////////////////////////////// 00090 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 00091 M_RateA(); 00092 AllRegul(); 00093 00094 00095 00096 00097 /* if (count10v>=64*198) 00098 { 00099 sprintf((Time),"%d %d\r\n", AMPSUMM,AMPSUMP); 00100 WriteCon(Time); 00101 }*/ 00102 00103 00104 00105 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00106 /////////////////////////Работа с Flash////////////////////////////////////////////////////////////////// 00107 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 00108 switch(Gyro.FlashMod) { 00109 case 1: GoBoot(); break; 00110 case 2: WriteFlash(); break; 00111 case 3: ReadFlash(); break; 00112 case 4: EraseFlash(); break; 00113 } 00114 00115 BackLightOFF 00116 BackLightOFF 00117 BackLightOFF 00118 } 00119 }//main 00120 00121 /****************************************************************************** 00122 ** End Of File 00123 ******************************************************************************/ 00124 00125
Generated on Thu Jul 14 2022 02:34:42 by
1.7.2
