summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-11 22:02:31 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-11 22:02:31 +0000
commitfb312b25c3bf083f95f8896536ad491e8af8def7 (patch)
treefae651d2fd7daa00db285455a485c16cb73af9c7 /nuttx/arch/sh/src
parent031f1bcb1e3843396c4aae881fe06d48655aa759 (diff)
downloadpx4-nuttx-fb312b25c3bf083f95f8896536ad491e8af8def7.tar.gz
px4-nuttx-fb312b25c3bf083f95f8896536ad491e8af8def7.tar.bz2
px4-nuttx-fb312b25c3bf083f95f8896536ad491e8af8def7.zip
Correct conditional expression
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1201 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src')
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_lowputc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nuttx/arch/sh/src/sh1/sh1_lowputc.c b/nuttx/arch/sh/src/sh1/sh1_lowputc.c
index bae3f5bbd..092093670 100644
--- a/nuttx/arch/sh/src/sh1/sh1_lowputc.c
+++ b/nuttx/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