關於部落格
  • 26536

    累積人氣

  • 1

    今日人氣

    0

    追蹤人氣

lcd_state_test.c

/* A example of TCP echo server File : TCPEchoServer.cpp */ #include #include #include #include #include //#include #include #include #include //#include #include #include #include #include #include #include #include #include #include #include "creator_s3c4510_lcd.h" #include "creator_lib.h" #include "creator_lib.c" //#include "lcd-creator.h" int main() { int fd; int ret; fd = open("/dev/lcd", O_RDWR); if (fd < 0) { printf("open /dev/lcd errorn"); return (-1); } LCD_ClearScreen(fd); LCD_printf(fd, "play lcdnn"); LCD_printf(fd,"standby=1,sleep=2,print=3n"); while (1) { unsigned short ch; while(KEYPAD_get_key(fd,&ch) != OK); //OK=1 if(ch==3) { ioctl(fd, LCD_IOCTL_POWERON, NULL); //Initial_LCD(); LCD_printf(fd,"wakeuping......n"); } if(ch==1) { ret =ioctl(fd, LCD_IOCTL_SLP, NULL); //return ((ret >= 0) ? OK : UM); } if(ch==2) { ret=ioctl(fd, LCD_IOCTL_STB, NULL); //return ((ret >= 0) ? OK : UM); } } return(0); }
相簿設定
標籤設定
相簿狀態