![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: main.c
- Revision:
- 33:341521841d3a
- Parent:
- 32:9cd2f11ad897
- Parent:
- 28:1c9acd3b224d
- Child:
- 34:1e4b4d86a7ac
--- a/main.c Sat Feb 06 06:18:55 2016 +0000 +++ b/main.c Sat Feb 06 06:33:56 2016 +0000 @@ -39,9 +39,6 @@ unsigned int secPuls,CountBI,CmmandIn,tt,th; unsigned int paramV; - - - void Led_init() { LPC_PINCON->PINSEL0 = (0x00<<28); @@ -189,9 +186,8 @@ Time100K = 0; Time1Hz = 0; Clock1Hz = 0; - ShiftD = StartShiftD; - ShiftL = StartShiftL; - + Gyro.Discharg = StartDischarg; + Pulse_8Point = 0; Pulse_16Point = 0; Pulse_32Point = 0; @@ -236,14 +232,11 @@ Clock1Hz++; //============================= блок управления поджигом и подсветкой, сделанно через сдвиг====================== - if (ShiftD) { //Проверка поджига -// if (ShiftD & 0x01) - ShiftD = ShiftD >> 1; + if (Gyro.Discharg){ //Проверка поджига + if (Gyro.Discharg & 0x01) Gyro.PinReg |= PinRegBitD; else Gyro.PinReg &= ~PinRegBitD; + Gyro.Discharg = Gyro.Discharg >> 1; } - if (ShiftL) { //Проверка подсветки - ShiftL = ShiftL >> 1; - - } + } if (Event1K) {// событие раз в 1 кГц