본문 바로가기

Embedded/Kernel Porting

[Kernel Porting] Dot matrix 점멸하기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dot.c#include#include#include #define dot "/dev/dot" int main(){int dot_d;unsigned char c[8] = {0x80 , 0x80 , 0x00 , 0x00, 0x00 , 0x00 , 0x00 , 0x00}; dot_d = open(dot , O_RDWR);if(dot_d 시리얼 포트 -> 속도를 115200으로 설정- Hybus-Smart4412 장비 부팅- 메뉴 -> 전송 -> ZMODEM -> 보내기 에서 실행파일 선택- chmod 7.. 더보기
[Kernel Porting] 0~9 , A~Z 디폴트값 확인하기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 ieb_dot.c/* ~/Smart4412/Development/Source/Kernel/kernel_4412/drivers/Exynos4412TKU_IEB/ieb_dot.c에 디폴트로 정의 되어있음*/ {0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C}, //0{0x08, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x1C}, //1{0x1C, 0x22, 0x02, 0x02, 0x1C, 0x20, 0x20, 0x3E}, //2{0x1C, 0x.. 더보기
[Kernel Porting] Dip스위치를 이용한 LED 점멸 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 led_dipsw.c#include #include #include #define dip "/dev/dipsw"#define led "/dev/led" int main(){int dip_d, dev;unsigned char c, data;dip_d = open(dip, O_RDWR);dev = open(led, O_RDWR);if(dev 시리얼 포트 -> 속도를 115200으로 설정- Hybus-Smart4412 장비 부팅- 메뉴 -> 전송 -> ZMODEM -> 보내기 에서 실행파일 선택- chmo.. 더보기
[Kernel Porting] Dip스위치 Test 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 dipsw.c#include#include#include #define dip "/dev/dipsw" int main(){int dip_d;unsigned char c;dip_d = open(dip, O_RDWR);while(1){read(dip_d , &c , sizeof(c));if(c) break;} printf("%d\n",c);return 0;} 1. 초기설정 sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib gcc-4.4-multilib lib.. 더보기
[Kernel Porting] Tact스위치와 캐릭터LCD를 이용한 사칙연산 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 clcd_tactsw.c#include#include#include#include#include#include#include#include #define tact_d "/dev/tactsw"#define clcd "/dev/clcd" void calc(int *num , char op , int *i);void PrintFnd(int rst , int k , unsigned char *fnd_data); int main(){int tact , fnd , sum=0 , i=0;char op;int nu.. 더보기
[Kernel Porting] 캐릭터LCD에 문자찍기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 clcd1.c#include#include#include#include #define clcd "/dev/clcd"#define MAX_LEN 20 int main(){int clcd_d , str_len;char str[MAX_LEN];clcd_d = open(clcd , O_RDWR);if(clcd_d 시리얼 포트 -> 속도를 115200으로 설정- Hybus-Smart4412 장비 부팅- 메뉴 -> 전송 -> ZMODEM -> 보내기 에서 실행파일 선택- chmod 777 [실행파일명] (실행파.. 더보기
[Kernel Porting] 캐릭터LCD에 Hello World 표현하기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 clcd.c#include#include#include#include #define clcd "/dev/clcd" int main(){int clcd_d;clcd_d = open(clcd , O_RDWR);if(clcd_d 시리얼 포트 -> 속도를 115200으로 설정- Hybus-Smart4412 장비 부팅- 메뉴 -> 전송 -> ZMODEM -> 보내기 에서 실행파일 선택- chmod 777 [실행파일명] (실행파일 권한 설정)- ./[실행파일명] (실행 후 테스트)(★중요 : 만약 소스파일을 수.. 더보기
[Kernel Porting] Tactsw와 FND를 이용한 사칙연산 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 fnd_tactsw.c#include#include#include#include#include#include#include#include #define tact_d "/dev/tactsw"#define fnd_d "/dev/fnd" void calc(int *num , char op , int *i);void PrintFnd(int rst , int k , unsigned char *fnd_data); int main(){int tact , fnd , sum=0 , i=0;char op;int num.. 더보기
[Kernel Porting] FND에 소수점 표현하기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 fnd1.c#include #include #include #include #define fnd "/dev/fnd"unsigned char fnd_data[4];void PrintFnd(char c,int i);int main(){char data[6]; int num, i, flag=1;int fnd_d;// 1 2 3 4 5 6 7 8 9 0 .// 0xF9, 0xA4, 0xB0, 0x99, ~0x6D, ~0x7D, ~0x07, ~0x7F, 0x10, 0xC0, 0x80 fnd_d=open(fnd.. 더보기
[Kernel Proting] FND 점멸하기 작업 환경-메인 OS : Windows 8.1K(Intel Core i5-4590)-작업 OS : Ubuntu 14.04.5 LTS 64bit(VirtualBox)-장 비 명 : Hybus-Smart4412 fnd.c#include#include#include#include #define fnd "/dev/fnd" int main(){int fnd_d;unsigned char fnd_data[4]; fnd_d = open(fnd , O_RDWR); //해당 드라이버 열기//0값을 넣어본다.fnd_data[0]=~0x06;fnd_data[1]=~0x4B;fnd_data[2]=~0x4F;fnd_data[3]=~0x66;write(fnd_d , fnd_data , sizeof(fnd_data));sleep(1.. 더보기