libctr9
Nintendo 3DS ARM9 library
ctr_io_implementation.h File Reference
#include "ctr_io_implementation.c"

Go to the source code of this file.

Typedefs

typedef int(* ctr_io_implementation_read_sector_f) (void *io, void *buffer, size_t buffer_size, size_t sector, size_t count)
 Pointer to an io interface function for reading sectors. More...
 
typedef int(* ctr_io_implementation_write_sector_f) (void *io, const void *buffer, size_t buffer_size, size_t sector)
 Pointer to an io interface function for writing to sectors. More...
 

Typedef Documentation

typedef int(* ctr_io_implementation_read_sector_f) (void *io, void *buffer, size_t buffer_size, size_t sector, size_t count)

Pointer to an io interface function for reading sectors.

Parameters
[out]bufferPointer to the buffer.
[in]buffer_sizeThe size of the buffer in bytes.
[in]sectorSector position in the io interface to read from.
[in]countThe number of sectors to read.
[in]readPointer to sdmmc function to read sectors.
Returns
0 upon success, anything else means an error.
typedef int(* ctr_io_implementation_write_sector_f) (void *io, const void *buffer, size_t buffer_size, size_t sector)

Pointer to an io interface function for writing to sectors.

Parameters
[in]bufferPointer to the buffer.
[in]buffer_sizeThe size of the buffer, and the number of bytes to write. If the number is not a multiple of the sector size, this function will only write all the full sectors it can, ignoring the end of the buffer that doesn't fit a sector.
[in]sectorSector Position in the io interface to write to.
[in]writePointer to sdmmc function to write sectors.
Returns
0 upon success, anything else means an error.