diff options
Diffstat (limited to 'nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c')
-rw-r--r-- | nuttx/arch/arm/src/nuc1xx/nuc_lowputc.c | 10 |
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 */ |