mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 09:32:28 +08:00
update lpc2478 bsp
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@10 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -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
|
||||
**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user