#include "hal_drive.h" //touch int touch_pass=0,touch_x,touch_y; int Key_Space_flag=0; unsigned long run_tick=0; touch_device t0; _lcd_dev lcddev={320,240}; //管理LCD重要参数 int LCD_FPS_d=0; int LCD_busy=0; int LCD_updata_flag=0; int LCD_cursor_X=0,LCD_cursor_Y=0; int LCD_buffer[240][320]= { 0 }; void onems_loop() { run_tick+=1; lv_tick_inc(1); } void thred_loop() { lv_task_handler(); } unsigned long HAL_GetTick() { return run_tick; } void LCD_updata() { LCD_updata_flag=1; } void LCD_SetCursor(int Xpos,int Ypos) //设置光标位置 { LCD_cursor_X=Xpos; LCD_cursor_Y=Ypos; } void LCD_SetColor(int color) { if(LCD_cursor_X>=lcddev.width) { LCD_cursor_X=0; LCD_cursor_Y++; } if(LCD_cursor_Y>=lcddev.height) { LCD_cursor_Y=0; } LCD_buffer[LCD_cursor_Y][LCD_cursor_X]=color; LCD_cursor_X++; } void LCD_full(int color) { LCD_SetCursor(0,0); for(int a=0;a<320*240;a++) { LCD_SetColor(color); } } void LCD_set_dot(int x,int y,int color) { LCD_SetCursor(x,y); LCD_SetColor(color); }