?? plt_init.c
字號(hào):
<HTML><HEAD><TITLE>/home/asysweb/public_html/cortex/exbsp/jbox/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="h8300h.h.FIND-INC"><font color="blue">"h8300h.h"</font></a><b><font color='DarkGreen'># include</font></b> <a href="hit_s_de.h.FIND-INC"><font color="blue">"hit_s_de.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><b><font color='DarkGreen'>#include</font></b> <a href="gdb_defs.h.FIND-INC"><font color="blue">"gdb_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>static</i> <i>crtx_Char_t</i> pltf_ConvCodes[] = { 2, <font color="DarkGreen">'\n'</font>, 012, 015, 0};<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]), pltf_ConvCodes, <font color="#6920ac">/* values for other fields are not important here */</font>};<b><font color='DarkGreen'>#if</font></b><font color="maroon"> (defined(ENVI_H83H_USE_MONITOR_IO_CHAN)&&(ENVI_H83H_USE_MONITOR_IO_CHAN>0))</font><i>void</i> *pltf_PutcharDesc_g = <a href="CRTX_NULL.FIND-DEF">CRTX_NULL</a>;<b><font color='DarkGreen'>#endif</font></b><font color="maroon"> <font color="#6920ac">/* (defined(ENVI_H83H_USE_MONITOR_IO_CHAN)&&(ENVI_H83H_USE_MONITOR_IO_CHAN>0)) */</font></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> <i>hits_Desc_t</i> DescHits = { (<i>void</i> *)<a href="H83H_SCI0_BASE.FIND-DEF">H83H_SCI0_BASE</a>, 9600, ( <a href="H83H_MODE_ASYNCH.FIND-DEF">H83H_MODE_ASYNCH</a> | <a href="H83H_BIT_8.FIND-DEF">H83H_BIT_8</a> | <a href="H83H_PARITY_NOT_CHECK.FIND-DEF">H83H_PARITY_NOT_CHECK</a> | <a href="H83H_PARITY_EVEN.FIND-DEF">H83H_PARITY_EVEN</a> | <a href="H83H_STOP_BIT_1.FIND-DEF">H83H_STOP_BIT_1</a> | <a href="H83H_MULTI_MODE_DIS.FIND-DEF">H83H_MULTI_MODE_DIS</a> | <a href="H83H_CLOCK_SELECT_0.FIND-DEF">H83H_CLOCK_SELECT_0</a> ), <a href="H83H_VECTOR_SCI0_RX.FIND-DEF">H83H_VECTOR_SCI0_RX</a>, <a href="H83H_VECTOR_SCI0_TX.FIND-DEF">H83H_VECTOR_SCI0_TX</a>, 16000000l }; <a href="hrdi_GlobalForbid.FIND-FUNC">hrdi_GlobalForbid</a>(); <b>if</b> (!<a href="hits_Create.FIND-FUNC">hits_Create</a>(&DescHits, &pltf_SdrvDesc)) { <a href="syst_Fatal.FIND-FUNC">syst_Fatal</a>(<font color="DarkGreen">"Cannot create 552 output"</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>); } <a href="hrdi_GlobalPermit.FIND-FUNC">hrdi_GlobalPermit</a>(); <b>return</b>;}<b><font color='DarkGreen'>#if</font></b><font color="maroon"> (defined(ENVI_H83H_USE_MONITOR_IO_CHAN)&&(ENVI_H83H_USE_MONITOR_IO_CHAN>0))</font><font color="#6920ac">/* this service can be used to send a byte via debugging monitor */</font><font size="+1"><i>crtx_Int_t</i> <b><font color="azure1"><a name="pltf_Putc">pltf_Putc</a></font></b>( <i>crtx_Char_t</i> Byte_a, <i>crtx_Void_t</i> *pDesc_a __attribute__((__unused__))){</font><b><font color='DarkGreen'>#if</font></b><font color="maroon"> (defined(ENVI_GDBM_ENABLED) && (ENVI_GDBM_ENABLED > 0))</font> <b>if</b> (Byte_a == <font color="DarkGreen">'\n'</font>) { <a href="gdbm_PutChar.FIND-FUNC">gdbm_PutChar</a>(<font color="DarkGreen">'\n'</font>); <a href="gdbm_PutChar.FIND-FUNC">gdbm_PutChar</a>(<font color="DarkGreen">'\r'</font>); } <b>else</b> { <a href="gdbm_PutChar.FIND-FUNC">gdbm_PutChar</a>(Byte_a); }<b><font color='DarkGreen'>#endif</font></b><font color="maroon"> <font color="#6920ac">/* (defined(ENVI_GDBM_ENABLED) && (ENVI_GDBM_ENABLED > 0)) */</font></font> <b>return</b> Byte_a;}<b><font color='DarkGreen'>#endif</font></b><font color="maroon"> <font color="#6920ac">/* (defined(ENVI_H83H_USE_MONITOR_IO_CHAN)&&(ENVI_H83H_USE_MONITOR_IO_CHAN>0)) */</font></font></pre></BODY></HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -