| 1 | #ifndef _3DS_UTILS_H |
| 2 | #define _3DS_UTILS_H |
| 3 | |
| 4 | #ifndef USE_CTRULIB_2 |
| 5 | #error CTRULIB_2 is required |
| 6 | #endif |
| 7 | |
| 8 | #define MEMOP_PROT 6 |
| 9 | #define MEMOP_MAP 4 |
| 10 | #define MEMOP_UNMAP 5 |
| 11 | |
| 12 | #define DEBUG_HOLD() do{printf("%s@%s:%d.\n",__FUNCTION__, __FILE__, __LINE__);fflush(stdout);wait_for_input();}while(0) |
| 13 | |
| 14 | void wait_for_input(void); |
| 15 | void ctr_clear_cache(void); |
| 16 | void ctr_clear_cache_range(void *start, void *end); |
| 17 | void ctr_invalidate_icache(void); // only icache |
| 18 | |
| 19 | extern __attribute__((weak)) int __ctr_svchax; |
| 20 | |
| 21 | #endif // _3DS_UTILS_H |