From aea59143b5b85ea702aa936d6451d480effc5c72 Mon Sep 17 00:00:00 2001 From: "dzzxzz@gmail.com" Date: Tue, 26 Jun 2012 03:30:07 +0000 Subject: [PATCH] update mini4020 project git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2185 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/mini4020/SConscript | 15 +- bsp/mini4020/applications/SConscript | 9 + bsp/mini4020/{ => applications}/application.c | 27 +- bsp/mini4020/{ => applications}/startup.c | 13 + bsp/mini4020/drivers/SConscript | 19 ++ bsp/mini4020/{ => drivers}/board.c | 35 +-- bsp/mini4020/{ => drivers}/board.h | 2 +- bsp/mini4020/{ => drivers}/dm9161.c | 268 +++++++++--------- bsp/mini4020/{ => drivers}/dm9161.h | 13 + bsp/mini4020/drivers/lcd.c | 74 +++++ bsp/mini4020/{ => drivers}/lcdc.c | 63 ++-- bsp/mini4020/{ => drivers}/lcdc.h | 13 + bsp/mini4020/{ => drivers}/mii.h | 12 + bsp/mini4020/{ => drivers}/sdcard.c | 2 +- bsp/mini4020/{ => drivers}/sdcard.h | 18 +- bsp/mini4020/lcd.c | 69 ----- bsp/mini4020/project.Uv2 | 234 ++++++--------- bsp/mini4020/rtconfig.h | 2 +- 18 files changed, 468 insertions(+), 420 deletions(-) create mode 100644 bsp/mini4020/applications/SConscript rename bsp/mini4020/{ => applications}/application.c (82%) rename bsp/mini4020/{ => applications}/startup.c (78%) create mode 100644 bsp/mini4020/drivers/SConscript rename bsp/mini4020/{ => drivers}/board.c (84%) rename bsp/mini4020/{ => drivers}/board.h (86%) rename bsp/mini4020/{ => drivers}/dm9161.c (75%) rename bsp/mini4020/{ => drivers}/dm9161.h (81%) create mode 100644 bsp/mini4020/drivers/lcd.c rename bsp/mini4020/{ => drivers}/lcdc.c (50%) rename bsp/mini4020/{ => drivers}/lcdc.h (83%) rename bsp/mini4020/{ => drivers}/mii.h (94%) rename bsp/mini4020/{ => drivers}/sdcard.c (95%) rename bsp/mini4020/{ => drivers}/sdcard.h (68%) delete mode 100644 bsp/mini4020/lcd.c diff --git a/bsp/mini4020/SConscript b/bsp/mini4020/SConscript index 0289e802c2..d9c64eb9f9 100644 --- a/bsp/mini4020/SConscript +++ b/bsp/mini4020/SConscript @@ -1,9 +1,12 @@ -import rtconfig -Import('RTT_ROOT') from building import * -src = Glob('*.c') -CPPPATH = [RTT_ROOT + '/bsp/mini4020'] -group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH) +cwd = GetCurrentDir() +objs = [] +list = os.listdir(cwd) -Return('group') +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) + +Return('objs') diff --git a/bsp/mini4020/applications/SConscript b/bsp/mini4020/applications/SConscript new file mode 100644 index 0000000000..4fe38ed0cf --- /dev/null +++ b/bsp/mini4020/applications/SConscript @@ -0,0 +1,9 @@ +from building import * + +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd, str(Dir('#'))] + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/mini4020/application.c b/bsp/mini4020/applications/application.c similarity index 82% rename from bsp/mini4020/application.c rename to bsp/mini4020/applications/application.c index 111e968eec..84566fddbe 100644 --- a/bsp/mini4020/application.c +++ b/bsp/mini4020/applications/application.c @@ -1,7 +1,7 @@ /* * File : application.c * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006, RT-Thread Development Team + * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -14,8 +14,9 @@ */ /** - * @addtogroup mini2440 + * @addtogroup mini4020 */ + /*@{*/ #include @@ -27,13 +28,15 @@ #include #include #endif + #ifdef RT_USING_RTGUI #include extern void radio_rtgui_init(void); #endif + #define RT_INIT_THREAD_STACK_SIZE (2*1024) -void rt_init_thread_entry(void* parameter) +void rt_init_thread_entry(void *parameter) { int fd; rt_uint32_t sz; @@ -57,21 +60,21 @@ void rt_init_thread_entry(void* parameter) sz = write(fd,"Hello RT-Thread!",sizeof("Hello RT-Thread!")); - if(sz!=0) + if (sz != 0) { rt_kprintf("written %d\n",sz); } else rt_kprintf("haven't written\n"); - lseek(fd,0,SEEK_SET); + lseek(fd, 0, SEEK_SET); - sz = read(fd,buffer,sizeof(buffer)); + sz = read(fd, buffer, sizeof(buffer)); - if(sz!=0) + if (sz != 0) { rt_kprintf("READ %d:",sz); - while(sz--) + while (sz--) rt_kprintf("%c",buffer[sz]);//opposite rt_kprintf("\n"); } @@ -86,9 +89,9 @@ void rt_init_thread_entry(void* parameter) #endif } -void rt_led_thread_entry(void* parameter) +void rt_led_thread_entry(void *parameter) { - /* +/* while (1) { count++; @@ -103,12 +106,11 @@ void rt_led_thread_entry(void* parameter) } -int rt_application_init() +int rt_application_init(void) { rt_thread_t init_thread; rt_thread_t led_thread; - init_thread = rt_thread_create("init", rt_init_thread_entry, RT_NULL, RT_INIT_THREAD_STACK_SIZE, 8, 20); @@ -121,6 +123,7 @@ int rt_application_init() if (led_thread != RT_NULL) rt_thread_startup(led_thread); + return 0; } diff --git a/bsp/mini4020/startup.c b/bsp/mini4020/applications/startup.c similarity index 78% rename from bsp/mini4020/startup.c rename to bsp/mini4020/applications/startup.c index f4ff6822fb..78847e5ac7 100644 --- a/bsp/mini4020/startup.c +++ b/bsp/mini4020/applications/startup.c @@ -1,3 +1,16 @@ +/* + * File : application.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ + #include #include diff --git a/bsp/mini4020/drivers/SConscript b/bsp/mini4020/drivers/SConscript new file mode 100644 index 0000000000..d1d37750bc --- /dev/null +++ b/bsp/mini4020/drivers/SConscript @@ -0,0 +1,19 @@ +from building import * + +cwd = GetCurrentDir() +src = Glob('*.c') + +# remove no need file. +if GetDepend('RT_USING_LWIP') == False: + SrcRemove(src, 'dm9161.c') +if GetDepend('RT_USING_DFS') == False: + SrcRemove(src, 'sdcard.c') +if GetDepend('RT_USING_RTGUI') == False: + SrcRemove(src, 'lcd.c') + SrcRemove(src, 'lcdc.c') + +CPPPATH = [cwd] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/mini4020/board.c b/bsp/mini4020/drivers/board.c similarity index 84% rename from bsp/mini4020/board.c rename to bsp/mini4020/drivers/board.c index 50fa2d3118..1e379378be 100644 --- a/bsp/mini4020/board.c +++ b/bsp/mini4020/drivers/board.c @@ -1,7 +1,7 @@ /* * File : board.c * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2009 RT-Thread Develop Team + * COPYRIGHT (C) 2006 - 2012 RT-Thread Develop Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -12,6 +12,7 @@ * 2009-05-16 Bernard first implementation * 2010-10-5 Wangmeng sep4020 implementation */ + #include #include @@ -30,7 +31,6 @@ struct serial_device uart0 = RT_NULL }; - /** * This function will handle rtos timer */ @@ -41,7 +41,7 @@ void rt_timer_handler(int vector) /*Clear timer interrupt*/ clear_int = *(RP)TIMER_T1ISCR; - *(RP)TIMER_T1ISCR=clear_int; + *(RP)TIMER_T1ISCR=clear_int; } /** @@ -50,15 +50,13 @@ void rt_timer_handler(int vector) void rt_serial_handler(int vector) { //rt_kprintf("in rt_serial_handler\n"); - rt_int32_t stat = *(RP)UART0_IIR ; + rt_int32_t stat = *(RP)UART0_IIR ; UNUSED char c; /*Received data*/ - if(((stat & 0x0E) >> 1) == 0x02) + if (((stat & 0x0E) >> 1) == 0x02) { - - rt_hw_serial_isr(&uart0_device); - + rt_hw_serial_isr(&uart0_device); } else { @@ -67,6 +65,7 @@ void rt_serial_handler(int vector) c = uart0.uart_device->dlbl_fifo.rxfifo; } } + /** * This function will init led on the board */ @@ -82,10 +81,10 @@ static void rt_hw_board_led_init(void) /** * This function will init timer4 for system ticks */ - void rt_hw_timer_init() - { - /*Set timer1*/ - *(RP)TIMER_T1LCR = 880000; + void rt_hw_timer_init(void) +{ + /*Set timer1*/ + *(RP)TIMER_T1LCR = 880000; *(RP)TIMER_T1CR = 0x06; rt_hw_interrupt_install(INTSRC_TIMER1, rt_timer_handler, RT_NULL); @@ -93,7 +92,7 @@ static void rt_hw_board_led_init(void) /*Enable timer1*/ *(RP)TIMER_T1CR |= 0x01; - } +} /** * This function will handle init uart @@ -128,9 +127,9 @@ void rt_hw_uart_init(void) &uart0); } -void rt_hw_board_init() +void rt_hw_board_init(void) { - /* initialize uart */ + /* initialize uart */ rt_hw_uart_init(); // rt_hw_board_led_init(); rt_hw_timer_init(); @@ -143,9 +142,11 @@ void rt_hw_serial_putc(const char c) to be polite with serial console add a line feed to the carriage return character */ - if (c=='\n')rt_hw_serial_putc('\r'); + if (c=='\n') + rt_hw_serial_putc('\r'); while (!((*(RP)UART0_LSR) & 0x40)); + *(RP)(UART0_BASE) = c; } @@ -154,7 +155,7 @@ void rt_hw_serial_putc(const char c) * * @param str the displayed string */ -void rt_hw_console_output(const char* str) +void rt_hw_console_output(const char *str) { while (*str) { diff --git a/bsp/mini4020/board.h b/bsp/mini4020/drivers/board.h similarity index 86% rename from bsp/mini4020/board.h rename to bsp/mini4020/drivers/board.h index 2d0ac8a22a..062de56669 100644 --- a/bsp/mini4020/board.h +++ b/bsp/mini4020/drivers/board.h @@ -1,7 +1,7 @@ /* * File : board.h * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006, RT-Thread Develop Team + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at diff --git a/bsp/mini4020/dm9161.c b/bsp/mini4020/drivers/dm9161.c similarity index 75% rename from bsp/mini4020/dm9161.c rename to bsp/mini4020/drivers/dm9161.c index e189f4b4cd..2eeb40ebc2 100644 --- a/bsp/mini4020/dm9161.c +++ b/bsp/mini4020/drivers/dm9161.c @@ -1,3 +1,16 @@ +/* + * File : dm9161.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ + #include #include @@ -73,16 +86,18 @@ void rt_dm9161_isr(int irqno); static void udelay(unsigned long ns) { unsigned long i; - while(ns--) + + while (ns--) { i = 100; - while(i--); + while (i--); } } static __inline unsigned long sep_emac_read(unsigned int reg) { - void __iomem *emac_base = (void __iomem *)reg; + void __iomem *emac_base = (void __iomem *)reg; + return read_reg(emac_base); } @@ -106,9 +121,10 @@ static __inline void sep_emac_write(unsigned int reg, unsigned long value) static void enable_mdi(void) //need think more { unsigned long ctl; - + ctl = sep_emac_read(MAC_CTRL); sep_emac_write(MAC_CTRL, ctl&(~0x3)); /* enable management port */ + return; } @@ -121,6 +137,7 @@ static void disable_mdi(void) ctl = sep_emac_read(MAC_CTRL); sep_emac_write(MAC_CTRL, ctl|(0x3)); /* disable management port */ + return; } @@ -140,6 +157,7 @@ static __inline void sep_phy_wait(void) break; } } + return; } @@ -158,6 +176,7 @@ static void write_phy(unsigned char phy_addr, unsigned char address, unsigned in udelay(40); sep_phy_wait(); + return; } @@ -177,37 +196,35 @@ static void read_phy(unsigned char phy_addr, unsigned char address, unsigned int mii_rxdata = sep_emac_read(MAC_MII_RXDATA); *value = mii_rxdata; + return; -} - - - +} /* interrupt service routine */ void rt_dm9161_isr(int irqno) { - unsigned long intstatus; - rt_uint32_t address; + unsigned long intstatus; + rt_uint32_t address; - mask_irq(INTSRC_MAC); - intstatus = sep_emac_read(MAC_INTSRC); + mask_irq(INTSRC_MAC); + intstatus = sep_emac_read(MAC_INTSRC); - sep_emac_write(MAC_INTSRC,intstatus); - - /*Receive complete*/ - if(intstatus & 0x04) - { - eth_device_ready(&(dm9161_device.parent)); - } - /*Receive error*/ - else if(intstatus & 0x08) - { - rt_kprintf("Receive error\n"); - } - /*Transmit complete*/ - else if(intstatus & 0x03) - { - if(dm9161_device.tx_index == 0) + sep_emac_write(MAC_INTSRC,intstatus); + + /*Receive complete*/ + if(intstatus & 0x04) + { + eth_device_ready(&(dm9161_device.parent)); + } + /*Receive error*/ + else if(intstatus & 0x08) + { + rt_kprintf("Receive error\n"); + } + /*Transmit complete*/ + else if(intstatus & 0x03) + { + if(dm9161_device.tx_index == 0) address = (MAC_TX_BD +(MAX_TX_DESCR-2)*8); else if(dm9161_device.tx_index == 1) address = (MAC_TX_BD +(MAX_TX_DESCR-1)*8); @@ -215,12 +232,11 @@ void rt_dm9161_isr(int irqno) address = (MAC_TX_BD + dm9161_device.tx_index*8-16); //printk("free tx skb 0x%x in inter!!\n",lp->txBuffIndex); sep_emac_write(address,0x0); - } - else if (intstatus & 0x10) - { - rt_kprintf("ROVER ERROR\n"); - - } + } + else if (intstatus & 0x10) + { + rt_kprintf("ROVER ERROR\n"); + } while(intstatus) { @@ -229,7 +245,6 @@ void rt_dm9161_isr(int irqno) } unmask_irq(INTSRC_MAC); - } static rt_err_t update_mac_address() @@ -249,15 +264,15 @@ static rt_err_t update_mac_address() return RT_EOK; } -static int mii_link_ok (unsigned long phy_id) +static int mii_link_ok(unsigned long phy_id) { /* first, a dummy read, needed to latch some MII phys */ - unsigned int value; read_phy(phy_id, MII_BMSR,&value); if (value & BMSR_LSTATUS) return 1; + return 0; } @@ -266,7 +281,7 @@ static void update_link_speed(unsigned short phy_addr) unsigned int bmsr, bmcr, lpa, mac_cfg; unsigned int speed, duplex; - if(!mii_link_ok(phy_addr)) + if (!mii_link_ok(phy_addr)) { EOUT("Link Down\n"); //goto result; @@ -296,9 +311,9 @@ static void update_link_speed(unsigned short phy_addr) { speed = (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10; duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; - } + } - /* Update the MAC */ + /* Update the MAC */ mac_cfg = sep_emac_read(MAC_CTRL); if (speed == SPEED_100) { @@ -326,6 +341,7 @@ static void update_link_speed(unsigned short phy_addr) result: mac_cfg = sep_emac_read(MAC_CTRL); DBOUT("After mac_cfg=%d\n",mac_cfg); + return; } @@ -380,58 +396,55 @@ static rt_err_t rt_dm9161_init(rt_device_t dev) rt_dm9161_open(dev,0); - return RT_EOK; + return RT_EOK; } - - /* ................................ MAC ................................ */ /* * Initialize and start the Receiver and Transmit subsystems */ -static void sepether_start() +static void sepether_start(void) { int i; unsigned int tempaddr; - - sep_emac_write(MAC_TXBD_NUM,MAX_TX_DESCR); - - //初始化发送和接收描述符 + + sep_emac_write(MAC_TXBD_NUM,MAX_TX_DESCR); + + //初始化发送和接收描述符 for (i = 0; i < MAX_TX_DESCR; i++) { tempaddr=(MAC_TX_BD+i*8); - sep_emac_write(tempaddr,0); - tempaddr=(MAC_TX_BD+i*8+4); - sep_emac_write(tempaddr,0); + sep_emac_write(tempaddr,0); + tempaddr=(MAC_TX_BD+i*8+4); + sep_emac_write(tempaddr,0); } for (i = 0; i < MAX_RX_DESCR; i++) { - tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8); - sep_emac_write(tempaddr,0); - tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8+4); - sep_emac_write(tempaddr,0); + tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8); + sep_emac_write(tempaddr,0); + tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8+4); + sep_emac_write(tempaddr,0); } - + for (i = 0; i < MAX_RX_DESCR; i++) { tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8); - sep_emac_write(tempaddr,0xc000); - tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8+4); + sep_emac_write(tempaddr,0xc000); + tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8+4); sep_emac_write(tempaddr,ESRAM_BASE+ MAX_TX_DESCR*0x600+i*0x600); } /* Set the Wrap bit on the last descriptor */ tempaddr=(MAC_TX_BD + MAX_TX_DESCR*8+i*8-8); sep_emac_write(tempaddr,0xe000); - for (i = 0; i < MAX_TX_DESCR; i++) { - tempaddr=(MAC_TX_BD+i*8); - sep_emac_write(tempaddr,0x0); - tempaddr=(MAC_TX_BD+i*8+4); - sep_emac_write(tempaddr,ESRAM_BASE+i*0x600); + tempaddr=(MAC_TX_BD+i*8); + sep_emac_write(tempaddr,0x0); + tempaddr=(MAC_TX_BD+i*8+4); + sep_emac_write(tempaddr,ESRAM_BASE+i*0x600); } return; @@ -440,13 +453,13 @@ static void sepether_start() static rt_err_t rt_dm9161_open(rt_device_t dev, rt_uint16_t oflag) { unsigned int dsintr; - enable_mdi(); - mask_irq(28); - - sep_emac_write(MAC_INTMASK,0x0); //首先屏蔽中断 - - sepether_start(); + enable_mdi(); + mask_irq(28); + + sep_emac_write(MAC_INTMASK,0x0); //首先屏蔽中断 + + sepether_start(); /* Enable PHY interrupt */ *(volatile unsigned long*)GPIO_PORTA_DIR |= 0x0080 ; //1 stands for in @@ -470,12 +483,13 @@ static rt_err_t rt_dm9161_open(rt_device_t dev, rt_uint16_t oflag) /************************************************************************************/ /* Enable MAC interrupts */ sep_emac_write(MAC_INTMASK,0xff); //open中断 - sep_emac_write(MAC_INTSRC,0xff); //clear all mac irq + sep_emac_write(MAC_INTSRC,0xff); //clear all mac irq unmask_irq(28); disable_mdi(); rt_kprintf("SEP4020 ethernet interface open!\n\r"); - return RT_EOK; + + return RT_EOK; } static rt_err_t rt_dm9161_close(rt_device_t dev) @@ -493,28 +507,28 @@ static rt_err_t rt_dm9161_close(rt_device_t dev) /* Disable MAC interrupts */ sep_emac_write(MAC_INTMASK,0); //屏蔽中断 - // INT_DISABLE(28); - return RT_EOK; + return RT_EOK; } static rt_size_t rt_dm9161_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t size) { - rt_set_errno(-RT_ENOSYS); - return 0; + rt_set_errno(-RT_ENOSYS); + + return 0; } static rt_size_t rt_dm9161_write (rt_device_t dev, rt_off_t pos, const void* buffer, rt_size_t size) { - rt_set_errno(-RT_ENOSYS); - return 0; + rt_set_errno(-RT_ENOSYS); + + return 0; } static rt_err_t rt_dm9161_control(rt_device_t dev, rt_uint8_t cmd, void *args) { - - return RT_EOK; + return RT_EOK; } /* ethernet device interface */ @@ -527,26 +541,26 @@ rt_err_t rt_dm9161_tx( rt_device_t dev, struct pbuf* p) unsigned long address; unsigned long tmp_tx_bd; - /* lock DM9000 device */ -// rt_sem_take(&sem_lock, RT_WAITING_FOREVER); + /* lock DM9000 device */ +// rt_sem_take(&sem_lock, RT_WAITING_FOREVER); - /* disable dm9000a interrupt */ - #warning SHOULD DISABLE INTEERUPT? + /* disable dm9000a interrupt */ + #warning SHOULD DISABLE INTEERUPT? /*Search for available BD*/ - for(i = 0;i> 16; - - p_recv = (unsigned char*)(ESRAM_BASE + (MAX_TX_DESCR + i) * 0x600); + + p_recv = (unsigned char *)(ESRAM_BASE + (MAX_TX_DESCR + i) * 0x600); p = pbuf_alloc(PBUF_LINK,length,PBUF_RAM); - if(p != RT_NULL) + if (p != RT_NULL) { - struct pbuf* q; + struct pbuf *q; rt_int32_t len; - - for(q = p;q != RT_NULL;q = q->next) + + for (q = p; q != RT_NULL; q = q->next) { - rt_memcpy((rt_uint8_t*)(q->payload),p_recv,q->len); + rt_memcpy((rt_uint8_t *)(q->payload),p_recv,q->len); } } else { rt_kprintf("Droping %d packet \n",length); } - + if(i == (MAX_RX_DESCR-1)) { sep_emac_write(address,0xe000); @@ -640,51 +654,49 @@ struct pbuf *rt_dm9161_rx(rt_device_t dev) break; } - rt_sem_release(&sem_lock); + rt_sem_release(&sem_lock); - return p; } - void rt_hw_dm9161_init() { rt_sem_init(&sem_ack, "tx_ack", 1, RT_IPC_FLAG_FIFO); - rt_sem_init(&sem_lock, "eth_lock", 1, RT_IPC_FLAG_FIFO); + rt_sem_init(&sem_lock, "eth_lock", 1, RT_IPC_FLAG_FIFO); - dm9161_device.type = TYPE_DM9161; + dm9161_device.type = TYPE_DM9161; dm9161_device.mode = DM9161_AUTO; dm9161_device.packet_cnt = 0; dm9161_device.queue_packet_len = 0; - /* - * SRAM Tx/Rx pointer automatically return to start address, - * Packet Transmitted, Packet Received - */ + /* + * SRAM Tx/Rx pointer automatically return to start address, + * Packet Transmitted, Packet Received + */ #warning NOTICE: - //dm9161_device.imr_all = IMR_PAR | IMR_PTM | IMR_PRM; + //dm9161_device.imr_all = IMR_PAR | IMR_PTM | IMR_PRM; - dm9161_device.dev_addr[0] = 0x01; - dm9161_device.dev_addr[1] = 0x60; - dm9161_device.dev_addr[2] = 0x6E; - dm9161_device.dev_addr[3] = 0x11; - dm9161_device.dev_addr[4] = 0x02; - dm9161_device.dev_addr[5] = 0x0F; + dm9161_device.dev_addr[0] = 0x01; + dm9161_device.dev_addr[1] = 0x60; + dm9161_device.dev_addr[2] = 0x6E; + dm9161_device.dev_addr[3] = 0x11; + dm9161_device.dev_addr[4] = 0x02; + dm9161_device.dev_addr[5] = 0x0F; - dm9161_device.parent.parent.init = rt_dm9161_init; - dm9161_device.parent.parent.open = rt_dm9161_open; - dm9161_device.parent.parent.close = rt_dm9161_close; - dm9161_device.parent.parent.read = rt_dm9161_read; - dm9161_device.parent.parent.write = rt_dm9161_write; - dm9161_device.parent.parent.control = rt_dm9161_control; - dm9161_device.parent.parent.user_data = RT_NULL; + dm9161_device.parent.parent.init = rt_dm9161_init; + dm9161_device.parent.parent.open = rt_dm9161_open; + dm9161_device.parent.parent.close = rt_dm9161_close; + dm9161_device.parent.parent.read = rt_dm9161_read; + dm9161_device.parent.parent.write = rt_dm9161_write; + dm9161_device.parent.parent.control = rt_dm9161_control; + dm9161_device.parent.parent.user_data = RT_NULL; - dm9161_device.parent.eth_rx = rt_dm9161_rx; - dm9161_device.parent.eth_tx = rt_dm9161_tx; + dm9161_device.parent.eth_rx = rt_dm9161_rx; + dm9161_device.parent.eth_tx = rt_dm9161_tx; - eth_device_init(&(dm9161_device.parent), "e0"); + eth_device_init(&(dm9161_device.parent), "e0"); - /* instal interrupt */ + /* instal interrupt */ #warning TODO //rt_hw_interrupt_install(INTEINT4_7, rt_dm9161_isr, RT_NULL); //rt_hw_interrupt_umask(INTEINT4_7); diff --git a/bsp/mini4020/dm9161.h b/bsp/mini4020/drivers/dm9161.h similarity index 81% rename from bsp/mini4020/dm9161.h rename to bsp/mini4020/drivers/dm9161.h index e8c2faa1a9..a0b8276762 100644 --- a/bsp/mini4020/dm9161.h +++ b/bsp/mini4020/drivers/dm9161.h @@ -1,3 +1,16 @@ +/* + * File : dm9161.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ + #ifndef __DM9000_H__ #define __DM9000_H__ diff --git a/bsp/mini4020/drivers/lcd.c b/bsp/mini4020/drivers/lcd.c new file mode 100644 index 0000000000..dec95781c3 --- /dev/null +++ b/bsp/mini4020/drivers/lcd.c @@ -0,0 +1,74 @@ +/* + * File : lcd.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ + +#include "lcdc.h" +#include "rtthread.h" +#include "board.h" + +#include +#include +#include +#include + +extern rt_err_t sep4020_lcd_init(void); +extern unsigned long pVideoBuffer; + +struct rtgui_graphic_driver _rtgui_lcd_driver; +struct rtgui_graphic_driver_ops _rtgui_graphic_driver_ops; + +void radio_rtgui_init(void) +{ + rtgui_rect_t rect; + rtgui_system_server_init(); + + /* register dock panel */ + rect.x1 = 0; + rect.y1 = 0; + rect.x2 = 320; + rect.y2 = 25; + rtgui_panel_register("info", &rect); + rtgui_panel_set_nofocused("info"); + + /* register main panel */ + rect.x1 = 0; + rect.y1 = 25; + rect.x2 = 320; + rect.y2 = 240; + rtgui_panel_register("main", &rect); + rtgui_panel_set_default_focused("main"); + + _rtgui_graphic_driver_ops.set_pixel=lcd_set_pixel; + _rtgui_graphic_driver_ops.get_pixel=lcd_get_pixel; + _rtgui_graphic_driver_ops.draw_hline=lcd_draw_hline; + _rtgui_graphic_driver_ops.draw_vline=lcd_draw_vline; + _rtgui_graphic_driver_ops.draw_raw_hline=lcd_draw_raw_hline; + + _rtgui_lcd_driver.bits_per_pixel = 16; + _rtgui_lcd_driver.width = 320; + _rtgui_lcd_driver.height = 240; + + _rtgui_lcd_driver.ops = &_rtgui_graphic_driver_ops; + + //_rtgui_lcd_driver.screen_update = lcd_update; + //_rtgui_lcd_driver.get_framebuffer = lcd_get_framebuffer; + + sep4020_lcd_init(); + + rt_memset((char*)pVideoBuffer,0xff,320*240*2); + //rt_memcpy((char*)pVideoBuffer,pic,320*240*2); //TESTING IMAGE + + //此处待修正 + /* add lcd driver into graphic driver */ + // rtgui_graphic_driver_add(&_rtgui_lcd_driver); +} + diff --git a/bsp/mini4020/lcdc.c b/bsp/mini4020/drivers/lcdc.c similarity index 50% rename from bsp/mini4020/lcdc.c rename to bsp/mini4020/drivers/lcdc.c index 4033ea17fc..0eedb91421 100644 --- a/bsp/mini4020/lcdc.c +++ b/bsp/mini4020/drivers/lcdc.c @@ -1,54 +1,58 @@ +/* + * File : lcdc.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ + #include "lcdc.h" #include - #define writel(DATA,ADDRESS) *((volatile rt_off_t *) ADDRESS)= DATA; - unsigned long pVideoBuffer; -rt_err_t sep4020_lcd_init(void) + +rt_err_t sep4020_lcd_init(void) { - - pVideoBuffer =(unsigned long) rt_malloc(LCDWIDTH*LCDHEIGHT*2); - + pVideoBuffer =(unsigned long)rt_malloc(LCDWIDTH * LCDHEIGHT * 2); *(RP)GPIO_PORTC_SEL |= 0X0008; //Portc8设置为通用口 *(RP)GPIO_PORTC_DIR &= (~0X0008); //Portc8设置为输出 *(RP)GPIO_PORTC_DATA |= 0X0008; //Portc8输出高电平 + writel(0x00000000,LCDC_LECR); //禁用LCDC + writel(pVideoBuffer,LCDC_SSA); //lcd数据帧的起始地址 + writel(YMAX | XMAX,LCDC_SIZE); + writel(TFT|COLOR|PBSIZE|BPIX|PIXPOL|FLMPOL|LPPOL|CLKPOL|OEPOL|END_SEL|ACD_SEL|ACD|PCD,LCDC_PCR); + writel(H_WIDTH|H_WAIT_1|H_WAIT_2,LCDC_HCR); + writel(V_WIDTH|PASS_FRAME_WAIT|V_WAIT_1|V_WAIT_2,LCDC_VCR); + writel(SCR|CC_EN|PW,LCDC_PWMR); + writel(BL|HM|TM,LCDC_DMACR); + writel(0x00000001,LCDC_LECR); //使能LCDC + writel(0x00000000,LCDC_LCDISREN); //中断在加载帧的最后一个或第一个数据时设置,到LCD之间会有一个延时 - - writel(0x00000000,LCDC_LECR); //禁用LCDC - writel(pVideoBuffer,LCDC_SSA); //lcd数据帧的起始地址 - writel(YMAX | XMAX,LCDC_SIZE); - writel(TFT|COLOR|PBSIZE|BPIX|PIXPOL|FLMPOL|LPPOL|CLKPOL|OEPOL|END_SEL|ACD_SEL|ACD|PCD,LCDC_PCR); - writel(H_WIDTH|H_WAIT_1|H_WAIT_2,LCDC_HCR); - writel(V_WIDTH|PASS_FRAME_WAIT|V_WAIT_1|V_WAIT_2,LCDC_VCR); - writel(SCR|CC_EN|PW,LCDC_PWMR); - writel(BL|HM|TM,LCDC_DMACR); - writel(0x00000001,LCDC_LECR); //使能LCDC - writel(0x00000000,LCDC_LCDISREN); //中断在加载帧的最后一个或第一个数据时设置,到LCD之间会有一个延时 - - return RT_EOK; + return RT_EOK; } - - void lcd_set_pixel(rtgui_color_t *c, int x,int y) +void lcd_set_pixel(rtgui_color_t *c, int x, int y) { unsigned short p; /* get color pixel */ p = rtgui_color_to_565p(*c); - - *(unsigned short *)(pVideoBuffer+2*y*LCDWIDTH+2*x)=p; + *(unsigned short *)(pVideoBuffer + 2*y*LCDWIDTH + 2*x) = p; } - void lcd_get_pixel(rtgui_color_t *c, int x, int y) { - *c = rtgui_color_from_565p( *(unsigned short *)(pVideoBuffer+2*y*LCDWIDTH+2*x)); } @@ -59,12 +63,10 @@ void lcd_draw_hline(rtgui_color_t *c, int x1, int x2, int y) /* get color pixel */ p = rtgui_color_to_565p(*c); - while (x1 < x2) { *(unsigned short *)(pVideoBuffer+2*y*LCDWIDTH+2*x1)=p; x1 ++; - } } @@ -75,11 +77,9 @@ void lcd_draw_vline(rtgui_color_t *c, int x, int y1, int y2) /* get color pixel */ p = rtgui_color_to_565p(*c); - while (y1 < y2) { - - *(unsigned short *)(pVideoBuffer+2*y1*LCDWIDTH+2*x)=p; + *(unsigned short *)(pVideoBuffer+2*y1*LCDWIDTH+2*x)=p; y1 ++; } } @@ -91,7 +91,6 @@ void lcd_draw_raw_hline(rt_uint8_t *pixels, int x1, int x2, int y) /* get pixel */ ptr = (rt_uint16_t*) pixels; - while (x1 < x2) { *(unsigned short *)(pVideoBuffer+2*y*LCDWIDTH+2*x1)=*ptr; @@ -105,7 +104,7 @@ void lcd_update(rtgui_rect_t *rect) /* nothing for none-DMA mode driver */ } -rt_uint8_t * lcd_get_framebuffer(void) +rt_uint8_t *lcd_get_framebuffer(void) { return RT_NULL; /* no framebuffer driver */ } diff --git a/bsp/mini4020/lcdc.h b/bsp/mini4020/drivers/lcdc.h similarity index 83% rename from bsp/mini4020/lcdc.h rename to bsp/mini4020/drivers/lcdc.h index 3b6c791107..cb3535b20c 100644 --- a/bsp/mini4020/lcdc.h +++ b/bsp/mini4020/drivers/lcdc.h @@ -1,3 +1,16 @@ +/* + * File : lcdc.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ + #ifndef LCD_GENERAL_H_INCLUDED #define LCD_GENERAL_H_INCLUDED diff --git a/bsp/mini4020/mii.h b/bsp/mini4020/drivers/mii.h similarity index 94% rename from bsp/mini4020/mii.h rename to bsp/mini4020/drivers/mii.h index 349b8db309..281921934c 100644 --- a/bsp/mini4020/mii.h +++ b/bsp/mini4020/drivers/mii.h @@ -1,3 +1,15 @@ +/* + * File : mii.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ #ifndef __MII_H__ #define __MII_H__ diff --git a/bsp/mini4020/sdcard.c b/bsp/mini4020/drivers/sdcard.c similarity index 95% rename from bsp/mini4020/sdcard.c rename to bsp/mini4020/drivers/sdcard.c index d2357e4175..4e4ed961e2 100644 --- a/bsp/mini4020/sdcard.c +++ b/bsp/mini4020/drivers/sdcard.c @@ -1,7 +1,7 @@ /* * File : sdcard.c * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006, 2007, RT-Thread Develop Team + * COPYRIGHT (C) 2007 - 2012, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at diff --git a/bsp/mini4020/sdcard.h b/bsp/mini4020/drivers/sdcard.h similarity index 68% rename from bsp/mini4020/sdcard.h rename to bsp/mini4020/drivers/sdcard.h index f4b1ba10aa..4a499846f8 100644 --- a/bsp/mini4020/sdcard.h +++ b/bsp/mini4020/drivers/sdcard.h @@ -1,3 +1,15 @@ +/* + * File : sdcard.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + */ #ifndef __SDCARD_H #define __SDCARD_H @@ -15,8 +27,8 @@ /*struct of the SDC*/ struct sd_c { - __IO rt_uint32_t clk_ctl; - __IO rt_uint32_t soft_rst; + __IO rt_uint32_t clk_ctl; + __IO rt_uint32_t soft_rst; __IO rt_uint32_t arg; __IO rt_uint32_t cmd; __IO rt_uint32_t blk_sz; @@ -44,8 +56,6 @@ struct sd_device rt_uint32_t buf_size; /*buffer size*/ }; - - #endif #endif diff --git a/bsp/mini4020/lcd.c b/bsp/mini4020/lcd.c deleted file mode 100644 index 93080abae1..0000000000 --- a/bsp/mini4020/lcd.c +++ /dev/null @@ -1,69 +0,0 @@ -#include "lcdc.h" -#include "rtthread.h" -#include "board.h" - -#include -#include -#include -#include -extern rt_err_t sep4020_lcd_init(void); -extern unsigned long pVideoBuffer; - - -struct rtgui_graphic_driver _rtgui_lcd_driver; -struct rtgui_graphic_driver_ops _rtgui_graphic_driver_ops; - -void radio_rtgui_init(void) -{ - rtgui_rect_t rect; -// rtgui_color_t c=0xff; - rtgui_system_server_init(); - - /* register dock panel */ - rect.x1 = 0; - rect.y1 = 0; - rect.x2 = 320; - rect.y2 = 25; - rtgui_panel_register("info", &rect); - rtgui_panel_set_nofocused("info"); - - /* register main panel */ - rect.x1 = 0; - rect.y1 = 25; - rect.x2 = 320; - rect.y2 = 240; - rtgui_panel_register("main", &rect); - rtgui_panel_set_default_focused("main"); - -_rtgui_graphic_driver_ops.set_pixel=lcd_set_pixel; - -_rtgui_graphic_driver_ops.get_pixel=lcd_get_pixel; -_rtgui_graphic_driver_ops.draw_hline=lcd_draw_hline; -_rtgui_graphic_driver_ops.draw_vline=lcd_draw_vline; -_rtgui_graphic_driver_ops.draw_raw_hline=lcd_draw_raw_hline; - - - _rtgui_lcd_driver.bits_per_pixel = 16; - _rtgui_lcd_driver.width = 320; - _rtgui_lcd_driver.height = 240; - - _rtgui_lcd_driver.ops = &_rtgui_graphic_driver_ops; - - // _rtgui_lcd_driver.screen_update = lcd_update; - // _rtgui_lcd_driver.get_framebuffer = lcd_get_framebuffer; - - sep4020_lcd_init(); - - rt_memset((char*)pVideoBuffer,0xff,320*240*2); - // rt_memcpy((char*)pVideoBuffer,pic,320*240*2); //TESTING IMAGE - - //此处待修正 - /* add lcd driver into graphic driver */ - // rtgui_graphic_driver_add(&_rtgui_lcd_driver); - - - - - -} - diff --git a/bsp/mini4020/project.Uv2 b/bsp/mini4020/project.Uv2 index e600423963..49f40d07e0 100644 --- a/bsp/mini4020/project.Uv2 +++ b/bsp/mini4020/project.Uv2 @@ -3,160 +3,96 @@ Target (RT-Thread_Mini4020), 0x0004 // Tools: 'ARM-ADS' -Group (Startup) +Group (Applications) +Group (Drivers) Group (Kernel) Group (SEP4020) Group (Filesystem) Group (finsh) Group (LwIP) -Group (RTGUI) -File 1,1,<.\application.c> -File 1,1,<.\board.c> -File 1,1,<.\dm9161.c> -File 1,1,<.\lcd.c> -File 1,1,<.\lcdc.c> -File 1,1,<.\sdcard.c> -File 1,1,<.\startup.c> -File 2,1,<..\..\src\clock.c> -File 2,1,<..\..\src\device.c> -File 2,1,<..\..\src\idle.c> -File 2,1,<..\..\src\ipc.c> -File 2,1,<..\..\src\irq.c> -File 2,1,<..\..\src\kservice.c> -File 2,1,<..\..\src\memheap.c> -File 2,1,<..\..\src\mempool.c> -File 2,1,<..\..\src\object.c> -File 2,1,<..\..\src\scheduler.c> -File 2,1,<..\..\src\slab.c> -File 2,1,<..\..\src\thread.c> -File 2,1,<..\..\src\timer.c> -File 3,1,<..\..\libcpu\arm\sep4020\clk.c> -File 3,1,<..\..\libcpu\arm\sep4020\cpu.c> -File 3,1,<..\..\libcpu\arm\sep4020\interrupt.c> -File 3,1,<..\..\libcpu\arm\sep4020\serial.c> -File 3,1,<..\..\libcpu\arm\sep4020\stack.c> -File 3,1,<..\..\libcpu\arm\sep4020\trap.c> -File 3,2,<..\..\libcpu\arm\sep4020\context_rvds.S> -File 3,2,<..\..\libcpu\arm\sep4020\start_rvds.S> -File 3,1,<..\..\libcpu\arm\common\backtrace.c> -File 3,1,<..\..\libcpu\arm\common\div0.c> -File 3,1,<..\..\libcpu\arm\common\showmem.c> -File 4,1,<..\..\components\dfs\src\dfs.c> -File 4,1,<..\..\components\dfs\src\dfs_fs.c> -File 4,1,<..\..\components\dfs\src\dfs_file.c> -File 4,1,<..\..\components\dfs\src\dfs_posix.c> -File 4,1,<..\..\components\dfs\filesystems\elmfat\dfs_elm.c> -File 4,1,<..\..\components\dfs\filesystems\elmfat\ff.c> -File 5,1,<..\..\components\finsh\cmd.c> -File 5,1,<..\..\components\finsh\finsh_compiler.c> -File 5,1,<..\..\components\finsh\finsh_error.c> -File 5,1,<..\..\components\finsh\finsh_heap.c> -File 5,1,<..\..\components\finsh\finsh_init.c> -File 5,1,<..\..\components\finsh\finsh_node.c> -File 5,1,<..\..\components\finsh\finsh_ops.c> -File 5,1,<..\..\components\finsh\finsh_parser.c> -File 5,1,<..\..\components\finsh\finsh_token.c> -File 5,1,<..\..\components\finsh\finsh_var.c> -File 5,1,<..\..\components\finsh\finsh_vm.c> -File 5,1,<..\..\components\finsh\shell.c> -File 5,1,<..\..\components\finsh\symbol.c> -File 6,1,<..\..\components\net\lwip\src\api\api_lib.c> -File 6,1,<..\..\components\net\lwip\src\api\api_msg.c> -File 6,1,<..\..\components\net\lwip\src\api\err.c> -File 6,1,<..\..\components\net\lwip\src\api\netbuf.c> -File 6,1,<..\..\components\net\lwip\src\api\netdb.c> -File 6,1,<..\..\components\net\lwip\src\api\netifapi.c> -File 6,1,<..\..\components\net\lwip\src\api\sockets.c> -File 6,1,<..\..\components\net\lwip\src\api\tcpip.c> -File 6,1,<..\..\components\net\lwip\src\arch\sys_arch.c> -File 6,1,<..\..\components\net\lwip\src\core\def.c> -File 6,1,<..\..\components\net\lwip\src\core\dhcp.c> -File 6,1,<..\..\components\net\lwip\src\core\dns.c> -File 6,1,<..\..\components\net\lwip\src\core\init.c> -File 6,1,<..\..\components\net\lwip\src\core\memp.c> -File 6,1,<..\..\components\net\lwip\src\core\netif.c> -File 6,1,<..\..\components\net\lwip\src\core\pbuf.c> -File 6,1,<..\..\components\net\lwip\src\core\raw.c> -File 6,1,<..\..\components\net\lwip\src\core\stats.c> -File 6,1,<..\..\components\net\lwip\src\core\sys.c> -File 6,1,<..\..\components\net\lwip\src\core\tcp.c> -File 6,1,<..\..\components\net\lwip\src\core\tcp_in.c> -File 6,1,<..\..\components\net\lwip\src\core\tcp_out.c> -File 6,1,<..\..\components\net\lwip\src\core\timers.c> -File 6,1,<..\..\components\net\lwip\src\core\udp.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\autoip.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\icmp.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\igmp.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\inet.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\inet_chksum.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\ip.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\ip_addr.c> -File 6,1,<..\..\components\net\lwip\src\core\ipv4\ip_frag.c> -File 6,1,<..\..\components\net\lwip\src\netif\etharp.c> -File 6,1,<..\..\components\net\lwip\src\netif\ethernetif.c> -File 6,1,<..\..\components\net\lwip\src\netif\slipif.c> -File 7,1,<..\..\components\rtgui\common\blit.c> -File 7,1,<..\..\components\rtgui\common\color.c> -File 7,1,<..\..\components\rtgui\common\region.c> -File 7,1,<..\..\components\rtgui\common\rtgui_object.c> -File 7,1,<..\..\components\rtgui\common\rtgui_system.c> -File 7,1,<..\..\components\rtgui\common\rtgui_theme.c> -File 7,1,<..\..\components\rtgui\common\rtgui_xml.c> -File 7,1,<..\..\components\rtgui\common\dc.c> -File 7,1,<..\..\components\rtgui\common\dc_hw.c> -File 7,1,<..\..\components\rtgui\common\dc_buffer.c> -File 7,1,<..\..\components\rtgui\common\dc_client.c> -File 7,1,<..\..\components\rtgui\common\filerw.c> -File 7,1,<..\..\components\rtgui\common\image.c> -File 7,1,<..\..\components\rtgui\common\image_xpm.c> -File 7,1,<..\..\components\rtgui\common\image_hdc.c> -File 7,1,<..\..\components\rtgui\common\image_bmp.c> -File 7,1,<..\..\components\rtgui\common\image_png.c> -File 7,1,<..\..\components\rtgui\common\image_jpg.c> -File 7,1,<..\..\components\rtgui\common\image_container.c> -File 7,1,<..\..\components\rtgui\common\font.c> -File 7,1,<..\..\components\rtgui\common\font_bmp.c> -File 7,1,<..\..\components\rtgui\common\font_hz_file.c> -File 7,1,<..\..\components\rtgui\common\font_hz_bmp.c> -File 7,1,<..\..\components\rtgui\common\asc12font.c> -File 7,1,<..\..\components\rtgui\common\asc16font.c> -File 7,1,<..\..\components\rtgui\common\hz12font.c> -File 7,1,<..\..\components\rtgui\common\hz16font.c> -File 7,1,<..\..\components\rtgui\common\framebuffer_driver.c> -File 7,1,<..\..\components\rtgui\common\pixel_driver.c> -File 7,1,<..\..\components\rtgui\server\driver.c> -File 7,1,<..\..\components\rtgui\server\mouse.c> -File 7,1,<..\..\components\rtgui\server\panel.c> -File 7,1,<..\..\components\rtgui\server\server.c> -File 7,1,<..\..\components\rtgui\server\topwin.c> -File 7,1,<..\..\components\rtgui\widgets\box.c> -File 7,1,<..\..\components\rtgui\widgets\button.c> -File 7,1,<..\..\components\rtgui\widgets\checkbox.c> -File 7,1,<..\..\components\rtgui\widgets\container.c> -File 7,1,<..\..\components\rtgui\widgets\combobox.c> -File 7,1,<..\..\components\rtgui\widgets\iconbox.c> -File 7,1,<..\..\components\rtgui\widgets\label.c> -File 7,1,<..\..\components\rtgui\widgets\textview.c> -File 7,1,<..\..\components\rtgui\widgets\listctrl.c> -File 7,1,<..\..\components\rtgui\widgets\menu.c> -File 7,1,<..\..\components\rtgui\widgets\progressbar.c> -File 7,1,<..\..\components\rtgui\widgets\radiobox.c> -File 7,1,<..\..\components\rtgui\widgets\slider.c> -File 7,1,<..\..\components\rtgui\widgets\scrollbar.c> -File 7,1,<..\..\components\rtgui\widgets\staticline.c> -File 7,1,<..\..\components\rtgui\widgets\textbox.c> -File 7,1,<..\..\components\rtgui\widgets\listbox.c> -File 7,1,<..\..\components\rtgui\widgets\title.c> -File 7,1,<..\..\components\rtgui\widgets\toplevel.c> -File 7,1,<..\..\components\rtgui\widgets\notebook.c> -File 7,1,<..\..\components\rtgui\widgets\view.c> -File 7,1,<..\..\components\rtgui\widgets\list_view.c> -File 7,1,<..\..\components\rtgui\widgets\about_view.c> -File 7,1,<..\..\components\rtgui\widgets\filelist_view.c> -File 7,1,<..\..\components\rtgui\widgets\widget.c> -File 7,1,<..\..\components\rtgui\widgets\window.c> -File 7,1,<..\..\components\rtgui\widgets\workbench.c> +File 1,1, +File 1,1, +File 2,1, +File 2,1, +File 2,1, +File 3,1,<..\..\src\clock.c> +File 3,1,<..\..\src\device.c> +File 3,1,<..\..\src\idle.c> +File 3,1,<..\..\src\ipc.c> +File 3,1,<..\..\src\irq.c> +File 3,1,<..\..\src\kservice.c> +File 3,1,<..\..\src\mempool.c> +File 3,1,<..\..\src\object.c> +File 3,1,<..\..\src\scheduler.c> +File 3,1,<..\..\src\slab.c> +File 3,1,<..\..\src\thread.c> +File 3,1,<..\..\src\timer.c> +File 4,1,<..\..\libcpu\arm\sep4020\clk.c> +File 4,1,<..\..\libcpu\arm\sep4020\cpu.c> +File 4,1,<..\..\libcpu\arm\sep4020\interrupt.c> +File 4,1,<..\..\libcpu\arm\sep4020\serial.c> +File 4,1,<..\..\libcpu\arm\sep4020\stack.c> +File 4,1,<..\..\libcpu\arm\sep4020\trap.c> +File 4,2,<..\..\libcpu\arm\sep4020\context_rvds.S> +File 4,2,<..\..\libcpu\arm\sep4020\start_rvds.S> +File 4,1,<..\..\libcpu\arm\common\backtrace.c> +File 4,1,<..\..\libcpu\arm\common\div0.c> +File 4,1,<..\..\libcpu\arm\common\showmem.c> +File 5,1,<..\..\components\dfs\src\dfs.c> +File 5,1,<..\..\components\dfs\src\dfs_fs.c> +File 5,1,<..\..\components\dfs\src\dfs_file.c> +File 5,1,<..\..\components\dfs\src\dfs_posix.c> +File 5,1,<..\..\components\dfs\filesystems\elmfat\dfs_elm.c> +File 5,1,<..\..\components\dfs\filesystems\elmfat\ff.c> +File 6,1,<..\..\components\finsh\cmd.c> +File 6,1,<..\..\components\finsh\finsh_compiler.c> +File 6,1,<..\..\components\finsh\finsh_error.c> +File 6,1,<..\..\components\finsh\finsh_heap.c> +File 6,1,<..\..\components\finsh\finsh_init.c> +File 6,1,<..\..\components\finsh\finsh_node.c> +File 6,1,<..\..\components\finsh\finsh_ops.c> +File 6,1,<..\..\components\finsh\finsh_parser.c> +File 6,1,<..\..\components\finsh\finsh_token.c> +File 6,1,<..\..\components\finsh\finsh_var.c> +File 6,1,<..\..\components\finsh\finsh_vm.c> +File 6,1,<..\..\components\finsh\shell.c> +File 6,1,<..\..\components\finsh\symbol.c> +File 7,1,<..\..\components\net\lwip\src\api\api_lib.c> +File 7,1,<..\..\components\net\lwip\src\api\api_msg.c> +File 7,1,<..\..\components\net\lwip\src\api\err.c> +File 7,1,<..\..\components\net\lwip\src\api\netbuf.c> +File 7,1,<..\..\components\net\lwip\src\api\netdb.c> +File 7,1,<..\..\components\net\lwip\src\api\netifapi.c> +File 7,1,<..\..\components\net\lwip\src\api\sockets.c> +File 7,1,<..\..\components\net\lwip\src\api\tcpip.c> +File 7,1,<..\..\components\net\lwip\src\arch\sys_arch.c> +File 7,1,<..\..\components\net\lwip\src\core\def.c> +File 7,1,<..\..\components\net\lwip\src\core\dhcp.c> +File 7,1,<..\..\components\net\lwip\src\core\dns.c> +File 7,1,<..\..\components\net\lwip\src\core\init.c> +File 7,1,<..\..\components\net\lwip\src\core\memp.c> +File 7,1,<..\..\components\net\lwip\src\core\netif.c> +File 7,1,<..\..\components\net\lwip\src\core\pbuf.c> +File 7,1,<..\..\components\net\lwip\src\core\raw.c> +File 7,1,<..\..\components\net\lwip\src\core\stats.c> +File 7,1,<..\..\components\net\lwip\src\core\sys.c> +File 7,1,<..\..\components\net\lwip\src\core\tcp.c> +File 7,1,<..\..\components\net\lwip\src\core\tcp_in.c> +File 7,1,<..\..\components\net\lwip\src\core\tcp_out.c> +File 7,1,<..\..\components\net\lwip\src\core\timers.c> +File 7,1,<..\..\components\net\lwip\src\core\udp.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\autoip.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\icmp.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\igmp.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\inet.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\inet_chksum.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\ip.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\ip_addr.c> +File 7,1,<..\..\components\net\lwip\src\core\ipv4\ip_frag.c> +File 7,1,<..\..\components\net\lwip\src\netif\etharp.c> +File 7,1,<..\..\components\net\lwip\src\netif\ethernetif.c> +File 7,1,<..\..\components\net\lwip\src\netif\slipif.c> @@ -219,7 +155,7 @@ Options 1,0,0 // Target 'RT-Thread_Mini4020' ADSCMISC (-g) ADSCDEFN () ADSCUDEF () - ADSCINCD (..\..\components\rtgui\server;..\..\include;..\..\libcpu\arm\sep4020;..\..\components\rtgui\widgets;..\..\components\net\lwip\src\include;.;..\..\components\net\lwip\src\include\ipv4;..\..\components\dfs;..\..\components\rtgui\include;..\..\components\net\lwip\src\arch\include;..\..\components\dfs\include;..\..\components\net\lwip\src;..\..\libcpu\arm\common;..\..\components\rtgui\common;..\..\components\finsh;..\..\components\net\lwip\src\include\netif) + ADSCINCD (..\..\include;..\..\libcpu\arm\sep4020;drivers;..\..\components\dfs;..\..\components\net\lwip\src\include;.;..\..\components\net\lwip\src\include\ipv4;applications;..\..\components\net\lwip\src\arch\include;..\..\components\dfs\include;..\..\components\net\lwip\src;..\..\libcpu\arm\common;..\..\components\finsh;..\..\components\net\lwip\src\include\netif) ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } ADSAMISC () ADSADEFN () diff --git a/bsp/mini4020/rtconfig.h b/bsp/mini4020/rtconfig.h index b5a0d51945..2361f70a4b 100644 --- a/bsp/mini4020/rtconfig.h +++ b/bsp/mini4020/rtconfig.h @@ -174,7 +174,7 @@ /* SECTION: RTGUI support */ /* using RTGUI support */ -#define RT_USING_RTGUI +/* #define RT_USING_RTGUI */ /* name length of RTGUI object */ #define RTGUI_NAME_MAX 16