git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1581 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
f02f51d2e3
commit
d5acd9ac98
|
@ -11,7 +11,7 @@ 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)
|
||||
{
|
||||
|
@ -35,27 +35,31 @@ void radio_rtgui_init(void)
|
|||
rtgui_panel_register("main", &rect);
|
||||
rtgui_panel_set_default_focused("main");
|
||||
|
||||
_rtgui_graphic_driver_ops.set_pixel=lcd_set_pixel;
|
||||
|
||||
_rtgui_lcd_driver.name = "lcd";
|
||||
_rtgui_lcd_driver.byte_per_pixel = 2;
|
||||
_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.draw_hline = lcd_draw_hline;
|
||||
_rtgui_lcd_driver.draw_raw_hline = lcd_draw_raw_hline;
|
||||
_rtgui_lcd_driver.draw_vline = lcd_draw_vline;
|
||||
_rtgui_lcd_driver.get_pixel = lcd_get_pixel;
|
||||
_rtgui_lcd_driver.set_pixel = lcd_set_pixel;
|
||||
_rtgui_lcd_driver.screen_update = lcd_update;
|
||||
_rtgui_lcd_driver.get_framebuffer = lcd_get_framebuffer;
|
||||
|
||||
_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);
|
||||
// rtgui_graphic_driver_add(&_rtgui_lcd_driver);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ rt_err_t sep4020_lcd_init(void)
|
|||
}
|
||||
|
||||
|
||||
void lcd_set_pixel(rtgui_color_t *c, rt_base_t x, rt_base_t y)
|
||||
void lcd_set_pixel(rtgui_color_t *c, int x,int y)
|
||||
{
|
||||
unsigned short p;
|
||||
|
||||
|
@ -46,13 +46,13 @@ rt_err_t sep4020_lcd_init(void)
|
|||
}
|
||||
|
||||
|
||||
void lcd_get_pixel(rtgui_color_t *c, rt_base_t x, rt_base_t y)
|
||||
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));
|
||||
}
|
||||
|
||||
void lcd_draw_hline(rtgui_color_t *c, rt_base_t x1, rt_base_t x2, rt_base_t y)
|
||||
void lcd_draw_hline(rtgui_color_t *c, int x1, int x2, int y)
|
||||
{
|
||||
unsigned short p;
|
||||
|
||||
|
@ -68,7 +68,7 @@ void lcd_draw_hline(rtgui_color_t *c, rt_base_t x1, rt_base_t x2, rt_base_t y)
|
|||
}
|
||||
}
|
||||
|
||||
void lcd_draw_vline(rtgui_color_t *c, rt_base_t x, rt_base_t y1, rt_base_t y2)
|
||||
void lcd_draw_vline(rtgui_color_t *c, int x, int y1, int y2)
|
||||
{
|
||||
unsigned short p;
|
||||
|
||||
|
@ -84,7 +84,7 @@ void lcd_draw_vline(rtgui_color_t *c, rt_base_t x, rt_base_t y1, rt_base_t y2)
|
|||
}
|
||||
}
|
||||
|
||||
void lcd_draw_raw_hline(rt_uint8_t *pixels, rt_base_t x1, rt_base_t x2, rt_base_t y)
|
||||
void lcd_draw_raw_hline(rt_uint8_t *pixels, int x1, int x2, int y)
|
||||
{
|
||||
rt_uint16_t *ptr;
|
||||
|
||||
|
|
|
@ -53,11 +53,11 @@
|
|||
#define HM (7 << 16)
|
||||
#define TM (3)
|
||||
|
||||
void lcd_set_pixel(rtgui_color_t *c, rt_base_t x, rt_base_t y);
|
||||
void lcd_get_pixel(rtgui_color_t *c, rt_base_t x, rt_base_t y);
|
||||
void lcd_draw_hline(rtgui_color_t *c, rt_base_t x1, rt_base_t x2, rt_base_t y) ;
|
||||
void lcd_draw_vline(rtgui_color_t *c, rt_base_t x, rt_base_t y1, rt_base_t y2) ;
|
||||
void lcd_draw_raw_hline(rt_uint8_t *pixels, rt_base_t x1, rt_base_t x2, rt_base_t y) ;
|
||||
void lcd_set_pixel(rtgui_color_t *c, int x, int y);
|
||||
void lcd_get_pixel(rtgui_color_t *c, int x, int y);
|
||||
void lcd_draw_hline(rtgui_color_t *c, int x1, int x2, int y) ;
|
||||
void lcd_draw_vline(rtgui_color_t *c, int x, int y1, int y2) ;
|
||||
void lcd_draw_raw_hline(rt_uint8_t *pixels, int x1, int x2, int y) ;
|
||||
void lcd_update(rtgui_rect_t *rect);
|
||||
rt_uint8_t * lcd_get_framebuffer(void);
|
||||
rt_err_t sep4020_lcd_init(void);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "sdcard.h"
|
||||
#include <dfs_config.h>
|
||||
//#include <dfs_config.h>
|
||||
|
||||
volatile rt_int32_t RCA;
|
||||
|
||||
|
|
Loading…
Reference in New Issue