summaryrefslogtreecommitdiff
path: root/bsp/lpc2478
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2009-07-29 23:39:12 +0000
committerbernard.xiong <[email protected]>2009-07-29 23:39:12 +0000
commit53919ba500fb92601b882ffd01f94ad5069cde8a (patch)
tree77f98f188a865ca81a7ed315e8db72d5d1f2737c /bsp/lpc2478
parente653914623cdbed42afc0a6757d655a4eb361e27 (diff)
update lpc2478 bsp
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@10 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/lpc2478')
-rw-r--r--bsp/lpc2478/board.c38
-rw-r--r--bsp/lpc2478/board.h3
-rw-r--r--bsp/lpc2478/rtconfig.h10
3 files changed, 7 insertions, 44 deletions
diff --git a/bsp/lpc2478/board.c b/bsp/lpc2478/board.c
index c68b8c1300..26059b5072 100644
--- a/bsp/lpc2478/board.c
+++ b/bsp/lpc2478/board.c
@@ -58,44 +58,6 @@ void rt_hw_board_init()
T0TCR = 0x01; //enable timer0 counter
}
-#ifdef RT_USING_FINSH
-extern void finsh_notify(void);
-void rt_serial_isr(int vector)
-{
- rt_uint32_t iir;
-
- if (U0LSR & 0x01)
- {
- rt_uint8_t ch;
-
- while (U0LSR & 0x01)
- {
- ch = U0RBR;
- rt_serial_savechar(ch);
- }
-
- /* notify finsh shell thread */
- finsh_notify();
- }
-
- /* clear interrupt source */
- iir = U0IIR;
-
- /* acknowledge Interrupt */
- VICVectAddr = 0;
-}
-
-void rt_hw_finsh_init()
-{
- /* init UART rx interrupt */
- U0IER = 0x01;
-
- /* install UART isr */
- rt_hw_interrupt_install(UART0_INT, rt_serial_isr, RT_NULL);
- rt_hw_interrupt_umask(UART0_INT);
-}
-#endif
-
/******************************************************************************
** Function name: TargetInit
**
diff --git a/bsp/lpc2478/board.h b/bsp/lpc2478/board.h
index 8aa9ee1aa8..2f9bf8b7e9 100644
--- a/bsp/lpc2478/board.h
+++ b/bsp/lpc2478/board.h
@@ -98,6 +98,9 @@ void rt_hw_finsh_init(void);
#define VECT_ADDR_INDEX 0x100
#define VECT_CNTL_INDEX 0x200
+
+#define CCLK 60000000 /* Fosc = 12MHz, M = 5 */
+#define PCLK 15000000 /* CCLK/4, use default */
/******************************************************************************
** Function name: TargetInit
diff --git a/bsp/lpc2478/rtconfig.h b/bsp/lpc2478/rtconfig.h
index 700d6a4ec1..249945b009 100644
--- a/bsp/lpc2478/rtconfig.h
+++ b/bsp/lpc2478/rtconfig.h
@@ -9,7 +9,7 @@
#define RT_ALIGN_SIZE 4
/* PRIORITY_MAX*/
-#define RT_THREAD_PRIORITY_MAX 32
+#define RT_THREAD_PRIORITY_MAX 256
/* Tick per Second*/
#define RT_TICK_PER_SECOND 100
@@ -55,7 +55,9 @@
/* SECTION: Device System */
/* Using Device System*/
-/* #define RT_USING_DEVICE */
+#define RT_USING_DEVICE
+#define RT_USING_UART1
+#define RT_UART_RX_BUFFER_SIZE 64
/* SECTION: Console options */
/* the buffer size of console*/
@@ -68,10 +70,6 @@
#define FINSH_USING_SYMTAB
#define FINSH_USING_DESCRIPTION
-/* SECTION: emulator options */
-/* Using QEMU or SkyEye*/
-/* #define RT_USING_EMULATOR */
-
/* SECTION: a mini libc */
/* Using mini libc library*/
/* #define RT_USING_MINILIBC */