![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
main.c@211:ac8251b067d2, 2017-07-03 (annotated)
- Committer:
- Kovalev_D
- Date:
- Mon Jul 03 05:50:08 2017 +0000
- Revision:
- 211:ac8251b067d2
- Parent:
- 209:224e7331a061
- Child:
- 214:4c70e452c491
prizm worck
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 | 208:19150d2b528f | 28 | int temp=1; |
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 | 205:775d54fdf646 | 35 | Param_init(); |
Kovalev_D | 196:f76dbc081e63 | 36 | GLD_Init(); |
Kovalev_D | 208:19150d2b528f | 37 | BackLightOFF |
Kovalev_D | 208:19150d2b528f | 38 | LightUpOFF |
igor_v | 51:81f47b817071 | 39 | |
Kovalev_D | 196:f76dbc081e63 | 40 | UART_InitSet (0, 921600, 0x03); |
Kovalev_D | 196:f76dbc081e63 | 41 | UART_InitSet (1, 921600, 0x03); |
Kovalev_D | 205:775d54fdf646 | 42 | /* |
Kovalev_D | 205:775d54fdf646 | 43 | UART_InitSet (0, 115200, 0x03); |
Kovalev_D | 205:775d54fdf646 | 44 | UART_InitSet (1, 115200, 0x03); */ |
Kovalev_D | 197:7a05523bf588 | 45 | Out_G_photo(Gyro.Gain_Sin, Gyro.Gain_Cos); |
Kovalev_D | 197:7a05523bf588 | 46 | while ( 1 ) { |
Kovalev_D | 211:ac8251b067d2 | 47 | |
Kovalev_D | 197:7a05523bf588 | 48 | Event_100KHz(); |
Kovalev_D | 209:224e7331a061 | 49 | Event_2KHz(); |
Kovalev_D | 197:7a05523bf588 | 50 | Event_1KHz(); |
Kovalev_D | 197:7a05523bf588 | 51 | Event_500Hz(); |
Kovalev_D | 209:224e7331a061 | 52 | Event_250Hz(); |
Kovalev_D | 197:7a05523bf588 | 53 | Event_1Hz(); |
Kovalev_D | 197:7a05523bf588 | 54 | Event_Vibro(); |
Kovalev_D | 197:7a05523bf588 | 55 | |
Kovalev_D | 196:f76dbc081e63 | 56 | G_Photo_Exchange(); |
Kovalev_D | 108:030cdde08314 | 57 | Concol (); // Проврка 0 консоли (вход и выход) |
Kovalev_D | 197:7a05523bf588 | 58 | Concol1 (); // Проврка 1 консоли (вход и выход) |
Kovalev_D | 196:f76dbc081e63 | 59 | Read_CMD(); |
igor_v | 3:ed8744c5f67a | 60 | if (OutBufConCount) OutBufConCount--; |
Kovalev_D | 108:030cdde08314 | 61 | if (OutBufCon1Count) OutBufCon1Count--; |
Kovalev_D | 147:1aed74f19a8f | 62 | TechLog();//технологическая выдача |
Kovalev_D | 211:ac8251b067d2 | 63 | |
Kovalev_D | 196:f76dbc081e63 | 64 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 65 | ////////////////////////////////////выдача параметров через Rate//////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 66 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 67 | M_RateA(); |
Kovalev_D | 196:f76dbc081e63 | 68 | AllRegul(); |
Kovalev_D | 211:ac8251b067d2 | 69 | |
Kovalev_D | 132:2c7bec5cf6fe | 70 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 132:2c7bec5cf6fe | 71 | /////////////////////////Работа с Flash////////////////////////////////////////////////////////////////// |
Kovalev_D | 132:2c7bec5cf6fe | 72 | ///////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 196:f76dbc081e63 | 73 | switch(Gyro.FlashMod) { |
Kovalev_D | 196:f76dbc081e63 | 74 | case 1: GoBoot(); break; |
Kovalev_D | 196:f76dbc081e63 | 75 | case 2: WriteFlash(); break; |
Kovalev_D | 196:f76dbc081e63 | 76 | case 3: ReadFlash(); break; |
Kovalev_D | 208:19150d2b528f | 77 | case 4: EraseFlash(); break; |
Kovalev_D | 208:19150d2b528f | 78 | } |
Kovalev_D | 208:19150d2b528f | 79 | |
Kovalev_D | 211:ac8251b067d2 | 80 | BackLightOFF |
Kovalev_D | 211:ac8251b067d2 | 81 | BackLightOFF |
Kovalev_D | 211:ac8251b067d2 | 82 | BackLightOFF |
Kovalev_D | 208:19150d2b528f | 83 | } |
Kovalev_D | 132:2c7bec5cf6fe | 84 | }//main |
igor_v | 0:8ad47e2b6f00 | 85 | |
igor_v | 0:8ad47e2b6f00 | 86 | /****************************************************************************** |
igor_v | 0:8ad47e2b6f00 | 87 | ** End Of File |
igor_v | 0:8ad47e2b6f00 | 88 | ******************************************************************************/ |
igor_v | 0:8ad47e2b6f00 | 89 | |
igor_v | 0:8ad47e2b6f00 | 90 |