⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testlcd.c

📁 该程序是在linux arm下实现的基于framebuffer的LCD驱动
💻 C
字号:
/*   testlcd.c : Test LCD & TouchScreen Devices driver for Linux          Copyright (C) 2002 Lao Tie & Olival  Ran   A lot of inspiration came from Jun Qiu...   ellipse extensions by:  	FengHua Zhu    This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2, or (at your option)   any later version.      You should have received a copy of the GNU General Public License   (for example /usr/src/linux/COPYING); if not, write to the Free   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */#include <unistd.h>#include <stdlib.h>#include <stdio.h>#include <fcntl.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <sys/mman.h>#include <string.h>#include <linux/fb.h>#include <linux/kd.h>#include <sys/mman.h>#include <sys/types.h>#include <sys/stat.h>#include <termios.h>#include <sys/time.h>#include <sys/ioctl.h>#include "lcd.h"int  main(){    int i , j ;    fb_init();        //    lcd_vline(30,0,100,0,0);	//    for(i=0;i<50;i++)//        lcd_putpixel(i,i,0,0);//    lcd_fillrect(0, 0, 159, 9, 0);//    lcd_hline(0, 10, 120, 0, 0);//    lcd_putpixel(0, 100, 1, 0);	for(i = 0; i < 120; i++)	{		lcd_ellipse(160,120,i+1,i+1,i*2,0);    	lcd_textout(126, 16,"普天慧讯",255-i*2);		sleep(1);	}//    lcd_textout(0, 32,"嵌入式ARM系统");//    show_palette();    fb_release();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -