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=utf-8">
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_IsRunOnEmulator</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_IsRunOnEmulator <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> <BR> <CODE>BOOL OS_IsRunOnEmulator( void );</CODE>
15</DL>
16<H2>Arguments</H2>
17<P>None.</P>
18<H2>Return Values</H2>
19<P>If the program is running on the ensata NITRO Software Emulator, <code>TRUE</code> is returned. Otherwise, <code>FALSE</code> is returned.</P>
20<H2>Description</H2>
21<P>Checks whether the program is running on the ensata NITRO Software Emulator (Ensata).</P>
22<P>This function is used to dynamically switch processing depending on whether the program is running on Ensata or some other environment. Use this function to create programs that will operate on Ensata and other environments.</P>
23<P>The <a href="OS_Printf.html"><code>OS_Printf</code></a> function uses this function to control the output destination.</P>
24<P>Because this is a debugging function, it always returns <code>FALSE</code> in the FINALROM version of the library.</P>
25<H3><BR> Similar Functions</H3>
26<P>The <A href="OS_IsRunOnDebugger.html"><CODE>OS_IsRunOnDebugger</CODE></A> function is also used for finding out the operating environment. It checks whether the program is running on either IS-NITRO-DEBUGGER or IS-TWL-DEBUGGER.</P>
27<H3><BR> Actual Values Due to the Environment or Build</H3>
28<P>The table below shows the differences in the values returned by the <A href="OS_IsRunOnDebugger.html"><CODE>OS_IsRunOnDebugger</CODE></A> and <CODE>OS_IsRunOnEmulator</CODE> functions due to the operating environment.<BR>
29</P>
30<TABLE border="1">
31  <TBODY>
32    <TR>
33<TH colspan="4" style="background-color:#304040;"><FONT color="#ffffff">For NITRO Mode</FONT></TH>
34    </TR>
35    <TR>
36<TH>Operating Environment</TH>
37<TH>Build</TH>
38<TH>Value of <CODE>OS_IsRunOnDebugger</CODE></TH>
39<TH><CODE>Value of <CODE>OS_IsRunOnEmulator</CODE></CODE></TH>
40    </TR>
41    <TR>
42<TD>NTR system</TD>
43<TD>DEBUG<BR> RELEASE<BR> FINALROM</TD>
44<TD><B>FALSE</B></TD>
45<TD><B>FALSE</B></TD>
46    </TR>
47    <TR>
48<TD>Actual TWL unit</TD>
49<TD>DEBUG<BR> RELEASE<BR> FINALROM</TD>
50<TD><B>FALSE</B></TD>
51<TD><B>FALSE</B></TD>
52    </TR>
53    <TR>
54<TD rowspan="2">IS-NITRO-DEBUGGER<BR> (debugger software<BR> even if not connected)</TD>
55<TD>DEBUG<BR> RELEASE</TD>
56<TD><B><FONT color="#ff0000">TRUE</FONT></B></TD>
57<TD><B>FALSE</B></TD>
58    </TR>
59    <TR>
60<TD>FINALROM</TD>
61<TD><B>FALSE</B></TD>
62<TD><B>FALSE</B></TD>
63    </TR>
64    <TR>
65<TD rowspan="2">ENSATA EMULATOR</TD>
66<TD>DEBUG<BR>RELEASE</TD>
67<TD><B>FALSE</B></TD>
68<TD><B><FONT color="#ff0000">TRUE</FONT></B></TD>
69    </TR>
70    <TR>
71<TD>FINALROM</TD>
72<TD><B>FALSE</B></TD>
73<TD><B>FALSE</B></TD>
74    </TR>
75    <TR>
76<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For general-purpose development: ARM9)</TD>
77<TD>DEBUG<BR>RELEASE</TD>
78<TD><B><FONT color="#ff0000">TRUE</FONT></B></TD>
79<TD><B>FALSE</B></TD>
80    </TR>
81    <TR>
82<TD>FINALROM</TD>
83<TD><B>FALSE</B></TD>
84<TD><B>FALSE</B></TD>
85    </TR>
86    <TR>
87<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development:<BR>ARM9 + ARM7)</TD>
88<TD>DEBUG<BR>RELEASE</TD>
89<TD><B><FONT color="#ff0000">TRUE</FONT></B></TD>
90<TD><B>FALSE</B></TD>
91    </TR>
92    <TR>
93<TD>FINALROM</TD>
94<TD><B>FALSE</B></TD>
95<TD><B>FALSE</B></TD>
96    </TR>
97    <TR>
98<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For general-purpose development: ARM9)<BR> Debugger software <BR> When not connected</TD>
99<TD>DEBUG<BR>RELEASE</TD>
100<TD><B><CODE>FALSE</CODE></B></TD>
101<TD><B><CODE>FALSE</CODE></B></TD>
102    </TR>
103    <TR>
104<TD>FINALROM</TD>
105<TD><B><CODE>FALSE</CODE></B></TD>
106<TD><B><CODE>FALSE</CODE></B></TD>
107    </TR>
108    <TR>
109<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development:<BR>ARM9 + ARM7)<BR> Debugger software<BR> When not connected</TD>
110<TD>DEBUG<BR>RELEASE</TD>
111<TD><B><CODE>FALSE</CODE></B></TD>
112<TD><B><CODE>FALSE</CODE></B></TD>
113    </TR>
114    <TR>
115<TD>FINALROM</TD>
116<TD><B><CODE>FALSE</CODE></B></TD>
117<TD><B><CODE>FALSE</CODE></B></TD>
118    </TR>
119    <TR>
120<TH colspan="4" style="background-color:#304040;"><FONT color="#ffffff">For TWL Mode</FONT></TH>
121    </TR>
122    <TR>
123<TH>Operating Environment</TH>
124<TH>Build</TH>
125<TH>Value of the <CODE>OS_IsRunOnDebugger</CODE> function</TH>
126<TH>Value of <CODE>OS_IsRunOnEmulator</CODE></TH>
127    </TR>
128    <TR>
129<TD>Actual TWL unit</TD>
130<TD>DEBUG<BR>RELEASE<BR>FINALROM</TD>
131<TD><B>FALSE</B></TD>
132<TD><B>FALSE</B></TD>
133    </TR>
134    <TR>
135<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For general-purpose development: ARM9)</TD>
136<TD>DEBUG<BR>RELEASE</TD>
137<TD><B><FONT color="#ff0000">TRUE</FONT></B></TD>
138<TD><B>FALSE</B></TD>
139    </TR>
140    <TR>
141<TD>FINALROM</TD>
142<TD><B>FALSE</B></TD>
143<TD><B>FALSE</B></TD>
144    </TR>
145    <TR>
146<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development:<BR>ARM9 + ARM7)</TD>
147<TD>DEBUG<BR>RELEASE</TD>
148<TD><B><FONT color="#ff0000">TRUE</FONT></B></TD>
149<TD><B>FALSE</B></TD>
150    </TR>
151    <TR>
152<TD>FINALROM</TD>
153<TD><B>FALSE</B></TD>
154<TD><B>FALSE</B></TD>
155    </TR>
156    <TR>
157<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For general-purpose development: ARM9)<BR> Debugger software<BR> When not connected</TD>
158<TD>DEBUG<BR>RELEASE</TD>
159<TD><B><CODE>FALSE</CODE></B></TD>
160<TD><B><CODE>FALSE</CODE></B></TD>
161    </TR>
162    <TR>
163<TD>FINALROM</TD>
164<TD><B><CODE>FALSE</CODE></B></TD>
165<TD><B><CODE>FALSE</CODE></B></TD>
166    </TR>
167    <TR>
168<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development:<BR>ARM9 + ARM7)<BR> Debugger software<BR> When not connected</TD>
169<TD>DEBUG<BR>RELEASE</TD>
170<TD><B><CODE>FALSE</CODE></B></TD>
171<TD><B><CODE>FALSE</CODE></B></TD>
172    </TR>
173    <TR>
174<TD>FINALROM</TD>
175<TD><B><CODE>FALSE</CODE></B></TD>
176<TD><B><CODE>FALSE</CODE></B></TD>
177    </TR>
178  </TBODY>
179</TABLE>
180<H2>Internal Operation</H2>
181<P>Makes a decision based on the the logical sum of the return value of the <A href="OS_GetConsoleType.html"><CODE>OS_GetConsoleType</CODE></A> function and the <CODE>OS_CONSOLE_ENSATA</CODE> bit.</P>
182<H2>See Also</H2>
183<P><A href="../debug/OS_Printf.html"><CODE>OS_Printf</CODE></A><BR> <A href="OS_IsRunOnDebugger.html"><CODE>OS_IsRunOnDebugger</CODE></A><BR> <A href="OS_GetConsoleType.html"><CODE>OS_GetConsoleType</CODE></A></P>
184<H2>Revision History</H2>
185<P>2009/10/30 Added information about operations when a debugger is not connected.<BR>2008/04/15 Added a table.<BR>2007/11/05 Changed descriptions.<BR>2004/02/19 Initial version.</P>
186<hr><p>CONFIDENTIAL</p></body>
187</HTML>