summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-23 23:42:06 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-23 23:42:06 +0000
commitf2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec (patch)
treee30bfe07f49c7ee65a6fa4938c78cd4b51c47f89 /nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c
parent1656c2b76f95f552837acdb44290ac1b32e3b58e (diff)
downloadpx4-nuttx-f2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec.tar.gz
px4-nuttx-f2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec.tar.bz2
px4-nuttx-f2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec.zip
A few NuTiny-SDK-NUC120 fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5667 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c')
-rw-r--r--nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c b/nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c
index 50b9b35f0..77b744948 100644
--- a/nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c
+++ b/nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c
@@ -276,7 +276,7 @@ void nuc_lowputc(uint32_t ch)
#ifdef HAVE_SERIAL_CONSOLE
/* Wait for the TX FIFO to be empty (excessive!) */
- while ((getreg32(NUC_CONSOLE_BASE + NUC_UART_FSR_OFFSET) & UART_FSR_TX_EMPTY) != 0);
+ while ((getreg32(NUC_CONSOLE_BASE + NUC_UART_FSR_OFFSET) & UART_FSR_TX_EMPTY) == 0);
/* Then write the character to to the TX FIFO */
@@ -331,15 +331,15 @@ void nuc_setbaud(uintptr_t base, uint32_t baud)
/* Check if the divxider exceeds the range */
- if (clksperbit > 0xffff)
+ if (brd > 0xffff)
{
/* Try to Set Divider X up 10 (MODE#1) */
regval &= ~UART_BAUD_DIV_X_ONE;
- for (divx = 8; divx <16; divx++)
+ for (divx = 8; divx < 16; divx++)
{
- brd = (clksperbit % (divx+1));
+ brd = (clksperbit % (divx + 1));
if (brd < 3)
{
regval &= ~UART_BAUD_DIVIDER_X_MASK;
@@ -357,4 +357,4 @@ void nuc_setbaud(uintptr_t base, uint32_t baud)
putreg32(regval, base + NUC_UART_BAUD_OFFSET);
}
-#endif /* HAVE_UART */ \ No newline at end of file
+#endif /* HAVE_UART */