lcd_test.c

来自「NIOS II IDE 编程」· C语言 代码 · 共 16 行

C
16
字号
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "system.h"
#define ESC 27
#define ESC_TOP_LEFT "[1;0H" 
#define ESC_BOTTOM_LEFT "[2;0H" 
int main( void )
{
  FILE *lcd;
  lcd = fopen("/dev/lcd_16207", "w");
  fprintf(lcd, "%c%syou'll well done\nLook at me",ESC,ESC_TOP_LEFT); 
  printf("If you can see messages scrolling on the LCD Display, then it is functional!\n");
  usleep(2000000);
  fclose( lcd );
}

⌨️ 快捷键说明

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