plt_init.c
来自「澳洲人写的Cortex,包括uC_IP协议栈」· C语言 代码 · 共 72 行
C
72 行
<HTML><HEAD><TITLE>/home/asysweb/public_html/cortex/exbsp/posix4/src/plt_init.c</TITLE></HEAD><BODY><pre><font color="#6920ac">/*************************************************************************/</font><font color="#6920ac">/* */</font><font color="#6920ac">/* Copyright (c) 1997-1999 Australian Real Time Embedded Systems */</font><font color="#6920ac">/* */</font><font color="#6920ac">/* PROPRIETARY RIGHTS of Australian Real Time Embedded Systems */</font><font color="#6920ac">/* are involved in the subject matter of this material. All reproduction,*/</font><font color="#6920ac">/* manufacturing, use, and sales rights pertaining to this subject matter*/</font><font color="#6920ac">/* are governed by the license agreement. The recipient of this software */</font><font color="#6920ac">/* implicitly accepts the terms of the license. */</font><font color="#6920ac">/* */</font><font color="#6920ac">/*************************************************************************/</font><b><font color='DarkGreen'>#include</font></b> <a href="crt_defs.h.FIND-INC"><font color="blue">"crt_defs.h"</font></a><b><font color='DarkGreen'>#include</font></b> <a href="hwi_defs.h.FIND-INC"><font color="blue">"hwi_defs.h"</font></a><b><font color='DarkGreen'>#include</font></b> <a href="sdr_defs.h.FIND-INC"><font color="blue">"sdr_defs.h"</font></a><b><font color='DarkGreen'># include</font></b> <a href="posix4.h.FIND-INC"><font color="blue">"posix4.h"</font></a><b><font color='DarkGreen'># include</font></b> <a href="aio_defs.h.FIND-INC"><font color="blue">"aio_defs.h"</font></a><b><font color='DarkGreen'>#include</font></b> <a href="plt_defs.h.FIND-INC"><font color="blue">"plt_defs.h"</font></a><i>static</i> <i>crtx_Char_t</i> pltf_InpBuffer[ <a href="PLTF_INP_BUFFER_SIZE.FIND-DEF">PLTF_INP_BUFFER_SIZE</a> ];<i>static</i> <i>crtx_Char_t</i> pltf_OutBuffer[ <a href="PLTF_OUT_BUFFER_SIZE.FIND-DEF">PLTF_OUT_BUFFER_SIZE</a> ];<i>sdrv_Desc_t</i> pltf_SdrvDesc = { 0, 0, -1, -1, <a href="NULL.FIND-DEF">NULL</a>, <a href="NULL.FIND-DEF">NULL</a>, <a href="NULL.FIND-DEF">NULL</a>, <a href="NULL.FIND-DEF">NULL</a>, <a href="NULL.FIND-DEF">NULL</a>, <a href="NULL.FIND-DEF">NULL</a>, <a href="NULL.FIND-DEF">NULL</a>, pltf_InpBuffer, <i>sizeof</i>(pltf_InpBuffer)/<i>sizeof</i>(pltf_InpBuffer[0]), pltf_OutBuffer, <i>sizeof</i>(pltf_OutBuffer)/<i>sizeof</i>(pltf_OutBuffer[0]), <a href="NULL.FIND-DEF">NULL</a>, <font color="#6920ac">/* values for other fields are not important here */</font>};<font size="+1"><i>crtx_Void_t</i> <b><font color="azure1"><a name="pltf_Init">pltf_Init</a></font></b>( <i>crtx_Int_t</i> ArgC_a __attribute__((__unused__)), <i>crtx_Void_t</i> *pArgV_a __attribute__((__unused__)), <i>crtx_Void_t</i> *pEnvV_a __attribute__((__unused__))){</font> <b>if</b> (!<a href="saio_Create.FIND-FUNC">saio_Create</a>(<a href="CRTX_NULL.FIND-DEF">CRTX_NULL</a>, &pltf_SdrvDesc, <font color="#6920ac">/* allocate descriptors */</font> <a href="PSX4_SERIAL1_VECTOR.FIND-DEF">PSX4_SERIAL1_VECTOR</a>,<font color="#6920ac">/* HISR and LISR vectors */</font> <a href="CRTX_NULL.FIND-DEF">CRTX_NULL</a>)) <font color="#6920ac">/* default attributes */</font> { <a href="syst_Fatal.FIND-FUNC">syst_Fatal</a>(<font color="DarkGreen">"saio_Create: Cannot create serial device.\n"</font>); } <b>else</b> <b>if</b> (!<a href="sdrv_Create.FIND-FUNC">sdrv_Create</a>(&pltf_SdrvDesc)) { <a href="syst_Fatal.FIND-FUNC">syst_Fatal</a>(<font color="DarkGreen">"Cannot create serial output"</font>); } <b>return</b>;}</pre></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?