test.c
来自「用于Linux 2.4内核的LCD及键盘驱动」· C语言 代码 · 共 23 行
C
23 行
#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 = "Welcome to check lcd driver!"; int lcd_fd; lcd_fd = open ("/dev/my_lcd", O_WRONLY | O_NDELAY); if (lcd_fd == -1) { perror ("open"); exit (-1); } write (lcd_fd, str, strlen(str)); printf ("hello linux world\n"); close (lcd_fd); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?