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

📄 usrscript.c

📁 ppc 8245 可编译bsp 包括 uart
💻 C
字号:
/* usrScript.c - startup script module *//* Copyright 1992 Wind River Systems, Inc. *//*modification history--------------------01b,18nov96,dbt  ANSIfied function headers (SPR #7427.)		 Replaced variable named new with newFdIn for C++ compatibility.01a,18sep92,jcf  written.*//*DESCRIPTIONThis file is used to execute a startup script of VxWorks shell commands.This file is included by usrConfig.c.SEE ALSO: usrExtra.cNOMANUAL*/#ifndef  __INCusrScriptc#define  __INCusrScriptc #ifdef	INCLUDE_STARTUP_SCRIPT/******************************************************************************** usrStartupScript - make shell read initial startup script file** This routine reads a startup script before the VxWorks* shell comes up interactively.** NOMANUAL*/void usrStartupScript     (    char *fileName    )    {    int old;    int newStdIn;    if (fileName == NULL)        return;    newStdIn = open (fileName, O_RDONLY, 0);    if (newStdIn != ERROR)        {        printf ("Executing startup script %s ...\n", fileName);        taskDelay (sysClkRateGet () / 2);        old = ioGlobalStdGet (STD_IN);  /* save original std in */        ioGlobalStdSet (STD_IN, newStdIn);   /* set std in to script */        shellInit (SHELL_STACK_SIZE, FALSE);    /* execute commands */        /* wait for shell to finish */        do            taskDelay (sysClkRateGet ());        while (taskNameToId (shellTaskName) != ERROR);        close (newStdIn);        ioGlobalStdSet (STD_IN, old);   /* restore original std in */        printf ("\nDone executing startup script %s\n", fileName);        taskDelay (sysClkRateGet () / 2);        }    else        printf ("Unable to open startup script %s\n", fileName);    }#endif	/* INCLUDE_STARTUP_SCRIPT */#endif	/* __INCusrScriptc */

⌨️ 快捷键说明

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