참조: inpw() 하드웨어에서 포트값을 워드로 읽어준다.
페이지 정보
본문
설명 | 하드웨어 포트에서 한 워드를 읽음 |
문법 |
#include<conio.h> unsigned inpw(unsigned portnum); |
기능 |
portnum : 포트 번호 inpw 는 portnum 이 정해진 입력 포트로부터 두바이트 워드를 읽는 매크로이다. portnum 에서 워드의 하위 바이트를 읽고 portnum+1 에서 워드의 상위 바이트를 읽는다. <conio.h> 가 포함 되었을경우 인라인 코드로 확장되는 매크로처럼 처리된다. |
리턴값 | 읽는 값 리턴 |
사용법 |
#include<stdio.h> #include<conio.h> main(void) { unsigned result; unsigned port =0; result =inpw(port); printf("Port : %d = 0x%X\n",port,result); return 0; };
|
값 |
포트값 |
댓글목록
등록된 댓글이 없습니다.