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 http-equiv="Content-Style-Type" content="text/css">
7
8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
9
10<!-- �^�C�g���� -->
11<TITLE>SCFlush*</TITLE>
12
13</HEAD>
14
15<BODY>
16
17
18<!-- �^�C�g���� -->
19<H1>SCFlush*</H1>
20
21
22
23<H2>C Specification</H2>
24<pre><code>#include &lt;revolution/sc.h&gt;
25
26typedef void (*SCFlushCallback)(u32 <em>result</em>);
27
28u32  SCFlush(void);
29void SCFlushAsync(SCFlushCallback <em>callback</em>);
30</code></pre>
31
32
33<H2>Arguments</H2>
34<p>There are no arguments for <code>SCFlush()</code>.</p>
35<p>The arguments for <code>SCFlushAsync()</code> are shown below. </p>
36<TABLE border="1" cellpadding="3" cellspacing="0.1">
37  <TBODY>
38    <TR>
39<TD width="30%" bgcolor="#ffffe8"><em><strong><code>callback</code></strong></em></TD>
40<TD width="*">Callback function called when processing ends. No callback function is called if <code>NULL</code> is specified. </TD>
41    </TR>
42  </TBODY>
43</TABLE>
44
45<H2>Return Values</H2>
46<P>One of the <code>SC_STATUS_*</code> values is returned for <code>SCFlush()</code>.</P>
47
48<p>There are no return values for <code>SCFlushAsync()</code>.</p>
49
50<H2>Description</H2>
51<p>
52Console settings maintained in RAM are reflected in internal flash memory. After console settings change, be sure to call <code>SCFlush()</code> or <code>SCFlushAsync()</code>.
53</p>
54
55<p>
56<code>SCFlush()</code> does not return until processing to reflect settings has completed. Therefore, do not call <code>SCFlush()</code> from the interrupt handler or a callback.
57</p>
58
59<p>
60<code>SCFlushAsync()</code> executes processing to reflect settings in the background. The callback function specified by the argument <em><strong><code>callback</code></strong></em> is called whether <code>SCFlushAsync()</code> succeeds or fails. No callback function is called if <code>NULL</code> is specified.
61</p>
62
63<p>
64Flash memory is not accessed if there are no changes to console settings maintained in RAM.
65</p>
66
67<p>
68When more than one setting is changed in the same cycle, you only need to <code>SCFlush*()</code>  once at the end.
69</p>
70
71<p>
72The return value of <code>SCFlush()</code> has the same meaning as the argument <em><strong><code>result</code></strong></em> of the <code>SCFlushAsync()</code> callback function, as follows.
73</p>
74
75<TABLE border="1" cellpadding="3" cellspacing="0.1">
76  <TBODY>
77    <TR>
78<TD width="30%" valign="middle" bgcolor="#C0C0C0">Return Values and Arguments</TD>
79<TD width="*" valign="middle" bgcolor="#C0C0C0">Results</TD>
80    </TR>
81    <TR>
82<TD width="30%"><code>SC_STATUS_OK</code></TD>
83<TD width="*"  >Processing succeeded.</TD>
84    </TR>
85    <TR>
86<TD width="30%"><code>SC_STATUS_ERROR</code></TD>
87<TD width="*"  >Processing failed.</TD>
88    </TR>
89  </TBODY>
90</TABLE>
91
92<p>
93The return value of <a href="SCCheckStatus.html"><code>SCCheckStatus()</code></a> is updated regardless of which function was called.
94</p>
95
96<H2>See Also</H2>
97<p>
98<a href="SCCheckStatus.html"><code>SCCheckStatus</code></a><br>
99</p>
100
101<H2>Revision History</H2>
102<P>05/29/2006 Initial version.</P>
103
104</BODY>
105</HTML>
106