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

📄 lcdtest.c

📁 用于Linux 2.4内核的LCD及键盘驱动
💻 C
字号:
#include<stdio.h>#include<stdlib.h>#include<unistd.h>#include<sys/types.h>#include<sys/stat.h>#include<fcntl.h>intmain (int argc, char **argv){  char str[100];  char *p;  int lcd_fd;  printf ("please enter the words(max char num:100):\n");  p = gets(str);  lcd_fd = open ("/dev/my_lcd", O_WRONLY | O_NDELAY);  if (lcd_fd == -1)    {      perror ("open");      exit (-1);    }  write (lcd_fd, p, strlen (p));  printf ("hello linux world\n");  close (lcd_fd);  return 0;}

⌨️ 快捷键说明

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