fixed a compiling error and format the coding style
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2195 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
94d413a7a7
commit
4dc24e6a86
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* File : app.c
|
||||
* 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
|
||||
|
@ -89,22 +89,22 @@ void rt_init_thread_entry(void* parameter)
|
|||
rect.y1 = 0;
|
||||
rect.x2 = 400;
|
||||
rect.y2 = 480;
|
||||
rtgui_panel_register("panel", &rect);
|
||||
// rtgui_panel_register("panel", &rect);
|
||||
|
||||
/* register main panel */
|
||||
rect.x1 = 400;
|
||||
rect.y1 = 0;
|
||||
rect.x2 = 800;
|
||||
rect.y2 = 480;
|
||||
rtgui_panel_register("main", &rect);
|
||||
rtgui_panel_set_default_focused("main");
|
||||
// rtgui_panel_register("main", &rect);
|
||||
// rtgui_panel_set_default_focused("main");
|
||||
|
||||
rt_hw_lcd_init();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int rt_application_init()
|
||||
int rt_application_init(void)
|
||||
{
|
||||
rt_thread_t tid;
|
||||
|
||||
|
@ -112,7 +112,8 @@ int rt_application_init()
|
|||
tid = rt_thread_create("init",
|
||||
rt_init_thread_entry, RT_NULL,
|
||||
4096, 8, 20);
|
||||
if (tid != RT_NULL) rt_thread_startup(tid);
|
||||
if (tid != RT_NULL)
|
||||
rt_thread_startup(tid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* File : board.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Develop 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
|
||||
|
@ -22,12 +22,13 @@
|
|||
/**
|
||||
* @addtogroup Loongson SoC3210
|
||||
*/
|
||||
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
* This is the timer interrupt service routine.
|
||||
*/
|
||||
void rt_hw_timer_handler()
|
||||
void rt_hw_timer_handler(void)
|
||||
{
|
||||
unsigned int count;
|
||||
|
||||
|
@ -42,7 +43,7 @@ void rt_hw_timer_handler()
|
|||
/**
|
||||
* This function will initial OS timer
|
||||
*/
|
||||
void rt_hw_timer_init()
|
||||
void rt_hw_timer_init(void)
|
||||
{
|
||||
write_c0_compare(CPU_HZ/2/RT_TICK_PER_SECOND);
|
||||
write_c0_count(0);
|
||||
|
@ -51,7 +52,7 @@ void rt_hw_timer_init()
|
|||
/**
|
||||
* This function will initial sam7s64 board.
|
||||
*/
|
||||
void rt_hw_board_init()
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
#ifdef RT_USING_UART
|
||||
/* init hardware UART device */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* File : lcd_800480.c
|
||||
* File : lnn800x480.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Develop Team
|
||||
* COPYRIGHT (C) 2010 - 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
|
||||
|
@ -77,10 +77,11 @@ static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
|
|||
return RT_EOK;
|
||||
}
|
||||
|
||||
void rt_hw_lcd_init()
|
||||
void rt_hw_lcd_init(void)
|
||||
{
|
||||
rt_device_t lcd = rt_malloc(sizeof(struct rt_device));
|
||||
if (lcd == RT_NULL) return; /* no memory yet */
|
||||
if (lcd == RT_NULL)
|
||||
return; /* no memory yet */
|
||||
|
||||
_lcd_info.bits_per_pixel = 16;
|
||||
_lcd_info.pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565P;
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/*
|
||||
* File : newlib_stub.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 <rtthread.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -6,14 +19,12 @@
|
|||
|
||||
/* some newlib leaked function in CodeSourcery G++ Lite for MIPS version */
|
||||
|
||||
int
|
||||
getpid()
|
||||
int getpid(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
gettimeofday(struct timeval *__tp, void *__tzp)
|
||||
int gettimeofday(struct timeval *__tp, void *__tzp)
|
||||
{
|
||||
struct timespec tp;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ if os.getenv('RTT_CC'):
|
|||
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
|
||||
EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_MIPS_ELF/bin'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
print '================ERROR============================'
|
||||
print 'Not support keil yet!'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* File : startup.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Develop 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
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/*
|
||||
* File : uart.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 <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
/*
|
||||
* File : uart.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 __UART_H__
|
||||
#define __UART_H__
|
||||
|
||||
|
|
Loading…
Reference in New Issue