clear ORER, FER and PER bit of the SCSSR reg.
(This bits aren't cleared automatically)
This commit is contained in:
parent
4d2677e3a0
commit
03cf0ea64a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sci.c,v 1.8 2000/03/27 16:24:08 msaitoh Exp $ */
|
||||
/* $NetBSD: sci.c,v 1.9 2000/06/19 09:32:00 msaitoh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved.
|
||||
|
@ -418,8 +418,10 @@ GetcSci(void)
|
|||
while (((err_c = SHREG_SCSSR)
|
||||
& (SCSSR_RDRF | SCSSR_ORER | SCSSR_FER | SCSSR_PER)) == 0)
|
||||
;
|
||||
if ((err_c & (SCSSR_ORER | SCSSR_FER | SCSSR_PER)) != 0)
|
||||
if ((err_c & (SCSSR_ORER | SCSSR_FER | SCSSR_PER)) != 0) {
|
||||
SHREG_SCSSR &= ~(SCSSR_ORER | SCSSR_FER | SCSSR_PER);
|
||||
return(err_c |= 0x80);
|
||||
}
|
||||
|
||||
c = SHREG_SCRDR;
|
||||
|
||||
|
@ -720,10 +722,12 @@ sci_iflush(sc)
|
|||
volatile unsigned char c;
|
||||
|
||||
if (((err_c = SHREG_SCSSR)
|
||||
& (SCSSR_RDRF | SCSSR_ORER | SCSSR_FER | SCSSR_PER)) != 0) {
|
||||
& (SCSSR_RDRF | SCSSR_ORER | SCSSR_FER | SCSSR_PER)) != 0) {
|
||||
|
||||
if ((err_c & (SCSSR_ORER | SCSSR_FER | SCSSR_PER)) != 0)
|
||||
if ((err_c & (SCSSR_ORER | SCSSR_FER | SCSSR_PER)) != 0) {
|
||||
SHREG_SCSSR &= ~(SCSSR_ORER | SCSSR_FER | SCSSR_PER);
|
||||
return;
|
||||
}
|
||||
|
||||
c = SHREG_SCRDR;
|
||||
|
||||
|
@ -1317,7 +1321,8 @@ sciintr(arg)
|
|||
put[0] = SHREG_SCRDR;
|
||||
put[1] = SHREG_SCSSR & 0x00ff;
|
||||
|
||||
SHREG_SCSSR &= ~SCSSR_RDRF;
|
||||
SHREG_SCSSR &= ~(SCSSR_ORER | SCSSR_FER | SCSSR_PER |
|
||||
SCSSR_RDRF);
|
||||
|
||||
put += 2;
|
||||
if (put >= end)
|
||||
|
|
Loading…
Reference in New Issue