Esempio n. 1
0
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_lcd_driver.name            = "lcd";
        _rtgui_lcd_driver.byte_per_pixel  = 2;
        _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;

        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);




	
}
Esempio n. 2
0
void rtgui_startup()
{
    rtgui_rect_t rect;
    
	/* GUI系统初始化 */
    rtgui_system_server_init();
        
    /* register dock panel */
    rect.x1 = 0;
    rect.y1 = 0;
    rect.x2 = 128;
    rect.y2 = 64;
    rtgui_panel_register("info", &rect);
    rtgui_panel_set_default_focused("info");
    
	/* 启动info workbench */
	info_init();
}
Esempio n. 3
0
void gui_init()
{
	extern void rtgui_touch_hw_init(void);
	extern rt_err_t load_setup(void);
    rtgui_rect_t rect;
	rt_device_t lcd;

	/* 初始化LCD驱动 */
    ra8875_init();
	lcd = rt_device_find("lcd");
	if (lcd != RT_NULL)
	{
		rt_device_init(lcd);
		rtgui_graphic_set_device(lcd);

		/* 初始化RT-Thread/GUI server */
	    rtgui_system_server_init();

    /* 注册面板 */
    rect.x1 = 0;
    rect.y1 = 0;
    rect.x2 = 800;
    rect.y2 = 480;
    rtgui_panel_register("main", &rect);
    rtgui_panel_set_default_focused("main");

		/* 初始化键盘驱动 */
//		rt_hw_key_init();

		/* 初始化触摸屏驱动 */
//		load_setup(); //touch装载默认值
//		rtgui_touch_hw_init();
	    rt_device_init_all();

		/* 初始化workbench */
		workbench_init();
	}
}
Esempio n. 4
0
void radio_rtgui_init(void)
{
    rtgui_rect_t rect;

    rtgui_system_server_init();

    /* register dock panel */
    rect.x1 = 0;
    rect.y1 = 0;
    rect.x2 = 240;
    rect.y2 = 25;
    rtgui_panel_register("info", &rect);
    rtgui_panel_set_nofocused("info");

    /* register main panel */
    rect.x1 = 0;
    rect.y1 = 25;
    rect.x2 = 240;
    rect.y2 = 320;
    rtgui_panel_register("main", &rect);
    rtgui_panel_set_default_focused("main");

    //rt_hw_lcd_init();
    {
#if LCD_VERSION == 1
#include "fmt0371/FMT0371.h"
        _rtgui_lcd_driver.name            = "lcd";
        _rtgui_lcd_driver.byte_per_pixel  = 2;
        _rtgui_lcd_driver.width           = 240;
        _rtgui_lcd_driver.height          = 320;
        _rtgui_lcd_driver.draw_hline      = fmt_lcd_draw_hline;
        _rtgui_lcd_driver.draw_raw_hline  = fmt_lcd_draw_raw_hline;
        _rtgui_lcd_driver.draw_vline      = fmt_lcd_draw_vline;
        _rtgui_lcd_driver.get_pixel       = fmt_lcd_get_pixel;
        _rtgui_lcd_driver.set_pixel       = fmt_lcd_set_pixel;
        _rtgui_lcd_driver.screen_update   = fmt_lcd_update;
        _rtgui_lcd_driver.get_framebuffer = fmt_lcd_get_framebuffer;
        fmt_lcd_init();
#elif LCD_VERSION == 2
#include "ili_lcd_general.h"
        _rtgui_lcd_driver.name            = "lcd";
        _rtgui_lcd_driver.byte_per_pixel  = 2;
        _rtgui_lcd_driver.width           = 240;
        _rtgui_lcd_driver.height          = 320;
        _rtgui_lcd_driver.draw_hline      = rt_hw_lcd_draw_hline;
        _rtgui_lcd_driver.draw_raw_hline  = rt_hw_lcd_draw_raw_hline;
        _rtgui_lcd_driver.draw_vline      = rt_hw_lcd_draw_vline;
        _rtgui_lcd_driver.get_pixel       = rt_hw_lcd_get_pixel;
        _rtgui_lcd_driver.set_pixel       = rt_hw_lcd_set_pixel;
        _rtgui_lcd_driver.screen_update   = rt_hw_lcd_update;
        _rtgui_lcd_driver.get_framebuffer = rt_hw_lcd_get_framebuffer;
        lcd_Initializtion();
#elif LCD_VERSION == 3
#include "ssd1289.h"
        _rtgui_lcd_driver.name            = "lcd";
        _rtgui_lcd_driver.byte_per_pixel  = 2;
        _rtgui_lcd_driver.width           = 240;
        _rtgui_lcd_driver.height          = 320;
        _rtgui_lcd_driver.draw_hline      = ssd1289_lcd_draw_hline;
        _rtgui_lcd_driver.draw_raw_hline  = ssd1289_lcd_draw_raw_hline;
        _rtgui_lcd_driver.draw_vline      = ssd1289_lcd_draw_vline;
        _rtgui_lcd_driver.get_pixel       = ssd1289_lcd_get_pixel;
        _rtgui_lcd_driver.set_pixel       = ssd1289_lcd_set_pixel;
        _rtgui_lcd_driver.screen_update   = ssd1289_lcd_update;
        _rtgui_lcd_driver.get_framebuffer = ssd1289_lcd_get_framebuffer;
        ssd1289_init();
#endif
    }//rt_hw_lcd_init

    /* add lcd driver into graphic driver */
    rtgui_graphic_driver_add(&_rtgui_lcd_driver);

    info_init();
    player_init();

    lcd_backlight_init();
}
Esempio n. 5
0
void rt_init_thread_entry(void* parameter)
{
	/* Filesystem Initialization */
#ifdef RT_USING_DFS
	{
		/* init the device filesystem */
		dfs_init();

#if defined(RT_USING_DFS_ROMFS)
		dfs_romfs_init();
		if (dfs_mount(RT_NULL, "/", "rom", 0, &romfs_root) == 0)
		{
			rt_kprintf("ROM File System initialized!\n");
		}
		else
			rt_kprintf("ROM File System initialzation failed!\n");
#endif

#if defined(RT_USING_DFS_ELMFAT)
		/* init the elm chan FatFs filesystam*/
		elm_init();
		/* mount sd card fat partition 1 as root directory */
		if (dfs_mount("sd0", "/sd", "elm", 0, 0) == 0)
		{
			rt_kprintf("File System initialized!\n");
		}
		else
			rt_kprintf("File System initialzation failed!\n");
#endif

#if defined(RT_USING_DFS_DEVFS)
		devfs_init();
		if (dfs_mount(RT_NULL, "/dev", "devfs", 0, 0) == 0)
			rt_kprintf("Device File System initialized!\n");
		else
			rt_kprintf("Device File System initialzation failed!\n");

		#ifdef RT_USING_NEWLIB
		/* init libc */
		libc_system_init("uart");
		rt_kprintf("libc init done\n");
		#endif
#endif
	}
#endif

#ifdef RT_USING_RTGUI
	{
		rtgui_rect_t rect;

		rtgui_system_server_init();

		/* register dock panel */
		rect.x1 = 0;
		rect.y1 = 0;
		rect.x2 = 400;
		rect.y2 = 480;
		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");

		rt_hw_lcd_init();
	}
#endif
}