# FS_SetDefaultDMA

## C Specification

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

## Arguments

dma_no

The DMA number that the ROM Archive in the file system uses.
If you specify `FS_DMA_NOT_USE`, instead of DMA, it uses the CPU to transfer.
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 IO 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.

## Caution

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 file system uses this DMA channel internally to access the NITRO ROM device. Refer to the description of the `CARD_ReadRom` and `CARD_ReadRomAsync` functions.

## See Also

`FS_DMA_NOT_USE`, `CARD_ReadRom`, `CARD_ReadRomAsync`

## Revision History

09/17/2005 Added note about response to changes in the DMA Channel configuration
08/28/2005 Added a link to the CARD_ReadRomAsync function to the explanation
04/28/2005 Noted that DMA Channel 0 cannot be specified
07/23/2004 Added notes regarding the ROM Archive and DMA Channel
05/14/2004 Added description of FS_DMA_NOT_USE
04/08/2004 Initial Version