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

📄 outbound.c

📁 嵌入式系统基础课件
💻 C
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -