![Portwell NAR-7070 Скачать руководство пользователя страница 76](http://html1.mh-extra.com/html/portwell/nar-7070/nar-7070_user-manual_1581805076.webp)
NAR-7070 User’s Manual
75
int show = 14 ; /* Show underline cursor */
void Show () {
write(fd,&Cmd,1);
write(fd,&show,1);
}
int movel = 16 ; /* Move cursor 1 character left */
void MoveL () {
write(fd,&Cmd,1);
write(fd,&movel,1);
}
int mover = 20 ; /* Move cursor 1 character right */
void MoveR () {
write(fd,&Cmd,1);
write(fd,&mover,1);
}
int scl = 24; /* Scroll cursor 1 character left */
void ScrollL(){
write(fd,&Cmd,1);
write(fd,&scl,1);
}
int scr = 28; /* Scroll cursor 1 character right */
void ScrollR(){
write(fd,&Cmd,1);
write(fd,&scr,1);
}
int setdis = 64;/* Command */
void SetDis(){
write(fd,&Cmd,1);
write(fd,&setdis,1);
}
/* Add or Change Show Message here */
char mes1[] = "Portwell EZIO";
char mes2[] = "*************";
char mes3[] = "Up is selected";
char mes4[] = "Down is selected";
char mes5[] = "Enter is selected";
char mes6[] = "ESC is selected";
char nul[] = " ";
int a,b;
void ShowMessage (char *str1 , char *str2) {
a = strlen(str1);
b = 40 - a;
write(fd,str1,a);
write(fd,nul,b);
write(fd,str2,strlen(str2));
}
int main () {
SetEnvironment(); /* Set RAW mode */
fd = open("/dev/ttyS1" ,O_RDWR);/** Open Serial port (COM2) */