libctr9
Nintendo 3DS ARM9 library
ctr_fatfs_disk.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2016 Gabriel Marcano
3  *
4  * Refer to the COPYING.txt file at the top of the project directory. If that is
5  * missing, this file is licensed under the GPL version 2.0 or later.
6  *
7  ******************************************************************************/
8 
11 #ifndef CTR_FATFS_DISK_H_
12 #define CTR_FATFS_DISK_H_
13 
14 #include <ctr9/io/fatfs/diskio.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
27 typedef struct
28 {
29  ctr_io_interface *io; //IO interface to use as disk
30  size_t sector_offset; //Offset to the desired fatfs partition start
31  size_t sectors; //Disk size in sectors
32  DSTATUS status; //Status of disk
33 
35 
47 
58 void ctr_fatfs_disk_initialize(ctr_fatfs_disk *disk, void *io, size_t sector_offset, size_t sectors);
59 
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif//CTR_FATFS_DISK_H_
69 
io interface object for accessing the SD card.
Definition: ctr_sd_interface.h:23
void ctr_fatfs_disk_initialize(ctr_fatfs_disk *disk, void *io, size_t sector_offset, size_t sectors)
Initializes the ctr_fatfs_disk structure.
Structure holding information used by the fatfs implementation for keeping track of which io interfac...
Definition: ctr_fatfs_disk.h:27
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...
void ctr_fatfs_disk_destroy(ctr_fatfs_disk *disk)
Destroys/clears the ctr_fatfs_disk structure.
Filter io interface to apply encryption while reading NAND.
Definition: ctr_nand_crypto_interface.h:30
Virtual table for io interface dispatching.
Definition: ctr_io_interface.h:89