libctr9
Nintendo 3DS ARM9 library
ctr_fatfs_disk.h File Reference
#include <ctr9/io/fatfs/diskio.h>
#include <ctr9/io/ctr_io_interface.h>
#include <ctr9/io/ctr_nand_crypto_interface.h>
#include <ctr9/io/ctr_sd_interface.h>

Go to the source code of this file.

Data Structures

struct  ctr_fatfs_disk
 Structure holding information used by the fatfs implementation for keeping track of which io interfaces are used for which partition access. More...
 

Functions

void ctr_fatfs_default_setup (ctr_nand_crypto_interface *ctr_io, ctr_nand_crypto_interface *twl_io, ctr_sd_interface *sd_io)
 Convenience function to initialize the fatfs system with the io interfaces required to mount CTRNAND, TWLN, TWLP, and SD. More...
 
void ctr_fatfs_disk_initialize (ctr_fatfs_disk *disk, void *io, size_t sector_offset, size_t sectors)
 Initializes the ctr_fatfs_disk structure. More...
 
void ctr_fatfs_disk_destroy (ctr_fatfs_disk *disk)
 Destroys/clears the ctr_fatfs_disk structure.
 

Function Documentation

void ctr_fatfs_default_setup ( ctr_nand_crypto_interface ctr_io,
ctr_nand_crypto_interface twl_io,
ctr_sd_interface sd_io 
)

Convenience function to initialize the fatfs system with the io interfaces required to mount CTRNAND, TWLN, TWLP, and SD.

Parameters
[in,out]ctr_ioA pointer to an initialized CTRNAND io layer.
[in,out]twl_ioA pointer to an initialized TWL io layer.
[in,out]sd_ioA pointer to an initialized SD io layer.
Postcondition
The underlying structures in fatfs have been updated (using the custom CTR_SETUP_DISK ioctl) to be able to mount CTRNAND, TWLN, TWLP, and SD.
void ctr_fatfs_disk_initialize ( ctr_fatfs_disk disk,
void *  io,
size_t  sector_offset,
size_t  sectors 
)

Initializes the ctr_fatfs_disk structure.

Parameters
[in]diskPointer to structure to initialize.
[in,out]ioPointer to ctr_io_interface to use for the disk being initialized.
[in]sector_offsetOffset in sectors from the beginning of the given io interface to use as the beginning of the fatfs drive (beginning of FAT partition or MBR with FAT partition)
sectorsSize in sectors of the FATFS disk/partition.