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>CARD_LockRom</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">CARD_LockRom <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/card.h></CODE><BR> 20 <BR> 21 <CODE>void CARD_LockRom(u16 lock_id);</CODE><br> 22 <br> 23 </dd> 24</dl> 25<h2>Arguments</h2> 26<TABLE border="1" width="100%"> 27 <TBODY> 28 <TR> 29 <TD width="13%"><EM><STRONG>lock_id</STRONG></EM></TD> 30 <TD width="87%">ID used to lock the card.<BR> 31 This is obtained with the <CODE>OS_GetLockID</CODE> function.</TD> 32 </TR> 33 </TBODY> 34</TABLE> 35 36<h2>Return Values</h2> 37<p>None.</p> 38 39<H2>Description</H2> 40<P>This function locks the access bus to a CARD ROM device. If another module (with another ID) has already locked the bus, <code>CARD_LockRom</code> waits until the bus returns to an unlocked state before it executes The function will return control after locking the card. When this function executes, it checks the ROM device at run-time, then automatically selects and locks the access bus to the game card or game pak. <BR> <BR> 41</P> 42<H2>Note</H2> 43<P> 44<FONT color="#800000">All functions that access a CARD ROM device must first lock the access bus.<BR> You cannot access a CARD ROM device and a backup device simultaneously.<BR> While one bus is locked, other bus locks are forced to wait.<BR></FONT> 45</P> 46<h2>See Also</h2> 47<p><CODE><A href="../../os/spinLock/OS_GetLockID.html">OS_GetLockID</A>, <A href="../../os/spinLock/OS_LockCard.html">OS_LockCard</A>, <A href="../../os/spinLock/OS_LockCartridge.html">OS_LockCartridge</A>, <A href="CARD_UnlockRom.html">CARD_UnlockRom</A>, <A href="CARD_ReadRom.html">CARD_ReadRom</A>, <A href="CARD_ReadRomAsync.html">CARD_ReadRomAsync</A></CODE></p> 48 49<H2>Revision History</H2> 50<P> 512004/09/06 Corrected the description of the prototype<br> 2004/08/31 Added description that indicates that this function will always succeed.<br> 2004/07/23 Changed lock ID type from <code>u32</code> to <code>u16</code>.<br> 2004/07/10 Added description concerning bus lock and exclusive control of access with backup device.<br> 2004/07/05 Initial Version 52</P> 53<hr><p>CONFIDENTIAL</p></body> 54</html> 55