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>CTRDG_EraseAgbFlashSector</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">CTRDG_EraseAgbFlashSector <IMG src="../image/NTR.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/ctrdg.h&gt;</CODE></PRE>
16  <PRE><CODE>u16 CTRDG_EraseAgbFlashSector(u16 sec_num);
17  </CODE></PRE>
18Corresponding AGB function: <A href="coordinate.html"><CODE>u16 (*EraseFlashSector)(u16 secNo)</CODE></A>
19</DL>
20<H2>Arguments</H2>
21<TABLE border="1">
22  <TBODY>
23    <TR>
24<TD><SPAN class="argument">sec_num</SPAN></TD>
25<TD>Target flash sector number</TD>
26    </TR>
27  </TBODY>
28</TABLE>
29<H2>Return Values</H2>
30<P>Returns zero if the erasure succeeds. Returns a non-zero value if it fails.</P>
31<H2>Description</H2>
32<P>Erases the data in the sector with the specified target sector number. Normally, this routine does not need to be called before writing because it is called inside the writing routine. This function returns an error if the target sector number is out of range.</P>
33<P>The access cycle setting does not need to be set in advance because it is created inside the function. In addition, the <A href="../os/time/OS_InitTick.html"><CODE>OS_InitTick</CODE></A> function must be called in advance because clock ticks are used by this function to measure timeouts.</P>
34<P><B>Note:</B> All interrupts are disabled inside this function, and the cartridge bus is locked for a set period. In particular, when this function is called, do not use DMA that starts automatically during direct sound and V/H blank synchronization, display synchronization, cartridge request, and so on.</P>
35<P>Note that the AGB backup device cannot be accessed normally with IS-NITRO-DEBUGGER version 1.66 or earlier.</P>
36<H2>See Also</H2>
37<P><A href="CTRDG_EraseAgbFlashChip.html"><CODE>CTRDG_EraseAgbFlashChip</CODE></A><BR> <A href="CTRDG_EraseAgbFlashChipAsync.html"><CODE>CTRDG_EraseAgbFlashChipAsync</CODE></A><BR> <A href="CTRDG_EraseAgbFlashSectorAsync.html"><CODE>CTRDG_EraseAgbFlashSectorAsync</CODE></A></P>
38<H2>Revision History</H2>
39<P>2006/05/25 Added a description that the AGB backup device cannot be accessed normally with IS-NITRO-DEBUGGER version 1.66 or earlier.<BR> 2006/04/07 Initial version.</P>
40<hr><p>CONFIDENTIAL</p></body>
41</HTML>
42