⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libtty2006.h

📁 上海数传信息科技有限公司的所有模块使用的都是2.4Ghz频段
💻 H
字号:
/*************************************************************************** *   Copyright (C) 2005 by huang yanchun                                   * *   hyc@newp4-fedora                                                      * *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * *   This program is distributed in the hope that it will be useful,       * *   but WITHOUT ANY WARRANTY; without even the implied warranty of        * *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         * *   GNU General Public License for more details.                          * *                                                                         * *   You should have received a copy of the GNU General Public License     * *   along with this program; if not, write to the                         * *   Free Software Foundation, Inc.,                                       * *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             * ***************************************************************************/#ifndef _LIBTTY2006 #define _LIBTTY2006#ifdef __cplusplusextern "C" {#endif /* __cplusplus */ #include <sys/types.h>#include <sys/stat.h>#include <sys/ioctl.h>#include <fcntl.h>#include <termios.h>#include <stdio.h>////For All LXR06X0://int GBKstr2utf8(unsigned char * strin_gbk, unsigned char * utf8_str);#define Run(al1, al2, al3, al4) { char *arglist[4];  arglist[0]=al1; arglist[1]=al2; arglist[2]=al3; arglist[3]=al4; execute(arglist); }int execute(char *arglist[]);////For LXR0640(Data terminal) and LXR0642(Escan2007) both://int TERM_console_open();int TERM_console_close();////For LXR0640(Data terminal) only://#define KEEPWAITING      0xffffffff#define NOWAITING        0#define NORMALDISPLAY    0   #define REVERSEDISPLAY   1#define TERM_ERROR_NONE       0#define TERM_ERROR_NOTOPEN    1#define TERM_ERROR_OPENFAIL   2#define TERM_ERROR_WRITE      3 #define KEY_NOKEY -1        #define KEY_F1 0x013b#define KEY_F2 0x013c#define KEY_F3 0x013d#define KEY_F4 0x013e#define KEY_F5 0x013f#define KEY_BACKLIGHT 0x0140#define KEY_FUNC 0x0141#define KEY_SHIFT 0x0142#define KEY_ALT 0x0143#define KEY_CTRL 0x0144#define KEY_UP 0x0148#define KEY_DOWN 0x0150#define KEY_RIGHT 0x014D#define KEY_LEFT 0x014B#define KEY_ESC 0x1B#define KEY_BACKSPACE 0x08#define KEY_ENTER 0x0Dextern int statusline_on;  int TERM_clearscreen();int TERM_gotoxy(int x,int y);int TERM_getkey(unsigned long sleeptime_100ms);int TERM_statusline(int POSy);int TERM_display(int mode,char *str);int TERM_displayxy(int x,int y,int mode,char *str);void TERM_save_cur();void TERM_resume_cur();void TERM_visible_cur(); void TERM_disvisible_cur();int TERM_gethandle();int get_statusline(char* stastr);int TERM_displayGBK(int mode,char *strgbk);int TERM_wgetch_gbk(char * pbuff); int TERM_wgetln_gbk(char * str_buff);int TERM_wgetch_gbk_t9(char * pbuff);int TERM_wgetln_gbk_t9(char * str_buff);//For LXR0642(Escan2007) only://this API for further use, may run slowly!//SegNum: 0 - 127;   OnOff: NonZero-display, 0-dim.int ICON_put1seg(int SegNum, int OnOff);//level:    -1:all off, 0:only ANT,  1-4:barint ICON_RefreshAntLevel(int level);//input a string of date and time "YYYYMMDDHHSS", fox ex. "200703221058"int ICON_RefreshDateTime( char * DigitArray);//level:    -1:all off, 0:only ANT,  1-4:barint ICON_RefreshBatLevel(int level);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* _LIBTTY2006*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -