outbound.c
来自「嵌入式系统基础课件」· C语言 代码 · 共 41 行
C
41 行
#include <ctype.h>
#include "libepc.h"
#include "serial.h"
#include "mtc.h"
void OutBound(void)
{
WINDOW *w ;
w = WindowCreate("Local", 0, 11, 0, 79) ;
if (!w) return ;
for (;;)
{
BYTE8 code ;
char ascii ;
MtCYield() ;
WindowSelect(w) ;
if (!ScanCodeRdy()) continue ;
code = GetScanCode() ;
if (code & 0x80) continue ;
if (SetsKybdState(code)) continue ;
ascii = ScanCode2Ascii(code) & 0xFF ;
if (!isprint(ascii) && !iscntrl(ascii)) continue ;
WindowPutChar(w, ascii) ;
SerialPut(ascii) ;
if (ascii == '\r')
{
WindowPutChar(w, '\n') ;
SerialPut('\n') ;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?