summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-09-07 15:31:18 +0000
committer[email protected] <[email protected]>2011-09-07 15:31:18 +0000
commit6c98ecd72918b5f28dadb00ae9bbe3ad799d654d (patch)
tree5789525ee17575d135d3ab2e2ec3b3a806495da8
parent5aaa2b190cc557e0c4ef42f1b578bfb08b9ba6a5 (diff)
fixed sys tick issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1702 bbd45198-f89e-11dd-88c7-29a3b14d5316
-rw-r--r--bsp/lpc1114/board.c5
-rw-r--r--bsp/lpc1114/uart.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/bsp/lpc1114/board.c b/bsp/lpc1114/board.c
index 6ff60a372c..d10a15fd04 100644
--- a/bsp/lpc1114/board.c
+++ b/bsp/lpc1114/board.c
@@ -20,6 +20,7 @@
#include <CMSIS/LPC11xx.h>
#include <CMSIS/core_cm0.h>
+#include <CMSIS/system_LPC11xx.h>
/**
* @addtogroup LPC1100
@@ -44,11 +45,11 @@ void rt_hw_timer_handler()
* This function will initial sam7s64 board.
*/
void rt_hw_board_init()
-{
+{
SystemInit();
/* init systick */
- SysTick_Config(0x0007A11F);
+ SysTick_Config(SystemCoreClock);
/* set pend exception priority */
NVIC_SetPriority(PendSV_IRQn, (1<<__NVIC_PRIO_BITS) - 1);
diff --git a/bsp/lpc1114/uart.c b/bsp/lpc1114/uart.c
index c593bfb7c5..b7ec46aef9 100644
--- a/bsp/lpc1114/uart.c
+++ b/bsp/lpc1114/uart.c
@@ -246,6 +246,9 @@ void rt_hw_uart_init(void)
rt_memset(uart->rx_buffer, 0, sizeof(uart->rx_buffer));
uart->read_index = uart->save_index = 0;
+ uart->parent.rx_indicate = RT_NULL;
+ uart->parent.tx_complete = RT_NULL;
+
/* device interface */
uart->parent.init = rt_uart_init;
uart->parent.open = rt_uart_open;