Dmitry Kovalev
/
LGfiltr
forkd
Fork of LGstaandart by
Diff: uart_m.c
- Revision:
- 213:9953db9543d6
- Parent:
- 209:224e7331a061
- Child:
- 231:079835d508ef
diff -r 8d6784491bae -r 9953db9543d6 uart_m.c --- a/uart_m.c Mon Jul 03 08:32:27 2017 +0000 +++ b/uart_m.c Wed Jul 26 13:24:39 2017 +0000 @@ -447,7 +447,62 @@ } + +void WriteConN (char *s, unsigned int N) +{ + OutBufCon1Count = 0; + + while (N != 0) + { + BackLightON + N--; + ConOutPnt1++; + ConOutPnt1 = ConOutPnt1 & 0x3ff; + OutCon1[ConOutPnt1] = (*s++); + + } + + Gyro.UARTFlag=1; + OutBufCon1Count = 100; + BackLightOFF +} void Concol1 (void ) +{int temp=2; + //if (OutBufCon1Count == 0) + if (Time_UART <30) Gyro.PinReg |= PinRegBitTXE; + if (Time_UART <15) + { + Gyro.UARTFlag=0; + if (ConOutPnt1 != ConOutCur1) + { + if (LPC_UART1->LSR & 0x20) + { + ConOutCur1++; + ConOutCur1 = ConOutCur1 & 0x3ff; + LPC_UART1->THR = OutCon1[ConOutCur1]; + } + } + else + { + Gyro.UARTFlag=1; + if (Time_UART==0) + { + Gyro.UARTFlag=0; + Time_UART=Gyro.DropDelayGLD; + Gyro.PinReg &= ~PinRegBitTXE; + } + } + + } + if (LPC_UART1->LSR & 0x01) + { + ConInCur1++; + ConInCur1 = ConInCur1 & 0x3ff; + InCon1[ConInCur1] = (LPC_UART1->RBR); + } +} + +void Concol1111 (void ) { //if (OutBufCon1Count == 0) if (Time_UART == 0) @@ -601,22 +656,6 @@ } } -void WriteConN (char *s, unsigned int N) -{ - OutBufCon1Count = 0; - - while (N != 0) - { - N--; - ConOutPnt1++; - ConOutPnt1 = ConOutPnt1 & 0x3ff; - OutCon1[ConOutPnt1] = (*s++); - - } - Time_UART=Gyro.DropDelayGLD; - OutBufCon1Count = 100; - -} void WriteCon0N (char *s, unsigned int N)