remove RT_USING_RTGUI and compiling error in Keil MDK.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1386 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong
2011-04-26 09:54:23 +00:00
parent 89d13cbd32
commit 0220cb673a
9 changed files with 66 additions and 349 deletions
+2 -1
View File
@@ -80,7 +80,6 @@ rt_uint16_t adc_value;
static void adc_thread_entry(void *parameter)
{
rt_device_t device;
device = rt_device_find("adc");
#ifdef RT_USING_RTGUI
struct rtgui_event_command ecmd;
@@ -92,6 +91,8 @@ static void adc_thread_entry(void *parameter)
struct lcd_msg msg;
#endif
device = rt_device_find("adc");
while(1)
{
rt_device_control(device, RT_DEVICE_CTRL_ADC_START, RT_NULL);
+2
View File
@@ -48,6 +48,7 @@ void rt_init_thread_entry(void *parameter)
/* startup rtgui */
rtgui_startup();
#else
{
char buf[20] = {'\0'};
struct lcd_msg msg;
rt_device_t device;
@@ -113,6 +114,7 @@ void rt_init_thread_entry(void *parameter)
}
}
}
}
#endif
}
+1 -1
View File
@@ -958,4 +958,4 @@ const unsigned char FONTTYPE8_8[][8] = {
};
#endif /* __FONT_H */
#endif /* __FONT_H */
+4 -1
View File
@@ -1,3 +1,6 @@
#include <rtthread.h>
#ifdef RT_USING_RTGUI
#include <rtgui/rtgui.h>
#include <rtgui/rtgui_server.h>
#include <rtgui/rtgui_system.h>
@@ -7,7 +10,6 @@
#include "adc.h"
#include "cpuusage.h"
#include <rtthread.h>
extern rt_uint16_t adc_value;
static rt_uint8_t index = 0 ;
@@ -209,3 +211,4 @@ void rtgui_startup()
info_init();
}
#endif
+42 -44
View File
@@ -9,7 +9,7 @@
*
* Change Logs:
* Date Author Notes
* 2011-03-03 lgnq
* 2011-03-03 lgnq
*/
#include <rtthread.h>
@@ -109,51 +109,49 @@ static void key_thread_entry(void *parameter)
rt_thread_delay(next_delay);
}
#else
extern struct rt_messagequeue mq;
rt_time_t next_delay;
rt_uint8_t i;
struct lcd_msg msg;
msg.type = KEY_MSG;
key_io_init();
while (1)
{
msg.key = NO_KEY;
next_delay = RT_TICK_PER_SECOND/10;
if (KEY_ENTER_GETVALUE() == 0 )
extern struct rt_messagequeue mq;
rt_time_t next_delay;
struct lcd_msg msg;
msg.type = KEY_MSG;
key_io_init();
while (1)
{
msg.key = KEY_ENTER;
msg.key = NO_KEY;
next_delay = RT_TICK_PER_SECOND/10;
if (KEY_ENTER_GETVALUE() == 0 )
{
msg.key = KEY_ENTER;
}
if (KEY_DOWN_GETVALUE() == 0)
{
msg.key = KEY_DOWN;
}
if (KEY_UP_GETVALUE() == 0)
{
msg.key = KEY_UP;
}
if (KEY_RIGHT_GETVALUE() == 0)
{
msg.key = KEY_RIGHT;
}
if (KEY_LEFT_GETVALUE() == 0)
{
msg.key = KEY_LEFT;
}
rt_mq_send(&mq, &msg, sizeof(msg));
/* wait next key press */
rt_thread_delay(next_delay);
}
if (KEY_DOWN_GETVALUE() == 0)
{
msg.key = KEY_DOWN;
}
if (KEY_UP_GETVALUE() == 0)
{
msg.key = KEY_UP;
}
if (KEY_RIGHT_GETVALUE() == 0)
{
msg.key = KEY_RIGHT;
}
if (KEY_LEFT_GETVALUE() == 0)
{
msg.key = KEY_LEFT;
}
rt_mq_send(&mq, &msg, sizeof(msg));
/* wait next key press */
rt_thread_delay(next_delay);
}
#endif
}
+1 -1
View File
@@ -44,4 +44,4 @@
void rt_hw_key_init(void);
#endif
#endif
+8 -5
View File
@@ -333,9 +333,11 @@ void LCD_FillAll(unsigned char* buffer)
*******************************************************************************/
void LCD_ClearSCR(void)
{
for(unsigned char i=0; i<GUI_LCM_PAGE; i++)
unsigned char i, j;
for(i=0; i<GUI_LCM_PAGE; i++)
{
for(unsigned char j = 0; j < GUI_LCM_XMAX; j++)
for(j = 0; j < GUI_LCM_XMAX; j++)
gui_disp_buf[i][j] = 0;
}
LCD_FillAll((unsigned char*)gui_disp_buf);
@@ -377,6 +379,7 @@ void LCD_UpdatePoint(unsigned int x, unsigned int y)
unsigned char LCD_PutChar(unsigned long x, unsigned long y, unsigned char ch)
{
unsigned char data;
unsigned char i, j;
if( x >=(GUI_LCM_XMAX-8) ) return(0);
if( y >=(GUI_LCM_YMAX-8) ) return(0);
@@ -392,11 +395,11 @@ unsigned char LCD_PutChar(unsigned long x, unsigned long y, unsigned char ch)
else
return(0);
for(unsigned char i = 0; i < 8; i++)
for(i = 0; i < 8; i++)
{
data = FONTTYPE8_8[ch][i];
for(unsigned char j = 0; j < 8; j++)
for(j = 0; j < 8; j++)
{
if( (data&BIT_MASK[j]) == 0)
gui_disp_buf[y / 8][x] &= (~(0x01 << ( y % 8)));
@@ -448,7 +451,7 @@ static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
LCD_WriteCmd(Display_Off);
break;
case RT_DEVICE_CTRL_LCD_PUT_STRING:
LCD_PutString(x, y, (rt_uint8_t*)args);
LCD_PutString(x, y, (char*)args);
break;
case RT_DEVICE_CTRL_LCD_CLEAR_SCR:
LCD_ClearSCR();
+1 -1
View File
@@ -39,4 +39,4 @@ void rt_hw_led_off(rt_uint8_t num);
void rt_hw_led_toggle(rt_uint8_t num);
void pwm_update(rt_uint16_t value);
#endif
#endif
+5 -295
View File
File diff suppressed because it is too large Load Diff