1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_InitPrintServer</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_InitPrintServer <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14<DD><CODE>#include &lt;nitro/os.h&gt;</CODE><BR>
15 <BR>
16 <CODE>void OS_InitPrintServer( void );</CODE>
17</DL>
18<H2>Arguments</H2>
19<P>None.</P>
20<H2>Return Values</H2>
21<P>None.</P>
22<H2>Description</H2>
23<P>This is an initialization function to display debug messages from the ARM7.</P>
24<P>Because this function is an SDK library debugging function, there is no need to use it in ordinary applications. It is presumed that mainly library and middleware developers will use this.
25
26<P>Call this function before the <A href="../init/OS_Init.html"><CODE>OS_Init</CODE></A> function.
27<P>With the <CODE>OS_InitPrintServer</CODE> function, allocate a buffer for ARM7 debug output in an area shared by ARM9 and ARM7 on the main memory. Later, store the string in this buffer by performing debug output with the ARM7. With the ARM9, periodically output the content of this buffer. (It is preferable to output about once every frame.) Call the <A href="OS_PrintServer.html"><CODE>OS_PrintServer</CODE></A> function to output the buffer content.
28
29<BLOCKQUOTE style="background-color:#ffffcc"><B>Example:</B>
30<PRE>
31void NitroMain(void)
32{
33    <FONT color="#ff0000">OS_InitPrintServer();</FONT>
34    OS_Init();
35        :
36
37    //---- main loop
38    while(1)
39    {
40        <FONT color="#ff0000">OS_PrintServer();</FONT>
41        SVC_WaitVBlankIntr();
42            :
43    }
44
45}</PRE></BLOCKQUOTE>
46<P><BR>
47If you are outputting ARM7 strings using this OS PrintServer feature, no matter where the output destination console is set for the ARM7, the output destination is the standard one for ARM9.</P>
48<P>In FINALROM builds, the <CODE>OS_InitPrintServer</CODE> function and the <A href="OS_PrintServer.html"><CODE>OS_PrintServer</CODE></A> function are replaced with code that does nothing.</P>
49<H3>Memory Used</H3>
50<P>The location to allocate the buffer that stores ARM7 debugging output is an area shared by ARM9 and ARM7 on the main memory. The size is 1 KB for the string buffer and 8 bytes for the pointer to specify the output position.</P>
51<H2>See Also</H2>
52<P><A href="OS_PrintServer.html"><CODE>OS_PrintServer</CODE></A></P>
53<H2>Revision History</H2>
54<P>2009/06/25 Described the method for using the function.<BR>
55 2005/08/19 Initial version.</P>
56<hr><p>CONFIDENTIAL</p></body>
57</HTML>