Esempio n. 1
0
void screen_init(void)
{
    LCD_Init(LCD_BUFFER_ADDR, NULL);

    LCD_Cursor_Dis(0);
    LCD_Copy_Cursor ((unsigned int *)Cursor, 0, sizeof(Cursor)/sizeof(uint32_t));
    LCD_Cursor_Cfg(CRSR_FRAME_SYNC | CRSR_PIX_32);
    LCD_Cursor_En(0);
//    LCD_Move_Cursor(0, 0);
    LCD_Ctrl(1);

    screen = (unsigned short *) LCD_BUFFER_ADDR;
    screen_width = 320;
    screen_height = 240;

    font = &font_koi5x8;

    max_text_width = screen_width / font->width;
    max_text_height = screen_height / font->height;

    fg_color = 0x7fff;
    bg_color = 0;

    screen_clear();
}
void Init_LCD_Cursor(void)
{
	 cursor_config.baseaddress = LCD_CURSOR_BASE_ADDR;
	  cursor_config.framesync = 1;
	#if (CURSOR_SIZE == 64)
	  cursor_config.size32 = 0;
	#else
	  cursor_config.size32 = 1;
	#endif
	  cursor_config.palette[0].Red = 0x00;
	  cursor_config.palette[0].Green = 0x00;
	  cursor_config.palette[0].Blue = 0x00;
	  cursor_config.palette[1].Red = 0xFF;
	  cursor_config.palette[1].Green = 0xFF;
	  cursor_config.palette[1].Blue = 0xFF;
	  LCD_Cursor_Cfg(&cursor_config);
	  LCD_Cursor_SetImage((uint32_t *)Cursor, 0, sizeof(Cursor)/sizeof(uint32_t)) ;
}