본문 바로가기

[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 [실행파일명] (실행파.. 더보기