libctr9
Nintendo 3DS ARM9 library
ctr_io_implementation.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_IO_IMPLEMENTATION_H_
12 #define CTR_IO_IMPLEMENTATION_H_
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
28 typedef int (*ctr_io_implementation_read_sector_f)(void *io, void *buffer, size_t buffer_size, size_t sector, size_t count);
29 
43 typedef int (*ctr_io_implementation_write_sector_f)(void *io, const void *buffer, size_t buffer_size, size_t sector);
44 
56 static inline int ctr_io_implementation_read(void *io, void *buffer, size_t buffer_size, uint64_t position, size_t count, ctr_io_implementation_read_sector_f read);
57 
70 static inline int ctr_io_implementation_write(void *io, const void *buffer, size_t buffer_size, uint64_t position, ctr_io_implementation_read_sector_f read, ctr_io_implementation_write_sector_f write);
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #include "ctr_io_implementation.c"
77 
78 #endif//CTR_IO_IMPLEMENTATION_H_
79 
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.
Definition: ctr_io_implementation.h:43
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.
Definition: ctr_io_implementation.h:28