# FS_SetDefaultDMA

## Syntax

  `#include <nitro/fs.h>`
  `u32 FS_SetDefaultDMA( u32 dma_no );`

## Arguments

dma_no | The DMA channel used by the ROM archive inside the file system. Settings can be used as an argument to the `CARD_ReadRomAsync` function, which is called by the FS library. When a valid DMA channel is specified, this DMA channel cannot be used until the setting is changed with the `FS_SetDefaultDMA` function.The card access transfer source is an I/O register, so DMA channel 0 cannot be specified.

## Return Values

It returns the DMA channel that was previously set.

## Description

Specifies the DMA channel used for Data Access by the ROM Archive within the file system.
If you specify `FS_DMA_NOT_USE` instead of DMA, it uses the CPU to transfer.
For more information on internal operations when allocating a DMA channel to the `ROM archive`, refer to the description for the `CARD_ReadRomAsync` function.

## Note

When a valid DMA channel is specified, this DMA channel cannot be used until the setting is changed with the `FS_SetDefaultDMA` function.
Also, if the ROM Archive is being accessed when the configuration is changed, the change is not effective until that file's operation is complete.
The FS library uses this DMA channel to access the ROM file system on the card. Refer to the description on the `CARD_ReadRom` function and `CARD_ReadRomAsync` functions.

## See Also

`FS_DMA_NOT_USE
CARD_ReadRom
CARD_ReadRomAsync`

## Revision History

2008/01/24 Made slight revisions to the description of DMA channels.
2005/09/17 Added a note about applying changes to DMA channel settings.
2005/08/28 Added a link to `CARD_ReadRomAsync()` under Description.
2005/04/28 Added the fact that DMA Channel 0 cannot be specified.
2004/07/23 Added a note about the ROM archives and DMA channels.
2004/05/14 Added a description of FS_DMA_NOT_USE.
2004/04/08 Initial version.

CONFIDENTIAL