# FS_Init

## Syntax

  `#include <nitro/fs.h>`
  `void FS_Init( u32 default_dma_no );`

## Arguments

default_dma_no | This is 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

None.

## Description

This function initializes the ROM file system. The following processes are performed.

- Initializes the CARD library by calling the `CARD_Init` function.
- Sets the current directory to ROM archive root ("`rom:/`").
- Initializes the DMA channel that the ROM archive uses.

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 with this function, this DMA channel cannot be used until the setting is changed with the `FS_SetDefaultDMA` function. 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
FS_IsAvailable
FS_SetDefaultDMA
CARD_ReadRom
CARD_ReadRomAsync`

## Revision History

2008/01/24 Made slight revisions to the description of the DMA channel
2005/08/28 Added a link to the `CARD_ReadRomAsync` function under Description.
2005/04/28 Added the fact that DMA Channel 0 cannot be specified.
2005/04/11 Added a description of the fact that `CARD_Init()` is called.
2004/09/24 Revised links.
2004/07/23 Added a note about the ROM archive and DMA channel.
2004/05/14 Added a description of `FS_DMA_NOT_USE`.
2004/04/13 Added a link to the `FS_IsAvailable` function.
2004/04/08 Revised descriptions in line with the addition of the DMA number specification.
2004/04/02 Changed "file system" to "ROM file system".
2004/04/01 Initial version.

CONFIDENTIAL