rs_rawio.c

来自「T-kernel 的extension源代码」· C语言 代码 · 共 49 行

C
49
字号
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	@(#)rs_rawio.c  * */#include <basic.h>#include <sys/consio.h>#define TSD_RSG_RTN_M1	(-1)/*----------------------------------------------------------------------	Single character output to the RS port----------------------------------------------------------------------*/W RS_putchar(W c){	UB	cc = (UB)c;	return	console_out(RS_PORT, (B*)&cc, 1);}/*----------------------------------------------------------------------        Single character output from the RS port----------------------------------------------------------------------*/W RS_getchar( void ){	UB	c;	return (console_in(RS_PORT, (B*)&c, 1) != 0) ? c : TSD_RSG_RTN_M1;}/*----------------------------------------------------------------------        IOCTL of the RS port----------------------------------------------------------------------*/W RS_ioctl(W req, W arg){	return console_ctl(RS_PORT, req, arg);}

⌨️ 快捷键说明

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