삭제
수정이 안되네요.
struct input_event event[MAX_SIZE]; int fd_remote = 0; int rd,value = 0; memset(event, 0, sizeof(event)); fd_remote = open(EVENT_PATH, O_RDWR); if(fd_remote < 0) { printf("cannot open device. \n"); return CMD_FAIL; } while(!value) { rd = read(fd_remote, event, MAX_SIZE); if(rd < 0) { printf("cannot read device. \n"); return CMD_FAIL; } printf("Code [%d] \n", event[0].code);
다음과 같이 해결했습니다.
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
[해결]
수정이 안되네요.
struct input_event event[MAX_SIZE];
int fd_remote = 0;
int rd,value = 0;
memset(event, 0, sizeof(event));
fd_remote = open(EVENT_PATH, O_RDWR);
if(fd_remote < 0)
{
printf("cannot open device. \n");
return CMD_FAIL;
}
while(!value)
{
rd = read(fd_remote, event, MAX_SIZE);
if(rd < 0)
{
printf("cannot read device. \n");
return CMD_FAIL;
}
printf("Code [%d] \n", event[0].code);
다음과 같이 해결했습니다.
댓글 달기