본문 바로가기

Embedded/Kernel Porting

[Kernel Porting] 커널포팅 최종실습-2 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 exam.c#include #include #include #include #include #include #include #include #define tact "/dev/tactsw"#define dot "/dev/dot" void menu();void Inside();void Outside();void UptoDown();void DowntoUp();void Center();int main(){int tact_d, i = 0;unsigned char c; tact_d = open(tact, O_.. 더보기
[Kernel Porting] 커널포팅 최종실습-1 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 문제1. 안쪽에서부터 점점 불이 켜지도록 만든다.2. 바깥쪽에서부터 점점 불이 켜지도록 만든다.3. 형광판 처럼 숫자 0~9 까지 돌아가도록 만든다.4. 두자리 이상 숫자를 형관판처럼 돌아가도록 만든다.(키보드로 숫자를 입력받는다)5. HELLO WORLD~! 를 형관판 처럼 만든다. spin.c#include#include#include#include#include#include#include#include //디바이스 드라이버가 들어있는 경로 위치를 적어논것 #define tact "/dev/ta.. 더보기
[Kernel Porting] Dot matrix를 이용한 전광판 만들기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 stream.c#include #include #include #include #include #include #include #include #define tact_d "/dev/tactsw"#define dot "/dev/dot" void menu();void streaming(); int main(){int tact, i = 0;unsigned char c; tact = open(tact_d, O_RDWR);if(tact0; k--){for(j=0; j>k;write(dot_d, &tmp[0],.. 더보기
[Kernel Porting] Dip스위치와 Dot matrix를 이용하여 다양하게 점멸해보기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot7.c/*딥스위치 3번째와 6번째는 고장나 사용하지 않았음*/ #include#include#include#include#include#include#include#include //디바이스 드라이버가 들어있는 경로 위치를 적어논것#define dip "/dev/dipsw"#define dot "/dev/dot" void LedUp();void LedDown();void LedAll();void LedInside();void LedOutside();int main(){int dip_d , i ,.. 더보기
[Kernel Porting] Dot matrix 표정다른 스마일 2초반복 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot6.c#include #include #include #define dot "/dev/dot" int main(){int dot_d,i;unsigned char zero[2][8]={{0x00, 0x42, 0xA5, 0xA5, 0x00, 0x42, 0x3C, 0x00},{0x00, 0x00, 0xE7, 0x00, 0x00, 0x3C, 0x42, 0x00}};dot_d = open(dot, O_RDWR);if(dot_d 속도를 115200으로 설정- Hybus-Smart4412 장비 부팅- 메뉴 .. 더보기
[Kernel Porting] Dot matrix 슬픈 스마일 그려보기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot5.c#include#include#include #define dot "/dev/dot" int main(){int dot_d , i;unsigned char smile[8] = {0x7E , 0x81 , 0xDB , 0xA5 , 0x81 , 0x99 , 0xA5 , 0x7E};dot_d = open(dot , O_RDWR);if(dot_d 시리얼 포트 -> 속도를 115200으로 설정- Hybus-Smart4412 장비 부팅- 메뉴 -> 전송 -> ZMODEM -> 보내기 에서 실행파일 선택.. 더보기
[Kernel Porting] Dot matrix 스마일 그려보기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot4.c#include#include#include #define dot "/dev/dot" int main(){int dot_d , i;unsigned char smile[8] = {0x7E , 0x81 , 0xA5 , 0xDB , 0x81 , 0xA5 , 0x99 , 0x7E};dot_d = open(dot , O_RDWR);if(dot_d 시리얼 포트 -> 속도를 115200으로 설정- Hybus-Smart4412 장비 부팅- 메뉴 -> 전송 -> ZMODEM -> 보내기 에서 실행파일 선택.. 더보기
[Kernel Porting] Dot matrix와 tactsw를 이용한 사칙연산 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot3.c#include#include#include#include#include#include#include#include #define tact_d "/dev/tactsw"#define dot "/dev/dot" void showcalc(int *num, char op, int *i);void result(int res); int main(){int tact, i=0;unsigned char c;int num[2];char op;tact=open(tact_d, O_RDWR); if(tact 시리.. 더보기
[Kernel Porting] Dot matrix A~Z 찍어보기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot2.c#include #include #include #define dot "/dev/dot" int main(){int dot_d,i;unsigned char alpha[26][8]={{0x3C, 0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x00}, //A{0x7C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00}, //B{0x3C, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x00}, //C{0x78, 0x6C, 0x6.. 더보기
[Kernel Porting] Dot matrix 1~9 찍어보기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot1.c#include#include#include #define dot "/dev/dot" int main(){int dot_d , i;unsigned char num[10][8] ={{0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00}, //zero{0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x7E, 0x00}, //one{0x3C, 0x66, 0x06, 0x1C, 0x30, 0x60, 0x7E, 0x00}, //two{0x3C, 0x6.. 더보기