Dmitry Kovalev
/
LGstaandart
forkd
Fork of LG2 by
Diff: uart_m.c
- Revision:
- 181:0b022246c43c
- Parent:
- 124:9ae09249f842
- Child:
- 188:4c523cc373cc
diff -r 375dcd9c0cb6 -r 0b022246c43c uart_m.c --- a/uart_m.c Wed Jul 06 08:28:15 2016 +0000 +++ b/uart_m.c Fri Jul 08 14:58:17 2016 +0000 @@ -449,7 +449,8 @@ void Concol1 (void ) { - if (OutBufCon1Count == 0) + //if (OutBufCon1Count == 0) + if (Time_UART == 0) { if (ConOutPnt1 != ConOutCur1) if (LPC_UART1->LSR & 0x20) @@ -458,29 +459,22 @@ ConOutCur1 = ConOutCur1 & 0x3ff; LPC_UART1->THR = OutCon1[ConOutCur1]; } - if (!(LPC_UART1->LSR & 0x40)) Gyro.PinReg |= PinRegBitTXE; else Gyro.PinReg &= ~PinRegBitTXE; } else if (OutBufCon1Count == 1) { Gyro.PinReg |= PinRegBitTXE; - } else if (OutBufCon1Count == 2) { Gyro.PinReg |= PinRegBitTXE; - } - if (LPC_UART1->LSR & 0x01) { ConInCur1++; ConInCur1 = ConInCur1 & 0x3ff; InCon1[ConInCur1] = (LPC_UART1->RBR); } - - - } void Concol1Fast (void ) @@ -610,6 +604,7 @@ void WriteConN (char *s, unsigned int N) { OutBufCon1Count = 0; + while (N != 0) { N--; @@ -617,7 +612,8 @@ ConOutPnt1 = ConOutPnt1 & 0x3ff; OutCon1[ConOutPnt1] = (*s++); } - OutBufCon1Count = 10; + Time_UART=Gyro.DropDelayGLD; + OutBufCon1Count = 100; }