PowerPoint 프레젠테이션

Size: px
Start display at page:

Download "PowerPoint 프레젠테이션"

Transcription

1 7-Segment Device Control - Device driver Jo, Heeseung

2 HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2

3 6-Digit 7-Segment LED controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment Select Register) SEG_Data_Reg(Segment Data Register) 레지스터들은 Read와 Write 모두가능하도록설계 SEG_Sel_Reg 0~5bit 에 0 또는 1 을써넣음으로써 display 될 digit 를선택 SEG_Data_Reg 0~7bit 에 0 또는 1 을써넣음으로써 display 될 segment 들을선택 3

4 Segment Select Register 와 Segment Data Register 각비트에대응되는 6Digit 7-Segment 의핀배치도 SEL3 SEL4 SEL2 SEL1 SEL5 SEL6 SEG_F SEG_G SEG_E SEG_D SEG_A SEG_B SEG_C SEG_H 4

5 SEG_Sel_Reg 비트구조 Physical Address 0x0500_0030 SEG_Sel_Reg BIT Reserved SEL 6 SEL 5 SEL 4 SEL 3 SEL 2 SEL 1 Reset X X X X X X X X X X Bits Name Description 0 SEL1 Digit 1 Select Bit0 (Active Low) 1 SEL2 Digit 1 Select Bit1 (Active Low) 2 SEL3 Digit 1 Select Bit2 (Active Low) 3 SEL4 Digit 1 Select Bit3 (Active Low) 4 SEL5 Digit 1 Select Bit4 (Active Low) 5 SEL6 Digit 1 Select Bit5 (Active Low) 5

6 SEL1 ~ SEL6 6-Digit 7-Segment LED 중 display될 digit를선택하는 bit 1을입력할경우선택해제 0을입력할경우선택 6

7 SEG_Data_Reg 비트구조 Physical Address 0x0500_0032 SEG_Data_Reg BIT Reserved SEG_ A SEG_ B SEG_ C SEG_ D SEG_ E SEG_ F SEG_ G SEG_ H Reset X X X X X X X X Bits Name Description 0 SEG_A Segment Display Bit0 (Active High) 1 SEG_B Segment Display Bit1 (Active High) 2 SEG_C Segment Display Bit2 (Active High) 3 SEG_D Segment Display Bit3 (Active High) 4 SEG_E Segment Display Bit4 (Active High) 5 SEG_F Segment Display Bit5 (Active High) 6 SEG_G Segment Display Bit6 (Active High) 7 SEG_H Segment Display Bit7 (Active High) 7

8 SEG_A ~ SEG_G 6 Digit 7-Segment 중 display 될 digit 의 segment 들을선택하는 bit 0 을입력할경우선택해제 1 을입력할경우선택 8

9 6 개의 7-Segment Array 에 "123456" 의숫자를표시하기위한과정과각신호라인의펄스타이밍도 지속해서신호를주어야불이켜진것처럼보임

10 Device driver 소스파일 7-Segment 리눅스디바이스드라이버는커널에포함 menuconfig 실행 - Device Drivers -> [*] Misc devices -> [*] Hanback Electronics M3(FPGA) Device Support -> <*>7 Segment linux s4210/drivers/misc/hanback/segment.c 참조 12

