본문 바로가기
반응형

Embedded14

[Kernel Porting-12] H-Smart4412 minicom으로 통신하기 작업 환경 -메인 OS : Windows 8.1K(Intel Core i5-4590) -작업 OS : Ubuntu 14.04 64bit(VirtualBox) -장 비 명 : H-Smart4412 작업 개요 -TeraTerm을 이용하려다보니 virtualBox와 Windows간의 파일 이동, 권한 설정 등을 해줘야 하는 번거로움이 있어 불편하여 리눅스 내부에서 작업할 수 있도록 개선 1. minicom 설치 및 설정 VirtualBox USB연결 설정 후 dmesg | grep tty tty번호 확인(일반적으로 ttyUSB0) sudo apt-get install minicom sudo minicom -s serial port setup A -> /dev/ttyUSB F -> NO 로 변경 Save set.. 2016. 12. 26.
[Kernel Porting-11] H-Smart4412 응용 실습2 작업 환경 -메인 OS : Windows 8.1K(Intel Core i5-4590) -작업 OS : Ubuntu 14.04 64bit(VirtualBox) -장 비 명 : H-Smart4412 1.Tack Switch와 Dot Matrix 를 이용한 계산기 #include #include #include //driver location #define dot "/dev/dot" #define tact "/dev/tactsw" int Opent(void); int Opend(unsigned char c); int flag = 0; unsigned char op, result; unsigned char c2[3]={0}; int main() { int dot_d, tact_d; unsigned char c;.. 2016. 12. 26.
[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-9] H-Smart4412 Dot Matrix 작동하기 작업 환경 -메인 OS : Windows 8.1K(Intel Core i5-4590) -작업 OS : Ubuntu 14.04 64bit(VirtualBox) -장 비 명 : H-Smart4412 1. dot.c - dot matrix 점멸하기 #include #include #include #define dot "/dev/dot" int main() { int dot_d, i; unsigned char c[8] = {0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00}; if((dot_d = open(dot, O_RDWR)) < 0) { printf("Can't Open\n"); exit(0); } write(dot_d,&c,sizeof(c)); sleep(1); close(dot_d.. 2016. 12. 26.
반응형