diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-18 22:37:09 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-18 22:37:09 +0000 |
commit | 4b8d4ec8d97d5557b6f3f8eb20f4fc4703d37384 (patch) | |
tree | 8a379329c8ce81aa01d35861298ccf60c752fedd /nuttx/arch/arm/src | |
parent | b53a4426e1cf580b32c663500ba1b4bb42cb3fdf (diff) | |
download | px4-nuttx-4b8d4ec8d97d5557b6f3f8eb20f4fc4703d37384.tar.gz px4-nuttx-4b8d4ec8d97d5557b6f3f8eb20f4fc4703d37384.tar.bz2 px4-nuttx-4b8d4ec8d97d5557b6f3f8eb20f4fc4703d37384.zip |
The basic Kinetis K60 port works
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3892 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src')
-rw-r--r-- | nuttx/arch/arm/src/kinetis/kinetis_lowputc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c b/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c index 6d24f2013..bf987b177 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_lowputc.c @@ -218,14 +218,14 @@ void kinetis_lowsetup(void) #if defined(CONFIG_KINETIS_UART4) || defined(CONFIG_KINETIS_UART5) - regval = getreg32(KINETIS_SIM_SCGC4); + regval = getreg32(KINETIS_SIM_SCGC1); # ifdef CONFIG_KINETIS_UART4 regval |= SIM_SCGC1_UART4; # endif # ifdef CONFIG_KINETIS_UART5 regval |= SIM_SCGC1_UART5; # endif - putreg32(regval, KINETIS_SIM_SCGC4); + putreg32(regval, KINETIS_SIM_SCGC1); #endif @@ -371,7 +371,7 @@ void kinetis_uartconfigure(uintptr_t uart_base, uint32_t baud, regval |= (((uint8_t)tmp) << UART_BDH_SBR_SHIFT) & UART_BDH_SBR_MASK; putreg8(regval, uart_base+KINETIS_UART_BDH_OFFSET); - tmp = sbr & 0xff; + regval = sbr & 0xff; putreg8(regval, uart_base+KINETIS_UART_BDL_OFFSET); /* Calculate a fractional divider to get closer to the requested baud. @@ -411,14 +411,14 @@ void kinetis_uartconfigure(uintptr_t uart_base, uint32_t baud, { depth = (3 * depth) >> 2; } - putreg8(depth , uart_base+KINETIS_UART5_RWFIFO); + putreg8(depth , uart_base+KINETIS_UART_RWFIFO_OFFSET); depth = g_sizemap[(regval & UART_PFIFO_TXFIFOSIZE_MASK) >> UART_PFIFO_TXFIFOSIZE_SHIFT]; if (depth > 3) { depth = (depth >> 2); } - putreg8(depth, uart_base+KINETIS_UART5_TWFIFO); + putreg8(depth, uart_base+KINETIS_UART_TWFIFO_OFFSET); /* Enable RX and TX FIFOs */ @@ -426,8 +426,8 @@ void kinetis_uartconfigure(uintptr_t uart_base, uint32_t baud, #else /* Set the watermarks to zero and disable the FIFOs */ - putreg8(0, uart_base+KINETIS_UART5_RWFIFO); - putreg8(0, uart_base+KINETIS_UART5_TWFIFO); + putreg8(0, uart_base+KINETIS_UART_RWFIFO_OFFSET); + putreg8(0, uart_base+KINETIS_UART_TWFIFO_OFFSET); putreg8(0, uart_base+KINETIS_UART_PFIFO_OFFSET); #endif |