11 EL3 linux s4210/drivers/misc/hanback/segment.c SEL4 EL2 EL1 unsigned short Getsegmentcode (short x) { unsigned short code; switch (x) { case 0x0 : code = 0xfc; break; case 0x1 : code = 0x60; break; case 0x2 : code = 0xda; break; case 0x3 : code = 0xf2; break; case 0x4 : code = 0x66; break; case 0x5 : code = 0xb6; break; case 0x6 : code = 0xbe; break; case 0x7 : code = 0xe4; break; case 0x8 : code = 0xfe; break; case 0x9 : code = 0xf6; break; SEL5 SEL6 SEG_F SEG_G SEG_E SEG_D SEG_A SEG_B SEG_C SEG_H case 0xa : code = 0xfa; break; case 0xb : code = 0x3e; break; case 0xc : code = 0x1a; break; case 0xd : code = 0x7a; break; case 0xe : code = 0x9e; break; case 0xf : code = 0x8e; break; default : code = 0; break; return code; 13

12 ssize_t segment_write(struct file *inode, const char *gdata, size_t length, loff_t *off_what) { unsigned char data[6]; unsigned char digit[6]={0x20, 0x10, 0x08, 0x04, 0x02, 0x01; unsigned int i,num,ret; unsigned int count=0,temp1,temp2; ret=copy_from_user(&num,gdata,4); count = num; if(num!=0) { data[5]=getsegmentcode(count/100000); temp1=count%100000; data[4]=getsegmentcode(temp1/10000); temp2=temp1%10000; data[3]=getsegmentcode(temp2/1000); temp1=temp2%1000; data[2]=getsegmentcode(temp1/100); temp2=temp1%100; data[1]=getsegmentcode(temp2/10); data[0]=getsegmentcode(temp2%10); 14

13 switch (mode_select) { case MODE_0_TIMER_FORM: break; case MODE_1_CLOCK_FORM: // dot print data[4] += 1; data[2] += 1; break; // print for(i=0;i<6;i++) { *segment_grid = digit[i]; *segment_data = data[i]; mdelay(1); *segment_grid = ~digit[0]; *segment_data = 0; return length; 15

14 seg_test.c 프로그램작성 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <time.h> int main (int argc, char *argv[]) { int fd, value = 1, i, count, clock, ch; unsigned short input, dir = 0; if (argc <= 1) { printf ("please input the parameter! ex) %s \n", argv[0]); return -1; 16

15 if ((fd = open ("/dev/segment", O_RDWR O_SYNC)) < 0) { printf ("FND open fail\n"); exit (1); count = atoi(argv[1]); for (i = 0; i < 400; i++) { write (fd, &count, 4); usleep (1000); close (fd); return 0; 17

16 Makefile 작성 CC = arm-linux-gcc CFLAGS = -DNO_DEBUG EXEC = seg_test OBJS = $(EXEC).o all: $(EXEC) $(EXEC): $(OBJS) $(CC) -o $@ $^ clean: rm -f $(OBJS) $(EXEC) 18

17 컴파일 make clean 하면먼저컴파일된실행예제파일삭제 make 명령어로컴파일실행 ls Makefile seg_test.c make clean; make 다음과같은메시지가출력된다 rm -f seg_test.o seg_test arm-linux-gcc -c -DNO_DEBUG -o seg_test.o seg_test.c arm-linux-gcc -o seg_test seg_test.o ls Makefile seg_test seg_test.c seg_test.o 테스트 board 에서실행 19

18 7-Segment Device Control - mmap() Jo, Heeseung

19 7-Segment 제어 7-Segment 원하는자리에원하는부분 ( 세그먼트 ) 를켜서데이터를출력 해당데이터에따라 7-Segment에숫자나영문자를표시 그리드선택번지 : 0x 세그먼트선택번지 : 0x 그리드선택번지의데이터형식 0x01 SEG1을선택 0x02 SEG2를선택 0x04 SEG3을선택 0x08 SEG4를선택 0x10 SEG5를선택 0x20 SEG6을선택 23

20 7-Segment 제어 EL3 EL2 EL1 다음으로세그먼트데이터형식 숫자 0 : 0xfc 숫자 1 : 0x60 숫자 2 : 0xda 숫자 3 : 0xf2 숫자 4 : 0x66 숫자 5 : 0xb6 숫자 6 : 0xbe 숫자 7 : 0xe4 숫자 8 : 0xfe 숫자 9 : 0xf6 영문 a : 0xfa 영문 b : 0x3e 영문 c : 0x1a 영문 d : 0x7a 영문 e : 0x9e 영문 f : 0x8e SEL4 SEL5 SEL6 SEG_F SEG_G SEG_E SEG_D SEG_A SEG_B SEG_C SEG_H 24

21 7-Segment 제어 segment.c 작성 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <sys/mman.h> #include <fcntl.h> unsigned short Getsegcode(short x); #define FPGA_BASEADDRESS #define SEG_GRID_OFFSET #define SEG_DATA_OFFSET 0x x30 0x32 int main() { int fd; volatile int i,j; unsigned int count=1,num,temp1,temp2; unsigned short data[6]; unsigned short digit[6]={0x20, 0x10, 0x08, 0x04, 0x02, 0x01; unsigned short *addr_fpga; unsigned short *addr_grid, *addr_data; 25

22 7-Segment 제어 if((fd=open("/dev/mem",o_rdwr O_SYNC)) < 0) { printf("mem open fail\n"); exit(1); addr_fpga= (unsigned short *)mmap(null, 4096, PROT_READ PROT_WRITE, MAP_SHARED, fd, FPGA_BASEADDRESS); if(*addr_fpga == (unsigned short)-1) { close(fd); printf("mmap error\n"); exit(1); addr_grid=addr_fpga+seg_grid_offset; addr_data=addr_fpga+seg_data_offset; printf("- 7 Segment\n"); 26

23 7-Segment 제어 while(count!=0) { num=0; printf("input count value: [ ] (0 : exit program) \n"); scanf("%d", &count); while(num<=count ) { data[5]=getsegcode(num/100000); temp1=num%100000; data[4]=getsegcode(temp1/10000); temp2=temp1%10000; data[3]=getsegcode(temp2/1000); temp1=temp2%1000; data[2]=getsegcode(temp1/100); temp2=temp1%100; data[1]=getsegcode(temp2/10); data[0]=getsegcode(temp2%10); for(j=0;j<20;j++) { for(i=0;i<6;i++) { *addr_grid = digit[i]; *addr_data = data[i]; usleep(1000); num++; *addr_grid = ~digit[0]; *addr_data = 0; 28

24 7-Segment 제어 munmap(addr_fpga,4096); close(fd); return 0; unsigned short Getsegcode(short x) { unsigned short code; switch (x) { case 0x0 : code = 0xfc; break; case 0x1 : code = 0x60; break; case 0x2 : code = 0xda; break; case 0x3 : code = 0xf2; break; case 0x4 : code = 0x66; break; case 0x5 : code = 0xb6; break; case 0x6 : code = 0xbe; break; case 0x7 : code = 0xe4; break; case 0x8 : code = 0xfe; break; case 0x9 : code = 0xf6; break; case 0xa : code = 0xfa; break; case 0xb : code = 0x3e; break; case 0xc : code = 0x1a; break; case 0xd : code = 0x7a; break; case 0xe : code = 0x9e; break; case 0xf : code = 0x8e; break; default : code = 0; break; return code; 29

25 7-Segment 제어 Makefile 작성 CC = arm-linux-gcc CFLAGS = -DNO_DEBUG EXEC = segment OBJS = $(EXEC).o all: $(EXEC) $(EXEC): $(OBJS) $(CC) -o $@ $^ clean: rm -f $(OBJS) $(EXEC) 30

26 7-Segment 제어 컴파일 make clean 하면먼저컴파일된실행예제파일삭제 make 명령어로컴파일실행 make arm-linux-gcc -c -DNO_DEBUG -o segment.o segment.c arm-linux-gcc -o segment segment.o ls Makefile segment segment.c segment.o 테스트 board 에서실행 31

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED Controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-SEGMENT DEVICE CONTROL - DEVICE DRIVER Jo, Heeseung 디바이스드라이버구현 : 7-SEGMENT HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 디바이스드라이버구현 : 7-SEGMENT 6-Digit 7-Segment LED

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Text-LCD Device Control - Device driver Jo, Heeseung M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App 을개발 TextLCD 는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210 의 TextLCD 는 16 문자 *2 라인을 Display 할수있으며, 이 TextLCD 를제어하기위하여

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

Microsoft PowerPoint - lab14.pptx

Microsoft PowerPoint - lab14.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. Keypad Device Control in Embedded Linux HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착되어있다. 2 Keypad Device Driver

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Sensor Device Jo, Heeseung Sensor 실습 HBE-SM5-S4210 에는근접 / 가속도 / 컴파스센서가장착 각센서들을사용하기위한디바이스드라이버와어플리케이션을작성 2 근접 (Proximity) 센서 HBE-SM5-S4210 Camera Module 근접센서디바이스 근접센서는사물이다른사물에접촉되기이전에가까이접근하였는지를검출할목적으로사용 일반적으로생활에서자동문이나엘리베이터,

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

Microsoft PowerPoint - lab15.pptx

Microsoft PowerPoint - lab15.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. TextLCD Device Control in Embedded Linux M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App을개발 TextLCD는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210의

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 LED Device Control - mmap() Jo, Heeseung 디바이스제어 디바이스제어 HBE-SM5-S4210 에장착된 Peripheral 들은다양한인터페이스로연결되어있음 베이스보드에있는 LED 와 7-Segment 는 GPIO 로직접 CPU 에연결 M3 모듈인 FPGA 모듈은 FPGA 에의해서제어되며 CPU 와호스트버스로연결되어있어서프로그램에서는메모리인터페이스로인식

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Network Programming Jo, Heeseung Network 실습 네트워크프로그래밍 멀리떨어져있는호스트들이서로데이터를주고받을수있도록프로그램을구현하는것 파일과는달리데이터를주고받을대상이멀리떨어져있기때문에소프트웨어차원에서호스트들간에연결을해주는장치가필요 이러한기능을해주는장치로소켓이라는인터페이스를많이사용 소켓프로그래밍이란용어와네트워크프로그래밍이랑용어가같은의미로사용

More information

Microsoft PowerPoint - lab16.pptx

Microsoft PowerPoint - lab16.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. GoAhead Porting Goahead 웹서버를포팅하기위하여 CD 안의소스를사용 경로 : [CD3]\source\webserver\webs218.tar.gz GoAhead 소스복사및압축해제 ~/working 디렉터리에배포

More information

KEY 디바이스 드라이버

KEY 디바이스 드라이버 KEY 디바이스드라이버 임베디드시스템소프트웨어 I (http://et.smu.ac.kr et.smu.ac.kr) 차례 GPIO 및 Control Registers KEY 하드웨어구성 KEY Driver 프로그램 key-driver.c 시험응용프로그램 key-app.c KEY 디바이스드라이버 11-2 GPIO(General-Purpose Purpose I/O)

More information

Microsoft PowerPoint - IOControl [호환 모드]

Microsoft PowerPoint - IOControl [호환 모드] 목차 Input/Output Control I/O Control Mechanism mmap function munmap function RAM Area Access LED Control 4 digits 7 Segment Control Text LCD Control 1 2 I/O Control Mechanism (1) I/O Control Mechanism (2)

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 펌웨어작성을위한 C 언어 I http://www.smartdisplay.co.kr 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5. SD-52 보드구성과코드메모리프로그래밍방법 Chap6. 어드레스디코딩 ( 매핑 ) 과어셈블리어코딩방법

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

교육지원 IT시스템 선진화

교육지원 IT시스템 선진화 Module 16: ioctl 을활용한 LED 제어디바이스드라이버 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 ioctl() 을활용법배우기 커널타이머와 ioctl 을활용하여 LED 제어용디바이스드라이브작성하기 2 IOCTL 을이용한드라이버제어 ioctl() 함수활용 어떤경우에는읽는용도로만쓰고,

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

ECE30076 Embedded System Programming - LED Device Driver

ECE30076 Embedded System Programming - LED Device Driver Module 12: LED 제어디바이스드라이버 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 하드웨어제어를위한디바이스드라이버작성방법알아보기 LED 제어용디바이스드라이버작성하기 ioremap 을이용한 LED 제어디바이스드라이버 mmap 을이용한 LED 제어디바이스드라이버 2 디바이스구분

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

vi 사용법

vi 사용법 네트워크프로그래밍 6 장과제샘플코드 - 1:1 채팅 (udp 버전 ) 과제 서버에서먼저 bind 하고그포트를다른사람에게알려줄것 클라이언트에서알려준포트로접속 서로간에키보드입력을받아상대방에게메시지전송 2 Makefile 1 SRC_DIR =../../common 2 COM_OBJS = $(SRC_DIR)/addressUtility.o $(SRC_DIR)/dieWithMessage.o

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - chap13-입출력라이브러리.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 스트림의 기본 개념을 알아보고,

More information

본 강의에 들어가기 전

본 강의에 들어가기 전 C 기초특강 종합과제 과제내용 구조체를이용하여교과목이름과코드를파일로부터입력받아관리 구조체를이용하여학생들의이름, 학번과이수한교과목의코드와점수를파일로부터입력 학생개인별총점, 평균계산 교과목별이수학생수, 총점및평균을계산 결과를파일에저장하는프로그램을작성 2 Makefile OBJS = score_main.o score_input.o score_calc.o score_print.o

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 4 장파일 컴퓨터과학과박환수 1 2 4.1 시스템호출 컴퓨터시스템구조 유닉스커널 (kernel) 하드웨어를운영관리하여다음과같은서비스를제공 파일관리 (File management) 프로세스관리 (Process management) 메모리관리 (Memory management) 통신관리 (Communication management) 주변장치관리 (Device

More information

[8051] 강의자료.PDF

[8051] 강의자료.PDF CY AC F0 RS1 RS0 OV - P 0xFF 0x80 0x7F 0x30 0x2F 0x20 0x1F 0x18 0x17 0x10 0x0F 0x08 0x07 0x00 0x0000 0x0FFF 0x1000 0xFFFF 0x0000 0xFFFF RAM SFR SMOD - - - GF1 GF0 PD IDL 31 19 18 9 12 13 14 15 1 2 3 4

More information

Microsoft PowerPoint - es-arduino-lecture-03

Microsoft PowerPoint - es-arduino-lecture-03 임베디드시스템개론 : Arduino 활용 Lecture #3: Button Input & FND Control 2012. 3. 25 by 김영주 강의목차 디지털입력 Button switch 입력 Button Debounce 7-Segment FND : 직접제어 7-Segment FND : IC 제어 2 디지털입력 : Switch 입력 (1) 실습목표 아두이노디지털입력처리실습

More information

Sena Technologies, Inc. HelloDevice Super 1.1.0

Sena Technologies, Inc. HelloDevice Super 1.1.0 HelloDevice Super 110 Copyright 1998-2005, All rights reserved HelloDevice 210 ()137-130 Tel: (02) 573-5422 Fax: (02) 573-7710 E-Mail: support@senacom Website: http://wwwsenacom Revision history Revision

More information

untitled

untitled if( ) ; if( sales > 2000 ) bonus = 200; if( score >= 60 ) printf(".\n"); if( height >= 130 && age >= 10 ) printf(".\n"); if ( temperature < 0 ) printf(".\n"); // printf(" %.\n \n", temperature); // if(

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729> 8주차중간고사 ( 인터럽트및 A/D 변환기문제및풀이 ) Next-Generation Networks Lab. 외부입력인터럽트예제 문제 1 포트 A 의 7-segment 에초시계를구현한다. Tact 스위치 SW3 을 CPU 보드의 PE4 에연결한다. 그리고, SW3 을누르면하강 에지에서초시계가 00 으로초기화된다. 동시에 Tact 스위치 SW4 를 CPU 보드의

More information

IoT FND8 7-SEGMENT api

IoT FND8 7-SEGMENT api IoT FND8 7-SEGMENT api http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys CRZ Technology 1 Document History

More information

2009년 상반기 사업계획

2009년 상반기 사업계획 메모리매핑 IT CookBook, 유닉스시스템프로그래밍 학습목표 통신프로그램이무엇인지이해한다. 메모리매핑을이용한 IPC 기법을이해한다. 메모리매핑함수를사용해프로그램을작성할수있다. 2/20 목차 메모리매핑의개념 메모리매핑함수 메모리매핑해제함수 메모리매핑의보호모드변경 파일의크기확장 매핑된메모리동기화 데이터교환하기 3/20 메모리매핑의개념 메모리매핑 파일을프로세스의메모리에매핑

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 DEVELOPMENT ENVIRONMENT 2 MAKE Jo, Heeseung MAKE Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one 2

More information

제12장 파일 입출력

제12장 파일 입출력 제 4 장파일입출력 리눅스시스템프로그래밍 청주대학교전자공학과 한철수 1 시스템호출 (system call) 파일 (file) 임의접근 (random access) 주요학습내용 2 4.1 절 커널의역할 (kernel) 커널 (kernel) 은운영체제의핵심부분으로서, 하드웨어를운영관리하는여러가지서비스를제공함 파일관리 (File management) 디스크 프로세스관리

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Development Environment 2 Jo, Heeseung make make Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one It

More information

Microsoft Word doc

Microsoft Word doc 2. 디바이스드라이버 [ DIO ] 2.1. 개요 타겟보드의데이터버스를이용하여 LED 및스위치동작을제어하는방법을설명하겠다. 2.2. 회로도 2.3. 준비조건 ARM 용크로스컴파일러가설치되어있어야한다. 하드웨어적인점검을하여정상적인동작을한다고가정한다. NFS(Network File System) 를사용할경우에는 NFS가마운트되어있어야한다. 여기서는소스전문을포함하지않았다.

More information

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Example 3.1 Files 3.2 Source code 3.3 Exploit flow

More information

ActFax 4.31 Local Privilege Escalation Exploit

ActFax 4.31 Local Privilege Escalation Exploit NSHC 2012. 12. 19. 취약점 분석 보고서 Information Service about a new vulnerability [ ] 목 차 1. 개 요... 2 2. 공 격... 5 3. 분 석... 9 4. 결 론... 12 5. 대응방안... 12 6. 참고자료... 13 Copyright 2012 Red Alert. All Rights Reserved.

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 12 장파이프 2 12.1 파이프 파이프원리 $ who sort 파이프 3 물을보내는수도파이프와비슷 한프로세스는쓰기용파일디스크립터를이용하여파이프에데이터를보내고 ( 쓰고 ) 다른프로세스는읽기용파일디스크립터를이용하여그파이프에서데이터를받는다 ( 읽는다 ). 한방향 (one way) 통신 파이프생성 파이프는두개의파일디스크립터를갖는다. 하나는쓰기용이고다른하나는읽기용이다.

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

<4D F736F F F696E74202D FB8DEB8F0B8AE20B8C5C7CE205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D FB8DEB8F0B8AE20B8C5C7CE205BC8A3C8AF20B8F0B5E55D> 학습목표 통신프로그램이무엇인지이해한다. 을이용한 IPC 기법을이해한다. 함수를사용해프로그램을작성할수있다. IT CookBook, 유닉스시스템프로그래밍 2/20 목차 의개념 함수 해제함수 의보호모드변경 파일의크기확장 매핑된메모리동기화 데이터교환하기 의개념 파일을프로세스의메모리에매핑 프로세스에전달할데이터를저장한파일을직접프로세스의가상주소공간으로매핑 read, write

More information

MPLAB C18 C

MPLAB C18 C MPLAB C18 C MPLAB C18 MPLAB C18 C MPLAB C18 C #define START, c:\mcc18 errorlevel{0 1} char isascii(char ch); list[list_optioin,list_option] OK, Cancel , MPLAB IDE User s Guide MPLAB C18 C

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

歯9장.PDF

歯9장.PDF 9 Hello!! C printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2 (stream) C (text stream) : `/n'

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

KEY01 PIN_J3 KEY02 PIN_M6 KEY03 PIN_M4 KEY04 PIN_M3 KEY05 PIN_M2 KEY06 PIN_M5 KEY07 PIN_L7 KEY08 PIN_H1 KEY09 PIN_J2 KEY10 PIN_J1 KEY11 PIN_L6 KEY12 P

KEY01 PIN_J3 KEY02 PIN_M6 KEY03 PIN_M4 KEY04 PIN_M3 KEY05 PIN_M2 KEY06 PIN_M5 KEY07 PIN_L7 KEY08 PIN_H1 KEY09 PIN_J2 KEY10 PIN_J1 KEY11 PIN_L6 KEY12 P DEVICE Combo II-DLD-Base ALTERA Module CLOCK(FPGA) USER_Clock PIN_B11 CLOCK FPGA_CLK1 FPGA_CLK2 PIN_AB11 PIN_AB12 RESETn(FPGA) nreset PIN_E4 LED LED_D1 LED_D2 LED_D3 LED_D4 LED_D5 LED_D6 LED_D7 LED_D8

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 (Host) set up : Linux Backend RS-232, Ethernet, parallel(jtag) Host terminal Target terminal : monitor (Minicom) JTAG Cross compiler Boot loader Pentium Redhat 9.0 Serial port Serial cross cable Ethernet

More information

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

Microsoft Word - FS_ZigBee_Manual_V1.3.docx FirmSYS Zigbee etworks Kit User Manual FS-ZK500 Rev. 2008/05 Page 1 of 26 Version 1.3 목 차 1. 제품구성... 3 2. 개요... 4 3. 네트워크 설명... 5 4. 호스트/노드 설명... 6 네트워크 구성... 6 5. 모바일 태그 설명... 8 6. 프로토콜 설명... 9 프로토콜 목록...

More information

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 #define _CRT_SECURE_NO_WARNINGS #include #include main() { char ch; printf(" 문자 1개를입력하시오 : "); scanf("%c", &ch); if (isalpha(ch))

More information

Microsoft Word - MPC850 SPI Driver.doc

Microsoft Word - MPC850 SPI Driver.doc MPC850 SPI Driver 네트워크보드에서구현한 SPI Device Driver 제작및이용방법입니다. 문서작성 : 이재훈 (kingseft.lee@samsung.com) 이용한 SPI EEPROM - X5043/X5045 512 x 8 bit SPI EEPROM (4Kbits = 512bytes) - 제조사 : XICOR (www.xicor.com) -

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

/chroot/lib/ /chroot/etc/

/chroot/lib/ /chroot/etc/ 구축 환경 VirtualBox - Fedora 15 (kernel : 2.6.40.4-5.fc15.i686.PAE) 작동 원리 chroot유저 ssh 접속 -> 접속유저의 홈디렉토리 밑.ssh의 rc 파일 실행 -> daemonstart실행 -> daemon 작동 -> 접속 유저만의 Jail 디렉토리 생성 -> 접속 유저의.bashrc 의 chroot 명령어

More information

Microsoft Word ARM_ver2_0a.docx

Microsoft Word ARM_ver2_0a.docx [Smart]0703-ARM 프로그램설치 _ver1_0a 목차 1 윈도우기반으로리눅스컴파일하기 (Cygwin, GNU ARM 설치 )... 2 1.1 ARM datasheet 받기... 2 1.2 Cygwin GCC-4.0 4.1 4.2 toolchain 파일받기... 2 1.3 Cygwin 다운로드... 3 1.4 Cygwin Setup... 5 2 Cygwin

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> 리눅스 오류처리하기 2007. 11. 28 안효창 라이브러리함수의오류번호얻기 errno 변수기능오류번호를저장한다. 기본형 extern int errno; 헤더파일 라이브러리함수호출에실패했을때함수예 정수값을반환하는함수 -1 반환 open 함수 포인터를반환하는함수 NULL 반환 fopen 함수 2 유닉스 / 리눅스 라이브러리함수의오류번호얻기 19-1

More information

중간고사

중간고사 중간고사 예제 1 사용자로부터받은두개의숫자 x, y 중에서큰수를찾는알고리즘을의사코드로작성하시오. Step 1: Input x, y Step 2: if (x > y) then MAX

More information

歯7장.PDF

歯7장.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

chap7.PDF

chap7.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 System call table and linkage v Ref. http://www.ibm.com/developerworks/linux/library/l-system-calls/ - 2 - Young-Jin Kim SYSCALL_DEFINE 함수

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

MODBUS SERVO DRIVER( FDA7000 Series ) STANDARD PROTOCOL (Ver 1.00) 1

MODBUS SERVO DRIVER( FDA7000 Series ) STANDARD PROTOCOL (Ver 1.00) 1 SERVO DRIVER( FDA7000 Series ) STANDARD PROTOCOL (Ver 100) 1 Contents 1 INTRODUCTION 2 PROTOCOL FRAME OUTLINE 3 FUNCTION FIELD 4 DATA FIELD 5 CRC CHECK 6 FUNCTION EXAM 7 EXCEPTION RESPONSE 8 I/O STATUS

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D> 뻔뻔한 AVR 프로그래밍 The Last(8 th ) Lecture 유명환 ( yoo@netplug.co.kr) INDEX 1 I 2 C 통신이야기 2 ATmega128 TWI(I 2 C) 구조분석 4 ATmega128 TWI(I 2 C) 실습 : AT24C16 1 I 2 C 통신이야기 I 2 C Inter IC Bus 어떤 IC들간에도공통적으로통할수있는 ex)

More information

int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \

int main(void) int a; int b; a=3; b=a+5; printf(a : %d \n, a); printf(b : %d \n, b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf( a : %x \ ? 1 int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \n", &a); printf(" b : %x \n", &b); * : 12ff60,

More information

10.

10. 10. 10.1 10.2 Library Routine: void perror (char* str) perror( ) str Error 0 10.3 10.3 int fd; /* */ fd = open (filename, ) /*, */ if (fd = = -1) { /* */ } fcnt1 (fd, ); /* */ read (fd, ); /* */ write

More information

Microsoft PowerPoint - chap03-변수와데이터형.pptx

Microsoft PowerPoint - chap03-변수와데이터형.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num %d\n", num); return 0; } 1 학습목표 의 개념에 대해 알아본다.

More information

61 62 63 64 234 235 p r i n t f ( % 5 d :, i+1); g e t s ( s t u d e n t _ n a m e [ i ] ) ; if (student_name[i][0] == \ 0 ) i = MAX; p r i n t f (\ n :\ n ); 6 1 for (i = 0; student_name[i][0]!= \ 0&&

More information

Microsoft PowerPoint - chap10-함수의활용.pptx

Microsoft PowerPoint - chap10-함수의활용.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 중 값에 의한 전달 방법과

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona 이름 : 학번 : A. True or False: 각각항목마다 True 인지 False 인지적으세요. 1. (Python:) randint 함수를사용하려면, random 모듈을 import 해야한다. 2. (Python:) '' (single quote) 는한글자를표현할때, (double quote) 는문자열을표현할때사용한다. B. 다음에러를수정하는방법을적으세요.

More information

http://cafedaumnet/pway Chapter 1 Chapter 2 21 printf("this is my first program\n"); printf("\n"); printf("-------------------------\n"); printf("this is my second program\n"); printf("-------------------------\n");

More information

Microsoft PowerPoint APUE(File InO)

Microsoft PowerPoint APUE(File InO) Linux/UNIX Programming 문양세강원대학교 IT특성화대학컴퓨터과학전공 강의목표및내용 강의목표 파일의특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 기타파일제어함수를익힌다. 강의내용 파일구조 (UNIX 파일은어떤구조일까?) 파일관련시스템호출 시스템호출의효율과구조 Page 2 What is a File? A file is a contiguous

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

Chap 7

Chap 7 Chap 7 FPGA 디바이스 1. FPGA 디바이스 1.1. External FPGA Device Driver FPGA 모듈을제어하는디바이스드라이버를작성하는방법에대해서알아보도록한다. 이모듈은 Achro-i.MX6Q의 External Connector에연결된다. 본교재에는 FGPA 펌웨어소스코드가포함되어있지않지만 VHDL로작성할수있다. FGPA 관련소스는패키지에포함되어있는바이너리를이용하면된다.

More information

Chapter_06

Chapter_06 프로그래밍 1 1 Chapter 6. Functions and Program Structure April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 이장의강의목표 2 문자의입력방법을이해한다. 중첩된 if문을이해한다. while 반복문의사용법을익힌다. do 반복문의사용법을익힌다.

More information

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7>

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7> 제14장 동적 메모리 할당 Dynamic Allocation void * malloc(sizeof(char)*256) void * calloc(sizeof(char), 256) void * realloc(void *, size_t); Self-Referece NODE struct selfref { int n; struct selfref *next; }; Linked

More information

PowerPoint Presentation

PowerPoint Presentation Korea Tech Conference 2005 년 5 월 14 일, 서울 2005 년 5 월 14 일 CE Linux Forum Korea Tech Conference 1 Parallel port 를이용한가전제품 제어 임효준 LG 전자 imhyo@lge.com 2005 년 5 월 14 일 CE Linux Forum Korea Tech Conference 2

More information

교육지원 IT시스템 선진화

교육지원 IT시스템 선진화 Module 11: 가상디바이스드라이버작성 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 디바이스드라이버의실행과정이해하기 크로스컴파일러를이용하여가상의디바이스드라이버생성하기 Kbuild 에대해이해하기 2 file_operations 구조체 struct file_operations {

More information

C 프로그래밊 개요

C 프로그래밊 개요 구조체 2009 년 5 월 19 일 김경중 강의계획수정 일자계획 Quiz 실습보강 5 월 19 일 ( 화 ) 구조체 Quiz ( 함수 ) 5 월 21 일 ( 목 ) 구조체저녁 6 시 5 월 26 일 ( 화 ) 포인터 5 월 28 일 ( 목 ) 특강 (12:00-1:30) 6 월 2 일 ( 화 ) 포인터 Quiz ( 구조체 ) 저녁 6 시 6 월 4 일 ( 목

More information

슬라이드 1

슬라이드 1 / 임베디드시스템개요 / 임베디드운영체제 / 디바이스드라이버 01 Linux System Architecture Application Area Application System Call Interface BSD Socket Virtual File System INET(AF_INET) Kernel Area Buffer Cache Network Subsystem

More information

컴파일러

컴파일러 YACC 응용예 Desktop Calculator 7/23 Lex 입력 수식문법을위한 lex 입력 : calc.l %{ #include calc.tab.h" %} %% [0-9]+ return(number) [ \t] \n return(0) \+ return('+') \* return('*'). { printf("'%c': illegal character\n",

More information

Microsoft PowerPoint - chap2

Microsoft PowerPoint - chap2 제 2 장. 파일입출력 (File I/O) 숙대창병모 1 목표 파일의구조및특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 파일현재위치변경 기타파일제어 숙대창병모 2 2.1 파일구조 숙대창병모 3 What is a file? a file is a contiguous sequence of bytes no format imposed by the operating

More information

untitled

untitled while do-while for break continue while( ) ; #include 0 i int main(void) int meter; int i = 0; while(i < 3) meter = i * 1609; printf("%d %d \n", i, meter); i++; return 0; i i< 3 () 0 (1)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 BOOTLOADER Jo, Heeseung 부트로더컴파일 부트로더소스복사및압축해제 부트로더소스는웹페이지에서다운로드 /working 디렉터리로이동한후, wget으로다운로드 이후작업은모두 /working 디렉터리에서진행 root@ubuntu:# cp /media/sm5-linux-111031/source/platform/uboot-s4210.tar.bz2 /working

More information

고급 프로그래밍 설계

고급 프로그래밍 설계 UNIT 13 라즈베리파이블루투스 광운대학교로봇 SW 교육원 최상훈 Bluetooth Module 2 Bluetooth Slave UART Board UART 인터페이스용블루투스모듈 slave/device mode 라즈베리파이 GPIO 3 < 라즈베리파이 B+ 의 P1 헤더핀 GPIO 배치도 > wiringpi 라이브러리 4 라즈베리파이 GPIO 라이브러리

More information

C 프로그래밍 언어 입문 C 프로그래밍 언어 입문 김명호저 숭실대학교 출판국 머리말..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1장 프로그래밍 시작 1.1 C 10 1.2 12

More information

chap8.PDF

chap8.PDF 8 Hello!! C 2 3 4 struct - {...... }; struct jum{ int x_axis; int y_axis; }; struct - {...... } - ; struct jum{ int x_axis; int y_axis; }point1, *point2; 5 struct {....... } - ; struct{ int x_axis; int

More information

Microsoft PowerPoint - 09-Pipe

Microsoft PowerPoint - 09-Pipe 9. 파이프 상명대학교소프트웨어학부 파이프 시그널은이상한사건이나오류를처리하는데는이용하지만, 한프로세스로부터다른프로세스로대량의정보를전송하는데는부적합하다. 파이프 한프로세스를다른관련된프로세스에연결시켜주는단방향의통신채널 2 pipe() Usage #include int pipe(int filedes[2]); 3 < ex_1.c > #include

More information

디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서

디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서 임베디드시스템설계강의자료 7 Device Driver (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서디바이스를제어하기위한자료구조와함수의집합

More information

2009년 상반기 사업계획

2009년 상반기 사업계획 소켓프로그래밍활용 IT CookBook, 유닉스시스템프로그래밍 학습목표 소켓인터페이스를활용한다양한프로그램을작성할수있다. 2/23 목차 TCP 기반프로그래밍 반복서버 동시동작서버 동시동작서버-exec함수사용하기 동시동작서버-명령행인자로소켓기술자전달하기 UDP 프로그래밍 3/23 TCP 기반프로그래밍 반복서버 데몬프로세스가직접모든클라이언트의요청을차례로처리 동시동작서버

More information

BY-FDP-4-70.hwp

BY-FDP-4-70.hwp RS-232, RS485 FND Display Module BY-FDP-4-70-XX (Rev 1.0) - 1 - 1. 개요. 본 Display Module은 RS-232, RS-485 겸용입니다. Power : DC24V, DC12V( 주문사양). Max Current : 0.6A 숫자크기 : 58mm(FND Size : 70x47mm 4 개) RS-232,

More information

Getting Started 1 st Edition March 2004 Contents 1.EMPOS II QUICK START... 1 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 1.7. 1.8. 1.9....1...1...2 TextLcd...5 7 Segment...6 Led I/O...7 IP DEFAULT GATEWAY...8 WEB

More information

Embeddedsystem(8).PDF

Embeddedsystem(8).PDF insmod init_module() register_blkdev() blk_init_queue() blk_dev[] request() default queue blkdevs[] block_device_ops rmmod cleanup_module() unregister_blkdev() blk_cleanup_queue() static struct { const

More information

Microsoft PowerPoint APUE(File InO).pptx

Microsoft PowerPoint APUE(File InO).pptx Linux/UNIX Programming 문양세강원대학교 IT대학컴퓨터과학전공 강의목표및내용 강의목표 파일의특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 기타파일제어함수를익힌다. 강의내용 파일구조 (UNIX 파일은어떤구조일까?) 파일관련시스템호출 시스템호출의효율과구조 Page 2 What is a File? A file is a contiguous

More information

ABC 11장

ABC 11장 12 장고급응용 0 수행중인프로그램 프로세스 모든프로세스는유일한프로세스식별번호 (PID) 를가짐 유닉스에서는 ps 명령을사용하여프로세스목록을볼수있음 12-1 프로세스 $ ps -aux USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND blufox 17725 34.0 1.6 146 105 i2 R 15:13 0:00

More information

Microsoft PowerPoint APUE(File InO).ppt

Microsoft PowerPoint APUE(File InO).ppt 컴퓨터특강 () [Ch. 3] 2006 년봄학기 문양세강원대학교컴퓨터과학과 강의목표및내용 강의목표 파일의특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 기타파일제어함수를익힌다. 강의내용 파일구조 (UNIX 파일은어떤구조일까?) 파일관련시스템호출 시스템호출의효율과구조 Page 2 1 What is a File? A file is a contiguous

More information