summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-03 16:44:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-03 16:44:04 +0000
commit205d56453f8ba7bfd3baa8c7c12d744698818492 (patch)
tree0dab0f56feee5d4adb7362c55e05763d67b98439 /c/src/lib
parentPatch rtems-rc-19991203-12.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-205d56453f8ba7bfd3baa8c7c12d744698818492.tar.bz2
Patch from John Mills <jmills@tga.com> to correct some cut and paste
errors.
Diffstat (limited to 'c/src/lib')
-rw-r--r--c/src/lib/libcpu/sh/sh7045/sci/sci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/c/src/lib/libcpu/sh/sh7045/sci/sci.c b/c/src/lib/libcpu/sh/sh7045/sci/sci.c
index 3a443e64ee..2f0927b15a 100644
--- a/c/src/lib/libcpu/sh/sh7045/sci/sci.c
+++ b/c/src/lib/libcpu/sh/sh7045/sci/sci.c
@@ -135,9 +135,9 @@ rtems_boolean rdSCI0(unsigned char *ch)
rtems_boolean result=FALSE;
if ((read8(SCI_SSR0) & SCI_RDRF) != 0x00) {
- /* Write the character to the TDR */
- write8(*ch, SCI_RDR0);
- /* Clear the TDRE bit */
+ /* read input */
+ *ch = read8(SCI_RDR0);
+ /* Clear RDRF flag */
temp = read8(SCI_SSR0) & ~SCI_RDRF;
write8(temp, SCI_SSR0);
result = TRUE;
@@ -151,9 +151,9 @@ rtems_boolean rdSCI1(unsigned char *ch)
rtems_boolean result=FALSE;
if ((read8(SCI_SSR1) & SCI_RDRF) != 0x00) {
- /* Write the character to the TDR */
- write8(*ch, SCI_RDR1);
- /* Clear the TDRE bit */
+ /* read input */
+ *ch = read8(SCI_RDR1);
+ /* Clear RDRF flag */
temp= read8(SCI_SSR1) & ~SCI_RDRF;
write8(temp, SCI_SSR1);
result = TRUE;