CARD_LockRom

C Specification

#include <nitro/card.h>

void CARD_LockRom(u16 lock_id);

Arguments

lock_id The ID that is used for locking a card. This ID is obtained by the OS_GetLockID function.

Return Values

None

Description

This function locks the access bus to a CARD ROM device. If another module (with another ID) has already locked the bus, CARD_LockRom 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.

Caution

All functions that access a CARD ROM device must first lock the access bus.
You cannot access a CARD ROM device and a backup device simultaneously.
While one bus is locked, other bus locks are forced to wait.

See Also

OS_GetLockID, OS_LockCard, OS_LockCartridge, CARD_UnlockRom, CARD_ReadRom, CARD_ReadRomAsync

Revision History

09/06/2004 Corrected the description of the prototype
08/31/2004 Added description that indicates that this function will always succeed.
07/23/2004 Changed lock ID type from u32 to u16.
07/10/2004 Added description concerning bus lock and exclusive control of access with backup device.
07/05/2004 Initial Version