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>OS_UnlockCartridge</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_UnlockCartridge <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/os.h&gt;</CODE></PRE>
16  <PRE><CODE>s32 OS_UnlockCartridge( u16 lockID );
17 </CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<TABLE border="1" width="100%">
21  <TBODY>
22    <TR>
23      <TD width="13%"><EM><STRONG>lockID</STRONG></EM></TD>
24      <TD width="87%">ID used to lock a cartridge.</TD>
25    </TR>
26  </TBODY>
27</TABLE>
28<H2>Return Values</H2>
29<P><code>OS_UNLOCK_SUCCESS</code> indicates that the lock was successfully released. (Defined as <code>0</code>.) <code>OS_UNLOCK_ERROR</code> indicates that there was a lock release error. (Defined as a negative number.)</P>
30<H2>Description</H2>
31<P>Releases a lock and passes shared resource access rights to the ARM7 processor</P>
32<P>When the unlock succeeds, it accesses the <code>EXMEMCNT</code> register and obtains access rights to the card bus.</P>
33<P>When executed on an unlocked module (when trying to release with an ID different from the one that is currently locked), the lock will not be released. It will return an <code>OS_UNLOCK_ERROR</code>.</P>
34<H2>Internal Operation</H2>
35<P>Accesses the <code>EXMEMCNT</code> I/O register <code>(0x4000204)</code>.</P>
36<H2>See Also</H2>
37<P><code><a href="OS_LockCartridge.html">OS_LockCartridge</a>, <a href="OS_TryLockCartridge.html">OS_TryLockCartridge</a>, <a href="OS_UnlockCard.html">OS_UnlockCard</a>, <a href="OS_GetLockID.html">OS_GetLockID</a></code></P>
38<H2>Revision History</H2>
39<P>2004/11/04 Added Internal Operation description. <BR>2004/07/23 <code>OS_UnLockCard</code> changed to <code>OS_UnlockCard</code> <BR>2004/07/22 Argument format changed from u32 to u16. <BR>2004/06/21 Initial version </P>
40<hr><p>CONFIDENTIAL</p></body>
41</HTML>