summaryrefslogtreecommitdiff
path: root/nuttx/arch/z16/src/z16f/z16f_lowuart.S
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/z16/src/z16f/z16f_lowuart.S')
-rwxr-xr-xnuttx/arch/z16/src/z16f/z16f_lowuart.S18
1 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/arch/z16/src/z16f/z16f_lowuart.S b/nuttx/arch/z16/src/z16f/z16f_lowuart.S
index 037b3dd80..5e45e8c53 100755
--- a/nuttx/arch/z16/src/z16f/z16f_lowuart.S
+++ b/nuttx/arch/z16/src/z16f/z16f_lowuart.S
@@ -41,7 +41,7 @@
#include <nuttx/config.h>
#include "chip/chip.h"
-#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC)
+#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_ARCH_LOWGETC) || CONFIG_NFILE_DESCRIPTORS == 0
/*************************************************************************
* External References / External Definitions
@@ -96,31 +96,31 @@ _z16f_lowuartinit:
udiv r0, r3 /* BRG = (freq + baud * 8)/(baud * 16) */
#ifdef CONFIG_UART0_SERIAL_CONSOLE
- ld.w Z16F_UART0_BR, r0 /* Z16F_UART0_BR = BRG */
+ ld.w Z16F_UART1_BR, r0 /* Z16F_UART1_BR = BRG */
/* Set the GPIO Alternate Function Register Lo (AFL) register */
ld r0, #%30
- or.b Z16F_GPIOA_AFL, r0 /* Z16F_GPIOA_AFL |= %30 */
+ or.b Z16F_GPIOD_AFL, r0 /* Z16F_GPIOD_AFL |= %30 */
/* Enable UART receive (REN) and transmit (TEN) */
- clr.b Z16F_UART0_CTL1 /* Z16F_UART0_CTL1 = 0 */
+ clr.b Z16F_UART1_CTL1 /* Z16F_UART1_CTL1 = 0 */
ld r0, #(Z16F_UARTCTL0_TEN|Z16F_UARTCTL0_REN)
- ld.b Z16F_UART0_CTL0, r0 /* Z16F_UART0_CTL0 = %c0 */
+ ld.b Z16F_UART1_CTL0, r0 /* Z16F_UART1_CTL0 = %c0 */
#else
- ld.w Z16F_UART1_BR, r0 /* Z16F_UART1_BR = BRG */
+ ld.w Z16F_UART0_BR, r0 /* Z16F_UART0_BR = BRG */
/* Set the GPIO Alternate Function Register Lo (AFL) register */
ld r0, #%30
- or.b Z16F_GPIOD_AFL, r0 /* Z16F_GPIOD_AFL |= %30 */
+ or.b Z16F_GPIOA_AFL, r0 /* Z16F_GPIOA_AFL |= %30 */
/* Enable UART receive (REN) and transmit (TEN) */
- clr.b Z16F_UART1_CTL1 /* Z16F_UART1_CTL1 = 0 */
+ clr.b Z16F_UART0_CTL1 /* Z16F_UART0_CTL1 = 0 */
ld r0, #(Z16F_UARTCTL0_TEN|Z16F_UARTCTL0_REN)
- ld.b Z16F_UART1_CTL0, r0 /* Z16F_UART1_CTL0 = %c0 */
+ ld.b Z16F_UART0_CTL0, r0 /* Z16F_UART0_CTL0 = %c0 */
#endif
popmlo <r0, r3> /* Restore registers */
ret /* Return */