usrpcconsole.c

来自「IXP425的BSP代码」· C语言 代码 · 共 53 行

C
53
字号
/* usrPcConsole.c - PC console configuration file *//* Copyright 1984-1998 Wind River Systems, Inc. *//*modification history--------------------01a,03jun98,ms   written*//*DESCRIPTIONUser configurable PC console intialization.*/#ifndef	N_VIRTUAL_CONSOLES#define	N_VIRTUAL_CONSOLES	1#endif#ifndef	PC_CONSOLE#define	PC_CONSOLE		0#endif/******************************************************************************** usrPcConsoleInit - initialize the PC console*/STATUS usrPcConsoleInit (void)    {    int ix;    char tyName[30];    pcConDrv ();    for (ix = 0; ix < N_VIRTUAL_CONSOLES; ix++)	{	sprintf (tyName, "%s%d", "/pcConsole/", ix);	(void) pcConDevCreate (tyName,ix, 512, 512);	if (ix == PC_CONSOLE)		/* init the console device */	    {	    consoleFd = open (tyName, O_RDWR, 0);	    (void) ioctl (consoleFd, FIOBAUDRATE, CONSOLE_BAUD_RATE);	    (void) ioctl (consoleFd, FIOSETOPTIONS, OPT_TERMINAL);	    }	}    ioGlobalStdSet (STD_IN,  consoleFd);    ioGlobalStdSet (STD_OUT, consoleFd);    ioGlobalStdSet (STD_ERR, consoleFd);    return (OK);    }

⌨️ 快捷键说明

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