From da330b2a35203aa8cd8709bd0dd118f4e72ce8be Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Thu, 30 Jun 2022 21:19:36 -0400 Subject: [PATCH 1/3] Update bindgen, libctru+newlib and regenerate --- ctru-sys/bindgen.sh | 1 + ctru-sys/src/bindings.rs | 1706 ++++++++++++++++++++++++++++++-------- 2 files changed, 1366 insertions(+), 341 deletions(-) diff --git a/ctru-sys/bindgen.sh b/ctru-sys/bindgen.sh index 3a25578..f549220 100755 --- a/ctru-sys/bindgen.sh +++ b/ctru-sys/bindgen.sh @@ -6,6 +6,7 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \ --rust-target nightly \ --use-core \ --distrust-clang-mangling \ + --must-use-type 'Result' \ --no-doc-comments \ --no-layout-tests \ --ctypes-prefix "::libc" \ diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs index 5e6aafa..c311fe2 100644 --- a/ctru-sys/src/bindings.rs +++ b/ctru-sys/src/bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.60.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -154,9 +154,9 @@ impl ::core::cmp::PartialEq for __BindgenUnionField { } impl ::core::cmp::Eq for __BindgenUnionField {} pub const _NEWLIB_VERSION_H__: u32 = 1; -pub const _NEWLIB_VERSION: &[u8; 6usize] = b"4.1.0\0"; +pub const _NEWLIB_VERSION: &[u8; 6usize] = b"4.2.0\0"; pub const __NEWLIB__: u32 = 4; -pub const __NEWLIB_MINOR__: u32 = 1; +pub const __NEWLIB_MINOR__: u32 = 2; pub const __NEWLIB_PATCHLEVEL__: u32 = 0; pub const _DEFAULT_SOURCE: u32 = 1; pub const _POSIX_SOURCE: u32 = 1; @@ -263,6 +263,7 @@ pub const _LDBL_EQ_DBL: u32 = 1; pub const _FVWRITE_IN_STREAMIO: u32 = 1; pub const _FSEEK_OPTIMIZATION: u32 = 1; pub const _UNBUF_STREAM_OPT: u32 = 1; +pub const _WANT_USE_GDTOA: u32 = 1; pub const __OBSOLETE_MATH_DEFAULT: u32 = 0; pub const __OBSOLETE_MATH: u32 = 0; pub const __RAND_MAX: u32 = 2147483647; @@ -1334,154 +1335,154 @@ impl Default for FpuRegisters { } } } -pub const RL_SUCCESS: ::libc::c_uint = 0; -pub const RL_INFO: ::libc::c_uint = 1; -pub const RL_FATAL: ::libc::c_uint = 31; -pub const RL_RESET: ::libc::c_uint = 30; -pub const RL_REINITIALIZE: ::libc::c_uint = 29; -pub const RL_USAGE: ::libc::c_uint = 28; -pub const RL_PERMANENT: ::libc::c_uint = 27; -pub const RL_TEMPORARY: ::libc::c_uint = 26; -pub const RL_STATUS: ::libc::c_uint = 25; +pub const RL_SUCCESS: _bindgen_ty_1 = 0; +pub const RL_INFO: _bindgen_ty_1 = 1; +pub const RL_FATAL: _bindgen_ty_1 = 31; +pub const RL_RESET: _bindgen_ty_1 = 30; +pub const RL_REINITIALIZE: _bindgen_ty_1 = 29; +pub const RL_USAGE: _bindgen_ty_1 = 28; +pub const RL_PERMANENT: _bindgen_ty_1 = 27; +pub const RL_TEMPORARY: _bindgen_ty_1 = 26; +pub const RL_STATUS: _bindgen_ty_1 = 25; pub type _bindgen_ty_1 = ::libc::c_uint; -pub const RS_SUCCESS: ::libc::c_uint = 0; -pub const RS_NOP: ::libc::c_uint = 1; -pub const RS_WOULDBLOCK: ::libc::c_uint = 2; -pub const RS_OUTOFRESOURCE: ::libc::c_uint = 3; -pub const RS_NOTFOUND: ::libc::c_uint = 4; -pub const RS_INVALIDSTATE: ::libc::c_uint = 5; -pub const RS_NOTSUPPORTED: ::libc::c_uint = 6; -pub const RS_INVALIDARG: ::libc::c_uint = 7; -pub const RS_WRONGARG: ::libc::c_uint = 8; -pub const RS_CANCELED: ::libc::c_uint = 9; -pub const RS_STATUSCHANGED: ::libc::c_uint = 10; -pub const RS_INTERNAL: ::libc::c_uint = 11; -pub const RS_INVALIDRESVAL: ::libc::c_uint = 63; +pub const RS_SUCCESS: _bindgen_ty_2 = 0; +pub const RS_NOP: _bindgen_ty_2 = 1; +pub const RS_WOULDBLOCK: _bindgen_ty_2 = 2; +pub const RS_OUTOFRESOURCE: _bindgen_ty_2 = 3; +pub const RS_NOTFOUND: _bindgen_ty_2 = 4; +pub const RS_INVALIDSTATE: _bindgen_ty_2 = 5; +pub const RS_NOTSUPPORTED: _bindgen_ty_2 = 6; +pub const RS_INVALIDARG: _bindgen_ty_2 = 7; +pub const RS_WRONGARG: _bindgen_ty_2 = 8; +pub const RS_CANCELED: _bindgen_ty_2 = 9; +pub const RS_STATUSCHANGED: _bindgen_ty_2 = 10; +pub const RS_INTERNAL: _bindgen_ty_2 = 11; +pub const RS_INVALIDRESVAL: _bindgen_ty_2 = 63; pub type _bindgen_ty_2 = ::libc::c_uint; -pub const RM_COMMON: ::libc::c_uint = 0; -pub const RM_KERNEL: ::libc::c_uint = 1; -pub const RM_UTIL: ::libc::c_uint = 2; -pub const RM_FILE_SERVER: ::libc::c_uint = 3; -pub const RM_LOADER_SERVER: ::libc::c_uint = 4; -pub const RM_TCB: ::libc::c_uint = 5; -pub const RM_OS: ::libc::c_uint = 6; -pub const RM_DBG: ::libc::c_uint = 7; -pub const RM_DMNT: ::libc::c_uint = 8; -pub const RM_PDN: ::libc::c_uint = 9; -pub const RM_GSP: ::libc::c_uint = 10; -pub const RM_I2C: ::libc::c_uint = 11; -pub const RM_GPIO: ::libc::c_uint = 12; -pub const RM_DD: ::libc::c_uint = 13; -pub const RM_CODEC: ::libc::c_uint = 14; -pub const RM_SPI: ::libc::c_uint = 15; -pub const RM_PXI: ::libc::c_uint = 16; -pub const RM_FS: ::libc::c_uint = 17; -pub const RM_DI: ::libc::c_uint = 18; -pub const RM_HID: ::libc::c_uint = 19; -pub const RM_CAM: ::libc::c_uint = 20; -pub const RM_PI: ::libc::c_uint = 21; -pub const RM_PM: ::libc::c_uint = 22; -pub const RM_PM_LOW: ::libc::c_uint = 23; -pub const RM_FSI: ::libc::c_uint = 24; -pub const RM_SRV: ::libc::c_uint = 25; -pub const RM_NDM: ::libc::c_uint = 26; -pub const RM_NWM: ::libc::c_uint = 27; -pub const RM_SOC: ::libc::c_uint = 28; -pub const RM_LDR: ::libc::c_uint = 29; -pub const RM_ACC: ::libc::c_uint = 30; -pub const RM_ROMFS: ::libc::c_uint = 31; -pub const RM_AM: ::libc::c_uint = 32; -pub const RM_HIO: ::libc::c_uint = 33; -pub const RM_UPDATER: ::libc::c_uint = 34; -pub const RM_MIC: ::libc::c_uint = 35; -pub const RM_FND: ::libc::c_uint = 36; -pub const RM_MP: ::libc::c_uint = 37; -pub const RM_MPWL: ::libc::c_uint = 38; -pub const RM_AC: ::libc::c_uint = 39; -pub const RM_HTTP: ::libc::c_uint = 40; -pub const RM_DSP: ::libc::c_uint = 41; -pub const RM_SND: ::libc::c_uint = 42; -pub const RM_DLP: ::libc::c_uint = 43; -pub const RM_HIO_LOW: ::libc::c_uint = 44; -pub const RM_CSND: ::libc::c_uint = 45; -pub const RM_SSL: ::libc::c_uint = 46; -pub const RM_AM_LOW: ::libc::c_uint = 47; -pub const RM_NEX: ::libc::c_uint = 48; -pub const RM_FRIENDS: ::libc::c_uint = 49; -pub const RM_RDT: ::libc::c_uint = 50; -pub const RM_APPLET: ::libc::c_uint = 51; -pub const RM_NIM: ::libc::c_uint = 52; -pub const RM_PTM: ::libc::c_uint = 53; -pub const RM_MIDI: ::libc::c_uint = 54; -pub const RM_MC: ::libc::c_uint = 55; -pub const RM_SWC: ::libc::c_uint = 56; -pub const RM_FATFS: ::libc::c_uint = 57; -pub const RM_NGC: ::libc::c_uint = 58; -pub const RM_CARD: ::libc::c_uint = 59; -pub const RM_CARDNOR: ::libc::c_uint = 60; -pub const RM_SDMC: ::libc::c_uint = 61; -pub const RM_BOSS: ::libc::c_uint = 62; -pub const RM_DBM: ::libc::c_uint = 63; -pub const RM_CONFIG: ::libc::c_uint = 64; -pub const RM_PS: ::libc::c_uint = 65; -pub const RM_CEC: ::libc::c_uint = 66; -pub const RM_IR: ::libc::c_uint = 67; -pub const RM_UDS: ::libc::c_uint = 68; -pub const RM_PL: ::libc::c_uint = 69; -pub const RM_CUP: ::libc::c_uint = 70; -pub const RM_GYROSCOPE: ::libc::c_uint = 71; -pub const RM_MCU: ::libc::c_uint = 72; -pub const RM_NS: ::libc::c_uint = 73; -pub const RM_NEWS: ::libc::c_uint = 74; -pub const RM_RO: ::libc::c_uint = 75; -pub const RM_GD: ::libc::c_uint = 76; -pub const RM_CARD_SPI: ::libc::c_uint = 77; -pub const RM_EC: ::libc::c_uint = 78; -pub const RM_WEB_BROWSER: ::libc::c_uint = 79; -pub const RM_TEST: ::libc::c_uint = 80; -pub const RM_ENC: ::libc::c_uint = 81; -pub const RM_PIA: ::libc::c_uint = 82; -pub const RM_ACT: ::libc::c_uint = 83; -pub const RM_VCTL: ::libc::c_uint = 84; -pub const RM_OLV: ::libc::c_uint = 85; -pub const RM_NEIA: ::libc::c_uint = 86; -pub const RM_NPNS: ::libc::c_uint = 87; -pub const RM_AVD: ::libc::c_uint = 90; -pub const RM_L2B: ::libc::c_uint = 91; -pub const RM_MVD: ::libc::c_uint = 92; -pub const RM_NFC: ::libc::c_uint = 93; -pub const RM_UART: ::libc::c_uint = 94; -pub const RM_SPM: ::libc::c_uint = 95; -pub const RM_QTM: ::libc::c_uint = 96; -pub const RM_NFP: ::libc::c_uint = 97; -pub const RM_APPLICATION: ::libc::c_uint = 254; -pub const RM_INVALIDRESVAL: ::libc::c_uint = 255; +pub const RM_COMMON: _bindgen_ty_3 = 0; +pub const RM_KERNEL: _bindgen_ty_3 = 1; +pub const RM_UTIL: _bindgen_ty_3 = 2; +pub const RM_FILE_SERVER: _bindgen_ty_3 = 3; +pub const RM_LOADER_SERVER: _bindgen_ty_3 = 4; +pub const RM_TCB: _bindgen_ty_3 = 5; +pub const RM_OS: _bindgen_ty_3 = 6; +pub const RM_DBG: _bindgen_ty_3 = 7; +pub const RM_DMNT: _bindgen_ty_3 = 8; +pub const RM_PDN: _bindgen_ty_3 = 9; +pub const RM_GSP: _bindgen_ty_3 = 10; +pub const RM_I2C: _bindgen_ty_3 = 11; +pub const RM_GPIO: _bindgen_ty_3 = 12; +pub const RM_DD: _bindgen_ty_3 = 13; +pub const RM_CODEC: _bindgen_ty_3 = 14; +pub const RM_SPI: _bindgen_ty_3 = 15; +pub const RM_PXI: _bindgen_ty_3 = 16; +pub const RM_FS: _bindgen_ty_3 = 17; +pub const RM_DI: _bindgen_ty_3 = 18; +pub const RM_HID: _bindgen_ty_3 = 19; +pub const RM_CAM: _bindgen_ty_3 = 20; +pub const RM_PI: _bindgen_ty_3 = 21; +pub const RM_PM: _bindgen_ty_3 = 22; +pub const RM_PM_LOW: _bindgen_ty_3 = 23; +pub const RM_FSI: _bindgen_ty_3 = 24; +pub const RM_SRV: _bindgen_ty_3 = 25; +pub const RM_NDM: _bindgen_ty_3 = 26; +pub const RM_NWM: _bindgen_ty_3 = 27; +pub const RM_SOC: _bindgen_ty_3 = 28; +pub const RM_LDR: _bindgen_ty_3 = 29; +pub const RM_ACC: _bindgen_ty_3 = 30; +pub const RM_ROMFS: _bindgen_ty_3 = 31; +pub const RM_AM: _bindgen_ty_3 = 32; +pub const RM_HIO: _bindgen_ty_3 = 33; +pub const RM_UPDATER: _bindgen_ty_3 = 34; +pub const RM_MIC: _bindgen_ty_3 = 35; +pub const RM_FND: _bindgen_ty_3 = 36; +pub const RM_MP: _bindgen_ty_3 = 37; +pub const RM_MPWL: _bindgen_ty_3 = 38; +pub const RM_AC: _bindgen_ty_3 = 39; +pub const RM_HTTP: _bindgen_ty_3 = 40; +pub const RM_DSP: _bindgen_ty_3 = 41; +pub const RM_SND: _bindgen_ty_3 = 42; +pub const RM_DLP: _bindgen_ty_3 = 43; +pub const RM_HIO_LOW: _bindgen_ty_3 = 44; +pub const RM_CSND: _bindgen_ty_3 = 45; +pub const RM_SSL: _bindgen_ty_3 = 46; +pub const RM_AM_LOW: _bindgen_ty_3 = 47; +pub const RM_NEX: _bindgen_ty_3 = 48; +pub const RM_FRIENDS: _bindgen_ty_3 = 49; +pub const RM_RDT: _bindgen_ty_3 = 50; +pub const RM_APPLET: _bindgen_ty_3 = 51; +pub const RM_NIM: _bindgen_ty_3 = 52; +pub const RM_PTM: _bindgen_ty_3 = 53; +pub const RM_MIDI: _bindgen_ty_3 = 54; +pub const RM_MC: _bindgen_ty_3 = 55; +pub const RM_SWC: _bindgen_ty_3 = 56; +pub const RM_FATFS: _bindgen_ty_3 = 57; +pub const RM_NGC: _bindgen_ty_3 = 58; +pub const RM_CARD: _bindgen_ty_3 = 59; +pub const RM_CARDNOR: _bindgen_ty_3 = 60; +pub const RM_SDMC: _bindgen_ty_3 = 61; +pub const RM_BOSS: _bindgen_ty_3 = 62; +pub const RM_DBM: _bindgen_ty_3 = 63; +pub const RM_CONFIG: _bindgen_ty_3 = 64; +pub const RM_PS: _bindgen_ty_3 = 65; +pub const RM_CEC: _bindgen_ty_3 = 66; +pub const RM_IR: _bindgen_ty_3 = 67; +pub const RM_UDS: _bindgen_ty_3 = 68; +pub const RM_PL: _bindgen_ty_3 = 69; +pub const RM_CUP: _bindgen_ty_3 = 70; +pub const RM_GYROSCOPE: _bindgen_ty_3 = 71; +pub const RM_MCU: _bindgen_ty_3 = 72; +pub const RM_NS: _bindgen_ty_3 = 73; +pub const RM_NEWS: _bindgen_ty_3 = 74; +pub const RM_RO: _bindgen_ty_3 = 75; +pub const RM_GD: _bindgen_ty_3 = 76; +pub const RM_CARD_SPI: _bindgen_ty_3 = 77; +pub const RM_EC: _bindgen_ty_3 = 78; +pub const RM_WEB_BROWSER: _bindgen_ty_3 = 79; +pub const RM_TEST: _bindgen_ty_3 = 80; +pub const RM_ENC: _bindgen_ty_3 = 81; +pub const RM_PIA: _bindgen_ty_3 = 82; +pub const RM_ACT: _bindgen_ty_3 = 83; +pub const RM_VCTL: _bindgen_ty_3 = 84; +pub const RM_OLV: _bindgen_ty_3 = 85; +pub const RM_NEIA: _bindgen_ty_3 = 86; +pub const RM_NPNS: _bindgen_ty_3 = 87; +pub const RM_AVD: _bindgen_ty_3 = 90; +pub const RM_L2B: _bindgen_ty_3 = 91; +pub const RM_MVD: _bindgen_ty_3 = 92; +pub const RM_NFC: _bindgen_ty_3 = 93; +pub const RM_UART: _bindgen_ty_3 = 94; +pub const RM_SPM: _bindgen_ty_3 = 95; +pub const RM_QTM: _bindgen_ty_3 = 96; +pub const RM_NFP: _bindgen_ty_3 = 97; +pub const RM_APPLICATION: _bindgen_ty_3 = 254; +pub const RM_INVALIDRESVAL: _bindgen_ty_3 = 255; pub type _bindgen_ty_3 = ::libc::c_uint; -pub const RD_SUCCESS: ::libc::c_uint = 0; -pub const RD_INVALID_RESULT_VALUE: ::libc::c_uint = 1023; -pub const RD_TIMEOUT: ::libc::c_uint = 1022; -pub const RD_OUT_OF_RANGE: ::libc::c_uint = 1021; -pub const RD_ALREADY_EXISTS: ::libc::c_uint = 1020; -pub const RD_CANCEL_REQUESTED: ::libc::c_uint = 1019; -pub const RD_NOT_FOUND: ::libc::c_uint = 1018; -pub const RD_ALREADY_INITIALIZED: ::libc::c_uint = 1017; -pub const RD_NOT_INITIALIZED: ::libc::c_uint = 1016; -pub const RD_INVALID_HANDLE: ::libc::c_uint = 1015; -pub const RD_INVALID_POINTER: ::libc::c_uint = 1014; -pub const RD_INVALID_ADDRESS: ::libc::c_uint = 1013; -pub const RD_NOT_IMPLEMENTED: ::libc::c_uint = 1012; -pub const RD_OUT_OF_MEMORY: ::libc::c_uint = 1011; -pub const RD_MISALIGNED_SIZE: ::libc::c_uint = 1010; -pub const RD_MISALIGNED_ADDRESS: ::libc::c_uint = 1009; -pub const RD_BUSY: ::libc::c_uint = 1008; -pub const RD_NO_DATA: ::libc::c_uint = 1007; -pub const RD_INVALID_COMBINATION: ::libc::c_uint = 1006; -pub const RD_INVALID_ENUM_VALUE: ::libc::c_uint = 1005; -pub const RD_INVALID_SIZE: ::libc::c_uint = 1004; -pub const RD_ALREADY_DONE: ::libc::c_uint = 1003; -pub const RD_NOT_AUTHORIZED: ::libc::c_uint = 1002; -pub const RD_TOO_LARGE: ::libc::c_uint = 1001; -pub const RD_INVALID_SELECTION: ::libc::c_uint = 1000; +pub const RD_SUCCESS: _bindgen_ty_4 = 0; +pub const RD_INVALID_RESULT_VALUE: _bindgen_ty_4 = 1023; +pub const RD_TIMEOUT: _bindgen_ty_4 = 1022; +pub const RD_OUT_OF_RANGE: _bindgen_ty_4 = 1021; +pub const RD_ALREADY_EXISTS: _bindgen_ty_4 = 1020; +pub const RD_CANCEL_REQUESTED: _bindgen_ty_4 = 1019; +pub const RD_NOT_FOUND: _bindgen_ty_4 = 1018; +pub const RD_ALREADY_INITIALIZED: _bindgen_ty_4 = 1017; +pub const RD_NOT_INITIALIZED: _bindgen_ty_4 = 1016; +pub const RD_INVALID_HANDLE: _bindgen_ty_4 = 1015; +pub const RD_INVALID_POINTER: _bindgen_ty_4 = 1014; +pub const RD_INVALID_ADDRESS: _bindgen_ty_4 = 1013; +pub const RD_NOT_IMPLEMENTED: _bindgen_ty_4 = 1012; +pub const RD_OUT_OF_MEMORY: _bindgen_ty_4 = 1011; +pub const RD_MISALIGNED_SIZE: _bindgen_ty_4 = 1010; +pub const RD_MISALIGNED_ADDRESS: _bindgen_ty_4 = 1009; +pub const RD_BUSY: _bindgen_ty_4 = 1008; +pub const RD_NO_DATA: _bindgen_ty_4 = 1007; +pub const RD_INVALID_COMBINATION: _bindgen_ty_4 = 1006; +pub const RD_INVALID_ENUM_VALUE: _bindgen_ty_4 = 1005; +pub const RD_INVALID_SIZE: _bindgen_ty_4 = 1004; +pub const RD_ALREADY_DONE: _bindgen_ty_4 = 1003; +pub const RD_NOT_AUTHORIZED: _bindgen_ty_4 = 1002; +pub const RD_TOO_LARGE: _bindgen_ty_4 = 1001; +pub const RD_INVALID_SELECTION: _bindgen_ty_4 = 1000; pub type _bindgen_ty_4 = ::libc::c_uint; pub const IPC_BUFFER_R: IPC_BufferRights = 2; pub const IPC_BUFFER_W: IPC_BufferRights = 4; @@ -1569,15 +1570,15 @@ pub const DMASTATE_WFP_SRC: DmaState = 2; pub const DMASTATE_RUNNING: DmaState = 3; pub const DMASTATE_DONE: DmaState = 4; pub type DmaState = ::libc::c_uint; -pub const DMACFG_SRC_IS_DEVICE: ::libc::c_uint = 1; -pub const DMACFG_DST_IS_DEVICE: ::libc::c_uint = 2; -pub const DMACFG_WAIT_AVAILABLE: ::libc::c_uint = 4; -pub const DMACFG_KEEP_LOCKED: ::libc::c_uint = 8; -pub const DMACFG_USE_SRC_CONFIG: ::libc::c_uint = 64; -pub const DMACFG_USE_DST_CONFIG: ::libc::c_uint = 128; +pub const DMACFG_SRC_IS_DEVICE: _bindgen_ty_5 = 1; +pub const DMACFG_DST_IS_DEVICE: _bindgen_ty_5 = 2; +pub const DMACFG_WAIT_AVAILABLE: _bindgen_ty_5 = 4; +pub const DMACFG_KEEP_LOCKED: _bindgen_ty_5 = 8; +pub const DMACFG_USE_SRC_CONFIG: _bindgen_ty_5 = 64; +pub const DMACFG_USE_DST_CONFIG: _bindgen_ty_5 = 128; pub type _bindgen_ty_5 = ::libc::c_uint; -pub const DMARST_UNLOCK: ::libc::c_uint = 1; -pub const DMARST_RESUME_DEVICE: ::libc::c_uint = 2; +pub const DMARST_UNLOCK: _bindgen_ty_6 = 1; +pub const DMARST_RESUME_DEVICE: _bindgen_ty_6 = 2; pub type _bindgen_ty_6 = ::libc::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -1976,6 +1977,7 @@ impl Default for StartupInfo { } } extern "C" { + #[must_use] pub fn svcControlMemory( addr_out: *mut u32_, addr0: u32_, @@ -1986,6 +1988,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcControlProcessMemory( process: Handle, addr0: u32_, @@ -1996,6 +1999,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcCreateMemoryBlock( memblock: *mut Handle, addr: u32_, @@ -2005,6 +2009,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcMapMemoryBlock( memblock: Handle, addr: u32_, @@ -2013,18 +2018,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcQueryProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -2033,21 +2043,26 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result; } extern "C" { pub fn svcExitProcess(); } extern "C" { + #[must_use] pub fn svcTerminateProcess(process: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetProcessList( processCount: *mut s32, processIds: *mut u32_, @@ -2055,6 +2070,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcGetThreadList( threadCount: *mut s32, threadIds: *mut u32_, @@ -2063,6 +2079,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcCreatePort( portServer: *mut Handle, portClient: *mut Handle, @@ -2071,9 +2088,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn svcCreateCodeSet( out: *mut Handle, info: *const CodeSetInfo, @@ -2083,6 +2102,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcCreateProcess( out: *mut Handle, codeset: Handle, @@ -2091,6 +2111,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcGetProcessAffinityMask( affinitymask: *mut u8_, process: Handle, @@ -2098,6 +2119,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcSetProcessAffinityMask( process: Handle, affinitymask: *const u8_, @@ -2105,15 +2127,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcGetProcessIdealProcessor(processorid: *mut s32, process: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcSetProcessIdealProcessor(process: Handle, processorid: s32) -> Result; } extern "C" { + #[must_use] pub fn svcRun(process: Handle, info: *const StartupInfo) -> Result; } extern "C" { + #[must_use] pub fn svcCreateThread( thread: *mut Handle, entrypoint: ThreadFunc, @@ -2124,6 +2150,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result; } extern "C" { @@ -2133,12 +2160,15 @@ extern "C" { pub fn svcSleepThread(ns: s64); } extern "C" { + #[must_use] pub fn svcGetThreadPriority(out: *mut s32, handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcSetThreadPriority(thread: Handle, prio: s32) -> Result; } extern "C" { + #[must_use] pub fn svcGetThreadAffinityMask( affinitymask: *mut u8_, thread: Handle, @@ -2146,6 +2176,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcSetThreadAffinityMask( thread: Handle, affinitymask: *const u8_, @@ -2153,21 +2184,26 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcGetThreadIdealProcessor(processorid: *mut s32, thread: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcSetThreadIdealProcessor(thread: Handle, processorid: s32) -> Result; } extern "C" { pub fn svcGetProcessorID() -> s32; } extern "C" { + #[must_use] pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetResourceLimitLimitValues( values: *mut s64, resourceLimit: Handle, @@ -2176,6 +2212,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcGetResourceLimitCurrentValues( values: *mut s64, resourceLimit: Handle, @@ -2184,12 +2221,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcSetProcessResourceLimits(process: Handle, resourceLimit: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcCreateResourceLimit(resourceLimit: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn svcSetResourceLimitValues( resourceLimit: Handle, names: *const ResourceLimitType, @@ -2198,37 +2238,48 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result; } extern "C" { + #[must_use] pub fn svcCreateMutex(mutex: *mut Handle, initially_locked: bool) -> Result; } extern "C" { + #[must_use] pub fn svcReleaseMutex(handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcCreateSemaphore(semaphore: *mut Handle, initial_count: s32, max_count: s32) -> Result; } extern "C" { + #[must_use] pub fn svcReleaseSemaphore(count: *mut s32, semaphore: Handle, release_count: s32) -> Result; } extern "C" { + #[must_use] pub fn svcCreateEvent(event: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { + #[must_use] pub fn svcSignalEvent(handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcClearEvent(handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcWaitSynchronization(handle: Handle, nanoseconds: s64) -> Result; } extern "C" { + #[must_use] pub fn svcWaitSynchronizationN( out: *mut s32, handles: *const Handle, @@ -2238,9 +2289,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcCreateAddressArbiter(arbiter: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn svcArbitrateAddress( arbiter: Handle, addr: u32_, @@ -2250,6 +2303,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcArbitrateAddressNoTimeout( arbiter: Handle, addr: u32_, @@ -2258,18 +2312,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcSendSyncRequest(session: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcCreateSessionToPort(clientSession: *mut Handle, clientPort: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcCreateSession(serverSession: *mut Handle, clientSession: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn svcAcceptSession(session: *mut Handle, port: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcReplyAndReceive( index: *mut s32, handles: *const Handle, @@ -2278,36 +2337,46 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { + #[must_use] pub fn svcSetTimer(timer: Handle, initial: s64, interval: s64) -> Result; } extern "C" { + #[must_use] pub fn svcCancelTimer(timer: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcClearTimer(timer: Handle) -> Result; } extern "C" { pub fn svcGetSystemTick() -> u64_; } extern "C" { + #[must_use] pub fn svcCloseHandle(handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result; } extern "C" { + #[must_use] pub fn svcKernelSetState(type_: u32_, ...) -> Result; } extern "C" { + #[must_use] pub fn svcBindInterrupt( interruptId: u32_, eventOrSemaphore: Handle, @@ -2316,18 +2385,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcStartInterProcessDma( dma: *mut Handle, dstProcess: Handle, @@ -2339,12 +2413,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcStopDma(dma: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcRestartDma( dma: Handle, dstAddr: u32_, @@ -2354,9 +2431,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result; } extern "C" { + #[must_use] pub fn svcSetWifiEnabled(enabled: bool) -> Result; } extern "C" { @@ -2370,9 +2449,11 @@ extern "C" { ); } extern "C" { + #[must_use] pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result; } extern "C" { + #[must_use] pub fn svcControlPerformanceCounter( out: *mut u64_, op: PerfCounterOperation, @@ -2381,21 +2462,27 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcBreakDebugProcess(debug: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcTerminateDebugProcess(debug: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcGetProcessDebugEvent(info: *mut DebugEventInfo, debug: Handle) -> Result; } extern "C" { + #[must_use] pub fn svcContinueDebugEvent(debug: Handle, flags: DebugFlags) -> Result; } extern "C" { + #[must_use] pub fn svcGetDebugThreadContext( context: *mut ThreadContext, debug: Handle, @@ -2404,6 +2491,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcSetDebugThreadContext( debug: Handle, threadId: u32_, @@ -2412,6 +2500,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcQueryDebugProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -2420,6 +2509,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcReadProcessMemory( buffer: *mut ::libc::c_void, debug: Handle, @@ -2428,6 +2518,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcWriteProcessMemory( debug: Handle, buffer: *const ::libc::c_void, @@ -2436,9 +2527,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result; } extern "C" { + #[must_use] pub fn svcGetDebugThreadParam( unused: *mut s64, out: *mut u32_, @@ -2448,41 +2541,42 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn svcBackdoor(callback: ::core::option::Option s32>) -> Result; } -pub const ARM9DESC_MOUNT_NAND: ::libc::c_uint = 1; -pub const ARM9DESC_MOUNT_NANDRO_RW: ::libc::c_uint = 2; -pub const ARM9DESC_MOUNT_TWLN: ::libc::c_uint = 4; -pub const ARM9DESC_MOUNT_WNAND: ::libc::c_uint = 8; -pub const ARM9DESC_MOUNT_CARDSPI: ::libc::c_uint = 16; -pub const ARM9DESC_USE_SDIF3: ::libc::c_uint = 32; -pub const ARM9DESC_CREATE_SEED: ::libc::c_uint = 64; -pub const ARM9DESC_USE_CARD_SPI: ::libc::c_uint = 128; -pub const ARM9DESC_SD_APPLICATION: ::libc::c_uint = 256; -pub const ARM9DESC_MOUNT_SDMC_RW: ::libc::c_uint = 512; +pub const ARM9DESC_MOUNT_NAND: _bindgen_ty_7 = 1; +pub const ARM9DESC_MOUNT_NANDRO_RW: _bindgen_ty_7 = 2; +pub const ARM9DESC_MOUNT_TWLN: _bindgen_ty_7 = 4; +pub const ARM9DESC_MOUNT_WNAND: _bindgen_ty_7 = 8; +pub const ARM9DESC_MOUNT_CARDSPI: _bindgen_ty_7 = 16; +pub const ARM9DESC_USE_SDIF3: _bindgen_ty_7 = 32; +pub const ARM9DESC_CREATE_SEED: _bindgen_ty_7 = 64; +pub const ARM9DESC_USE_CARD_SPI: _bindgen_ty_7 = 128; +pub const ARM9DESC_SD_APPLICATION: _bindgen_ty_7 = 256; +pub const ARM9DESC_MOUNT_SDMC_RW: _bindgen_ty_7 = 512; pub type _bindgen_ty_7 = ::libc::c_uint; -pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: ::libc::c_uint = 1; -pub const FSACCESS_CATEGORY_HARDWARE_CHECK: ::libc::c_uint = 2; -pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: ::libc::c_uint = 4; -pub const FSACCESS_DEBUG: ::libc::c_uint = 8; -pub const FSACCESS_TWLCARD_BACKUP: ::libc::c_uint = 16; -pub const FSACCESS_TWLNAND_DATA: ::libc::c_uint = 32; -pub const FSACCESS_BOSS: ::libc::c_uint = 64; -pub const FSACCESS_SDMC_RW: ::libc::c_uint = 128; -pub const FSACCESS_CORE: ::libc::c_uint = 256; -pub const FSACCESS_NANDRO_RO: ::libc::c_uint = 512; -pub const FSACCESS_NANDRW: ::libc::c_uint = 1024; -pub const FSACCESS_NANDRO_RW: ::libc::c_uint = 2048; -pub const FSACCESS_CATEGORY_SYSTEM_SETTINGS: ::libc::c_uint = 4096; -pub const FSACCESS_CARDBOARD: ::libc::c_uint = 8192; -pub const FSACCESS_EXPORT_IMPORT_IVS: ::libc::c_uint = 16384; -pub const FSACCESS_SDMC_WO: ::libc::c_uint = 32768; -pub const FSACCESS_SWITCH_CLEANUP: ::libc::c_uint = 65536; -pub const FSACCESS_SAVEDATA_MOVE: ::libc::c_uint = 131072; -pub const FSACCESS_SHOP: ::libc::c_uint = 262144; -pub const FSACCESS_SHELL: ::libc::c_uint = 524288; -pub const FSACCESS_CATEGORY_HOME_MENU: ::libc::c_uint = 1048576; -pub const FSACCESS_SEEDDB: ::libc::c_uint = 2097152; +pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: _bindgen_ty_8 = 1; +pub const FSACCESS_CATEGORY_HARDWARE_CHECK: _bindgen_ty_8 = 2; +pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: _bindgen_ty_8 = 4; +pub const FSACCESS_DEBUG: _bindgen_ty_8 = 8; +pub const FSACCESS_TWLCARD_BACKUP: _bindgen_ty_8 = 16; +pub const FSACCESS_TWLNAND_DATA: _bindgen_ty_8 = 32; +pub const FSACCESS_BOSS: _bindgen_ty_8 = 64; +pub const FSACCESS_SDMC_RW: _bindgen_ty_8 = 128; +pub const FSACCESS_CORE: _bindgen_ty_8 = 256; +pub const FSACCESS_NANDRO_RO: _bindgen_ty_8 = 512; +pub const FSACCESS_NANDRW: _bindgen_ty_8 = 1024; +pub const FSACCESS_NANDRO_RW: _bindgen_ty_8 = 2048; +pub const FSACCESS_CATEGORY_SYSTEM_SETTINGS: _bindgen_ty_8 = 4096; +pub const FSACCESS_CARDBOARD: _bindgen_ty_8 = 8192; +pub const FSACCESS_EXPORT_IMPORT_IVS: _bindgen_ty_8 = 16384; +pub const FSACCESS_SDMC_WO: _bindgen_ty_8 = 32768; +pub const FSACCESS_SWITCH_CLEANUP: _bindgen_ty_8 = 65536; +pub const FSACCESS_SAVEDATA_MOVE: _bindgen_ty_8 = 131072; +pub const FSACCESS_SHOP: _bindgen_ty_8 = 262144; +pub const FSACCESS_SHELL: _bindgen_ty_8 = 524288; +pub const FSACCESS_CATEGORY_HOME_MENU: _bindgen_ty_8 = 1048576; +pub const FSACCESS_SEEDDB: _bindgen_ty_8 = 2097152; pub type _bindgen_ty_8 = ::libc::c_uint; pub const RESLIMIT_CATEGORY_APPLICATION: ResourceLimitCategory = 0; pub const RESLIMIT_CATEGORY_SYS_APPLET: ResourceLimitCategory = 1; @@ -2911,6 +3005,7 @@ impl Default for ExHeader { } } extern "C" { + #[must_use] pub fn srvInit() -> Result; } extern "C" { @@ -2923,15 +3018,19 @@ extern "C" { pub fn srvGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn srvRegisterClient() -> Result; } extern "C" { + #[must_use] pub fn srvEnableNotification(semaphoreOut: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn srvRegisterService( out: *mut Handle, name: *const ::libc::c_char, @@ -2939,36 +3038,47 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn srvSubscribe(notificationId: u32_) -> Result; } extern "C" { + #[must_use] pub fn srvUnsubscribe(notificationId: u32_) -> Result; } extern "C" { + #[must_use] pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result; } extern "C" { + #[must_use] pub fn srvPublishAndGetSubscriber( processIdCountOut: *mut u32_, processIdsOut: *mut u32_, @@ -2976,9 +3086,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } pub const ERRF_ERRTYPE_GENERIC: ERRF_ErrType = 0; @@ -3066,6 +3178,7 @@ impl Default for ERRF_FatalErrInfo { } } extern "C" { + #[must_use] pub fn errfInit() -> Result; } extern "C" { @@ -3075,12 +3188,15 @@ extern "C" { pub fn errfGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn ERRF_Throw(error: *const ERRF_FatalErrInfo) -> Result; } extern "C" { + #[must_use] pub fn ERRF_ThrowResult(failure: Result) -> Result; } extern "C" { + #[must_use] pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result; } extern "C" { @@ -3178,12 +3294,14 @@ extern "C" { pub fn osSetSpeedupEnable(enable: bool); } extern "C" { + #[must_use] pub fn osGetSystemVersionData( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, ) -> Result; } extern "C" { + #[must_use] pub fn osGetSystemVersionDataString( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -3247,9 +3365,11 @@ pub struct LightSemaphore { pub max_count: s16, } extern "C" { + #[must_use] pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result; } extern "C" { + #[must_use] pub fn syncArbitrateAddressWithTimeout( addr: *mut s32, type_: ArbitrationType, @@ -3359,6 +3479,7 @@ extern "C" { pub fn threadFree(thread: Thread); } extern "C" { + #[must_use] pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result; } extern "C" { @@ -3437,11 +3558,15 @@ pub const GSPGPU_EVENT_DMA: GSPGPU_Event = 6; pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7; pub type GSPGPU_Event = ::libc::c_uint; extern "C" { + #[must_use] pub fn gspInit() -> Result; } extern "C" { pub fn gspExit(); } +extern "C" { + pub fn gspGetSessionHandle() -> *mut Handle; +} extern "C" { pub fn gspHasGpuRight() -> bool; } @@ -3473,45 +3598,58 @@ extern "C" { pub fn gspWaitForAnyEvent() -> GSPGPU_Event; } extern "C" { + #[must_use] pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_AcquireRight(flags: u8_) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_ReleaseRight() -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_ImportDisplayCaptureInfo(captureinfo: *mut GSPGPU_CaptureInfo) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_SaveVramSysArea() -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_ResetGpuCore() -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_RestoreVramSysArea() -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_SetBufferSwap( screenid: u32_, framebufinfo: *const GSPGPU_FramebufferInfo, ) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_WriteHWRegsWithMask( regAddr: u32_, data: *const u32_, @@ -3521,9 +3659,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_RegisterInterruptRelayQueue( eventHandle: Handle, flags: u32_, @@ -3532,12 +3672,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_UnregisterInterruptRelayQueue() -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_TriggerCmdReqQueue() -> Result; } extern "C" { + #[must_use] pub fn GSPGPU_SetLedForceOff(disable: bool) -> Result; } pub const GFX_TOP: gfxScreen_t = 0; @@ -3685,9 +3828,9 @@ extern "C" { extern "C" { pub fn consoleClear(); } -pub const RUNFLAG_APTWORKAROUND: ::libc::c_uint = 1; -pub const RUNFLAG_APTREINIT: ::libc::c_uint = 2; -pub const RUNFLAG_APTCHAINLOAD: ::libc::c_uint = 4; +pub const RUNFLAG_APTWORKAROUND: _bindgen_ty_9 = 1; +pub const RUNFLAG_APTREINIT: _bindgen_ty_9 = 2; +pub const RUNFLAG_APTCHAINLOAD: _bindgen_ty_9 = 4; pub type _bindgen_ty_9 = ::libc::c_uint; extern "C" { pub fn envGetHandle(name: *const ::libc::c_char) -> Handle; @@ -4106,73 +4249,91 @@ impl Default for acuConfig { } } extern "C" { + #[must_use] pub fn acInit() -> Result; } extern "C" { pub fn acExit(); } extern "C" { + #[must_use] pub fn acWaitInternetConnection() -> Result; } extern "C" { + #[must_use] pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetStatus(out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetProxyPort(out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result; } extern "C" { + #[must_use] pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result; } extern "C" { + #[must_use] pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result; } extern "C" { + #[must_use] pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result; } extern "C" { + #[must_use] pub fn ACU_ConnectAsync(config: *const acuConfig, connectionHandle: Handle) -> Result; } -pub const FS_OPEN_READ: ::libc::c_uint = 1; -pub const FS_OPEN_WRITE: ::libc::c_uint = 2; -pub const FS_OPEN_CREATE: ::libc::c_uint = 4; +pub const FS_OPEN_READ: _bindgen_ty_10 = 1; +pub const FS_OPEN_WRITE: _bindgen_ty_10 = 2; +pub const FS_OPEN_CREATE: _bindgen_ty_10 = 4; pub type _bindgen_ty_10 = ::libc::c_uint; -pub const FS_WRITE_FLUSH: ::libc::c_uint = 1; -pub const FS_WRITE_UPDATE_TIME: ::libc::c_uint = 256; +pub const FS_WRITE_FLUSH: _bindgen_ty_11 = 1; +pub const FS_WRITE_UPDATE_TIME: _bindgen_ty_11 = 256; pub type _bindgen_ty_11 = ::libc::c_uint; -pub const FS_ATTRIBUTE_DIRECTORY: ::libc::c_uint = 1; -pub const FS_ATTRIBUTE_HIDDEN: ::libc::c_uint = 256; -pub const FS_ATTRIBUTE_ARCHIVE: ::libc::c_uint = 65536; -pub const FS_ATTRIBUTE_READ_ONLY: ::libc::c_uint = 16777216; +pub const FS_ATTRIBUTE_DIRECTORY: _bindgen_ty_12 = 1; +pub const FS_ATTRIBUTE_HIDDEN: _bindgen_ty_12 = 256; +pub const FS_ATTRIBUTE_ARCHIVE: _bindgen_ty_12 = 65536; +pub const FS_ATTRIBUTE_READ_ONLY: _bindgen_ty_12 = 16777216; pub type _bindgen_ty_12 = ::libc::c_uint; pub const MEDIATYPE_NAND: FS_MediaType = 0; pub const MEDIATYPE_SD: FS_MediaType = 1; @@ -4447,6 +4608,7 @@ pub struct FS_SdMmcSpeedInfo { } pub type FS_Archive = u64_; extern "C" { + #[must_use] pub fn fsInit() -> Result; } extern "C" { @@ -4471,6 +4633,7 @@ extern "C" { pub fn fsGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn FSUSER_Control( action: FS_Action, input: *mut ::libc::c_void, @@ -4480,9 +4643,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_Initialize(session: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_OpenFile( out: *mut Handle, archive: FS_Archive, @@ -4492,6 +4657,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_OpenFileDirectly( out: *mut Handle, archiveId: FS_ArchiveID, @@ -4502,9 +4668,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_RenameFile( srcArchive: FS_Archive, srcPath: FS_Path, @@ -4513,12 +4681,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_DeleteDirectory(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_DeleteDirectoryRecursively(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CreateFile( archive: FS_Archive, path: FS_Path, @@ -4527,9 +4698,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_RenameDirectory( srcArchive: FS_Archive, srcPath: FS_Path, @@ -4538,12 +4711,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID, path: FS_Path) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ControlArchive( archive: FS_Archive, action: FS_ArchiveAction, @@ -4554,72 +4730,95 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSdmcArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ClearSdmcLog() -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ClearNandLog() -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardSlotIsInserted(inserted: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardSlotPowerOn(status: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardSlotPowerOff(status: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectRead( commandId: u8_, size: u32_, @@ -4627,6 +4826,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectReadWithAddress( commandId: u8_, address: u32_, @@ -4635,6 +4835,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectWrite( commandId: u8_, size: u32_, @@ -4642,6 +4843,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectWriteWithAddress( commandId: u8_, address: u32_, @@ -4650,6 +4852,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectRead_4xIO( commandId: u8_, address: u32_, @@ -4658,6 +4861,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify( address: u32_, size: u32_, @@ -4665,24 +4869,31 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SetCardSpiBusMode(busMode: FS_CardSpiBusMode) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SendInitializeInfoTo9() -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSpecialContentIndex( index: *mut u16_, mediaType: FS_MediaType, @@ -4691,6 +4902,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetLegacyRomHeader( mediaType: FS_MediaType, programId: u64_, @@ -4698,6 +4910,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetLegacyBannerData( mediaType: FS_MediaType, programId: u64_, @@ -4705,6 +4918,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CheckAuthorityToAccessExtSaveData( access: *mut bool, mediaType: FS_MediaType, @@ -4713,6 +4927,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_QueryTotalQuotaSize( quotaSize: *mut u64_, directories: u32_, @@ -4722,21 +4937,27 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_DeleteSdmcRoot() -> Result; } extern "C" { + #[must_use] pub fn FSUSER_DeleteAllExtSaveDataOnNand() -> Result; } extern "C" { + #[must_use] pub fn FSUSER_InitializeCtrFileSystem() -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CreateSeed() -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetFormatInfo( totalSize: *mut u32_, directories: *mut u32_, @@ -4747,6 +4968,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetLegacyRomHeader2( headerSize: u32_, mediaType: FS_MediaType, @@ -4755,25 +4977,30 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetArchiveResource( archiveResource: *mut FS_ArchiveResource, mediaType: FS_SystemMediaType, ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ExportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ImportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_FormatSaveData( archiveId: FS_ArchiveID, path: FS_Path, @@ -4786,6 +5013,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetLegacySubBannerData( bannerSize: u32_, mediaType: FS_MediaType, @@ -4794,6 +5022,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_UpdateSha256Context( data: *const ::libc::c_void, inputSize: u32_, @@ -4801,6 +5030,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ReadSpecialFile( bytesRead: *mut u32_, fileOffset: u64_, @@ -4809,9 +5039,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CreateExtSaveData( info: FS_ExtSaveDataInfo, directories: u32_, @@ -4822,9 +5054,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_DeleteExtSaveData(info: FS_ExtSaveDataInfo) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ReadExtSaveDataIcon( bytesRead: *mut u32_, info: FS_ExtSaveDataInfo, @@ -4833,6 +5067,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetExtDataBlockSize( totalBlocks: *mut u64_, freeBlocks: *mut u64_, @@ -4841,6 +5076,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_EnumerateExtSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -4851,6 +5087,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_CreateSystemSaveData( info: FS_SystemSaveDataInfo, totalSize: u32_, @@ -4863,30 +5100,38 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_DeleteSystemSaveData(info: FS_SystemSaveDataInfo) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_StartDeviceMoveAsSource(context: *mut FS_DeviceMoveContext) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_StartDeviceMoveAsDestination( context: FS_DeviceMoveContext, clear: bool, ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_EnumerateSystemSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -4894,15 +5139,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SetPriority(priority: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_SetSaveDataSecureValue( value: u64_, slot: FS_SecureValueSlot, @@ -4911,6 +5160,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetSaveDataSecureValue( exists: *mut bool, value: *mut u64_, @@ -4920,6 +5170,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_ControlSecureSave( action: FS_SecureSaveAction, input: *mut ::libc::c_void, @@ -4929,9 +5180,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_Control( handle: Handle, action: FS_FileAction, @@ -4942,6 +5195,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_OpenSubFile( handle: Handle, subFile: *mut Handle, @@ -4950,6 +5204,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_Read( handle: Handle, bytesRead: *mut u32_, @@ -4959,6 +5214,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_Write( handle: Handle, bytesWritten: *mut u32_, @@ -4969,33 +5225,43 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_Close(handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_Flush(handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn FSDIR_Control( handle: Handle, action: FS_DirectoryAction, @@ -5006,6 +5272,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSDIR_Read( handle: Handle, entriesRead: *mut u32_, @@ -5014,12 +5281,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSDIR_Close(handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } #[repr(C)] @@ -5030,8 +5300,8 @@ pub struct AM_TitleEntry { pub version: u16_, pub unk: [u8_; 6usize], } -pub const AM_STATUS_MASK_INSTALLING: ::libc::c_uint = 1; -pub const AM_STATUS_MASK_AWAITING_FINALIZATION: ::libc::c_uint = 2; +pub const AM_STATUS_MASK_INSTALLING: _bindgen_ty_13 = 1; +pub const AM_STATUS_MASK_AWAITING_FINALIZATION: _bindgen_ty_13 = 2; pub type _bindgen_ty_13 = ::libc::c_uint; pub const AM_STATUS_ABORTED: AM_InstallStatus = 2; pub const AM_STATUS_SAVED: AM_InstallStatus = 3; @@ -5047,8 +5317,8 @@ pub struct AM_PendingTitleEntry { pub titleType: u32_, pub unk: [u8_; 8usize], } -pub const AM_DELETE_PENDING_NON_SYSTEM: ::libc::c_uint = 1; -pub const AM_DELETE_PENDING_SYSTEM: ::libc::c_uint = 2; +pub const AM_DELETE_PENDING_NON_SYSTEM: _bindgen_ty_14 = 1; +pub const AM_DELETE_PENDING_SYSTEM: _bindgen_ty_14 = 2; pub type _bindgen_ty_14 = ::libc::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -5072,9 +5342,11 @@ pub const AM_CONTENT_DOWNLOADED: AM_ContentInfoFlags = 1; pub const AM_CONTENT_OWNED: AM_ContentInfoFlags = 2; pub type AM_ContentInfoFlags = ::libc::c_uint; extern "C" { + #[must_use] pub fn amInit() -> Result; } extern "C" { + #[must_use] pub fn amAppInit() -> Result; } extern "C" { @@ -5084,9 +5356,11 @@ extern "C" { pub fn amGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn AM_GetTitleList( titlesRead: *mut u32_, mediatype: FS_MediaType, @@ -5095,6 +5369,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetTitleInfo( mediatype: FS_MediaType, titleCount: u32_, @@ -5103,9 +5378,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetTicketCount(count: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn AM_GetTicketList( ticketsRead: *mut u32_, ticketCount: u32_, @@ -5114,6 +5391,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetPendingTitleCount( count: *mut u32_, mediatype: FS_MediaType, @@ -5121,6 +5399,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetPendingTitleList( titlesRead: *mut u32_, titleCount: u32_, @@ -5130,6 +5409,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetPendingTitleInfo( titleCount: u32_, mediatype: FS_MediaType, @@ -5138,9 +5418,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn AM_ExportTwlBackup( titleID: u64_, operation: u8_, @@ -5150,6 +5432,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_ImportTwlBackup( filehandle: Handle, operation: u8_, @@ -5158,6 +5441,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_ReadTwlBackupInfo( filehandle: Handle, outinfo: *mut ::libc::c_void, @@ -5169,24 +5453,31 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetTWLPartitionInfo(info: *mut AM_TWLPartitionInfo) -> Result; } extern "C" { + #[must_use] pub fn AM_StartCiaInstall(mediatype: FS_MediaType, ciaHandle: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_StartDlpChildCiaInstall(ciaHandle: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_CancelCIAInstall(ciaHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_FinishCiaInstall(ciaHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_FinishCiaInstallWithoutCommit(ciaHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_CommitImportPrograms( mediaType: FS_MediaType, titleCount: u32_, @@ -5195,30 +5486,39 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteTicket(ticketId: u64_) -> Result; } extern "C" { + #[must_use] pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result; } extern "C" { + #[must_use] pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallNativeFirm() -> Result; } extern "C" { + #[must_use] pub fn AM_InstallFirm(titleID: u64_) -> Result; } extern "C" { + #[must_use] pub fn AM_GetTitleProductCode( mediatype: FS_MediaType, titleId: u64_, @@ -5226,6 +5526,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetTitleExtDataId( extDataId: *mut u64_, mediatype: FS_MediaType, @@ -5233,6 +5534,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetCiaFileInfo( mediatype: FS_MediaType, titleEntry: *mut AM_TitleEntry, @@ -5240,18 +5542,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_GetCiaRequiredSpace( requiredSpace: *mut u64_, mediaType: FS_MediaType, @@ -5259,6 +5566,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_GetCiaMetaSection( meta: *mut ::libc::c_void, size: u32_, @@ -5266,36 +5574,47 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result; } extern "C" { + #[must_use] pub fn AM_QueryAvailableExternalTitleDatabase(available: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTicketBegin(ticketHandle: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTicketAbort(ticketHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTitleStop() -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTitleAbort() -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTitleFinish() -> Result; } extern "C" { + #[must_use] pub fn AM_CommitImportTitles( mediaType: FS_MediaType, titleCount: u32_, @@ -5304,24 +5623,31 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTmdBegin(tmdHandle: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTmdAbort(tmdHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result; } extern "C" { + #[must_use] pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallContentStop(contentHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallContentResume( contentHandle: *mut Handle, resumeOffset: *mut u64_, @@ -5329,12 +5655,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallContentCancel(contentHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_InstallContentFinish(contentHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn AM_ImportCertificates( cert1Size: u32_, cert1: *mut ::libc::c_void, @@ -5347,9 +5676,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result; } extern "C" { + #[must_use] pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto( mediaType: FS_MediaType, titleCount: u32_, @@ -5358,18 +5689,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteAllDemoLaunchInfos() -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteAllTemporaryTitles() -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteAllExpiredTitles(mediatype: FS_MediaType) -> Result; } extern "C" { + #[must_use] pub fn AM_DeleteAllTwlTitles() -> Result; } extern "C" { + #[must_use] pub fn AMAPP_GetDLCContentInfoCount( count: *mut u32_, mediatype: FS_MediaType, @@ -5377,6 +5713,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AMAPP_ListDLCContentInfos( contentInfoRead: *mut u32_, mediatype: FS_MediaType, @@ -5387,12 +5724,14 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn ampxiInit(servhandle: Handle) -> Result; } extern "C" { pub fn ampxiExit(); } extern "C" { + #[must_use] pub fn AMPXI_WriteTWLSavedata( titleid: u64_, buffer: *mut u8_, @@ -5403,6 +5742,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn AMPXI_InstallTitlesFinish( mediaType: FS_MediaType, db: u8_, @@ -5526,12 +5866,14 @@ pub type aptMessageCb = ::core::option::Option< ), >; extern "C" { + #[must_use] pub fn aptInit() -> Result; } extern "C" { pub fn aptExit(); } extern "C" { + #[must_use] pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result; } extern "C" { @@ -5594,9 +5936,11 @@ extern "C" { pub fn aptSetChainloaderToSelf(); } extern "C" { + #[must_use] pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn APT_Initialize( appId: NS_APPID, attr: APT_AppletAttr, @@ -5605,15 +5949,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_Finalize(appId: NS_APPID) -> Result; } extern "C" { + #[must_use] pub fn APT_HardwareResetAsync() -> Result; } extern "C" { + #[must_use] pub fn APT_Enable(attr: APT_AppletAttr) -> Result; } extern "C" { + #[must_use] pub fn APT_GetAppletManInfo( inpos: APT_AppletPos, outpos: *mut APT_AppletPos, @@ -5623,6 +5971,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_GetAppletInfo( appID: NS_APPID, pProgramID: *mut u64_, @@ -5633,15 +5982,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn APT_PrepareToJumpToHomeMenu() -> Result; } extern "C" { + #[must_use] pub fn APT_JumpToHomeMenu( param: *const ::libc::c_void, paramSize: size_t, @@ -5649,9 +6002,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_PrepareToJumpToApplication(exiting: bool) -> Result; } extern "C" { + #[must_use] pub fn APT_JumpToApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -5659,18 +6014,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result; } extern "C" { + #[must_use] pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result; } extern "C" { + #[must_use] pub fn APT_NotifyToWait(appID: NS_APPID) -> Result; } extern "C" { + #[must_use] pub fn APT_AppletUtility( id: ::libc::c_int, out: *mut ::libc::c_void, @@ -5680,18 +6040,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_SleepIfShellClosed() -> Result; } extern "C" { + #[must_use] pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result; } extern "C" { + #[must_use] pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn APT_UnlockTransition(transition: u32_) -> Result; } extern "C" { + #[must_use] pub fn APT_GlanceParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -5703,6 +6068,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_ReceiveParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -5714,6 +6080,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_SendParameter( source: NS_APPID, dest: NS_APPID, @@ -5724,21 +6091,27 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_CancelParameter(source: NS_APPID, dest: NS_APPID, success: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn APT_SendCaptureBufferInfo(captureBuf: *const aptCaptureBufInfo) -> Result; } extern "C" { + #[must_use] pub fn APT_ReplySleepQuery(appID: NS_APPID, reply: APT_QueryReply) -> Result; } extern "C" { + #[must_use] pub fn APT_ReplySleepNotificationComplete(appID: NS_APPID) -> Result; } extern "C" { + #[must_use] pub fn APT_PrepareToCloseApplication(cancelPreload: bool) -> Result; } extern "C" { + #[must_use] pub fn APT_CloseApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -5746,18 +6119,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result; } extern "C" { + #[must_use] pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn APT_CheckNew3DS(out: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result; } extern "C" { + #[must_use] pub fn APT_DoApplicationJump( param: *const ::libc::c_void, paramSize: size_t, @@ -5765,9 +6143,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_PrepareToStartLibraryApplet(appID: NS_APPID) -> Result; } extern "C" { + #[must_use] pub fn APT_StartLibraryApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -5776,9 +6156,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_PrepareToStartSystemApplet(appID: NS_APPID) -> Result; } extern "C" { + #[must_use] pub fn APT_StartSystemApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -5787,9 +6169,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn APT_ReceiveDeliverArg( param: *const ::libc::c_void, paramSize: size_t, @@ -5837,9 +6221,11 @@ pub type bossNsDataHeaderInfoTypes = ::libc::c_uint; pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSizes = 4; pub type bossNsDataHeaderInfoTypeSizes = ::libc::c_uint; extern "C" { + #[must_use] pub fn bossInit(programID: u64_, force_user: bool) -> Result; } extern "C" { + #[must_use] pub fn bossReinit(programID: u64_) -> Result; } extern "C" { @@ -5849,21 +6235,27 @@ extern "C" { pub fn bossGetSessionHandle() -> Handle; } extern "C" { + #[must_use] pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result; } extern "C" { + #[must_use] pub fn bossUnregisterStorage() -> Result; } extern "C" { + #[must_use] pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result; } extern "C" { + #[must_use] pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn bossDeleteNsData(NsDataId: u32_) -> Result; } extern "C" { + #[must_use] pub fn bossGetNsDataHeaderInfo( NsDataId: u32_, type_: u8_, @@ -5872,6 +6264,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn bossReadNsData( NsDataId: u32_, offset: u64_, @@ -5882,15 +6275,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result; } extern "C" { + #[must_use] pub fn bossGetTaskState( taskID: *const ::libc::c_char, inval: s8, @@ -5900,6 +6297,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result; } extern "C" { @@ -5910,6 +6308,7 @@ extern "C" { ); } extern "C" { + #[must_use] pub fn bossSendContextConfig(ctx: *mut bossContext) -> Result; } pub const INPUT_YUV422_INDIV_8: Y2RU_InputFormat = 0; @@ -6085,90 +6484,117 @@ pub struct Y2RU_DitheringWeightParams { pub w3_xOdd_yOdd: u16_, } extern "C" { + #[must_use] pub fn y2rInit() -> Result; } extern "C" { pub fn y2rExit(); } extern "C" { + #[must_use] pub fn Y2RU_SetInputFormat(format: Y2RU_InputFormat) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetInputFormat(format: *mut Y2RU_InputFormat) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetOutputFormat(format: Y2RU_OutputFormat) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetOutputFormat(format: *mut Y2RU_OutputFormat) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetRotation(rotation: Y2RU_Rotation) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetRotation(rotation: *mut Y2RU_Rotation) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetBlockAlignment(alignment: Y2RU_BlockAlignment) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetBlockAlignment(alignment: *mut Y2RU_BlockAlignment) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetSpacialDithering(enable: bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetSpacialDithering(enabled: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetTemporalDithering(enable: bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetCoefficients(coefficients: *mut Y2RU_ColorCoefficients) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetStandardCoefficient(coefficient: Y2RU_StandardCoefficient) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetStandardCoefficient( coefficients: *mut Y2RU_ColorCoefficients, standardCoeff: Y2RU_StandardCoefficient, ) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetAlpha(alpha: u16_) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetTransferEndInterrupt(should_interrupt: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetSendingY( src_buf: *const ::libc::c_void, image_size: u32_, @@ -6177,6 +6603,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetSendingU( src_buf: *const ::libc::c_void, image_size: u32_, @@ -6185,6 +6612,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetSendingV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -6193,6 +6621,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetSendingYUYV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -6201,6 +6630,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetReceiving( dst_buf: *mut ::libc::c_void, image_size: u32_, @@ -6209,60 +6639,74 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_IsDoneSendingY(is_done: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_IsDoneSendingU(is_done: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_IsDoneSendingV(is_done: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_IsDoneSendingYUYV(is_done: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetDitheringWeightParams(params: *const Y2RU_DitheringWeightParams) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_GetDitheringWeightParams(params: *mut Y2RU_DitheringWeightParams) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_SetConversionParams(params: *const Y2RU_ConversionParams) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_StartConversion() -> Result; } extern "C" { + #[must_use] pub fn Y2RU_StopConversion() -> Result; } extern "C" { + #[must_use] pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn Y2RU_DriverInitialize() -> Result; } extern "C" { + #[must_use] pub fn Y2RU_DriverFinalize() -> Result; } -pub const PORT_NONE: ::libc::c_uint = 0; -pub const PORT_CAM1: ::libc::c_uint = 1; -pub const PORT_CAM2: ::libc::c_uint = 2; -pub const PORT_BOTH: ::libc::c_uint = 3; +pub const PORT_NONE: _bindgen_ty_15 = 0; +pub const PORT_CAM1: _bindgen_ty_15 = 1; +pub const PORT_CAM2: _bindgen_ty_15 = 2; +pub const PORT_BOTH: _bindgen_ty_15 = 3; pub type _bindgen_ty_15 = ::libc::c_uint; -pub const SELECT_NONE: ::libc::c_uint = 0; -pub const SELECT_OUT1: ::libc::c_uint = 1; -pub const SELECT_IN1: ::libc::c_uint = 2; -pub const SELECT_OUT2: ::libc::c_uint = 4; -pub const SELECT_IN1_OUT1: ::libc::c_uint = 3; -pub const SELECT_OUT1_OUT2: ::libc::c_uint = 5; -pub const SELECT_IN1_OUT2: ::libc::c_uint = 6; -pub const SELECT_ALL: ::libc::c_uint = 7; +pub const SELECT_NONE: _bindgen_ty_16 = 0; +pub const SELECT_OUT1: _bindgen_ty_16 = 1; +pub const SELECT_IN1: _bindgen_ty_16 = 2; +pub const SELECT_OUT2: _bindgen_ty_16 = 4; +pub const SELECT_IN1_OUT1: _bindgen_ty_16 = 3; +pub const SELECT_OUT1_OUT2: _bindgen_ty_16 = 5; +pub const SELECT_IN1_OUT2: _bindgen_ty_16 = 6; +pub const SELECT_ALL: _bindgen_ty_16 = 7; pub type _bindgen_ty_16 = ::libc::c_uint; pub const CONTEXT_NONE: CAMU_Context = 0; pub const CONTEXT_A: CAMU_Context = 1; @@ -6436,30 +6880,38 @@ pub struct CAMU_PackageParameterContextDetail { pub cropY1: s16, } extern "C" { + #[must_use] pub fn camInit() -> Result; } extern "C" { pub fn camExit(); } extern "C" { + #[must_use] pub fn CAMU_StartCapture(port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_StopCapture(port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_ClearBuffer(port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetReceiving( event: *mut Handle, dst: *mut ::libc::c_void, @@ -6469,30 +6921,39 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result; } extern "C" { + #[must_use] pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetTrimmingParams( port: u32_, xStart: s16, @@ -6502,6 +6963,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetTrimmingParams( xStart: *mut s16, yStart: *mut s16, @@ -6511,6 +6973,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetTrimmingParamsCenter( port: u32_, trimWidth: s16, @@ -6520,42 +6983,54 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_Activate(select: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetWhiteBalanceWithoutBaseUp( select: u32_, whiteBalance: CAMU_WhiteBalance, ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result; } extern "C" { + #[must_use] pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result; } extern "C" { + #[must_use] pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetDetailSize( select: u32_, width: s16, @@ -6568,24 +7043,31 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetOutputFormat( select: u32_, format: CAMU_OutputFormat, @@ -6593,6 +7075,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetAutoExposureWindow( select: u32_, x: s16, @@ -6602,6 +7085,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetAutoWhiteBalanceWindow( select: u32_, x: s16, @@ -6611,103 +7095,132 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetStereoCameraCalibrationData( data: *mut CAMU_StereoCameraCalibrationData, ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result; } extern "C" { + #[must_use] pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetImageQualityCalibrationData( data: *mut CAMU_ImageQualityCalibrationData, ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetPackageParameterWithoutContext( param: CAMU_PackageParameterCameraSelect, ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetPackageParameterWithContext(param: CAMU_PackageParameterContext) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetPackageParameterWithContextDetail( param: CAMU_PackageParameterContextDetail, ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetSuitableY2rStandardCoefficient( coefficient: *mut Y2RU_StandardCoefficient, ) -> Result; } extern "C" { + #[must_use] pub fn CAMU_PlayShutterSound(sound: CAMU_ShutterSoundType) -> Result; } extern "C" { + #[must_use] pub fn CAMU_DriverInitialize() -> Result; } extern "C" { + #[must_use] pub fn CAMU_DriverFinalize() -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetSleepCamera(select: u32_) -> Result; } extern "C" { + #[must_use] pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result; } extern "C" { + #[must_use] pub fn cfgnorInit(value: u8_) -> Result; } extern "C" { pub fn cfgnorExit(); } extern "C" { + #[must_use] pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn CFGNOR_Initialize(value: u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGNOR_Shutdown() -> Result; } extern "C" { + #[must_use] pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } pub const CFG_REGION_JPN: CFG_Region = 0; @@ -6739,116 +7252,144 @@ pub const CFG_MODEL_N3DSXL: CFG_SystemModel = 4; pub const CFG_MODEL_N2DSXL: CFG_SystemModel = 5; pub type CFG_SystemModel = ::libc::c_uint; extern "C" { + #[must_use] pub fn cfguInit() -> Result; } extern "C" { pub fn cfguExit(); } extern "C" { + #[must_use] pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { + #[must_use] pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { + #[must_use] pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { + #[must_use] pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { + #[must_use] pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { + #[must_use] pub fn CFG_UpdateConfigSavegame() -> Result; } extern "C" { + #[must_use] pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGI_RestoreLocalFriendCodeSeed() -> Result; } extern "C" { + #[must_use] pub fn CFGI_RestoreSecureInfo() -> Result; } extern "C" { + #[must_use] pub fn CFGI_DeleteConfigSavefile() -> Result; } extern "C" { + #[must_use] pub fn CFGI_FormatConfig() -> Result; } extern "C" { + #[must_use] pub fn CFGI_ClearParentalControls() -> Result; } extern "C" { + #[must_use] pub fn CFGI_VerifySigLocalFriendCodeSeed() -> Result; } extern "C" { + #[must_use] pub fn CFGI_VerifySigSecureInfo() -> Result; } extern "C" { + #[must_use] pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result; } -pub const CSND_ENCODING_PCM8: ::libc::c_uint = 0; -pub const CSND_ENCODING_PCM16: ::libc::c_uint = 1; -pub const CSND_ENCODING_ADPCM: ::libc::c_uint = 2; -pub const CSND_ENCODING_PSG: ::libc::c_uint = 3; +pub const CSND_ENCODING_PCM8: _bindgen_ty_17 = 0; +pub const CSND_ENCODING_PCM16: _bindgen_ty_17 = 1; +pub const CSND_ENCODING_ADPCM: _bindgen_ty_17 = 2; +pub const CSND_ENCODING_PSG: _bindgen_ty_17 = 3; pub type _bindgen_ty_17 = ::libc::c_uint; -pub const CSND_LOOPMODE_MANUAL: ::libc::c_uint = 0; -pub const CSND_LOOPMODE_NORMAL: ::libc::c_uint = 1; -pub const CSND_LOOPMODE_ONESHOT: ::libc::c_uint = 2; -pub const CSND_LOOPMODE_NORELOAD: ::libc::c_uint = 3; +pub const CSND_LOOPMODE_MANUAL: _bindgen_ty_18 = 0; +pub const CSND_LOOPMODE_NORMAL: _bindgen_ty_18 = 1; +pub const CSND_LOOPMODE_ONESHOT: _bindgen_ty_18 = 2; +pub const CSND_LOOPMODE_NORELOAD: _bindgen_ty_18 = 3; pub type _bindgen_ty_18 = ::libc::c_uint; -pub const SOUND_LINEAR_INTERP: ::libc::c_uint = 64; -pub const SOUND_REPEAT: ::libc::c_uint = 1024; -pub const SOUND_ONE_SHOT: ::libc::c_uint = 2048; -pub const SOUND_FORMAT_8BIT: ::libc::c_uint = 0; -pub const SOUND_FORMAT_16BIT: ::libc::c_uint = 4096; -pub const SOUND_FORMAT_ADPCM: ::libc::c_uint = 8192; -pub const SOUND_FORMAT_PSG: ::libc::c_uint = 12288; -pub const SOUND_ENABLE: ::libc::c_uint = 16384; +pub const SOUND_LINEAR_INTERP: _bindgen_ty_19 = 64; +pub const SOUND_REPEAT: _bindgen_ty_19 = 1024; +pub const SOUND_ONE_SHOT: _bindgen_ty_19 = 2048; +pub const SOUND_FORMAT_8BIT: _bindgen_ty_19 = 0; +pub const SOUND_FORMAT_16BIT: _bindgen_ty_19 = 4096; +pub const SOUND_FORMAT_ADPCM: _bindgen_ty_19 = 8192; +pub const SOUND_FORMAT_PSG: _bindgen_ty_19 = 12288; +pub const SOUND_ENABLE: _bindgen_ty_19 = 16384; pub type _bindgen_ty_19 = ::libc::c_uint; -pub const CAPTURE_REPEAT: ::libc::c_uint = 0; -pub const CAPTURE_ONE_SHOT: ::libc::c_uint = 1; -pub const CAPTURE_FORMAT_16BIT: ::libc::c_uint = 0; -pub const CAPTURE_FORMAT_8BIT: ::libc::c_uint = 2; -pub const CAPTURE_ENABLE: ::libc::c_uint = 32768; +pub const CAPTURE_REPEAT: _bindgen_ty_20 = 0; +pub const CAPTURE_ONE_SHOT: _bindgen_ty_20 = 1; +pub const CAPTURE_FORMAT_16BIT: _bindgen_ty_20 = 0; +pub const CAPTURE_FORMAT_8BIT: _bindgen_ty_20 = 2; +pub const CAPTURE_ENABLE: _bindgen_ty_20 = 32768; pub type _bindgen_ty_20 = ::libc::c_uint; pub const DutyCycle_0: CSND_DutyCycle = 7; pub const DutyCycle_12: CSND_DutyCycle = 0; @@ -6918,24 +7459,31 @@ extern "C" { pub static mut csndChannels: u32_; } extern "C" { + #[must_use] pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result; } extern "C" { + #[must_use] pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn CSND_Reset() -> Result; } extern "C" { + #[must_use] pub fn csndInit() -> Result; } extern "C" { @@ -6948,6 +7496,7 @@ extern "C" { pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_); } extern "C" { + #[must_use] pub fn csndExecCmds(waitDone: bool) -> Result; } extern "C" { @@ -7034,12 +7583,15 @@ extern "C" { pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_); } extern "C" { + #[must_use] pub fn CSND_SetDspFlags(waitDone: bool) -> Result; } extern "C" { + #[must_use] pub fn CSND_UpdateInfo(waitDone: bool) -> Result; } extern "C" { + #[must_use] pub fn csndPlaySound( chn: ::libc::c_int, flags: u32_, @@ -7061,9 +7613,11 @@ extern "C" { pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo; } extern "C" { + #[must_use] pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result; } extern "C" { + #[must_use] pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result; } pub const DSP_INTERRUPT_PIPE: DSP_InterruptType = 2; @@ -7090,6 +7644,7 @@ impl Default for tag_dspHookCookie { } pub type dspHookCookie = tag_dspHookCookie; extern "C" { + #[must_use] pub fn dspInit() -> Result; } extern "C" { @@ -7105,24 +7660,31 @@ extern "C" { pub fn dspUnhook(cookie: *mut dspHookCookie); } extern "C" { + #[must_use] pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn DSP_SetSemaphore(value: u16_) -> Result; } extern "C" { + #[must_use] pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result; } extern "C" { + #[must_use] pub fn DSP_LoadComponent( component: *const ::libc::c_void, size: u32_, @@ -7132,12 +7694,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn DSP_UnloadComponent() -> Result; } extern "C" { + #[must_use] pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result; } extern "C" { + #[must_use] pub fn DSP_ReadPipeIfPossible( channel: u32_, peer: u32_, @@ -7147,6 +7712,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn DSP_WriteProcessPipe( channel: u32_, buffer: *const ::libc::c_void, @@ -7154,27 +7720,33 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn DSP_ConvertProcessAddressFromDspDram( dsp_address: u32_, arm_address: *mut u32_, ) -> Result; } extern "C" { + #[must_use] pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result; } extern "C" { + #[must_use] pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result; } extern "C" { + #[must_use] pub fn DSP_SendDataIsEmpty(regNo: u16_, is_empty: *mut bool) -> Result; } pub type FSPXI_Archive = u64_; pub type FSPXI_File = u64_; pub type FSPXI_Directory = u64_; extern "C" { + #[must_use] pub fn FSPXI_OpenFile( serviceHandle: Handle, out: *mut FSPXI_File, @@ -7185,10 +7757,12 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_RenameFile( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -7198,6 +7772,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_DeleteDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -7205,6 +7780,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CreateFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -7214,6 +7790,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CreateDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -7222,6 +7799,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_RenameDirectory( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -7231,6 +7809,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_OpenDirectory( serviceHandle: Handle, out: *mut FSPXI_Directory, @@ -7239,6 +7818,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ReadFile( serviceHandle: Handle, file: FSPXI_File, @@ -7249,6 +7829,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CalculateFileHashSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -7257,6 +7838,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_WriteFile( serviceHandle: Handle, file: FSPXI_File, @@ -7268,6 +7850,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CalcSavegameMAC( serviceHandle: Handle, file: FSPXI_File, @@ -7278,15 +7861,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ReadDirectory( serviceHandle: Handle, directory: FSPXI_Directory, @@ -7296,9 +7883,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_OpenArchive( serviceHandle: Handle, archive: *mut FSPXI_Archive, @@ -7307,6 +7896,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_HasFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -7315,6 +7905,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_HasDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -7323,12 +7914,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_Unknown0x17( serviceHandle: Handle, archive: FSPXI_Archive, @@ -7336,69 +7930,89 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSdmcArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetNandArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ClearSdmcLog(serviceHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ClearNandLog(serviceHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectCommandWithAddress( serviceHandle: Handle, commandId: u8_, @@ -7406,6 +8020,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectRead( serviceHandle: Handle, commandId: u8_, @@ -7414,6 +8029,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectReadWithAddress( serviceHandle: Handle, commandId: u8_, @@ -7423,6 +8039,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectWrite( serviceHandle: Handle, commandId: u8_, @@ -7431,6 +8048,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectWriteWithAddress( serviceHandle: Handle, commandId: u8_, @@ -7440,6 +8058,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectRead_4xIO( serviceHandle: Handle, commandId: u8_, @@ -7449,6 +8068,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify( serviceHandle: Handle, address: u32_, @@ -7457,12 +8077,14 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify( serviceHandle: Handle, address: u32_, ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetProductInfo( serviceHandle: Handle, info: *mut FS_ProductInfo, @@ -7470,21 +8092,27 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_EnumerateExtSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -7496,6 +8124,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSpecialContentIndex( serviceHandle: Handle, index: *mut u16_, @@ -7505,6 +8134,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetLegacyRomHeader( serviceHandle: Handle, mediaType: FS_MediaType, @@ -7513,6 +8143,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetLegacyBannerData( serviceHandle: Handle, mediaType: FS_MediaType, @@ -7522,24 +8153,31 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_DeleteSdmcRoot(serviceHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_DeleteAllExtSaveDataOnNand(serviceHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_InitializeCtrFilesystem(serviceHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_CreateSeed(serviceHandle: Handle) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetArchiveResource( serviceHandle: Handle, archiveResource: *mut FS_ArchiveResource, @@ -7547,18 +8185,21 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ExportIntegrityVerificationSeed( serviceHandle: Handle, seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ImportIntegrityVerificationSeed( serviceHandle: Handle, seed: *const FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetLegacySubBannerData( serviceHandle: Handle, bannerSize: u32_, @@ -7568,6 +8209,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GenerateRandomBytes( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -7575,6 +8217,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetFileLastModified( serviceHandle: Handle, archive: FSPXI_Archive, @@ -7584,6 +8227,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ReadSpecialFile( serviceHandle: Handle, bytesRead: *mut u32_, @@ -7593,15 +8237,18 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_StartDeviceMoveAsSource( serviceHandle: Handle, context: *mut FS_DeviceMoveContext, ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_StartDeviceMoveAsDestination( serviceHandle: Handle, context: FS_DeviceMoveContext, @@ -7609,6 +8256,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ReadFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -7622,6 +8270,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_WriteFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -7636,15 +8285,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_EnumerateSystemSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -7653,6 +8306,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_ReadNandReport( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -7661,6 +8315,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSPXI_Unknown0x56( serviceHandle: Handle, out: *mut u32_, @@ -7669,6 +8324,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn fsRegInit() -> Result; } extern "C" { @@ -7678,6 +8334,7 @@ extern "C" { pub fn fsRegGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn FSREG_Register( pid: u32_, programHandle: u64_, @@ -7686,9 +8343,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSREG_Unregister(pid: u32_) -> Result; } extern "C" { + #[must_use] pub fn FSREG_GetProgramInfo( exheaderInfos: *mut ExHeader_Info, maxNumEntries: u32_, @@ -7696,15 +8355,18 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FSREG_LoadProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, ) -> Result; } extern "C" { + #[must_use] pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result; } extern "C" { + #[must_use] pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result; } #[repr(C)] @@ -8901,6 +9563,7 @@ pub const FRIEND_REGISTERED_USER: NotificationTypes = 8; pub const FRIEND_SENT_INVITATION: NotificationTypes = 9; pub type NotificationTypes = ::libc::c_uint; extern "C" { + #[must_use] pub fn frdInit() -> Result; } extern "C" { @@ -8910,21 +9573,27 @@ extern "C" { pub fn frdGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FRDU_IsOnline(state: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FRD_Logout() -> Result; } extern "C" { + #[must_use] pub fn FRD_Login(event: Handle) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyPreference( isPublicMode: *mut bool, isShowGameName: *mut bool, @@ -8932,24 +9601,31 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetFriendKeyList( friendKeyList: *mut FriendKey, num: *mut u32_, @@ -8958,6 +9634,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetFriendMii( miiDataList: *mut MiiData, friendKeyList: *const FriendKey, @@ -8965,6 +9642,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetFriendProfile( profile: *mut FriendProfile, friendKeyList: *const FriendKey, @@ -8972,6 +9650,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetFriendPlayingGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -8979,6 +9658,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetFriendFavouriteGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -8986,15 +9666,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn FRD_AttachToEventNotification(event: Handle) -> Result; } extern "C" { + #[must_use] pub fn FRD_GetEventNotification( event: *mut NotificationEvent, count: u32_, @@ -9002,87 +9686,106 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result; } extern "C" { + #[must_use] pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result; } extern "C" { + #[must_use] pub fn FRD_RemoveFriend(principalId: u32_, localFriendCode: u64_) -> Result; } -pub const GSPLCD_SCREEN_TOP: ::libc::c_uint = 1; -pub const GSPLCD_SCREEN_BOTTOM: ::libc::c_uint = 2; -pub const GSPLCD_SCREEN_BOTH: ::libc::c_uint = 3; +pub const GSPLCD_SCREEN_TOP: _bindgen_ty_21 = 1; +pub const GSPLCD_SCREEN_BOTTOM: _bindgen_ty_21 = 2; +pub const GSPLCD_SCREEN_BOTH: _bindgen_ty_21 = 3; pub type _bindgen_ty_21 = ::libc::c_uint; extern "C" { + #[must_use] pub fn gspLcdInit() -> Result; } extern "C" { pub fn gspLcdExit(); } extern "C" { + pub fn gspLcdGetSessionHandle() -> *mut Handle; +} +extern "C" { + #[must_use] pub fn GSPLCD_PowerOnAllBacklights() -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_PowerOffAllBacklights() -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result; } extern "C" { + #[must_use] pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result; } -pub const KEY_A: ::libc::c_uint = 1; -pub const KEY_B: ::libc::c_uint = 2; -pub const KEY_SELECT: ::libc::c_uint = 4; -pub const KEY_START: ::libc::c_uint = 8; -pub const KEY_DRIGHT: ::libc::c_uint = 16; -pub const KEY_DLEFT: ::libc::c_uint = 32; -pub const KEY_DUP: ::libc::c_uint = 64; -pub const KEY_DDOWN: ::libc::c_uint = 128; -pub const KEY_R: ::libc::c_uint = 256; -pub const KEY_L: ::libc::c_uint = 512; -pub const KEY_X: ::libc::c_uint = 1024; -pub const KEY_Y: ::libc::c_uint = 2048; -pub const KEY_ZL: ::libc::c_uint = 16384; -pub const KEY_ZR: ::libc::c_uint = 32768; -pub const KEY_TOUCH: ::libc::c_uint = 1048576; -pub const KEY_CSTICK_RIGHT: ::libc::c_uint = 16777216; -pub const KEY_CSTICK_LEFT: ::libc::c_uint = 33554432; -pub const KEY_CSTICK_UP: ::libc::c_uint = 67108864; -pub const KEY_CSTICK_DOWN: ::libc::c_uint = 134217728; -pub const KEY_CPAD_RIGHT: ::libc::c_uint = 268435456; -pub const KEY_CPAD_LEFT: ::libc::c_uint = 536870912; -pub const KEY_CPAD_UP: ::libc::c_uint = 1073741824; -pub const KEY_CPAD_DOWN: ::libc::c_uint = 2147483648; -pub const KEY_UP: ::libc::c_uint = 1073741888; -pub const KEY_DOWN: ::libc::c_uint = 2147483776; -pub const KEY_LEFT: ::libc::c_uint = 536870944; -pub const KEY_RIGHT: ::libc::c_uint = 268435472; +pub const KEY_A: _bindgen_ty_22 = 1; +pub const KEY_B: _bindgen_ty_22 = 2; +pub const KEY_SELECT: _bindgen_ty_22 = 4; +pub const KEY_START: _bindgen_ty_22 = 8; +pub const KEY_DRIGHT: _bindgen_ty_22 = 16; +pub const KEY_DLEFT: _bindgen_ty_22 = 32; +pub const KEY_DUP: _bindgen_ty_22 = 64; +pub const KEY_DDOWN: _bindgen_ty_22 = 128; +pub const KEY_R: _bindgen_ty_22 = 256; +pub const KEY_L: _bindgen_ty_22 = 512; +pub const KEY_X: _bindgen_ty_22 = 1024; +pub const KEY_Y: _bindgen_ty_22 = 2048; +pub const KEY_ZL: _bindgen_ty_22 = 16384; +pub const KEY_ZR: _bindgen_ty_22 = 32768; +pub const KEY_TOUCH: _bindgen_ty_22 = 1048576; +pub const KEY_CSTICK_RIGHT: _bindgen_ty_22 = 16777216; +pub const KEY_CSTICK_LEFT: _bindgen_ty_22 = 33554432; +pub const KEY_CSTICK_UP: _bindgen_ty_22 = 67108864; +pub const KEY_CSTICK_DOWN: _bindgen_ty_22 = 134217728; +pub const KEY_CPAD_RIGHT: _bindgen_ty_22 = 268435456; +pub const KEY_CPAD_LEFT: _bindgen_ty_22 = 536870912; +pub const KEY_CPAD_UP: _bindgen_ty_22 = 1073741824; +pub const KEY_CPAD_DOWN: _bindgen_ty_22 = 2147483648; +pub const KEY_UP: _bindgen_ty_22 = 1073741888; +pub const KEY_DOWN: _bindgen_ty_22 = 2147483776; +pub const KEY_LEFT: _bindgen_ty_22 = 536870944; +pub const KEY_RIGHT: _bindgen_ty_22 = 268435472; pub type _bindgen_ty_22 = ::libc::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -9124,6 +9827,7 @@ extern "C" { pub static mut hidSharedMem: *mut vu32; } extern "C" { + #[must_use] pub fn hidInit() -> Result; } extern "C" { @@ -9163,9 +9867,11 @@ extern "C" { pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool); } extern "C" { + #[must_use] pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result; } extern "C" { + #[must_use] pub fn HIDUSER_GetHandles( outMemHandle: *mut Handle, eventpad0: *mut Handle, @@ -9176,21 +9882,27 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn HIDUSER_EnableAccelerometer() -> Result; } extern "C" { + #[must_use] pub fn HIDUSER_DisableAccelerometer() -> Result; } extern "C" { + #[must_use] pub fn HIDUSER_EnableGyroscope() -> Result; } extern "C" { + #[must_use] pub fn HIDUSER_DisableGyroscope() -> Result; } extern "C" { + #[must_use] pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result; } extern "C" { + #[must_use] pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result; } extern "C" { @@ -9203,6 +9915,7 @@ extern "C" { pub static mut irrstEvent: Handle; } extern "C" { + #[must_use] pub fn irrstInit() -> Result; } extern "C" { @@ -9221,12 +9934,15 @@ extern "C" { pub fn irrstWaitForEvent(nextEvent: bool); } extern "C" { + #[must_use] pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result; } extern "C" { + #[must_use] pub fn IRRST_Shutdown() -> Result; } #[repr(C)] @@ -9250,23 +9966,27 @@ pub const SSLC_DefaultRootCert_DigiCert_EV: SSLC_DefaultRootCert = 11; pub type SSLC_DefaultRootCert = ::libc::c_uint; pub const SSLC_DefaultClientCert_ClCertA: SSLC_DefaultClientCert = 64; pub type SSLC_DefaultClientCert = ::libc::c_uint; -pub const SSLCOPT_Default: ::libc::c_uint = 0; -pub const SSLCOPT_DisableVerify: ::libc::c_uint = 512; -pub const SSLCOPT_TLSv10: ::libc::c_uint = 2048; +pub const SSLCOPT_Default: _bindgen_ty_23 = 0; +pub const SSLCOPT_DisableVerify: _bindgen_ty_23 = 512; +pub const SSLCOPT_TLSv10: _bindgen_ty_23 = 2048; pub type _bindgen_ty_23 = ::libc::c_uint; extern "C" { + #[must_use] pub fn sslcInit(session_handle: Handle) -> Result; } extern "C" { pub fn sslcExit(); } extern "C" { + #[must_use] pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcAddTrustedRootCA( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -9275,6 +9995,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -9282,18 +10003,22 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, ) -> Result; } extern "C" { + #[must_use] pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslc8CertChainAddCert( CertChain_contexthandle: u32_, cert: *const u8_, @@ -9302,6 +10027,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslc8CertChainAddDefaultCert( CertChain_contexthandle: u32_, certID: u8_, @@ -9309,12 +10035,14 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslc8CertChainRemoveCert( CertChain_contexthandle: u32_, cert_contexthandle: u32_, ) -> Result; } extern "C" { + #[must_use] pub fn sslcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -9324,21 +10052,26 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, ) -> Result; } extern "C" { + #[must_use] pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcSeedRNG() -> Result; } extern "C" { + #[must_use] pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcCreateContext( context: *mut sslcContext, sockfd: ::libc::c_int, @@ -9347,9 +10080,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslcDestroyContext(context: *mut sslcContext) -> Result; } extern "C" { + #[must_use] pub fn sslcStartConnection( context: *mut sslcContext, internal_retval: *mut ::libc::c_int, @@ -9357,6 +10092,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslcRead( context: *mut sslcContext, buf: *mut ::libc::c_void, @@ -9365,21 +10101,27 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslcWrite(context: *mut sslcContext, buf: *const ::libc::c_void, len: size_t) -> Result; } extern "C" { + #[must_use] pub fn sslcContextSetRootCertChain(context: *mut sslcContext, handle: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcContextSetClientCert(context: *mut sslcContext, handle: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcContextSetHandle8(context: *mut sslcContext, handle: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcContextClearOpt(context: *mut sslcContext, bitmask: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcContextGetProtocolCipher( context: *mut sslcContext, outprotocols: *mut ::libc::c_char, @@ -9389,13 +10131,16 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn sslcContextGetState(context: *mut sslcContext, out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcContextInitSharedmem(context: *mut sslcContext, buf: *mut u8_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn sslcAddCert(context: *mut sslcContext, buf: *const u8_, size: u32_) -> Result; } #[repr(C)] @@ -9417,12 +10162,14 @@ pub const HTTPC_KEEPALIVE_DISABLED: HTTPC_KeepAlive = 0; pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1; pub type HTTPC_KeepAlive = ::libc::c_uint; extern "C" { + #[must_use] pub fn httpcInit(sharedmem_size: u32_) -> Result; } extern "C" { pub fn httpcExit(); } extern "C" { + #[must_use] pub fn httpcOpenContext( context: *mut httpcContext, method: HTTPC_RequestMethod, @@ -9431,12 +10178,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcCloseContext(context: *mut httpcContext) -> Result; } extern "C" { + #[must_use] pub fn httpcCancelConnection(context: *mut httpcContext) -> Result; } extern "C" { + #[must_use] pub fn httpcAddRequestHeaderField( context: *mut httpcContext, name: *const ::libc::c_char, @@ -9444,6 +10194,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcAddPostDataAscii( context: *mut httpcContext, name: *const ::libc::c_char, @@ -9451,6 +10202,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcAddPostDataBinary( context: *mut httpcContext, name: *const ::libc::c_char, @@ -9459,15 +10211,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcBeginRequest(context: *mut httpcContext) -> Result; } extern "C" { + #[must_use] pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcReceiveDataTimeout( context: *mut httpcContext, buffer: *mut u8_, @@ -9476,12 +10232,14 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcGetRequestState( context: *mut httpcContext, out: *mut HTTPC_RequestStatus, ) -> Result; } extern "C" { + #[must_use] pub fn httpcGetDownloadSizeState( context: *mut httpcContext, downloadedsize: *mut u32_, @@ -9489,9 +10247,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcGetResponseStatusCodeTimeout( context: *mut httpcContext, out: *mut u32_, @@ -9499,6 +10259,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcGetResponseHeader( context: *mut httpcContext, name: *const ::libc::c_char, @@ -9507,6 +10268,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcAddTrustedRootCA( context: *mut httpcContext, cert: *const u8_, @@ -9514,15 +10276,18 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcAddDefaultCert(context: *mut httpcContext, certID: SSLC_DefaultRootCert) -> Result; } extern "C" { + #[must_use] pub fn httpcSelectRootCertChain( context: *mut httpcContext, RootCertChain_contexthandle: u32_, ) -> Result; } extern "C" { + #[must_use] pub fn httpcSetClientCert( context: *mut httpcContext, cert: *const u8_, @@ -9532,30 +10297,37 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcSetClientCertDefault( context: *mut httpcContext, certID: SSLC_DefaultClientCert, ) -> Result; } extern "C" { + #[must_use] pub fn httpcSetClientCertContext( context: *mut httpcContext, ClientCert_contexthandle: u32_, ) -> Result; } extern "C" { + #[must_use] pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcRootCertChainAddCert( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -9564,6 +10336,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -9571,12 +10344,14 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, ) -> Result; } extern "C" { + #[must_use] pub fn httpcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -9586,15 +10361,18 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, ) -> Result; } extern "C" { + #[must_use] pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { + #[must_use] pub fn httpcDownloadData( context: *mut httpcContext, buffer: *mut u8_, @@ -9603,6 +10381,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result; } #[repr(C)] @@ -9752,30 +10531,33 @@ impl Default for udsNetworkScanInfo { } } } -pub const UDSNETATTR_DisableConnectSpectators: ::libc::c_uint = 1; -pub const UDSNETATTR_DisableConnectClients: ::libc::c_uint = 2; -pub const UDSNETATTR_x4: ::libc::c_uint = 4; -pub const UDSNETATTR_Default: ::libc::c_uint = 32768; +pub const UDSNETATTR_DisableConnectSpectators: _bindgen_ty_24 = 1; +pub const UDSNETATTR_DisableConnectClients: _bindgen_ty_24 = 2; +pub const UDSNETATTR_x4: _bindgen_ty_24 = 4; +pub const UDSNETATTR_Default: _bindgen_ty_24 = 32768; pub type _bindgen_ty_24 = ::libc::c_uint; -pub const UDS_SENDFLAG_Default: ::libc::c_uint = 1; -pub const UDS_SENDFLAG_Broadcast: ::libc::c_uint = 2; +pub const UDS_SENDFLAG_Default: _bindgen_ty_25 = 1; +pub const UDS_SENDFLAG_Broadcast: _bindgen_ty_25 = 2; pub type _bindgen_ty_25 = ::libc::c_uint; pub const UDSCONTYPE_Client: udsConnectionType = 1; pub const UDSCONTYPE_Spectator: udsConnectionType = 2; pub type udsConnectionType = ::libc::c_uint; extern "C" { + #[must_use] pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result; } extern "C" { pub fn udsExit(); } extern "C" { + #[must_use] pub fn udsGenerateNodeInfo( nodeinfo: *mut udsNodeInfo, username: *const ::libc::c_char, ) -> Result; } extern "C" { + #[must_use] pub fn udsGetNodeInfoUsername( nodeinfo: *const udsNodeInfo, username: *mut ::libc::c_char, @@ -9793,6 +10575,7 @@ extern "C" { ); } extern "C" { + #[must_use] pub fn udsScanBeacons( outbuf: *mut ::libc::c_void, maxsize: size_t, @@ -9805,9 +10588,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result; } extern "C" { + #[must_use] pub fn udsGetApplicationData( buf: *mut ::libc::c_void, size: size_t, @@ -9815,6 +10600,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsGetNetworkStructApplicationData( network: *const udsNetworkStruct, buf: *mut ::libc::c_void, @@ -9823,6 +10609,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsBind( bindcontext: *mut udsBindContext, NetworkNodeID: u16_, @@ -9832,6 +10619,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsUnbind(bindcontext: *mut udsBindContext) -> Result; } extern "C" { @@ -9842,6 +10630,7 @@ extern "C" { ) -> bool; } extern "C" { + #[must_use] pub fn udsPullPacket( bindcontext: *const udsBindContext, buf: *mut ::libc::c_void, @@ -9851,6 +10640,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsSendTo( dst_NetworkNodeID: u16_, data_channel: u8_, @@ -9860,9 +10650,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsGetChannel(channel: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn udsCreateNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -9873,6 +10665,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsConnectNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -9885,33 +10678,42 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn udsDestroyNetwork() -> Result; } extern "C" { + #[must_use] pub fn udsDisconnectNetwork() -> Result; } extern "C" { + #[must_use] pub fn udsEjectClient(NetworkNodeID: u16_) -> Result; } extern "C" { + #[must_use] pub fn udsEjectSpectator() -> Result; } extern "C" { + #[must_use] pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result; } extern "C" { + #[must_use] pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result; } extern "C" { + #[must_use] pub fn udsAllowSpectators() -> Result; } extern "C" { + #[must_use] pub fn udsGetConnectionStatus(output: *mut udsConnectionStatus) -> Result; } extern "C" { pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool; } extern "C" { + #[must_use] pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result; } pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0; @@ -9952,60 +10754,78 @@ pub const NDM_DAEMON_STATUS_SUSPENDING: ndmDaemonStatus = 2; pub const NDM_DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3; pub type ndmDaemonStatus = ::libc::c_uint; extern "C" { + #[must_use] pub fn ndmuInit() -> Result; } extern "C" { pub fn ndmuExit(); } extern "C" { + #[must_use] pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result; } extern "C" { + #[must_use] pub fn NDMU_LeaveExclusiveState() -> Result; } extern "C" { + #[must_use] pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result; } extern "C" { + #[must_use] pub fn NDMU_LockState() -> Result; } extern "C" { + #[must_use] pub fn NDMU_UnlockState() -> Result; } extern "C" { + #[must_use] pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { + #[must_use] pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { + #[must_use] pub fn NDMU_SuspendScheduler(flag: u32_) -> Result; } extern "C" { + #[must_use] pub fn NDMU_ResumeScheduler() -> Result; } extern "C" { + #[must_use] pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result; } extern "C" { + #[must_use] pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result; } extern "C" { + #[must_use] pub fn NDMU_SetScanInterval(interval: u32_) -> Result; } extern "C" { + #[must_use] pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn NDMU_ResetDaemons() -> Result; } extern "C" { + #[must_use] pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result; } extern "C" { + #[must_use] pub fn NDMU_ClearMacFilter() -> Result; } pub const IM_DEFAULT: NIM_InstallationMode = 0; @@ -10046,9 +10866,11 @@ pub struct NIM_TitleProgress { pub totalSize: u64_, } extern "C" { + #[must_use] pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result; } extern "C" { + #[must_use] pub fn nimsInitWithTIN( buffer: *mut ::libc::c_void, buffer_len: size_t, @@ -10062,9 +10884,11 @@ extern "C" { pub fn nimsGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result; } extern "C" { @@ -10077,6 +10901,7 @@ extern "C" { ); } extern "C" { + #[must_use] pub fn NIMS_RegisterTask( cfg: *const NIM_TitleConfig, name: *const ::libc::c_char, @@ -10084,33 +10909,42 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn NIMS_UnregisterTask(titleId: u64_) -> Result; } extern "C" { + #[must_use] pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result; } extern "C" { + #[must_use] pub fn NIMS_StartDownloadSimple(cfg: *const NIM_TitleConfig) -> Result; } extern "C" { + #[must_use] pub fn NIMS_GetProgress(tp: *mut NIM_TitleProgress) -> Result; } extern "C" { + #[must_use] pub fn NIMS_CancelDownload() -> Result; } extern "C" { + #[must_use] pub fn nwmExtInit() -> Result; } extern "C" { pub fn nwmExtExit(); } extern "C" { + #[must_use] pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result; } extern "C" { + #[must_use] pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result; } extern "C" { @@ -10120,9 +10954,11 @@ extern "C" { pub fn iruGetServHandle() -> Handle; } extern "C" { + #[must_use] pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result; } extern "C" { + #[must_use] pub fn iruRecvData( buf: *mut u8_, size: u32_, @@ -10132,72 +10968,91 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn IRU_Initialize() -> Result; } extern "C" { + #[must_use] pub fn IRU_Shutdown() -> Result; } extern "C" { + #[must_use] pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn IRU_WaitSendTransfer() -> Result; } extern "C" { + #[must_use] pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result; } extern "C" { + #[must_use] pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn IRU_SetBitRate(value: u8_) -> Result; } extern "C" { + #[must_use] pub fn IRU_GetBitRate(out: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn IRU_SetIRLEDState(value: u32_) -> Result; } extern "C" { + #[must_use] pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn nsInit() -> Result; } extern "C" { pub fn nsExit(); } extern "C" { + #[must_use] pub fn NS_LaunchFIRM(titleid: u64_) -> Result; } extern "C" { + #[must_use] pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn NS_TerminateTitle() -> Result; } extern "C" { + #[must_use] pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result; } extern "C" { + #[must_use] pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result; } extern "C" { + #[must_use] pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result; } extern "C" { + #[must_use] pub fn NS_RebootSystem() -> Result; } -pub const PMLAUNCHFLAG_NORMAL_APPLICATION: ::libc::c_uint = 1; -pub const PMLAUNCHFLAG_LOAD_DEPENDENCIES: ::libc::c_uint = 2; -pub const PMLAUNCHFLAG_NOTIFY_TERMINATION: ::libc::c_uint = 4; -pub const PMLAUNCHFLAG_QUEUE_DEBUG_APPLICATION: ::libc::c_uint = 8; -pub const PMLAUNCHFLAG_TERMINATION_NOTIFICATION_MASK: ::libc::c_uint = 240; -pub const PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM: ::libc::c_uint = 256; -pub const PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM: ::libc::c_uint = 512; -pub const PMLAUNCHFLAG_USE_UPDATE_TITLE: ::libc::c_uint = 65536; +pub const PMLAUNCHFLAG_NORMAL_APPLICATION: _bindgen_ty_26 = 1; +pub const PMLAUNCHFLAG_LOAD_DEPENDENCIES: _bindgen_ty_26 = 2; +pub const PMLAUNCHFLAG_NOTIFY_TERMINATION: _bindgen_ty_26 = 4; +pub const PMLAUNCHFLAG_QUEUE_DEBUG_APPLICATION: _bindgen_ty_26 = 8; +pub const PMLAUNCHFLAG_TERMINATION_NOTIFICATION_MASK: _bindgen_ty_26 = 240; +pub const PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM: _bindgen_ty_26 = 256; +pub const PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM: _bindgen_ty_26 = 512; +pub const PMLAUNCHFLAG_USE_UPDATE_TITLE: _bindgen_ty_26 = 65536; pub type _bindgen_ty_26 = ::libc::c_uint; extern "C" { + #[must_use] pub fn pmAppInit() -> Result; } extern "C" { @@ -10207,9 +11062,11 @@ extern "C" { pub fn pmAppGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_LaunchTitleUpdate( programInfo: *const FS_ProgramInfo, programInfoUpdate: *const FS_ProgramInfo, @@ -10217,6 +11074,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_GetTitleExheaderFlags( outCoreInfo: *mut ExHeader_Arm11CoreInfo, outSiFlags: *mut ExHeader_SystemInfoFlags, @@ -10224,12 +11082,15 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_LaunchFIRMSetParams( firmTidLow: u32_, size: u32_, @@ -10237,27 +11098,35 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result; } extern "C" { + #[must_use] pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result; } extern "C" { + #[must_use] pub fn pmDbgInit() -> Result; } extern "C" { @@ -10267,6 +11136,7 @@ extern "C" { pub fn pmDbgGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn PMDBG_LaunchAppDebug( outDebug: *mut Handle, programInfo: *const FS_ProgramInfo, @@ -10274,9 +11144,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { + #[must_use] pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result; } pub const PS_ALGORITHM_CBC_ENC: PS_AESAlgorithm = 0; @@ -10315,9 +11187,11 @@ impl Default for psRSAContext { } } extern "C" { + #[must_use] pub fn psInit() -> Result; } extern "C" { + #[must_use] pub fn psInitHandle(handle: Handle) -> Result; } extern "C" { @@ -10327,9 +11201,11 @@ extern "C" { pub fn psGetSessionHandle() -> Handle; } extern "C" { + #[must_use] pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn PS_VerifyRsaSha256( hash: *mut u8_, ctx: *mut psRSAContext, @@ -10337,6 +11213,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PS_EncryptDecryptAes( size: u32_, in_: *mut u8_, @@ -10347,6 +11224,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PS_EncryptSignDecryptVerifyAesCcm( in_: *mut u8_, in_size: u32_, @@ -10361,15 +11239,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { + #[must_use] pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result; } extern "C" { + #[must_use] pub fn ptmuInit() -> Result; } extern "C" { @@ -10379,21 +11261,27 @@ extern "C" { pub fn ptmuGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn PTMU_GetShellState(out: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn PTMU_GetAdapterState(out: *mut bool) -> Result; } #[repr(C)] @@ -10408,18 +11296,19 @@ pub struct PtmSleepConfig { pub exit_sleep_events: PtmWakeEvents, pub continue_sleep_events: PtmWakeEvents, } -pub const PTMNOTIFID_SLEEP_REQUESTED: ::libc::c_uint = 257; -pub const PTMNOTIFID_SLEEP_DENIED: ::libc::c_uint = 258; -pub const PTMNOTIFID_SLEEP_ALLOWED: ::libc::c_uint = 259; -pub const PTMNOTIFID_GOING_TO_SLEEP: ::libc::c_uint = 260; -pub const PTMNOTIFID_FULLY_WAKING_UP: ::libc::c_uint = 261; -pub const PTMNOTIFID_FULLY_AWAKE: ::libc::c_uint = 262; -pub const PTMNOTIFID_HALF_AWAKE: ::libc::c_uint = 263; -pub const PTMNOTIFID_SHUTDOWN: ::libc::c_uint = 264; -pub const PTMNOTIFID_BATTERY_VERY_LOW: ::libc::c_uint = 529; -pub const PTMNOTIFID_BATTERY_LOW: ::libc::c_uint = 530; +pub const PTMNOTIFID_SLEEP_REQUESTED: _bindgen_ty_27 = 257; +pub const PTMNOTIFID_SLEEP_DENIED: _bindgen_ty_27 = 258; +pub const PTMNOTIFID_SLEEP_ALLOWED: _bindgen_ty_27 = 259; +pub const PTMNOTIFID_GOING_TO_SLEEP: _bindgen_ty_27 = 260; +pub const PTMNOTIFID_FULLY_WAKING_UP: _bindgen_ty_27 = 261; +pub const PTMNOTIFID_FULLY_AWAKE: _bindgen_ty_27 = 262; +pub const PTMNOTIFID_HALF_AWAKE: _bindgen_ty_27 = 263; +pub const PTMNOTIFID_SHUTDOWN: _bindgen_ty_27 = 264; +pub const PTMNOTIFID_BATTERY_VERY_LOW: _bindgen_ty_27 = 529; +pub const PTMNOTIFID_BATTERY_LOW: _bindgen_ty_27 = 530; pub type _bindgen_ty_27 = ::libc::c_uint; extern "C" { + #[must_use] pub fn ptmSysmInit() -> Result; } extern "C" { @@ -10429,48 +11318,63 @@ extern "C" { pub fn ptmSysmGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn PTMSYSM_RequestSleep() -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_Awaken() -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_SetUserTime(msY2k: s64) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_InvalidateSystemTime() -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_CheckNew3DS() -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result; } extern "C" { + #[must_use] pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result; } extern "C" { + #[must_use] pub fn ptmGetsInit() -> Result; } extern "C" { @@ -10480,9 +11384,11 @@ extern "C" { pub fn ptmGetsGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn PTMGETS_GetSystemTime(outMsY2k: *mut s64) -> Result; } extern "C" { + #[must_use] pub fn ptmSetsInit() -> Result; } extern "C" { @@ -10492,6 +11398,7 @@ extern "C" { pub fn ptmSetsGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn PTMSETS_SetSystemTime(msY2k: s64) -> Result; } pub const WAIT_NONE: PXIDEV_WaitType = 0; @@ -10521,12 +11428,14 @@ impl Default for PXIDEV_SPIBuffer { } } extern "C" { + #[must_use] pub fn pxiDevInit() -> Result; } extern "C" { pub fn pxiDevExit(); } extern "C" { + #[must_use] pub fn PXIDEV_SPIMultiWriteRead( header: *mut PXIDEV_SPIBuffer, writeBuffer1: *mut PXIDEV_SPIBuffer, @@ -10537,6 +11446,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PXIDEV_SPIWriteRead( bytesRead: *mut u32_, initialWaitOperation: u64_, @@ -10545,6 +11455,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn pxiPmInit() -> Result; } extern "C" { @@ -10554,9 +11465,11 @@ extern "C" { pub fn pxiPmGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } extern "C" { + #[must_use] pub fn PXIPM_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -10564,6 +11477,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result; } #[repr(C)] @@ -11093,6 +12007,12 @@ extern "C" { extern "C" { pub fn sigqueue(arg1: pid_t, arg2: ::libc::c_int, arg3: sigval) -> ::libc::c_int; } +extern "C" { + pub fn sig2str(arg1: ::libc::c_int, arg2: *mut ::libc::c_char) -> ::libc::c_int; +} +extern "C" { + pub fn str2sig(arg1: *const ::libc::c_char, arg2: *mut ::libc::c_int) -> ::libc::c_int; +} pub type sig_atomic_t = ::libc::c_int; pub type sig_t = _sig_func_ptr; extern "C" { @@ -11147,7 +12067,7 @@ extern "C" { pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> ::libc::c_int; } extern "C" { - pub fn utimes(__path: *const ::libc::c_char, __tvp: *const timeval) -> ::libc::c_int; + pub fn utimes(arg1: *const ::libc::c_char, arg2: *const timeval) -> ::libc::c_int; } extern "C" { pub fn adjtime(arg1: *const timeval, arg2: *mut timeval) -> ::libc::c_int; @@ -11374,9 +12294,11 @@ pub struct SOCU_DNSTableEntry { pub padding: [u8_; 12usize], } extern "C" { + #[must_use] pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result; } extern "C" { + #[must_use] pub fn socExit() -> Result; } extern "C" { @@ -11420,6 +12342,7 @@ pub const MICU_SAMPLE_RATE_10910: MICU_SampleRate = 2; pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3; pub type MICU_SampleRate = ::libc::c_uint; extern "C" { + #[must_use] pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result; } extern "C" { @@ -11432,12 +12355,15 @@ extern "C" { pub fn micGetLastSampleOffset() -> u32_; } extern "C" { + #[must_use] pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result; } extern "C" { + #[must_use] pub fn MICU_UnmapSharedMem() -> Result; } extern "C" { + #[must_use] pub fn MICU_StartSampling( encoding: MICU_Encoding, sampleRate: MICU_SampleRate, @@ -11447,36 +12373,47 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn MICU_AdjustSampling(sampleRate: MICU_SampleRate) -> Result; } extern "C" { + #[must_use] pub fn MICU_StopSampling() -> Result; } extern "C" { + #[must_use] pub fn MICU_IsSampling(sampling: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result; } extern "C" { + #[must_use] pub fn MICU_SetGain(gain: u8_) -> Result; } extern "C" { + #[must_use] pub fn MICU_GetGain(gain: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn MICU_SetPower(power: bool) -> Result; } extern "C" { + #[must_use] pub fn MICU_GetPower(power: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn MICU_SetClamp(clamp: bool) -> Result; } extern "C" { + #[must_use] pub fn MICU_GetClamp(clamp: *mut bool) -> Result; } extern "C" { + #[must_use] pub fn MICU_SetAllowShellClosed(allowShellClosed: bool) -> Result; } pub const MVDMODE_COLORFORMATCONV: MVDSTD_Mode = 0; @@ -11578,6 +12515,7 @@ pub struct MVDSTD_InitStruct { pub cmd1b_inval: u8_, } extern "C" { + #[must_use] pub fn mvdstdInit( mode: MVDSTD_Mode, input_type: MVDSTD_InputFormat, @@ -11602,9 +12540,11 @@ extern "C" { ); } extern "C" { + #[must_use] pub fn mvdstdConvertImage(config: *mut MVDSTD_Config) -> Result; } extern "C" { + #[must_use] pub fn mvdstdProcessVideoFrame( inbuf_vaddr: *mut ::libc::c_void, size: size_t, @@ -11613,18 +12553,22 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn mvdstdRenderVideoFrame(config: *mut MVDSTD_Config, wait: bool) -> Result; } extern "C" { + #[must_use] pub fn MVDSTD_SetConfig(config: *mut MVDSTD_Config) -> Result; } extern "C" { + #[must_use] pub fn mvdstdSetupOutputBuffers( entrylist: *mut MVDSTD_OutputBuffersEntryList, bufsize: u32_, ) -> Result; } extern "C" { + #[must_use] pub fn mvdstdOverrideOutputBuffers( cur_outdata0: *mut ::libc::c_void, cur_outdata1: *mut ::libc::c_void, @@ -11643,8 +12587,8 @@ pub const NFC_TagState_InRange: NFC_TagState = 3; pub const NFC_TagState_OutOfRange: NFC_TagState = 4; pub const NFC_TagState_DataReady: NFC_TagState = 5; pub type NFC_TagState = ::libc::c_uint; -pub const NFC_amiiboFlag_Setup: ::libc::c_uint = 16; -pub const NFC_amiiboFlag_AppDataSetup: ::libc::c_uint = 32; +pub const NFC_amiiboFlag_Setup: _bindgen_ty_28 = 16; +pub const NFC_amiiboFlag_AppDataSetup: _bindgen_ty_28 = 32; pub type _bindgen_ty_28 = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -11731,6 +12675,7 @@ pub struct NFC_AppDataWriteStruct { pub unused_xb: [u8_; 21usize], } extern "C" { + #[must_use] pub fn nfcInit(type_: NFC_OpType) -> Result; } extern "C" { @@ -11740,30 +12685,38 @@ extern "C" { pub fn nfcGetSessionHandle() -> Handle; } extern "C" { + #[must_use] pub fn nfcStartScanning(inval: u16_) -> Result; } extern "C" { pub fn nfcStopScanning(); } extern "C" { + #[must_use] pub fn nfcLoadAmiiboData() -> Result; } extern "C" { + #[must_use] pub fn nfcResetTagScanState() -> Result; } extern "C" { + #[must_use] pub fn nfcUpdateStoredAmiiboData() -> Result; } extern "C" { + #[must_use] pub fn nfcGetTagState(state: *mut NFC_TagState) -> Result; } extern "C" { + #[must_use] pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result; } extern "C" { + #[must_use] pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result; } extern "C" { + #[must_use] pub fn nfcInitializeWriteAppData( amiibo_appid: u32_, buf: *const ::libc::c_void, @@ -11771,9 +12724,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result; } extern "C" { + #[must_use] pub fn nfcWriteAppData( buf: *const ::libc::c_void, size: size_t, @@ -11781,15 +12736,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn nfcGetAmiiboSettings(out: *mut NFC_AmiiboSettings) -> Result; } extern "C" { + #[must_use] pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result; } extern "C" { + #[must_use] pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result; } extern "C" { + #[must_use] pub fn nfcSendTagCommand( inbuf: *const ::libc::c_void, insize: size_t, @@ -11800,9 +12759,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn nfcCmd21() -> Result; } extern "C" { + #[must_use] pub fn nfcCmd22() -> Result; } #[repr(C)] @@ -11822,12 +12783,14 @@ pub struct NotificationHeader { pub title: [u16_; 32usize], } extern "C" { + #[must_use] pub fn newsInit() -> Result; } extern "C" { pub fn newsExit(); } extern "C" { + #[must_use] pub fn NEWS_AddNotification( title: *const u16_, titleLength: u32_, @@ -11839,18 +12802,23 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result; } extern "C" { + #[must_use] pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result; } extern "C" { + #[must_use] pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result; } extern "C" { + #[must_use] pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn NEWS_GetNotificationMessage( news_id: u32_, message: *mut u16_, @@ -11858,6 +12826,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn NEWS_SetNotificationImage( news_id: u32_, buffer: *const ::libc::c_void, @@ -11865,6 +12834,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn NEWS_GetNotificationImage( news_id: u32_, buffer: *mut ::libc::c_void, @@ -11887,6 +12857,7 @@ pub struct QTM_HeadTrackingInfo { pub unk_x2c: [u32_; 5usize], } extern "C" { + #[must_use] pub fn qtmInit() -> Result; } extern "C" { @@ -11899,6 +12870,7 @@ extern "C" { pub fn qtmCheckHeadFullyDetected(info: *mut QTM_HeadTrackingInfo) -> bool; } extern "C" { + #[must_use] pub fn qtmConvertCoordToScreen( coord: *mut QTM_HeadTrackingInfoCoord, screen_width: *mut f32, @@ -11908,9 +12880,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result; } extern "C" { + #[must_use] pub fn srvPmInit() -> Result; } extern "C" { @@ -11920,12 +12894,15 @@ extern "C" { pub fn srvPmGetSessionHandle() -> *mut Handle; } extern "C" { + #[must_use] pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result; } extern "C" { + #[must_use] pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result; } extern "C" { + #[must_use] pub fn SRVPM_RegisterProcess( pid: u32_, count: u32_, @@ -11933,18 +12910,22 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result; } extern "C" { + #[must_use] pub fn loaderInit() -> Result; } extern "C" { pub fn loaderExit(); } extern "C" { + #[must_use] pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result; } extern "C" { + #[must_use] pub fn LOADER_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -11952,9 +12933,11 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result; } extern "C" { + #[must_use] pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } pub const LED_NORMAL: powerLedState = 1; @@ -11965,39 +12948,50 @@ pub const LED_BLUE: powerLedState = 5; pub const LED_BLINK_RED: powerLedState = 6; pub type powerLedState = ::libc::c_uint; extern "C" { + #[must_use] pub fn mcuHwcInit() -> Result; } extern "C" { pub fn mcuHwcExit(); } extern "C" { + #[must_use] pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_SetWifiLedState(state: bool) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result; } extern "C" { + #[must_use] pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result; } pub const GX_TRANSFER_FMT_RGBA8: GX_TRANSFER_FORMAT = 0; @@ -12080,12 +13074,15 @@ extern "C" { pub fn GX_BindQueue(queue: *mut gxCmdQueue_s); } extern "C" { + #[must_use] pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result; } extern "C" { + #[must_use] pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result; } extern "C" { + #[must_use] pub fn GX_MemoryFill( buf0a: *mut u32_, buf0v: u32_, @@ -12098,6 +13095,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn GX_DisplayTransfer( inadr: *mut u32_, indim: u32_, @@ -12107,6 +13105,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn GX_TextureCopy( inadr: *mut u32_, indim: u32_, @@ -12117,6 +13116,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn GX_FlushCacheRegions( buf0a: *mut u32_, buf0s: u32_, @@ -12604,12 +13604,15 @@ impl Default for shaderProgram_s { } } extern "C" { + #[must_use] pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result; } extern "C" { + #[must_use] pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { + #[must_use] pub fn shaderInstanceSetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -12617,6 +13620,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn shaderInstanceGetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -12630,24 +13634,30 @@ extern "C" { ) -> s8; } extern "C" { + #[must_use] pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result; } extern "C" { + #[must_use] pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result; } extern "C" { + #[must_use] pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result; } extern "C" { + #[must_use] pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result; } extern "C" { + #[must_use] pub fn shaderProgramSetGshInputPermutation( sp: *mut shaderProgram_s, permutation: u64_, ) -> Result; } extern "C" { + #[must_use] pub fn shaderProgramConfigure( sp: *mut shaderProgram_s, sendVshCode: bool, @@ -12655,6 +13665,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result; } pub const NDSP_OUTPUT_MONO: ndspOutputMode = 0; @@ -12676,10 +13687,10 @@ pub struct ndspAdpcmData { pub history1: s16, } pub type ndspWaveBuf = tag_ndspWaveBuf; -pub const NDSP_WBUF_FREE: ::libc::c_uint = 0; -pub const NDSP_WBUF_QUEUED: ::libc::c_uint = 1; -pub const NDSP_WBUF_PLAYING: ::libc::c_uint = 2; -pub const NDSP_WBUF_DONE: ::libc::c_uint = 3; +pub const NDSP_WBUF_FREE: _bindgen_ty_29 = 0; +pub const NDSP_WBUF_QUEUED: _bindgen_ty_29 = 1; +pub const NDSP_WBUF_PLAYING: _bindgen_ty_29 = 2; +pub const NDSP_WBUF_DONE: _bindgen_ty_29 = 3; pub type _bindgen_ty_29 = ::libc::c_uint; #[repr(C)] #[derive(Copy, Clone)] @@ -12736,6 +13747,7 @@ extern "C" { ); } extern "C" { + #[must_use] pub fn ndspInit() -> Result; } extern "C" { @@ -12790,20 +13802,20 @@ extern "C" { data: *mut ::libc::c_void, ); } -pub const NDSP_ENCODING_PCM8: ::libc::c_uint = 0; -pub const NDSP_ENCODING_PCM16: ::libc::c_uint = 1; -pub const NDSP_ENCODING_ADPCM: ::libc::c_uint = 2; +pub const NDSP_ENCODING_PCM8: _bindgen_ty_30 = 0; +pub const NDSP_ENCODING_PCM16: _bindgen_ty_30 = 1; +pub const NDSP_ENCODING_ADPCM: _bindgen_ty_30 = 2; pub type _bindgen_ty_30 = ::libc::c_uint; -pub const NDSP_FORMAT_MONO_PCM8: ::libc::c_uint = 1; -pub const NDSP_FORMAT_MONO_PCM16: ::libc::c_uint = 5; -pub const NDSP_FORMAT_MONO_ADPCM: ::libc::c_uint = 9; -pub const NDSP_FORMAT_STEREO_PCM8: ::libc::c_uint = 2; -pub const NDSP_FORMAT_STEREO_PCM16: ::libc::c_uint = 6; -pub const NDSP_FORMAT_PCM8: ::libc::c_uint = 1; -pub const NDSP_FORMAT_PCM16: ::libc::c_uint = 5; -pub const NDSP_FORMAT_ADPCM: ::libc::c_uint = 9; -pub const NDSP_FRONT_BYPASS: ::libc::c_uint = 16; -pub const NDSP_3D_SURROUND_PREPROCESSED: ::libc::c_uint = 64; +pub const NDSP_FORMAT_MONO_PCM8: _bindgen_ty_31 = 1; +pub const NDSP_FORMAT_MONO_PCM16: _bindgen_ty_31 = 5; +pub const NDSP_FORMAT_MONO_ADPCM: _bindgen_ty_31 = 9; +pub const NDSP_FORMAT_STEREO_PCM8: _bindgen_ty_31 = 2; +pub const NDSP_FORMAT_STEREO_PCM16: _bindgen_ty_31 = 6; +pub const NDSP_FORMAT_PCM8: _bindgen_ty_31 = 1; +pub const NDSP_FORMAT_PCM16: _bindgen_ty_31 = 5; +pub const NDSP_FORMAT_ADPCM: _bindgen_ty_31 = 9; +pub const NDSP_FRONT_BYPASS: _bindgen_ty_31 = 16; +pub const NDSP_3D_SURROUND_PREPROCESSED: _bindgen_ty_31 = 64; pub type _bindgen_ty_31 = ::libc::c_uint; pub const NDSP_INTERP_POLYPHASE: ndspInterpType = 0; pub const NDSP_INTERP_LINEAR: ndspInterpType = 1; @@ -12924,22 +13936,22 @@ pub const SWKBD_PASSWORD_NONE: SwkbdPasswordMode = 0; pub const SWKBD_PASSWORD_HIDE: SwkbdPasswordMode = 1; pub const SWKBD_PASSWORD_HIDE_DELAY: SwkbdPasswordMode = 2; pub type SwkbdPasswordMode = ::libc::c_uint; -pub const SWKBD_FILTER_DIGITS: ::libc::c_uint = 1; -pub const SWKBD_FILTER_AT: ::libc::c_uint = 2; -pub const SWKBD_FILTER_PERCENT: ::libc::c_uint = 4; -pub const SWKBD_FILTER_BACKSLASH: ::libc::c_uint = 8; -pub const SWKBD_FILTER_PROFANITY: ::libc::c_uint = 16; -pub const SWKBD_FILTER_CALLBACK: ::libc::c_uint = 32; +pub const SWKBD_FILTER_DIGITS: _bindgen_ty_32 = 1; +pub const SWKBD_FILTER_AT: _bindgen_ty_32 = 2; +pub const SWKBD_FILTER_PERCENT: _bindgen_ty_32 = 4; +pub const SWKBD_FILTER_BACKSLASH: _bindgen_ty_32 = 8; +pub const SWKBD_FILTER_PROFANITY: _bindgen_ty_32 = 16; +pub const SWKBD_FILTER_CALLBACK: _bindgen_ty_32 = 32; pub type _bindgen_ty_32 = ::libc::c_uint; -pub const SWKBD_PARENTAL: ::libc::c_uint = 1; -pub const SWKBD_DARKEN_TOP_SCREEN: ::libc::c_uint = 2; -pub const SWKBD_PREDICTIVE_INPUT: ::libc::c_uint = 4; -pub const SWKBD_MULTILINE: ::libc::c_uint = 8; -pub const SWKBD_FIXED_WIDTH: ::libc::c_uint = 16; -pub const SWKBD_ALLOW_HOME: ::libc::c_uint = 32; -pub const SWKBD_ALLOW_RESET: ::libc::c_uint = 64; -pub const SWKBD_ALLOW_POWER: ::libc::c_uint = 128; -pub const SWKBD_DEFAULT_QWERTY: ::libc::c_uint = 512; +pub const SWKBD_PARENTAL: _bindgen_ty_33 = 1; +pub const SWKBD_DARKEN_TOP_SCREEN: _bindgen_ty_33 = 2; +pub const SWKBD_PREDICTIVE_INPUT: _bindgen_ty_33 = 4; +pub const SWKBD_MULTILINE: _bindgen_ty_33 = 8; +pub const SWKBD_FIXED_WIDTH: _bindgen_ty_33 = 16; +pub const SWKBD_ALLOW_HOME: _bindgen_ty_33 = 32; +pub const SWKBD_ALLOW_RESET: _bindgen_ty_33 = 64; +pub const SWKBD_ALLOW_POWER: _bindgen_ty_33 = 128; +pub const SWKBD_DEFAULT_QWERTY: _bindgen_ty_33 = 512; pub type _bindgen_ty_33 = ::libc::c_uint; pub const SWKBD_CALLBACK_OK: SwkbdCallbackResult = 0; pub const SWKBD_CALLBACK_CLOSE: SwkbdCallbackResult = 1; @@ -13160,8 +14172,8 @@ extern "C" { bufsize: size_t, ) -> SwkbdButton; } -pub const ERROR_LANGUAGE_FLAG: ::libc::c_uint = 256; -pub const ERROR_WORD_WRAP_FLAG: ::libc::c_uint = 512; +pub const ERROR_LANGUAGE_FLAG: _bindgen_ty_34 = 256; +pub const ERROR_WORD_WRAP_FLAG: _bindgen_ty_34 = 512; pub type _bindgen_ty_34 = ::libc::c_uint; pub const ERROR_CODE: errorType = 0; pub const ERROR_TEXT: errorType = 1; @@ -13266,10 +14278,10 @@ impl Default for MiiSelectorReturn { } } } -pub const MIISELECTOR_CANCEL: ::libc::c_uint = 1; -pub const MIISELECTOR_GUESTS: ::libc::c_uint = 2; -pub const MIISELECTOR_TOP: ::libc::c_uint = 4; -pub const MIISELECTOR_GUESTSTART: ::libc::c_uint = 8; +pub const MIISELECTOR_CANCEL: _bindgen_ty_35 = 1; +pub const MIISELECTOR_GUESTS: _bindgen_ty_35 = 2; +pub const MIISELECTOR_TOP: _bindgen_ty_35 = 4; +pub const MIISELECTOR_GUESTSTART: _bindgen_ty_35 = 8; pub type _bindgen_ty_35 = ::libc::c_uint; extern "C" { pub fn miiSelectorInit(conf: *mut MiiSelectorConf); @@ -13331,9 +14343,11 @@ impl Default for archive_dir_t { } } extern "C" { + #[must_use] pub fn archiveMountSdmc() -> Result; } extern "C" { + #[must_use] pub fn archiveMount( archiveID: FS_ArchiveID, archivePath: FS_Path, @@ -13341,15 +14355,19 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn archiveCommitSaveData(deviceName: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn archiveUnmount(deviceName: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn archiveUnmountAll() -> Result; } extern "C" { + #[must_use] pub fn archive_getmtime(name: *const ::libc::c_char, mtime: *mut u64_) -> Result; } #[repr(C)] @@ -13389,15 +14407,19 @@ pub struct romfs_file { pub name: __IncompleteArrayField, } extern "C" { + #[must_use] pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result; } extern "C" { + #[must_use] pub fn romfsMountFromTitle( tid: u64_, mediatype: FS_MediaType, @@ -13405,6 +14427,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] pub fn romfsUnmount(name: *const ::libc::c_char) -> Result; } #[repr(C)] @@ -13457,9 +14480,9 @@ impl Default for tag_CWDH_s { } } } -pub const CMAP_TYPE_DIRECT: ::libc::c_uint = 0; -pub const CMAP_TYPE_TABLE: ::libc::c_uint = 1; -pub const CMAP_TYPE_SCAN: ::libc::c_uint = 2; +pub const CMAP_TYPE_DIRECT: _bindgen_ty_36 = 0; +pub const CMAP_TYPE_TABLE: _bindgen_ty_36 = 1; +pub const CMAP_TYPE_SCAN: _bindgen_ty_36 = 2; pub type _bindgen_ty_36 = ::libc::c_uint; pub type CMAP_s = tag_CMAP_s; #[repr(C)] @@ -13581,11 +14604,12 @@ pub struct fontGlyphPos_s__bindgen_ty_2 { pub right: f32, pub bottom: f32, } -pub const GLYPH_POS_CALC_VTXCOORD: ::libc::c_uint = 1; -pub const GLYPH_POS_AT_BASELINE: ::libc::c_uint = 2; -pub const GLYPH_POS_Y_POINTS_UP: ::libc::c_uint = 4; +pub const GLYPH_POS_CALC_VTXCOORD: _bindgen_ty_37 = 1; +pub const GLYPH_POS_AT_BASELINE: _bindgen_ty_37 = 2; +pub const GLYPH_POS_Y_POINTS_UP: _bindgen_ty_37 = 4; pub type _bindgen_ty_37 = ::libc::c_uint; extern "C" { + #[must_use] pub fn fontEnsureMapped() -> Result; } extern "C" { From eb1f112c81508457fe6c0c23c40b01b5902c3e62 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Thu, 30 Jun 2022 21:22:18 -0400 Subject: [PATCH 2/3] Handle #[must_use] errors where needed --- ctru-rs/src/lib.rs | 14 ++++++++++---- ctru-rs/src/services/fs.rs | 6 +++--- ctru-rs/src/services/soc.rs | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index 721996b..78e90db 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -22,16 +22,22 @@ pub fn init() { linker_fix_3ds::init(); pthread_3ds::init(); + #[cfg(not(test))] + panic_hook_setup(); + // Initialize the PS service for random data generation unsafe { - ctru_sys::psInit(); + let ps_ret = ctru_sys::psInit(); + if ctru_sys::R_FAILED(ps_ret) { + panic!( + "Failed to initialize random data generation: {:?}", + Error::from(ps_ret) + ) + } // Setup the deconstruction at the program's end libc::atexit(services_deinit); } - - #[cfg(not(test))] - panic_hook_setup(); } #[cfg(not(test))] diff --git a/ctru-rs/src/services/fs.rs b/ctru-rs/src/services/fs.rs index 9f3334a..4ff6355 100644 --- a/ctru-rs/src/services/fs.rs +++ b/ctru-rs/src/services/fs.rs @@ -996,7 +996,7 @@ impl Drop for Fs { impl Drop for Archive { fn drop(&mut self) { unsafe { - ctru_sys::FSUSER_CloseArchive(self.handle); + let _ = ctru_sys::FSUSER_CloseArchive(self.handle); } } } @@ -1004,7 +1004,7 @@ impl Drop for Archive { impl Drop for File { fn drop(&mut self) { unsafe { - ctru_sys::FSFILE_Close(self.handle); + let _ = ctru_sys::FSFILE_Close(self.handle); } } } @@ -1012,7 +1012,7 @@ impl Drop for File { impl Drop for Dir { fn drop(&mut self) { unsafe { - ctru_sys::FSDIR_Close(self.0); + let _ = ctru_sys::FSDIR_Close(self.0); } } } diff --git a/ctru-rs/src/services/soc.rs b/ctru-rs/src/services/soc.rs index 13d0dc9..dad4188 100644 --- a/ctru-rs/src/services/soc.rs +++ b/ctru-rs/src/services/soc.rs @@ -50,7 +50,7 @@ impl Soc { // Surely nothing bad will happens :D || unsafe { // The socket buffer is freed automatically by `socExit` - ctru_sys::socExit(); + let _ = ctru_sys::socExit(); }, )?; From 683247faf76a57ed4bce425531b31ba4ab61d5ec Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Thu, 30 Jun 2022 21:22:44 -0400 Subject: [PATCH 3/3] Remove unused libc patch All of our libc changes have landed so there should be no need to rely on the fork anymore. --- Cargo.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 39988bd..a32362d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,6 @@ [workspace] members = ["ctru-rs", "ctru-sys"] -[patch.'https://github.com/Meziu/libc'] -libc = "0.2.121" - [patch.'https://github.com/Meziu/ctru-rs'] # Make sure all dependencies use the local ctru-sys package -ctru-sys = { path = "ctru-sys" } \ No newline at end of file +ctru-sys = { path = "ctru-sys" }