# CARD_LockRom

## Syntax

  `#include <nitro/card.h>`
  `void CARD_LockRom(u16 lock_id);`

## Arguments

lock_id | ID used to lock the card. This is obtained with 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.

## Note

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

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

CONFIDENTIAL