![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
main.c@202:c03b7b128e11, 2016-11-18 (annotated)
- Committer:
- Kovalev_D
- Date:
- Fri Nov 18 06:07:37 2016 +0000
- Revision:
- 202:c03b7b128e11
- Parent:
- 201:76f4123bf22a
not work
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
igor_v | 8:5188b1448d34 | 1 | //ssdfwewedfsfds |
igor_v | 0:8ad47e2b6f00 | 2 | /****************************************Copyright (c)**************************************************** |
igor_v | 0:8ad47e2b6f00 | 3 | **--------------File Info--------------------------------------------------------------------------------- |
igor_v | 0:8ad47e2b6f00 | 4 | ** File name: main.c |
igor_v | 0:8ad47e2b6f00 | 5 | ** Last modified Date: 2011-10-24 |
igor_v | 0:8ad47e2b6f00 | 6 | ** Last Version: V1.00 |
igor_v | 0:8ad47e2b6f00 | 7 | ** Descriptions: The main() function |
igor_v | 0:8ad47e2b6f00 | 8 | ** |
igor_v | 0:8ad47e2b6f00 | 9 | **-------------------------------------------------------------------------------------------------------- |
igor_v | 0:8ad47e2b6f00 | 10 | ** Created by: Electrooptica Incorp. |
igor_v | 0:8ad47e2b6f00 | 11 | ** Created date: 2011-08-22 |
igor_v | 0:8ad47e2b6f00 | 12 | ** Version: V1.00 |
igor_v | 3:ed8744c5f67a | 13 | ** Descriptions: |
igor_v | 3:ed8744c5f67a | 14 | **-------------------------------------------------------------------------------------------------------- |
igor_v | 0:8ad47e2b6f00 | 15 | *********************************************************************************************************/ |
igor_v | 0:8ad47e2b6f00 | 16 | #include "Global.h" |
Diletant | 74:f4d9c3403578 | 17 | #include "Device.h" |
igor_v | 0:8ad47e2b6f00 | 18 | /****************************************************************************** |
igor_v | 0:8ad47e2b6f00 | 19 | ** Main Function main() |
igor_v | 0:8ad47e2b6f00 | 20 | ******************************************************************************/ |
Diletant | 138:14a0c452cf32 | 21 | extern Device device; //Single global for all device hardware-independent algorithm |
Kovalev_D | 136:19b9e6abb86f | 22 | unsigned int addres; |
Kovalev_D | 134:caf4c9cd5052 | 23 | uint32_t Result[5]; |
igor_v | 0:8ad47e2b6f00 | 24 | extern uint32_t CMD_Mode; |
igor_v | 52:30f2e52a493f | 25 | unsigned int secPuls; |
igor_v | 52:30f2e52a493f | 26 | float DACF, K_DAC; |
Kovalev_D | 107:4d178bcc9d8a | 27 | int tempAMP; |
Kovalev_D | 139:1716152517aa | 28 | int temp; |
Kovalev_D | 136:19b9e6abb86f | 29 | unsigned int status; |
Kovalev_D | 136:19b9e6abb86f | 30 | unsigned int Para; |
igor_v | 52:30f2e52a493f | 31 | int main (void) |
igor_v | 52:30f2e52a493f | 32 | { |
Kovalev_D | 196:f76dbc081e63 | 33 | SystemInit1(); // Инициализация контроллера: установка тактовых частот |
Kovalev_D | 196:f76dbc081e63 | 34 | SystemCoreClockUpdate1(); // расчет тактовой частоты процессора перед инициализацией UART - 103MHz |
Kovalev_D | 196:f76dbc081e63 | 35 | GLD_Init(); |
Kovalev_D | 202:c03b7b128e11 | 36 | |
Kovalev_D | 196:f76dbc081e63 | 37 | UART_InitSet (0, 921600, 0x03); |
Kovalev_D | 196:f76dbc081e63 | 38 | UART_InitSet (1, 921600, 0x03); |
Kovalev_D | 196:f76dbc081e63 | 39 | |
Kovalev_D | 197:7a05523bf588 | 40 | Out_G_photo(Gyro.Gain_Sin, Gyro.Gain_Cos); |
Kovalev_D | 197:7a05523bf588 | 41 | while ( 1 ) { |
Kovalev_D | 201:76f4123bf22a | 42 | Event_100KHz(); |
Kovalev_D | 197:7a05523bf588 | 43 | Event_1KHz(); |
Kovalev_D | 197:7a05523bf588 | 44 | Event_500Hz(); |
Kovalev_D | 197:7a05523bf588 | 45 | Event_250Hz(); |
Kovalev_D | 197:7a05523bf588 | 46 | Event_1Hz(); |
Kovalev_D | 197:7a05523bf588 | 47 | Event_Vibro(); |
Kovalev_D | 197:7a05523bf588 | 48 | |
Kovalev_D | 196:f76dbc081e63 | 49 | G_Photo_Exchange(); |
Kovalev_D | 108:030cdde08314 | 50 | Concol (); // Проврка 0 консоли (вход и выход) |
Kovalev_D | 197:7a05523bf588 | 51 | Concol1 (); // Проврка 1 консоли (вход и выход) |
Kovalev_D | 196:f76dbc081e63 | 52 | Read_CMD(); |
igor_v | 3:ed8744c5f67a | 53 | if (OutBufConCount) OutBufConCount--; |
Kovalev_D | 108:030cdde08314 | 54 | if (OutBufCon1Count) OutBufCon1Count--; |
Kovalev_D | 147:1aed74f19a8f | 55 | TechLog();//технологическая выдача |
Kovalev_D | 196:f76dbc081e63 | 56 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 57 | ////////////////////////////////////выдача параметров через Rate//////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 58 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 59 | M_RateA(); |
Kovalev_D | 196:f76dbc081e63 | 60 | AllRegul(); |
Kovalev_D | 132:2c7bec5cf6fe | 61 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 132:2c7bec5cf6fe | 62 | /////////////////////////Работа с Flash////////////////////////////////////////////////////////////////// |
Kovalev_D | 132:2c7bec5cf6fe | 63 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 64 | switch(Gyro.FlashMod) { |
Kovalev_D | 196:f76dbc081e63 | 65 | case 1: GoBoot(); break; |
Kovalev_D | 196:f76dbc081e63 | 66 | case 2: WriteFlash(); break; |
Kovalev_D | 196:f76dbc081e63 | 67 | case 3: ReadFlash(); break; |
Kovalev_D | 202:c03b7b128e11 | 68 | }// |
Kovalev_D | 196:f76dbc081e63 | 69 | } |
Kovalev_D | 132:2c7bec5cf6fe | 70 | }//main |
igor_v | 0:8ad47e2b6f00 | 71 | |
igor_v | 0:8ad47e2b6f00 | 72 | /****************************************************************************** |
igor_v | 0:8ad47e2b6f00 | 73 | ** End Of File |
igor_v | 0:8ad47e2b6f00 | 74 | ******************************************************************************/ |
igor_v | 0:8ad47e2b6f00 | 75 | |
igor_v | 0:8ad47e2b6f00 | 76 |