[an error occurred while processing this directive]
|
void TComPort0::UARTInterrupt(void) }
E-mail:
info@telesys.ru
{
char tmp;
tmp = U0IIR;
switch(tmp & 0x0E)
{
case 0x04:
case 0x0C:
while((U0LSR & 1) != 0)
{
if(ComPort0.ReadChar(U0RBR))
{
U0IER &= ~0x01;
break;
}
}
case 0x02:
for(int i = 1; i <=15; i++)
{
char data = ComPort0.WriteChar();
if(data == 0)
{
U0THR = 0x0D;
U0IER &= ~0x02;
ComPort0.Status |= 1<
}
else U0THR = data;
}
break;
}
Ответы