diff --git a/include/arm11/config.h b/include/arm11/config.h index 7584a03..13b6581 100644 --- a/include/arm11/config.h +++ b/include/arm11/config.h @@ -20,6 +20,7 @@ #include "fs.h" + enum Keys { KBootOption1 = 0, KBootOption2, @@ -61,9 +62,17 @@ BootModeQuiet }; + #define numKeys KLast #define CONFIG_MAX_BOOTSLOTS 9 + + +#ifdef __cplusplus +extern "C" +{ +#endif + bool loadConfigFile(); bool configIsLoaded(); bool configHasChanged(); @@ -77,3 +86,7 @@ void configRestoreDefaults(); bool configDeleteKey(int key); bool configDevModeEnabled(); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/debug.h b/include/arm11/debug.h index f5c7f70..efc3af8 100644 --- a/include/arm11/debug.h +++ b/include/arm11/debug.h @@ -22,11 +22,20 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void debugHashCodeRoData(); noreturn void panic(); noreturn void panicMsg(const char *msg); void debugMemdump(const char *filepath, void *mem, size_t size); +#ifdef __cplusplus +} +#endif + // Exception tests /*static inline regTest(void) { diff --git a/include/arm11/firm.h b/include/arm11/firm.h index ca4aed8..7675f94 100644 --- a/include/arm11/firm.h +++ b/include/arm11/firm.h @@ -22,5 +22,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + s32 loadVerifyFirm(const char *const path, bool skipHashCheck); noreturn void firmLaunch(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/fmt.h b/include/arm11/fmt.h index bc34a6e..827d46b 100644 --- a/include/arm11/fmt.h +++ b/include/arm11/fmt.h @@ -31,9 +31,18 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + u32 ee_vsnprintf(char *const buf, u32 size, const char *const fmt, va_list arg); u32 ee_vsprintf(char *const buf, const char *const fmt, va_list arg); __attribute__ ((format (printf, 2, 3))) u32 ee_sprintf(char *const buf, const char *const fmt, ...); __attribute__ ((format (printf, 3, 4))) u32 ee_snprintf(char *const buf, u32 size, const char *const fmt, ...); __attribute__ ((format (printf, 1, 2))) u32 ee_printf(const char *const fmt, ...); u32 ee_puts(const char *const str); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/hardware/cpu.h b/include/arm11/hardware/cpu.h index 85a7005..fdec5fc 100644 --- a/include/arm11/hardware/cpu.h +++ b/include/arm11/hardware/cpu.h @@ -22,5 +22,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void CPU_setClock(u16 clk); void CPU_poweroffCore23(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/hardware/gpio.h b/include/arm11/hardware/gpio.h index 538365f..90d4b84 100644 --- a/include/arm11/hardware/gpio.h +++ b/include/arm11/hardware/gpio.h @@ -22,6 +22,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + /** * @brief Sets a bit in the specified GPIO register. * @@ -37,3 +42,7 @@ * @param[in] bitNum The bit number. */ void GPIO_clearBit(u16 reg, u8 bitNum); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/hardware/hid.h b/include/arm11/hardware/hid.h index 8cffbd8..50ac2fe 100644 --- a/include/arm11/hardware/hid.h +++ b/include/arm11/hardware/hid.h @@ -51,6 +51,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void hidInit(void); u32 hidGetPowerButton(bool resetState); u32 hidGetWifiButton(bool resetState); @@ -59,3 +64,7 @@ u32 hidKeysHeld(void); u32 hidKeysDown(void); u32 hidKeysUp(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/hardware/i2c.h b/include/arm11/hardware/i2c.h index dd7472a..8aa5d01 100644 --- a/include/arm11/hardware/i2c.h +++ b/include/arm11/hardware/i2c.h @@ -50,6 +50,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + /** * @brief Initializes the I2C buses. Call this only once. */ @@ -100,6 +105,10 @@ */ bool I2C_writeReg(I2cDevice devId, u8 regAddr, u8 data); +#ifdef __cplusplus +} +#endif + static inline u8 i2cmcu_readreg_hid_irq(void) { diff --git a/include/arm11/hardware/interrupt.h b/include/arm11/hardware/interrupt.h index 4569ba3..f0374b1 100644 --- a/include/arm11/hardware/interrupt.h +++ b/include/arm11/hardware/interrupt.h @@ -106,6 +106,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + /** * @brief Initializes the generic interrupt controller. */ @@ -159,6 +164,10 @@ */ void IRQ_softwareInterrupt(Interrupt id, u8 cpuMask); +#ifdef __cplusplus +} +#endif + static inline u32 enterCriticalSection(void) { diff --git a/include/arm11/hardware/mcu.h b/include/arm11/hardware/mcu.h index d4dde5b..fd0d2f0 100644 --- a/include/arm11/hardware/mcu.h +++ b/include/arm11/hardware/mcu.h @@ -22,6 +22,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void MCU_init(void); void MCU_disableLEDs(void); void MCU_powerOnLCDs(void); @@ -32,3 +37,7 @@ bool MCU_readBatteryChargeState(void); u8 MCU_readSystemModel(void); void MCU_readRTC(void *rtc); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/hardware/timer.h b/include/arm11/hardware/timer.h index f850726..bc0f196 100644 --- a/include/arm11/hardware/timer.h +++ b/include/arm11/hardware/timer.h @@ -33,6 +33,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + /** * @brief Resets/initializes the timer hardware. Should not be called manually. */ @@ -71,6 +76,11 @@ */ void TIMER_sleepTicks(u32 ticks); +#ifdef __cplusplus +} +#endif + + // Sleeps ms milliseconds. ms can be up to 32000. static inline void TIMER_sleepMs(u32 ms) { diff --git a/include/arm11/lz11.h b/include/arm11/lz11.h index 095a623..8ab8c03 100644 --- a/include/arm11/lz11.h +++ b/include/arm11/lz11.h @@ -22,4 +22,13 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void lz11Decompress(const void *in, void *out, u32 size); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/battery.h b/include/arm11/menu/battery.h index ddb915f..ea0809a 100644 --- a/include/arm11/menu/battery.h +++ b/include/arm11/menu/battery.h @@ -29,4 +29,15 @@ bool charging; ///< True if charging. } BatteryState; + + +#ifdef __cplusplus +extern "C" +{ +#endif + void getBatteryState(BatteryState *battery); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/bootinfo.h b/include/arm11/menu/bootinfo.h index 61984c4..3833763 100644 --- a/include/arm11/menu/bootinfo.h +++ b/include/arm11/menu/bootinfo.h @@ -27,4 +27,15 @@ u8 mountState; } bootInfo; + + +#ifdef __cplusplus +extern "C" +{ +#endif + void getBootInfo(bootInfo* info); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/bootslot.h b/include/arm11/menu/bootslot.h index a59f3bb..54b8046 100644 --- a/include/arm11/menu/bootslot.h +++ b/include/arm11/menu/bootslot.h @@ -20,8 +20,19 @@ #include "types.h" + #define N_BOOTSLOTS 6 #define INVALID_BOOT_SLOT 0xFF + +#ifdef __cplusplus +extern "C" +{ +#endif + u8 readStoredBootslot(void); bool storeBootslot(u8 slot); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/menu.h b/include/arm11/menu/menu.h index 4a44c66..2456fa9 100644 --- a/include/arm11/menu/menu.h +++ b/include/arm11/menu/menu.h @@ -49,6 +49,7 @@ #define MENU_GET_FLAGSLOT(x,flags) for (x = N_BOOTSLOTS; (x > 0) && !((flags >> x) & 0x1); x--) + /** * @brief Menu entry description struct, used by MenuInfo. */ @@ -70,4 +71,15 @@ MenuEntry entries[MENU_MAX_ENTRIES]; ///< An array of menu entries. } MenuInfo; + + +#ifdef __cplusplus +extern "C" +{ +#endif + u32 menuProcess(PrintConsole* menu_con, PrintConsole* desc_con, MenuInfo* info); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/menu_fsel.h b/include/arm11/menu/menu_fsel.h index 910cc9f..f324480 100644 --- a/include/arm11/menu/menu_fsel.h +++ b/include/arm11/menu/menu_fsel.h @@ -21,9 +21,21 @@ #include "types.h" #include "arm11/console.h" + #define BRWS_MAX_ENTRIES 13 #define BRWS_OFFSET_TITLE 3 #define BRWS_OFFSET_BUTTONS 19 #define BRWS_WIDTH 40 + + +#ifdef __cplusplus +extern "C" +{ +#endif + bool menuFileSelector(char* res_path, PrintConsole* menu_con, const char* start, const char* pattern, bool allow_root, bool select_dirs); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/menu_func.h b/include/arm11/menu/menu_func.h index 8d6e6e4..34abf93 100644 --- a/include/arm11/menu/menu_func.h +++ b/include/arm11/menu/menu_func.h @@ -29,6 +29,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + u32 menuPresetNandTools(void); u32 menuPresetBootMenu(void); u32 menuPresetBootConfig(void); @@ -60,3 +65,7 @@ u32 menuDummyFunc(PrintConsole* term_con, PrintConsole* menu_con, u32 param); u32 debugSettingsView(PrintConsole* term_con, PrintConsole* menu_con, u32 param); u32 debugEscapeTest(PrintConsole* term_con, PrintConsole* menu_con, u32 param); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/menu_util.h b/include/arm11/menu/menu_util.h index 0964b74..8ebdb2e 100644 --- a/include/arm11/menu/menu_util.h +++ b/include/arm11/menu/menu_util.h @@ -1,3 +1,5 @@ +#pragma once + /* * This file is part of fastboot 3DS * Copyright (C) 2017 derrek, profi200, d0k3 @@ -19,6 +21,12 @@ #include "types.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + char* mallocpyString(const char* str); void truncateString(char* dest, const char* orig, int nsize, int tpos); void formatBytes(char* str, u64 bytes); @@ -41,3 +49,7 @@ void outputEndWait(void); bool userCancelHandler(bool cancelAllowed); void sleepmode(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/menu/splash.h b/include/arm11/menu/splash.h index 25fcc8a..401f3df 100644 --- a/include/arm11/menu/splash.h +++ b/include/arm11/menu/splash.h @@ -24,7 +24,6 @@ #define CSPLASH_NAME_TOP "splash" #define CSPLASH_NAME_SUB "splashbottom" - #define FLAG_ROTATED (1u<<3) #define FLAG_COMPRESSED (1u<<4) #define FLAG_SWAPPED (1u<<5) @@ -48,5 +47,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void getSplashDimensions(const void *const data, u32 *const width, u32 *const height); bool drawSplashscreen(const void *const data, s32 startX, s32 startY, u8 screen); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/power.h b/include/arm11/power.h index c01b56b..ac8954b 100644 --- a/include/arm11/power.h +++ b/include/arm11/power.h @@ -20,5 +20,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + noreturn void power_off(void); noreturn void power_reboot(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm11/start.h b/include/arm11/start.h index 92a9a9f..606c496 100644 --- a/include/arm11/start.h +++ b/include/arm11/start.h @@ -22,6 +22,15 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void _start(void); void clearMem(u32 *adr, u32 size); void deinitCpu(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/debug.h b/include/arm9/debug.h index b8fde2c..617015a 100644 --- a/include/arm9/debug.h +++ b/include/arm9/debug.h @@ -22,7 +22,16 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void debugHashCodeRoData(); noreturn void panic(); noreturn void panicMsg(const char *msg); void dumpMem(u8 *mem, u32 size, char *filepath); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/firm.h b/include/arm9/firm.h index 141cbfd..c405b10 100644 --- a/include/arm9/firm.h +++ b/include/arm9/firm.h @@ -47,6 +47,15 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + bool firm_size(size_t *size); s32 loadVerifyFirm(const char *const path, bool skipHashCheck, bool installMode); noreturn void firmLaunch(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/hardware/crypto.h b/include/arm9/hardware/crypto.h index 704fa58..6d158e5 100644 --- a/include/arm9/hardware/crypto.h +++ b/include/arm9/hardware/crypto.h @@ -22,6 +22,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + ////////////////////////////////// // AES // ////////////////////////////////// @@ -322,3 +327,7 @@ * @return Returns true if the signature is valid, false otherwise. */ bool RSA_verify2048(const u32 *const encSig, const u32 *const data, u32 size); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/hardware/hid.h b/include/arm9/hardware/hid.h index e107224..32c5b5b 100644 --- a/include/arm9/hardware/hid.h +++ b/include/arm9/hardware/hid.h @@ -28,7 +28,16 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void hidScanInput(void); u32 hidKeysHeld(void); u32 hidKeysDown(void); u32 hidKeysUp(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/hardware/interrupt.h b/include/arm9/hardware/interrupt.h index aa5fb43..e03ce83 100644 --- a/include/arm9/hardware/interrupt.h +++ b/include/arm9/hardware/interrupt.h @@ -63,6 +63,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + /** * @brief Initializes interrupts. */ @@ -83,6 +88,10 @@ */ void IRQ_unregisterHandler(Interrupt id); +#ifdef __cplusplus +} +#endif + static inline u32 enterCriticalSection(void) { diff --git a/include/arm9/hardware/ndma.h b/include/arm9/hardware/ndma.h index 574919e..302c309 100644 --- a/include/arm9/hardware/ndma.h +++ b/include/arm9/hardware/ndma.h @@ -147,6 +147,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + /** * @brief Initializes all NDMA channels. */ @@ -187,3 +192,7 @@ * @param[in] size The size of the memory to fill. Must be multiple of 4. */ void NDMA_fill(u32 *dest, u32 value, u32 size); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/hardware/spiflash.h b/include/arm9/hardware/spiflash.h index d935be1..e148ac8 100644 --- a/include/arm9/hardware/spiflash.h +++ b/include/arm9/hardware/spiflash.h @@ -26,6 +26,15 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + // true if spiflash is installed, false otherwise bool spiflash_get_status(); void spiflash_read(u32 offset, u32 size, u8 *buf); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/hardware/timer.h b/include/arm9/hardware/timer.h index fbb32ef..777f626 100644 --- a/include/arm9/hardware/timer.h +++ b/include/arm9/hardware/timer.h @@ -52,6 +52,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + /** * @brief Resets/initializes the timer hardware. Should not be called manually. */ @@ -92,3 +97,7 @@ * @param[in] ms The number of milliseconds to sleep. */ void TIMER_sleep(u32 ms); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/partitions.h b/include/arm9/partitions.h index 444a173..7cda5f6 100644 --- a/include/arm9/partitions.h +++ b/include/arm9/partitions.h @@ -33,6 +33,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + size_t partitionAdd(u32 sector, u32 count, u8 type); bool partitionSetName(size_t index, const char *name); bool partitionFind(u32 sector, u32 count, size_t *index); @@ -42,3 +47,7 @@ bool partitionGetKeyslot(size_t index, u8 *keyslot); bool partitionGetInfo(size_t index, partitionStruct *info); void partitionsReset(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/arm9/start.h b/include/arm9/start.h index 53fab51..0353bd6 100644 --- a/include/arm9/start.h +++ b/include/arm9/start.h @@ -22,5 +22,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void clearMem(u32 *adr, u32 size); void deinitCpu(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/fb_assert.h b/include/fb_assert.h index 9444356..10b9d56 100644 --- a/include/fb_assert.h +++ b/include/fb_assert.h @@ -22,6 +22,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + noreturn void __fb_assert(const char *const str, u32 line); #ifdef NDEBUG @@ -29,3 +34,7 @@ #else #define fb_assert(c) ((c) ? ((void)0) : __fb_assert(#c ", " __FILE__, __LINE__)) #endif + +#ifdef __cplusplus +} +#endif diff --git a/include/firmwriter.h b/include/firmwriter.h index 1d6c02a..8f37031 100644 --- a/include/firmwriter.h +++ b/include/firmwriter.h @@ -34,5 +34,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + s32 writeFirmPartition(const char *const part, bool replaceSig); s32 loadVerifyUpdate(const char *const path, u32 *const version); + +#ifdef __cplusplus +} +#endif diff --git a/include/fs.h b/include/fs.h index a955761..c5ff08f 100644 --- a/include/fs.h +++ b/include/fs.h @@ -21,12 +21,11 @@ #include "types.h" #include "fatfs/ff.h" + #define FS_MAX_DEVICES (2) #define FS_MAX_DRIVES (FF_VOLUMES) #define FS_DRIVE_NAMES "sdmc:/","twln:/","twlp:/","nand:/" - #define FS_MAX_FILES (3) - #define FS_MAX_DIRS (2) @@ -56,11 +55,16 @@ } FsOpenMode; typedef FILINFO FsFileInfo; - typedef s32 DevHandle; typedef s32 DevBufHandle; + +#ifdef __cplusplus +extern "C" +{ +#endif + s32 fMount(FsDrive drive); s32 fUnmount(FsDrive drive); bool fIsDriveMounted(FsDrive drive); @@ -95,3 +99,7 @@ #ifdef ARM9 void fsDeinit(void); #endif + +#ifdef __cplusplus +} +#endif diff --git a/include/fsutils.h b/include/fsutils.h index 70fd493..7ba8125 100644 --- a/include/fsutils.h +++ b/include/fsutils.h @@ -22,6 +22,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + bool fsEnsureMounted(const char *path); void fsUnmountAll(); u32 fsMountNandFilesystems(); @@ -29,3 +34,7 @@ bool fsMountSdmc(); bool fsCreateFileWithPath(const char *filepath); bool fsQuickRead(const char* filepath, void* buff, u32 len, u32 off); + +#ifdef __cplusplus +} +#endif diff --git a/include/hardware/cache.h b/include/hardware/cache.h index a2f511b..f3f6e56 100644 --- a/include/hardware/cache.h +++ b/include/hardware/cache.h @@ -22,6 +22,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void invalidateICache(void); void invalidateICacheRange(const void *const base, u32 size); void flushDCache(void); @@ -30,3 +35,7 @@ void flushInvalidateDCacheRange(const void *const base, u32 size); void invalidateDCache(void); void invalidateDCacheRange(const void *const base, u32 size); + +#ifdef __cplusplus +} +#endif diff --git a/include/hardware/gfx.h b/include/hardware/gfx.h index 65b5c1e..eea777b 100644 --- a/include/hardware/gfx.h +++ b/include/hardware/gfx.h @@ -59,6 +59,11 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void GX_memoryFill(u64 *buf0a, u32 buf0v, u32 buf0Sz, u32 val0, u64 *buf1a, u32 buf1v, u32 buf1Sz, u32 val1); void GX_displayTransfer(u64 *in, u32 indim, u64 *out, u32 outdim, u32 flags); void GX_textureCopy(u64 *in, u32 indim, u64 *out, u32 outdim, u32 size); @@ -70,4 +75,9 @@ void GFX_enterLowPowerState(void); void GFX_returnFromLowPowerState(void); void GFX_deinit(bool keepLcdsOn); + +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/hardware/pxi.h b/include/hardware/pxi.h index e13338d..da78f55 100644 --- a/include/hardware/pxi.h +++ b/include/hardware/pxi.h @@ -58,5 +58,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + void PXI_init(void); u32 PXI_sendCmd(u32 cmd, const u32 *const buf, u32 words); + +#ifdef __cplusplus +} +#endif diff --git a/include/ipc_handler.h b/include/ipc_handler.h index d14643c..92c0350 100644 --- a/include/ipc_handler.h +++ b/include/ipc_handler.h @@ -96,4 +96,13 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + u32 IPC_handleCmd(u8 cmdId, u32 inBufs, u32 outBufs, const u32 *const buf); + +#ifdef __cplusplus +} +#endif diff --git a/include/system.h b/include/system.h index 3435ffc..bbb4ff2 100644 --- a/include/system.h +++ b/include/system.h @@ -22,5 +22,14 @@ +#ifdef __cplusplus +extern "C" +{ +#endif + //void WEAK __systemInit(void); void WEAK __systemDeinit(void); + +#ifdef __cplusplus +} +#endif diff --git a/include/util.h b/include/util.h index 6b9e02a..36ca619 100644 --- a/include/util.h +++ b/include/util.h @@ -25,8 +25,13 @@ #define arrayEntries(array) sizeof(array)/sizeof(*array) -void wait(u32 cycles); +#ifdef __cplusplus +extern "C" +{ +#endif + +void wait(u32 cycles); __attribute__ ((format (scanf, 2, 3))) int fb_sscanf(const char *s, const char *fmt, ...); @@ -37,8 +42,12 @@ void strncpy_s(char *dest, const char *src, u32 nchars, const u32 buflen); void memcpy_s(void *dstBuf, size_t dstBufSize, size_t dstBufOffset, - void *srcBuf, size_t srcBufSize, size_t srcBufOffset, bool reverse); + void *srcBuf, size_t srcBufSize, size_t srcBufOffset, bool reverse); u32 getleu32(const void* ptr); u32 swap32(u32 val); + +#ifdef __cplusplus +} +#endif