11 #ifndef CTR_NAND_INTERFACE_H_ 12 #define CTR_NAND_INTERFACE_H_ 15 #include "sdmmc/sdmmc.h" 118 #endif//CTR_NAND_INTERFACE_H_ void ctr_nand_interface_destroy(ctr_nand_interface *io)
Destroys the given NAND io interface object.
io interface object for accessing NAND.
Definition: ctr_nand_interface.h:23
int ctr_nand_interface_read_sector(void *io, void *buffer, size_t buffer_size, size_t sector, size_t count)
Reads sectors from the given io interface.
int ctr_nand_interface_write(void *io, const void *buffer, size_t buffer_size, uint64_t position)
Writes bytes to the given io interface.
uint64_t ctr_nand_interface_disk_size(void *io)
Returns the size of the underlying disk for the given io interface.
size_t ctr_nand_interface_sector_size(void *io)
Returns the size of the sectors used by the io interface, which is 512 bytes for NAND.
Virtual table for io interface dispatching.
Definition: ctr_io_interface.h:89
int ctr_nand_interface_read(void *io, void *buffer, size_t buffer_size, uint64_t position, size_t count)
Reads bytes from the given io interface.
int ctr_nand_interface_initialize(ctr_nand_interface *io)
Initialize the given NAND io interface object.
int ctr_nand_interface_write_sector(void *io, const void *buffer, size_t buffer_size, size_t sector)
Writes sectors from the given io interface.