- 66 -
Appendix
int res=0;
FILE * keyfd = NULL;
struct input_event ie;
int LCDStatus = 1;
system(“/usr/bin/numlockx on”); //enable NumLock
res=iopl(3);
setuid(500);
keyfd = fopen(“/dev/input/event16”, “r”); //application must
choose correct event for remote control
if(keyfd != NULL)
{
while(1)
{
fread((void *)&ie, sizeof(ie), 1, keyfd);
if (ferror(keyfd))
{
perror(“fread”);
exit(1);
}
if(ie.code == 1 && ie.value == 1) //ESC
{
//exit application
printf(“Exit\n”);
break;
}
if(ie.code == 194 && ie.value == 1) //F24
{
printf(“Phone On\n”);
}
if(ie.code == 193 && ie.value == 1) //F23
{
printf(“Phone Off\n”);
}
if(ie.code == 192 && ie.value == 1) //F22
{
printf(“Audio switch\n”);
}
if(ie.code == 191 && ie.value == 1) //F21
{
printf(“LCD On/off\n”);
if( LCDStatus == 1)
Summary of Contents for M1859
Page 2: ...2 This page is intentionally left blank...
Page 3: ...i Revision History Version Release Time Description 1 0 2019 08 Initial release...
Page 16: ...xiv This page is intentionally left blank...
Page 17: ...1 1 Chapter 1 Introduction Chapter 1 Introduction...
Page 20: ...4 Introduction 1 4 Dimensions Unit mm 500 411 100 100 45 337 231...
Page 23: ...7 Chapter 2 Getting Started 2 Chapter 2 Getting Started...
Page 35: ...19 3 Chapter 3 Using the Computer Chapter 3 Using the Computer...
Page 54: ...38 Using the Computer 4 Then read and decoded data will be displayed...
Page 55: ...39 4 Chapter 4 BIOS Chapter 4 BIOS...
Page 68: ...52 This page is intentionally left blank...
Page 69: ...53 Appendix Appendix Appendix Optional Connections Optional Connections...