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.0.0 for Windows" /> 6<meta http-equiv="Content-Style-Type" content="text/css" /> 7<title>CARD_SetCacheFlushFlag</title> 8<link rel="stylesheet" href="../../css/nitro.css" type="text/css" /> 9</head> 10 11<body> 12 13<h1 align="left">CARD_SetCacheFlushFlag<img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 14<H2>Syntax</H2> 15 16<dl> 17 <dd> 18<code>#include <nitro/card.h></code><br /> 19 <br /> 20 <code>void CARD_SetCacheFlushFlag(BOOL icache, BOOL dcache);</code><br /> 21 <br /> 22 </dd> 23</dl> 24<h2>Arguments</h2> 25<table border="1" width="100%"> 26 <tbody> 27 <tr> 28 <td width="13%"><SPAN class="argument">icache</SPAN></td> 29 <td width="87%"><CODE>TRUE</CODE> to enable auto-invalidation of instruction cache.</td> 30 </tr> 31 <tr> 32 <td width="13%"><SPAN class="argument">dcache</SPAN></td> 33 <td width="87%"><CODE>TRUE</CODE> to enable auto-invalidation of data cache.</td> 34 </tr> 35 </tbody> 36</table> 37 38<h2>Return Values</h2> 39<p>None.</p> 40 41<h2>Description</h2> 42<p>Configures whether the invalidation process to flush the cache takes place automatically when a process to load ROM data occurs inside the library.</p> 43<p> 44When ROM data is loaded into memory, if the instruction cache is always invalidated for DMA transfers, the safest cache operation is to invalidate the data cache as well. However, if it is clear that the cache does not need to be considered, performing these operations becomes redundant. This function allows you to enable and disable the cache-invalidation process. 45</p> 46 47<p>When the CARD library loads ROM data into memory, it automatically handles the cache according to the settings configured here.<br /> The default settings are <CODE>icache = FALSE</CODE> and <CODE>dcache = TRUE</CODE>. With these settings, the data cache is invalidated, but the instruction cache is not.<br /> Unless you have a special reason, you do not need to change the default settings.</p> 48 49<p>Because the instruction cache is controlled the same way even in cases where higher-level libraries such as the FS library and the EL library control the execution code, there is no need to worry about data loads by the CARD library.</p> 50 51<p style='color:Red;'> 52As for the data cache, the default setting of <CODE>TRUE</CODE> should not be changed except in extreme situations because it would have a far-reaching impact on all of the higher-level libraries that handle VRAM, DMA, ARM7, and other external memory devices.</p> 53 54<h2>See Also</h2> 55<p><a href="CARD_GetCacheFlushFlag.html"><code>CARD_GetCacheFlushFlag</code></a></p> 56 57<h2>Revision History</h2> 58<p> 592008/12/05 Initial version. 60</p> 61<hr><p>CONFIDENTIAL</p></body> 62</html> 63