From 251cb82d09612dd19b131c1403325caa71e8216c Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Nov 2008 22:02:31 +0000 Subject: [PATCH] Correct conditional expression git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1201 42af7a65-404d-4744-a932-0658087f49c3 --- arch/sh/src/sh1/sh1_lowputc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/sh/src/sh1/sh1_lowputc.c b/arch/sh/src/sh1/sh1_lowputc.c index bae3f5bbdec..092093670c4 100644 --- a/arch/sh/src/sh1/sh1_lowputc.c +++ b/arch/sh/src/sh1/sh1_lowputc.c @@ -176,7 +176,9 @@ #ifdef HAVE_CONSOLE static inline int up_txready(void) { - return (getreg8(SH1_SCI_BASE + SH1_SCI_SSR_OFFSET) & SH1_SCISSR_TDRE != 0); + /* Check the TDRE bit in the SSR. 1=TDR is empty */ + + return ((getreg8(SH1_SCI_BASE + SH1_SCI_SSR_OFFSET) & SH1_SCISSR_TDRE) != 0); } #endif