1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_*ToH*</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_*ToH* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/mi.h></CODE><BR> <BR> <CODE>#define MI_LEToH8(val) (val)<br> #define MI_BEToH8(val) MI_SwapEndian8(val)<br> #define MI_LEToH16(val) (val)<br> #define MI_BEToH16(val) MI_SwapEndian16(val)<br> #define MI_LEToH32(val) (val)<br> #define MI_BEToH32(val) MI_SwapEndian32(val)<br> #define MI_LEToH64(val) (val)<br> #define MI_BEToH64(val) MI_SwapEndian64(val)<br></CODE><br> 20 </dd> 21</dl> 22<h2>Arguments</h2> 23<TABLE border="1" width="100%"> 24 <TBODY> 25 <TR> 26<TD width="13%"><EM><STRONG>val</STRONG></EM></TD> 27<TD width="87%">The value whose endianity is to be converted.<BR><B>Note: </B>Because this is a macro, evaluation is performed several times.</TD> 28 </TR> 29 </TBODY> 30</TABLE> 31 32<h2>Return Values</h2> 33<p>The value converted from the specified endianness (<CODE>u16, u32, or u64</CODE>).</p> 34 35<H2>Description</H2> 36<P>This macro converts the specified value from the specified endianity to the current environment. LE represents little-endian, while BE represents big-endian.<br>Because the Nintendo DS uses a little-endian environment, this macro does nothing when LE is specified.<br><br><B>Note:</B> Because this is a macro, arguments are evaluated several times.</P> 37<p>These 8-bit versions do not actually perform any conversions, but they have been included for uniform source code visibility.</p> 38<H2>See Also</H2> 39<P><CODE><A href="MI_SwapEndian.html">MI_SwapEndian*</A><BR> <A href="MI_Load.html">MI_Load*</A><BR> <A href="MI_Store.html">MI_Store*</A><BR> <A href="MI_HTo.html">MI_HTo*</A></CODE></P> 40<H2>Revision History</H2> 41<P> 422007/11/21 Added a description about the 64-bit version.<br>2006/04/05 Initial version.<br> 43</P> 44<hr><p>CONFIDENTIAL</p></body> 45</html> 46