반응형 lcd2 [Kernel Porting-10] H-Smart4412 응용 실습1 작업 환경 -메인 OS : Windows 8.1K(Intel Core i5-4590) -작업 OS : Ubuntu 14.04 64bit(VirtualBox) -장 비 명 : H-Smart4412 1.Tack Switch로 LED 작동시키기 #include #include #include #include #include #include #include #include #define tact_d "/dev/tactsw" #define led_d "/dev/led" void led_right(int led); void led_left(int led); void led_on(int led); void led_twist(int led); void led_inside(int led); void led_off(int.. 2016. 12. 26. [Kernel Porting-8] H-Smart4412 LCD 작동하기 작업 환경 -메인 OS : Windows 8.1K(Intel Core i5-4590) -작업 OS : Ubuntu 14.04 64bit(VirtualBox) -장 비 명 : H-Smart4412 1. lcd.c - scanf로 입력 받아 lcd에 띄우기 #include #include #include #include #define clcd "/dev/clcd" int main() { int clcd_d; char buf[10]; if((clcd_d = open(clcd,O_RDWR)) < 0) { perror("open"); exit(1); } scanf("%s",buf); write(clcd_d,&buf,strlen(buf)); close(clcd_d); return 0; } 2016. 12. 26. 이전 1 다음 반응형