aboutsummaryrefslogtreecommitdiff
path: root/ctru-sys/src/bindings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ctru-sys/src/bindings.rs')
-rw-r--r--ctru-sys/src/bindings.rs7839
1 files changed, 5553 insertions, 2286 deletions
diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs
index f63f286..37b204d 100644
--- a/ctru-sys/src/bindings.rs
+++ b/ctru-sys/src/bindings.rs
@@ -1,99 +1,100 @@
-/* automatically generated by rust-bindgen */
+/* automatically generated by rust-bindgen 0.57.0 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
-pub struct __BindgenBitfieldUnit<Storage, Align>
-where
- Storage: AsRef<[u8]> + AsMut<[u8]>,
-{
+pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
- align: [Align; 0],
}
-
-impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
+impl<Storage> __BindgenBitfieldUnit<Storage> {
+ #[inline]
+ pub const fn new(storage: Storage) -> Self {
+ Self { storage }
+ }
+}
+impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
- pub fn new(storage: Storage) -> Self {
- Self { storage, align: [] }
- }
-
- #[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
-
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
-
- let bit_index = index % 8;
+ let bit_index = if cfg!(target_endian = "big") {
+ 7 - (index % 8)
+ } else {
+ index % 8
+ };
let mask = 1 << bit_index;
-
byte & mask == mask
}
-
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
-
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
-
- let bit_index = index % 8;
+ let bit_index = if cfg!(target_endian = "big") {
+ 7 - (index % 8)
+ } else {
+ index % 8
+ };
let mask = 1 << bit_index;
-
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
-
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
-
let mut val = 0;
-
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
- val |= 1 << i;
+ let index = if cfg!(target_endian = "big") {
+ bit_width as usize - 1 - i
+ } else {
+ i
+ };
+ val |= 1 << index;
}
}
-
val
}
-
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
-
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
- self.set_bit(i + bit_offset, val_bit_is_set);
+ let index = if cfg!(target_endian = "big") {
+ bit_width as usize - 1 - i
+ } else {
+ i
+ };
+ self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
#[repr(C)]
#[derive(Default)]
-pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>);
+pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
- pub fn new() -> Self {
- __IncompleteArrayField(::core::marker::PhantomData)
+ pub const fn new() -> Self {
+ __IncompleteArrayField(::core::marker::PhantomData, [])
}
#[inline]
- pub unsafe fn as_ptr(&self) -> *const T {
- ::core::mem::transmute(self)
+ pub fn as_ptr(&self) -> *const T {
+ self as *const _ as *const T
}
#[inline]
- pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
- ::core::mem::transmute(self)
+ pub fn as_mut_ptr(&mut self) -> *mut T {
+ self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
@@ -105,22 +106,15 @@ impl<T> __IncompleteArrayField<T> {
}
}
impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
- fn fmt(&self, fmt: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
+ fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
-impl<T> ::core::clone::Clone for __IncompleteArrayField<T> {
- #[inline]
- fn clone(&self) -> Self {
- Self::new()
- }
-}
-impl<T> ::core::marker::Copy for __IncompleteArrayField<T> {}
#[repr(C)]
pub struct __BindgenUnionField<T>(::core::marker::PhantomData<T>);
impl<T> __BindgenUnionField<T> {
#[inline]
- pub fn new() -> Self {
+ pub const fn new() -> Self {
__BindgenUnionField(::core::marker::PhantomData)
}
#[inline]
@@ -146,7 +140,7 @@ impl<T> ::core::clone::Clone for __BindgenUnionField<T> {
}
impl<T> ::core::marker::Copy for __BindgenUnionField<T> {}
impl<T> ::core::fmt::Debug for __BindgenUnionField<T> {
- fn fmt(&self, fmt: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
+ fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.write_str("__BindgenUnionField")
}
}
@@ -160,9 +154,9 @@ impl<T> ::core::cmp::PartialEq for __BindgenUnionField<T> {
}
impl<T> ::core::cmp::Eq for __BindgenUnionField<T> {}
pub const _NEWLIB_VERSION_H__: u32 = 1;
-pub const _NEWLIB_VERSION: &'static [u8; 6usize] = b"3.0.0\0";
+pub const _NEWLIB_VERSION: &'static [u8; 6usize] = b"3.3.0\0";
pub const __NEWLIB__: u32 = 3;
-pub const __NEWLIB_MINOR__: u32 = 0;
+pub const __NEWLIB_MINOR__: u32 = 3;
pub const __NEWLIB_PATCHLEVEL__: u32 = 0;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
@@ -178,6 +172,8 @@ pub const __POSIX_VISIBLE: u32 = 200809;
pub const __SVID_VISIBLE: u32 = 1;
pub const __XSI_VISIBLE: u32 = 0;
pub const __SSP_FORTIFY_LEVEL: u32 = 0;
+pub const _POSIX_MONOTONIC_CLOCK: u32 = 200112;
+pub const _POSIX_TIMERS: u32 = 1;
pub const __have_longlong64: u32 = 1;
pub const __have_long32: u32 = 1;
pub const ___int8_t_defined: u32 = 1;
@@ -189,6 +185,7 @@ pub const ___int_least16_t_defined: u32 = 1;
pub const ___int_least32_t_defined: u32 = 1;
pub const ___int_least64_t_defined: u32 = 1;
pub const __int20: u32 = 2;
+pub const __int20__: u32 = 2;
pub const __INT8: &'static [u8; 3usize] = b"hh\0";
pub const __INT16: &'static [u8; 2usize] = b"h\0";
pub const __INT64: &'static [u8; 3usize] = b"ll\0";
@@ -223,10 +220,35 @@ pub const SYSCLOCK_ARM11: u32 = 268111856;
pub const SYSCLOCK_ARM11_NEW: u32 = 804335568;
pub const CPU_TICKS_PER_MSEC: f64 = 268111.856;
pub const CPU_TICKS_PER_USEC: f64 = 268.111856;
+pub const OS_HEAP_AREA_BEGIN: u32 = 134217728;
+pub const OS_HEAP_AREA_END: u32 = 234881024;
+pub const OS_MAP_AREA_BEGIN: u32 = 268435456;
+pub const OS_MAP_AREA_END: u32 = 335544320;
+pub const OS_OLD_FCRAM_VADDR: u32 = 335544320;
+pub const OS_OLD_FCRAM_PADDR: u32 = 536870912;
+pub const OS_OLD_FCRAM_SIZE: u32 = 134217728;
+pub const OS_QTMRAM_VADDR: u32 = 511705088;
+pub const OS_QTMRAM_PADDR: u32 = 520093696;
+pub const OS_QTMRAM_SIZE: u32 = 4194304;
+pub const OS_MMIO_VADDR: u32 = 515899392;
+pub const OS_MMIO_PADDR: u32 = 269484032;
+pub const OS_MMIO_SIZE: u32 = 4194304;
+pub const OS_VRAM_VADDR: u32 = 520093696;
+pub const OS_VRAM_PADDR: u32 = 402653184;
+pub const OS_VRAM_SIZE: u32 = 6291456;
+pub const OS_DSPRAM_VADDR: u32 = 535822336;
+pub const OS_DSPRAM_PADDR: u32 = 535822336;
+pub const OS_DSPRAM_SIZE: u32 = 524288;
+pub const OS_KERNELCFG_VADDR: u32 = 536346624;
+pub const OS_SHAREDCFG_VADDR: u32 = 536350720;
+pub const OS_FCRAM_VADDR: u32 = 805306368;
+pub const OS_FCRAM_PADDR: u32 = 536870912;
+pub const OS_FCRAM_SIZE: u32 = 268435456;
pub const __NEWLIB_H__: u32 = 1;
pub const _WANT_IO_C99_FORMATS: u32 = 1;
pub const _WANT_IO_LONG_LONG: u32 = 1;
pub const _WANT_IO_POS_ARGS: u32 = 1;
+pub const _REENT_CHECK_VERIFY: u32 = 1;
pub const _MB_CAPABLE: u32 = 1;
pub const _MB_LEN_MAX: u32 = 8;
pub const HAVE_INITFINI_ARRAY: u32 = 1;
@@ -240,6 +262,12 @@ pub const _UNBUF_STREAM_OPT: u32 = 1;
pub const __OBSOLETE_MATH_DEFAULT: u32 = 0;
pub const __OBSOLETE_MATH: u32 = 0;
pub const __RAND_MAX: u32 = 2147483647;
+pub const GSP_SCREEN_TOP: u32 = 0;
+pub const GSP_SCREEN_BOTTOM: u32 = 1;
+pub const GSP_SCREEN_WIDTH: u32 = 240;
+pub const GSP_SCREEN_HEIGHT_TOP: u32 = 400;
+pub const GSP_SCREEN_HEIGHT_TOP_2X: u32 = 800;
+pub const GSP_SCREEN_HEIGHT_BOTTOM: u32 = 320;
pub const CONSOLE_COLOR_BOLD: u32 = 1;
pub const CONSOLE_COLOR_FAINT: u32 = 2;
pub const CONSOLE_ITALIC: u32 = 4;
@@ -290,6 +318,9 @@ pub const PTHREAD_EXPLICIT_SCHED: u32 = 2;
pub const PTHREAD_CREATE_DETACHED: u32 = 0;
pub const PTHREAD_CREATE_JOINABLE: u32 = 1;
pub const CSND_NUM_CHANNELS: u32 = 32;
+pub const FRIEND_SCREEN_NAME_SIZE: u32 = 11;
+pub const FRIEND_COMMENT_SIZE: u32 = 33;
+pub const FRIEND_LIST_SIZE: u32 = 100;
pub const HTTPC_RESULTCODE_DOWNLOADPENDING: u32 = 3628113963;
pub const HTTPC_RESULTCODE_NOTFOUND: u32 = 3628113960;
pub const HTTPC_RESULTCODE_TIMEDOUT: u32 = 3626016873;
@@ -325,6 +356,57 @@ pub const _N_LISTS: u32 = 30;
pub const _CLOCKS_PER_SEC_: u32 = 100;
pub const CLOCKS_PER_SEC: u32 = 100;
pub const CLK_TCK: u32 = 100;
+pub const SIGEV_NONE: u32 = 1;
+pub const SIGEV_SIGNAL: u32 = 2;
+pub const SIGEV_THREAD: u32 = 3;
+pub const SI_USER: u32 = 1;
+pub const SI_QUEUE: u32 = 2;
+pub const SI_TIMER: u32 = 3;
+pub const SI_ASYNCIO: u32 = 4;
+pub const SI_MESGQ: u32 = 5;
+pub const SA_NOCLDSTOP: u32 = 1;
+pub const MINSIGSTKSZ: u32 = 2048;
+pub const SIGSTKSZ: u32 = 8192;
+pub const SS_ONSTACK: u32 = 1;
+pub const SS_DISABLE: u32 = 2;
+pub const SIG_SETMASK: u32 = 0;
+pub const SIG_BLOCK: u32 = 1;
+pub const SIG_UNBLOCK: u32 = 2;
+pub const SIGHUP: u32 = 1;
+pub const SIGINT: u32 = 2;
+pub const SIGQUIT: u32 = 3;
+pub const SIGILL: u32 = 4;
+pub const SIGTRAP: u32 = 5;
+pub const SIGIOT: u32 = 6;
+pub const SIGABRT: u32 = 6;
+pub const SIGEMT: u32 = 7;
+pub const SIGFPE: u32 = 8;
+pub const SIGKILL: u32 = 9;
+pub const SIGBUS: u32 = 10;
+pub const SIGSEGV: u32 = 11;
+pub const SIGSYS: u32 = 12;
+pub const SIGPIPE: u32 = 13;
+pub const SIGALRM: u32 = 14;
+pub const SIGTERM: u32 = 15;
+pub const SIGURG: u32 = 16;
+pub const SIGSTOP: u32 = 17;
+pub const SIGTSTP: u32 = 18;
+pub const SIGCONT: u32 = 19;
+pub const SIGCHLD: u32 = 20;
+pub const SIGCLD: u32 = 20;
+pub const SIGTTIN: u32 = 21;
+pub const SIGTTOU: u32 = 22;
+pub const SIGIO: u32 = 23;
+pub const SIGPOLL: u32 = 23;
+pub const SIGXCPU: u32 = 24;
+pub const SIGXFSZ: u32 = 25;
+pub const SIGVTALRM: u32 = 26;
+pub const SIGPROF: u32 = 27;
+pub const SIGWINCH: u32 = 28;
+pub const SIGLOST: u32 = 29;
+pub const SIGUSR1: u32 = 30;
+pub const SIGUSR2: u32 = 31;
+pub const NSIG: u32 = 32;
pub const CLOCK_ENABLED: u32 = 1;
pub const CLOCK_DISABLED: u32 = 0;
pub const CLOCK_ALLOWED: u32 = 1;
@@ -358,6 +440,7 @@ pub const SO_SNDLOWAT: u32 = 4099;
pub const SO_RCVLOWAT: u32 = 4100;
pub const SO_TYPE: u32 = 4104;
pub const SO_ERROR: u32 = 4105;
+pub const SO_BROADCAST: u32 = 0;
pub const INADDR_LOOPBACK: u32 = 2130706433;
pub const INADDR_ANY: u32 = 0;
pub const INADDR_BROADCAST: u32 = 4294967295;
@@ -689,7 +772,7 @@ pub const GPUREG_GAS_LIGHT_Z: u32 = 289;
pub const GPUREG_GAS_LIGHT_Z_COLOR: u32 = 290;
pub const GPUREG_GAS_LUT_INDEX: u32 = 291;
pub const GPUREG_GAS_LUT_DATA: u32 = 292;
-pub const GPUREG_0125: u32 = 293;
+pub const GPUREG_GAS_ACCMAX_FEEDBACK: u32 = 293;
pub const GPUREG_GAS_DELTAZ_DEPTH: u32 = 294;
pub const GPUREG_0127: u32 = 295;
pub const GPUREG_0128: u32 = 296;
@@ -1131,9 +1214,8 @@ pub const MIISELECTOR_MAGIC: u32 = 333326543;
pub const MIISELECTOR_TITLE_LEN: u32 = 64;
pub const MIISELECTOR_GUESTMII_SLOTS: u32 = 6;
pub const MIISELECTOR_USERMII_SLOTS: u32 = 100;
-pub const MIISELECTOR_MIIDATA_SIZE: u32 = 92;
pub const MIISELECTOR_GUESTMII_NAME_LEN: u32 = 12;
-pub const SDMC_DIRITER_MAGIC: u32 = 1935961443;
+pub const ARCHIVE_DIRITER_MAGIC: u32 = 1751347809;
pub type __int8_t = ::libc::c_schar;
pub type __uint8_t = ::libc::c_uchar;
pub type __int16_t = ::libc::c_short;
@@ -1152,8 +1234,8 @@ pub type __int_least64_t = ::libc::c_longlong;
pub type __uint_least64_t = ::libc::c_ulonglong;
pub type __intmax_t = ::libc::c_longlong;
pub type __uintmax_t = ::libc::c_ulonglong;
-pub type __intptr_t = ::libc::c_long;
-pub type __uintptr_t = ::libc::c_ulong;
+pub type __intptr_t = ::libc::c_int;
+pub type __uintptr_t = ::libc::c_uint;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub type int_least8_t = __int_least8_t;
@@ -1172,42 +1254,49 @@ pub type int_fast32_t = ::libc::c_int;
pub type uint_fast32_t = ::libc::c_uint;
pub type int_fast64_t = ::libc::c_longlong;
pub type uint_fast64_t = ::libc::c_ulonglong;
+pub type size_t = ::libc::c_uint;
pub type wchar_t = ::libc::c_uint;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct max_align_t {
pub __clang_max_align_nonce1: ::libc::c_longlong,
pub __clang_max_align_nonce2: f64,
}
+pub type u8_ = u8;
+pub type u16_ = u16;
+pub type u32_ = u32;
+pub type u64_ = u64;
pub type s8 = i8;
pub type s16 = i16;
pub type s32 = i32;
pub type s64 = i64;
-pub type vu8 = u8;
-pub type vu16 = u16;
-pub type vu32 = u32;
-pub type vu64 = u64;
+pub type vu8 = u8_;
+pub type vu16 = u16_;
+pub type vu32 = u32_;
+pub type vu64 = u64_;
pub type vs8 = s8;
pub type vs16 = s16;
pub type vs32 = s32;
pub type vs64 = s64;
-pub type Handle = u32;
+pub type Handle = u32_;
pub type Result = s32;
pub type ThreadFunc = ::core::option::Option<unsafe extern "C" fn(arg1: *mut ::libc::c_void)>;
pub type voidfn = ::core::option::Option<unsafe extern "C" fn()>;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CpuRegisters {
- pub r: [u32; 13usize],
- pub sp: u32,
- pub lr: u32,
- pub pc: u32,
- pub cpsr: u32,
+ pub r: [u32_; 13usize],
+ pub sp: u32_,
+ pub lr: u32_,
+ pub pc: u32_,
+ pub cpsr: u32_,
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct FpuRegisters {
pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1,
- pub fpscr: u32,
- pub fpexc: u32,
+ pub fpscr: u32_,
+ pub fpexc: u32_,
}
#[repr(C)]
#[derive(Copy, Clone)]
@@ -1217,163 +1306,173 @@ pub union FpuRegisters__bindgen_ty_1 {
_bindgen_union_align: [u32; 32usize],
}
#[repr(C, packed)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct FpuRegisters__bindgen_ty_1__bindgen_ty_1 {
pub d: [f64; 16usize],
}
-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 = u32;
-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 = u32;
-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 = u32;
-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 = u32;
+impl Default for FpuRegisters__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for FpuRegisters {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+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 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 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 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 type _bindgen_ty_4 = ::libc::c_uint;
pub const IPC_BUFFER_R: IPC_BufferRights = 2;
pub const IPC_BUFFER_W: IPC_BufferRights = 4;
pub const IPC_BUFFER_RW: IPC_BufferRights = 6;
-pub type IPC_BufferRights = u32;
+pub type IPC_BufferRights = ::libc::c_uint;
pub const MEMOP_FREE: MemOp = 1;
pub const MEMOP_RESERVE: MemOp = 2;
pub const MEMOP_ALLOC: MemOp = 3;
@@ -1387,7 +1486,7 @@ pub const MEMOP_OP_MASK: MemOp = 255;
pub const MEMOP_REGION_MASK: MemOp = 3840;
pub const MEMOP_LINEAR_FLAG: MemOp = 65536;
pub const MEMOP_ALLOC_LINEAR: MemOp = 65539;
-pub type MemOp = u32;
+pub type MemOp = ::libc::c_uint;
pub const MEMSTATE_FREE: MemState = 0;
pub const MEMSTATE_RESERVED: MemState = 1;
pub const MEMSTATE_IO: MemState = 2;
@@ -1400,35 +1499,44 @@ pub const MEMSTATE_ALIASED: MemState = 8;
pub const MEMSTATE_ALIAS: MemState = 9;
pub const MEMSTATE_ALIASCODE: MemState = 10;
pub const MEMSTATE_LOCKED: MemState = 11;
-pub type MemState = u32;
+pub type MemState = ::libc::c_uint;
pub const MEMPERM_READ: MemPerm = 1;
pub const MEMPERM_WRITE: MemPerm = 2;
pub const MEMPERM_EXECUTE: MemPerm = 4;
+pub const MEMPERM_READWRITE: MemPerm = 3;
+pub const MEMPERM_READEXECUTE: MemPerm = 5;
pub const MEMPERM_DONTCARE: MemPerm = 268435456;
-pub type MemPerm = u32;
+pub type MemPerm = ::libc::c_uint;
+pub const MEMREGION_ALL: MemRegion = 0;
+pub const MEMREGION_APPLICATION: MemRegion = 1;
+pub const MEMREGION_SYSTEM: MemRegion = 2;
+pub const MEMREGION_BASE: MemRegion = 3;
+pub type MemRegion = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct MemInfo {
- pub base_addr: u32,
- pub size: u32,
- pub perm: u32,
- pub state: u32,
+ pub base_addr: u32_,
+ pub size: u32_,
+ pub perm: u32_,
+ pub state: u32_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct PageInfo {
- pub flags: u32,
+ pub flags: u32_,
}
pub const ARBITRATION_SIGNAL: ArbitrationType = 0;
pub const ARBITRATION_WAIT_IF_LESS_THAN: ArbitrationType = 1;
pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN: ArbitrationType = 2;
pub const ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 3;
pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 4;
-pub type ArbitrationType = u32;
+pub type ArbitrationType = ::libc::c_uint;
pub const RESET_ONESHOT: ResetType = 0;
pub const RESET_STICKY: ResetType = 1;
pub const RESET_PULSE: ResetType = 2;
-pub type ResetType = u32;
+pub type ResetType = ::libc::c_uint;
pub const THREADINFO_TYPE_UNKNOWN: ThreadInfoType = 0;
-pub type ThreadInfoType = u32;
+pub type ThreadInfoType = ::libc::c_uint;
pub const RESLIMIT_PRIORITY: ResourceLimitType = 0;
pub const RESLIMIT_COMMIT: ResourceLimitType = 1;
pub const RESLIMIT_THREAD: ResourceLimitType = 2;
@@ -1440,45 +1548,164 @@ pub const RESLIMIT_SHAREDMEMORY: ResourceLimitType = 7;
pub const RESLIMIT_ADDRESSARBITER: ResourceLimitType = 8;
pub const RESLIMIT_CPUTIME: ResourceLimitType = 9;
pub const RESLIMIT_BIT: ResourceLimitType = 2147483648;
-pub type ResourceLimitType = u32;
-#[repr(C)]
+pub type ResourceLimitType = ::libc::c_uint;
+pub const DMASTATE_STARTING: DmaState = 0;
+pub const DMASTATE_WFP_DST: DmaState = 1;
+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 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 type _bindgen_ty_6 = ::libc::c_uint;
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct DmaDeviceConfig {
+ pub deviceId: s8,
+ pub allowedAlignments: s8,
+ pub burstSize: s16,
+ pub transferSize: s16,
+ pub burstStride: s16,
+ pub transferStride: s16,
+}
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct DmaConfig {
+ pub channelId: s8,
+ pub endianSwapSize: s8,
+ pub flags: u8_,
+ pub _padding: u8_,
+ pub srcCfg: DmaDeviceConfig,
+ pub dstCfg: DmaDeviceConfig,
+}
+pub const PERFCOUNTEROP_ENABLE: PerfCounterOperation = 0;
+pub const PERFCOUNTEROP_DISABLE: PerfCounterOperation = 1;
+pub const PERFCOUNTEROP_GET_VALUE: PerfCounterOperation = 2;
+pub const PERFCOUNTEROP_SET_VALUE: PerfCounterOperation = 3;
+pub const PERFCOUNTEROP_GET_OVERFLOW_FLAGS: PerfCounterOperation = 4;
+pub const PERFCOUNTEROP_RESET: PerfCounterOperation = 5;
+pub const PERFCOUNTEROP_GET_EVENT: PerfCounterOperation = 6;
+pub const PERFCOUNTEROP_SET_EVENT: PerfCounterOperation = 7;
+pub const PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED: PerfCounterOperation = 8;
+pub type PerfCounterOperation = ::libc::c_uint;
+pub const PERFCOUNTERREG_CORE_BASE: PerfCounterRegister = 0;
+pub const PERFCOUNTERREG_CORE_COUNT_REG_0: PerfCounterRegister = 0;
+pub const PERFCOUNTERREG_CORE_COUNT_REG_1: PerfCounterRegister = 1;
+pub const PERFCOUNTERREG_CORE_CYCLE_COUNTER: PerfCounterRegister = 2;
+pub const PERFCOUNTERREG_SCU_BASE: PerfCounterRegister = 16;
+pub const PERFCOUNTERREG_SCU_0: PerfCounterRegister = 16;
+pub const PERFCOUNTERREG_SCU_1: PerfCounterRegister = 17;
+pub const PERFCOUNTERREG_SCU_2: PerfCounterRegister = 18;
+pub const PERFCOUNTERREG_SCU_3: PerfCounterRegister = 19;
+pub const PERFCOUNTERREG_SCU_4: PerfCounterRegister = 20;
+pub const PERFCOUNTERREG_SCU_5: PerfCounterRegister = 21;
+pub const PERFCOUNTERREG_SCU_6: PerfCounterRegister = 22;
+pub const PERFCOUNTERREG_SCU_7: PerfCounterRegister = 23;
+pub type PerfCounterRegister = ::libc::c_uint;
+pub const PERFCOUNTEREVT_CORE_BASE: PerfCounterEvent = 0;
+pub const PERFCOUNTEREVT_CORE_INST_CACHE_MISS: PerfCounterEvent = 0;
+pub const PERFCOUNTEREVT_CORE_STALL_BY_LACK_OF_INST: PerfCounterEvent = 1;
+pub const PERFCOUNTEREVT_CORE_STALL_BY_DATA_HAZARD: PerfCounterEvent = 2;
+pub const PERFCOUNTEREVT_CORE_INST_MICRO_TLB_MISS: PerfCounterEvent = 3;
+pub const PERFCOUNTEREVT_CORE_DATA_MICRO_TLB_MISS: PerfCounterEvent = 4;
+pub const PERFCOUNTEREVT_CORE_BRANCH_INST: PerfCounterEvent = 5;
+pub const PERFCOUNTEREVT_CORE_BRANCH_NOT_PREDICTED: PerfCounterEvent = 6;
+pub const PERFCOUNTEREVT_CORE_BRANCH_MISS_PREDICTED: PerfCounterEvent = 7;
+pub const PERFCOUNTEREVT_CORE_INST_EXECUTED: PerfCounterEvent = 8;
+pub const PERFCOUNTEREVT_CORE_FOLDED_INST_EXECUTED: PerfCounterEvent = 9;
+pub const PERFCOUNTEREVT_CORE_DATA_CACHE_READ: PerfCounterEvent = 10;
+pub const PERFCOUNTEREVT_CORE_DATA_CACHE_READ_MISS: PerfCounterEvent = 11;
+pub const PERFCOUNTEREVT_CORE_DATA_CACHE_WRITE: PerfCounterEvent = 12;
+pub const PERFCOUNTEREVT_CORE_DATA_CACHE_WRITE_MISS: PerfCounterEvent = 13;
+pub const PERFCOUNTEREVT_CORE_DATA_CACHE_LINE_EVICTION: PerfCounterEvent = 14;
+pub const PERFCOUNTEREVT_CORE_PC_CHANGED: PerfCounterEvent = 15;
+pub const PERFCOUNTEREVT_CORE_MAIN_TLB_MISS: PerfCounterEvent = 16;
+pub const PERFCOUNTEREVT_CORE_EXTERNAL_REQUEST: PerfCounterEvent = 17;
+pub const PERFCOUNTEREVT_CORE_STALL_BY_LSU_FULL: PerfCounterEvent = 18;
+pub const PERFCOUNTEREVT_CORE_STORE_BUFFER_DRAIN: PerfCounterEvent = 19;
+pub const PERFCOUNTEREVT_CORE_MERGE_IN_STORE_BUFFER: PerfCounterEvent = 20;
+pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT: PerfCounterEvent = 255;
+pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT_64: PerfCounterEvent = 4095;
+pub const PERFCOUNTEREVT_SCU_BASE: PerfCounterEvent = 4096;
+pub const PERFCOUNTEREVT_SCU_DISABLED: PerfCounterEvent = 4096;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE0: PerfCounterEvent = 4097;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE1: PerfCounterEvent = 4098;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE2: PerfCounterEvent = 4099;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE3: PerfCounterEvent = 4100;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE0: PerfCounterEvent = 4101;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE1: PerfCounterEvent = 4102;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE2: PerfCounterEvent = 4103;
+pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE3: PerfCounterEvent = 4104;
+pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE0: PerfCounterEvent = 4105;
+pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE1: PerfCounterEvent = 4106;
+pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE2: PerfCounterEvent = 4107;
+pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE3: PerfCounterEvent = 4108;
+pub const PERFCOUNTEREVT_SCU_LINE_MIGRATION: PerfCounterEvent = 4109;
+pub const PERFCOUNTEREVT_SCU_READ_BUSY_PORT0: PerfCounterEvent = 4110;
+pub const PERFCOUNTEREVT_SCU_READ_BUSY_PORT1: PerfCounterEvent = 4111;
+pub const PERFCOUNTEREVT_SCU_WRITE_BUSY_PORT0: PerfCounterEvent = 4112;
+pub const PERFCOUNTEREVT_SCU_WRITE_BUSY_PORT1: PerfCounterEvent = 4113;
+pub const PERFCOUNTEREVT_SCU_EXTERNAL_READ: PerfCounterEvent = 4114;
+pub const PERFCOUNTEREVT_SCU_EXTERNAL_WRITE: PerfCounterEvent = 4115;
+pub const PERFCOUNTEREVT_SCU_CYCLE_COUNT: PerfCounterEvent = 4127;
+pub type PerfCounterEvent = ::libc::c_uint;
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct AttachProcessEvent {
- pub program_id: u64,
+ pub program_id: u64_,
pub process_name: [::libc::c_char; 8usize],
- pub process_id: u32,
- pub other_flags: u32,
+ pub process_id: u32_,
+ pub other_flags: u32_,
}
pub const EXITPROCESS_EVENT_EXIT: ExitProcessEventReason = 0;
pub const EXITPROCESS_EVENT_TERMINATE: ExitProcessEventReason = 1;
pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2;
-pub type ExitProcessEventReason = u32;
+pub type ExitProcessEventReason = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ExitProcessEvent {
pub reason: ExitProcessEventReason,
}
+impl Default for ExitProcessEvent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct AttachThreadEvent {
- pub creator_thread_id: u32,
- pub thread_local_storage: u32,
- pub entry_point: u32,
+ pub creator_thread_id: u32_,
+ pub thread_local_storage: u32_,
+ pub entry_point: u32_,
}
pub const EXITTHREAD_EVENT_EXIT: ExitThreadEventReason = 0;
pub const EXITTHREAD_EVENT_TERMINATE: ExitThreadEventReason = 1;
pub const EXITTHREAD_EVENT_EXIT_PROCESS: ExitThreadEventReason = 2;
pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3;
-pub type ExitThreadEventReason = u32;
+pub type ExitThreadEventReason = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ExitThreadEvent {
pub reason: ExitThreadEventReason,
}
+impl Default for ExitThreadEvent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub const USERBREAK_PANIC: UserBreakType = 0;
pub const USERBREAK_ASSERT: UserBreakType = 1;
pub const USERBREAK_USER: UserBreakType = 2;
pub const USERBREAK_LOAD_RO: UserBreakType = 3;
pub const USERBREAK_UNLOAD_RO: UserBreakType = 4;
-pub type UserBreakType = u32;
+pub type UserBreakType = ::libc::c_uint;
pub const EXCEVENT_UNDEFINED_INSTRUCTION: ExceptionEventType = 0;
pub const EXCEVENT_PREFETCH_ABORT: ExceptionEventType = 1;
pub const EXCEVENT_DATA_ABORT: ExceptionEventType = 2;
@@ -1488,66 +1715,100 @@ pub const EXCEVENT_STOP_POINT: ExceptionEventType = 5;
pub const EXCEVENT_USER_BREAK: ExceptionEventType = 6;
pub const EXCEVENT_DEBUGGER_BREAK: ExceptionEventType = 7;
pub const EXCEVENT_UNDEFINED_SYSCALL: ExceptionEventType = 8;
-pub type ExceptionEventType = u32;
+pub type ExceptionEventType = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct FaultExceptionEvent {
- pub fault_information: u32,
+ pub fault_information: u32_,
}
pub const STOPPOINT_SVC_FF: StopPointType = 0;
pub const STOPPOINT_BREAKPOINT: StopPointType = 1;
pub const STOPPOINT_WATCHPOINT: StopPointType = 2;
-pub type StopPointType = u32;
+pub type StopPointType = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct StopPointExceptionEvent {
pub type_: StopPointType,
- pub fault_information: u32,
+ pub fault_information: u32_,
+}
+impl Default for StopPointExceptionEvent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct UserBreakExceptionEvent {
pub type_: UserBreakType,
- pub croInfo: u32,
- pub croInfoSize: u32,
+ pub croInfo: u32_,
+ pub croInfoSize: u32_,
+}
+impl Default for UserBreakExceptionEvent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct DebuggerBreakExceptionEvent {
pub thread_ids: [s32; 4usize],
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExceptionEvent {
pub type_: ExceptionEventType,
- pub address: u32,
+ pub address: u32_,
pub __bindgen_anon_1: ExceptionEvent__bindgen_ty_1,
}
#[repr(C)]
-pub struct ExceptionEvent__bindgen_ty_1 {
- pub fault: __BindgenUnionField<FaultExceptionEvent>,
- pub stop_point: __BindgenUnionField<StopPointExceptionEvent>,
- pub user_break: __BindgenUnionField<UserBreakExceptionEvent>,
- pub debugger_break: __BindgenUnionField<DebuggerBreakExceptionEvent>,
- pub bindgen_union_field: [u32; 4usize],
+#[derive(Copy, Clone)]
+pub union ExceptionEvent__bindgen_ty_1 {
+ pub fault: FaultExceptionEvent,
+ pub stop_point: StopPointExceptionEvent,
+ pub user_break: UserBreakExceptionEvent,
+ pub debugger_break: DebuggerBreakExceptionEvent,
+ _bindgen_union_align: [u32; 4usize],
+}
+impl Default for ExceptionEvent__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for ExceptionEvent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ScheduleInOutEvent {
- pub clock_tick: u64,
+ pub clock_tick: u64_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SyscallInOutEvent {
- pub clock_tick: u64,
- pub syscall: u32,
+ pub clock_tick: u64_,
+ pub syscall: u32_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct OutputStringEvent {
- pub string_addr: u32,
- pub string_size: u32,
+ pub string_addr: u32_,
+ pub string_size: u32_,
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct MapEvent {
- pub mapped_addr: u32,
- pub mapped_size: u32,
+ pub mapped_addr: u32_,
+ pub mapped_size: u32_,
pub memperm: MemPerm,
pub memstate: MemState,
}
+impl Default for MapEvent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub const DBGEVENT_ATTACH_PROCESS: DebugEventType = 0;
pub const DBGEVENT_ATTACH_THREAD: DebugEventType = 1;
pub const DBGEVENT_EXIT_THREAD: DebugEventType = 2;
@@ -1561,39 +1822,57 @@ pub const DBGEVENT_SYSCALL_IN: DebugEventType = 9;
pub const DBGEVENT_SYSCALL_OUT: DebugEventType = 10;
pub const DBGEVENT_OUTPUT_STRING: DebugEventType = 11;
pub const DBGEVENT_MAP: DebugEventType = 12;
-pub type DebugEventType = u32;
+pub type DebugEventType = ::libc::c_uint;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct DebugEventInfo {
pub type_: DebugEventType,
- pub thread_id: u32,
- pub flags: u32,
- pub remnants: [u8; 4usize],
+ pub thread_id: u32_,
+ pub flags: u32_,
+ pub remnants: [u8_; 4usize],
pub __bindgen_anon_1: DebugEventInfo__bindgen_ty_1,
}
#[repr(C)]
-pub struct DebugEventInfo__bindgen_ty_1 {
- pub attach_process: __BindgenUnionField<AttachProcessEvent>,
- pub attach_thread: __BindgenUnionField<AttachThreadEvent>,
- pub exit_thread: __BindgenUnionField<ExitThreadEvent>,
- pub exit_process: __BindgenUnionField<ExitProcessEvent>,
- pub exception: __BindgenUnionField<ExceptionEvent>,
- pub scheduler: __BindgenUnionField<ScheduleInOutEvent>,
- pub syscall: __BindgenUnionField<SyscallInOutEvent>,
- pub output_string: __BindgenUnionField<OutputStringEvent>,
- pub map: __BindgenUnionField<MapEvent>,
- pub bindgen_union_field: [u64; 3usize],
+#[derive(Copy, Clone)]
+pub union DebugEventInfo__bindgen_ty_1 {
+ pub attach_process: AttachProcessEvent,
+ pub attach_thread: AttachThreadEvent,
+ pub exit_thread: ExitThreadEvent,
+ pub exit_process: ExitProcessEvent,
+ pub exception: ExceptionEvent,
+ pub scheduler: ScheduleInOutEvent,
+ pub syscall: SyscallInOutEvent,
+ pub output_string: OutputStringEvent,
+ pub map: MapEvent,
+ _bindgen_union_align: [u64; 3usize],
+}
+impl Default for DebugEventInfo__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for DebugEventInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
pub const DBG_INHIBIT_USER_CPU_EXCEPTION_HANDLERS: DebugFlags = 1;
pub const DBG_SIGNAL_FAULT_EXCEPTION_EVENTS: DebugFlags = 2;
pub const DBG_SIGNAL_SCHEDULE_EVENTS: DebugFlags = 4;
pub const DBG_SIGNAL_SYSCALL_EVENTS: DebugFlags = 8;
pub const DBG_SIGNAL_MAP_EVENTS: DebugFlags = 16;
-pub type DebugFlags = u32;
+pub type DebugFlags = ::libc::c_uint;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ThreadContext {
pub cpu_registers: CpuRegisters,
pub fpu_registers: FpuRegisters,
}
+impl Default for ThreadContext {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub const THREADCONTEXT_CONTROL_CPU_GPRS: ThreadContextControlFlags = 1;
pub const THREADCONTEXT_CONTROL_CPU_SPRS: ThreadContextControlFlags = 2;
pub const THREADCONTEXT_CONTROL_FPU_GPRS: ThreadContextControlFlags = 4;
@@ -1601,44 +1880,51 @@ pub const THREADCONTEXT_CONTROL_FPU_SPRS: ThreadContextControlFlags = 8;
pub const THREADCONTEXT_CONTROL_CPU_REGS: ThreadContextControlFlags = 3;
pub const THREADCONTEXT_CONTROL_FPU_REGS: ThreadContextControlFlags = 12;
pub const THREADCONTEXT_CONTROL_ALL: ThreadContextControlFlags = 15;
-pub type ThreadContextControlFlags = u32;
+pub type ThreadContextControlFlags = ::libc::c_uint;
pub const DBGTHREAD_PARAMETER_PRIORITY: DebugThreadParameter = 0;
pub const DBGTHREAD_PARAMETER_SCHEDULING_MASK_LOW: DebugThreadParameter = 1;
pub const DBGTHREAD_PARAMETER_CPU_IDEAL: DebugThreadParameter = 2;
pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3;
-pub type DebugThreadParameter = u32;
+pub type DebugThreadParameter = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CodeSetInfo {
- pub name: [u8; 8usize],
- pub unk1: u16,
- pub unk2: u16,
- pub unk3: u32,
- pub text_addr: u32,
- pub text_size: u32,
- pub ro_addr: u32,
- pub ro_size: u32,
- pub rw_addr: u32,
- pub rw_size: u32,
- pub text_size_total: u32,
- pub ro_size_total: u32,
- pub rw_size_total: u32,
- pub unk4: u32,
- pub program_id: u64,
+ pub name: [u8_; 8usize],
+ pub unk1: u16_,
+ pub unk2: u16_,
+ pub unk3: u32_,
+ pub text_addr: u32_,
+ pub text_size: u32_,
+ pub ro_addr: u32_,
+ pub ro_size: u32_,
+ pub rw_addr: u32_,
+ pub rw_size: u32_,
+ pub text_size_total: u32_,
+ pub ro_size_total: u32_,
+ pub rw_size_total: u32_,
+ pub unk4: u32_,
+ pub program_id: u64_,
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct StartupInfo {
pub priority: ::libc::c_int,
- pub stack_size: u32,
+ pub stack_size: u32_,
pub argc: ::libc::c_int,
- pub argv: *mut u16,
- pub envp: *mut u16,
+ pub argv: *mut u16_,
+ pub envp: *mut u16_,
+}
+impl Default for StartupInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub fn svcControlMemory(
- addr_out: *mut u32,
- addr0: u32,
- addr1: u32,
- size: u32,
+ addr_out: *mut u32_,
+ addr0: u32_,
+ addr1: u32_,
+ size: u32_,
op: MemOp,
perm: MemPerm,
) -> Result;
@@ -1646,18 +1932,18 @@ extern "C" {
extern "C" {
pub fn svcControlProcessMemory(
process: Handle,
- addr0: u32,
- addr1: u32,
- size: u32,
- type_: u32,
- perm: u32,
+ addr0: u32_,
+ addr1: u32_,
+ size: u32_,
+ type_: u32_,
+ perm: u32_,
) -> Result;
}
extern "C" {
pub fn svcCreateMemoryBlock(
memblock: *mut Handle,
- addr: u32,
- size: u32,
+ addr: u32_,
+ size: u32_,
my_perm: MemPerm,
other_perm: MemPerm,
) -> Result;
@@ -1665,71 +1951,33 @@ extern "C" {
extern "C" {
pub fn svcMapMemoryBlock(
memblock: Handle,
- addr: u32,
+ addr: u32_,
my_perm: MemPerm,
other_perm: MemPerm,
) -> Result;
}
extern "C" {
- pub fn svcMapProcessMemory(process: Handle, destAddress: u32, size: u32) -> Result;
-}
-extern "C" {
- pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32, size: u32) -> Result;
-}
-extern "C" {
- pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32) -> Result;
-}
-extern "C" {
- pub fn svcStartInterProcessDma(
- dma: *mut Handle,
- dstProcess: Handle,
- dst: *mut ::libc::c_void,
- srcProcess: Handle,
- src: *const ::libc::c_void,
- size: u32,
- dmaConfig: *mut ::libc::c_void,
- ) -> Result;
+ pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result;
}
extern "C" {
- pub fn svcStopDma(dma: Handle) -> Result;
+ pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result;
}
extern "C" {
- pub fn svcGetDmaState(dmaState: *mut ::libc::c_void, dma: Handle) -> Result;
+ pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result;
}
extern "C" {
- pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32) -> Result;
+ pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result;
}
extern "C" {
pub fn svcQueryProcessMemory(
info: *mut MemInfo,
out: *mut PageInfo,
process: Handle,
- addr: u32,
- ) -> Result;
-}
-extern "C" {
- pub fn svcInvalidateProcessDataCache(
- process: Handle,
- addr: *mut ::libc::c_void,
- size: u32,
- ) -> Result;
-}
-extern "C" {
- pub fn svcStoreProcessDataCache(
- process: Handle,
- addr: *mut ::libc::c_void,
- size: u32,
- ) -> Result;
-}
-extern "C" {
- pub fn svcFlushProcessDataCache(
- process: Handle,
- addr: *const ::libc::c_void,
- size: u32,
+ addr: u32_,
) -> Result;
}
extern "C" {
- pub fn svcOpenProcess(process: *mut Handle, processId: u32) -> Result;
+ pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result;
}
extern "C" {
pub fn svcExitProcess();
@@ -1738,22 +1986,22 @@ extern "C" {
pub fn svcTerminateProcess(process: Handle) -> Result;
}
extern "C" {
- pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32) -> Result;
+ pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result;
}
extern "C" {
- pub fn svcGetProcessId(out: *mut u32, handle: Handle) -> Result;
+ pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn svcGetProcessList(
processCount: *mut s32,
- processIds: *mut u32,
+ processIds: *mut u32_,
processIdMaxCount: s32,
) -> Result;
}
extern "C" {
pub fn svcGetThreadList(
threadCount: *mut s32,
- threadIds: *mut u32,
+ threadIds: *mut u32_,
threadIdMaxCount: s32,
process: Handle,
) -> Result;
@@ -1782,13 +2030,13 @@ extern "C" {
pub fn svcCreateProcess(
out: *mut Handle,
codeset: Handle,
- arm11kernelcaps: *const u32,
- arm11kernelcaps_num: u32,
+ arm11kernelcaps: *const u32_,
+ arm11kernelcaps_num: u32_,
) -> Result;
}
extern "C" {
pub fn svcGetProcessAffinityMask(
- affinitymask: *mut u8,
+ affinitymask: *mut u8_,
process: Handle,
processorcount: s32,
) -> Result;
@@ -1796,7 +2044,7 @@ extern "C" {
extern "C" {
pub fn svcSetProcessAffinityMask(
process: Handle,
- affinitymask: *const u8,
+ affinitymask: *const u8_,
processorcount: s32,
) -> Result;
}
@@ -1813,14 +2061,14 @@ extern "C" {
pub fn svcCreateThread(
thread: *mut Handle,
entrypoint: ThreadFunc,
- arg: u32,
- stack_top: *mut u32,
+ arg: u32_,
+ stack_top: *mut u32_,
thread_priority: s32,
processor_id: s32,
) -> Result;
}
extern "C" {
- pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32) -> Result;
+ pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result;
}
extern "C" {
pub fn svcExitThread();
@@ -1836,7 +2084,7 @@ extern "C" {
}
extern "C" {
pub fn svcGetThreadAffinityMask(
- affinitymask: *mut u8,
+ affinitymask: *mut u8_,
thread: Handle,
processorcount: s32,
) -> Result;
@@ -1844,7 +2092,7 @@ extern "C" {
extern "C" {
pub fn svcSetThreadAffinityMask(
thread: Handle,
- affinitymask: *const u8,
+ affinitymask: *const u8_,
processorcount: s32,
) -> Result;
}
@@ -1858,7 +2106,7 @@ extern "C" {
pub fn svcGetProcessorID() -> s32;
}
extern "C" {
- pub fn svcGetThreadId(out: *mut u32, handle: Handle) -> Result;
+ pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result;
@@ -1894,7 +2142,7 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn svcGetProcessIdOfThread(out: *mut u32, handle: Handle) -> Result;
+ pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result;
@@ -1939,10 +2187,18 @@ extern "C" {
extern "C" {
pub fn svcArbitrateAddress(
arbiter: Handle,
- addr: u32,
+ addr: u32_,
+ type_: ArbitrationType,
+ value: s32,
+ timeout_ns: s64,
+ ) -> Result;
+}
+extern "C" {
+ pub fn svcArbitrateAddressNoTimeout(
+ arbiter: Handle,
+ addr: u32_,
type_: ArbitrationType,
value: s32,
- nanoseconds: s64,
) -> Result;
}
extern "C" {
@@ -1966,17 +2222,6 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn svcBindInterrupt(
- interruptId: u32,
- eventOrSemaphore: Handle,
- priority: s32,
- isManualClear: bool,
- ) -> Result;
-}
-extern "C" {
- pub fn svcUnbindInterrupt(interruptId: u32, eventOrSemaphore: Handle) -> Result;
-}
-extern "C" {
pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result;
}
extern "C" {
@@ -1989,7 +2234,7 @@ extern "C" {
pub fn svcClearTimer(timer: Handle) -> Result;
}
extern "C" {
- pub fn svcGetSystemTick() -> u64;
+ pub fn svcGetSystemTick() -> u64_;
}
extern "C" {
pub fn svcCloseHandle(handle: Handle) -> Result;
@@ -1998,10 +2243,59 @@ extern "C" {
pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result;
}
extern "C" {
- pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32) -> Result;
+ pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result;
+}
+extern "C" {
+ pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result;
+}
+extern "C" {
+ pub fn svcKernelSetState(type_: u32_, ...) -> Result;
+}
+extern "C" {
+ pub fn svcBindInterrupt(
+ interruptId: u32_,
+ eventOrSemaphore: Handle,
+ priority: s32,
+ isManualClear: bool,
+ ) -> Result;
+}
+extern "C" {
+ pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result;
+}
+extern "C" {
+ pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn svcStartInterProcessDma(
+ dma: *mut Handle,
+ dstProcess: Handle,
+ dstAddr: u32_,
+ srcProcess: Handle,
+ srcAddr: u32_,
+ size: u32_,
+ cfg: *const DmaConfig,
+ ) -> Result;
+}
+extern "C" {
+ pub fn svcStopDma(dma: Handle) -> Result;
}
extern "C" {
- pub fn svcGetSystemInfo(out: *mut s64, type_: u32, param: s32) -> Result;
+ pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result;
+}
+extern "C" {
+ pub fn svcRestartDma(
+ dma: Handle,
+ dstAddr: u32_,
+ srcAddr: u32_,
+ size: u32_,
+ flags: s8,
+ ) -> Result;
}
extern "C" {
pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result;
@@ -2010,19 +2304,28 @@ extern "C" {
pub fn svcSetWifiEnabled(enabled: bool) -> Result;
}
extern "C" {
- pub fn svcKernelSetState(type_: u32, ...) -> Result;
+ pub fn svcBreak(breakReason: UserBreakType);
}
extern "C" {
- pub fn svcBreak(breakReason: UserBreakType);
+ pub fn svcBreakRO(
+ breakReason: UserBreakType,
+ croInfo: *const ::libc::c_void,
+ croInfoSize: u32_,
+ );
}
extern "C" {
- pub fn svcBreakRO(breakReason: UserBreakType, croInfo: *const ::libc::c_void, croInfoSize: u32);
+ pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result;
}
extern "C" {
- pub fn svcOutputDebugString(str: *const ::libc::c_char, length: s32) -> Result;
+ pub fn svcControlPerformanceCounter(
+ out: *mut u64_,
+ op: PerfCounterOperation,
+ param1: u32_,
+ param2: u64_,
+ ) -> Result;
}
extern "C" {
- pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32) -> Result;
+ pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result;
}
extern "C" {
pub fn svcBreakDebugProcess(debug: Handle) -> Result;
@@ -2040,14 +2343,14 @@ extern "C" {
pub fn svcGetDebugThreadContext(
context: *mut ThreadContext,
debug: Handle,
- threadId: u32,
+ threadId: u32_,
controlFlags: ThreadContextControlFlags,
) -> Result;
}
extern "C" {
pub fn svcSetDebugThreadContext(
debug: Handle,
- threadId: u32,
+ threadId: u32_,
context: *mut ThreadContext,
controlFlags: ThreadContextControlFlags,
) -> Result;
@@ -2057,91 +2360,93 @@ extern "C" {
info: *mut MemInfo,
out: *mut PageInfo,
debug: Handle,
- addr: u32,
+ addr: u32_,
) -> Result;
}
extern "C" {
pub fn svcReadProcessMemory(
buffer: *mut ::libc::c_void,
debug: Handle,
- addr: u32,
- size: u32,
+ addr: u32_,
+ size: u32_,
) -> Result;
}
extern "C" {
pub fn svcWriteProcessMemory(
debug: Handle,
buffer: *const ::libc::c_void,
- addr: u32,
- size: u32,
+ addr: u32_,
+ size: u32_,
) -> Result;
}
extern "C" {
- pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32, value: u32) -> Result;
+ pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result;
}
extern "C" {
pub fn svcGetDebugThreadParam(
unused: *mut s64,
- out: *mut u32,
+ out: *mut u32_,
debug: Handle,
- threadId: u32,
+ threadId: u32_,
parameter: DebugThreadParameter,
) -> Result;
}
extern "C" {
pub fn svcBackdoor(callback: ::core::option::Option<unsafe extern "C" fn() -> s32>) -> Result;
}
-pub const ARM9DESC_MOUNT_NAND: _bindgen_ty_5 = 1;
-pub const ARM9DESC_MOUNT_NANDRO_RW: _bindgen_ty_5 = 2;
-pub const ARM9DESC_MOUNT_TWLN: _bindgen_ty_5 = 4;
-pub const ARM9DESC_MOUNT_WNAND: _bindgen_ty_5 = 8;
-pub const ARM9DESC_MOUNT_CARDSPI: _bindgen_ty_5 = 16;
-pub const ARM9DESC_USE_SDIF3: _bindgen_ty_5 = 32;
-pub const ARM9DESC_CREATE_SEED: _bindgen_ty_5 = 64;
-pub const ARM9DESC_USE_CARD_SPI: _bindgen_ty_5 = 128;
-pub const ARM9DESC_SD_APPLICATION: _bindgen_ty_5 = 256;
-pub const ARM9DESC_MOUNT_SDMC_RW: _bindgen_ty_5 = 512;
-pub type _bindgen_ty_5 = u32;
-pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: _bindgen_ty_6 = 1;
-pub const FSACCESS_CATEGORY_HARDWARE_CHECK: _bindgen_ty_6 = 2;
-pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: _bindgen_ty_6 = 4;
-pub const FSACCESS_DEBUG: _bindgen_ty_6 = 8;
-pub const FSACCESS_TWLCARD_BACKUP: _bindgen_ty_6 = 16;
-pub const FSACCESS_TWLNAND_DATA: _bindgen_ty_6 = 32;
-pub const FSACCESS_BOSS: _bindgen_ty_6 = 64;
-pub const FSACCESS_SDMC_RW: _bindgen_ty_6 = 128;
-pub const FSACCESS_CORE: _bindgen_ty_6 = 256;
-pub const FSACCESS_NANDRO_RO: _bindgen_ty_6 = 512;
-pub const FSACCESS_NANDRW: _bindgen_ty_6 = 1024;
-pub const FSACCESS_NANDRO_RW: _bindgen_ty_6 = 2048;
-pub const FSACCESS_CATEGORY_SYSTEM_SETTINGS: _bindgen_ty_6 = 4096;
-pub const FSACCESS_CARDBOARD: _bindgen_ty_6 = 8192;
-pub const FSACCESS_EXPORT_IMPORT_IVS: _bindgen_ty_6 = 16384;
-pub const FSACCESS_SDMC_WO: _bindgen_ty_6 = 32768;
-pub const FSACCESS_SWITCH_CLEANUP: _bindgen_ty_6 = 65536;
-pub const FSACCESS_SAVEDATA_MOVE: _bindgen_ty_6 = 131072;
-pub const FSACCESS_SHOP: _bindgen_ty_6 = 262144;
-pub const FSACCESS_SHELL: _bindgen_ty_6 = 524288;
-pub const FSACCESS_CATEGORY_HOME_MENU: _bindgen_ty_6 = 1048576;
-pub const FSACCESS_SEEDDB: _bindgen_ty_6 = 2097152;
-pub type _bindgen_ty_6 = u32;
+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 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 type _bindgen_ty_8 = ::libc::c_uint;
pub const RESLIMIT_CATEGORY_APPLICATION: ResourceLimitCategory = 0;
pub const RESLIMIT_CATEGORY_SYS_APPLET: ResourceLimitCategory = 1;
pub const RESLIMIT_CATEGORY_LIB_APPLET: ResourceLimitCategory = 2;
pub const RESLIMIT_CATEGORY_OTHER: ResourceLimitCategory = 3;
-pub type ResourceLimitCategory = u32;
+pub type ResourceLimitCategory = ::libc::c_uint;
pub const SYSMODE_O3DS_PROD: SystemMode = 0;
pub const SYSMODE_N3DS_PROD: SystemMode = 1;
pub const SYSMODE_DEV1: SystemMode = 2;
pub const SYSMODE_DEV2: SystemMode = 3;
pub const SYSMODE_DEV3: SystemMode = 4;
pub const SYSMODE_DEV4: SystemMode = 5;
-pub type SystemMode = u32;
+pub type SystemMode = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_SystemInfoFlags {
- pub reserved: [u8; 5usize],
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
- pub remaster_version: u16,
+ pub reserved: [u8_; 5usize],
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+ pub remaster_version: u16_,
}
impl ExHeader_SystemInfoFlags {
#[inline]
@@ -2170,9 +2475,8 @@ impl ExHeader_SystemInfoFlags {
pub fn new_bitfield_1(
compress_exefs_code: bool,
is_sd_application: bool,
- ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
- Default::default();
+ ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let compress_exefs_code: u8 = unsafe { ::core::mem::transmute(compress_exefs_code) };
compress_exefs_code as u64
@@ -2185,49 +2489,65 @@ impl ExHeader_SystemInfoFlags {
}
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_CodeSectionInfo {
- pub address: u32,
- pub num_pages: u32,
- pub size: u32,
+ pub address: u32_,
+ pub num_pages: u32_,
+ pub size: u32_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_CodeSetInfo {
pub name: [::libc::c_char; 8usize],
pub flags: ExHeader_SystemInfoFlags,
pub text: ExHeader_CodeSectionInfo,
- pub stack_size: u32,
+ pub stack_size: u32_,
pub rodata: ExHeader_CodeSectionInfo,
- pub reserved: u32,
+ pub reserved: u32_,
pub data: ExHeader_CodeSectionInfo,
- pub bss_size: u32,
+ pub bss_size: u32_,
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExHeader_SystemInfo {
- pub savedata_size: u64,
- pub jump_id: u64,
- pub reserved: [u8; 48usize],
+ pub savedata_size: u64_,
+ pub jump_id: u64_,
+ pub reserved: [u8_; 48usize],
+}
+impl Default for ExHeader_SystemInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExHeader_SystemControlInfo {
pub codeset_info: ExHeader_CodeSetInfo,
- pub dependencies: [u64; 48usize],
+ pub dependencies: [u64_; 48usize],
pub system_info: ExHeader_SystemInfo,
}
+impl Default for ExHeader_SystemControlInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_Arm11StorageInfo {
- pub extdata_id: u64,
- pub system_savedata_ids: [u32; 2usize],
- pub accessible_savedata_ids: u64,
- pub fs_access_info: u32,
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
+ pub extdata_id: u64_,
+ pub system_savedata_ids: [u32_; 2usize],
+ pub accessible_savedata_ids: u64_,
+ pub fs_access_info: u32_,
+ pub _bitfield_align_1: [u32; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
impl ExHeader_Arm11StorageInfo {
#[inline]
- pub fn reserved(&self) -> u32 {
+ pub fn reserved(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) }
}
#[inline]
- pub fn set_reserved(&mut self, val: u32) {
+ pub fn set_reserved(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 24u8, val as u64)
@@ -2257,12 +2577,11 @@ impl ExHeader_Arm11StorageInfo {
}
#[inline]
pub fn new_bitfield_1(
- reserved: u32,
+ reserved: u32_,
no_romfs: bool,
use_extended_savedata_access: bool,
- ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> =
- Default::default();
+ ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 24u8, {
let reserved: u32 = unsafe { ::core::mem::transmute(reserved) };
reserved as u64
@@ -2280,10 +2599,17 @@ impl ExHeader_Arm11StorageInfo {
}
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct ExHeader_Arm11CoreInfo {
- pub core_version: u32,
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize], u8>,
- pub priority: u8,
+ pub core_version: u32_,
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
+ pub priority: u8_,
+}
+impl Default for ExHeader_Arm11CoreInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
impl ExHeader_Arm11CoreInfo {
#[inline]
@@ -2309,11 +2635,11 @@ impl ExHeader_Arm11CoreInfo {
}
}
#[inline]
- pub fn flag1_unused(&self) -> u8 {
+ pub fn flag1_unused(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) }
}
#[inline]
- pub fn set_flag1_unused(&mut self, val: u8) {
+ pub fn set_flag1_unused(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 6u8, val as u64)
@@ -2331,33 +2657,33 @@ impl ExHeader_Arm11CoreInfo {
}
}
#[inline]
- pub fn flag2_unused(&self) -> u8 {
+ pub fn flag2_unused(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u8) }
}
#[inline]
- pub fn set_flag2_unused(&mut self, val: u8) {
+ pub fn set_flag2_unused(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(12usize, 4u8, val as u64)
}
}
#[inline]
- pub fn ideal_processor(&self) -> u8 {
+ pub fn ideal_processor(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u8) }
}
#[inline]
- pub fn set_ideal_processor(&mut self, val: u8) {
+ pub fn set_ideal_processor(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(16usize, 2u8, val as u64)
}
}
#[inline]
- pub fn affinity_mask(&self) -> u8 {
+ pub fn affinity_mask(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u8) }
}
#[inline]
- pub fn set_affinity_mask(&mut self, val: u8) {
+ pub fn set_affinity_mask(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(18usize, 2u8, val as u64)
@@ -2378,15 +2704,14 @@ impl ExHeader_Arm11CoreInfo {
pub fn new_bitfield_1(
use_cpu_clockrate_804MHz: bool,
enable_l2c: bool,
- flag1_unused: u8,
+ flag1_unused: u8_,
n3ds_system_mode: SystemMode,
- flag2_unused: u8,
- ideal_processor: u8,
- affinity_mask: u8,
+ flag2_unused: u8_,
+ ideal_processor: u8_,
+ affinity_mask: u8_,
o3ds_system_mode: SystemMode,
- ) -> __BindgenBitfieldUnit<[u8; 3usize], u8> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize], u8> =
- Default::default();
+ ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let use_cpu_clockrate_804MHz: u8 =
unsafe { ::core::mem::transmute(use_cpu_clockrate_804MHz) };
@@ -2424,47 +2749,79 @@ impl ExHeader_Arm11CoreInfo {
}
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExHeader_Arm11SystemLocalCapabilities {
- pub title_id: u64,
+ pub title_id: u64_,
pub core_info: ExHeader_Arm11CoreInfo,
- pub reslimits: [u16; 16usize],
+ pub reslimits: [u16_; 16usize],
pub storage_info: ExHeader_Arm11StorageInfo,
pub service_access: [[::libc::c_char; 8usize]; 34usize],
- pub reserved: [u8; 15usize],
+ pub reserved: [u8_; 15usize],
pub reslimit_category: ResourceLimitCategory,
}
+impl Default for ExHeader_Arm11SystemLocalCapabilities {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_Arm11KernelCapabilities {
- pub descriptors: [u32; 28usize],
- pub reserved: [u8; 16usize],
+ pub descriptors: [u32_; 28usize],
+ pub reserved: [u8_; 16usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_Arm9AccessControl {
- pub descriptors: [u8; 15usize],
- pub descriptor_version: u8,
+ pub descriptors: [u8_; 15usize],
+ pub descriptor_version: u8_,
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExHeader_AccessControlInfo {
pub local_caps: ExHeader_Arm11SystemLocalCapabilities,
pub kernel_caps: ExHeader_Arm11KernelCapabilities,
pub access_control: ExHeader_Arm9AccessControl,
}
+impl Default for ExHeader_AccessControlInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExHeader_Info {
pub sci: ExHeader_SystemControlInfo,
pub aci: ExHeader_AccessControlInfo,
}
+impl Default for ExHeader_Info {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExHeader_AccessDescriptor {
- pub signature: [u8; 256usize],
- pub ncchModulus: [u8; 256usize],
+ pub signature: [u8_; 256usize],
+ pub ncchModulus: [u8_; 256usize],
pub acli: ExHeader_AccessControlInfo,
}
+impl Default for ExHeader_AccessDescriptor {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ExHeader {
pub info: ExHeader_Info,
pub access_descriptor: ExHeader_AccessDescriptor,
}
+impl Default for ExHeader {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
extern "C" {
pub fn srvInit() -> Result;
}
@@ -2512,22 +2869,22 @@ extern "C" {
pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result;
}
extern "C" {
- pub fn srvSubscribe(notificationId: u32) -> Result;
+ pub fn srvSubscribe(notificationId: u32_) -> Result;
}
extern "C" {
- pub fn srvUnsubscribe(notificationId: u32) -> Result;
+ pub fn srvUnsubscribe(notificationId: u32_) -> Result;
}
extern "C" {
- pub fn srvReceiveNotification(notificationIdOut: *mut u32) -> Result;
+ pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result;
}
extern "C" {
- pub fn srvPublishToSubscriber(notificationId: u32, flags: u32) -> Result;
+ pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result;
}
extern "C" {
pub fn srvPublishAndGetSubscriber(
- processIdCountOut: *mut u32,
- processIdsOut: *mut u32,
- notificationId: u32,
+ processIdCountOut: *mut u32_,
+ processIdsOut: *mut u32_,
+ notificationId: u32_,
) -> Result;
}
extern "C" {
@@ -2542,44 +2899,68 @@ pub const ERRF_ERRTYPE_CARD_REMOVED: ERRF_ErrType = 2;
pub const ERRF_ERRTYPE_EXCEPTION: ERRF_ErrType = 3;
pub const ERRF_ERRTYPE_FAILURE: ERRF_ErrType = 4;
pub const ERRF_ERRTYPE_LOGGED: ERRF_ErrType = 5;
-pub type ERRF_ErrType = u32;
+pub type ERRF_ErrType = ::libc::c_uint;
pub const ERRF_EXCEPTION_PREFETCH_ABORT: ERRF_ExceptionType = 0;
pub const ERRF_EXCEPTION_DATA_ABORT: ERRF_ExceptionType = 1;
pub const ERRF_EXCEPTION_UNDEFINED: ERRF_ExceptionType = 2;
pub const ERRF_EXCEPTION_VFP: ERRF_ExceptionType = 3;
-pub type ERRF_ExceptionType = u32;
+pub type ERRF_ExceptionType = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct ERRF_ExceptionInfo {
pub type_: ERRF_ExceptionType,
- pub reserved: [u8; 3usize],
- pub fsr: u32,
- pub far: u32,
- pub fpexc: u32,
- pub fpinst: u32,
- pub fpinst2: u32,
+ pub reserved: [u8_; 3usize],
+ pub fsr: u32_,
+ pub far: u32_,
+ pub fpexc: u32_,
+ pub fpinst: u32_,
+ pub fpinst2: u32_,
+}
+impl Default for ERRF_ExceptionInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct ERRF_ExceptionData {
pub excep: ERRF_ExceptionInfo,
pub regs: CpuRegisters,
}
+impl Default for ERRF_ExceptionData {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct ERRF_FatalErrInfo {
pub type_: ERRF_ErrType,
- pub revHigh: u8,
- pub revLow: u16,
- pub resCode: u32,
- pub pcAddr: u32,
- pub procId: u32,
- pub titleId: u64,
- pub appTitleId: u64,
+ pub revHigh: u8_,
+ pub revLow: u16_,
+ pub resCode: u32_,
+ pub pcAddr: u32_,
+ pub procId: u32_,
+ pub titleId: u64_,
+ pub appTitleId: u64_,
pub data: ERRF_FatalErrInfo__bindgen_ty_1,
}
#[repr(C)]
-pub struct ERRF_FatalErrInfo__bindgen_ty_1 {
- pub exception_data: __BindgenUnionField<ERRF_ExceptionData>,
- pub failure_mesg: __BindgenUnionField<[::libc::c_char; 96usize]>,
- pub bindgen_union_field: [u32; 24usize],
+#[derive(Copy, Clone)]
+pub union ERRF_FatalErrInfo__bindgen_ty_1 {
+ pub exception_data: ERRF_ExceptionData,
+ pub failure_mesg: [::libc::c_char; 96usize],
+ _bindgen_union_align: [u32; 24usize],
+}
+impl Default for ERRF_FatalErrInfo__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for ERRF_FatalErrInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub fn errfInit() -> Result;
@@ -2602,39 +2983,90 @@ extern "C" {
extern "C" {
pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters);
}
-pub const MEMREGION_ALL: MemRegion = 0;
-pub const MEMREGION_APPLICATION: MemRegion = 1;
-pub const MEMREGION_SYSTEM: MemRegion = 2;
-pub const MEMREGION_BASE: MemRegion = 3;
-pub type MemRegion = u32;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct osKernelConfig_s {
+ pub kernel_ver: u32_,
+ pub update_flag: u32_,
+ pub ns_tid: u64_,
+ pub kernel_syscore_ver: u32_,
+ pub env_info: u8_,
+ pub unit_info: u8_,
+ pub boot_env: u8_,
+ pub unk_0x17: u8_,
+ pub kernel_ctrsdk_ver: u32_,
+ pub unk_0x1c: u32_,
+ pub firmlaunch_flags: u32_,
+ pub unk_0x24: [u8_; 12usize],
+ pub app_memtype: u32_,
+ pub unk_0x34: [u8_; 12usize],
+ pub memregion_sz: [u32_; 3usize],
+ pub unk_0x4c: [u8_; 20usize],
+ pub firm_ver: u32_,
+ pub firm_syscore_ver: u32_,
+ pub firm_ctrsdk_ver: u32_,
+}
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct osTimeRef_s {
+ pub value_ms: u64_,
+ pub value_tick: u64_,
+ pub sysclock_hz: s64,
+ pub drift_ms: s64,
+}
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct osSharedConfig_s {
+ pub timeref_cnt: vu32,
+ pub running_hw: u8_,
+ pub mcu_hwinfo: u8_,
+ pub unk_0x06: [u8_; 26usize],
+ pub timeref: [osTimeRef_s; 2usize],
+ pub wifi_macaddr: [u8_; 6usize],
+ pub wifi_strength: vu8,
+ pub network_state: vu8,
+ pub unk_0x68: [u8_; 24usize],
+ pub slider_3d: f32,
+ pub led_3d: vu8,
+ pub led_battery: vu8,
+ pub unk_flag: vu8,
+ pub unk_0x87: u8_,
+ pub unk_0x88: [u8_; 24usize],
+ pub menu_tid: vu64,
+ pub cur_menu_tid: vu64,
+ pub unk_0xB0: [u8_; 16usize],
+ pub headset_connected: vu8,
+}
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct TickCounter {
- pub elapsed: u64,
- pub reference: u64,
+ pub elapsed: u64_,
+ pub reference: u64_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct OS_VersionBin {
- pub build: u8,
- pub minor: u8,
- pub mainver: u8,
- pub reserved_x3: u8,
+ pub build: u8_,
+ pub minor: u8_,
+ pub mainver: u8_,
+ pub reserved_x3: u8_,
pub region: ::libc::c_char,
- pub reserved_x5: [u8; 3usize],
+ pub reserved_x5: [u8_; 3usize],
}
extern "C" {
- pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32;
+ pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32_;
}
extern "C" {
pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void;
}
extern "C" {
- pub fn osStrError(error: u32) -> *const ::libc::c_char;
+ pub fn osStrError(error: Result) -> *const ::libc::c_char;
}
extern "C" {
- pub fn osGetMemRegionUsed(region: MemRegion) -> s64;
+ pub fn osGetTimeRef() -> osTimeRef_s;
}
extern "C" {
- pub fn osGetTime() -> u64;
+ pub fn osGetTime() -> u64_;
}
extern "C" {
pub fn osTickCounterRead(cnt: *const TickCounter) -> f64;
@@ -2653,12 +3085,12 @@ extern "C" {
nver_versionbin: *mut OS_VersionBin,
cver_versionbin: *mut OS_VersionBin,
sysverstr: *mut ::libc::c_char,
- sysverstr_maxsize: u32,
+ sysverstr_maxsize: u32_,
) -> Result;
}
pub type _LOCK_T = i32;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct __lock_t {
pub lock: _LOCK_T,
pub thread_tag: u32,
@@ -2697,21 +3129,30 @@ extern "C" {
}
pub type LightLock = _LOCK_T;
pub type RecursiveLock = _LOCK_RECURSIVE_T;
+pub type CondVar = s32;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct LightEvent {
pub state: s32,
pub lock: LightLock,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct LightSemaphore {
pub current_count: s32,
pub num_threads_acq: s16,
pub max_count: s16,
}
extern "C" {
- pub fn __sync_get_arbiter() -> Handle;
+ pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result;
+}
+extern "C" {
+ pub fn syncArbitrateAddressWithTimeout(
+ addr: *mut s32,
+ type_: ArbitrationType,
+ value: s32,
+ timeout_ns: s64,
+ ) -> Result;
}
extern "C" {
pub fn LightLock_Init(lock: *mut LightLock);
@@ -2738,6 +3179,22 @@ extern "C" {
pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock);
}
extern "C" {
+ pub fn CondVar_Init(cv: *mut CondVar);
+}
+extern "C" {
+ pub fn CondVar_Wait(cv: *mut CondVar, lock: *mut LightLock);
+}
+extern "C" {
+ pub fn CondVar_WaitTimeout(
+ cv: *mut CondVar,
+ lock: *mut LightLock,
+ timeout_ns: s64,
+ ) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn CondVar_WakeUp(cv: *mut CondVar, num_threads: s32);
+}
+extern "C" {
pub fn LightEvent_Init(event: *mut LightEvent, reset_type: ResetType);
}
extern "C" {
@@ -2756,12 +3213,18 @@ extern "C" {
pub fn LightEvent_Wait(event: *mut LightEvent);
}
extern "C" {
+ pub fn LightEvent_WaitTimeout(event: *mut LightEvent, timeout_ns: s64) -> ::libc::c_int;
+}
+extern "C" {
pub fn LightSemaphore_Init(semaphore: *mut LightSemaphore, initial_count: s16, max_count: s16);
}
extern "C" {
pub fn LightSemaphore_Acquire(semaphore: *mut LightSemaphore, count: s32);
}
extern "C" {
+ pub fn LightSemaphore_TryAcquire(semaphore: *mut LightSemaphore, count: s32) -> ::libc::c_int;
+}
+extern "C" {
pub fn LightSemaphore_Release(semaphore: *mut LightSemaphore, count: s32);
}
#[repr(C)]
@@ -2777,9 +3240,9 @@ extern "C" {
pub fn threadCreate(
entrypoint: ThreadFunc,
arg: *mut ::libc::c_void,
- stack_size: usize,
+ stack_size: size_t,
prio: ::libc::c_int,
- affinity: ::libc::c_int,
+ core_id: ::libc::c_int,
detached: bool,
) -> Thread;
}
@@ -2793,7 +3256,7 @@ extern "C" {
pub fn threadFree(thread: Thread);
}
extern "C" {
- pub fn threadJoin(thread: Thread, timeout_ns: u64) -> Result;
+ pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result;
}
extern "C" {
pub fn threadDetach(thread: Thread);
@@ -2805,32 +3268,50 @@ extern "C" {
pub fn threadExit(rc: ::libc::c_int);
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct GSPGPU_FramebufferInfo {
- pub active_framebuf: u32,
- pub framebuf0_vaddr: *mut u32,
- pub framebuf1_vaddr: *mut u32,
- pub framebuf_widthbytesize: u32,
- pub format: u32,
- pub framebuf_dispselect: u32,
- pub unk: u32,
-}
-pub const GSP_RGBA8_OES: GSPGPU_FramebufferFormats = 0;
-pub const GSP_BGR8_OES: GSPGPU_FramebufferFormats = 1;
-pub const GSP_RGB565_OES: GSPGPU_FramebufferFormats = 2;
-pub const GSP_RGB5_A1_OES: GSPGPU_FramebufferFormats = 3;
-pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormats = 4;
-pub type GSPGPU_FramebufferFormats = u32;
+ pub active_framebuf: u32_,
+ pub framebuf0_vaddr: *mut u32_,
+ pub framebuf1_vaddr: *mut u32_,
+ pub framebuf_widthbytesize: u32_,
+ pub format: u32_,
+ pub framebuf_dispselect: u32_,
+ pub unk: u32_,
+}
+impl Default for GSPGPU_FramebufferInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+pub const GSP_RGBA8_OES: GSPGPU_FramebufferFormat = 0;
+pub const GSP_BGR8_OES: GSPGPU_FramebufferFormat = 1;
+pub const GSP_RGB565_OES: GSPGPU_FramebufferFormat = 2;
+pub const GSP_RGB5_A1_OES: GSPGPU_FramebufferFormat = 3;
+pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormat = 4;
+pub type GSPGPU_FramebufferFormat = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct GSPGPU_CaptureInfoEntry {
- pub framebuf0_vaddr: *mut u32,
- pub framebuf1_vaddr: *mut u32,
- pub format: u32,
- pub framebuf_widthbytesize: u32,
+ pub framebuf0_vaddr: *mut u32_,
+ pub framebuf1_vaddr: *mut u32_,
+ pub format: u32_,
+ pub framebuf_widthbytesize: u32_,
+}
+impl Default for GSPGPU_CaptureInfoEntry {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct GSPGPU_CaptureInfo {
pub screencapture: [GSPGPU_CaptureInfoEntry; 2usize],
}
+impl Default for GSPGPU_CaptureInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub const GSPGPU_EVENT_PSC0: GSPGPU_Event = 0;
pub const GSPGPU_EVENT_PSC1: GSPGPU_Event = 1;
pub const GSPGPU_EVENT_VBlank0: GSPGPU_Event = 2;
@@ -2839,7 +3320,7 @@ pub const GSPGPU_EVENT_PPF: GSPGPU_Event = 4;
pub const GSPGPU_EVENT_P3D: GSPGPU_Event = 5;
pub const GSPGPU_EVENT_DMA: GSPGPU_Event = 6;
pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7;
-pub type GSPGPU_Event = u32;
+pub type GSPGPU_Event = ::libc::c_uint;
extern "C" {
pub fn gspInit() -> Result;
}
@@ -2847,6 +3328,19 @@ extern "C" {
pub fn gspExit();
}
extern "C" {
+ pub fn gspHasGpuRight() -> bool;
+}
+extern "C" {
+ pub fn gspPresentBuffer(
+ screen: ::libc::c_uint,
+ swap: ::libc::c_uint,
+ fb_a: *const ::libc::c_void,
+ fb_b: *const ::libc::c_void,
+ stride: u32_,
+ mode: u32_,
+ );
+}
+extern "C" {
pub fn gspSetEventCallback(
id: GSPGPU_Event,
cb: ThreadFunc,
@@ -2855,23 +3349,16 @@ extern "C" {
);
}
extern "C" {
- pub fn gspInitEventHandler(gspEvent: Handle, gspSharedMem: *mut vu8, gspThreadId: u8)
- -> Result;
-}
-extern "C" {
- pub fn gspExitEventHandler();
-}
-extern "C" {
pub fn gspWaitForEvent(id: GSPGPU_Event, nextEvent: bool);
}
extern "C" {
pub fn gspWaitForAnyEvent() -> GSPGPU_Event;
}
extern "C" {
- pub fn gspSubmitGxCommand(sharedGspCmdBuf: *mut u32, gxCommand: *mut u32) -> Result;
+ pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result;
}
extern "C" {
- pub fn GSPGPU_AcquireRight(flags: u8) -> Result;
+ pub fn GSPGPU_AcquireRight(flags: u8_) -> Result;
}
extern "C" {
pub fn GSPGPU_ReleaseRight() -> Result;
@@ -2883,42 +3370,47 @@ extern "C" {
pub fn GSPGPU_SaveVramSysArea() -> Result;
}
extern "C" {
+ pub fn GSPGPU_ResetGpuCore() -> Result;
+}
+extern "C" {
pub fn GSPGPU_RestoreVramSysArea() -> Result;
}
extern "C" {
- pub fn GSPGPU_SetLcdForceBlack(flags: u8) -> Result;
+ pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result;
}
extern "C" {
- pub fn GSPGPU_SetBufferSwap(screenid: u32, framebufinfo: *mut GSPGPU_FramebufferInfo)
- -> Result;
+ pub fn GSPGPU_SetBufferSwap(
+ screenid: u32_,
+ framebufinfo: *const GSPGPU_FramebufferInfo,
+ ) -> Result;
}
extern "C" {
- pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32) -> Result;
+ pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32) -> Result;
+ pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn GSPGPU_WriteHWRegs(regAddr: u32, data: *mut u32, size: u8) -> Result;
+ pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result;
}
extern "C" {
pub fn GSPGPU_WriteHWRegsWithMask(
- regAddr: u32,
- data: *mut u32,
- datasize: u8,
- maskdata: *mut u32,
- masksize: u8,
+ regAddr: u32_,
+ data: *const u32_,
+ datasize: u8_,
+ maskdata: *const u32_,
+ masksize: u8_,
) -> Result;
}
extern "C" {
- pub fn GSPGPU_ReadHWRegs(regAddr: u32, data: *mut u32, size: u8) -> Result;
+ pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result;
}
extern "C" {
pub fn GSPGPU_RegisterInterruptRelayQueue(
eventHandle: Handle,
- flags: u32,
+ flags: u32_,
outMemHandle: *mut Handle,
- threadID: *mut u8,
+ threadID: *mut u8_,
) -> Result;
}
extern "C" {
@@ -2932,17 +3424,17 @@ extern "C" {
}
pub const GFX_TOP: gfxScreen_t = 0;
pub const GFX_BOTTOM: gfxScreen_t = 1;
-pub type gfxScreen_t = u32;
+pub type gfxScreen_t = ::libc::c_uint;
pub const GFX_LEFT: gfx3dSide_t = 0;
pub const GFX_RIGHT: gfx3dSide_t = 1;
-pub type gfx3dSide_t = u32;
+pub type gfx3dSide_t = ::libc::c_uint;
extern "C" {
pub fn gfxInitDefault();
}
extern "C" {
pub fn gfxInit(
- topFormat: GSPGPU_FramebufferFormats,
- bottomFormat: GSPGPU_FramebufferFormats,
+ topFormat: GSPGPU_FramebufferFormat,
+ bottomFormat: GSPGPU_FramebufferFormat,
vrambuffers: bool,
);
}
@@ -2956,56 +3448,63 @@ extern "C" {
pub fn gfxIs3D() -> bool;
}
extern "C" {
- pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormats);
+ pub fn gfxIsWide() -> bool;
}
extern "C" {
- pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormats;
+ pub fn gfxSetWide(enable: bool);
}
extern "C" {
- pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, doubleBuffering: bool);
+ pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormat);
}
extern "C" {
- pub fn gfxFlushBuffers();
+ pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormat;
}
extern "C" {
- pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool);
+ pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, enable: bool);
}
extern "C" {
- pub fn gfxSwapBuffers();
+ pub fn gfxGetFramebuffer(
+ screen: gfxScreen_t,
+ side: gfx3dSide_t,
+ width: *mut u16_,
+ height: *mut u16_,
+ ) -> *mut u8_;
}
extern "C" {
- pub fn gfxSwapBuffersGpu();
+ pub fn gfxFlushBuffers();
}
extern "C" {
- pub fn gfxGetFramebuffer(
- screen: gfxScreen_t,
- side: gfx3dSide_t,
- width: *mut u16,
- height: *mut u16,
- ) -> *mut u8;
+ pub fn gfxScreenSwapBuffers(scr: gfxScreen_t, hasStereo: bool);
}
extern "C" {
- pub static mut gfxTopLeftFramebuffers: [*mut u8; 2usize];
+ pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool);
}
extern "C" {
- pub static mut gfxTopRightFramebuffers: [*mut u8; 2usize];
+ pub fn gfxSwapBuffers();
}
extern "C" {
- pub static mut gfxBottomFramebuffers: [*mut u8; 2usize];
+ pub fn gfxSwapBuffersGpu();
}
pub type ConsolePrint = ::core::option::Option<
unsafe extern "C" fn(con: *mut ::libc::c_void, c: ::libc::c_int) -> bool,
>;
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct ConsoleFont {
- pub gfx: *mut u8,
- pub asciiOffset: u16,
- pub numChars: u16,
+ pub gfx: *mut u8_,
+ pub asciiOffset: u16_,
+ pub numChars: u16_,
+}
+impl Default for ConsoleFont {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct PrintConsole {
pub font: ConsoleFont,
- pub frameBuffer: *mut u16,
+ pub frameBuffer: *mut u16_,
pub cursorX: ::libc::c_int,
pub cursorY: ::libc::c_int,
pub prevCursorX: ::libc::c_int,
@@ -3023,11 +3522,16 @@ pub struct PrintConsole {
pub PrintChar: ConsolePrint,
pub consoleInitialised: bool,
}
+impl Default for PrintConsole {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub const debugDevice_NULL: debugDevice = 0;
pub const debugDevice_SVC: debugDevice = 1;
pub const debugDevice_CONSOLE: debugDevice = 2;
pub const debugDevice_3DMOO: debugDevice = 1;
-pub type debugDevice = u32;
+pub type debugDevice = ::libc::c_uint;
extern "C" {
pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont);
}
@@ -3055,10 +3559,10 @@ extern "C" {
extern "C" {
pub fn consoleClear();
}
-pub const RUNFLAG_APTWORKAROUND: _bindgen_ty_7 = 1;
-pub const RUNFLAG_APTREINIT: _bindgen_ty_7 = 2;
-pub const RUNFLAG_APTCHAINLOAD: _bindgen_ty_7 = 4;
-pub type _bindgen_ty_7 = u32;
+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 type _bindgen_ty_9 = ::libc::c_uint;
extern "C" {
pub fn envGetHandle(name: *const ::libc::c_char) -> Handle;
}
@@ -3070,7 +3574,8 @@ pub type u_int8_t = __uint8_t;
pub type u_int16_t = __uint16_t;
pub type u_int32_t = __uint32_t;
pub type u_int64_t = __uint64_t;
-pub type register_t = ::libc::c_int;
+pub type register_t = __intptr_t;
+pub type wint_t = ::libc::c_int;
pub type __blkcnt_t = ::libc::c_long;
pub type __blksize_t = ::libc::c_long;
pub type __fsblkcnt_t = __uint64_t;
@@ -3087,7 +3592,6 @@ pub type __key_t = ::libc::c_long;
pub type __size_t = ::libc::c_uint;
pub type _ssize_t = ::libc::c_int;
pub type __ssize_t = _ssize_t;
-pub type wint_t = ::libc::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _mbstate_t {
@@ -3101,7 +3605,16 @@ pub union _mbstate_t__bindgen_ty_1 {
pub __wchb: [::libc::c_uchar; 4usize],
_bindgen_union_align: u32,
}
-pub type _flock_t = _LOCK_RECURSIVE_T;
+impl Default for _mbstate_t__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for _mbstate_t {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub type _iconv_t = *mut ::libc::c_void;
pub type __clock_t = ::libc::c_ulong;
pub type __time_t = __int_least64_t;
@@ -3109,6 +3622,7 @@ pub type __clockid_t = ::libc::c_ulong;
pub type __timer_t = ::libc::c_ulong;
pub type __sa_family_t = __uint8_t;
pub type __socklen_t = __uint32_t;
+pub type __nl_item = ::libc::c_int;
pub type __nlink_t = ::libc::c_ushort;
pub type __suseconds_t = ::libc::c_long;
pub type __useconds_t = ::libc::c_ulong;
@@ -3116,19 +3630,19 @@ pub type __sigset_t = ::libc::c_ulong;
pub type suseconds_t = __suseconds_t;
pub type time_t = __int_least64_t;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct timeval {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: ::libc::c_long,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct itimerspec {
pub it_interval: timespec,
pub it_value: timespec,
@@ -3136,7 +3650,7 @@ pub struct itimerspec {
pub type sigset_t = __sigset_t;
pub type fd_mask = ::libc::c_ulong;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct _types_fd_set {
pub fds_bits: [fd_mask; 2usize],
}
@@ -3161,6 +3675,7 @@ extern "C" {
}
pub type in_addr_t = __uint32_t;
pub type in_port_t = __uint16_t;
+pub type u_register_t = __uintptr_t;
pub type u_char = ::libc::c_uchar;
pub type u_short = ::libc::c_ushort;
pub type u_int = ::libc::c_uint;
@@ -3183,6 +3698,7 @@ pub type uid_t = __uid_t;
pub type gid_t = __gid_t;
pub type pid_t = __pid_t;
pub type key_t = __key_t;
+pub type ssize_t = _ssize_t;
pub type mode_t = __mode_t;
pub type nlink_t = __nlink_t;
pub type clockid_t = __clockid_t;
@@ -3190,7 +3706,7 @@ pub type timer_t = __timer_t;
pub type useconds_t = __useconds_t;
pub type sbintime_t = __int64_t;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct sched_param {
pub sched_priority: ::libc::c_int,
}
@@ -3207,23 +3723,28 @@ pub struct pthread_attr_t {
pub schedparam: sched_param,
pub detachstate: ::libc::c_int,
}
+impl Default for pthread_attr_t {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub type pthread_mutex_t = __uint32_t;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct pthread_mutexattr_t {
pub is_initialized: ::libc::c_int,
pub recursive: ::libc::c_int,
}
pub type pthread_cond_t = __uint32_t;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct pthread_condattr_t {
pub is_initialized: ::libc::c_int,
pub clock: clock_t,
}
pub type pthread_key_t = __uint32_t;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct pthread_once_t {
pub is_initialized: ::libc::c_int,
pub init_executed: ::libc::c_int,
@@ -3242,163 +3763,168 @@ pub const DECOMPRESS_HUFF7: decompressType = 39;
pub const DECOMPRESS_HUFF8: decompressType = 40;
pub const DECOMPRESS_HUFF: decompressType = 40;
pub const DECOMPRESS_RLE: decompressType = 48;
-pub type decompressType = u32;
+pub type decompressType = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct decompressIOVec {
pub data: *mut ::libc::c_void,
- pub size: usize,
+ pub size: size_t,
+}
+impl Default for decompressIOVec {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
pub type decompressCallback = ::core::option::Option<
- unsafe extern "C" fn(userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, size: usize)
- -> isize,
+ unsafe extern "C" fn(
+ userdata: *mut ::libc::c_void,
+ buffer: *mut ::libc::c_void,
+ size: size_t,
+ ) -> ssize_t,
>;
extern "C" {
pub fn decompressCallback_FD(
userdata: *mut ::libc::c_void,
buffer: *mut ::libc::c_void,
- size: usize,
- ) -> isize;
+ size: size_t,
+ ) -> ssize_t;
}
extern "C" {
pub fn decompressCallback_Stdio(
userdata: *mut ::libc::c_void,
buffer: *mut ::libc::c_void,
- size: usize,
- ) -> isize;
+ size: size_t,
+ ) -> ssize_t;
}
extern "C" {
pub fn decompressHeader(
type_: *mut decompressType,
- size: *mut usize,
+ size: *mut size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
- insize: usize,
- ) -> isize;
+ insize: size_t,
+ ) -> ssize_t;
}
extern "C" {
pub fn decompressV(
iov: *const decompressIOVec,
- iovcnt: usize,
+ iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
- insize: usize,
+ insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_LZSS(
iov: *const decompressIOVec,
- iovcnt: usize,
+ iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
- insize: usize,
+ insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_LZ11(
iov: *const decompressIOVec,
- iovcnt: usize,
+ iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
- insize: usize,
+ insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_Huff(
- bits: usize,
+ bits: size_t,
iov: *const decompressIOVec,
- iovcnt: usize,
+ iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
- insize: usize,
+ insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_RLE(
iov: *const decompressIOVec,
- iovcnt: usize,
+ iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
- insize: usize,
+ insize: size_t,
) -> bool;
}
extern "C" {
- pub fn decode_utf8(out: *mut u32, in_: *const u8) -> isize;
+ pub fn decode_utf8(out: *mut u32, in_: *const u8) -> ssize_t;
}
extern "C" {
- pub fn decode_utf16(out: *mut u32, in_: *const u16) -> isize;
+ pub fn decode_utf16(out: *mut u32, in_: *const u16) -> ssize_t;
}
extern "C" {
- pub fn encode_utf8(out: *mut u8, in_: u32) -> isize;
+ pub fn encode_utf8(out: *mut u8, in_: u32) -> ssize_t;
}
extern "C" {
- pub fn encode_utf16(out: *mut u16, in_: u32) -> isize;
+ pub fn encode_utf16(out: *mut u16, in_: u32) -> ssize_t;
}
extern "C" {
- pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: usize) -> isize;
+ pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: size_t) -> ssize_t;
}
extern "C" {
- pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: usize) -> isize;
+ pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: size_t) -> ssize_t;
}
extern "C" {
- pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: usize) -> isize;
+ pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: size_t) -> ssize_t;
}
extern "C" {
- pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: usize) -> isize;
+ pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: size_t) -> ssize_t;
}
extern "C" {
- pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: usize) -> isize;
+ pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: size_t) -> ssize_t;
}
extern "C" {
- pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: usize) -> isize;
+ pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: size_t) -> ssize_t;
}
extern "C" {
- pub fn linearAlloc(size: usize) -> *mut ::libc::c_void;
+ pub fn linearAlloc(size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
- pub fn linearMemAlign(size: usize, alignment: usize) -> *mut ::libc::c_void;
+ pub fn linearMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void;
}
extern "C" {
- pub fn linearRealloc(mem: *mut ::libc::c_void, size: usize) -> *mut ::libc::c_void;
+ pub fn linearRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
- pub fn linearGetSize(mem: *mut ::libc::c_void) -> usize;
+ pub fn linearGetSize(mem: *mut ::libc::c_void) -> size_t;
}
extern "C" {
pub fn linearFree(mem: *mut ::libc::c_void);
}
extern "C" {
- pub fn linearSpaceFree() -> u32;
+ pub fn linearSpaceFree() -> u32_;
}
extern "C" {
- pub fn mappableAlloc(size: usize) -> *mut ::libc::c_void;
+ pub fn mappableInit(addrMin: u32_, addrMax: u32_);
}
extern "C" {
- pub fn mappableGetSize(mem: *mut ::libc::c_void) -> usize;
+ pub fn mappableAlloc(size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn mappableFree(mem: *mut ::libc::c_void);
}
extern "C" {
- pub fn mappableSpaceFree() -> u32;
+ pub fn vramAlloc(size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
- pub fn vramAlloc(size: usize) -> *mut ::libc::c_void;
+ pub fn vramMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void;
}
extern "C" {
- pub fn vramMemAlign(size: usize, alignment: usize) -> *mut ::libc::c_void;
+ pub fn vramRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
- pub fn vramRealloc(mem: *mut ::libc::c_void, size: usize) -> *mut ::libc::c_void;
-}
-extern "C" {
- pub fn vramGetSize(mem: *mut ::libc::c_void) -> usize;
+ pub fn vramGetSize(mem: *mut ::libc::c_void) -> size_t;
}
extern "C" {
pub fn vramFree(mem: *mut ::libc::c_void);
}
extern "C" {
- pub fn vramSpaceFree() -> u32;
+ pub fn vramSpaceFree() -> u32_;
}
pub const AC_OPEN: acSecurityMode = 0;
pub const AC_WEP_40BIT: acSecurityMode = 1;
@@ -3408,7 +3934,17 @@ pub const AC_WPA_TKIP: acSecurityMode = 4;
pub const AC_WPA2_TKIP: acSecurityMode = 5;
pub const AC_WPA_AES: acSecurityMode = 6;
pub const AC_WPA2_AES: acSecurityMode = 7;
-pub type acSecurityMode = u32;
+pub type acSecurityMode = ::libc::c_uint;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct acuConfig {
+ pub reserved: [u8_; 512usize],
+}
+impl Default for acuConfig {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
extern "C" {
pub fn acInit() -> Result;
}
@@ -3419,10 +3955,10 @@ extern "C" {
pub fn acWaitInternetConnection() -> Result;
}
extern "C" {
- pub fn ACU_GetWifiStatus(out: *mut u32) -> Result;
+ pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result;
}
extern "C" {
- pub fn ACU_GetStatus(out: *mut u32) -> Result;
+ pub fn ACU_GetStatus(out: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result;
@@ -3431,13 +3967,13 @@ extern "C" {
pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result;
}
extern "C" {
- pub fn ACU_GetSSIDLength(out: *mut u32) -> Result;
+ pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result;
}
extern "C" {
- pub fn ACU_GetProxyPort(out: *mut u32) -> Result;
+ pub fn ACU_GetProxyPort(out: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result;
@@ -3446,32 +3982,47 @@ extern "C" {
pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result;
}
extern "C" {
- pub fn ACU_GetLastErrorCode(errorCode: *mut u32) -> Result;
+ pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result;
}
extern "C" {
- pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32) -> Result;
+ pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result;
}
-pub const FS_OPEN_READ: _bindgen_ty_8 = 1;
-pub const FS_OPEN_WRITE: _bindgen_ty_8 = 2;
-pub const FS_OPEN_CREATE: _bindgen_ty_8 = 4;
-pub type _bindgen_ty_8 = u32;
-pub const FS_WRITE_FLUSH: _bindgen_ty_9 = 1;
-pub const FS_WRITE_UPDATE_TIME: _bindgen_ty_9 = 256;
-pub type _bindgen_ty_9 = u32;
-pub const FS_ATTRIBUTE_DIRECTORY: _bindgen_ty_10 = 1;
-pub const FS_ATTRIBUTE_HIDDEN: _bindgen_ty_10 = 256;
-pub const FS_ATTRIBUTE_ARCHIVE: _bindgen_ty_10 = 65536;
-pub const FS_ATTRIBUTE_READ_ONLY: _bindgen_ty_10 = 16777216;
-pub type _bindgen_ty_10 = u32;
+extern "C" {
+ pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result;
+}
+extern "C" {
+ pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result;
+}
+extern "C" {
+ pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result;
+}
+extern "C" {
+ pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result;
+}
+extern "C" {
+ 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 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 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 type _bindgen_ty_12 = ::libc::c_uint;
pub const MEDIATYPE_NAND: FS_MediaType = 0;
pub const MEDIATYPE_SD: FS_MediaType = 1;
pub const MEDIATYPE_GAME_CARD: FS_MediaType = 2;
-pub type FS_MediaType = u32;
+pub type FS_MediaType = ::libc::c_uint;
pub const SYSTEM_MEDIATYPE_CTR_NAND: FS_SystemMediaType = 0;
pub const SYSTEM_MEDIATYPE_TWL_NAND: FS_SystemMediaType = 1;
pub const SYSTEM_MEDIATYPE_SD: FS_SystemMediaType = 2;
pub const SYSTEM_MEDIATYPE_TWL_PHOTO: FS_SystemMediaType = 3;
-pub type FS_SystemMediaType = u32;
+pub type FS_SystemMediaType = ::libc::c_uint;
pub const ARCHIVE_ROMFS: FS_ArchiveID = 3;
pub const ARCHIVE_SAVEDATA: FS_ArchiveID = 4;
pub const ARCHIVE_EXTDATA: FS_ArchiveID = 6;
@@ -3496,66 +4047,81 @@ pub const ARCHIVE_NAND_W_FS: FS_ArchiveID = 1450741935;
pub const ARCHIVE_GAMECARD_SAVEDATA: FS_ArchiveID = 1450741937;
pub const ARCHIVE_USER_SAVEDATA: FS_ArchiveID = 1450741938;
pub const ARCHIVE_DEMO_SAVEDATA: FS_ArchiveID = 1450741940;
-pub type FS_ArchiveID = u32;
+pub type FS_ArchiveID = ::libc::c_uint;
pub const PATH_INVALID: FS_PathType = 0;
pub const PATH_EMPTY: FS_PathType = 1;
pub const PATH_BINARY: FS_PathType = 2;
pub const PATH_ASCII: FS_PathType = 3;
pub const PATH_UTF16: FS_PathType = 4;
-pub type FS_PathType = u32;
+pub type FS_PathType = ::libc::c_uint;
pub const SECUREVALUE_SLOT_SD: FS_SecureValueSlot = 4096;
-pub type FS_SecureValueSlot = u32;
+pub type FS_SecureValueSlot = ::libc::c_uint;
pub const BAUDRATE_512KHZ: FS_CardSpiBaudRate = 0;
pub const BAUDRATE_1MHZ: FS_CardSpiBaudRate = 1;
pub const BAUDRATE_2MHZ: FS_CardSpiBaudRate = 2;
pub const BAUDRATE_4MHZ: FS_CardSpiBaudRate = 3;
pub const BAUDRATE_8MHZ: FS_CardSpiBaudRate = 4;
pub const BAUDRATE_16MHZ: FS_CardSpiBaudRate = 5;
-pub type FS_CardSpiBaudRate = u32;
+pub type FS_CardSpiBaudRate = ::libc::c_uint;
pub const BUSMODE_1BIT: FS_CardSpiBusMode = 0;
pub const BUSMODE_4BIT: FS_CardSpiBusMode = 1;
-pub type FS_CardSpiBusMode = u32;
+pub type FS_CardSpiBusMode = ::libc::c_uint;
pub const SPECIALCONTENT_UPDATE: FS_SpecialContentType = 1;
pub const SPECIALCONTENT_MANUAL: FS_SpecialContentType = 2;
pub const SPECIALCONTENT_DLP_CHILD: FS_SpecialContentType = 3;
-pub type FS_SpecialContentType = u32;
+pub type FS_SpecialContentType = ::libc::c_uint;
pub const CARD_CTR: FS_CardType = 0;
pub const CARD_TWL: FS_CardType = 1;
-pub type FS_CardType = u32;
+pub type FS_CardType = ::libc::c_uint;
pub const FS_ACTION_UNKNOWN: FS_Action = 0;
-pub type FS_Action = u32;
+pub type FS_Action = ::libc::c_uint;
pub const ARCHIVE_ACTION_COMMIT_SAVE_DATA: FS_ArchiveAction = 0;
pub const ARCHIVE_ACTION_GET_TIMESTAMP: FS_ArchiveAction = 1;
-pub type FS_ArchiveAction = u32;
+pub const ARCHIVE_ACTION_UNKNOWN: FS_ArchiveAction = 30877;
+pub type FS_ArchiveAction = ::libc::c_uint;
pub const SECURESAVE_ACTION_DELETE: FS_SecureSaveAction = 0;
pub const SECURESAVE_ACTION_FORMAT: FS_SecureSaveAction = 1;
-pub type FS_SecureSaveAction = u32;
+pub type FS_SecureSaveAction = ::libc::c_uint;
pub const FILE_ACTION_UNKNOWN: FS_FileAction = 0;
-pub type FS_FileAction = u32;
+pub type FS_FileAction = ::libc::c_uint;
pub const DIRECTORY_ACTION_UNKNOWN: FS_DirectoryAction = 0;
-pub type FS_DirectoryAction = u32;
+pub type FS_DirectoryAction = ::libc::c_uint;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct FS_DirectoryEntry {
- pub name: [u16; 262usize],
+ pub name: [u16_; 262usize],
pub shortName: [::libc::c_char; 10usize],
pub shortExt: [::libc::c_char; 4usize],
- pub valid: u8,
- pub reserved: u8,
- pub attributes: u32,
- pub fileSize: u64,
+ pub valid: u8_,
+ pub reserved: u8_,
+ pub attributes: u32_,
+ pub fileSize: u64_,
+}
+impl Default for FS_DirectoryEntry {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct FS_ArchiveResource {
- pub sectorSize: u32,
- pub clusterSize: u32,
- pub totalClusters: u32,
- pub freeClusters: u32,
+ pub sectorSize: u32_,
+ pub clusterSize: u32_,
+ pub totalClusters: u32_,
+ pub freeClusters: u32_,
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct FS_ProgramInfo {
- pub programId: u64,
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
- pub padding: [u8; 7usize],
+ pub programId: u64_,
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+ pub padding: [u8_; 7usize],
+}
+impl Default for FS_ProgramInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
impl FS_ProgramInfo {
#[inline]
@@ -3570,9 +4136,8 @@ impl FS_ProgramInfo {
}
}
#[inline]
- pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
- Default::default();
+ pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) };
mediaType as u64
@@ -3581,23 +4146,37 @@ impl FS_ProgramInfo {
}
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct FS_ProductInfo {
pub productCode: [::libc::c_char; 16usize],
pub companyCode: [::libc::c_char; 2usize],
- pub remasterVersion: u16,
+ pub remasterVersion: u16_,
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct FS_IntegrityVerificationSeed {
- pub aesCbcMac: [u8; 16usize],
- pub movableSed: [u8; 288usize],
+ pub aesCbcMac: [u8_; 16usize],
+ pub movableSed: [u8_; 288usize],
+}
+impl Default for FS_IntegrityVerificationSeed {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C, packed)]
+#[derive(Debug, Copy, Clone)]
pub struct FS_ExtSaveDataInfo {
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
- pub unknown: u8,
- pub reserved1: u16,
- pub saveId: u64,
- pub reserved2: u32,
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+ pub unknown: u8_,
+ pub reserved1: u16_,
+ pub saveId: u64_,
+ pub reserved2: u32_,
+}
+impl Default for FS_ExtSaveDataInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
impl FS_ExtSaveDataInfo {
#[inline]
@@ -3612,9 +4191,8 @@ impl FS_ExtSaveDataInfo {
}
}
#[inline]
- pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
- Default::default();
+ pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) };
mediaType as u64
@@ -3623,11 +4201,18 @@ impl FS_ExtSaveDataInfo {
}
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct FS_SystemSaveDataInfo {
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
- pub unknown: u8,
- pub reserved: u16,
- pub saveId: u32,
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+ pub unknown: u8_,
+ pub reserved: u16_,
+ pub saveId: u32_,
+}
+impl Default for FS_SystemSaveDataInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
impl FS_SystemSaveDataInfo {
#[inline]
@@ -3642,9 +4227,8 @@ impl FS_SystemSaveDataInfo {
}
}
#[inline]
- pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
- Default::default();
+ pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) };
mediaType as u64
@@ -3653,18 +4237,24 @@ impl FS_SystemSaveDataInfo {
}
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct FS_DeviceMoveContext {
- pub ivs: [u8; 16usize],
- pub encryptParameter: [u8; 16usize],
+ pub ivs: [u8_; 16usize],
+ pub encryptParameter: [u8_; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FS_Path {
pub type_: FS_PathType,
- pub size: u32,
+ pub size: u32_,
pub data: *const ::libc::c_void,
}
-pub type FS_Archive = u64;
+impl Default for FS_Path {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+pub type FS_Archive = u64_;
extern "C" {
pub fn fsInit() -> Result;
}
@@ -3693,9 +4283,9 @@ extern "C" {
pub fn FSUSER_Control(
action: FS_Action,
input: *mut ::libc::c_void,
- inputSize: u32,
+ inputSize: u32_,
output: *mut ::libc::c_void,
- outputSize: u32,
+ outputSize: u32_,
) -> Result;
}
extern "C" {
@@ -3706,8 +4296,8 @@ extern "C" {
out: *mut Handle,
archive: FS_Archive,
path: FS_Path,
- openFlags: u32,
- attributes: u32,
+ openFlags: u32_,
+ attributes: u32_,
) -> Result;
}
extern "C" {
@@ -3716,8 +4306,8 @@ extern "C" {
archiveId: FS_ArchiveID,
archivePath: FS_Path,
filePath: FS_Path,
- openFlags: u32,
- attributes: u32,
+ openFlags: u32_,
+ attributes: u32_,
) -> Result;
}
extern "C" {
@@ -3741,12 +4331,12 @@ extern "C" {
pub fn FSUSER_CreateFile(
archive: FS_Archive,
path: FS_Path,
- attributes: u32,
- fileSize: u64,
+ attributes: u32_,
+ fileSize: u64_,
) -> Result;
}
extern "C" {
- pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32) -> Result;
+ pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_RenameDirectory(
@@ -3767,16 +4357,16 @@ extern "C" {
archive: FS_Archive,
action: FS_ArchiveAction,
input: *mut ::libc::c_void,
- inputSize: u32,
+ inputSize: u32_,
output: *mut ::libc::c_void,
- outputSize: u32,
+ outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result;
}
extern "C" {
- pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64, archive: FS_Archive) -> Result;
+ pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result;
}
extern "C" {
pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result;
@@ -3788,7 +4378,7 @@ extern "C" {
pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result;
}
extern "C" {
- pub fn FSUSER_GetSdmcFatfsError(error: *mut u32) -> Result;
+ pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result;
}
extern "C" {
pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result;
@@ -3797,22 +4387,22 @@ extern "C" {
pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result;
}
extern "C" {
- pub fn FSUSER_GetSdmcCid(out: *mut u8, length: u32) -> Result;
+ pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetNandCid(out: *mut u8, length: u32) -> Result;
+ pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut u32) -> Result;
+ pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut u32) -> Result;
+ pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetSdmcLog(out: *mut u8, length: u32) -> Result;
+ pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetNandLog(out: *mut u8, length: u32) -> Result;
+ pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_ClearSdmcLog() -> Result;
@@ -3833,56 +4423,64 @@ extern "C" {
pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result;
}
extern "C" {
- pub fn FSUSER_CardNorDirectCommand(commandId: u8) -> Result;
+ pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result;
}
extern "C" {
- pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8, address: u32) -> Result;
+ pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_CardNorDirectRead(commandId: u8, size: u32, output: *mut u8) -> Result;
+ pub fn FSUSER_CardNorDirectRead(
+ commandId: u8_,
+ size: u32_,
+ output: *mut ::libc::c_void,
+ ) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectReadWithAddress(
- commandId: u8,
- address: u32,
- size: u32,
- output: *mut u8,
+ commandId: u8_,
+ address: u32_,
+ size: u32_,
+ output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
- pub fn FSUSER_CardNorDirectWrite(commandId: u8, size: u32, input: *mut u8) -> Result;
+ pub fn FSUSER_CardNorDirectWrite(
+ commandId: u8_,
+ size: u32_,
+ input: *const ::libc::c_void,
+ ) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectWriteWithAddress(
- commandId: u8,
- address: u32,
- size: u32,
- input: *mut u8,
+ commandId: u8_,
+ address: u32_,
+ size: u32_,
+ input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectRead_4xIO(
- commandId: u8,
- address: u32,
- size: u32,
- output: *mut u8,
+ commandId: u8_,
+ address: u32_,
+ size: u32_,
+ output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify(
- address: u32,
- size: u32,
- input: *mut u8,
+ address: u32_,
+ size: u32_,
+ input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
- pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32) -> Result;
+ pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32) -> Result;
+ pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32) -> Result;
+ pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result;
@@ -3895,45 +4493,45 @@ extern "C" {
}
extern "C" {
pub fn FSUSER_GetSpecialContentIndex(
- index: *mut u16,
+ index: *mut u16_,
mediaType: FS_MediaType,
- programId: u64,
+ programId: u64_,
type_: FS_SpecialContentType,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetLegacyRomHeader(
mediaType: FS_MediaType,
- programId: u64,
- header: *mut u8,
+ programId: u64_,
+ header: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetLegacyBannerData(
mediaType: FS_MediaType,
- programId: u64,
- banner: *mut u8,
+ programId: u64_,
+ banner: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CheckAuthorityToAccessExtSaveData(
access: *mut bool,
mediaType: FS_MediaType,
- saveId: u64,
- processId: u32,
+ saveId: u64_,
+ processId: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_QueryTotalQuotaSize(
- quotaSize: *mut u64,
- directories: u32,
- files: u32,
- fileSizeCount: u32,
- fileSizes: *mut u64,
+ quotaSize: *mut u64_,
+ directories: u32_,
+ files: u32_,
+ fileSizeCount: u32_,
+ fileSizes: *mut u64_,
) -> Result;
}
extern "C" {
- pub fn FSUSER_AbnegateAccessRight(accessRight: u32) -> Result;
+ pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_DeleteSdmcRoot() -> Result;
@@ -3949,9 +4547,9 @@ extern "C" {
}
extern "C" {
pub fn FSUSER_GetFormatInfo(
- totalSize: *mut u32,
- directories: *mut u32,
- files: *mut u32,
+ totalSize: *mut u32_,
+ directories: *mut u32_,
+ files: *mut u32_,
duplicateData: *mut bool,
archiveId: FS_ArchiveID,
path: FS_Path,
@@ -3959,14 +4557,14 @@ extern "C" {
}
extern "C" {
pub fn FSUSER_GetLegacyRomHeader2(
- headerSize: u32,
+ headerSize: u32_,
mediaType: FS_MediaType,
- programId: u64,
- header: *mut u8,
+ programId: u64_,
+ header: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
- pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8, length: u32) -> Result;
+ pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetArchiveResource(
@@ -3988,48 +4586,48 @@ extern "C" {
pub fn FSUSER_FormatSaveData(
archiveId: FS_ArchiveID,
path: FS_Path,
- blocks: u32,
- directories: u32,
- files: u32,
- directoryBuckets: u32,
- fileBuckets: u32,
+ blocks: u32_,
+ directories: u32_,
+ files: u32_,
+ directoryBuckets: u32_,
+ fileBuckets: u32_,
duplicateData: bool,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetLegacySubBannerData(
- bannerSize: u32,
+ bannerSize: u32_,
mediaType: FS_MediaType,
- programId: u64,
- banner: *mut u8,
+ programId: u64_,
+ banner: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_UpdateSha256Context(
data: *const ::libc::c_void,
- inputSize: u32,
- hash: *mut u8,
+ inputSize: u32_,
+ hash: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_ReadSpecialFile(
- bytesRead: *mut u32,
- fileOffset: u64,
- size: u32,
- data: *mut u8,
+ bytesRead: *mut u32_,
+ fileOffset: u64_,
+ size: u32_,
+ data: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
- pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64) -> Result;
+ pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result;
}
extern "C" {
pub fn FSUSER_CreateExtSaveData(
info: FS_ExtSaveDataInfo,
- directories: u32,
- files: u32,
- sizeLimit: u64,
- smdhSize: u32,
- smdh: *mut u8,
+ directories: u32_,
+ files: u32_,
+ sizeLimit: u64_,
+ smdhSize: u32_,
+ smdh: *mut u8_,
) -> Result;
}
extern "C" {
@@ -4037,39 +4635,39 @@ extern "C" {
}
extern "C" {
pub fn FSUSER_ReadExtSaveDataIcon(
- bytesRead: *mut u32,
+ bytesRead: *mut u32_,
info: FS_ExtSaveDataInfo,
- smdhSize: u32,
- smdh: *mut u8,
+ smdhSize: u32_,
+ smdh: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetExtDataBlockSize(
- totalBlocks: *mut u64,
- freeBlocks: *mut u64,
- blockSize: *mut u32,
+ totalBlocks: *mut u64_,
+ freeBlocks: *mut u64_,
+ blockSize: *mut u32_,
info: FS_ExtSaveDataInfo,
) -> Result;
}
extern "C" {
pub fn FSUSER_EnumerateExtSaveData(
- idsWritten: *mut u32,
- idsSize: u32,
+ idsWritten: *mut u32_,
+ idsSize: u32_,
mediaType: FS_MediaType,
- idSize: u32,
+ idSize: u32_,
shared: bool,
- ids: *mut u8,
+ ids: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_CreateSystemSaveData(
info: FS_SystemSaveDataInfo,
- totalSize: u32,
- blockSize: u32,
- directories: u32,
- files: u32,
- directoryBuckets: u32,
- fileBuckets: u32,
+ totalSize: u32_,
+ blockSize: u32_,
+ directories: u32_,
+ files: u32_,
+ directoryBuckets: u32_,
+ fileBuckets: u32_,
duplicateData: bool,
) -> Result;
}
@@ -4086,57 +4684,57 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32) -> Result;
+ pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetArchivePriority(priority: *mut u32, archive: FS_Archive) -> Result;
+ pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result;
}
extern "C" {
- pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64, emulateEndurance: bool) -> Result;
+ pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result;
}
extern "C" {
pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result;
}
extern "C" {
pub fn FSUSER_EnumerateSystemSaveData(
- idsWritten: *mut u32,
- idsSize: u32,
- ids: *mut u32,
+ idsWritten: *mut u32_,
+ idsSize: u32_,
+ ids: *mut u32_,
) -> Result;
}
extern "C" {
- pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32) -> Result;
+ pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_SetPriority(priority: u32) -> Result;
+ pub fn FSUSER_SetPriority(priority: u32_) -> Result;
}
extern "C" {
- pub fn FSUSER_GetPriority(priority: *mut u32) -> Result;
+ pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result;
}
extern "C" {
pub fn FSUSER_SetSaveDataSecureValue(
- value: u64,
+ value: u64_,
slot: FS_SecureValueSlot,
- titleUniqueId: u32,
- titleVariation: u8,
+ titleUniqueId: u32_,
+ titleVariation: u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetSaveDataSecureValue(
exists: *mut bool,
- value: *mut u64,
+ value: *mut u64_,
slot: FS_SecureValueSlot,
- titleUniqueId: u32,
- titleVariation: u8,
+ titleUniqueId: u32_,
+ titleVariation: u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_ControlSecureSave(
action: FS_SecureSaveAction,
input: *mut ::libc::c_void,
- inputSize: u32,
+ inputSize: u32_,
output: *mut ::libc::c_void,
- outputSize: u32,
+ outputSize: u32_,
) -> Result;
}
extern "C" {
@@ -4147,49 +4745,49 @@ extern "C" {
handle: Handle,
action: FS_FileAction,
input: *mut ::libc::c_void,
- inputSize: u32,
+ inputSize: u32_,
output: *mut ::libc::c_void,
- outputSize: u32,
+ outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSFILE_OpenSubFile(
handle: Handle,
subFile: *mut Handle,
- offset: u64,
- size: u64,
+ offset: u64_,
+ size: u64_,
) -> Result;
}
extern "C" {
pub fn FSFILE_Read(
handle: Handle,
- bytesRead: *mut u32,
- offset: u64,
+ bytesRead: *mut u32_,
+ offset: u64_,
buffer: *mut ::libc::c_void,
- size: u32,
+ size: u32_,
) -> Result;
}
extern "C" {
pub fn FSFILE_Write(
handle: Handle,
- bytesWritten: *mut u32,
- offset: u64,
+ bytesWritten: *mut u32_,
+ offset: u64_,
buffer: *const ::libc::c_void,
- size: u32,
- flags: u32,
+ size: u32_,
+ flags: u32_,
) -> Result;
}
extern "C" {
- pub fn FSFILE_GetSize(handle: Handle, size: *mut u64) -> Result;
+ pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result;
}
extern "C" {
- pub fn FSFILE_SetSize(handle: Handle, size: u64) -> Result;
+ pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result;
}
extern "C" {
- pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32) -> Result;
+ pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result;
}
extern "C" {
- pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32) -> Result;
+ pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result;
}
extern "C" {
pub fn FSFILE_Close(handle: Handle) -> Result;
@@ -4198,10 +4796,10 @@ extern "C" {
pub fn FSFILE_Flush(handle: Handle) -> Result;
}
extern "C" {
- pub fn FSFILE_SetPriority(handle: Handle, priority: u32) -> Result;
+ pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result;
}
extern "C" {
- pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32) -> Result;
+ pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result;
}
extern "C" {
pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result;
@@ -4211,16 +4809,16 @@ extern "C" {
handle: Handle,
action: FS_DirectoryAction,
input: *mut ::libc::c_void,
- inputSize: u32,
+ inputSize: u32_,
output: *mut ::libc::c_void,
- outputSize: u32,
+ outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSDIR_Read(
handle: Handle,
- entriesRead: *mut u32,
- entryCount: u32,
+ entriesRead: *mut u32_,
+ entryCount: u32_,
entries: *mut FS_DirectoryEntry,
) -> Result;
}
@@ -4228,43 +4826,46 @@ extern "C" {
pub fn FSDIR_Close(handle: Handle) -> Result;
}
extern "C" {
- pub fn FSDIR_SetPriority(handle: Handle, priority: u32) -> Result;
+ pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result;
}
extern "C" {
- pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32) -> Result;
+ pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result;
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct AM_TitleEntry {
- pub titleID: u64,
- pub size: u64,
- pub version: u16,
- pub unk: [u8; 6usize],
-}
-pub const AM_STATUS_MASK_INSTALLING: _bindgen_ty_11 = 1;
-pub const AM_STATUS_MASK_AWAITING_FINALIZATION: _bindgen_ty_11 = 2;
-pub type _bindgen_ty_11 = u32;
+ pub titleID: u64_,
+ pub size: u64_,
+ 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 type _bindgen_ty_13 = ::libc::c_uint;
pub const AM_STATUS_ABORTED: AM_InstallStatus = 2;
pub const AM_STATUS_SAVED: AM_InstallStatus = 3;
pub const AM_STATUS_INSTALL_IN_PROGRESS: AM_InstallStatus = 2050;
pub const AM_STATUS_AWAITING_FINALIZATION: AM_InstallStatus = 2051;
-pub type AM_InstallStatus = u32;
+pub type AM_InstallStatus = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct AM_PendingTitleEntry {
- pub titleId: u64,
- pub version: u16,
- pub status: u16,
- pub titleType: u32,
- pub unk: [u8; 8usize],
+ pub titleId: u64_,
+ pub version: u16_,
+ pub status: u16_,
+ pub titleType: u32_,
+ pub unk: [u8_; 8usize],
}
-pub const AM_DELETE_PENDING_NON_SYSTEM: _bindgen_ty_12 = 1;
-pub const AM_DELETE_PENDING_SYSTEM: _bindgen_ty_12 = 2;
-pub type _bindgen_ty_12 = u32;
+pub const AM_DELETE_PENDING_NON_SYSTEM: ::libc::c_uint = 1;
+pub const AM_DELETE_PENDING_SYSTEM: ::libc::c_uint = 2;
+pub type _bindgen_ty_14 = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct AM_TWLPartitionInfo {
- pub capacity: u64,
- pub freeSpace: u64,
- pub titlesCapacity: u64,
- pub titlesFreeSpace: u64,
+ pub capacity: u64_,
+ pub freeSpace: u64_,
+ pub titlesCapacity: u64_,
+ pub titlesFreeSpace: u64_,
}
extern "C" {
pub fn amInit() -> Result;
@@ -4279,88 +4880,88 @@ extern "C" {
pub fn amGetSessionHandle() -> *mut Handle;
}
extern "C" {
- pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32) -> Result;
+ pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result;
}
extern "C" {
pub fn AM_GetTitleList(
- titlesRead: *mut u32,
+ titlesRead: *mut u32_,
mediatype: FS_MediaType,
- titleCount: u32,
- titleIds: *mut u64,
+ titleCount: u32_,
+ titleIds: *mut u64_,
) -> Result;
}
extern "C" {
pub fn AM_GetTitleInfo(
mediatype: FS_MediaType,
- titleCount: u32,
- titleIds: *mut u64,
+ titleCount: u32_,
+ titleIds: *mut u64_,
titleInfo: *mut AM_TitleEntry,
) -> Result;
}
extern "C" {
- pub fn AM_GetTicketCount(count: *mut u32) -> Result;
+ pub fn AM_GetTicketCount(count: *mut u32_) -> Result;
}
extern "C" {
pub fn AM_GetTicketList(
- ticketsRead: *mut u32,
- ticketCount: u32,
- skip: u32,
- ticketIds: *mut u64,
+ ticketsRead: *mut u32_,
+ ticketCount: u32_,
+ skip: u32_,
+ ticketIds: *mut u64_,
) -> Result;
}
extern "C" {
pub fn AM_GetPendingTitleCount(
- count: *mut u32,
+ count: *mut u32_,
mediatype: FS_MediaType,
- statusMask: u32,
+ statusMask: u32_,
) -> Result;
}
extern "C" {
pub fn AM_GetPendingTitleList(
- titlesRead: *mut u32,
- titleCount: u32,
+ titlesRead: *mut u32_,
+ titleCount: u32_,
mediatype: FS_MediaType,
- statusMask: u32,
- titleIds: *mut u64,
+ statusMask: u32_,
+ titleIds: *mut u64_,
) -> Result;
}
extern "C" {
pub fn AM_GetPendingTitleInfo(
- titleCount: u32,
+ titleCount: u32_,
mediatype: FS_MediaType,
- titleIds: *mut u64,
+ titleIds: *mut u64_,
titleInfo: *mut AM_PendingTitleEntry,
) -> Result;
}
extern "C" {
- pub fn AM_GetDeviceId(deviceID: *mut u32) -> Result;
+ pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result;
}
extern "C" {
pub fn AM_ExportTwlBackup(
- titleID: u64,
- operation: u8,
+ titleID: u64_,
+ operation: u8_,
workbuf: *mut ::libc::c_void,
- workbuf_size: u32,
+ workbuf_size: u32_,
filepath: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn AM_ImportTwlBackup(
filehandle: Handle,
- operation: u8,
+ operation: u8_,
buffer: *mut ::libc::c_void,
- size: u32,
+ size: u32_,
) -> Result;
}
extern "C" {
pub fn AM_ReadTwlBackupInfo(
filehandle: Handle,
outinfo: *mut ::libc::c_void,
- outinfo_size: u32,
+ outinfo_size: u32_,
workbuf: *mut ::libc::c_void,
- workbuf_size: u32,
+ workbuf_size: u32_,
banner: *mut ::libc::c_void,
- banner_size: u32,
+ banner_size: u32_,
) -> Result;
}
extern "C" {
@@ -4384,25 +4985,25 @@ extern "C" {
extern "C" {
pub fn AM_CommitImportPrograms(
mediaType: FS_MediaType,
- titleCount: u32,
+ titleCount: u32_,
temp: bool,
- titleIds: *const u64,
+ titleIds: *const u64_,
) -> Result;
}
extern "C" {
- pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64) -> Result;
+ pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result;
}
extern "C" {
- pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64) -> Result;
+ pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result;
}
extern "C" {
- pub fn AM_DeleteTicket(ticketId: u64) -> Result;
+ pub fn AM_DeleteTicket(ticketId: u64_) -> Result;
}
extern "C" {
- pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64) -> Result;
+ pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result;
}
extern "C" {
- pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32) -> Result;
+ pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result;
}
extern "C" {
pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result;
@@ -4411,20 +5012,20 @@ extern "C" {
pub fn AM_InstallNativeFirm() -> Result;
}
extern "C" {
- pub fn AM_InstallFirm(titleID: u64) -> Result;
+ pub fn AM_InstallFirm(titleID: u64_) -> Result;
}
extern "C" {
pub fn AM_GetTitleProductCode(
mediatype: FS_MediaType,
- titleId: u64,
+ titleId: u64_,
productCode: *mut ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn AM_GetTitleExtDataId(
- extDataId: *mut u64,
+ extDataId: *mut u64_,
mediatype: FS_MediaType,
- titleId: u64,
+ titleId: u64_,
) -> Result;
}
extern "C" {
@@ -4438,24 +5039,27 @@ extern "C" {
pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result;
}
extern "C" {
- pub fn AM_GetCiaDependencies(dependencies: *mut u64, fileHandle: Handle) -> Result;
+ pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result;
}
extern "C" {
- pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64, fileHandle: Handle) -> Result;
+ pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result;
}
extern "C" {
- pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32, fileHandle: Handle) -> Result;
+ pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_GetCiaRequiredSpace(
- requiredSpace: *mut u64,
+ requiredSpace: *mut u64_,
mediaType: FS_MediaType,
fileHandle: Handle,
) -> Result;
}
extern "C" {
- pub fn AM_GetCiaMetaSection(meta: *mut ::libc::c_void, size: u32, fileHandle: Handle)
- -> Result;
+ pub fn AM_GetCiaMetaSection(
+ meta: *mut ::libc::c_void,
+ size: u32_,
+ fileHandle: Handle,
+ ) -> Result;
}
extern "C" {
pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result;
@@ -4473,13 +5077,13 @@ extern "C" {
pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result;
}
extern "C" {
- pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64, unk: bool) -> Result;
+ pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result;
}
extern "C" {
pub fn AM_InstallTitleStop() -> Result;
}
extern "C" {
- pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64) -> Result;
+ pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result;
}
extern "C" {
pub fn AM_InstallTitleAbort() -> Result;
@@ -4490,9 +5094,9 @@ extern "C" {
extern "C" {
pub fn AM_CommitImportTitles(
mediaType: FS_MediaType,
- titleCount: u32,
+ titleCount: u32_,
temp: bool,
- titleIds: *const u64,
+ titleIds: *const u64_,
) -> Result;
}
extern "C" {
@@ -4505,10 +5109,10 @@ extern "C" {
pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result;
}
extern "C" {
- pub fn AM_CreateImportContentContexts(contentCount: u32, contentIndices: *mut u16) -> Result;
+ pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result;
}
extern "C" {
- pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16) -> Result;
+ pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result;
}
extern "C" {
pub fn AM_InstallContentStop(contentHandle: Handle) -> Result;
@@ -4516,8 +5120,8 @@ extern "C" {
extern "C" {
pub fn AM_InstallContentResume(
contentHandle: *mut Handle,
- resumeOffset: *mut u64,
- index: u16,
+ resumeOffset: *mut u64_,
+ index: u16_,
) -> Result;
}
extern "C" {
@@ -4528,25 +5132,25 @@ extern "C" {
}
extern "C" {
pub fn AM_ImportCertificates(
- cert1Size: u32,
+ cert1Size: u32_,
cert1: *mut ::libc::c_void,
- cert2Size: u32,
+ cert2Size: u32_,
cert2: *mut ::libc::c_void,
- cert3Size: u32,
+ cert3Size: u32_,
cert3: *mut ::libc::c_void,
- cert4Size: u32,
+ cert4Size: u32_,
cert4: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
- pub fn AM_ImportCertificate(certSize: u32, cert: *mut ::libc::c_void) -> Result;
+ pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result;
}
extern "C" {
pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto(
mediaType: FS_MediaType,
- titleCount: u32,
+ titleCount: u32_,
temp: bool,
- titleIds: *mut u64,
+ titleIds: *mut u64_,
) -> Result;
}
extern "C" {
@@ -4569,20 +5173,20 @@ extern "C" {
}
extern "C" {
pub fn AMPXI_WriteTWLSavedata(
- titleid: u64,
- buffer: *mut u8,
- size: u32,
- image_filepos: u32,
- section_type: u8,
- operation: u8,
+ titleid: u64_,
+ buffer: *mut u8_,
+ size: u32_,
+ image_filepos: u32_,
+ section_type: u8_,
+ operation: u8_,
) -> Result;
}
extern "C" {
pub fn AMPXI_InstallTitlesFinish(
mediaType: FS_MediaType,
- db: u8,
- titlecount: u32,
- tidlist: *mut u64,
+ db: u8_,
+ titlecount: u32_,
+ tidlist: *mut u64_,
) -> Result;
}
pub const APPID_NONE: NS_APPID = 0;
@@ -4606,19 +5210,19 @@ pub const APPID_ERROR: NS_APPID = 1030;
pub const APPID_MINT: NS_APPID = 1031;
pub const APPID_EXTRAPAD: NS_APPID = 1032;
pub const APPID_MEMOLIB: NS_APPID = 1033;
-pub type NS_APPID = u32;
+pub type NS_APPID = ::libc::c_uint;
pub const APTPOS_NONE: APT_AppletPos = -1;
pub const APTPOS_APP: APT_AppletPos = 0;
pub const APTPOS_APPLIB: APT_AppletPos = 1;
pub const APTPOS_SYS: APT_AppletPos = 2;
pub const APTPOS_SYSLIB: APT_AppletPos = 3;
pub const APTPOS_RESIDENT: APT_AppletPos = 4;
-pub type APT_AppletPos = i32;
-pub type APT_AppletAttr = u8;
+pub type APT_AppletPos = ::libc::c_int;
+pub type APT_AppletAttr = u8_;
pub const APTREPLY_REJECT: APT_QueryReply = 0;
pub const APTREPLY_ACCEPT: APT_QueryReply = 1;
pub const APTREPLY_LATER: APT_QueryReply = 2;
-pub type APT_QueryReply = u32;
+pub type APT_QueryReply = ::libc::c_uint;
pub const APTSIGNAL_NONE: APT_Signal = 0;
pub const APTSIGNAL_HOMEBUTTON: APT_Signal = 1;
pub const APTSIGNAL_HOMEBUTTON2: APT_Signal = 2;
@@ -4631,7 +5235,7 @@ pub const APTSIGNAL_POWERBUTTON: APT_Signal = 8;
pub const APTSIGNAL_POWERBUTTON2: APT_Signal = 9;
pub const APTSIGNAL_TRY_SLEEP: APT_Signal = 10;
pub const APTSIGNAL_ORDERTOCLOSE: APT_Signal = 11;
-pub type APT_Signal = u32;
+pub type APT_Signal = ::libc::c_uint;
pub const APTCMD_NONE: APT_Command = 0;
pub const APTCMD_WAKEUP: APT_Command = 1;
pub const APTCMD_REQUEST: APT_Command = 2;
@@ -4650,19 +5254,21 @@ pub const APTCMD_WAKEUP_POWERBUTTON: APT_Command = 14;
pub const APTCMD_WAKEUP_JUMPTOHOME: APT_Command = 15;
pub const APTCMD_SYSAPPLET_REQUEST: APT_Command = 16;
pub const APTCMD_WAKEUP_LAUNCHAPP: APT_Command = 17;
-pub type APT_Command = u32;
+pub type APT_Command = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct aptCaptureBufInfo {
- pub size: u32,
- pub is3D: u32,
+ pub size: u32_,
+ pub is3D: u32_,
pub top: aptCaptureBufInfo__bindgen_ty_1,
pub bottom: aptCaptureBufInfo__bindgen_ty_1,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct aptCaptureBufInfo__bindgen_ty_1 {
- pub leftOffset: u32,
- pub rightOffset: u32,
- pub format: u32,
+ pub leftOffset: u32_,
+ pub rightOffset: u32_,
+ pub format: u32_,
}
pub const APTHOOK_ONSUSPEND: APT_HookType = 0;
pub const APTHOOK_ONRESTORE: APT_HookType = 1;
@@ -4670,7 +5276,7 @@ pub const APTHOOK_ONSLEEP: APT_HookType = 2;
pub const APTHOOK_ONWAKEUP: APT_HookType = 3;
pub const APTHOOK_ONEXIT: APT_HookType = 4;
pub const APTHOOK_COUNT: APT_HookType = 5;
-pub type APT_HookType = u32;
+pub type APT_HookType = ::libc::c_uint;
pub type aptHookFn =
::core::option::Option<unsafe extern "C" fn(hook: APT_HookType, param: *mut ::libc::c_void)>;
#[repr(C)]
@@ -4680,13 +5286,18 @@ pub struct tag_aptHookCookie {
pub callback: aptHookFn,
pub param: *mut ::libc::c_void,
}
+impl Default for tag_aptHookCookie {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub type aptHookCookie = tag_aptHookCookie;
pub type aptMessageCb = ::core::option::Option<
unsafe extern "C" fn(
user: *mut ::libc::c_void,
sender: NS_APPID,
msg: *mut ::libc::c_void,
- msgsize: usize,
+ msgsize: size_t,
),
>;
extern "C" {
@@ -4696,7 +5307,13 @@ extern "C" {
pub fn aptExit();
}
extern "C" {
- pub fn aptSendCommand(aptcmdbuf: *mut u32) -> Result;
+ pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result;
+}
+extern "C" {
+ pub fn aptIsActive() -> bool;
+}
+extern "C" {
+ pub fn aptShouldClose() -> bool;
}
extern "C" {
pub fn aptIsSleepAllowed() -> bool;
@@ -4705,6 +5322,24 @@ extern "C" {
pub fn aptSetSleepAllowed(allowed: bool);
}
extern "C" {
+ pub fn aptHandleSleep();
+}
+extern "C" {
+ pub fn aptIsHomeAllowed() -> bool;
+}
+extern "C" {
+ pub fn aptSetHomeAllowed(allowed: bool);
+}
+extern "C" {
+ pub fn aptShouldJumpToHome() -> bool;
+}
+extern "C" {
+ pub fn aptCheckHomePressRejected() -> bool;
+}
+extern "C" {
+ pub fn aptJumpToHomeMenu();
+}
+extern "C" {
pub fn aptMainLoop() -> bool;
}
extern "C" {
@@ -4720,15 +5355,21 @@ extern "C" {
pub fn aptLaunchLibraryApplet(
appId: NS_APPID,
buf: *mut ::libc::c_void,
- bufsize: usize,
+ bufsize: size_t,
handle: Handle,
- ) -> bool;
+ );
+}
+extern "C" {
+ pub fn aptClearChainloader();
+}
+extern "C" {
+ pub fn aptSetChainloader(programID: u64_, mediatype: u8_);
}
extern "C" {
- pub fn aptSetChainloader(programID: u64, mediatype: u8);
+ pub fn aptSetChainloaderToSelf();
}
extern "C" {
- pub fn APT_GetLockHandle(flags: u16, lockHandle: *mut Handle) -> Result;
+ pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result;
}
extern "C" {
pub fn APT_Initialize(
@@ -4759,18 +5400,18 @@ extern "C" {
extern "C" {
pub fn APT_GetAppletInfo(
appID: NS_APPID,
- pProgramID: *mut u64,
- pMediaType: *mut u8,
+ pProgramID: *mut u64_,
+ pMediaType: *mut u8_,
pRegistered: *mut bool,
pLoadState: *mut bool,
pAttributes: *mut APT_AppletAttr,
) -> Result;
}
extern "C" {
- pub fn APT_GetAppletProgramInfo(id: u32, flags: u32, titleversion: *mut u16) -> Result;
+ pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result;
}
extern "C" {
- pub fn APT_GetProgramID(pProgramID: *mut u64) -> Result;
+ pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result;
}
extern "C" {
pub fn APT_PrepareToJumpToHomeMenu() -> Result;
@@ -4778,7 +5419,7 @@ extern "C" {
extern "C" {
pub fn APT_JumpToHomeMenu(
param: *const ::libc::c_void,
- paramSize: usize,
+ paramSize: size_t,
handle: Handle,
) -> Result;
}
@@ -4788,7 +5429,7 @@ extern "C" {
extern "C" {
pub fn APT_JumpToApplication(
param: *const ::libc::c_void,
- paramSize: usize,
+ paramSize: size_t,
handle: Handle,
) -> Result;
}
@@ -4796,7 +5437,10 @@ extern "C" {
pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result;
}
extern "C" {
- pub fn APT_InquireNotification(appID: u32, signalType: *mut APT_Signal) -> Result;
+ pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result;
+}
+extern "C" {
+ pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result;
}
extern "C" {
pub fn APT_NotifyToWait(appID: NS_APPID) -> Result;
@@ -4805,28 +5449,31 @@ extern "C" {
pub fn APT_AppletUtility(
id: ::libc::c_int,
out: *mut ::libc::c_void,
- outSize: usize,
+ outSize: size_t,
in_: *const ::libc::c_void,
- inSize: usize,
+ inSize: size_t,
) -> Result;
}
extern "C" {
pub fn APT_SleepIfShellClosed() -> Result;
}
extern "C" {
- pub fn APT_TryLockTransition(transition: u32, succeeded: *mut bool) -> Result;
+ pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result;
+}
+extern "C" {
+ pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result;
}
extern "C" {
- pub fn APT_UnlockTransition(transition: u32) -> Result;
+ pub fn APT_UnlockTransition(transition: u32_) -> Result;
}
extern "C" {
pub fn APT_GlanceParameter(
appID: NS_APPID,
buffer: *mut ::libc::c_void,
- bufferSize: usize,
+ bufferSize: size_t,
sender: *mut NS_APPID,
command: *mut APT_Command,
- actualSize: *mut usize,
+ actualSize: *mut size_t,
parameter: *mut Handle,
) -> Result;
}
@@ -4834,10 +5481,10 @@ extern "C" {
pub fn APT_ReceiveParameter(
appID: NS_APPID,
buffer: *mut ::libc::c_void,
- bufferSize: usize,
+ bufferSize: size_t,
sender: *mut NS_APPID,
command: *mut APT_Command,
- actualSize: *mut usize,
+ actualSize: *mut size_t,
parameter: *mut Handle,
) -> Result;
}
@@ -4847,7 +5494,7 @@ extern "C" {
dest: NS_APPID,
command: APT_Command,
buffer: *const ::libc::c_void,
- bufferSize: u32,
+ bufferSize: u32_,
parameter: Handle,
) -> Result;
}
@@ -4869,26 +5516,26 @@ extern "C" {
extern "C" {
pub fn APT_CloseApplication(
param: *const ::libc::c_void,
- paramSize: usize,
+ paramSize: size_t,
handle: Handle,
) -> Result;
}
extern "C" {
- pub fn APT_SetAppCpuTimeLimit(percent: u32) -> Result;
+ pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result;
}
extern "C" {
- pub fn APT_GetAppCpuTimeLimit(percent: *mut u32) -> Result;
+ pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result;
}
extern "C" {
pub fn APT_CheckNew3DS(out: *mut bool) -> Result;
}
extern "C" {
- pub fn APT_PrepareToDoApplicationJump(flags: u8, programID: u64, mediatype: u8) -> Result;
+ pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result;
}
extern "C" {
pub fn APT_DoApplicationJump(
param: *const ::libc::c_void,
- paramSize: usize,
+ paramSize: size_t,
hmac: *const ::libc::c_void,
) -> Result;
}
@@ -4899,7 +5546,7 @@ extern "C" {
pub fn APT_StartLibraryApplet(
appID: NS_APPID,
param: *const ::libc::c_void,
- paramSize: usize,
+ paramSize: size_t,
handle: Handle,
) -> Result;
}
@@ -4910,55 +5557,61 @@ extern "C" {
pub fn APT_StartSystemApplet(
appID: NS_APPID,
param: *const ::libc::c_void,
- paramSize: usize,
+ paramSize: size_t,
handle: Handle,
) -> Result;
}
extern "C" {
- pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32) -> Result;
+ pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32_) -> Result;
}
extern "C" {
pub fn APT_ReceiveDeliverArg(
param: *const ::libc::c_void,
- paramSize: usize,
+ paramSize: size_t,
hmac: *const ::libc::c_void,
- sender: *mut u64,
+ sender: *mut u64_,
received: *mut bool,
) -> Result;
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct bossContext {
- pub property: [u32; 7usize],
+ pub property: [u32_; 7usize],
pub url: [::libc::c_char; 512usize],
- pub property_x8: u32,
- pub property_x9: u8,
- pub property_xa: [u8; 256usize],
- pub property_xb: [u8; 512usize],
+ pub property_x8: u32_,
+ pub property_x9: u8_,
+ pub property_xa: [u8_; 256usize],
+ pub property_xb: [u8_; 512usize],
pub property_xd: [::libc::c_char; 864usize],
- pub property_xe: u32,
- pub property_xf: [u32; 3usize],
- pub property_x10: u8,
- pub property_x11: u8,
- pub property_x12: u8,
- pub property_x13: u32,
- pub property_x14: u32,
- pub property_x15: [u8; 64usize],
- pub property_x16: u32,
- pub property_x3b: u32,
- pub property_x3e: [u8; 512usize],
+ pub property_xe: u32_,
+ pub property_xf: [u32_; 3usize],
+ pub property_x10: u8_,
+ pub property_x11: u8_,
+ pub property_x12: u8_,
+ pub property_x13: u32_,
+ pub property_x14: u32_,
+ pub property_x15: [u8_; 64usize],
+ pub property_x16: u32_,
+ pub property_x3b: u32_,
+ pub property_x3e: [u8_; 512usize],
+}
+impl Default for bossContext {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
pub const BOSSTASKSTATUS_STARTED: bossTaskStatus = 2;
pub const BOSSTASKSTATUS_ERROR: bossTaskStatus = 7;
-pub type bossTaskStatus = u32;
+pub type bossTaskStatus = ::libc::c_uint;
pub const bossNsDataHeaderInfoType_ContentSize: bossNsDataHeaderInfoTypes = 3;
-pub type bossNsDataHeaderInfoTypes = u32;
+pub type bossNsDataHeaderInfoTypes = ::libc::c_uint;
pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSizes = 4;
-pub type bossNsDataHeaderInfoTypeSizes = u32;
+pub type bossNsDataHeaderInfoTypeSizes = ::libc::c_uint;
extern "C" {
- pub fn bossInit(programID: u64, force_user: bool) -> Result;
+ pub fn bossInit(programID: u64_, force_user: bool) -> Result;
}
extern "C" {
- pub fn bossReinit(programID: u64) -> Result;
+ pub fn bossReinit(programID: u64_) -> Result;
}
extern "C" {
pub fn bossExit();
@@ -4967,36 +5620,36 @@ extern "C" {
pub fn bossGetSessionHandle() -> Handle;
}
extern "C" {
- pub fn bossSetStorageInfo(extdataID: u64, boss_size: u32, mediaType: u8) -> Result;
+ pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result;
}
extern "C" {
pub fn bossUnregisterStorage() -> Result;
}
extern "C" {
- pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8, unk1: u8) -> Result;
+ pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result;
}
extern "C" {
- pub fn bossSendProperty(PropertyID: u16, buf: *const ::libc::c_void, size: u32) -> Result;
+ pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn bossDeleteNsData(NsDataId: u32) -> Result;
+ pub fn bossDeleteNsData(NsDataId: u32_) -> Result;
}
extern "C" {
pub fn bossGetNsDataHeaderInfo(
- NsDataId: u32,
- type_: u8,
+ NsDataId: u32_,
+ type_: u8_,
buffer: *mut ::libc::c_void,
- size: u32,
+ size: u32_,
) -> Result;
}
extern "C" {
pub fn bossReadNsData(
- NsDataId: u32,
- offset: u64,
+ NsDataId: u32_,
+ offset: u64_,
buffer: *mut ::libc::c_void,
- size: u32,
- transfer_total: *mut u32,
- unk_out: *mut u32,
+ size: u32_,
+ transfer_total: *mut u32_,
+ unk_out: *mut u32_,
) -> Result;
}
extern "C" {
@@ -5006,24 +5659,24 @@ extern "C" {
pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result;
}
extern "C" {
- pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32) -> Result;
+ pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result;
}
extern "C" {
pub fn bossGetTaskState(
taskID: *const ::libc::c_char,
inval: s8,
- status: *mut u8,
- out1: *mut u32,
- out2: *mut u8,
+ status: *mut u8_,
+ out1: *mut u32_,
+ out2: *mut u8_,
) -> Result;
}
extern "C" {
- pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8) -> Result;
+ pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result;
}
extern "C" {
pub fn bossSetupContextDefault(
ctx: *mut bossContext,
- seconds_interval: u32,
+ seconds_interval: u32_,
url: *const ::libc::c_char,
);
}
@@ -5035,46 +5688,54 @@ pub const INPUT_YUV420_INDIV_8: Y2RU_InputFormat = 1;
pub const INPUT_YUV422_INDIV_16: Y2RU_InputFormat = 2;
pub const INPUT_YUV420_INDIV_16: Y2RU_InputFormat = 3;
pub const INPUT_YUV422_BATCH: Y2RU_InputFormat = 4;
-pub type Y2RU_InputFormat = u32;
+pub type Y2RU_InputFormat = ::libc::c_uint;
pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0;
pub const OUTPUT_RGB_24: Y2RU_OutputFormat = 1;
pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2;
pub const OUTPUT_RGB_16_565: Y2RU_OutputFormat = 3;
-pub type Y2RU_OutputFormat = u32;
+pub type Y2RU_OutputFormat = ::libc::c_uint;
pub const ROTATION_NONE: Y2RU_Rotation = 0;
pub const ROTATION_CLOCKWISE_90: Y2RU_Rotation = 1;
pub const ROTATION_CLOCKWISE_180: Y2RU_Rotation = 2;
pub const ROTATION_CLOCKWISE_270: Y2RU_Rotation = 3;
-pub type Y2RU_Rotation = u32;
+pub type Y2RU_Rotation = ::libc::c_uint;
pub const BLOCK_LINE: Y2RU_BlockAlignment = 0;
pub const BLOCK_8_BY_8: Y2RU_BlockAlignment = 1;
-pub type Y2RU_BlockAlignment = u32;
+pub type Y2RU_BlockAlignment = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct Y2RU_ColorCoefficients {
- pub rgb_Y: u16,
- pub r_V: u16,
- pub g_V: u16,
- pub g_U: u16,
- pub b_U: u16,
- pub r_offset: u16,
- pub g_offset: u16,
- pub b_offset: u16,
+ pub rgb_Y: u16_,
+ pub r_V: u16_,
+ pub g_V: u16_,
+ pub g_U: u16_,
+ pub b_U: u16_,
+ pub r_offset: u16_,
+ pub g_offset: u16_,
+ pub b_offset: u16_,
}
pub const COEFFICIENT_ITU_R_BT_601: Y2RU_StandardCoefficient = 0;
pub const COEFFICIENT_ITU_R_BT_709: Y2RU_StandardCoefficient = 1;
pub const COEFFICIENT_ITU_R_BT_601_SCALING: Y2RU_StandardCoefficient = 2;
pub const COEFFICIENT_ITU_R_BT_709_SCALING: Y2RU_StandardCoefficient = 3;
-pub type Y2RU_StandardCoefficient = u32;
+pub type Y2RU_StandardCoefficient = ::libc::c_uint;
#[repr(C)]
#[repr(align(4))]
+#[derive(Debug, Copy, Clone)]
pub struct Y2RU_ConversionParams {
- pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>,
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub input_line_width: s16,
pub input_lines: s16,
- pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize], u8>,
- pub unused: u8,
- pub alpha: u16,
- pub __bindgen_align: [u32; 0usize],
+ pub _bitfield_align_2: [u8; 0],
+ pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>,
+ pub unused: u8_,
+ pub alpha: u16_,
+}
+impl Default for Y2RU_ConversionParams {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
impl Y2RU_ConversionParams {
#[inline]
@@ -5127,9 +5788,8 @@ impl Y2RU_ConversionParams {
output_format: Y2RU_OutputFormat,
rotation: Y2RU_Rotation,
block_alignment: Y2RU_BlockAlignment,
- ) -> __BindgenBitfieldUnit<[u8; 4usize], u8> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> =
- Default::default();
+ ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let input_format: u32 = unsafe { ::core::mem::transmute(input_format) };
input_format as u64
@@ -5162,9 +5822,8 @@ impl Y2RU_ConversionParams {
#[inline]
pub fn new_bitfield_2(
standard_coefficient: Y2RU_StandardCoefficient,
- ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
- let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
- Default::default();
+ ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let standard_coefficient: u32 = unsafe { ::core::mem::transmute(standard_coefficient) };
standard_coefficient as u64
@@ -5173,23 +5832,24 @@ impl Y2RU_ConversionParams {
}
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct Y2RU_DitheringWeightParams {
- pub w0_xEven_yEven: u16,
- pub w0_xOdd_yEven: u16,
- pub w0_xEven_yOdd: u16,
- pub w0_xOdd_yOdd: u16,
- pub w1_xEven_yEven: u16,
- pub w1_xOdd_yEven: u16,
- pub w1_xEven_yOdd: u16,
- pub w1_xOdd_yOdd: u16,
- pub w2_xEven_yEven: u16,
- pub w2_xOdd_yEven: u16,
- pub w2_xEven_yOdd: u16,
- pub w2_xOdd_yOdd: u16,
- pub w3_xEven_yEven: u16,
- pub w3_xOdd_yEven: u16,
- pub w3_xEven_yOdd: u16,
- pub w3_xOdd_yOdd: u16,
+ pub w0_xEven_yEven: u16_,
+ pub w0_xOdd_yEven: u16_,
+ pub w0_xEven_yOdd: u16_,
+ pub w0_xOdd_yOdd: u16_,
+ pub w1_xEven_yEven: u16_,
+ pub w1_xOdd_yEven: u16_,
+ pub w1_xEven_yOdd: u16_,
+ pub w1_xOdd_yOdd: u16_,
+ pub w2_xEven_yEven: u16_,
+ pub w2_xOdd_yEven: u16_,
+ pub w2_xEven_yOdd: u16_,
+ pub w2_xOdd_yOdd: u16_,
+ pub w3_xEven_yEven: u16_,
+ pub w3_xOdd_yEven: u16_,
+ pub w3_xEven_yOdd: u16_,
+ pub w3_xOdd_yOdd: u16_,
}
extern "C" {
pub fn y2rInit() -> Result;
@@ -5234,16 +5894,16 @@ extern "C" {
pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result;
}
extern "C" {
- pub fn Y2RU_SetInputLineWidth(line_width: u16) -> Result;
+ pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result;
}
extern "C" {
- pub fn Y2RU_GetInputLineWidth(line_width: *mut u16) -> Result;
+ pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result;
}
extern "C" {
- pub fn Y2RU_SetInputLines(num_lines: u16) -> Result;
+ pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result;
}
extern "C" {
- pub fn Y2RU_GetInputLines(num_lines: *mut u16) -> Result;
+ pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result;
}
extern "C" {
pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result;
@@ -5261,10 +5921,10 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn Y2RU_SetAlpha(alpha: u16) -> Result;
+ pub fn Y2RU_SetAlpha(alpha: u16_) -> Result;
}
extern "C" {
- pub fn Y2RU_GetAlpha(alpha: *mut u16) -> Result;
+ pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result;
}
extern "C" {
pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result;
@@ -5278,7 +5938,7 @@ extern "C" {
extern "C" {
pub fn Y2RU_SetSendingY(
src_buf: *const ::libc::c_void,
- image_size: u32,
+ image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
@@ -5286,7 +5946,7 @@ extern "C" {
extern "C" {
pub fn Y2RU_SetSendingU(
src_buf: *const ::libc::c_void,
- image_size: u32,
+ image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
@@ -5294,7 +5954,7 @@ extern "C" {
extern "C" {
pub fn Y2RU_SetSendingV(
src_buf: *const ::libc::c_void,
- image_size: u32,
+ image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
@@ -5302,7 +5962,7 @@ extern "C" {
extern "C" {
pub fn Y2RU_SetSendingYUYV(
src_buf: *const ::libc::c_void,
- image_size: u32,
+ image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
@@ -5310,7 +5970,7 @@ extern "C" {
extern "C" {
pub fn Y2RU_SetReceiving(
dst_buf: *mut ::libc::c_void,
- image_size: u32,
+ image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
@@ -5349,7 +6009,7 @@ extern "C" {
pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result;
}
extern "C" {
- pub fn Y2RU_PingProcess(ping: *mut u8) -> Result;
+ pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result;
}
extern "C" {
pub fn Y2RU_DriverInitialize() -> Result;
@@ -5357,30 +6017,30 @@ extern "C" {
extern "C" {
pub fn Y2RU_DriverFinalize() -> Result;
}
-pub const PORT_NONE: _bindgen_ty_13 = 0;
-pub const PORT_CAM1: _bindgen_ty_13 = 1;
-pub const PORT_CAM2: _bindgen_ty_13 = 2;
-pub const PORT_BOTH: _bindgen_ty_13 = 3;
-pub type _bindgen_ty_13 = u32;
-pub const SELECT_NONE: _bindgen_ty_14 = 0;
-pub const SELECT_OUT1: _bindgen_ty_14 = 1;
-pub const SELECT_IN1: _bindgen_ty_14 = 2;
-pub const SELECT_OUT2: _bindgen_ty_14 = 4;
-pub const SELECT_IN1_OUT1: _bindgen_ty_14 = 3;
-pub const SELECT_OUT1_OUT2: _bindgen_ty_14 = 5;
-pub const SELECT_IN1_OUT2: _bindgen_ty_14 = 6;
-pub const SELECT_ALL: _bindgen_ty_14 = 7;
-pub type _bindgen_ty_14 = u32;
+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 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 type _bindgen_ty_16 = ::libc::c_uint;
pub const CONTEXT_NONE: CAMU_Context = 0;
pub const CONTEXT_A: CAMU_Context = 1;
pub const CONTEXT_B: CAMU_Context = 2;
pub const CONTEXT_BOTH: CAMU_Context = 3;
-pub type CAMU_Context = u32;
+pub type CAMU_Context = ::libc::c_uint;
pub const FLIP_NONE: CAMU_Flip = 0;
pub const FLIP_HORIZONTAL: CAMU_Flip = 1;
pub const FLIP_VERTICAL: CAMU_Flip = 2;
pub const FLIP_REVERSE: CAMU_Flip = 3;
-pub type CAMU_Flip = u32;
+pub type CAMU_Flip = ::libc::c_uint;
pub const SIZE_VGA: CAMU_Size = 0;
pub const SIZE_QVGA: CAMU_Size = 1;
pub const SIZE_QQVGA: CAMU_Size = 2;
@@ -5390,7 +6050,7 @@ pub const SIZE_DS_LCD: CAMU_Size = 5;
pub const SIZE_DS_LCDx4: CAMU_Size = 6;
pub const SIZE_CTR_TOP_LCD: CAMU_Size = 7;
pub const SIZE_CTR_BOTTOM_LCD: CAMU_Size = 1;
-pub type CAMU_Size = u32;
+pub type CAMU_Size = ::libc::c_uint;
pub const FRAME_RATE_15: CAMU_FrameRate = 0;
pub const FRAME_RATE_15_TO_5: CAMU_FrameRate = 1;
pub const FRAME_RATE_15_TO_2: CAMU_FrameRate = 2;
@@ -5404,7 +6064,7 @@ pub const FRAME_RATE_30_TO_5: CAMU_FrameRate = 9;
pub const FRAME_RATE_15_TO_10: CAMU_FrameRate = 10;
pub const FRAME_RATE_20_TO_10: CAMU_FrameRate = 11;
pub const FRAME_RATE_30_TO_10: CAMU_FrameRate = 12;
-pub type CAMU_FrameRate = u32;
+pub type CAMU_FrameRate = ::libc::c_uint;
pub const WHITE_BALANCE_AUTO: CAMU_WhiteBalance = 0;
pub const WHITE_BALANCE_3200K: CAMU_WhiteBalance = 1;
pub const WHITE_BALANCE_4150K: CAMU_WhiteBalance = 2;
@@ -5418,20 +6078,20 @@ pub const WHITE_BALANCE_DAYLIGHT: CAMU_WhiteBalance = 3;
pub const WHITE_BALANCE_CLOUDY: CAMU_WhiteBalance = 4;
pub const WHITE_BALANCE_HORIZON: CAMU_WhiteBalance = 4;
pub const WHITE_BALANCE_SHADE: CAMU_WhiteBalance = 5;
-pub type CAMU_WhiteBalance = u32;
+pub type CAMU_WhiteBalance = ::libc::c_uint;
pub const PHOTO_MODE_NORMAL: CAMU_PhotoMode = 0;
pub const PHOTO_MODE_PORTRAIT: CAMU_PhotoMode = 1;
pub const PHOTO_MODE_LANDSCAPE: CAMU_PhotoMode = 2;
pub const PHOTO_MODE_NIGHTVIEW: CAMU_PhotoMode = 3;
pub const PHOTO_MODE_LETTER: CAMU_PhotoMode = 4;
-pub type CAMU_PhotoMode = u32;
+pub type CAMU_PhotoMode = ::libc::c_uint;
pub const EFFECT_NONE: CAMU_Effect = 0;
pub const EFFECT_MONO: CAMU_Effect = 1;
pub const EFFECT_SEPIA: CAMU_Effect = 2;
pub const EFFECT_NEGATIVE: CAMU_Effect = 3;
pub const EFFECT_NEGAFILM: CAMU_Effect = 4;
pub const EFFECT_SEPIA01: CAMU_Effect = 5;
-pub type CAMU_Effect = u32;
+pub type CAMU_Effect = ::libc::c_uint;
pub const CONTRAST_PATTERN_01: CAMU_Contrast = 0;
pub const CONTRAST_PATTERN_02: CAMU_Contrast = 1;
pub const CONTRAST_PATTERN_03: CAMU_Contrast = 2;
@@ -5446,39 +6106,41 @@ pub const CONTRAST_PATTERN_11: CAMU_Contrast = 10;
pub const CONTRAST_LOW: CAMU_Contrast = 4;
pub const CONTRAST_NORMAL: CAMU_Contrast = 5;
pub const CONTRAST_HIGH: CAMU_Contrast = 6;
-pub type CAMU_Contrast = u32;
+pub type CAMU_Contrast = ::libc::c_uint;
pub const LENS_CORRECTION_OFF: CAMU_LensCorrection = 0;
pub const LENS_CORRECTION_ON_70: CAMU_LensCorrection = 1;
pub const LENS_CORRECTION_ON_90: CAMU_LensCorrection = 2;
pub const LENS_CORRECTION_DARK: CAMU_LensCorrection = 0;
pub const LENS_CORRECTION_NORMAL: CAMU_LensCorrection = 1;
pub const LENS_CORRECTION_BRIGHT: CAMU_LensCorrection = 2;
-pub type CAMU_LensCorrection = u32;
+pub type CAMU_LensCorrection = ::libc::c_uint;
pub const OUTPUT_YUV_422: CAMU_OutputFormat = 0;
pub const OUTPUT_RGB_565: CAMU_OutputFormat = 1;
-pub type CAMU_OutputFormat = u32;
+pub type CAMU_OutputFormat = ::libc::c_uint;
pub const SHUTTER_SOUND_TYPE_NORMAL: CAMU_ShutterSoundType = 0;
pub const SHUTTER_SOUND_TYPE_MOVIE: CAMU_ShutterSoundType = 1;
pub const SHUTTER_SOUND_TYPE_MOVIE_END: CAMU_ShutterSoundType = 2;
-pub type CAMU_ShutterSoundType = u32;
+pub type CAMU_ShutterSoundType = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_ImageQualityCalibrationData {
pub aeBaseTarget: s16,
pub kRL: s16,
pub kGL: s16,
pub kBL: s16,
pub ccmPosition: s16,
- pub awbCcmL9Right: u16,
- pub awbCcmL9Left: u16,
- pub awbCcmL10Right: u16,
- pub awbCcmL10Left: u16,
- pub awbX0Right: u16,
- pub awbX0Left: u16,
+ pub awbCcmL9Right: u16_,
+ pub awbCcmL9Left: u16_,
+ pub awbCcmL10Right: u16_,
+ pub awbCcmL10Left: u16_,
+ pub awbX0Right: u16_,
+ pub awbX0Left: u16_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_StereoCameraCalibrationData {
- pub isValidRotationXY: u8,
- pub padding: [u8; 3usize],
+ pub isValidRotationXY: u8_,
+ pub padding: [u8_; 3usize],
pub scale: f32,
pub rotationZ: f32,
pub translationX: f32,
@@ -5491,22 +6153,23 @@ pub struct CAMU_StereoCameraCalibrationData {
pub distanceCameras: f32,
pub imageWidth: s16,
pub imageHeight: s16,
- pub reserved: [u8; 16usize],
+ pub reserved: [u8_; 16usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_PackageParameterCameraSelect {
- pub camera: u8,
+ pub camera: u8_,
pub exposure: s8,
- pub whiteBalance: u8,
+ pub whiteBalance: u8_,
pub sharpness: s8,
- pub autoExposureOn: u8,
- pub autoWhiteBalanceOn: u8,
- pub frameRate: u8,
- pub photoMode: u8,
- pub contrast: u8,
- pub lensCorrection: u8,
- pub noiseFilterOn: u8,
- pub padding: u8,
+ pub autoExposureOn: u8_,
+ pub autoWhiteBalanceOn: u8_,
+ pub frameRate: u8_,
+ pub photoMode: u8_,
+ pub contrast: u8_,
+ pub lensCorrection: u8_,
+ pub noiseFilterOn: u8_,
+ pub padding: u8_,
pub autoExposureWindowX: s16,
pub autoExposureWindowY: s16,
pub autoExposureWindowWidth: s16,
@@ -5517,19 +6180,21 @@ pub struct CAMU_PackageParameterCameraSelect {
pub autoWhiteBalanceWindowHeight: s16,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_PackageParameterContext {
- pub camera: u8,
- pub context: u8,
- pub flip: u8,
- pub effect: u8,
- pub size: u8,
+ pub camera: u8_,
+ pub context: u8_,
+ pub flip: u8_,
+ pub effect: u8_,
+ pub size: u8_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_PackageParameterContextDetail {
- pub camera: u8,
- pub context: u8,
- pub flip: u8,
- pub effect: u8,
+ pub camera: u8_,
+ pub context: u8_,
+ pub flip: u8_,
+ pub effect: u8_,
pub width: s16,
pub height: s16,
pub cropX0: s16,
@@ -5544,59 +6209,59 @@ extern "C" {
pub fn camExit();
}
extern "C" {
- pub fn CAMU_StartCapture(port: u32) -> Result;
+ pub fn CAMU_StartCapture(port: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_StopCapture(port: u32) -> Result;
+ pub fn CAMU_StopCapture(port: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_IsBusy(busy: *mut bool, port: u32) -> Result;
+ pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_ClearBuffer(port: u32) -> Result;
+ pub fn CAMU_ClearBuffer(port: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32) -> Result;
+ pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32) -> Result;
+ pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetReceiving(
event: *mut Handle,
dst: *mut ::libc::c_void,
- port: u32,
- imageSize: u32,
+ port: u32_,
+ imageSize: u32_,
transferUnit: s16,
) -> Result;
}
extern "C" {
- pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32) -> Result;
+ pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_SetTransferLines(port: u32, lines: s16, width: s16, height: s16) -> Result;
+ pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result;
}
extern "C" {
pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result;
}
extern "C" {
- pub fn CAMU_SetTransferBytes(port: u32, bytes: u32, width: s16, height: s16) -> Result;
+ pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result;
}
extern "C" {
- pub fn CAMU_GetTransferBytes(transferBytes: *mut u32, port: u32) -> Result;
+ pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_GetMaxBytes(maxBytes: *mut u32, width: s16, height: s16) -> Result;
+ pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result;
}
extern "C" {
- pub fn CAMU_SetTrimming(port: u32, trimming: bool) -> Result;
+ pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result;
}
extern "C" {
- pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32) -> Result;
+ pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetTrimmingParams(
- port: u32,
+ port: u32_,
xStart: s16,
yStart: s16,
xEnd: s16,
@@ -5609,12 +6274,12 @@ extern "C" {
yStart: *mut s16,
xEnd: *mut s16,
yEnd: *mut s16,
- port: u32,
+ port: u32_,
) -> Result;
}
extern "C" {
pub fn CAMU_SetTrimmingParamsCenter(
- port: u32,
+ port: u32_,
trimWidth: s16,
trimHeight: s16,
camWidth: s16,
@@ -5622,44 +6287,44 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn CAMU_Activate(select: u32) -> Result;
+ pub fn CAMU_Activate(select: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_SwitchContext(select: u32, context: CAMU_Context) -> Result;
+ pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result;
}
extern "C" {
- pub fn CAMU_SetExposure(select: u32, exposure: s8) -> Result;
+ pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result;
}
extern "C" {
- pub fn CAMU_SetWhiteBalance(select: u32, whiteBalance: CAMU_WhiteBalance) -> Result;
+ pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result;
}
extern "C" {
pub fn CAMU_SetWhiteBalanceWithoutBaseUp(
- select: u32,
+ select: u32_,
whiteBalance: CAMU_WhiteBalance,
) -> Result;
}
extern "C" {
- pub fn CAMU_SetSharpness(select: u32, sharpness: s8) -> Result;
+ pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result;
}
extern "C" {
- pub fn CAMU_SetAutoExposure(select: u32, autoExposure: bool) -> Result;
+ pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result;
}
extern "C" {
- pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32) -> Result;
+ pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_SetAutoWhiteBalance(select: u32, autoWhiteBalance: bool) -> Result;
+ pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result;
}
extern "C" {
- pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32) -> Result;
+ pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_FlipImage(select: u32, flip: CAMU_Flip, context: CAMU_Context) -> Result;
+ pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result;
}
extern "C" {
pub fn CAMU_SetDetailSize(
- select: u32,
+ select: u32_,
width: s16,
height: s16,
cropX0: s16,
@@ -5670,33 +6335,33 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn CAMU_SetSize(select: u32, size: CAMU_Size, context: CAMU_Context) -> Result;
+ pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result;
}
extern "C" {
- pub fn CAMU_SetFrameRate(select: u32, frameRate: CAMU_FrameRate) -> Result;
+ pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result;
}
extern "C" {
- pub fn CAMU_SetPhotoMode(select: u32, photoMode: CAMU_PhotoMode) -> Result;
+ pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result;
}
extern "C" {
- pub fn CAMU_SetEffect(select: u32, effect: CAMU_Effect, context: CAMU_Context) -> Result;
+ pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result;
}
extern "C" {
- pub fn CAMU_SetContrast(select: u32, contrast: CAMU_Contrast) -> Result;
+ pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result;
}
extern "C" {
- pub fn CAMU_SetLensCorrection(select: u32, lensCorrection: CAMU_LensCorrection) -> Result;
+ pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result;
}
extern "C" {
pub fn CAMU_SetOutputFormat(
- select: u32,
+ select: u32_,
format: CAMU_OutputFormat,
context: CAMU_Context,
) -> Result;
}
extern "C" {
pub fn CAMU_SetAutoExposureWindow(
- select: u32,
+ select: u32_,
x: s16,
y: s16,
width: s16,
@@ -5705,7 +6370,7 @@ extern "C" {
}
extern "C" {
pub fn CAMU_SetAutoWhiteBalanceWindow(
- select: u32,
+ select: u32_,
x: s16,
y: s16,
width: s16,
@@ -5713,13 +6378,13 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn CAMU_SetNoiseFilter(select: u32, noiseFilter: bool) -> Result;
+ pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result;
}
extern "C" {
- pub fn CAMU_SynchronizeVsyncTiming(select1: u32, select2: u32) -> Result;
+ pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result;
}
extern "C" {
- pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32, past: u32) -> Result;
+ pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result;
}
extern "C" {
pub fn CAMU_GetStereoCameraCalibrationData(
@@ -5730,16 +6395,16 @@ extern "C" {
pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result;
}
extern "C" {
- pub fn CAMU_WriteRegisterI2c(select: u32, addr: u16, data: u16) -> Result;
+ pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result;
}
extern "C" {
- pub fn CAMU_WriteMcuVariableI2c(select: u32, addr: u16, data: u16) -> Result;
+ pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result;
}
extern "C" {
- pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16, select: u32, addr: u16) -> Result;
+ pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result;
}
extern "C" {
- pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16, select: u32, addr: u16) -> Result;
+ pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result;
}
extern "C" {
pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result;
@@ -5777,40 +6442,40 @@ extern "C" {
pub fn CAMU_DriverFinalize() -> Result;
}
extern "C" {
- pub fn CAMU_GetActivatedCamera(select: *mut u32) -> Result;
+ pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result;
}
extern "C" {
- pub fn CAMU_GetSleepCamera(select: *mut u32) -> Result;
+ pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result;
}
extern "C" {
- pub fn CAMU_SetSleepCamera(select: u32) -> Result;
+ pub fn CAMU_SetSleepCamera(select: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result;
}
extern "C" {
- pub fn cfgnorInit(value: u8) -> Result;
+ pub fn cfgnorInit(value: u8_) -> Result;
}
extern "C" {
pub fn cfgnorExit();
}
extern "C" {
- pub fn cfgnorDumpFlash(buf: *mut u32, size: u32) -> Result;
+ pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result;
}
extern "C" {
- pub fn cfgnorWriteFlash(buf: *mut u32, size: u32) -> Result;
+ pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result;
}
extern "C" {
- pub fn CFGNOR_Initialize(value: u8) -> Result;
+ pub fn CFGNOR_Initialize(value: u8_) -> Result;
}
extern "C" {
pub fn CFGNOR_Shutdown() -> Result;
}
extern "C" {
- pub fn CFGNOR_ReadData(offset: u32, buf: *mut u32, size: u32) -> Result;
+ pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result;
}
extern "C" {
- pub fn CFGNOR_WriteData(offset: u32, buf: *mut u32, size: u32) -> Result;
+ pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result;
}
pub const CFG_REGION_JPN: CFG_Region = 0;
pub const CFG_REGION_USA: CFG_Region = 1;
@@ -5819,7 +6484,7 @@ pub const CFG_REGION_AUS: CFG_Region = 3;
pub const CFG_REGION_CHN: CFG_Region = 4;
pub const CFG_REGION_KOR: CFG_Region = 5;
pub const CFG_REGION_TWN: CFG_Region = 6;
-pub type CFG_Region = u32;
+pub type CFG_Region = ::libc::c_uint;
pub const CFG_LANGUAGE_JP: CFG_Language = 0;
pub const CFG_LANGUAGE_EN: CFG_Language = 1;
pub const CFG_LANGUAGE_FR: CFG_Language = 2;
@@ -5832,7 +6497,14 @@ pub const CFG_LANGUAGE_NL: CFG_Language = 8;
pub const CFG_LANGUAGE_PT: CFG_Language = 9;
pub const CFG_LANGUAGE_RU: CFG_Language = 10;
pub const CFG_LANGUAGE_TW: CFG_Language = 11;
-pub type CFG_Language = u32;
+pub type CFG_Language = ::libc::c_uint;
+pub const CFG_MODEL_3DS: CFG_SystemModel = 0;
+pub const CFG_MODEL_3DSXL: CFG_SystemModel = 1;
+pub const CFG_MODEL_N3DS: CFG_SystemModel = 2;
+pub const CFG_MODEL_2DS: CFG_SystemModel = 3;
+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" {
pub fn cfguInit() -> Result;
}
@@ -5840,49 +6512,49 @@ extern "C" {
pub fn cfguExit();
}
extern "C" {
- pub fn CFGU_SecureInfoGetRegion(region: *mut u8) -> Result;
+ pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result;
}
extern "C" {
- pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32, hash: *mut u64) -> Result;
+ pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result;
}
extern "C" {
- pub fn CFGU_GetRegionCanadaUSA(value: *mut u8) -> Result;
+ pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result;
}
extern "C" {
- pub fn CFGU_GetSystemModel(model: *mut u8) -> Result;
+ pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result;
}
extern "C" {
- pub fn CFGU_GetModelNintendo2DS(value: *mut u8) -> Result;
+ pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result;
}
extern "C" {
- pub fn CFGU_GetCountryCodeString(code: u16, string: *mut u16) -> Result;
+ pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result;
}
extern "C" {
- pub fn CFGU_GetCountryCodeID(string: u16, code: *mut u16) -> Result;
+ pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result;
}
extern "C" {
pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result;
}
extern "C" {
- pub fn CFGU_GetConfigInfoBlk2(size: u32, blkID: u32, outData: *mut u8) -> Result;
+ pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result;
}
extern "C" {
- pub fn CFG_GetConfigInfoBlk4(size: u32, blkID: u32, outData: *mut u8) -> Result;
+ pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result;
}
extern "C" {
- pub fn CFG_GetConfigInfoBlk8(size: u32, blkID: u32, outData: *mut u8) -> Result;
+ pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result;
}
extern "C" {
- pub fn CFG_SetConfigInfoBlk4(size: u32, blkID: u32, inData: *mut u8) -> Result;
+ pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result;
}
extern "C" {
- pub fn CFG_SetConfigInfoBlk8(size: u32, blkID: u32, inData: *mut u8) -> Result;
+ pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result;
}
extern "C" {
pub fn CFG_UpdateConfigSavegame() -> Result;
}
extern "C" {
- pub fn CFGU_GetSystemLanguage(language: *mut u8) -> Result;
+ pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGI_RestoreLocalFriendCodeSeed() -> Result;
@@ -5906,45 +6578,45 @@ extern "C" {
pub fn CFGI_VerifySigSecureInfo() -> Result;
}
extern "C" {
- pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8) -> Result;
+ pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result;
}
extern "C" {
- pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8) -> Result;
+ pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result;
}
extern "C" {
- pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64) -> Result;
+ pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result;
}
extern "C" {
- pub fn CFGI_GetSecureInfoData(data: *mut u8) -> Result;
+ pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result;
}
extern "C" {
- pub fn CFGI_GetSecureInfoSignature(data: *mut u8) -> Result;
+ pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result;
}
-pub const CSND_ENCODING_PCM8: _bindgen_ty_15 = 0;
-pub const CSND_ENCODING_PCM16: _bindgen_ty_15 = 1;
-pub const CSND_ENCODING_ADPCM: _bindgen_ty_15 = 2;
-pub const CSND_ENCODING_PSG: _bindgen_ty_15 = 3;
-pub type _bindgen_ty_15 = u32;
-pub const CSND_LOOPMODE_MANUAL: _bindgen_ty_16 = 0;
-pub const CSND_LOOPMODE_NORMAL: _bindgen_ty_16 = 1;
-pub const CSND_LOOPMODE_ONESHOT: _bindgen_ty_16 = 2;
-pub const CSND_LOOPMODE_NORELOAD: _bindgen_ty_16 = 3;
-pub type _bindgen_ty_16 = u32;
-pub const SOUND_LINEAR_INTERP: _bindgen_ty_17 = 64;
-pub const SOUND_REPEAT: _bindgen_ty_17 = 1024;
-pub const SOUND_ONE_SHOT: _bindgen_ty_17 = 2048;
-pub const SOUND_FORMAT_8BIT: _bindgen_ty_17 = 0;
-pub const SOUND_FORMAT_16BIT: _bindgen_ty_17 = 4096;
-pub const SOUND_FORMAT_ADPCM: _bindgen_ty_17 = 8192;
-pub const SOUND_FORMAT_PSG: _bindgen_ty_17 = 12288;
-pub const SOUND_ENABLE: _bindgen_ty_17 = 16384;
-pub type _bindgen_ty_17 = u32;
-pub const CAPTURE_REPEAT: _bindgen_ty_18 = 0;
-pub const CAPTURE_ONE_SHOT: _bindgen_ty_18 = 1;
-pub const CAPTURE_FORMAT_16BIT: _bindgen_ty_18 = 0;
-pub const CAPTURE_FORMAT_8BIT: _bindgen_ty_18 = 2;
-pub const CAPTURE_ENABLE: _bindgen_ty_18 = 32768;
-pub type _bindgen_ty_18 = u32;
+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 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 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 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 type _bindgen_ty_20 = ::libc::c_uint;
pub const DutyCycle_0: CSND_DutyCycle = 7;
pub const DutyCycle_12: CSND_DutyCycle = 0;
pub const DutyCycle_25: CSND_DutyCycle = 1;
@@ -5953,59 +6625,73 @@ pub const DutyCycle_50: CSND_DutyCycle = 3;
pub const DutyCycle_62: CSND_DutyCycle = 4;
pub const DutyCycle_75: CSND_DutyCycle = 5;
pub const DutyCycle_87: CSND_DutyCycle = 6;
-pub type CSND_DutyCycle = u32;
+pub type CSND_DutyCycle = ::libc::c_uint;
#[repr(C)]
-pub struct CSND_ChnInfo {
- pub value: __BindgenUnionField<[u32; 3usize]>,
- pub __bindgen_anon_1: __BindgenUnionField<CSND_ChnInfo__bindgen_ty_1>,
- pub bindgen_union_field: [u32; 3usize],
+#[derive(Copy, Clone)]
+pub union CSND_ChnInfo {
+ pub value: [u32_; 3usize],
+ pub __bindgen_anon_1: CSND_ChnInfo__bindgen_ty_1,
+ _bindgen_union_align: [u32; 3usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CSND_ChnInfo__bindgen_ty_1 {
- pub active: u8,
- pub _pad1: u8,
- pub _pad2: u16,
+ pub active: u8_,
+ pub _pad1: u8_,
+ pub _pad2: u16_,
pub adpcmSample: s16,
- pub adpcmIndex: u8,
- pub _pad3: u8,
- pub unknownZero: u32,
+ pub adpcmIndex: u8_,
+ pub _pad3: u8_,
+ pub unknownZero: u32_,
+}
+impl Default for CSND_ChnInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
-pub struct CSND_CapInfo {
- pub value: __BindgenUnionField<[u32; 2usize]>,
- pub __bindgen_anon_1: __BindgenUnionField<CSND_CapInfo__bindgen_ty_1>,
- pub bindgen_union_field: [u32; 2usize],
+#[derive(Copy, Clone)]
+pub union CSND_CapInfo {
+ pub value: [u32_; 2usize],
+ pub __bindgen_anon_1: CSND_CapInfo__bindgen_ty_1,
+ _bindgen_union_align: [u32; 2usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct CSND_CapInfo__bindgen_ty_1 {
- pub active: u8,
- pub _pad1: u8,
- pub _pad2: u16,
- pub unknownZero: u32,
+ pub active: u8_,
+ pub _pad1: u8_,
+ pub _pad2: u16_,
+ pub unknownZero: u32_,
+}
+impl Default for CSND_CapInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub static mut csndSharedMem: *mut vu32;
}
extern "C" {
- pub static mut csndSharedMemSize: u32;
+ pub static mut csndSharedMemSize: u32_;
}
extern "C" {
- pub static mut csndChannels: u32;
+ pub static mut csndChannels: u32_;
}
extern "C" {
- pub fn CSND_AcquireCapUnit(capUnit: *mut u32) -> Result;
+ pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result;
}
extern "C" {
- pub fn CSND_ReleaseCapUnit(capUnit: u32) -> Result;
+ pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result;
}
extern "C" {
- pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32) -> Result;
+ pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32) -> Result;
+ pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32) -> Result;
+ pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn CSND_Reset() -> Result;
@@ -6017,91 +6703,96 @@ extern "C" {
pub fn csndExit();
}
extern "C" {
- pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32;
+ pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32_;
}
extern "C" {
- pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8);
+ pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_);
}
extern "C" {
pub fn csndExecCmds(waitDone: bool) -> Result;
}
extern "C" {
- pub fn CSND_SetPlayStateR(channel: u32, value: u32);
+ pub fn CSND_SetPlayStateR(channel: u32_, value: u32_);
}
extern "C" {
- pub fn CSND_SetPlayState(channel: u32, value: u32);
+ pub fn CSND_SetPlayState(channel: u32_, value: u32_);
}
extern "C" {
- pub fn CSND_SetEncoding(channel: u32, value: u32);
+ pub fn CSND_SetEncoding(channel: u32_, value: u32_);
}
extern "C" {
- pub fn CSND_SetBlock(channel: u32, block: ::libc::c_int, physaddr: u32, size: u32);
+ pub fn CSND_SetBlock(channel: u32_, block: ::libc::c_int, physaddr: u32_, size: u32_);
}
extern "C" {
- pub fn CSND_SetLooping(channel: u32, value: u32);
+ pub fn CSND_SetLooping(channel: u32_, value: u32_);
}
extern "C" {
- pub fn CSND_SetBit7(channel: u32, set: bool);
+ pub fn CSND_SetBit7(channel: u32_, set: bool);
}
extern "C" {
- pub fn CSND_SetInterp(channel: u32, interp: bool);
+ pub fn CSND_SetInterp(channel: u32_, interp: bool);
}
extern "C" {
- pub fn CSND_SetDuty(channel: u32, duty: CSND_DutyCycle);
+ pub fn CSND_SetDuty(channel: u32_, duty: CSND_DutyCycle);
}
extern "C" {
- pub fn CSND_SetTimer(channel: u32, timer: u32);
+ pub fn CSND_SetTimer(channel: u32_, timer: u32_);
}
extern "C" {
- pub fn CSND_SetVol(channel: u32, chnVolumes: u32, capVolumes: u32);
+ pub fn CSND_SetVol(channel: u32_, chnVolumes: u32_, capVolumes: u32_);
}
extern "C" {
pub fn CSND_SetAdpcmState(
- channel: u32,
+ channel: u32_,
block: ::libc::c_int,
sample: ::libc::c_int,
index: ::libc::c_int,
);
}
extern "C" {
- pub fn CSND_SetAdpcmReload(channel: u32, reload: bool);
+ pub fn CSND_SetAdpcmReload(channel: u32_, reload: bool);
}
extern "C" {
pub fn CSND_SetChnRegs(
- flags: u32,
- physaddr0: u32,
- physaddr1: u32,
- totalbytesize: u32,
- chnVolumes: u32,
- capVolumes: u32,
+ flags: u32_,
+ physaddr0: u32_,
+ physaddr1: u32_,
+ totalbytesize: u32_,
+ chnVolumes: u32_,
+ capVolumes: u32_,
);
}
extern "C" {
- pub fn CSND_SetChnRegsPSG(flags: u32, chnVolumes: u32, capVolumes: u32, duty: CSND_DutyCycle);
+ pub fn CSND_SetChnRegsPSG(
+ flags: u32_,
+ chnVolumes: u32_,
+ capVolumes: u32_,
+ duty: CSND_DutyCycle,
+ );
}
extern "C" {
- pub fn CSND_SetChnRegsNoise(flags: u32, chnVolumes: u32, capVolumes: u32);
+ pub fn CSND_SetChnRegsNoise(flags: u32_, chnVolumes: u32_, capVolumes: u32_);
}
extern "C" {
- pub fn CSND_CapEnable(capUnit: u32, enable: bool);
+ pub fn CSND_CapEnable(capUnit: u32_, enable: bool);
}
extern "C" {
- pub fn CSND_CapSetRepeat(capUnit: u32, repeat: bool);
+ pub fn CSND_CapSetRepeat(capUnit: u32_, repeat: bool);
}
extern "C" {
- pub fn CSND_CapSetFormat(capUnit: u32, eightbit: bool);
+ pub fn CSND_CapSetFormat(capUnit: u32_, eightbit: bool);
}
extern "C" {
- pub fn CSND_CapSetBit2(capUnit: u32, set: bool);
+ pub fn CSND_CapSetBit2(capUnit: u32_, set: bool);
}
extern "C" {
- pub fn CSND_CapSetTimer(capUnit: u32, timer: u32);
+ pub fn CSND_CapSetTimer(capUnit: u32_, timer: u32_);
}
extern "C" {
- pub fn CSND_CapSetBuffer(capUnit: u32, addr: u32, size: u32);
+ pub fn CSND_CapSetBuffer(capUnit: u32_, addr: u32_, size: u32_);
}
extern "C" {
- pub fn CSND_SetCapRegs(capUnit: u32, flags: u32, addr: u32, size: u32);
+ pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_);
}
extern "C" {
pub fn CSND_SetDspFlags(waitDone: bool) -> Result;
@@ -6112,35 +6803,49 @@ extern "C" {
extern "C" {
pub fn csndPlaySound(
chn: ::libc::c_int,
- flags: u32,
- sampleRate: u32,
+ flags: u32_,
+ sampleRate: u32_,
vol: f32,
pan: f32,
data0: *mut ::libc::c_void,
data1: *mut ::libc::c_void,
- size: u32,
+ size: u32_,
) -> Result;
}
extern "C" {
- pub fn csndGetDspFlags(outSemFlags: *mut u32, outIrqFlags: *mut u32);
+ pub fn csndGetDspFlags(outSemFlags: *mut u32_, outIrqFlags: *mut u32_);
}
extern "C" {
- pub fn csndGetChnInfo(channel: u32) -> *mut CSND_ChnInfo;
+ pub fn csndGetChnInfo(channel: u32_) -> *mut CSND_ChnInfo;
}
extern "C" {
- pub fn csndGetCapInfo(capUnit: u32) -> *mut CSND_CapInfo;
+ pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo;
}
extern "C" {
- pub fn csndGetState(channel: u32, out: *mut CSND_ChnInfo) -> Result;
+ pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result;
}
extern "C" {
- pub fn csndIsPlaying(channel: u32, status: *mut u8) -> Result;
+ pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result;
}
pub const DSP_INTERRUPT_PIPE: DSP_InterruptType = 2;
-pub type DSP_InterruptType = u32;
-pub const DSP_PIPE_INPUT: DSP_PipeDirection = 0;
-pub const DSP_PIPE_OUTPUT: DSP_PipeDirection = 1;
-pub type DSP_PipeDirection = u32;
+pub type DSP_InterruptType = ::libc::c_uint;
+pub const DSPHOOK_ONSLEEP: DSP_HookType = 0;
+pub const DSPHOOK_ONWAKEUP: DSP_HookType = 1;
+pub const DSPHOOK_ONCANCEL: DSP_HookType = 2;
+pub type DSP_HookType = ::libc::c_uint;
+pub type dspHookFn = ::core::option::Option<unsafe extern "C" fn(hook: DSP_HookType)>;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct tag_dspHookCookie {
+ pub next: *mut tag_dspHookCookie,
+ pub callback: dspHookFn,
+}
+impl Default for tag_dspHookCookie {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+pub type dspHookCookie = tag_dspHookCookie;
extern "C" {
pub fn dspInit() -> Result;
}
@@ -6148,29 +6853,38 @@ extern "C" {
pub fn dspExit();
}
extern "C" {
+ pub fn dspIsComponentLoaded() -> bool;
+}
+extern "C" {
+ pub fn dspHook(cookie: *mut dspHookCookie, callback: dspHookFn);
+}
+extern "C" {
+ pub fn dspUnhook(cookie: *mut dspHookCookie);
+}
+extern "C" {
pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result;
}
extern "C" {
- pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32) -> Result;
+ pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32) -> Result;
+ pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result;
}
extern "C" {
- pub fn DSP_SetSemaphore(value: u16) -> Result;
+ pub fn DSP_SetSemaphore(value: u16_) -> Result;
}
extern "C" {
- pub fn DSP_SetSemaphoreMask(mask: u16) -> Result;
+ pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result;
}
extern "C" {
pub fn DSP_LoadComponent(
component: *const ::libc::c_void,
- size: u32,
- prog_mask: u16,
- data_mask: u16,
+ size: u32_,
+ prog_mask: u16_,
+ data_mask: u16_,
is_loaded: *mut bool,
) -> Result;
}
@@ -6178,40 +6892,1886 @@ extern "C" {
pub fn DSP_UnloadComponent() -> Result;
}
extern "C" {
- pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32, channel: u32) -> Result;
+ pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result;
}
extern "C" {
pub fn DSP_ReadPipeIfPossible(
- channel: u32,
- peer: u32,
+ channel: u32_,
+ peer: u32_,
buffer: *mut ::libc::c_void,
- length: u16,
- length_read: *mut u16,
+ length: u16_,
+ length_read: *mut u16_,
) -> Result;
}
extern "C" {
- pub fn DSP_WriteProcessPipe(channel: u32, buffer: *const ::libc::c_void, length: u32)
+ pub fn DSP_WriteProcessPipe(
+ channel: u32_,
+ buffer: *const ::libc::c_void,
+ length: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn DSP_ConvertProcessAddressFromDspDram(
+ dsp_address: u32_,
+ arm_address: *mut u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result;
+}
+extern "C" {
+ pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result;
+}
+extern "C" {
+ 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" {
+ pub fn FSPXI_OpenFile(
+ serviceHandle: Handle,
+ out: *mut FSPXI_File,
+ archive: FSPXI_Archive,
+ path: FS_Path,
+ flags: u32_,
+ attributes: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path)
-> Result;
}
extern "C" {
- pub fn DSP_ConvertProcessAddressFromDspDram(dsp_address: u32, arm_address: *mut u32) -> Result;
+ pub fn FSPXI_RenameFile(
+ serviceHandle: Handle,
+ srcArchive: FSPXI_Archive,
+ srcPath: FS_Path,
+ dstArchive: FSPXI_Archive,
+ dstPath: FS_Path,
+ ) -> Result;
}
extern "C" {
- pub fn DSP_RecvData(regNo: u16, value: *mut u16) -> Result;
+ pub fn FSPXI_DeleteDirectory(
+ serviceHandle: Handle,
+ archive: FSPXI_Archive,
+ path: FS_Path,
+ ) -> Result;
}
extern "C" {
- pub fn DSP_RecvDataIsReady(regNo: u16, is_ready: *mut bool) -> Result;
+ pub fn FSPXI_CreateFile(
+ serviceHandle: Handle,
+ archive: FSPXI_Archive,
+ path: FS_Path,
+ attributes: u32_,
+ fileSize: u64_,
+ ) -> Result;
}
extern "C" {
- pub fn DSP_SendData(regNo: u16, value: u16) -> Result;
+ pub fn FSPXI_CreateDirectory(
+ serviceHandle: Handle,
+ archive: FSPXI_Archive,
+ path: FS_Path,
+ attributes: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_RenameDirectory(
+ serviceHandle: Handle,
+ srcArchive: FSPXI_Archive,
+ srcPath: FS_Path,
+ dstArchive: FSPXI_Archive,
+ dstPath: FS_Path,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_OpenDirectory(
+ serviceHandle: Handle,
+ out: *mut FSPXI_Directory,
+ archive: FSPXI_Archive,
+ path: FS_Path,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ReadFile(
+ serviceHandle: Handle,
+ file: FSPXI_File,
+ bytesRead: *mut u32_,
+ offset: u64_,
+ buffer: *mut ::libc::c_void,
+ size: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CalculateFileHashSHA256(
+ serviceHandle: Handle,
+ file: FSPXI_File,
+ buffer: *mut ::libc::c_void,
+ size: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_WriteFile(
+ serviceHandle: Handle,
+ file: FSPXI_File,
+ bytesWritten: *mut u32_,
+ offset: u64_,
+ buffer: *const ::libc::c_void,
+ size: u32_,
+ flags: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CalcSavegameMAC(
+ serviceHandle: Handle,
+ file: FSPXI_File,
+ inBuffer: *const ::libc::c_void,
+ inSize: u32_,
+ outBuffer: *mut ::libc::c_void,
+ outSize: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ReadDirectory(
+ serviceHandle: Handle,
+ directory: FSPXI_Directory,
+ entriesRead: *mut u32_,
+ entryCount: u32_,
+ entries: *mut FS_DirectoryEntry,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_OpenArchive(
+ serviceHandle: Handle,
+ archive: *mut FSPXI_Archive,
+ archiveID: FS_ArchiveID,
+ path: FS_Path,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_HasFile(
+ serviceHandle: Handle,
+ archive: FSPXI_Archive,
+ out: *mut bool,
+ path: FS_Path,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_HasDirectory(
+ serviceHandle: Handle,
+ archive: FSPXI_Archive,
+ out: *mut bool,
+ path: FS_Path,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_Unknown0x17(
+ serviceHandle: Handle,
+ archive: FSPXI_Archive,
+ out: *mut bool,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSdmcArchiveResource(
+ serviceHandle: Handle,
+ out: *mut FS_ArchiveResource,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetNandArchiveResource(
+ serviceHandle: Handle,
+ out: *mut FS_ArchiveResource,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ClearSdmcLog(serviceHandle: Handle) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ClearNandLog(serviceHandle: Handle) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectCommandWithAddress(
+ serviceHandle: Handle,
+ commandId: u8_,
+ address: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectRead(
+ serviceHandle: Handle,
+ commandId: u8_,
+ size: u32_,
+ output: *mut ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectReadWithAddress(
+ serviceHandle: Handle,
+ commandId: u8_,
+ address: u32_,
+ size: u32_,
+ output: *mut ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectWrite(
+ serviceHandle: Handle,
+ commandId: u8_,
+ size: u32_,
+ input: *const ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectWriteWithAddress(
+ serviceHandle: Handle,
+ commandId: u8_,
+ address: u32_,
+ size: u32_,
+ input: *const ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectRead_4xIO(
+ serviceHandle: Handle,
+ commandId: u8_,
+ address: u32_,
+ size: u32_,
+ output: *mut ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify(
+ serviceHandle: Handle,
+ address: u32_,
+ size: u32_,
+ input: *const ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify(
+ serviceHandle: Handle,
+ address: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetProductInfo(
+ serviceHandle: Handle,
+ info: *mut FS_ProductInfo,
+ archive: FSPXI_Archive,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_EnumerateExtSaveData(
+ serviceHandle: Handle,
+ idsWritten: *mut u32_,
+ idsSize: u32_,
+ mediaType: FS_MediaType,
+ idSize: u32_,
+ shared: bool,
+ ids: *mut u8_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSpecialContentIndex(
+ serviceHandle: Handle,
+ index: *mut u16_,
+ mediaType: FS_MediaType,
+ programId: u64_,
+ type_: FS_SpecialContentType,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetLegacyRomHeader(
+ serviceHandle: Handle,
+ mediaType: FS_MediaType,
+ programId: u64_,
+ header: *mut ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetLegacyBannerData(
+ serviceHandle: Handle,
+ mediaType: FS_MediaType,
+ programId: u64_,
+ banner: *mut ::libc::c_void,
+ unk: u8_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_DeleteSdmcRoot(serviceHandle: Handle) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_DeleteAllExtSaveDataOnNand(serviceHandle: Handle) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_InitializeCtrFilesystem(serviceHandle: Handle) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_CreateSeed(serviceHandle: Handle) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetArchiveResource(
+ serviceHandle: Handle,
+ archiveResource: *mut FS_ArchiveResource,
+ mediaType: FS_SystemMediaType,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ExportIntegrityVerificationSeed(
+ serviceHandle: Handle,
+ seed: *mut FS_IntegrityVerificationSeed,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ImportIntegrityVerificationSeed(
+ serviceHandle: Handle,
+ seed: *const FS_IntegrityVerificationSeed,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetLegacySubBannerData(
+ serviceHandle: Handle,
+ bannerSize: u32_,
+ mediaType: FS_MediaType,
+ programId: u64_,
+ banner: *mut ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GenerateRandomBytes(
+ serviceHandle: Handle,
+ buffer: *mut ::libc::c_void,
+ size: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetFileLastModified(
+ serviceHandle: Handle,
+ archive: FSPXI_Archive,
+ out: *mut u64_,
+ path: *const u16_,
+ size: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ReadSpecialFile(
+ serviceHandle: Handle,
+ bytesRead: *mut u32_,
+ fileOffset: u64_,
+ size: u32_,
+ data: *mut ::libc::c_void,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_StartDeviceMoveAsSource(
+ serviceHandle: Handle,
+ context: *mut FS_DeviceMoveContext,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_StartDeviceMoveAsDestination(
+ serviceHandle: Handle,
+ context: FS_DeviceMoveContext,
+ clear: bool,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ReadFileSHA256(
+ serviceHandle: Handle,
+ file: FSPXI_File,
+ bytesRead: *mut u32_,
+ offset: u64_,
+ readBuffer: *mut ::libc::c_void,
+ readBufferSize: u32_,
+ hashtable: *mut ::libc::c_void,
+ hashtableSize: u32_,
+ unk: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_WriteFileSHA256(
+ serviceHandle: Handle,
+ file: FSPXI_File,
+ bytesWritten: *mut u32_,
+ offset: u64_,
+ writeBuffer: *const ::libc::c_void,
+ writeBufferSize: u32_,
+ hashtable: *mut ::libc::c_void,
+ hashtableSize: u32_,
+ unk1: u32_,
+ unk2: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_EnumerateSystemSaveData(
+ serviceHandle: Handle,
+ idsWritten: *mut u32_,
+ idsSize: u32_,
+ ids: *mut u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_ReadNandReport(
+ serviceHandle: Handle,
+ buffer: *mut ::libc::c_void,
+ size: u32_,
+ unk: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSPXI_Unknown0x56(
+ serviceHandle: Handle,
+ out: *mut u32_,
+ archive: FS_Archive,
+ path: FS_Path,
+ ) -> Result;
+}
+extern "C" {
+ pub fn fsRegInit() -> Result;
+}
+extern "C" {
+ pub fn fsRegExit();
+}
+extern "C" {
+ pub fn fsRegGetSessionHandle() -> *mut Handle;
+}
+extern "C" {
+ pub fn FSREG_Register(
+ pid: u32_,
+ programHandle: u64_,
+ programInfo: *const FS_ProgramInfo,
+ storageInfo: *const ExHeader_Arm11StorageInfo,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSREG_Unregister(pid: u32_) -> Result;
+}
+extern "C" {
+ pub fn FSREG_GetProgramInfo(
+ exheaderInfos: *mut ExHeader_Info,
+ maxNumEntries: u32_,
+ programHandle: u64_,
+ ) -> Result;
}
extern "C" {
- pub fn DSP_SendDataIsEmpty(regNo: u16, is_empty: *mut bool) -> Result;
+ pub fn FSREG_LoadProgram(
+ programHandle: *mut u64_,
+ programInfo: *const FS_ProgramInfo,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result;
}
-pub const GSPLCD_SCREEN_TOP: _bindgen_ty_19 = 1;
-pub const GSPLCD_SCREEN_BOTTOM: _bindgen_ty_19 = 2;
-pub const GSPLCD_SCREEN_BOTH: _bindgen_ty_19 = 3;
-pub type _bindgen_ty_19 = u32;
+extern "C" {
+ pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result;
+}
+#[repr(C)]
+#[repr(align(1))]
+pub struct MiiData {
+ pub _bindgen_opaque_blob: [u8; 92usize],
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_1 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+}
+impl MiiData__bindgen_ty_1 {
+ #[inline]
+ pub fn allow_copying(&self) -> bool {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
+ }
+ #[inline]
+ pub fn set_allow_copying(&mut self, val: bool) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn is_private_name(&self) -> bool {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
+ }
+ #[inline]
+ pub fn set_is_private_name(&mut self, val: bool) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(1usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn region_lock(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u8) }
+ }
+ #[inline]
+ pub fn set_region_lock(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(2usize, 2u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn char_set(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u8) }
+ }
+ #[inline]
+ pub fn set_char_set(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(4usize, 2u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ allow_copying: bool,
+ is_private_name: bool,
+ region_lock: u8_,
+ char_set: u8_,
+ ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 1u8, {
+ let allow_copying: u8 = unsafe { ::core::mem::transmute(allow_copying) };
+ allow_copying as u64
+ });
+ __bindgen_bitfield_unit.set(1usize, 1u8, {
+ let is_private_name: u8 = unsafe { ::core::mem::transmute(is_private_name) };
+ is_private_name as u64
+ });
+ __bindgen_bitfield_unit.set(2usize, 2u8, {
+ let region_lock: u8 = unsafe { ::core::mem::transmute(region_lock) };
+ region_lock as u64
+ });
+ __bindgen_bitfield_unit.set(4usize, 2u8, {
+ let char_set: u8 = unsafe { ::core::mem::transmute(char_set) };
+ char_set as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_2 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+}
+impl MiiData__bindgen_ty_2 {
+ #[inline]
+ pub fn page_index(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
+ }
+ #[inline]
+ pub fn set_page_index(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn slot_index(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
+ }
+ #[inline]
+ pub fn set_slot_index(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(4usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(page_index: u8_, slot_index: u8_) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 4u8, {
+ let page_index: u8 = unsafe { ::core::mem::transmute(page_index) };
+ page_index as u64
+ });
+ __bindgen_bitfield_unit.set(4usize, 4u8, {
+ let slot_index: u8 = unsafe { ::core::mem::transmute(slot_index) };
+ slot_index as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_3 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+}
+impl MiiData__bindgen_ty_3 {
+ #[inline]
+ pub fn unknown0(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
+ }
+ #[inline]
+ pub fn set_unknown0(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn origin_console(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u8) }
+ }
+ #[inline]
+ pub fn set_origin_console(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(4usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ unknown0: u8_,
+ origin_console: u8_,
+ ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 4u8, {
+ let unknown0: u8 = unsafe { ::core::mem::transmute(unknown0) };
+ unknown0 as u64
+ });
+ __bindgen_bitfield_unit.set(4usize, 3u8, {
+ let origin_console: u8 = unsafe { ::core::mem::transmute(origin_console) };
+ origin_console as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_4 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
+}
+impl MiiData__bindgen_ty_4 {
+ #[inline]
+ pub fn sex(&self) -> bool {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
+ }
+ #[inline]
+ pub fn set_sex(&mut self, val: bool) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn bday_month(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u16) }
+ }
+ #[inline]
+ pub fn set_bday_month(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(1usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn bday_day(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_bday_day(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(5usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn shirt_color(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 4u8) as u16) }
+ }
+ #[inline]
+ pub fn set_shirt_color(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(10usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn favorite(&self) -> bool {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u8) }
+ }
+ #[inline]
+ pub fn set_favorite(&mut self, val: bool) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(14usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ sex: bool,
+ bday_month: u16_,
+ bday_day: u16_,
+ shirt_color: u16_,
+ favorite: bool,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 1u8, {
+ let sex: u8 = unsafe { ::core::mem::transmute(sex) };
+ sex as u64
+ });
+ __bindgen_bitfield_unit.set(1usize, 4u8, {
+ let bday_month: u16 = unsafe { ::core::mem::transmute(bday_month) };
+ bday_month as u64
+ });
+ __bindgen_bitfield_unit.set(5usize, 5u8, {
+ let bday_day: u16 = unsafe { ::core::mem::transmute(bday_day) };
+ bday_day as u64
+ });
+ __bindgen_bitfield_unit.set(10usize, 4u8, {
+ let shirt_color: u16 = unsafe { ::core::mem::transmute(shirt_color) };
+ shirt_color as u64
+ });
+ __bindgen_bitfield_unit.set(14usize, 1u8, {
+ let favorite: u8 = unsafe { ::core::mem::transmute(favorite) };
+ favorite as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_5 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+}
+impl MiiData__bindgen_ty_5 {
+ #[inline]
+ pub fn disable_sharing(&self) -> bool {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
+ }
+ #[inline]
+ pub fn set_disable_sharing(&mut self, val: bool) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn shape(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u8) }
+ }
+ #[inline]
+ pub fn set_shape(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(1usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn skinColor(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u8) }
+ }
+ #[inline]
+ pub fn set_skinColor(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(5usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ disable_sharing: bool,
+ shape: u8_,
+ skinColor: u8_,
+ ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 1u8, {
+ let disable_sharing: u8 = unsafe { ::core::mem::transmute(disable_sharing) };
+ disable_sharing as u64
+ });
+ __bindgen_bitfield_unit.set(1usize, 4u8, {
+ let shape: u8 = unsafe { ::core::mem::transmute(shape) };
+ shape as u64
+ });
+ __bindgen_bitfield_unit.set(5usize, 3u8, {
+ let skinColor: u8 = unsafe { ::core::mem::transmute(skinColor) };
+ skinColor as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_6 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+}
+impl MiiData__bindgen_ty_6 {
+ #[inline]
+ pub fn wrinkles(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
+ }
+ #[inline]
+ pub fn set_wrinkles(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn makeup(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
+ }
+ #[inline]
+ pub fn set_makeup(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(4usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(wrinkles: u8_, makeup: u8_) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 4u8, {
+ let wrinkles: u8 = unsafe { ::core::mem::transmute(wrinkles) };
+ wrinkles as u64
+ });
+ __bindgen_bitfield_unit.set(4usize, 4u8, {
+ let makeup: u8 = unsafe { ::core::mem::transmute(makeup) };
+ makeup as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_7 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
+}
+impl MiiData__bindgen_ty_7 {
+ #[inline]
+ pub fn color(&self) -> u8_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) }
+ }
+ #[inline]
+ pub fn set_color(&mut self, val: u8_) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn flip(&self) -> bool {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
+ }
+ #[inline]
+ pub fn set_flip(&mut self, val: bool) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(3usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(color: u8_, flip: bool) -> __BindgenBitfieldUnit<[u8; 1usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 3u8, {
+ let color: u8 = unsafe { ::core::mem::transmute(color) };
+ color as u64
+ });
+ __bindgen_bitfield_unit.set(3usize, 1u8, {
+ let flip: u8 = unsafe { ::core::mem::transmute(flip) };
+ flip as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(4))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_8 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
+}
+impl MiiData__bindgen_ty_8 {
+ #[inline]
+ pub fn style(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u32) }
+ }
+ #[inline]
+ pub fn set_style(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 6u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn color(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u32) }
+ }
+ #[inline]
+ pub fn set_color(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(6usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn scale(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 4u8) as u32) }
+ }
+ #[inline]
+ pub fn set_scale(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(9usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn yscale(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u32) }
+ }
+ #[inline]
+ pub fn set_yscale(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(13usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn rotation(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 5u8) as u32) }
+ }
+ #[inline]
+ pub fn set_rotation(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(16usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn xspacing(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 4u8) as u32) }
+ }
+ #[inline]
+ pub fn set_xspacing(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(21usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn yposition(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 5u8) as u32) }
+ }
+ #[inline]
+ pub fn set_yposition(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(25usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ style: u32_,
+ color: u32_,
+ scale: u32_,
+ yscale: u32_,
+ rotation: u32_,
+ xspacing: u32_,
+ yposition: u32_,
+ ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 6u8, {
+ let style: u32 = unsafe { ::core::mem::transmute(style) };
+ style as u64
+ });
+ __bindgen_bitfield_unit.set(6usize, 3u8, {
+ let color: u32 = unsafe { ::core::mem::transmute(color) };
+ color as u64
+ });
+ __bindgen_bitfield_unit.set(9usize, 4u8, {
+ let scale: u32 = unsafe { ::core::mem::transmute(scale) };
+ scale as u64
+ });
+ __bindgen_bitfield_unit.set(13usize, 3u8, {
+ let yscale: u32 = unsafe { ::core::mem::transmute(yscale) };
+ yscale as u64
+ });
+ __bindgen_bitfield_unit.set(16usize, 5u8, {
+ let rotation: u32 = unsafe { ::core::mem::transmute(rotation) };
+ rotation as u64
+ });
+ __bindgen_bitfield_unit.set(21usize, 4u8, {
+ let xspacing: u32 = unsafe { ::core::mem::transmute(xspacing) };
+ xspacing as u64
+ });
+ __bindgen_bitfield_unit.set(25usize, 5u8, {
+ let yposition: u32 = unsafe { ::core::mem::transmute(yposition) };
+ yposition as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(4))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_9 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
+}
+impl MiiData__bindgen_ty_9 {
+ #[inline]
+ pub fn style(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) }
+ }
+ #[inline]
+ pub fn set_style(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn color(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) }
+ }
+ #[inline]
+ pub fn set_color(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(5usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn scale(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) }
+ }
+ #[inline]
+ pub fn set_scale(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(8usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn yscale(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 3u8) as u32) }
+ }
+ #[inline]
+ pub fn set_yscale(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(12usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn pad(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
+ }
+ #[inline]
+ pub fn set_pad(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(15usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn rotation(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 5u8) as u32) }
+ }
+ #[inline]
+ pub fn set_rotation(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(16usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn xspacing(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 4u8) as u32) }
+ }
+ #[inline]
+ pub fn set_xspacing(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(21usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn yposition(&self) -> u32_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 5u8) as u32) }
+ }
+ #[inline]
+ pub fn set_yposition(&mut self, val: u32_) {
+ unsafe {
+ let val: u32 = ::core::mem::transmute(val);
+ self._bitfield_1.set(25usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ style: u32_,
+ color: u32_,
+ scale: u32_,
+ yscale: u32_,
+ pad: u32_,
+ rotation: u32_,
+ xspacing: u32_,
+ yposition: u32_,
+ ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 5u8, {
+ let style: u32 = unsafe { ::core::mem::transmute(style) };
+ style as u64
+ });
+ __bindgen_bitfield_unit.set(5usize, 3u8, {
+ let color: u32 = unsafe { ::core::mem::transmute(color) };
+ color as u64
+ });
+ __bindgen_bitfield_unit.set(8usize, 4u8, {
+ let scale: u32 = unsafe { ::core::mem::transmute(scale) };
+ scale as u64
+ });
+ __bindgen_bitfield_unit.set(12usize, 3u8, {
+ let yscale: u32 = unsafe { ::core::mem::transmute(yscale) };
+ yscale as u64
+ });
+ __bindgen_bitfield_unit.set(15usize, 1u8, {
+ let pad: u32 = unsafe { ::core::mem::transmute(pad) };
+ pad as u64
+ });
+ __bindgen_bitfield_unit.set(16usize, 5u8, {
+ let rotation: u32 = unsafe { ::core::mem::transmute(rotation) };
+ rotation as u64
+ });
+ __bindgen_bitfield_unit.set(21usize, 4u8, {
+ let xspacing: u32 = unsafe { ::core::mem::transmute(xspacing) };
+ xspacing as u64
+ });
+ __bindgen_bitfield_unit.set(25usize, 5u8, {
+ let yposition: u32 = unsafe { ::core::mem::transmute(yposition) };
+ yposition as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_10 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
+}
+impl MiiData__bindgen_ty_10 {
+ #[inline]
+ pub fn style(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_style(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn scale(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 4u8) as u16) }
+ }
+ #[inline]
+ pub fn set_scale(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(5usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn yposition(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_yposition(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(9usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ style: u16_,
+ scale: u16_,
+ yposition: u16_,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 5u8, {
+ let style: u16 = unsafe { ::core::mem::transmute(style) };
+ style as u64
+ });
+ __bindgen_bitfield_unit.set(5usize, 4u8, {
+ let scale: u16 = unsafe { ::core::mem::transmute(scale) };
+ scale as u64
+ });
+ __bindgen_bitfield_unit.set(9usize, 5u8, {
+ let yposition: u16 = unsafe { ::core::mem::transmute(yposition) };
+ yposition as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_11 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
+}
+impl MiiData__bindgen_ty_11 {
+ #[inline]
+ pub fn style(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u16) }
+ }
+ #[inline]
+ pub fn set_style(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 6u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn color(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u16) }
+ }
+ #[inline]
+ pub fn set_color(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(6usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn scale(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 4u8) as u16) }
+ }
+ #[inline]
+ pub fn set_scale(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(9usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn yscale(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) }
+ }
+ #[inline]
+ pub fn set_yscale(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(13usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ style: u16_,
+ color: u16_,
+ scale: u16_,
+ yscale: u16_,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 6u8, {
+ let style: u16 = unsafe { ::core::mem::transmute(style) };
+ style as u64
+ });
+ __bindgen_bitfield_unit.set(6usize, 3u8, {
+ let color: u16 = unsafe { ::core::mem::transmute(color) };
+ color as u64
+ });
+ __bindgen_bitfield_unit.set(9usize, 4u8, {
+ let scale: u16 = unsafe { ::core::mem::transmute(scale) };
+ scale as u64
+ });
+ __bindgen_bitfield_unit.set(13usize, 3u8, {
+ let yscale: u16 = unsafe { ::core::mem::transmute(yscale) };
+ yscale as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_12 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
+}
+impl MiiData__bindgen_ty_12 {
+ #[inline]
+ pub fn mouth_yposition(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_mouth_yposition(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn mustach_style(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u16) }
+ }
+ #[inline]
+ pub fn set_mustach_style(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(5usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn pad(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) }
+ }
+ #[inline]
+ pub fn set_pad(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(8usize, 2u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ mouth_yposition: u16_,
+ mustach_style: u16_,
+ pad: u16_,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 5u8, {
+ let mouth_yposition: u16 = unsafe { ::core::mem::transmute(mouth_yposition) };
+ mouth_yposition as u64
+ });
+ __bindgen_bitfield_unit.set(5usize, 3u8, {
+ let mustach_style: u16 = unsafe { ::core::mem::transmute(mustach_style) };
+ mustach_style as u64
+ });
+ __bindgen_bitfield_unit.set(8usize, 2u8, {
+ let pad: u16 = unsafe { ::core::mem::transmute(pad) };
+ pad as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_13 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
+}
+impl MiiData__bindgen_ty_13 {
+ #[inline]
+ pub fn style(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u16) }
+ }
+ #[inline]
+ pub fn set_style(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn color(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u16) }
+ }
+ #[inline]
+ pub fn set_color(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(3usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn scale(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 4u8) as u16) }
+ }
+ #[inline]
+ pub fn set_scale(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(6usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn ypos(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_ypos(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(10usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ style: u16_,
+ color: u16_,
+ scale: u16_,
+ ypos: u16_,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 3u8, {
+ let style: u16 = unsafe { ::core::mem::transmute(style) };
+ style as u64
+ });
+ __bindgen_bitfield_unit.set(3usize, 3u8, {
+ let color: u16 = unsafe { ::core::mem::transmute(color) };
+ color as u64
+ });
+ __bindgen_bitfield_unit.set(6usize, 4u8, {
+ let scale: u16 = unsafe { ::core::mem::transmute(scale) };
+ scale as u64
+ });
+ __bindgen_bitfield_unit.set(10usize, 5u8, {
+ let ypos: u16 = unsafe { ::core::mem::transmute(ypos) };
+ ypos as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_14 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
+}
+impl MiiData__bindgen_ty_14 {
+ #[inline]
+ pub fn style(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) }
+ }
+ #[inline]
+ pub fn set_style(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn color(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u16) }
+ }
+ #[inline]
+ pub fn set_color(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(4usize, 3u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn scale(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 4u8) as u16) }
+ }
+ #[inline]
+ pub fn set_scale(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(7usize, 4u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn ypos(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_ypos(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(11usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ style: u16_,
+ color: u16_,
+ scale: u16_,
+ ypos: u16_,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 4u8, {
+ let style: u16 = unsafe { ::core::mem::transmute(style) };
+ style as u64
+ });
+ __bindgen_bitfield_unit.set(4usize, 3u8, {
+ let color: u16 = unsafe { ::core::mem::transmute(color) };
+ color as u64
+ });
+ __bindgen_bitfield_unit.set(7usize, 4u8, {
+ let scale: u16 = unsafe { ::core::mem::transmute(scale) };
+ scale as u64
+ });
+ __bindgen_bitfield_unit.set(11usize, 5u8, {
+ let ypos: u16 = unsafe { ::core::mem::transmute(ypos) };
+ ypos as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+#[repr(C)]
+#[repr(align(2))]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct MiiData__bindgen_ty_15 {
+ pub _bitfield_align_1: [u8; 0],
+ pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
+}
+impl MiiData__bindgen_ty_15 {
+ #[inline]
+ pub fn enable(&self) -> bool {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
+ }
+ #[inline]
+ pub fn set_enable(&mut self, val: bool) {
+ unsafe {
+ let val: u8 = ::core::mem::transmute(val);
+ self._bitfield_1.set(0usize, 1u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn scale(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_scale(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(1usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn xpos(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_xpos(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(6usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn ypos(&self) -> u16_ {
+ unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u16) }
+ }
+ #[inline]
+ pub fn set_ypos(&mut self, val: u16_) {
+ unsafe {
+ let val: u16 = ::core::mem::transmute(val);
+ self._bitfield_1.set(11usize, 5u8, val as u64)
+ }
+ }
+ #[inline]
+ pub fn new_bitfield_1(
+ enable: bool,
+ scale: u16_,
+ xpos: u16_,
+ ypos: u16_,
+ ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
+ let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
+ __bindgen_bitfield_unit.set(0usize, 1u8, {
+ let enable: u8 = unsafe { ::core::mem::transmute(enable) };
+ enable as u64
+ });
+ __bindgen_bitfield_unit.set(1usize, 5u8, {
+ let scale: u16 = unsafe { ::core::mem::transmute(scale) };
+ scale as u64
+ });
+ __bindgen_bitfield_unit.set(6usize, 5u8, {
+ let xpos: u16 = unsafe { ::core::mem::transmute(xpos) };
+ xpos as u64
+ });
+ __bindgen_bitfield_unit.set(11usize, 5u8, {
+ let ypos: u16 = unsafe { ::core::mem::transmute(ypos) };
+ ypos as u64
+ });
+ __bindgen_bitfield_unit
+ }
+}
+impl Default for MiiData {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct FriendKey {
+ pub principalId: u32_,
+ pub padding: u32_,
+ pub localFriendCode: u64_,
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct TitleData {
+ pub tid: u64_,
+ pub version: u32_,
+ pub unk: u32_,
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct FriendProfile {
+ pub region: u8_,
+ pub country: u8_,
+ pub area: u8_,
+ pub language: u8_,
+ pub platform: u8_,
+ pub padding: u32_,
+}
+#[repr(C, packed)]
+#[derive(Copy, Clone)]
+pub struct GameDescription {
+ pub data: TitleData,
+ pub desc: [u16_; 128usize],
+}
+impl Default for GameDescription {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+#[repr(C, packed)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct NotificationEvent {
+ pub type_: u8_,
+ pub padding3: [u8_; 3usize],
+ pub padding: u32_,
+ pub key: FriendKey,
+}
+pub const USER_WENT_ONLINE: NotificationTypes = 1;
+pub const USER_WENT_OFFLINE: NotificationTypes = 2;
+pub const FRIEND_WENT_ONLINE: NotificationTypes = 3;
+pub const FRIEND_UPDATED_PRESENCE: NotificationTypes = 4;
+pub const FRIEND_UPDATED_MII: NotificationTypes = 5;
+pub const FRIEND_UPDATED_PROFILE: NotificationTypes = 6;
+pub const FRIEND_WENT_OFFLINE: NotificationTypes = 7;
+pub const FRIEND_REGISTERED_USER: NotificationTypes = 8;
+pub const FRIEND_SENT_INVITATION: NotificationTypes = 9;
+pub type NotificationTypes = ::libc::c_uint;
+extern "C" {
+ pub fn frdInit() -> Result;
+}
+extern "C" {
+ pub fn frdExit();
+}
+extern "C" {
+ pub fn frdGetSessionHandle() -> *mut Handle;
+}
+extern "C" {
+ pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FRDU_IsOnline(state: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FRD_Logout() -> Result;
+}
+extern "C" {
+ pub fn FRD_Login(event: Handle) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyPreference(
+ isPublicMode: *mut bool,
+ isShowGameName: *mut bool,
+ isShowPlayedGame: *mut bool,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetFriendKeyList(
+ friendKeyList: *mut FriendKey,
+ num: *mut u32_,
+ offset: u32_,
+ size: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetFriendMii(
+ miiDataList: *mut MiiData,
+ friendKeyList: *const FriendKey,
+ size: size_t,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetFriendProfile(
+ profile: *mut FriendProfile,
+ friendKeyList: *const FriendKey,
+ size: size_t,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetFriendPlayingGame(
+ desc: *mut GameDescription,
+ friendKeyList: *const FriendKey,
+ size: size_t,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetFriendFavouriteGame(
+ desc: *mut GameDescription,
+ friendKeyList: *const FriendKey,
+ count: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result;
+}
+extern "C" {
+ pub fn FRD_AttachToEventNotification(event: Handle) -> Result;
+}
+extern "C" {
+ pub fn FRD_GetEventNotification(
+ event: *mut NotificationEvent,
+ count: u32_,
+ recievedNotifCount: *mut u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result;
+}
+extern "C" {
+ pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result;
+}
+extern "C" {
+ pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result;
+}
+extern "C" {
+ pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result;
+}
+extern "C" {
+ pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result;
+}
+extern "C" {
+ 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 type _bindgen_ty_21 = ::libc::c_uint;
extern "C" {
pub fn gspLcdInit() -> Result;
}
@@ -6225,74 +8785,75 @@ extern "C" {
pub fn GSPLCD_PowerOffAllBacklights() -> Result;
}
extern "C" {
- pub fn GSPLCD_PowerOnBacklight(screen: u32) -> Result;
+ pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result;
}
extern "C" {
- pub fn GSPLCD_PowerOffBacklight(screen: u32) -> Result;
+ pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result;
}
extern "C" {
pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result;
}
extern "C" {
- pub fn GSPLCD_GetVendors(vendors: *mut u8) -> Result;
+ pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result;
}
extern "C" {
- pub fn GSPLCD_GetBrightness(screen: u32, brightness: *mut u32) -> Result;
+ pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result;
}
extern "C" {
- pub fn GSPLCD_SetBrightness(screen: u32, brightness: u32) -> Result;
+ pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result;
}
extern "C" {
- pub fn GSPLCD_SetBrightnessRaw(screen: u32, brightness: u32) -> Result;
+ pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result;
}
-pub const KEY_A: _bindgen_ty_20 = 1;
-pub const KEY_B: _bindgen_ty_20 = 2;
-pub const KEY_SELECT: _bindgen_ty_20 = 4;
-pub const KEY_START: _bindgen_ty_20 = 8;
-pub const KEY_DRIGHT: _bindgen_ty_20 = 16;
-pub const KEY_DLEFT: _bindgen_ty_20 = 32;
-pub const KEY_DUP: _bindgen_ty_20 = 64;
-pub const KEY_DDOWN: _bindgen_ty_20 = 128;
-pub const KEY_R: _bindgen_ty_20 = 256;
-pub const KEY_L: _bindgen_ty_20 = 512;
-pub const KEY_X: _bindgen_ty_20 = 1024;
-pub const KEY_Y: _bindgen_ty_20 = 2048;
-pub const KEY_ZL: _bindgen_ty_20 = 16384;
-pub const KEY_ZR: _bindgen_ty_20 = 32768;
-pub const KEY_TOUCH: _bindgen_ty_20 = 1048576;
-pub const KEY_CSTICK_RIGHT: _bindgen_ty_20 = 16777216;
-pub const KEY_CSTICK_LEFT: _bindgen_ty_20 = 33554432;
-pub const KEY_CSTICK_UP: _bindgen_ty_20 = 67108864;
-pub const KEY_CSTICK_DOWN: _bindgen_ty_20 = 134217728;
-pub const KEY_CPAD_RIGHT: _bindgen_ty_20 = 268435456;
-pub const KEY_CPAD_LEFT: _bindgen_ty_20 = 536870912;
-pub const KEY_CPAD_UP: _bindgen_ty_20 = 1073741824;
-pub const KEY_CPAD_DOWN: _bindgen_ty_20 = 2147483648;
-pub const KEY_UP: _bindgen_ty_20 = 1073741888;
-pub const KEY_DOWN: _bindgen_ty_20 = 2147483776;
-pub const KEY_LEFT: _bindgen_ty_20 = 536870944;
-pub const KEY_RIGHT: _bindgen_ty_20 = 268435472;
-pub type _bindgen_ty_20 = u32;
+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 type _bindgen_ty_22 = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct touchPosition {
- pub px: u16,
- pub py: u16,
+ pub px: u16_,
+ pub py: u16_,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct circlePosition {
pub dx: s16,
pub dy: s16,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct accelVector {
pub x: s16,
pub y: s16,
pub z: s16,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct angularRate {
pub x: s16,
pub z: s16,
@@ -6304,7 +8865,7 @@ pub const HIDEVENT_Accel: HID_Event = 2;
pub const HIDEVENT_Gyro: HID_Event = 3;
pub const HIDEVENT_DebugPad: HID_Event = 4;
pub const HIDEVENT_MAX: HID_Event = 5;
-pub type HID_Event = u32;
+pub type HID_Event = ::libc::c_uint;
extern "C" {
pub static mut hidMemHandle: Handle;
}
@@ -6318,16 +8879,22 @@ extern "C" {
pub fn hidExit();
}
extern "C" {
+ pub fn hidSetRepeatParameters(delay: u32_, interval: u32_);
+}
+extern "C" {
pub fn hidScanInput();
}
extern "C" {
- pub fn hidKeysHeld() -> u32;
+ pub fn hidKeysHeld() -> u32_;
+}
+extern "C" {
+ pub fn hidKeysDown() -> u32_;
}
extern "C" {
- pub fn hidKeysDown() -> u32;
+ pub fn hidKeysDownRepeat() -> u32_;
}
extern "C" {
- pub fn hidKeysUp() -> u32;
+ pub fn hidKeysUp() -> u32_;
}
extern "C" {
pub fn hidTouchRead(pos: *mut touchPosition);
@@ -6345,6 +8912,9 @@ extern "C" {
pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool);
}
extern "C" {
+ pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result;
+}
+extern "C" {
pub fn HIDUSER_GetHandles(
outMemHandle: *mut Handle,
eventpad0: *mut Handle,
@@ -6370,7 +8940,7 @@ extern "C" {
pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result;
}
extern "C" {
- pub fn HIDUSER_GetSoundVolume(volume: *mut u8) -> Result;
+ pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result;
}
extern "C" {
pub static mut irrstMemHandle: Handle;
@@ -6379,6 +8949,9 @@ extern "C" {
pub static mut irrstSharedMem: *mut vu32;
}
extern "C" {
+ pub static mut irrstEvent: Handle;
+}
+extern "C" {
pub fn irrstInit() -> Result;
}
extern "C" {
@@ -6388,7 +8961,7 @@ extern "C" {
pub fn irrstScanInput();
}
extern "C" {
- pub fn irrstKeysHeld() -> u32;
+ pub fn irrstKeysHeld() -> u32_;
}
extern "C" {
pub fn irrstCstickRead(pos: *mut circlePosition);
@@ -6400,15 +8973,16 @@ extern "C" {
pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result;
}
extern "C" {
- pub fn IRRST_Initialize(unk1: u32, unk2: u8) -> Result;
+ pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result;
}
extern "C" {
pub fn IRRST_Shutdown() -> Result;
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct sslcContext {
pub servhandle: Handle,
- pub sslchandle: u32,
+ pub sslchandle: u32_,
pub sharedmem_handle: Handle,
}
pub const SSLC_DefaultRootCert_Nintendo_CA: SSLC_DefaultRootCert = 1;
@@ -6422,13 +8996,13 @@ pub const SSLC_DefaultRootCert_AddTrust_External_CA: SSLC_DefaultRootCert = 8;
pub const SSLC_DefaultRootCert_COMODO: SSLC_DefaultRootCert = 9;
pub const SSLC_DefaultRootCert_USERTrust: SSLC_DefaultRootCert = 10;
pub const SSLC_DefaultRootCert_DigiCert_EV: SSLC_DefaultRootCert = 11;
-pub type SSLC_DefaultRootCert = u32;
+pub type SSLC_DefaultRootCert = ::libc::c_uint;
pub const SSLC_DefaultClientCert_ClCertA: SSLC_DefaultClientCert = 64;
-pub type SSLC_DefaultClientCert = u32;
-pub const SSLCOPT_Default: _bindgen_ty_21 = 0;
-pub const SSLCOPT_DisableVerify: _bindgen_ty_21 = 512;
-pub const SSLCOPT_TLSv10: _bindgen_ty_21 = 2048;
-pub type _bindgen_ty_21 = u32;
+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 type _bindgen_ty_23 = ::libc::c_uint;
extern "C" {
pub fn sslcInit(session_handle: Handle) -> Result;
}
@@ -6436,88 +9010,88 @@ extern "C" {
pub fn sslcExit();
}
extern "C" {
- pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32) -> Result;
+ pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result;
}
extern "C" {
- pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32) -> Result;
+ pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn sslcAddTrustedRootCA(
- RootCertChain_contexthandle: u32,
- cert: *const u8,
- certsize: u32,
- cert_contexthandle: *mut u32,
+ RootCertChain_contexthandle: u32_,
+ cert: *const u8_,
+ certsize: u32_,
+ cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcRootCertChainAddDefaultCert(
- RootCertChain_contexthandle: u32,
+ RootCertChain_contexthandle: u32_,
certID: SSLC_DefaultRootCert,
- cert_contexthandle: *mut u32,
+ cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcRootCertChainRemoveCert(
- RootCertChain_contexthandle: u32,
- cert_contexthandle: u32,
+ RootCertChain_contexthandle: u32_,
+ cert_contexthandle: u32_,
) -> Result;
}
extern "C" {
- pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32) -> Result;
+ pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result;
}
extern "C" {
- pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32) -> Result;
+ pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn sslc8CertChainAddCert(
- CertChain_contexthandle: u32,
- cert: *const u8,
- certsize: u32,
- cert_contexthandle: *mut u32,
+ CertChain_contexthandle: u32_,
+ cert: *const u8_,
+ certsize: u32_,
+ cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslc8CertChainAddDefaultCert(
- CertChain_contexthandle: u32,
- certID: u8,
- cert_contexthandle: *mut u32,
+ CertChain_contexthandle: u32_,
+ certID: u8_,
+ cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslc8CertChainRemoveCert(
- CertChain_contexthandle: u32,
- cert_contexthandle: u32,
+ CertChain_contexthandle: u32_,
+ cert_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn sslcOpenClientCertContext(
- cert: *const u8,
- certsize: u32,
- key: *const u8,
- keysize: u32,
- ClientCert_contexthandle: *mut u32,
+ cert: *const u8_,
+ certsize: u32_,
+ key: *const u8_,
+ keysize: u32_,
+ ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcOpenDefaultClientCertContext(
certID: SSLC_DefaultClientCert,
- ClientCert_contexthandle: *mut u32,
+ ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
- pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32) -> Result;
+ pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn sslcSeedRNG() -> Result;
}
extern "C" {
- pub fn sslcGenerateRandomData(buf: *mut u8, size: u32) -> Result;
+ pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result;
}
extern "C" {
pub fn sslcCreateContext(
context: *mut sslcContext,
sockfd: ::libc::c_int,
- input_opt: u32,
+ input_opt: u32_,
hostname: *const ::libc::c_char,
) -> Result;
}
@@ -6528,69 +9102,71 @@ extern "C" {
pub fn sslcStartConnection(
context: *mut sslcContext,
internal_retval: *mut ::libc::c_int,
- out: *mut u32,
+ out: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcRead(
context: *mut sslcContext,
buf: *mut ::libc::c_void,
- len: usize,
+ len: size_t,
peek: bool,
) -> Result;
}
extern "C" {
- pub fn sslcWrite(context: *mut sslcContext, buf: *const ::libc::c_void, len: usize) -> Result;
+ pub fn sslcWrite(context: *mut sslcContext, buf: *const ::libc::c_void, len: size_t) -> Result;
}
extern "C" {
- pub fn sslcContextSetRootCertChain(context: *mut sslcContext, handle: u32) -> Result;
+ pub fn sslcContextSetRootCertChain(context: *mut sslcContext, handle: u32_) -> Result;
}
extern "C" {
- pub fn sslcContextSetClientCert(context: *mut sslcContext, handle: u32) -> Result;
+ pub fn sslcContextSetClientCert(context: *mut sslcContext, handle: u32_) -> Result;
}
extern "C" {
- pub fn sslcContextSetHandle8(context: *mut sslcContext, handle: u32) -> Result;
+ pub fn sslcContextSetHandle8(context: *mut sslcContext, handle: u32_) -> Result;
}
extern "C" {
- pub fn sslcContextClearOpt(context: *mut sslcContext, bitmask: u32) -> Result;
+ pub fn sslcContextClearOpt(context: *mut sslcContext, bitmask: u32_) -> Result;
}
extern "C" {
pub fn sslcContextGetProtocolCipher(
context: *mut sslcContext,
outprotocols: *mut ::libc::c_char,
- outprotocols_maxsize: u32,
+ outprotocols_maxsize: u32_,
outcipher: *mut ::libc::c_char,
- outcipher_maxsize: u32,
+ outcipher_maxsize: u32_,
) -> Result;
}
extern "C" {
- pub fn sslcContextGetState(context: *mut sslcContext, out: *mut u32) -> Result;
+ pub fn sslcContextGetState(context: *mut sslcContext, out: *mut u32_) -> Result;
}
extern "C" {
- pub fn sslcContextInitSharedmem(context: *mut sslcContext, buf: *mut u8, size: u32) -> Result;
+ pub fn sslcContextInitSharedmem(context: *mut sslcContext, buf: *mut u8_, size: u32_)
+ -> Result;
}
extern "C" {
- pub fn sslcAddCert(context: *mut sslcContext, buf: *const u8, size: u32) -> Result;
+ pub fn sslcAddCert(context: *mut sslcContext, buf: *const u8_, size: u32_) -> Result;
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct httpcContext {
pub servhandle: Handle,
- pub httphandle: u32,
+ pub httphandle: u32_,
}
pub const HTTPC_METHOD_GET: HTTPC_RequestMethod = 1;
pub const HTTPC_METHOD_POST: HTTPC_RequestMethod = 2;
pub const HTTPC_METHOD_HEAD: HTTPC_RequestMethod = 3;
pub const HTTPC_METHOD_PUT: HTTPC_RequestMethod = 4;
pub const HTTPC_METHOD_DELETE: HTTPC_RequestMethod = 5;
-pub type HTTPC_RequestMethod = u32;
+pub type HTTPC_RequestMethod = ::libc::c_uint;
pub const HTTPC_STATUS_REQUEST_IN_PROGRESS: HTTPC_RequestStatus = 5;
pub const HTTPC_STATUS_DOWNLOAD_READY: HTTPC_RequestStatus = 7;
-pub type HTTPC_RequestStatus = u32;
+pub type HTTPC_RequestStatus = ::libc::c_uint;
pub const HTTPC_KEEPALIVE_DISABLED: HTTPC_KeepAlive = 0;
pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1;
-pub type HTTPC_KeepAlive = u32;
+pub type HTTPC_KeepAlive = ::libc::c_uint;
extern "C" {
- pub fn httpcInit(sharedmem_size: u32) -> Result;
+ pub fn httpcInit(sharedmem_size: u32_) -> Result;
}
extern "C" {
pub fn httpcExit();
@@ -6600,7 +9176,7 @@ extern "C" {
context: *mut httpcContext,
method: HTTPC_RequestMethod,
url: *const ::libc::c_char,
- use_defaultproxy: u32,
+ use_defaultproxy: u32_,
) -> Result;
}
extern "C" {
@@ -6627,25 +9203,25 @@ extern "C" {
pub fn httpcAddPostDataBinary(
context: *mut httpcContext,
name: *const ::libc::c_char,
- value: *const u8,
- len: u32,
+ value: *const u8_,
+ len: u32_,
) -> Result;
}
extern "C" {
- pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32, len: u32) -> Result;
+ pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result;
}
extern "C" {
pub fn httpcBeginRequest(context: *mut httpcContext) -> Result;
}
extern "C" {
- pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8, size: u32) -> Result;
+ pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result;
}
extern "C" {
pub fn httpcReceiveDataTimeout(
context: *mut httpcContext,
- buffer: *mut u8,
- size: u32,
- timeout: u64,
+ buffer: *mut u8_,
+ size: u32_,
+ timeout: u64_,
) -> Result;
}
extern "C" {
@@ -6657,18 +9233,18 @@ extern "C" {
extern "C" {
pub fn httpcGetDownloadSizeState(
context: *mut httpcContext,
- downloadedsize: *mut u32,
- contentsize: *mut u32,
+ downloadedsize: *mut u32_,
+ contentsize: *mut u32_,
) -> Result;
}
extern "C" {
- pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32) -> Result;
+ pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result;
}
extern "C" {
pub fn httpcGetResponseStatusCodeTimeout(
context: *mut httpcContext,
- out: *mut u32,
- timeout: u64,
+ out: *mut u32_,
+ timeout: u64_,
) -> Result;
}
extern "C" {
@@ -6676,14 +9252,14 @@ extern "C" {
context: *mut httpcContext,
name: *const ::libc::c_char,
value: *mut ::libc::c_char,
- valuebuf_maxsize: u32,
+ valuebuf_maxsize: u32_,
) -> Result;
}
extern "C" {
pub fn httpcAddTrustedRootCA(
context: *mut httpcContext,
- cert: *const u8,
- certsize: u32,
+ cert: *const u8_,
+ certsize: u32_,
) -> Result;
}
extern "C" {
@@ -6692,16 +9268,16 @@ extern "C" {
extern "C" {
pub fn httpcSelectRootCertChain(
context: *mut httpcContext,
- RootCertChain_contexthandle: u32,
+ RootCertChain_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn httpcSetClientCert(
context: *mut httpcContext,
- cert: *const u8,
- certsize: u32,
- privk: *const u8,
- privk_size: u32,
+ cert: *const u8_,
+ certsize: u32_,
+ privk: *const u8_,
+ privk_size: u32_,
) -> Result;
}
extern "C" {
@@ -6713,177 +9289,212 @@ extern "C" {
extern "C" {
pub fn httpcSetClientCertContext(
context: *mut httpcContext,
- ClientCert_contexthandle: u32,
+ ClientCert_contexthandle: u32_,
) -> Result;
}
extern "C" {
- pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32) -> Result;
+ pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result;
}
extern "C" {
- pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32) -> Result;
+ pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result;
}
extern "C" {
- pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32) -> Result;
+ pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result;
}
extern "C" {
- pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32) -> Result;
+ pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn httpcRootCertChainAddCert(
- RootCertChain_contexthandle: u32,
- cert: *const u8,
- certsize: u32,
- cert_contexthandle: *mut u32,
+ RootCertChain_contexthandle: u32_,
+ cert: *const u8_,
+ certsize: u32_,
+ cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcRootCertChainAddDefaultCert(
- RootCertChain_contexthandle: u32,
+ RootCertChain_contexthandle: u32_,
certID: SSLC_DefaultRootCert,
- cert_contexthandle: *mut u32,
+ cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcRootCertChainRemoveCert(
- RootCertChain_contexthandle: u32,
- cert_contexthandle: u32,
+ RootCertChain_contexthandle: u32_,
+ cert_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn httpcOpenClientCertContext(
- cert: *const u8,
- certsize: u32,
- privk: *const u8,
- privk_size: u32,
- ClientCert_contexthandle: *mut u32,
+ cert: *const u8_,
+ certsize: u32_,
+ privk: *const u8_,
+ privk_size: u32_,
+ ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcOpenDefaultClientCertContext(
certID: SSLC_DefaultClientCert,
- ClientCert_contexthandle: *mut u32,
+ ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
- pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32) -> Result;
+ pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn httpcDownloadData(
context: *mut httpcContext,
- buffer: *mut u8,
- size: u32,
- downloadedsize: *mut u32,
+ buffer: *mut u8_,
+ size: u32_,
+ downloadedsize: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result;
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct udsNodeInfo {
- pub uds_friendcodeseed: u64,
+ pub uds_friendcodeseed: u64_,
pub __bindgen_anon_1: udsNodeInfo__bindgen_ty_1,
- pub NetworkNodeID: u16,
- pub pad_x22: u16,
- pub word_x24: u32,
+ pub NetworkNodeID: u16_,
+ pub pad_x22: u16_,
+ pub word_x24: u32_,
}
#[repr(C)]
-pub struct udsNodeInfo__bindgen_ty_1 {
- pub usercfg: __BindgenUnionField<[u8; 24usize]>,
- pub __bindgen_anon_1: __BindgenUnionField<udsNodeInfo__bindgen_ty_1__bindgen_ty_1>,
- pub bindgen_union_field: [u16; 12usize],
+#[derive(Copy, Clone)]
+pub union udsNodeInfo__bindgen_ty_1 {
+ pub usercfg: [u8_; 24usize],
+ pub __bindgen_anon_1: udsNodeInfo__bindgen_ty_1__bindgen_ty_1,
+ _bindgen_union_align: [u16; 12usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct udsNodeInfo__bindgen_ty_1__bindgen_ty_1 {
- pub username: [u16; 10usize],
- pub unk_x1c: u16,
- pub flag: u8,
- pub pad_x1f: u8,
+ pub username: [u16_; 10usize],
+ pub unk_x1c: u16_,
+ pub flag: u8_,
+ pub pad_x1f: u8_,
+}
+impl Default for udsNodeInfo__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for udsNodeInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct udsConnectionStatus {
- pub status: u32,
- pub unk_x4: u32,
- pub cur_NetworkNodeID: u16,
- pub unk_xa: u16,
- pub unk_xc: [u32; 8usize],
- pub total_nodes: u8,
- pub max_nodes: u8,
- pub node_bitmask: u16,
+ pub status: u32_,
+ pub unk_x4: u32_,
+ pub cur_NetworkNodeID: u16_,
+ pub unk_xa: u16_,
+ pub unk_xc: [u32_; 8usize],
+ pub total_nodes: u8_,
+ pub max_nodes: u8_,
+ pub node_bitmask: u16_,
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct udsNetworkStruct {
- pub host_macaddress: [u8; 6usize],
- pub channel: u8,
- pub pad_x7: u8,
- pub initialized_flag: u8,
- pub unk_x9: [u8; 3usize],
- pub oui_value: [u8; 3usize],
- pub oui_type: u8,
- pub wlancommID: u32,
- pub id8: u8,
- pub unk_x15: u8,
- pub attributes: u16,
- pub networkID: u32,
- pub total_nodes: u8,
- pub max_nodes: u8,
- pub unk_x1e: u8,
- pub unk_x1f: u8,
- pub unk_x20: [u8; 31usize],
- pub appdata_size: u8,
- pub appdata: [u8; 200usize],
+ pub host_macaddress: [u8_; 6usize],
+ pub channel: u8_,
+ pub pad_x7: u8_,
+ pub initialized_flag: u8_,
+ pub unk_x9: [u8_; 3usize],
+ pub oui_value: [u8_; 3usize],
+ pub oui_type: u8_,
+ pub wlancommID: u32_,
+ pub id8: u8_,
+ pub unk_x15: u8_,
+ pub attributes: u16_,
+ pub networkID: u32_,
+ pub total_nodes: u8_,
+ pub max_nodes: u8_,
+ pub unk_x1e: u8_,
+ pub unk_x1f: u8_,
+ pub unk_x20: [u8_; 31usize],
+ pub appdata_size: u8_,
+ pub appdata: [u8_; 200usize],
+}
+impl Default for udsNetworkStruct {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct udsBindContext {
- pub BindNodeID: u32,
+ pub BindNodeID: u32_,
pub event: Handle,
pub spectator: bool,
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct nwmScanInputStruct {
- pub unk_x0: u16,
- pub unk_x2: u16,
- pub unk_x4: u16,
- pub unk_x6: u16,
- pub mac_address: [u8; 6usize],
- pub unk_xe: [u8; 38usize],
+ pub unk_x0: u16_,
+ pub unk_x2: u16_,
+ pub unk_x4: u16_,
+ pub unk_x6: u16_,
+ pub mac_address: [u8_; 6usize],
+ pub unk_xe: [u8_; 38usize],
+}
+impl Default for nwmScanInputStruct {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct nwmBeaconDataReplyHeader {
- pub maxsize: u32,
- pub size: u32,
- pub total_entries: u32,
+ pub maxsize: u32_,
+ pub size: u32_,
+ pub total_entries: u32_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct nwmBeaconDataReplyEntry {
- pub size: u32,
- pub unk_x4: u8,
- pub channel: u8,
- pub unk_x6: u8,
- pub unk_x7: u8,
- pub mac_address: [u8; 6usize],
- pub unk_xe: [u8; 6usize],
- pub unk_x14: u32,
- pub val_x1c: u32,
+ pub size: u32_,
+ pub unk_x4: u8_,
+ pub channel: u8_,
+ pub unk_x6: u8_,
+ pub unk_x7: u8_,
+ pub mac_address: [u8_; 6usize],
+ pub unk_xe: [u8_; 6usize],
+ pub unk_x14: u32_,
+ pub val_x1c: u32_,
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct udsNetworkScanInfo {
pub datareply_entry: nwmBeaconDataReplyEntry,
pub network: udsNetworkStruct,
pub nodes: [udsNodeInfo; 16usize],
}
-pub const UDSNETATTR_DisableConnectSpectators: _bindgen_ty_22 = 1;
-pub const UDSNETATTR_DisableConnectClients: _bindgen_ty_22 = 2;
-pub const UDSNETATTR_x4: _bindgen_ty_22 = 4;
-pub const UDSNETATTR_Default: _bindgen_ty_22 = 32768;
-pub type _bindgen_ty_22 = u32;
-pub const UDS_SENDFLAG_Default: _bindgen_ty_23 = 1;
-pub const UDS_SENDFLAG_Broadcast: _bindgen_ty_23 = 2;
-pub type _bindgen_ty_23 = u32;
+impl Default for udsNetworkScanInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+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 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 type _bindgen_ty_25 = ::libc::c_uint;
pub const UDSCONTYPE_Client: udsConnectionType = 1;
pub const UDSCONTYPE_Spectator: udsConnectionType = 2;
-pub type udsConnectionType = u32;
+pub type udsConnectionType = ::libc::c_uint;
extern "C" {
- pub fn udsInit(sharedmem_size: usize, username: *const ::libc::c_char) -> Result;
+ pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn udsExit();
@@ -6906,48 +9517,48 @@ extern "C" {
extern "C" {
pub fn udsGenerateDefaultNetworkStruct(
network: *mut udsNetworkStruct,
- wlancommID: u32,
- id8: u8,
- max_nodes: u8,
+ wlancommID: u32_,
+ id8: u8_,
+ max_nodes: u8_,
);
}
extern "C" {
pub fn udsScanBeacons(
outbuf: *mut ::libc::c_void,
- maxsize: usize,
+ maxsize: size_t,
networks: *mut *mut udsNetworkScanInfo,
- total_networks: *mut usize,
- wlancommID: u32,
- id8: u8,
- host_macaddress: *const u8,
+ total_networks: *mut size_t,
+ wlancommID: u32_,
+ id8: u8_,
+ host_macaddress: *const u8_,
connected: bool,
) -> Result;
}
extern "C" {
- pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: usize) -> Result;
+ pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result;
}
extern "C" {
pub fn udsGetApplicationData(
buf: *mut ::libc::c_void,
- size: usize,
- actual_size: *mut usize,
+ size: size_t,
+ actual_size: *mut size_t,
) -> Result;
}
extern "C" {
pub fn udsGetNetworkStructApplicationData(
network: *const udsNetworkStruct,
buf: *mut ::libc::c_void,
- size: usize,
- actual_size: *mut usize,
+ size: size_t,
+ actual_size: *mut size_t,
) -> Result;
}
extern "C" {
pub fn udsBind(
bindcontext: *mut udsBindContext,
- NetworkNodeID: u16,
+ NetworkNodeID: u16_,
spectator: bool,
- data_channel: u8,
- recv_buffer_size: u32,
+ data_channel: u8_,
+ recv_buffer_size: u32_,
) -> Result;
}
extern "C" {
@@ -6964,43 +9575,43 @@ extern "C" {
pub fn udsPullPacket(
bindcontext: *const udsBindContext,
buf: *mut ::libc::c_void,
- size: usize,
- actual_size: *mut usize,
- src_NetworkNodeID: *mut u16,
+ size: size_t,
+ actual_size: *mut size_t,
+ src_NetworkNodeID: *mut u16_,
) -> Result;
}
extern "C" {
pub fn udsSendTo(
- dst_NetworkNodeID: u16,
- data_channel: u8,
- flags: u8,
+ dst_NetworkNodeID: u16_,
+ data_channel: u8_,
+ flags: u8_,
buf: *const ::libc::c_void,
- size: usize,
+ size: size_t,
) -> Result;
}
extern "C" {
- pub fn udsGetChannel(channel: *mut u8) -> Result;
+ pub fn udsGetChannel(channel: *mut u8_) -> Result;
}
extern "C" {
pub fn udsCreateNetwork(
network: *const udsNetworkStruct,
passphrase: *const ::libc::c_void,
- passphrase_size: usize,
+ passphrase_size: size_t,
context: *mut udsBindContext,
- data_channel: u8,
- recv_buffer_size: u32,
+ data_channel: u8_,
+ recv_buffer_size: u32_,
) -> Result;
}
extern "C" {
pub fn udsConnectNetwork(
network: *const udsNetworkStruct,
passphrase: *const ::libc::c_void,
- passphrase_size: usize,
+ passphrase_size: size_t,
context: *mut udsBindContext,
- recv_NetworkNodeID: u16,
+ recv_NetworkNodeID: u16_,
connection_type: udsConnectionType,
- data_channel: u8,
- recv_buffer_size: u32,
+ data_channel: u8_,
+ recv_buffer_size: u32_,
) -> Result;
}
extern "C" {
@@ -7010,13 +9621,13 @@ extern "C" {
pub fn udsDisconnectNetwork() -> Result;
}
extern "C" {
- pub fn udsEjectClient(NetworkNodeID: u16) -> Result;
+ pub fn udsEjectClient(NetworkNodeID: u16_) -> Result;
}
extern "C" {
pub fn udsEjectSpectator() -> Result;
}
extern "C" {
- pub fn udsUpdateNetworkAttribute(bitmask: u16, flag: bool) -> Result;
+ pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result;
}
extern "C" {
pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result;
@@ -7031,45 +9642,45 @@ extern "C" {
pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool;
}
extern "C" {
- pub fn udsGetNodeInformation(NetworkNodeID: u16, output: *mut udsNodeInfo) -> Result;
-}
-pub const EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0;
-pub const EXCLUSIVE_STATE_INFRASTRUCTURE: ndmExclusiveState = 1;
-pub const EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS: ndmExclusiveState = 2;
-pub const EXCLUSIVE_STATE_STREETPASS: ndmExclusiveState = 3;
-pub const EXCLUSIVE_STATE_STREETPASS_DATA: ndmExclusiveState = 4;
-pub type ndmExclusiveState = u32;
-pub const STATE_INITIAL: ndmState = 0;
-pub const STATE_SUSPENDED: ndmState = 1;
-pub const STATE_INFRASTRUCTURE_CONNECTING: ndmState = 2;
-pub const STATE_INFRASTRUCTURE_CONNECTED: ndmState = 3;
-pub const STATE_INFRASTRUCTURE_WORKING: ndmState = 4;
-pub const STATE_INFRASTRUCTURE_SUSPENDING: ndmState = 5;
-pub const STATE_INFRASTRUCTURE_FORCE_SUSPENDING: ndmState = 6;
-pub const STATE_INFRASTRUCTURE_DISCONNECTING: ndmState = 7;
-pub const STATE_INFRASTRUCTURE_FORCE_DISCONNECTING: ndmState = 8;
-pub const STATE_CEC_WORKING: ndmState = 9;
-pub const STATE_CEC_FORCE_SUSPENDING: ndmState = 10;
-pub const STATE_CEC_SUSPENDING: ndmState = 11;
-pub type ndmState = u32;
-pub const DAEMON_CEC: ndmDaemon = 0;
-pub const DAEMON_BOSS: ndmDaemon = 1;
-pub const DAEMON_NIM: ndmDaemon = 2;
-pub const DAEMON_FRIENDS: ndmDaemon = 3;
-pub type ndmDaemon = u32;
-pub const DAEMON_MASK_CEC: ndmDaemonMask = 1;
-pub const DAEMON_MASK_BOSS: ndmDaemonMask = 2;
-pub const DAEMON_MASK_NIM: ndmDaemonMask = 4;
-pub const DAEMON_MASK_FRIENDS: ndmDaemonMask = 8;
-pub const DAEMON_MASK_BACKGROUOND: ndmDaemonMask = 7;
-pub const DAEMON_MASK_ALL: ndmDaemonMask = 15;
-pub const DAEMON_MASK_DEFAULT: ndmDaemonMask = 9;
-pub type ndmDaemonMask = u32;
-pub const DAEMON_STATUS_BUSY: ndmDaemonStatus = 0;
-pub const DAEMON_STATUS_IDLE: ndmDaemonStatus = 1;
-pub const DAEMON_STATUS_SUSPENDING: ndmDaemonStatus = 2;
-pub const DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3;
-pub type ndmDaemonStatus = u32;
+ pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result;
+}
+pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0;
+pub const NDM_EXCLUSIVE_STATE_INFRASTRUCTURE: ndmExclusiveState = 1;
+pub const NDM_EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS: ndmExclusiveState = 2;
+pub const NDM_EXCLUSIVE_STATE_STREETPASS: ndmExclusiveState = 3;
+pub const NDM_EXCLUSIVE_STATE_STREETPASS_DATA: ndmExclusiveState = 4;
+pub type ndmExclusiveState = ::libc::c_uint;
+pub const NDM_STATE_INITIAL: ndmState = 0;
+pub const NDM_STATE_SUSPENDED: ndmState = 1;
+pub const NDM_STATE_INFRASTRUCTURE_CONNECTING: ndmState = 2;
+pub const NDM_STATE_INFRASTRUCTURE_CONNECTED: ndmState = 3;
+pub const NDM_STATE_INFRASTRUCTURE_WORKING: ndmState = 4;
+pub const NDM_STATE_INFRASTRUCTURE_SUSPENDING: ndmState = 5;
+pub const NDM_STATE_INFRASTRUCTURE_FORCE_SUSPENDING: ndmState = 6;
+pub const NDM_STATE_INFRASTRUCTURE_DISCONNECTING: ndmState = 7;
+pub const NDM_STATE_INFRASTRUCTURE_FORCE_DISCONNECTING: ndmState = 8;
+pub const NDM_STATE_CEC_WORKING: ndmState = 9;
+pub const NDM_STATE_CEC_FORCE_SUSPENDING: ndmState = 10;
+pub const NDM_STATE_CEC_SUSPENDING: ndmState = 11;
+pub type ndmState = ::libc::c_uint;
+pub const NDM_DAEMON_CEC: ndmDaemon = 0;
+pub const NDM_DAEMON_BOSS: ndmDaemon = 1;
+pub const NDM_DAEMON_NIM: ndmDaemon = 2;
+pub const NDM_DAEMON_FRIENDS: ndmDaemon = 3;
+pub type ndmDaemon = ::libc::c_uint;
+pub const NDM_DAEMON_MASK_CEC: ndmDaemonMask = 1;
+pub const NDM_DAEMON_MASK_BOSS: ndmDaemonMask = 2;
+pub const NDM_DAEMON_MASK_NIM: ndmDaemonMask = 4;
+pub const NDM_DAEMON_MASK_FRIENDS: ndmDaemonMask = 8;
+pub const NDM_DAEMON_MASK_BACKGROUOND: ndmDaemonMask = 7;
+pub const NDM_DAEMON_MASK_ALL: ndmDaemonMask = 15;
+pub const NDM_DAEMON_MASK_DEFAULT: ndmDaemonMask = 9;
+pub type ndmDaemonMask = ::libc::c_uint;
+pub const NDM_DAEMON_STATUS_BUSY: ndmDaemonStatus = 0;
+pub const NDM_DAEMON_STATUS_IDLE: ndmDaemonStatus = 1;
+pub const NDM_DAEMON_STATUS_SUSPENDING: ndmDaemonStatus = 2;
+pub const NDM_DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3;
+pub type ndmDaemonStatus = ::libc::c_uint;
extern "C" {
pub fn ndmuInit() -> Result;
}
@@ -7098,7 +9709,7 @@ extern "C" {
pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result;
}
extern "C" {
- pub fn NDMU_SuspendScheduler(flag: u32) -> Result;
+ pub fn NDMU_SuspendScheduler(flag: u32_) -> Result;
}
extern "C" {
pub fn NDMU_ResumeScheduler() -> Result;
@@ -7110,13 +9721,13 @@ extern "C" {
pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result;
}
extern "C" {
- pub fn NDMU_SetScanInterval(interval: u32) -> Result;
+ pub fn NDMU_SetScanInterval(interval: u32_) -> Result;
}
extern "C" {
- pub fn NDMU_GetScanInterval(interval: *mut u32) -> Result;
+ pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result;
}
extern "C" {
- pub fn NDMU_GetRetryInterval(interval: *mut u32) -> Result;
+ pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result;
}
extern "C" {
pub fn NDMU_ResetDaemons() -> Result;
@@ -7131,7 +9742,7 @@ pub const IM_DEFAULT: NIM_InstallationMode = 0;
pub const IM_UNKNOWN1: NIM_InstallationMode = 1;
pub const IM_UNKNOWN2: NIM_InstallationMode = 2;
pub const IM_REINSTALL: NIM_InstallationMode = 3;
-pub type NIM_InstallationMode = u32;
+pub type NIM_InstallationMode = ::libc::c_uint;
pub const DS_NOT_INITIALIZED: NIM_DownloadState = 0;
pub const DS_INITIALIZED: NIM_DownloadState = 1;
pub const DS_DOWNLOAD_TMD: NIM_DownloadState = 2;
@@ -7144,31 +9755,33 @@ pub const DS_VERSION_ERROR: NIM_DownloadState = 8;
pub const DS_CREATE_CONTEXT: NIM_DownloadState = 9;
pub const DS_CANNOT_RECOVER: NIM_DownloadState = 10;
pub const DS_INVALID: NIM_DownloadState = 11;
-pub type NIM_DownloadState = u32;
+pub type NIM_DownloadState = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct NIM_TitleConfig {
- pub titleId: u64,
- pub version: u32,
- pub unknown_0: u32,
- pub ratingAge: u8,
- pub mediaType: u8,
- pub padding: [u8; 2usize],
- pub unknown_1: u32,
+ pub titleId: u64_,
+ pub version: u32_,
+ pub unknown_0: u32_,
+ pub ratingAge: u8_,
+ pub mediaType: u8_,
+ pub padding: [u8_; 2usize],
+ pub unknown_1: u32_,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct NIM_TitleProgress {
- pub state: u32,
+ pub state: u32_,
pub lastResult: Result,
- pub downloadedSize: u64,
- pub totalSize: u64,
+ pub downloadedSize: u64_,
+ pub totalSize: u64_,
}
extern "C" {
- pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: usize) -> Result;
+ pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result;
}
extern "C" {
pub fn nimsInitWithTIN(
buffer: *mut ::libc::c_void,
- buffer_len: usize,
+ buffer_len: size_t,
TIN: *const ::libc::c_char,
) -> Result;
}
@@ -7187,9 +9800,9 @@ extern "C" {
extern "C" {
pub fn NIMS_MakeTitleConfig(
cfg: *mut NIM_TitleConfig,
- titleId: u64,
- version: u32,
- ratingAge: u8,
+ titleId: u64_,
+ version: u32_,
+ ratingAge: u8_,
mediaType: FS_MediaType,
);
}
@@ -7201,10 +9814,10 @@ extern "C" {
) -> Result;
}
extern "C" {
- pub fn NIMS_IsTaskRegistered(titleId: u64, registered: *mut bool) -> Result;
+ pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result;
}
extern "C" {
- pub fn NIMS_UnregisterTask(titleId: u64) -> Result;
+ pub fn NIMS_UnregisterTask(titleId: u64_) -> Result;
}
extern "C" {
pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result;
@@ -7228,7 +9841,7 @@ extern "C" {
pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result;
}
extern "C" {
- pub fn iruInit(sharedmem_addr: *mut u32, sharedmem_size: u32) -> Result;
+ pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result;
}
extern "C" {
pub fn iruExit();
@@ -7237,14 +9850,14 @@ extern "C" {
pub fn iruGetServHandle() -> Handle;
}
extern "C" {
- pub fn iruSendData(buf: *mut u8, size: u32, wait: bool) -> Result;
+ pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result;
}
extern "C" {
pub fn iruRecvData(
- buf: *mut u8,
- size: u32,
- flag: u8,
- transfercount: *mut u32,
+ buf: *mut u8_,
+ size: u32_,
+ flag: u8_,
+ transfercount: *mut u32_,
wait: bool,
) -> Result;
}
@@ -7255,28 +9868,28 @@ extern "C" {
pub fn IRU_Shutdown() -> Result;
}
extern "C" {
- pub fn IRU_StartSendTransfer(buf: *mut u8, size: u32) -> Result;
+ pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result;
}
extern "C" {
pub fn IRU_WaitSendTransfer() -> Result;
}
extern "C" {
- pub fn IRU_StartRecvTransfer(size: u32, flag: u8) -> Result;
+ pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result;
}
extern "C" {
- pub fn IRU_WaitRecvTransfer(transfercount: *mut u32) -> Result;
+ pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result;
}
extern "C" {
- pub fn IRU_SetBitRate(value: u8) -> Result;
+ pub fn IRU_SetBitRate(value: u8_) -> Result;
}
extern "C" {
- pub fn IRU_GetBitRate(out: *mut u8) -> Result;
+ pub fn IRU_GetBitRate(out: *mut u8_) -> Result;
}
extern "C" {
- pub fn IRU_SetIRLEDState(value: u32) -> Result;
+ pub fn IRU_SetIRLEDState(value: u32_) -> Result;
}
extern "C" {
- pub fn IRU_GetIRLEDRecvState(out: *mut u32) -> Result;
+ pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result;
}
extern "C" {
pub fn nsInit() -> Result;
@@ -7285,55 +9898,116 @@ extern "C" {
pub fn nsExit();
}
extern "C" {
- pub fn NS_LaunchFIRM(titleid: u64) -> Result;
+ pub fn NS_LaunchFIRM(titleid: u64_) -> Result;
}
extern "C" {
- pub fn NS_LaunchTitle(titleid: u64, launch_flags: u32, procid: *mut u32) -> Result;
+ pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result;
}
extern "C" {
pub fn NS_TerminateTitle() -> Result;
}
extern "C" {
- pub fn NS_LaunchApplicationFIRM(titleid: u64, flags: u32) -> Result;
+ pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result;
}
extern "C" {
- pub fn NS_RebootToTitle(mediatype: u8, titleid: u64) -> Result;
+ pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result;
}
extern "C" {
- pub fn NS_TerminateProcessTID(titleid: u64, timeout: u64) -> Result;
+ pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result;
}
extern "C" {
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 type _bindgen_ty_26 = ::libc::c_uint;
+extern "C" {
+ pub fn pmAppInit() -> Result;
+}
+extern "C" {
+ pub fn pmAppExit();
+}
+extern "C" {
+ pub fn pmAppGetSessionHandle() -> *mut Handle;
+}
+extern "C" {
+ pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result;
+}
+extern "C" {
+ pub fn PMAPP_LaunchTitleUpdate(
+ programInfo: *const FS_ProgramInfo,
+ programInfoUpdate: *const FS_ProgramInfo,
+ launchFlags: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn PMAPP_GetTitleExheaderFlags(
+ outCoreInfo: *mut ExHeader_Arm11CoreInfo,
+ outSiFlags: *mut ExHeader_SystemInfoFlags,
+ programInfo: *const FS_ProgramInfo,
+ ) -> Result;
+}
+extern "C" {
+ pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result;
+}
+extern "C" {
+ pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result;
+}
+extern "C" {
+ pub fn PMAPP_LaunchFIRMSetParams(
+ firmTidLow: u32_,
+ size: u32_,
+ in_: *const ::libc::c_void,
+ ) -> Result;
+}
extern "C" {
- pub fn pmInit() -> Result;
+ pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result;
}
extern "C" {
- pub fn pmExit();
+ pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result;
}
extern "C" {
- pub fn PM_LaunchTitle(mediatype: u8, titleid: u64, launch_flags: u32) -> Result;
+ pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result;
}
extern "C" {
- pub fn PM_GetTitleExheaderFlags(mediatype: u8, titleid: u64, out: *mut u8) -> Result;
+ pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result;
}
extern "C" {
- pub fn PM_SetFIRMLaunchParams(size: u32, in_: *mut u8) -> Result;
+ pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result;
}
extern "C" {
- pub fn PM_GetFIRMLaunchParams(size: u32, out: *mut u8) -> Result;
+ pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result;
}
extern "C" {
- pub fn PM_LaunchFIRMSetParams(firm_titleid_low: u32, size: u32, in_: *mut u8) -> Result;
+ pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result;
}
extern "C" {
- pub fn PM_TerminateCurrentApplication(timeout: u64) -> Result;
+ pub fn pmDbgInit() -> Result;
}
extern "C" {
- pub fn PM_TerminateProcess(pid: u8, timeout: u64) -> Result;
+ pub fn pmDbgExit();
}
extern "C" {
- pub fn PM_UnregisterProcess(tid: u64) -> Result;
+ pub fn pmDbgGetSessionHandle() -> *mut Handle;
+}
+extern "C" {
+ pub fn PMDBG_LaunchAppDebug(
+ outDebug: *mut Handle,
+ programInfo: *const FS_ProgramInfo,
+ launchFlags: u32_,
+ ) -> Result;
+}
+extern "C" {
+ pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result;
+}
+extern "C" {
+ pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result;
}
pub const PS_ALGORITHM_CBC_ENC: PS_AESAlgorithm = 0;
pub const PS_ALGORITHM_CBC_DEC: PS_AESAlgorithm = 1;
@@ -7341,7 +10015,7 @@ pub const PS_ALGORITHM_CTR_ENC: PS_AESAlgorithm = 2;
pub const PS_ALGORITHM_CTR_DEC: PS_AESAlgorithm = 3;
pub const PS_ALGORITHM_CCM_ENC: PS_AESAlgorithm = 4;
pub const PS_ALGORITHM_CCM_DEC: PS_AESAlgorithm = 5;
-pub type PS_AESAlgorithm = u32;
+pub type PS_AESAlgorithm = ::libc::c_uint;
pub const PS_KEYSLOT_0D: PS_AESKeyType = 0;
pub const PS_KEYSLOT_2D: PS_AESKeyType = 1;
pub const PS_KEYSLOT_31: PS_AESKeyType = 2;
@@ -7352,13 +10026,19 @@ pub const PS_KEYSLOT_2E: PS_AESKeyType = 6;
pub const PS_KEYSLOT_INVALID: PS_AESKeyType = 7;
pub const PS_KEYSLOT_36: PS_AESKeyType = 8;
pub const PS_KEYSLOT_39_NFC: PS_AESKeyType = 9;
-pub type PS_AESKeyType = u32;
+pub type PS_AESKeyType = ::libc::c_uint;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct psRSAContext {
- pub modulo: [u8; 256usize],
- pub exponent: [u8; 256usize],
- pub rsa_bitsize: u32,
- pub unk: u32,
+ pub modulo: [u8_; 256usize],
+ pub exponent: [u8_; 256usize],
+ pub rsa_bitsize: u32_,
+ pub unk: u32_,
+}
+impl Default for psRSAContext {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub fn psInit() -> Result;
@@ -7373,43 +10053,47 @@ extern "C" {
pub fn psGetSessionHandle() -> Handle;
}
extern "C" {
- pub fn PS_SignRsaSha256(hash: *mut u8, ctx: *mut psRSAContext, signature: *mut u8) -> Result;
+ pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result;
}
extern "C" {
- pub fn PS_VerifyRsaSha256(hash: *mut u8, ctx: *mut psRSAContext, signature: *mut u8) -> Result;
+ pub fn PS_VerifyRsaSha256(
+ hash: *mut u8_,
+ ctx: *mut psRSAContext,
+ signature: *mut u8_,
+ ) -> Result;
}
extern "C" {
pub fn PS_EncryptDecryptAes(
- size: u32,
- in_: *mut u8,
- out: *mut u8,
+ size: u32_,
+ in_: *mut u8_,
+ out: *mut u8_,
aes_algo: PS_AESAlgorithm,
key_type: PS_AESKeyType,
- iv: *mut u8,
+ iv: *mut u8_,
) -> Result;
}
extern "C" {
pub fn PS_EncryptSignDecryptVerifyAesCcm(
- in_: *mut u8,
- in_size: u32,
- out: *mut u8,
- out_size: u32,
- data_len: u32,
- mac_data_len: u32,
- mac_len: u32,
+ in_: *mut u8_,
+ in_size: u32_,
+ out: *mut u8_,
+ out_size: u32_,
+ data_len: u32_,
+ mac_data_len: u32_,
+ mac_len: u32_,
aes_algo: PS_AESAlgorithm,
key_type: PS_AESKeyType,
- nonce: *mut u8,
+ nonce: *mut u8_,
) -> Result;
}
extern "C" {
- pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64) -> Result;
+ pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result;
}
extern "C" {
- pub fn PS_GetDeviceId(device_id: *mut u32) -> Result;
+ pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result;
}
extern "C" {
- pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: usize) -> Result;
+ pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result;
}
extern "C" {
pub fn ptmuInit() -> Result;
@@ -7418,23 +10102,46 @@ extern "C" {
pub fn ptmuExit();
}
extern "C" {
- pub fn PTMU_GetShellState(out: *mut u8) -> Result;
+ pub fn PTMU_GetShellState(out: *mut u8_) -> Result;
}
extern "C" {
- pub fn PTMU_GetBatteryLevel(out: *mut u8) -> Result;
+ pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result;
}
extern "C" {
- pub fn PTMU_GetBatteryChargeState(out: *mut u8) -> Result;
+ pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result;
}
extern "C" {
- pub fn PTMU_GetPedometerState(out: *mut u8) -> Result;
+ pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result;
}
extern "C" {
- pub fn PTMU_GetTotalStepCount(steps: *mut u32) -> Result;
+ pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result;
}
extern "C" {
pub fn PTMU_GetAdapterState(out: *mut bool) -> Result;
}
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct PtmWakeEvents {
+ pub pdn_wake_events: u32_,
+ pub mcu_interupt_mask: u32_,
+}
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+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 type _bindgen_ty_27 = ::libc::c_uint;
extern "C" {
pub fn ptmSysmInit() -> Result;
}
@@ -7442,32 +10149,65 @@ extern "C" {
pub fn ptmSysmExit();
}
extern "C" {
+ pub fn PTMSYSM_RequestSleep() -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_Awaken() -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_InvalidateSystemTime() -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result;
+}
+extern "C" {
+ pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result;
+}
+extern "C" {
pub fn PTMSYSM_CheckNew3DS() -> Result;
}
extern "C" {
- pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8) -> Result;
+ pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result;
}
extern "C" {
- pub fn PTMSYSM_ShutdownAsync(timeout: u64) -> Result;
+ pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result;
}
extern "C" {
- pub fn PTMSYSM_RebootAsync(timeout: u64) -> Result;
+ pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result;
}
pub const WAIT_NONE: PXIDEV_WaitType = 0;
pub const WAIT_SLEEP: PXIDEV_WaitType = 1;
pub const WAIT_IREQ_RETURN: PXIDEV_WaitType = 2;
pub const WAIT_IREQ_CONTINUE: PXIDEV_WaitType = 3;
-pub type PXIDEV_WaitType = u32;
+pub type PXIDEV_WaitType = ::libc::c_uint;
pub const DEASSERT_NONE: PXIDEV_DeassertType = 0;
pub const DEASSERT_BEFORE_WAIT: PXIDEV_DeassertType = 1;
pub const DEASSERT_AFTER_WAIT: PXIDEV_DeassertType = 2;
-pub type PXIDEV_DeassertType = u32;
+pub type PXIDEV_DeassertType = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct PXIDEV_SPIBuffer {
pub ptr: *mut ::libc::c_void,
- pub size: u32,
- pub transferOption: u8,
- pub waitOperation: u64,
+ pub size: u32_,
+ pub transferOption: u8_,
+ pub waitOperation: u64_,
+}
+impl Default for PXIDEV_SPIBuffer {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub fn pxiDevInit() -> Result;
@@ -7487,31 +10227,54 @@ extern "C" {
}
extern "C" {
pub fn PXIDEV_SPIWriteRead(
- bytesRead: *mut u32,
- initialWaitOperation: u64,
+ bytesRead: *mut u32_,
+ initialWaitOperation: u64_,
writeBuffer: *mut PXIDEV_SPIBuffer,
readBuffer: *mut PXIDEV_SPIBuffer,
) -> Result;
}
+extern "C" {
+ pub fn pxiPmInit() -> Result;
+}
+extern "C" {
+ pub fn pxiPmExit();
+}
+extern "C" {
+ pub fn pxiPmGetSessionHandle() -> *mut Handle;
+}
+extern "C" {
+ pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result;
+}
+extern "C" {
+ pub fn PXIPM_RegisterProgram(
+ programHandle: *mut u64_,
+ programInfo: *const FS_ProgramInfo,
+ updateInfo: *const FS_ProgramInfo,
+ ) -> Result;
+}
+extern "C" {
+ pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result;
+}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct timezone {
pub tz_minuteswest: ::libc::c_int,
pub tz_dsttime: ::libc::c_int,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct bintime {
pub sec: time_t,
pub frac: u64,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct itimerval {
pub it_interval: timeval,
pub it_value: timeval,
}
pub type __ULong = ::libc::c_ulong;
+pub type _flock_t = _LOCK_RECURSIVE_T;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_t {
@@ -7527,8 +10290,13 @@ pub struct _Bigint {
pub _wds: ::libc::c_int,
pub _x: [__ULong; 1usize],
}
+impl Default for _Bigint {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct __tm {
pub __tm_sec: ::libc::c_int,
pub __tm_min: ::libc::c_int,
@@ -7548,6 +10316,11 @@ pub struct _on_exit_args {
pub _fntypes: __ULong,
pub _is_cxa: __ULong,
}
+impl Default for _on_exit_args {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _atexit {
@@ -7556,12 +10329,22 @@ pub struct _atexit {
pub _fns: [::core::option::Option<unsafe extern "C" fn()>; 32usize],
pub _on_exit_args: _on_exit_args,
}
+impl Default for _atexit {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sbuf {
pub _base: *mut ::libc::c_uchar,
pub _size: ::libc::c_int,
}
+impl Default for __sbuf {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sFILE {
@@ -7613,6 +10396,11 @@ pub struct __sFILE {
pub _mbstate: _mbstate_t,
pub _flags2: ::libc::c_int,
}
+impl Default for __sFILE {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub type __FILE = __sFILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@@ -7621,8 +10409,13 @@ pub struct _glue {
pub _niobs: ::libc::c_int,
pub _iobs: *mut __FILE,
}
+impl Default for _glue {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct _rand48 {
pub _seed: [::libc::c_ushort; 3usize],
pub _mult: [::libc::c_ushort; 3usize],
@@ -7685,17 +10478,37 @@ pub struct _reent__bindgen_ty_1__bindgen_ty_1 {
pub _wcsrtombs_state: _mbstate_t,
pub _h_errno: ::libc::c_int,
}
+impl Default for _reent__bindgen_ty_1__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _reent__bindgen_ty_1__bindgen_ty_2 {
pub _nextf: [*mut ::libc::c_uchar; 30usize],
pub _nmalloc: [::libc::c_uint; 30usize],
}
+impl Default for _reent__bindgen_ty_1__bindgen_ty_2 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for _reent__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for _reent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
extern "C" {
pub static mut _impure_ptr: *mut _reent;
}
extern "C" {
- pub static mut _global_impure_ptr: *const _reent;
+ pub static _global_impure_ptr: *mut _reent;
}
extern "C" {
pub fn _reclaim_reent(arg1: *mut _reent);
@@ -7705,7 +10518,7 @@ extern "C" {
}
pub type locale_t = *mut __locale_t;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct tm {
pub tm_sec: ::libc::c_int,
pub tm_min: ::libc::c_int,
@@ -7744,19 +10557,19 @@ extern "C" {
extern "C" {
pub fn strftime(
_s: *mut ::libc::c_char,
- _maxsize: usize,
+ _maxsize: size_t,
_fmt: *const ::libc::c_char,
_t: *const tm,
- ) -> usize;
+ ) -> size_t;
}
extern "C" {
pub fn strftime_l(
_s: *mut ::libc::c_char,
- _maxsize: usize,
+ _maxsize: size_t,
_fmt: *const ::libc::c_char,
_t: *const tm,
_l: locale_t,
- ) -> usize;
+ ) -> size_t;
}
extern "C" {
pub fn asctime_r(arg1: *const tm, arg2: *mut ::libc::c_char) -> *mut ::libc::c_char;
@@ -7777,7 +10590,7 @@ extern "C" {
pub fn _tzset_r(arg1: *mut _reent);
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct __tzrule_struct {
pub ch: ::libc::c_char,
pub m: ::libc::c_int,
@@ -7789,7 +10602,7 @@ pub struct __tzrule_struct {
}
pub type __tzrule_type = __tzrule_struct;
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct __tzinfo_struct {
pub __tznorth: ::libc::c_int,
pub __tzyear: ::libc::c_int,
@@ -7808,6 +10621,189 @@ extern "C" {
extern "C" {
pub static mut _tzname: [*mut ::libc::c_char; 2usize];
}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union sigval {
+ pub sival_int: ::libc::c_int,
+ pub sival_ptr: *mut ::libc::c_void,
+ _bindgen_union_align: u32,
+}
+impl Default for sigval {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct sigevent {
+ pub sigev_notify: ::libc::c_int,
+ pub sigev_signo: ::libc::c_int,
+ pub sigev_value: sigval,
+}
+impl Default for sigevent {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct siginfo_t {
+ pub si_signo: ::libc::c_int,
+ pub si_code: ::libc::c_int,
+ pub si_value: sigval,
+}
+impl Default for siginfo_t {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+pub type _sig_func_ptr = ::core::option::Option<unsafe extern "C" fn(arg1: ::libc::c_int)>;
+#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct sigaction {
+ pub sa_handler: _sig_func_ptr,
+ pub sa_mask: sigset_t,
+ pub sa_flags: ::libc::c_int,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct sigaltstack {
+ pub ss_sp: *mut ::libc::c_void,
+ pub ss_flags: ::libc::c_int,
+ pub ss_size: size_t,
+}
+impl Default for sigaltstack {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+pub type stack_t = sigaltstack;
+extern "C" {
+ pub fn sigprocmask(
+ arg1: ::libc::c_int,
+ arg2: *const sigset_t,
+ arg3: *mut sigset_t,
+ ) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn pthread_sigmask(
+ arg1: ::libc::c_int,
+ arg2: *const sigset_t,
+ arg3: *mut sigset_t,
+ ) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn kill(arg1: pid_t, arg2: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn killpg(arg1: pid_t, arg2: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigaction(
+ arg1: ::libc::c_int,
+ arg2: *const sigaction,
+ arg3: *mut sigaction,
+ ) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigaddset(arg1: *mut sigset_t, arg2: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigdelset(arg1: *mut sigset_t, arg2: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigismember(arg1: *const sigset_t, arg2: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigfillset(arg1: *mut sigset_t) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigemptyset(arg1: *mut sigset_t) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigpending(arg1: *mut sigset_t) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigsuspend(arg1: *const sigset_t) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigwait(arg1: *const sigset_t, arg2: *mut ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigpause(arg1: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigaltstack(arg1: *const stack_t, arg2: *mut stack_t) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn pthread_kill(arg1: pthread_t, arg2: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigwaitinfo(arg1: *const sigset_t, arg2: *mut siginfo_t) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigtimedwait(
+ arg1: *const sigset_t,
+ arg2: *mut siginfo_t,
+ arg3: *const timespec,
+ ) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn sigqueue(arg1: pid_t, arg2: ::libc::c_int, arg3: sigval) -> ::libc::c_int;
+}
+pub type sig_atomic_t = ::libc::c_int;
+pub type sig_t = _sig_func_ptr;
+extern "C" {
+ pub fn _signal_r(arg1: *mut _reent, arg2: ::libc::c_int, arg3: _sig_func_ptr) -> _sig_func_ptr;
+}
+extern "C" {
+ pub fn _raise_r(arg1: *mut _reent, arg2: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn signal(arg1: ::libc::c_int, arg2: _sig_func_ptr) -> _sig_func_ptr;
+}
+extern "C" {
+ pub fn raise(arg1: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn psignal(arg1: ::libc::c_int, arg2: *const ::libc::c_char);
+}
+extern "C" {
+ pub fn clock_settime(clock_id: clockid_t, tp: *const timespec) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn clock_gettime(clock_id: clockid_t, tp: *mut timespec) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn clock_getres(clock_id: clockid_t, res: *mut timespec) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn timer_create(
+ clock_id: clockid_t,
+ evp: *mut sigevent,
+ timerid: *mut timer_t,
+ ) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn timer_delete(timerid: timer_t) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn timer_settime(
+ timerid: timer_t,
+ flags: ::libc::c_int,
+ value: *const itimerspec,
+ ovalue: *mut itimerspec,
+ ) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn timer_getoverrun(timerid: timer_t) -> ::libc::c_int;
+}
+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;
}
@@ -7839,19 +10835,19 @@ extern "C" {
pub type socklen_t = u32;
pub type sa_family_t = u16;
#[repr(C)]
-#[derive(Debug)]
+#[derive(Debug, Default)]
pub struct sockaddr {
pub sa_family: sa_family_t,
pub sa_data: __IncompleteArrayField<::libc::c_char>,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct sockaddr_storage {
pub ss_family: sa_family_t,
pub __ss_padding: [::libc::c_char; 26usize],
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct linger {
pub l_onoff: ::libc::c_int,
pub l_linger: ::libc::c_int,
@@ -7906,37 +10902,37 @@ extern "C" {
pub fn recv(
sockfd: ::libc::c_int,
buf: *mut ::libc::c_void,
- len: usize,
+ len: size_t,
flags: ::libc::c_int,
- ) -> isize;
+ ) -> ssize_t;
}
extern "C" {
pub fn recvfrom(
sockfd: ::libc::c_int,
buf: *mut ::libc::c_void,
- len: usize,
+ len: size_t,
flags: ::libc::c_int,
src_addr: *mut sockaddr,
addrlen: *mut socklen_t,
- ) -> isize;
+ ) -> ssize_t;
}
extern "C" {
pub fn send(
sockfd: ::libc::c_int,
buf: *const ::libc::c_void,
- len: usize,
+ len: size_t,
flags: ::libc::c_int,
- ) -> isize;
+ ) -> ssize_t;
}
extern "C" {
pub fn sendto(
sockfd: ::libc::c_int,
buf: *const ::libc::c_void,
- len: usize,
+ len: size_t,
flags: ::libc::c_int,
dest_addr: *const sockaddr,
addrlen: socklen_t,
- ) -> isize;
+ ) -> ssize_t;
}
extern "C" {
pub fn setsockopt(
@@ -7961,12 +10957,12 @@ extern "C" {
pub fn sockatmark(sockfd: ::libc::c_int) -> ::libc::c_int;
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct in_addr {
pub s_addr: in_addr_t,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct sockaddr_in {
pub sin_family: sa_family_t,
pub sin_port: in_port_t,
@@ -7974,7 +10970,7 @@ pub struct sockaddr_in {
pub sin_zero: [::libc::c_uchar; 8usize],
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ip_mreq {
pub imr_multiaddr: in_addr,
pub imr_interface: in_addr,
@@ -7990,49 +10986,53 @@ pub const NETOPT_TCP_NUMBER: NetworkOpt = 36866;
pub const NETOPT_TCP_TABLE: NetworkOpt = 36867;
pub const NETOPT_DNS_TABLE: NetworkOpt = 45059;
pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153;
-pub type NetworkOpt = u32;
+pub type NetworkOpt = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_ARPTableEntry {
- pub unk0: u32,
+ pub unk0: u32_,
pub ip: in_addr,
- pub mac: [u8; 6usize],
- pub padding: [u8; 2usize],
+ pub mac: [u8_; 6usize],
+ pub padding: [u8_; 2usize],
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_IPInfo {
pub ip: in_addr,
pub netmask: in_addr,
pub broadcast: in_addr,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_RoutingTableEntry {
pub dest_ip: in_addr,
pub netmask: in_addr,
pub gateway: in_addr,
- pub flags: u32,
- pub time: u64,
+ pub flags: u32_,
+ pub time: u64_,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_UDPTableEntry {
pub local: sockaddr_storage,
pub remote: sockaddr_storage,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_TCPTableEntry {
- pub state: u32,
+ pub state: u32_,
pub local: sockaddr_storage,
pub remote: sockaddr_storage,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_DNSTableEntry {
- pub family: u32,
+ pub family: u32_,
pub ip: in_addr,
- pub padding: [u8; 12usize],
+ pub padding: [u8_; 12usize],
}
extern "C" {
- pub fn socInit(context_addr: *mut u32, context_size: u32) -> Result;
+ pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result;
}
extern "C" {
pub fn socExit() -> Result;
@@ -8041,7 +11041,7 @@ extern "C" {
pub fn gethostid() -> ::libc::c_long;
}
extern "C" {
- pub fn gethostname(name: *mut ::libc::c_char, namelen: usize) -> ::libc::c_int;
+ pub fn gethostname(name: *mut ::libc::c_char, namelen: size_t) -> ::libc::c_int;
}
extern "C" {
pub fn SOCU_ShutdownSockets() -> ::libc::c_int;
@@ -8071,26 +11071,26 @@ pub const MICU_ENCODING_PCM8: MICU_Encoding = 0;
pub const MICU_ENCODING_PCM16: MICU_Encoding = 1;
pub const MICU_ENCODING_PCM8_SIGNED: MICU_Encoding = 2;
pub const MICU_ENCODING_PCM16_SIGNED: MICU_Encoding = 3;
-pub type MICU_Encoding = u32;
+pub type MICU_Encoding = ::libc::c_uint;
pub const MICU_SAMPLE_RATE_32730: MICU_SampleRate = 0;
pub const MICU_SAMPLE_RATE_16360: MICU_SampleRate = 1;
pub const MICU_SAMPLE_RATE_10910: MICU_SampleRate = 2;
pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3;
-pub type MICU_SampleRate = u32;
+pub type MICU_SampleRate = ::libc::c_uint;
extern "C" {
- pub fn micInit(buffer: *mut u8, bufferSize: u32) -> Result;
+ pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result;
}
extern "C" {
pub fn micExit();
}
extern "C" {
- pub fn micGetSampleDataSize() -> u32;
+ pub fn micGetSampleDataSize() -> u32_;
}
extern "C" {
- pub fn micGetLastSampleOffset() -> u32;
+ pub fn micGetLastSampleOffset() -> u32_;
}
extern "C" {
- pub fn MICU_MapSharedMem(size: u32, handle: Handle) -> Result;
+ pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn MICU_UnmapSharedMem() -> Result;
@@ -8099,8 +11099,8 @@ extern "C" {
pub fn MICU_StartSampling(
encoding: MICU_Encoding,
sampleRate: MICU_SampleRate,
- offset: u32,
- size: u32,
+ offset: u32_,
+ size: u32_,
loop_: bool,
) -> Result;
}
@@ -8117,10 +11117,10 @@ extern "C" {
pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result;
}
extern "C" {
- pub fn MICU_SetGain(gain: u8) -> Result;
+ pub fn MICU_SetGain(gain: u8_) -> Result;
}
extern "C" {
- pub fn MICU_GetGain(gain: *mut u8) -> Result;
+ pub fn MICU_GetGain(gain: *mut u8_) -> Result;
}
extern "C" {
pub fn MICU_SetPower(power: bool) -> Result;
@@ -8139,51 +11139,58 @@ extern "C" {
}
pub const MVDMODE_COLORFORMATCONV: MVDSTD_Mode = 0;
pub const MVDMODE_VIDEOPROCESSING: MVDSTD_Mode = 1;
-pub type MVDSTD_Mode = u32;
+pub type MVDSTD_Mode = ::libc::c_uint;
pub const MVD_INPUT_YUYV422: MVDSTD_InputFormat = 65537;
pub const MVD_INPUT_H264: MVDSTD_InputFormat = 131073;
-pub type MVDSTD_InputFormat = u32;
+pub type MVDSTD_InputFormat = ::libc::c_uint;
pub const MVD_OUTPUT_YUYV422: MVDSTD_OutputFormat = 65537;
pub const MVD_OUTPUT_BGR565: MVDSTD_OutputFormat = 262146;
pub const MVD_OUTPUT_RGB565: MVDSTD_OutputFormat = 262148;
-pub type MVDSTD_OutputFormat = u32;
+pub type MVDSTD_OutputFormat = ::libc::c_uint;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct MVDSTD_Config {
pub input_type: MVDSTD_InputFormat,
- pub unk_x04: u32,
- pub unk_x08: u32,
- pub inwidth: u32,
- pub inheight: u32,
- pub physaddr_colorconv_indata: u32,
- pub physaddr_colorconv_unk0: u32,
- pub physaddr_colorconv_unk1: u32,
- pub physaddr_colorconv_unk2: u32,
- pub physaddr_colorconv_unk3: u32,
- pub unk_x28: [u32; 6usize],
- pub enable_cropping: u32,
- pub input_crop_x_pos: u32,
- pub input_crop_y_pos: u32,
- pub input_crop_height: u32,
- pub input_crop_width: u32,
- pub unk_x54: u32,
+ pub unk_x04: u32_,
+ pub unk_x08: u32_,
+ pub inwidth: u32_,
+ pub inheight: u32_,
+ pub physaddr_colorconv_indata: u32_,
+ pub physaddr_colorconv_unk0: u32_,
+ pub physaddr_colorconv_unk1: u32_,
+ pub physaddr_colorconv_unk2: u32_,
+ pub physaddr_colorconv_unk3: u32_,
+ pub unk_x28: [u32_; 6usize],
+ pub enable_cropping: u32_,
+ pub input_crop_x_pos: u32_,
+ pub input_crop_y_pos: u32_,
+ pub input_crop_height: u32_,
+ pub input_crop_width: u32_,
+ pub unk_x54: u32_,
pub output_type: MVDSTD_OutputFormat,
- pub outwidth: u32,
- pub outheight: u32,
- pub physaddr_outdata0: u32,
- pub physaddr_outdata1: u32,
- pub unk_x6c: [u32; 38usize],
- pub flag_x104: u32,
- pub output_x_pos: u32,
- pub output_y_pos: u32,
- pub output_width_override: u32,
- pub output_height_override: u32,
- pub unk_x118: u32,
+ pub outwidth: u32_,
+ pub outheight: u32_,
+ pub physaddr_outdata0: u32_,
+ pub physaddr_outdata1: u32_,
+ pub unk_x6c: [u32_; 38usize],
+ pub flag_x104: u32_,
+ pub output_x_pos: u32_,
+ pub output_y_pos: u32_,
+ pub output_width_override: u32_,
+ pub output_height_override: u32_,
+ pub unk_x118: u32_,
+}
+impl Default for MVDSTD_Config {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct MVDSTD_ProcessNALUnitOut {
- pub end_vaddr: u32,
- pub end_physaddr: u32,
- pub remaining_size: u32,
+ pub end_vaddr: u32_,
+ pub end_physaddr: u32_,
+ pub remaining_size: u32_,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@@ -8191,25 +11198,37 @@ pub struct MVDSTD_OutputBuffersEntry {
pub outdata0: *mut ::libc::c_void,
pub outdata1: *mut ::libc::c_void,
}
+impl Default for MVDSTD_OutputBuffersEntry {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct MVDSTD_OutputBuffersEntryList {
- pub total_entries: u32,
+ pub total_entries: u32_,
pub entries: [MVDSTD_OutputBuffersEntry; 17usize],
}
+impl Default for MVDSTD_OutputBuffersEntryList {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct MVDSTD_InitStruct {
pub cmd5_inval0: s8,
pub cmd5_inval1: s8,
pub cmd5_inval2: s8,
- pub cmd5_inval3: u32,
- pub cmd1b_inval: u8,
+ pub cmd5_inval3: u32_,
+ pub cmd1b_inval: u8_,
}
extern "C" {
pub fn mvdstdInit(
mode: MVDSTD_Mode,
input_type: MVDSTD_InputFormat,
output_type: MVDSTD_OutputFormat,
- size: u32,
+ size: u32_,
initstruct: *mut MVDSTD_InitStruct,
) -> Result;
}
@@ -8219,13 +11238,13 @@ extern "C" {
extern "C" {
pub fn mvdstdGenerateDefaultConfig(
config: *mut MVDSTD_Config,
- input_width: u32,
- input_height: u32,
- output_width: u32,
- output_height: u32,
- vaddr_colorconv_indata: *mut u32,
- vaddr_outdata0: *mut u32,
- vaddr_outdata1: *mut u32,
+ input_width: u32_,
+ input_height: u32_,
+ output_width: u32_,
+ output_height: u32_,
+ vaddr_colorconv_indata: *mut u32_,
+ vaddr_outdata0: *mut u32_,
+ vaddr_outdata1: *mut u32_,
);
}
extern "C" {
@@ -8234,8 +11253,8 @@ extern "C" {
extern "C" {
pub fn mvdstdProcessVideoFrame(
inbuf_vaddr: *mut ::libc::c_void,
- size: usize,
- flag: u32,
+ size: size_t,
+ flag: u32_,
out: *mut MVDSTD_ProcessNALUnitOut,
) -> Result;
}
@@ -8248,7 +11267,7 @@ extern "C" {
extern "C" {
pub fn mvdstdSetupOutputBuffers(
entrylist: *mut MVDSTD_OutputBuffersEntryList,
- bufsize: u32,
+ bufsize: u32_,
) -> Result;
}
extern "C" {
@@ -8262,59 +11281,84 @@ extern "C" {
pub const NFC_OpType_1: NFC_OpType = 1;
pub const NFC_OpType_NFCTag: NFC_OpType = 2;
pub const NFC_OpType_RawNFC: NFC_OpType = 3;
-pub type NFC_OpType = u32;
+pub type NFC_OpType = ::libc::c_uint;
pub const NFC_TagState_Uninitialized: NFC_TagState = 0;
pub const NFC_TagState_ScanningStopped: NFC_TagState = 1;
pub const NFC_TagState_Scanning: NFC_TagState = 2;
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 = u32;
-pub const NFC_amiiboFlag_Setup: _bindgen_ty_24 = 16;
-pub const NFC_amiiboFlag_AppDataSetup: _bindgen_ty_24 = 32;
-pub type _bindgen_ty_24 = u32;
+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 type _bindgen_ty_28 = ::libc::c_uint;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct NFC_TagInfo {
- pub id_offset_size: u16,
- pub unk_x2: u8,
- pub unk_x3: u8,
- pub id: [u8; 40usize],
+ pub id_offset_size: u16_,
+ pub unk_x2: u8_,
+ pub unk_x3: u8_,
+ pub id: [u8_; 40usize],
+}
+impl Default for NFC_TagInfo {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct NFC_AmiiboSettings {
- pub mii: [u8; 96usize],
- pub nickname: [u16; 11usize],
- pub flags: u8,
- pub countrycodeid: u8,
- pub setupdate_year: u16,
- pub setupdate_month: u8,
- pub setupdate_day: u8,
- pub unk_x7c: [u8; 44usize],
+ pub mii: [u8_; 96usize],
+ pub nickname: [u16_; 11usize],
+ pub flags: u8_,
+ pub countrycodeid: u8_,
+ pub setupdate_year: u16_,
+ pub setupdate_month: u8_,
+ pub setupdate_day: u8_,
+ pub unk_x7c: [u8_; 44usize],
+}
+impl Default for NFC_AmiiboSettings {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct NFC_AmiiboConfig {
- pub lastwritedate_year: u16,
- pub lastwritedate_month: u8,
- pub lastwritedate_day: u8,
- pub write_counter: u16,
- pub characterID: [u8; 3usize],
- pub series: u8,
- pub amiiboID: u16,
- pub type_: u8,
- pub pagex4_byte3: u8,
- pub appdata_size: u16,
- pub zeros: [u8; 48usize],
+ pub lastwritedate_year: u16_,
+ pub lastwritedate_month: u8_,
+ pub lastwritedate_day: u8_,
+ pub write_counter: u16_,
+ pub characterID: [u8_; 3usize],
+ pub series: u8_,
+ pub amiiboID: u16_,
+ pub type_: u8_,
+ pub pagex4_byte3: u8_,
+ pub appdata_size: u16_,
+ pub zeros: [u8_; 48usize],
+}
+impl Default for NFC_AmiiboConfig {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct NFC_AppDataInitStruct {
- pub data_x0: [u8; 12usize],
- pub data_xc: [u8; 48usize],
+ pub data_x0: [u8_; 12usize],
+ pub data_xc: [u8_; 48usize],
+}
+impl Default for NFC_AppDataInitStruct {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct NFC_AppDataWriteStruct {
- pub id: [u8; 10usize],
- pub id_size: u8,
- pub unused_xb: [u8; 21usize],
+ pub id: [u8_; 10usize],
+ pub id_size: u8_,
+ pub unused_xb: [u8_; 21usize],
}
extern "C" {
pub fn nfcInit(type_: NFC_OpType) -> Result;
@@ -8326,7 +11370,7 @@ extern "C" {
pub fn nfcGetSessionHandle() -> Handle;
}
extern "C" {
- pub fn nfcStartScanning(inval: u16) -> Result;
+ pub fn nfcStartScanning(inval: u16_) -> Result;
}
extern "C" {
pub fn nfcStopScanning();
@@ -8347,22 +11391,22 @@ extern "C" {
pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result;
}
extern "C" {
- pub fn nfcOpenAppData(amiibo_appid: u32) -> Result;
+ pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result;
}
extern "C" {
pub fn nfcInitializeWriteAppData(
- amiibo_appid: u32,
+ amiibo_appid: u32_,
buf: *const ::libc::c_void,
- size: usize,
+ size: size_t,
) -> Result;
}
extern "C" {
- pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: usize) -> Result;
+ pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result;
}
extern "C" {
pub fn nfcWriteAppData(
buf: *const ::libc::c_void,
- size: usize,
+ size: size_t,
taginfo: *mut NFC_TagInfo,
) -> Result;
}
@@ -8373,16 +11417,16 @@ extern "C" {
pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result;
}
extern "C" {
- pub fn nfcStartOtherTagScanning(unk0: u16, unk1: u32) -> Result;
+ pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result;
}
extern "C" {
pub fn nfcSendTagCommand(
inbuf: *const ::libc::c_void,
- insize: usize,
+ insize: size_t,
outbuf: *mut ::libc::c_void,
- outsize: usize,
- actual_transfer_size: *mut usize,
- microseconds: u64,
+ outsize: size_t,
+ actual_transfer_size: *mut size_t,
+ microseconds: u64_,
) -> Result;
}
extern "C" {
@@ -8392,19 +11436,20 @@ extern "C" {
pub fn nfcCmd22() -> Result;
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct NotificationHeader {
pub dataSet: bool,
pub unread: bool,
pub enableJPEG: bool,
pub isSpotPass: bool,
pub isOptedOut: bool,
- pub unkData: [u8; 3usize],
- pub processID: u64,
- pub unkData2: [u8; 8usize],
- pub jumpParam: u64,
- pub unkData3: [u8; 8usize],
- pub time: u64,
- pub title: [u16; 32usize],
+ pub unkData: [u8_; 3usize],
+ pub processID: u64_,
+ pub unkData2: [u8_; 8usize],
+ pub jumpParam: u64_,
+ pub unkData3: [u8_; 8usize],
+ pub time: u64_,
+ pub title: [u16_; 32usize],
}
extern "C" {
pub fn newsInit() -> Result;
@@ -8414,57 +11459,62 @@ extern "C" {
}
extern "C" {
pub fn NEWS_AddNotification(
- title: *const u16,
- titleLength: u32,
- message: *const u16,
- messageLength: u32,
+ title: *const u16_,
+ titleLength: u32_,
+ message: *const u16_,
+ messageLength: u32_,
imageData: *const ::libc::c_void,
- imageSize: u32,
+ imageSize: u32_,
jpeg: bool,
) -> Result;
}
extern "C" {
- pub fn NEWS_GetTotalNotifications(num: *mut u32) -> Result;
+ pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result;
}
extern "C" {
- pub fn NEWS_SetNotificationHeader(news_id: u32, header: *const NotificationHeader) -> Result;
+ pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result;
}
extern "C" {
- pub fn NEWS_GetNotificationHeader(news_id: u32, header: *mut NotificationHeader) -> Result;
+ pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result;
}
extern "C" {
- pub fn NEWS_SetNotificationMessage(news_id: u32, message: *const u16, size: u32) -> Result;
+ pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result;
}
extern "C" {
- pub fn NEWS_GetNotificationMessage(news_id: u32, message: *mut u16, size: *mut u32) -> Result;
+ pub fn NEWS_GetNotificationMessage(
+ news_id: u32_,
+ message: *mut u16_,
+ size: *mut u32_,
+ ) -> Result;
}
extern "C" {
pub fn NEWS_SetNotificationImage(
- news_id: u32,
+ news_id: u32_,
buffer: *const ::libc::c_void,
- size: u32,
+ size: u32_,
) -> Result;
}
extern "C" {
pub fn NEWS_GetNotificationImage(
- news_id: u32,
+ news_id: u32_,
buffer: *mut ::libc::c_void,
- size: *mut u32,
+ size: *mut u32_,
) -> Result;
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct QTM_HeadTrackingInfoCoord {
pub x: f32,
pub y: f32,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct QTM_HeadTrackingInfo {
- pub flags: [u8; 5usize],
- pub padding: [u8; 3usize],
+ pub flags: [u8_; 5usize],
+ pub padding: [u8_; 3usize],
pub floatdata_x08: f32,
pub coords0: [QTM_HeadTrackingInfoCoord; 4usize],
- pub unk_x2c: [u32; 5usize],
+ pub unk_x2c: [u32_; 5usize],
}
extern "C" {
pub fn qtmInit() -> Result;
@@ -8483,12 +11533,12 @@ extern "C" {
coord: *mut QTM_HeadTrackingInfoCoord,
screen_width: *mut f32,
screen_height: *mut f32,
- x: *mut u32,
- y: *mut u32,
+ x: *mut u32_,
+ y: *mut u32_,
) -> Result;
}
extern "C" {
- pub fn QTM_GetHeadTrackingInfo(val: u64, out: *mut QTM_HeadTrackingInfo) -> Result;
+ pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result;
}
extern "C" {
pub fn srvPmInit() -> Result;
@@ -8500,20 +11550,20 @@ extern "C" {
pub fn srvPmGetSessionHandle() -> *mut Handle;
}
extern "C" {
- pub fn SRVPM_PublishToProcess(notificationId: u32, process: Handle) -> Result;
+ pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result;
}
extern "C" {
- pub fn SRVPM_PublishToAll(notificationId: u32) -> Result;
+ pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result;
}
extern "C" {
pub fn SRVPM_RegisterProcess(
- pid: u32,
- count: u32,
+ pid: u32_,
+ count: u32_,
serviceAccessControlList: *const [::libc::c_char; 8usize],
) -> Result;
}
extern "C" {
- pub fn SRVPM_UnregisterProcess(pid: u32) -> Result;
+ pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result;
}
extern "C" {
pub fn loaderInit() -> Result;
@@ -8522,22 +11572,20 @@ extern "C" {
pub fn loaderExit();
}
extern "C" {
- pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64) -> Result;
+ pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result;
}
extern "C" {
pub fn LOADER_RegisterProgram(
- programHandle: *mut u64,
- titleId: u64,
- mediaType: FS_MediaType,
- updateTitleId: u64,
- updateMediaType: FS_MediaType,
+ programHandle: *mut u64_,
+ programInfo: *const FS_ProgramInfo,
+ programInfoUpdate: *const FS_ProgramInfo,
) -> Result;
}
extern "C" {
- pub fn LOADER_UnregisterProgram(programHandle: u64) -> Result;
+ pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result;
}
extern "C" {
- pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64) -> Result;
+ pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result;
}
pub const LED_NORMAL: powerLedState = 1;
pub const LED_SLEEP_MODE: powerLedState = 2;
@@ -8545,7 +11593,7 @@ pub const LED_OFF: powerLedState = 3;
pub const LED_RED: powerLedState = 4;
pub const LED_BLUE: powerLedState = 5;
pub const LED_BLINK_RED: powerLedState = 6;
-pub type powerLedState = u32;
+pub type powerLedState = ::libc::c_uint;
extern "C" {
pub fn mcuHwcInit() -> Result;
}
@@ -8553,19 +11601,19 @@ extern "C" {
pub fn mcuHwcExit();
}
extern "C" {
- pub fn MCUHWC_ReadRegister(reg: u8, data: *mut ::libc::c_void, size: u32) -> Result;
+ pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn MCUHWC_WriteRegister(reg: u8, data: *const ::libc::c_void, size: u32) -> Result;
+ pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
- pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8) -> Result;
+ pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result;
}
extern "C" {
- pub fn MCUHWC_GetBatteryLevel(level: *mut u8) -> Result;
+ pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result;
}
extern "C" {
- pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8) -> Result;
+ pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result;
}
extern "C" {
pub fn MCUHWC_SetWifiLedState(state: bool) -> Result;
@@ -8574,80 +11622,67 @@ extern "C" {
pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result;
}
extern "C" {
- pub fn MCUHWC_Get3dSliderLevel(level: *mut u8) -> Result;
-}
-extern "C" {
- pub fn MCUHWC_GetFwVerHigh(out: *mut u8) -> Result;
-}
-extern "C" {
- pub fn MCUHWC_GetFwVerLow(out: *mut u8) -> Result;
+ pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result;
}
extern "C" {
- pub fn hbInit() -> Result;
-}
-extern "C" {
- pub fn hbExit();
-}
-extern "C" {
- pub fn HB_FlushInvalidateCache() -> Result;
-}
-extern "C" {
- pub fn HB_GetBootloaderAddresses(
- load3dsx: *mut *mut ::libc::c_void,
- setArgv: *mut *mut ::libc::c_void,
- ) -> Result;
+ pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result;
}
extern "C" {
- pub fn HB_ReprotectMemory(
- addr: *mut u32,
- pages: u32,
- mode: u32,
- reprotectedPages: *mut u32,
- ) -> Result;
+ pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result;
}
pub const GX_TRANSFER_FMT_RGBA8: GX_TRANSFER_FORMAT = 0;
pub const GX_TRANSFER_FMT_RGB8: GX_TRANSFER_FORMAT = 1;
pub const GX_TRANSFER_FMT_RGB565: GX_TRANSFER_FORMAT = 2;
pub const GX_TRANSFER_FMT_RGB5A1: GX_TRANSFER_FORMAT = 3;
pub const GX_TRANSFER_FMT_RGBA4: GX_TRANSFER_FORMAT = 4;
-pub type GX_TRANSFER_FORMAT = u32;
+pub type GX_TRANSFER_FORMAT = ::libc::c_uint;
pub const GX_TRANSFER_SCALE_NO: GX_TRANSFER_SCALE = 0;
pub const GX_TRANSFER_SCALE_X: GX_TRANSFER_SCALE = 1;
pub const GX_TRANSFER_SCALE_XY: GX_TRANSFER_SCALE = 2;
-pub type GX_TRANSFER_SCALE = u32;
+pub type GX_TRANSFER_SCALE = ::libc::c_uint;
pub const GX_FILL_TRIGGER: GX_FILL_CONTROL = 1;
pub const GX_FILL_FINISHED: GX_FILL_CONTROL = 2;
pub const GX_FILL_16BIT_DEPTH: GX_FILL_CONTROL = 0;
pub const GX_FILL_24BIT_DEPTH: GX_FILL_CONTROL = 256;
pub const GX_FILL_32BIT_DEPTH: GX_FILL_CONTROL = 512;
-pub type GX_FILL_CONTROL = u32;
-extern "C" {
- pub static mut gxCmdBuf: *mut u32;
-}
+pub type GX_FILL_CONTROL = ::libc::c_uint;
#[repr(C)]
-pub struct gxCmdEntry_s {
- pub data: __BindgenUnionField<[u32; 8usize]>,
- pub __bindgen_anon_1: __BindgenUnionField<gxCmdEntry_s__bindgen_ty_1>,
- pub bindgen_union_field: [u32; 8usize],
+#[derive(Copy, Clone)]
+pub union gxCmdEntry_s {
+ pub data: [u32_; 8usize],
+ pub __bindgen_anon_1: gxCmdEntry_s__bindgen_ty_1,
+ _bindgen_union_align: [u32; 8usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct gxCmdEntry_s__bindgen_ty_1 {
- pub type_: u8,
- pub unk1: u8,
- pub unk2: u8,
- pub unk3: u8,
- pub args: [u32; 7usize],
+ pub type_: u8_,
+ pub unk1: u8_,
+ pub unk2: u8_,
+ pub unk3: u8_,
+ pub args: [u32_; 7usize],
+}
+impl Default for gxCmdEntry_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct tag_gxCmdQueue_s {
pub entries: *mut gxCmdEntry_s,
- pub maxEntries: u16,
- pub numEntries: u16,
- pub curEntry: u16,
- pub lastEntry: u16,
+ pub maxEntries: u16_,
+ pub numEntries: u16_,
+ pub curEntry: u16_,
+ pub lastEntry: u16_,
pub callback: ::core::option::Option<unsafe extern "C" fn(arg1: *mut tag_gxCmdQueue_s)>,
pub user: *mut ::libc::c_void,
}
+impl Default for tag_gxCmdQueue_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub type gxCmdQueue_s = tag_gxCmdQueue_s;
extern "C" {
pub fn gxCmdQueueClear(queue: *mut gxCmdQueue_s);
@@ -8668,71 +11703,71 @@ extern "C" {
pub fn GX_BindQueue(queue: *mut gxCmdQueue_s);
}
extern "C" {
- pub fn GX_RequestDma(src: *mut u32, dst: *mut u32, length: u32) -> Result;
+ pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result;
}
extern "C" {
- pub fn GX_ProcessCommandList(buf0a: *mut u32, buf0s: u32, flags: u8) -> Result;
+ pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result;
}
extern "C" {
pub fn GX_MemoryFill(
- buf0a: *mut u32,
- buf0v: u32,
- buf0e: *mut u32,
- control0: u16,
- buf1a: *mut u32,
- buf1v: u32,
- buf1e: *mut u32,
- control1: u16,
+ buf0a: *mut u32_,
+ buf0v: u32_,
+ buf0e: *mut u32_,
+ control0: u16_,
+ buf1a: *mut u32_,
+ buf1v: u32_,
+ buf1e: *mut u32_,
+ control1: u16_,
) -> Result;
}
extern "C" {
pub fn GX_DisplayTransfer(
- inadr: *mut u32,
- indim: u32,
- outadr: *mut u32,
- outdim: u32,
- flags: u32,
+ inadr: *mut u32_,
+ indim: u32_,
+ outadr: *mut u32_,
+ outdim: u32_,
+ flags: u32_,
) -> Result;
}
extern "C" {
pub fn GX_TextureCopy(
- inadr: *mut u32,
- indim: u32,
- outadr: *mut u32,
- outdim: u32,
- size: u32,
- flags: u32,
+ inadr: *mut u32_,
+ indim: u32_,
+ outadr: *mut u32_,
+ outdim: u32_,
+ size: u32_,
+ flags: u32_,
) -> Result;
}
extern "C" {
pub fn GX_FlushCacheRegions(
- buf0a: *mut u32,
- buf0s: u32,
- buf1a: *mut u32,
- buf1s: u32,
- buf2a: *mut u32,
- buf2s: u32,
+ buf0a: *mut u32_,
+ buf0s: u32_,
+ buf1a: *mut u32_,
+ buf1s: u32_,
+ buf2a: *mut u32_,
+ buf2s: u32_,
) -> Result;
}
pub const GPU_NEAREST: GPU_TEXTURE_FILTER_PARAM = 0;
pub const GPU_LINEAR: GPU_TEXTURE_FILTER_PARAM = 1;
-pub type GPU_TEXTURE_FILTER_PARAM = u32;
+pub type GPU_TEXTURE_FILTER_PARAM = ::libc::c_uint;
pub const GPU_CLAMP_TO_EDGE: GPU_TEXTURE_WRAP_PARAM = 0;
pub const GPU_CLAMP_TO_BORDER: GPU_TEXTURE_WRAP_PARAM = 1;
pub const GPU_REPEAT: GPU_TEXTURE_WRAP_PARAM = 2;
pub const GPU_MIRRORED_REPEAT: GPU_TEXTURE_WRAP_PARAM = 3;
-pub type GPU_TEXTURE_WRAP_PARAM = u32;
+pub type GPU_TEXTURE_WRAP_PARAM = ::libc::c_uint;
pub const GPU_TEX_2D: GPU_TEXTURE_MODE_PARAM = 0;
pub const GPU_TEX_CUBE_MAP: GPU_TEXTURE_MODE_PARAM = 1;
pub const GPU_TEX_SHADOW_2D: GPU_TEXTURE_MODE_PARAM = 2;
pub const GPU_TEX_PROJECTION: GPU_TEXTURE_MODE_PARAM = 3;
pub const GPU_TEX_SHADOW_CUBE: GPU_TEXTURE_MODE_PARAM = 4;
pub const GPU_TEX_DISABLED: GPU_TEXTURE_MODE_PARAM = 5;
-pub type GPU_TEXTURE_MODE_PARAM = u32;
+pub type GPU_TEXTURE_MODE_PARAM = ::libc::c_uint;
pub const GPU_TEXUNIT0: GPU_TEXUNIT = 1;
pub const GPU_TEXUNIT1: GPU_TEXUNIT = 2;
pub const GPU_TEXUNIT2: GPU_TEXUNIT = 4;
-pub type GPU_TEXUNIT = u32;
+pub type GPU_TEXUNIT = ::libc::c_uint;
pub const GPU_RGBA8: GPU_TEXCOLOR = 0;
pub const GPU_RGB8: GPU_TEXCOLOR = 1;
pub const GPU_RGBA5551: GPU_TEXCOLOR = 2;
@@ -8747,7 +11782,7 @@ pub const GPU_L4: GPU_TEXCOLOR = 10;
pub const GPU_A4: GPU_TEXCOLOR = 11;
pub const GPU_ETC1: GPU_TEXCOLOR = 12;
pub const GPU_ETC1A4: GPU_TEXCOLOR = 13;
-pub type GPU_TEXCOLOR = u32;
+pub type GPU_TEXCOLOR = ::libc::c_uint;
pub const GPU_TEXFACE_2D: GPU_TEXFACE = 0;
pub const GPU_POSITIVE_X: GPU_TEXFACE = 0;
pub const GPU_NEGATIVE_X: GPU_TEXFACE = 1;
@@ -8755,13 +11790,13 @@ pub const GPU_POSITIVE_Y: GPU_TEXFACE = 2;
pub const GPU_NEGATIVE_Y: GPU_TEXFACE = 3;
pub const GPU_POSITIVE_Z: GPU_TEXFACE = 4;
pub const GPU_NEGATIVE_Z: GPU_TEXFACE = 5;
-pub type GPU_TEXFACE = u32;
+pub type GPU_TEXFACE = ::libc::c_uint;
pub const GPU_PT_CLAMP_TO_ZERO: GPU_PROCTEX_CLAMP = 0;
pub const GPU_PT_CLAMP_TO_EDGE: GPU_PROCTEX_CLAMP = 1;
pub const GPU_PT_REPEAT: GPU_PROCTEX_CLAMP = 2;
pub const GPU_PT_MIRRORED_REPEAT: GPU_PROCTEX_CLAMP = 3;
pub const GPU_PT_PULSE: GPU_PROCTEX_CLAMP = 4;
-pub type GPU_PROCTEX_CLAMP = u32;
+pub type GPU_PROCTEX_CLAMP = ::libc::c_uint;
pub const GPU_PT_U: GPU_PROCTEX_MAPFUNC = 0;
pub const GPU_PT_U2: GPU_PROCTEX_MAPFUNC = 1;
pub const GPU_PT_V: GPU_PROCTEX_MAPFUNC = 2;
@@ -8772,34 +11807,34 @@ pub const GPU_PT_SQRT2: GPU_PROCTEX_MAPFUNC = 6;
pub const GPU_PT_MIN: GPU_PROCTEX_MAPFUNC = 7;
pub const GPU_PT_MAX: GPU_PROCTEX_MAPFUNC = 8;
pub const GPU_PT_RMAX: GPU_PROCTEX_MAPFUNC = 9;
-pub type GPU_PROCTEX_MAPFUNC = u32;
+pub type GPU_PROCTEX_MAPFUNC = ::libc::c_uint;
pub const GPU_PT_NONE: GPU_PROCTEX_SHIFT = 0;
pub const GPU_PT_ODD: GPU_PROCTEX_SHIFT = 1;
pub const GPU_PT_EVEN: GPU_PROCTEX_SHIFT = 2;
-pub type GPU_PROCTEX_SHIFT = u32;
+pub type GPU_PROCTEX_SHIFT = ::libc::c_uint;
pub const GPU_PT_NEAREST: GPU_PROCTEX_FILTER = 0;
pub const GPU_PT_LINEAR: GPU_PROCTEX_FILTER = 1;
pub const GPU_PT_NEAREST_MIP_NEAREST: GPU_PROCTEX_FILTER = 2;
pub const GPU_PT_LINEAR_MIP_NEAREST: GPU_PROCTEX_FILTER = 3;
pub const GPU_PT_NEAREST_MIP_LINEAR: GPU_PROCTEX_FILTER = 4;
pub const GPU_PT_LINEAR_MIP_LINEAR: GPU_PROCTEX_FILTER = 5;
-pub type GPU_PROCTEX_FILTER = u32;
+pub type GPU_PROCTEX_FILTER = ::libc::c_uint;
pub const GPU_LUT_NOISE: GPU_PROCTEX_LUTID = 0;
pub const GPU_LUT_RGBMAP: GPU_PROCTEX_LUTID = 2;
pub const GPU_LUT_ALPHAMAP: GPU_PROCTEX_LUTID = 3;
pub const GPU_LUT_COLOR: GPU_PROCTEX_LUTID = 4;
pub const GPU_LUT_COLORDIF: GPU_PROCTEX_LUTID = 5;
-pub type GPU_PROCTEX_LUTID = u32;
+pub type GPU_PROCTEX_LUTID = ::libc::c_uint;
pub const GPU_RB_RGBA8: GPU_COLORBUF = 0;
pub const GPU_RB_RGB8: GPU_COLORBUF = 1;
pub const GPU_RB_RGBA5551: GPU_COLORBUF = 2;
pub const GPU_RB_RGB565: GPU_COLORBUF = 3;
pub const GPU_RB_RGBA4: GPU_COLORBUF = 4;
-pub type GPU_COLORBUF = u32;
+pub type GPU_COLORBUF = ::libc::c_uint;
pub const GPU_RB_DEPTH16: GPU_DEPTHBUF = 0;
pub const GPU_RB_DEPTH24: GPU_DEPTHBUF = 2;
pub const GPU_RB_DEPTH24_STENCIL8: GPU_DEPTHBUF = 3;
-pub type GPU_DEPTHBUF = u32;
+pub type GPU_DEPTHBUF = ::libc::c_uint;
pub const GPU_NEVER: GPU_TESTFUNC = 0;
pub const GPU_ALWAYS: GPU_TESTFUNC = 1;
pub const GPU_EQUAL: GPU_TESTFUNC = 2;
@@ -8808,16 +11843,21 @@ pub const GPU_LESS: GPU_TESTFUNC = 4;
pub const GPU_LEQUAL: GPU_TESTFUNC = 5;
pub const GPU_GREATER: GPU_TESTFUNC = 6;
pub const GPU_GEQUAL: GPU_TESTFUNC = 7;
-pub type GPU_TESTFUNC = u32;
+pub type GPU_TESTFUNC = ::libc::c_uint;
pub const GPU_EARLYDEPTH_GEQUAL: GPU_EARLYDEPTHFUNC = 0;
pub const GPU_EARLYDEPTH_GREATER: GPU_EARLYDEPTHFUNC = 1;
pub const GPU_EARLYDEPTH_LEQUAL: GPU_EARLYDEPTHFUNC = 2;
pub const GPU_EARLYDEPTH_LESS: GPU_EARLYDEPTHFUNC = 3;
-pub type GPU_EARLYDEPTHFUNC = u32;
+pub type GPU_EARLYDEPTHFUNC = ::libc::c_uint;
+pub const GPU_GAS_NEVER: GPU_GASDEPTHFUNC = 0;
+pub const GPU_GAS_ALWAYS: GPU_GASDEPTHFUNC = 1;
+pub const GPU_GAS_GREATER: GPU_GASDEPTHFUNC = 2;
+pub const GPU_GAS_LESS: GPU_GASDEPTHFUNC = 3;
+pub type GPU_GASDEPTHFUNC = ::libc::c_uint;
pub const GPU_SCISSOR_DISABLE: GPU_SCISSORMODE = 0;
pub const GPU_SCISSOR_INVERT: GPU_SCISSORMODE = 1;
pub const GPU_SCISSOR_NORMAL: GPU_SCISSORMODE = 3;
-pub type GPU_SCISSORMODE = u32;
+pub type GPU_SCISSORMODE = ::libc::c_uint;
pub const GPU_STENCIL_KEEP: GPU_STENCILOP = 0;
pub const GPU_STENCIL_ZERO: GPU_STENCILOP = 1;
pub const GPU_STENCIL_REPLACE: GPU_STENCILOP = 2;
@@ -8826,7 +11866,7 @@ pub const GPU_STENCIL_DECR: GPU_STENCILOP = 4;
pub const GPU_STENCIL_INVERT: GPU_STENCILOP = 5;
pub const GPU_STENCIL_INCR_WRAP: GPU_STENCILOP = 6;
pub const GPU_STENCIL_DECR_WRAP: GPU_STENCILOP = 7;
-pub type GPU_STENCILOP = u32;
+pub type GPU_STENCILOP = ::libc::c_uint;
pub const GPU_WRITE_RED: GPU_WRITEMASK = 1;
pub const GPU_WRITE_GREEN: GPU_WRITEMASK = 2;
pub const GPU_WRITE_BLUE: GPU_WRITEMASK = 4;
@@ -8834,13 +11874,13 @@ pub const GPU_WRITE_ALPHA: GPU_WRITEMASK = 8;
pub const GPU_WRITE_DEPTH: GPU_WRITEMASK = 16;
pub const GPU_WRITE_COLOR: GPU_WRITEMASK = 15;
pub const GPU_WRITE_ALL: GPU_WRITEMASK = 31;
-pub type GPU_WRITEMASK = u32;
+pub type GPU_WRITEMASK = ::libc::c_uint;
pub const GPU_BLEND_ADD: GPU_BLENDEQUATION = 0;
pub const GPU_BLEND_SUBTRACT: GPU_BLENDEQUATION = 1;
pub const GPU_BLEND_REVERSE_SUBTRACT: GPU_BLENDEQUATION = 2;
pub const GPU_BLEND_MIN: GPU_BLENDEQUATION = 3;
pub const GPU_BLEND_MAX: GPU_BLENDEQUATION = 4;
-pub type GPU_BLENDEQUATION = u32;
+pub type GPU_BLENDEQUATION = ::libc::c_uint;
pub const GPU_ZERO: GPU_BLENDFACTOR = 0;
pub const GPU_ONE: GPU_BLENDFACTOR = 1;
pub const GPU_SRC_COLOR: GPU_BLENDFACTOR = 2;
@@ -8856,7 +11896,7 @@ pub const GPU_ONE_MINUS_CONSTANT_COLOR: GPU_BLENDFACTOR = 11;
pub const GPU_CONSTANT_ALPHA: GPU_BLENDFACTOR = 12;
pub const GPU_ONE_MINUS_CONSTANT_ALPHA: GPU_BLENDFACTOR = 13;
pub const GPU_SRC_ALPHA_SATURATE: GPU_BLENDFACTOR = 14;
-pub type GPU_BLENDFACTOR = u32;
+pub type GPU_BLENDFACTOR = ::libc::c_uint;
pub const GPU_LOGICOP_CLEAR: GPU_LOGICOP = 0;
pub const GPU_LOGICOP_AND: GPU_LOGICOP = 1;
pub const GPU_LOGICOP_AND_REVERSE: GPU_LOGICOP = 2;
@@ -8873,20 +11913,20 @@ pub const GPU_LOGICOP_EQUIV: GPU_LOGICOP = 12;
pub const GPU_LOGICOP_AND_INVERTED: GPU_LOGICOP = 13;
pub const GPU_LOGICOP_OR_REVERSE: GPU_LOGICOP = 14;
pub const GPU_LOGICOP_OR_INVERTED: GPU_LOGICOP = 15;
-pub type GPU_LOGICOP = u32;
+pub type GPU_LOGICOP = ::libc::c_uint;
pub const GPU_FRAGOPMODE_GL: GPU_FRAGOPMODE = 0;
pub const GPU_FRAGOPMODE_GAS_ACC: GPU_FRAGOPMODE = 1;
pub const GPU_FRAGOPMODE_SHADOW: GPU_FRAGOPMODE = 3;
-pub type GPU_FRAGOPMODE = u32;
+pub type GPU_FRAGOPMODE = ::libc::c_uint;
pub const GPU_BYTE: GPU_FORMATS = 0;
pub const GPU_UNSIGNED_BYTE: GPU_FORMATS = 1;
pub const GPU_SHORT: GPU_FORMATS = 2;
pub const GPU_FLOAT: GPU_FORMATS = 3;
-pub type GPU_FORMATS = u32;
+pub type GPU_FORMATS = ::libc::c_uint;
pub const GPU_CULL_NONE: GPU_CULLMODE = 0;
pub const GPU_CULL_FRONT_CCW: GPU_CULLMODE = 1;
pub const GPU_CULL_BACK_CCW: GPU_CULLMODE = 2;
-pub type GPU_CULLMODE = u32;
+pub type GPU_CULLMODE = ::libc::c_uint;
pub const GPU_PRIMARY_COLOR: GPU_TEVSRC = 0;
pub const GPU_FRAGMENT_PRIMARY_COLOR: GPU_TEVSRC = 1;
pub const GPU_FRAGMENT_SECONDARY_COLOR: GPU_TEVSRC = 2;
@@ -8897,7 +11937,7 @@ pub const GPU_TEXTURE3: GPU_TEVSRC = 6;
pub const GPU_PREVIOUS_BUFFER: GPU_TEVSRC = 13;
pub const GPU_CONSTANT: GPU_TEVSRC = 14;
pub const GPU_PREVIOUS: GPU_TEVSRC = 15;
-pub type GPU_TEVSRC = u32;
+pub type GPU_TEVSRC = ::libc::c_uint;
pub const GPU_TEVOP_RGB_SRC_COLOR: GPU_TEVOP_RGB = 0;
pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR: GPU_TEVOP_RGB = 1;
pub const GPU_TEVOP_RGB_SRC_ALPHA: GPU_TEVOP_RGB = 2;
@@ -8914,7 +11954,7 @@ pub const GPU_TEVOP_RGB_SRC_B: GPU_TEVOP_RGB = 12;
pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_B: GPU_TEVOP_RGB = 13;
pub const GPU_TEVOP_RGB_0x0E: GPU_TEVOP_RGB = 14;
pub const GPU_TEVOP_RGB_0x0F: GPU_TEVOP_RGB = 15;
-pub type GPU_TEVOP_RGB = u32;
+pub type GPU_TEVOP_RGB = ::libc::c_uint;
pub const GPU_TEVOP_A_SRC_ALPHA: GPU_TEVOP_A = 0;
pub const GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_A = 1;
pub const GPU_TEVOP_A_SRC_R: GPU_TEVOP_A = 2;
@@ -8923,7 +11963,7 @@ pub const GPU_TEVOP_A_SRC_G: GPU_TEVOP_A = 4;
pub const GPU_TEVOP_A_ONE_MINUS_SRC_G: GPU_TEVOP_A = 5;
pub const GPU_TEVOP_A_SRC_B: GPU_TEVOP_A = 6;
pub const GPU_TEVOP_A_ONE_MINUS_SRC_B: GPU_TEVOP_A = 7;
-pub type GPU_TEVOP_A = u32;
+pub type GPU_TEVOP_A = ::libc::c_uint;
pub const GPU_REPLACE: GPU_COMBINEFUNC = 0;
pub const GPU_MODULATE: GPU_COMBINEFUNC = 1;
pub const GPU_ADD: GPU_COMBINEFUNC = 2;
@@ -8933,20 +11973,20 @@ pub const GPU_SUBTRACT: GPU_COMBINEFUNC = 5;
pub const GPU_DOT3_RGB: GPU_COMBINEFUNC = 6;
pub const GPU_MULTIPLY_ADD: GPU_COMBINEFUNC = 8;
pub const GPU_ADD_MULTIPLY: GPU_COMBINEFUNC = 9;
-pub type GPU_COMBINEFUNC = u32;
+pub type GPU_COMBINEFUNC = ::libc::c_uint;
pub const GPU_TEVSCALE_1: GPU_TEVSCALE = 0;
pub const GPU_TEVSCALE_2: GPU_TEVSCALE = 1;
pub const GPU_TEVSCALE_4: GPU_TEVSCALE = 2;
-pub type GPU_TEVSCALE = u32;
+pub type GPU_TEVSCALE = ::libc::c_uint;
pub const GPU_NO_FRESNEL: GPU_FRESNELSEL = 0;
pub const GPU_PRI_ALPHA_FRESNEL: GPU_FRESNELSEL = 1;
pub const GPU_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 2;
pub const GPU_PRI_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 3;
-pub type GPU_FRESNELSEL = u32;
+pub type GPU_FRESNELSEL = ::libc::c_uint;
pub const GPU_BUMP_NOT_USED: GPU_BUMPMODE = 0;
pub const GPU_BUMP_AS_BUMP: GPU_BUMPMODE = 1;
pub const GPU_BUMP_AS_TANG: GPU_BUMPMODE = 2;
-pub type GPU_BUMPMODE = u32;
+pub type GPU_BUMPMODE = ::libc::c_uint;
pub const GPU_LUT_D0: GPU_LIGHTLUTID = 0;
pub const GPU_LUT_D1: GPU_LIGHTLUTID = 1;
pub const GPU_LUT_SP: GPU_LIGHTLUTID = 2;
@@ -8955,80 +11995,80 @@ pub const GPU_LUT_RB: GPU_LIGHTLUTID = 4;
pub const GPU_LUT_RG: GPU_LIGHTLUTID = 5;
pub const GPU_LUT_RR: GPU_LIGHTLUTID = 6;
pub const GPU_LUT_DA: GPU_LIGHTLUTID = 7;
-pub type GPU_LIGHTLUTID = u32;
+pub type GPU_LIGHTLUTID = ::libc::c_uint;
pub const GPU_LUTINPUT_NH: GPU_LIGHTLUTINPUT = 0;
pub const GPU_LUTINPUT_VH: GPU_LIGHTLUTINPUT = 1;
pub const GPU_LUTINPUT_NV: GPU_LIGHTLUTINPUT = 2;
pub const GPU_LUTINPUT_LN: GPU_LIGHTLUTINPUT = 3;
pub const GPU_LUTINPUT_SP: GPU_LIGHTLUTINPUT = 4;
pub const GPU_LUTINPUT_CP: GPU_LIGHTLUTINPUT = 5;
-pub type GPU_LIGHTLUTINPUT = u32;
+pub type GPU_LIGHTLUTINPUT = ::libc::c_uint;
pub const GPU_LUTSCALER_1x: GPU_LIGHTLUTSCALER = 0;
pub const GPU_LUTSCALER_2x: GPU_LIGHTLUTSCALER = 1;
pub const GPU_LUTSCALER_4x: GPU_LIGHTLUTSCALER = 2;
pub const GPU_LUTSCALER_8x: GPU_LIGHTLUTSCALER = 3;
pub const GPU_LUTSCALER_0_25x: GPU_LIGHTLUTSCALER = 6;
pub const GPU_LUTSCALER_0_5x: GPU_LIGHTLUTSCALER = 7;
-pub type GPU_LIGHTLUTSCALER = u32;
+pub type GPU_LIGHTLUTSCALER = ::libc::c_uint;
pub const GPU_LUTSELECT_COMMON: GPU_LIGHTLUTSELECT = 0;
pub const GPU_LUTSELECT_SP: GPU_LIGHTLUTSELECT = 1;
pub const GPU_LUTSELECT_DA: GPU_LIGHTLUTSELECT = 2;
-pub type GPU_LIGHTLUTSELECT = u32;
+pub type GPU_LIGHTLUTSELECT = ::libc::c_uint;
pub const GPU_NO_FOG: GPU_FOGMODE = 0;
pub const GPU_FOG: GPU_FOGMODE = 5;
pub const GPU_GAS: GPU_FOGMODE = 7;
-pub type GPU_FOGMODE = u32;
+pub type GPU_FOGMODE = ::libc::c_uint;
pub const GPU_PLAIN_DENSITY: GPU_GASMODE = 0;
pub const GPU_DEPTH_DENSITY: GPU_GASMODE = 1;
-pub type GPU_GASMODE = u32;
+pub type GPU_GASMODE = ::libc::c_uint;
pub const GPU_GAS_DENSITY: GPU_GASLUTINPUT = 0;
pub const GPU_GAS_LIGHT_FACTOR: GPU_GASLUTINPUT = 1;
-pub type GPU_GASLUTINPUT = u32;
+pub type GPU_GASLUTINPUT = ::libc::c_uint;
pub const GPU_TRIANGLES: GPU_Primitive_t = 0;
pub const GPU_TRIANGLE_STRIP: GPU_Primitive_t = 256;
pub const GPU_TRIANGLE_FAN: GPU_Primitive_t = 512;
pub const GPU_GEOMETRY_PRIM: GPU_Primitive_t = 768;
-pub type GPU_Primitive_t = u32;
+pub type GPU_Primitive_t = ::libc::c_uint;
pub const GPU_VERTEX_SHADER: GPU_SHADER_TYPE = 0;
pub const GPU_GEOMETRY_SHADER: GPU_SHADER_TYPE = 1;
-pub type GPU_SHADER_TYPE = u32;
+pub type GPU_SHADER_TYPE = ::libc::c_uint;
extern "C" {
- pub static mut gpuCmdBuf: *mut u32;
+ pub static mut gpuCmdBuf: *mut u32_;
}
extern "C" {
- pub static mut gpuCmdBufSize: u32;
+ pub static mut gpuCmdBufSize: u32_;
}
extern "C" {
- pub static mut gpuCmdBufOffset: u32;
+ pub static mut gpuCmdBufOffset: u32_;
}
extern "C" {
- pub fn GPUCMD_AddRawCommands(cmd: *const u32, size: u32);
+ pub fn GPUCMD_AddRawCommands(cmd: *const u32_, size: u32_);
}
extern "C" {
- pub fn GPUCMD_Add(header: u32, param: *const u32, paramlength: u32);
+ pub fn GPUCMD_Add(header: u32_, param: *const u32_, paramlength: u32_);
}
extern "C" {
- pub fn GPUCMD_Split(addr: *mut *mut u32, size: *mut u32);
+ pub fn GPUCMD_Split(addr: *mut *mut u32_, size: *mut u32_);
}
extern "C" {
- pub fn f32tof16(f: f32) -> u32;
+ pub fn f32tof16(f: f32) -> u32_;
}
extern "C" {
- pub fn f32tof20(f: f32) -> u32;
+ pub fn f32tof20(f: f32) -> u32_;
}
extern "C" {
- pub fn f32tof24(f: f32) -> u32;
+ pub fn f32tof24(f: f32) -> u32_;
}
extern "C" {
- pub fn f32tof31(f: f32) -> u32;
+ pub fn f32tof31(f: f32) -> u32_;
}
pub const VERTEX_SHDR: DVLE_type = 0;
pub const GEOMETRY_SHDR: DVLE_type = 1;
-pub type DVLE_type = u32;
+pub type DVLE_type = ::libc::c_uint;
pub const DVLE_CONST_BOOL: DVLE_constantType = 0;
pub const DVLE_CONST_u8: DVLE_constantType = 1;
pub const DVLE_CONST_FLOAT24: DVLE_constantType = 2;
-pub type DVLE_constantType = u32;
+pub type DVLE_constantType = ::libc::c_uint;
pub const RESULT_POSITION: DVLE_outputAttribute_t = 0;
pub const RESULT_NORMALQUAT: DVLE_outputAttribute_t = 1;
pub const RESULT_COLOR: DVLE_outputAttribute_t = 2;
@@ -9038,68 +12078,89 @@ pub const RESULT_TEXCOORD1: DVLE_outputAttribute_t = 5;
pub const RESULT_TEXCOORD2: DVLE_outputAttribute_t = 6;
pub const RESULT_VIEW: DVLE_outputAttribute_t = 8;
pub const RESULT_DUMMY: DVLE_outputAttribute_t = 9;
-pub type DVLE_outputAttribute_t = u32;
+pub type DVLE_outputAttribute_t = ::libc::c_uint;
pub const GSH_POINT: DVLE_geoShaderMode = 0;
pub const GSH_VARIABLE_PRIM: DVLE_geoShaderMode = 1;
pub const GSH_FIXED_PRIM: DVLE_geoShaderMode = 2;
-pub type DVLE_geoShaderMode = u32;
+pub type DVLE_geoShaderMode = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct DVLP_s {
- pub codeSize: u32,
- pub codeData: *mut u32,
- pub opdescSize: u32,
- pub opcdescData: *mut u32,
+ pub codeSize: u32_,
+ pub codeData: *mut u32_,
+ pub opdescSize: u32_,
+ pub opcdescData: *mut u32_,
+}
+impl Default for DVLP_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct DVLE_constEntry_s {
- pub type_: u16,
- pub id: u16,
- pub data: [u32; 4usize],
+ pub type_: u16_,
+ pub id: u16_,
+ pub data: [u32_; 4usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct DVLE_outEntry_s {
- pub type_: u16,
- pub regID: u16,
- pub mask: u8,
- pub unk: [u8; 3usize],
+ pub type_: u16_,
+ pub regID: u16_,
+ pub mask: u8_,
+ pub unk: [u8_; 3usize],
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct DVLE_uniformEntry_s {
- pub symbolOffset: u32,
- pub startReg: u16,
- pub endReg: u16,
+ pub symbolOffset: u32_,
+ pub startReg: u16_,
+ pub endReg: u16_,
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct DVLE_s {
pub type_: DVLE_type,
pub mergeOutmaps: bool,
pub gshMode: DVLE_geoShaderMode,
- pub gshFixedVtxStart: u8,
- pub gshVariableVtxNum: u8,
- pub gshFixedVtxNum: u8,
+ pub gshFixedVtxStart: u8_,
+ pub gshVariableVtxNum: u8_,
+ pub gshFixedVtxNum: u8_,
pub dvlp: *mut DVLP_s,
- pub mainOffset: u32,
- pub endmainOffset: u32,
- pub constTableSize: u32,
+ pub mainOffset: u32_,
+ pub endmainOffset: u32_,
+ pub constTableSize: u32_,
pub constTableData: *mut DVLE_constEntry_s,
- pub outTableSize: u32,
+ pub outTableSize: u32_,
pub outTableData: *mut DVLE_outEntry_s,
- pub uniformTableSize: u32,
+ pub uniformTableSize: u32_,
pub uniformTableData: *mut DVLE_uniformEntry_s,
pub symbolTableData: *mut ::libc::c_char,
- pub outmapMask: u8,
- pub outmapData: [u32; 8usize],
- pub outmapMode: u32,
- pub outmapClock: u32,
+ pub outmapMask: u8_,
+ pub outmapData: [u32_; 8usize],
+ pub outmapMode: u32_,
+ pub outmapClock: u32_,
+}
+impl Default for DVLE_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct DVLB_s {
- pub numDVLE: u32,
+ pub numDVLE: u32_,
pub DVLP: DVLP_s,
pub DVLE: *mut DVLE_s,
}
+impl Default for DVLB_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
extern "C" {
- pub fn DVLB_ParseFile(shbinData: *mut u32, shbinSize: u32) -> *mut DVLB_s;
+ pub fn DVLB_ParseFile(shbinData: *mut u32_, shbinSize: u32_) -> *mut DVLB_s;
}
extern "C" {
pub fn DVLB_Free(dvlb: *mut DVLB_s);
@@ -9111,26 +12172,39 @@ extern "C" {
pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s);
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct float24Uniform_s {
- pub id: u32,
- pub data: [u32; 3usize],
+ pub id: u32_,
+ pub data: [u32_; 3usize],
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct shaderInstance_s {
pub dvle: *mut DVLE_s,
- pub boolUniforms: u16,
- pub boolUniformMask: u16,
- pub intUniforms: [u32; 4usize],
+ pub boolUniforms: u16_,
+ pub boolUniformMask: u16_,
+ pub intUniforms: [u32_; 4usize],
pub float24Uniforms: *mut float24Uniform_s,
- pub intUniformMask: u8,
- pub numFloat24Uniforms: u8,
+ pub intUniformMask: u8_,
+ pub numFloat24Uniforms: u8_,
+}
+impl Default for shaderInstance_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct shaderProgram_s {
pub vertexShader: *mut shaderInstance_s,
pub geometryShader: *mut shaderInstance_s,
- pub geoShaderInputPermutation: [u32; 2usize],
- pub geoShaderInputStride: u8,
+ pub geoShaderInputPermutation: [u32_; 2usize],
+ pub geoShaderInputStride: u8_,
+}
+impl Default for shaderProgram_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result;
@@ -9168,12 +12242,12 @@ extern "C" {
pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result;
}
extern "C" {
- pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8) -> Result;
+ pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result;
}
extern "C" {
pub fn shaderProgramSetGshInputPermutation(
sp: *mut shaderProgram_s,
- permutation: u64,
+ permutation: u64_,
) -> Result;
}
extern "C" {
@@ -9189,35 +12263,37 @@ extern "C" {
pub const NDSP_OUTPUT_MONO: ndspOutputMode = 0;
pub const NDSP_OUTPUT_STEREO: ndspOutputMode = 1;
pub const NDSP_OUTPUT_SURROUND: ndspOutputMode = 2;
-pub type ndspOutputMode = u32;
+pub type ndspOutputMode = ::libc::c_uint;
pub const NDSP_CLIP_NORMAL: ndspClippingMode = 0;
pub const NDSP_CLIP_SOFT: ndspClippingMode = 1;
-pub type ndspClippingMode = u32;
+pub type ndspClippingMode = ::libc::c_uint;
pub const NDSP_SPKPOS_SQUARE: ndspSpeakerPos = 0;
pub const NDSP_SPKPOS_WIDE: ndspSpeakerPos = 1;
pub const NDSP_SPKPOS_NUM: ndspSpeakerPos = 2;
-pub type ndspSpeakerPos = u32;
+pub type ndspSpeakerPos = ::libc::c_uint;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct ndspAdpcmData {
- pub index: u16,
+ pub index: u16_,
pub history0: s16,
pub history1: s16,
}
pub type ndspWaveBuf = tag_ndspWaveBuf;
-pub const NDSP_WBUF_FREE: _bindgen_ty_25 = 0;
-pub const NDSP_WBUF_QUEUED: _bindgen_ty_25 = 1;
-pub const NDSP_WBUF_PLAYING: _bindgen_ty_25 = 2;
-pub const NDSP_WBUF_DONE: _bindgen_ty_25 = 3;
-pub type _bindgen_ty_25 = u32;
+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 type _bindgen_ty_29 = ::libc::c_uint;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct tag_ndspWaveBuf {
pub __bindgen_anon_1: tag_ndspWaveBuf__bindgen_ty_1,
- pub nsamples: u32,
+ pub nsamples: u32_,
pub adpcm_data: *mut ndspAdpcmData,
- pub offset: u32,
+ pub offset: u32_,
pub looping: bool,
- pub status: u8,
- pub sequence_id: u16,
+ pub status: u8_,
+ pub sequence_id: u16_,
pub next: *mut ndspWaveBuf,
}
#[repr(C)]
@@ -9225,10 +12301,20 @@ pub struct tag_ndspWaveBuf {
pub union tag_ndspWaveBuf__bindgen_ty_1 {
pub data_pcm8: *mut s8,
pub data_pcm16: *mut s16,
- pub data_adpcm: *mut u8,
+ pub data_adpcm: *mut u8_,
pub data_vaddr: *const ::libc::c_void,
_bindgen_union_align: u32,
}
+impl Default for tag_ndspWaveBuf__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for tag_ndspWaveBuf {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub type ndspCallback = ::core::option::Option<unsafe extern "C" fn(data: *mut ::libc::c_void)>;
pub type ndspAuxCallback = ::core::option::Option<
unsafe extern "C" fn(
@@ -9238,7 +12324,12 @@ pub type ndspAuxCallback = ::core::option::Option<
),
>;
extern "C" {
- pub fn ndspUseComponent(binary: *const ::libc::c_void, size: u32, progMask: u16, dataMask: u16);
+ pub fn ndspUseComponent(
+ binary: *const ::libc::c_void,
+ size: u32_,
+ progMask: u16_,
+ dataMask: u16_,
+ );
}
extern "C" {
pub fn ndspInit() -> Result;
@@ -9247,10 +12338,10 @@ extern "C" {
pub fn ndspExit();
}
extern "C" {
- pub fn ndspGetDroppedFrames() -> u32;
+ pub fn ndspGetDroppedFrames() -> u32_;
}
extern "C" {
- pub fn ndspGetFrameCount() -> u32;
+ pub fn ndspGetFrameCount() -> u32_;
}
extern "C" {
pub fn ndspSetMasterVol(volume: f32);
@@ -9271,13 +12362,13 @@ extern "C" {
pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void);
}
extern "C" {
- pub fn ndspSurroundSetDepth(depth: u16);
+ pub fn ndspSurroundSetDepth(depth: u16_);
}
extern "C" {
pub fn ndspSurroundSetPos(pos: ndspSpeakerPos);
}
extern "C" {
- pub fn ndspSurroundSetRearRatio(ratio: u16);
+ pub fn ndspSurroundSetRearRatio(ratio: u16_);
}
extern "C" {
pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool);
@@ -9295,25 +12386,25 @@ extern "C" {
data: *mut ::libc::c_void,
);
}
-pub const NDSP_ENCODING_PCM8: _bindgen_ty_26 = 0;
-pub const NDSP_ENCODING_PCM16: _bindgen_ty_26 = 1;
-pub const NDSP_ENCODING_ADPCM: _bindgen_ty_26 = 2;
-pub type _bindgen_ty_26 = u32;
-pub const NDSP_FORMAT_MONO_PCM8: _bindgen_ty_27 = 1;
-pub const NDSP_FORMAT_MONO_PCM16: _bindgen_ty_27 = 5;
-pub const NDSP_FORMAT_MONO_ADPCM: _bindgen_ty_27 = 9;
-pub const NDSP_FORMAT_STEREO_PCM8: _bindgen_ty_27 = 2;
-pub const NDSP_FORMAT_STEREO_PCM16: _bindgen_ty_27 = 6;
-pub const NDSP_FORMAT_PCM8: _bindgen_ty_27 = 1;
-pub const NDSP_FORMAT_PCM16: _bindgen_ty_27 = 5;
-pub const NDSP_FORMAT_ADPCM: _bindgen_ty_27 = 9;
-pub const NDSP_FRONT_BYPASS: _bindgen_ty_27 = 16;
-pub const NDSP_3D_SURROUND_PREPROCESSED: _bindgen_ty_27 = 64;
-pub type _bindgen_ty_27 = u32;
+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 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 type _bindgen_ty_31 = ::libc::c_uint;
pub const NDSP_INTERP_POLYPHASE: ndspInterpType = 0;
pub const NDSP_INTERP_LINEAR: ndspInterpType = 1;
pub const NDSP_INTERP_NONE: ndspInterpType = 2;
-pub type ndspInterpType = u32;
+pub type ndspInterpType = ::libc::c_uint;
extern "C" {
pub fn ndspChnReset(id: ::libc::c_int);
}
@@ -9324,10 +12415,10 @@ extern "C" {
pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool;
}
extern "C" {
- pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32;
+ pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32_;
}
extern "C" {
- pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16;
+ pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16_;
}
extern "C" {
pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool;
@@ -9336,7 +12427,7 @@ extern "C" {
pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool);
}
extern "C" {
- pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16);
+ pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16_);
}
extern "C" {
pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType);
@@ -9348,7 +12439,7 @@ extern "C" {
pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32);
}
extern "C" {
- pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16);
+ pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16_);
}
extern "C" {
pub fn ndspChnWaveBufClear(id: ::libc::c_int);
@@ -9411,45 +12502,45 @@ pub const SWKBD_TYPE_NORMAL: SwkbdType = 0;
pub const SWKBD_TYPE_QWERTY: SwkbdType = 1;
pub const SWKBD_TYPE_NUMPAD: SwkbdType = 2;
pub const SWKBD_TYPE_WESTERN: SwkbdType = 3;
-pub type SwkbdType = u32;
+pub type SwkbdType = ::libc::c_uint;
pub const SWKBD_ANYTHING: SwkbdValidInput = 0;
pub const SWKBD_NOTEMPTY: SwkbdValidInput = 1;
pub const SWKBD_NOTEMPTY_NOTBLANK: SwkbdValidInput = 2;
pub const SWKBD_NOTBLANK_NOTEMPTY: SwkbdValidInput = 2;
pub const SWKBD_NOTBLANK: SwkbdValidInput = 3;
pub const SWKBD_FIXEDLEN: SwkbdValidInput = 4;
-pub type SwkbdValidInput = u32;
+pub type SwkbdValidInput = ::libc::c_uint;
pub const SWKBD_BUTTON_LEFT: SwkbdButton = 0;
pub const SWKBD_BUTTON_MIDDLE: SwkbdButton = 1;
pub const SWKBD_BUTTON_RIGHT: SwkbdButton = 2;
pub const SWKBD_BUTTON_CONFIRM: SwkbdButton = 2;
pub const SWKBD_BUTTON_NONE: SwkbdButton = 3;
-pub type SwkbdButton = u32;
+pub type SwkbdButton = ::libc::c_uint;
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 = u32;
-pub const SWKBD_FILTER_DIGITS: _bindgen_ty_28 = 1;
-pub const SWKBD_FILTER_AT: _bindgen_ty_28 = 2;
-pub const SWKBD_FILTER_PERCENT: _bindgen_ty_28 = 4;
-pub const SWKBD_FILTER_BACKSLASH: _bindgen_ty_28 = 8;
-pub const SWKBD_FILTER_PROFANITY: _bindgen_ty_28 = 16;
-pub const SWKBD_FILTER_CALLBACK: _bindgen_ty_28 = 32;
-pub type _bindgen_ty_28 = u32;
-pub const SWKBD_PARENTAL: _bindgen_ty_29 = 1;
-pub const SWKBD_DARKEN_TOP_SCREEN: _bindgen_ty_29 = 2;
-pub const SWKBD_PREDICTIVE_INPUT: _bindgen_ty_29 = 4;
-pub const SWKBD_MULTILINE: _bindgen_ty_29 = 8;
-pub const SWKBD_FIXED_WIDTH: _bindgen_ty_29 = 16;
-pub const SWKBD_ALLOW_HOME: _bindgen_ty_29 = 32;
-pub const SWKBD_ALLOW_RESET: _bindgen_ty_29 = 64;
-pub const SWKBD_ALLOW_POWER: _bindgen_ty_29 = 128;
-pub const SWKBD_DEFAULT_QWERTY: _bindgen_ty_29 = 512;
-pub type _bindgen_ty_29 = u32;
+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 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 type _bindgen_ty_33 = ::libc::c_uint;
pub const SWKBD_CALLBACK_OK: SwkbdCallbackResult = 0;
pub const SWKBD_CALLBACK_CLOSE: SwkbdCallbackResult = 1;
pub const SWKBD_CALLBACK_CONTINUE: SwkbdCallbackResult = 2;
-pub type SwkbdCallbackResult = u32;
+pub type SwkbdCallbackResult = ::libc::c_uint;
pub const SWKBD_NONE: SwkbdResult = -1;
pub const SWKBD_INVALID_INPUT: SwkbdResult = -2;
pub const SWKBD_OUTOFMEM: SwkbdResult = -3;
@@ -9465,29 +12556,42 @@ pub const SWKBD_POWERPRESSED: SwkbdResult = 12;
pub const SWKBD_PARENTAL_OK: SwkbdResult = 20;
pub const SWKBD_PARENTAL_FAIL: SwkbdResult = 21;
pub const SWKBD_BANNED_INPUT: SwkbdResult = 30;
-pub type SwkbdResult = i32;
+pub type SwkbdResult = ::libc::c_int;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct SwkbdDictWord {
- pub reading: [u16; 41usize],
- pub word: [u16; 41usize],
- pub language: u8,
+ pub reading: [u16_; 41usize],
+ pub word: [u16_; 41usize],
+ pub language: u8_,
pub all_languages: bool,
}
+impl Default for SwkbdDictWord {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
pub type SwkbdCallbackFn = ::core::option::Option<
unsafe extern "C" fn(
user: *mut ::libc::c_void,
ppMessage: *mut *const ::libc::c_char,
text: *const ::libc::c_char,
- textlen: usize,
+ textlen: size_t,
) -> SwkbdCallbackResult,
>;
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct SwkbdStatusData {
- pub data: [u32; 17usize],
+ pub data: [u32_; 17usize],
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct SwkbdLearningData {
- pub data: [u32; 10523usize],
+ pub data: [u32_; 10523usize],
+}
+impl Default for SwkbdLearningData {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@@ -9499,7 +12603,13 @@ pub struct SwkbdExtra {
pub callback: SwkbdCallbackFn,
pub callback_user: *mut ::libc::c_void,
}
+impl Default for SwkbdExtra {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct SwkbdState {
pub type_: ::libc::c_int,
pub num_buttons_m1: ::libc::c_int,
@@ -9507,14 +12617,14 @@ pub struct SwkbdState {
pub password_mode: ::libc::c_int,
pub is_parental_screen: ::libc::c_int,
pub darken_top_screen: ::libc::c_int,
- pub filter_flags: u32,
- pub save_state_flags: u32,
- pub max_text_len: u16,
- pub dict_word_count: u16,
- pub max_digits: u16,
- pub button_text: [[u16; 17usize]; 3usize],
- pub numpad_keys: [u16; 2usize],
- pub hint_text: [u16; 65usize],
+ pub filter_flags: u32_,
+ pub save_state_flags: u32_,
+ pub max_text_len: u16_,
+ pub dict_word_count: u16_,
+ pub max_digits: u16_,
+ pub button_text: [[u16_; 17usize]; 3usize],
+ pub numpad_keys: [u16_; 2usize],
+ pub hint_text: [u16_; 65usize],
pub predictive_input: bool,
pub multiline: bool,
pub fixed_width: bool,
@@ -9524,28 +12634,39 @@ pub struct SwkbdState {
pub unknown: bool,
pub default_qwerty: bool,
pub button_submits_text: [bool; 4usize],
- pub language: u16,
+ pub language: u16_,
pub initial_text_offset: ::libc::c_int,
pub dict_offset: ::libc::c_int,
pub initial_status_offset: ::libc::c_int,
pub initial_learning_offset: ::libc::c_int,
- pub shared_memory_size: usize,
- pub version: u32,
+ pub shared_memory_size: size_t,
+ pub version: u32_,
pub result: SwkbdResult,
pub status_offset: ::libc::c_int,
pub learning_offset: ::libc::c_int,
pub text_offset: ::libc::c_int,
- pub text_length: u16,
+ pub text_length: u16_,
pub callback_result: ::libc::c_int,
- pub callback_msg: [u16; 257usize],
+ pub callback_msg: [u16_; 257usize],
pub skip_at_check: bool,
pub __bindgen_anon_1: SwkbdState__bindgen_ty_1,
}
#[repr(C)]
-pub struct SwkbdState__bindgen_ty_1 {
- pub reserved: __BindgenUnionField<[u8; 171usize]>,
- pub extra: __BindgenUnionField<SwkbdExtra>,
- pub bindgen_union_field: [u32; 43usize],
+#[derive(Copy, Clone)]
+pub union SwkbdState__bindgen_ty_1 {
+ pub reserved: [u8_; 171usize],
+ pub extra: SwkbdExtra,
+ _bindgen_union_align: [u32; 43usize],
+}
+impl Default for SwkbdState__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for SwkbdState {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub fn swkbdInit(
@@ -9556,7 +12677,7 @@ extern "C" {
);
}
extern "C" {
- pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32);
+ pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32_);
}
extern "C" {
pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char);
@@ -9613,12 +12734,12 @@ extern "C" {
pub fn swkbdInputText(
swkbd: *mut SwkbdState,
buf: *mut ::libc::c_char,
- bufsize: usize,
+ bufsize: size_t,
) -> SwkbdButton;
}
-pub const ERROR_LANGUAGE_FLAG: _bindgen_ty_30 = 256;
-pub const ERROR_WORD_WRAP_FLAG: _bindgen_ty_30 = 512;
-pub type _bindgen_ty_30 = u32;
+pub const ERROR_LANGUAGE_FLAG: ::libc::c_uint = 256;
+pub const ERROR_WORD_WRAP_FLAG: ::libc::c_uint = 512;
+pub type _bindgen_ty_34 = ::libc::c_uint;
pub const ERROR_CODE: errorType = 0;
pub const ERROR_TEXT: errorType = 1;
pub const ERROR_EULA: errorType = 2;
@@ -9630,10 +12751,10 @@ pub const ERROR_TEXT_LANGUAGE: errorType = 257;
pub const ERROR_EULA_LANGUAGE: errorType = 258;
pub const ERROR_TEXT_WORD_WRAP: errorType = 513;
pub const ERROR_TEXT_LANGUAGE_WORD_WRAP: errorType = 769;
-pub type errorType = u32;
+pub type errorType = ::libc::c_uint;
pub const ERROR_NORMAL: errorScreenFlag = 0;
pub const ERROR_STEREO: errorScreenFlag = 1;
-pub type errorScreenFlag = u32;
+pub type errorScreenFlag = ::libc::c_uint;
pub const ERROR_UNKNOWN: errorReturnCode = -1;
pub const ERROR_NONE: errorReturnCode = 0;
pub const ERROR_SUCCESS: errorReturnCode = 1;
@@ -9641,19 +12762,25 @@ pub const ERROR_NOT_SUPPORTED: errorReturnCode = 2;
pub const ERROR_HOME_BUTTON: errorReturnCode = 10;
pub const ERROR_SOFTWARE_RESET: errorReturnCode = 11;
pub const ERROR_POWER_BUTTON: errorReturnCode = 12;
-pub type errorReturnCode = i32;
+pub type errorReturnCode = ::libc::c_int;
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct errorConf {
pub type_: errorType,
pub errorCode: ::libc::c_int,
pub upperScreenFlag: errorScreenFlag,
- pub useLanguage: u16,
- pub Text: [u16; 1900usize],
+ pub useLanguage: u16_,
+ pub Text: [u16_; 1900usize],
pub homeButton: bool,
pub softwareReset: bool,
pub appJump: bool,
pub returnCode: errorReturnCode,
- pub eulaVersion: u16,
+ pub eulaVersion: u16_,
+}
+impl Default for errorConf {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
extern "C" {
pub fn errorInit(err: *mut errorConf, type_: errorType, lang: CFG_Language);
@@ -9668,199 +12795,305 @@ extern "C" {
pub fn errorDisp(err: *mut errorConf);
}
#[repr(C)]
+#[derive(Copy, Clone)]
pub struct MiiSelectorConf {
- pub enable_cancel_button: ::libc::c_char,
- pub enable_selecting_guests: ::libc::c_char,
- pub show_on_top_screen: ::libc::c_char,
- pub _unk0x3: [::libc::c_char; 5usize],
- pub title: [u16; 64usize],
- pub _unk0x88: [::libc::c_char; 4usize],
- pub show_guest_page: ::libc::c_char,
- pub _unk0x8D: [::libc::c_char; 3usize],
- pub initial_index: u32,
- pub mii_guest_whitelist: [::libc::c_char; 6usize],
- pub mii_whitelist: [::libc::c_char; 100usize],
- pub _unk0xFE: u16,
- pub magic: u32,
+ pub enable_cancel_button: u8_,
+ pub enable_selecting_guests: u8_,
+ pub show_on_top_screen: u8_,
+ pub _unk0x3: [u8_; 5usize],
+ pub title: [u16_; 64usize],
+ pub _unk0x88: [u8_; 4usize],
+ pub show_guest_page: u8_,
+ pub _unk0x8D: [u8_; 3usize],
+ pub initial_index: u32_,
+ pub mii_guest_whitelist: [u8_; 6usize],
+ pub mii_whitelist: [u8_; 100usize],
+ pub _unk0xFE: u16_,
+ pub magic: u32_,
+}
+impl Default for MiiSelectorConf {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
pub struct MiiSelectorReturn {
- pub no_mii_selected: u32,
- pub guest_mii_was_selected: u32,
- pub guest_mii_index: u32,
- pub mii: [::libc::c_char; 92usize],
- pub _pad0x68: u16,
- pub checksum: u16,
- pub guest_mii_name: [u16; 12usize],
+ pub no_mii_selected: u32_,
+ pub guest_mii_was_selected: u32_,
+ pub guest_mii_index: u32_,
+ pub mii: MiiData,
+ pub _pad0x68: u16_,
+ pub checksum: u16_,
+ pub guest_mii_name: [u16_; 12usize],
+}
+impl Default for MiiSelectorReturn {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
+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 type _bindgen_ty_35 = ::libc::c_uint;
extern "C" {
- pub fn miiSelectorLaunch(
- conf: *const MiiSelectorConf,
- returnbuf: *mut MiiSelectorReturn,
- ) -> Result;
+ pub fn miiSelectorInit(conf: *mut MiiSelectorConf);
+}
+extern "C" {
+ pub fn miiSelectorLaunch(conf: *const MiiSelectorConf, returnbuf: *mut MiiSelectorReturn);
+}
+extern "C" {
+ pub fn miiSelectorSetTitle(conf: *mut MiiSelectorConf, text: *const ::libc::c_char);
+}
+extern "C" {
+ pub fn miiSelectorSetOptions(conf: *mut MiiSelectorConf, options: u32_);
+}
+extern "C" {
+ pub fn miiSelectorWhitelistGuestMii(conf: *mut MiiSelectorConf, index: u32_);
+}
+extern "C" {
+ pub fn miiSelectorBlacklistGuestMii(conf: *mut MiiSelectorConf, index: u32_);
+}
+extern "C" {
+ pub fn miiSelectorWhitelistUserMii(conf: *mut MiiSelectorConf, index: u32_);
+}
+extern "C" {
+ pub fn miiSelectorBlacklistUserMii(conf: *mut MiiSelectorConf, index: u32_);
+}
+extern "C" {
+ pub fn miiSelectorReturnGetName(
+ returnbuf: *const MiiSelectorReturn,
+ out: *mut ::libc::c_char,
+ max_size: size_t,
+ );
+}
+extern "C" {
+ pub fn miiSelectorReturnGetAuthor(
+ returnbuf: *const MiiSelectorReturn,
+ out: *mut ::libc::c_char,
+ max_size: size_t,
+ );
}
extern "C" {
pub fn miiSelectorChecksumIsValid(returnbuf: *const MiiSelectorReturn) -> bool;
}
#[repr(C)]
-pub struct sdmc_dir_t {
- pub magic: u32,
+#[derive(Copy, Clone)]
+pub struct archive_dir_t {
+ pub magic: u32_,
pub fd: Handle,
- pub index: isize,
- pub size: usize,
+ pub index: ssize_t,
+ pub size: size_t,
pub entry_data: [FS_DirectoryEntry; 32usize],
}
+impl Default for archive_dir_t {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
extern "C" {
- pub fn sdmcInit() -> Result;
+ pub fn archiveMountSdmc() -> Result;
}
extern "C" {
- pub fn sdmcWriteSafe(enable: bool);
+ pub fn archiveMount(
+ archiveID: FS_ArchiveID,
+ archivePath: FS_Path,
+ deviceName: *const ::libc::c_char,
+ ) -> Result;
}
extern "C" {
- pub fn sdmcExit() -> Result;
+ pub fn archiveCommitSaveData(deviceName: *const ::libc::c_char) -> Result;
}
extern "C" {
- pub fn sdmc_getmtime(name: *const ::libc::c_char, mtime: *mut u64) -> Result;
+ pub fn archiveUnmount(deviceName: *const ::libc::c_char) -> Result;
}
-#[repr(C)]
-pub struct romfs_header {
- pub headerSize: u32,
- pub dirHashTableOff: u32,
- pub dirHashTableSize: u32,
- pub dirTableOff: u32,
- pub dirTableSize: u32,
- pub fileHashTableOff: u32,
- pub fileHashTableSize: u32,
- pub fileTableOff: u32,
- pub fileTableSize: u32,
- pub fileDataOff: u32,
+extern "C" {
+ pub fn archiveUnmountAll() -> Result;
+}
+extern "C" {
+ pub fn archive_getmtime(name: *const ::libc::c_char, mtime: *mut u64_) -> Result;
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
+pub struct romfs_header {
+ pub headerSize: u32_,
+ pub dirHashTableOff: u32_,
+ pub dirHashTableSize: u32_,
+ pub dirTableOff: u32_,
+ pub dirTableSize: u32_,
+ pub fileHashTableOff: u32_,
+ pub fileHashTableSize: u32_,
+ pub fileTableOff: u32_,
+ pub fileTableSize: u32_,
+ pub fileDataOff: u32_,
+}
+#[repr(C)]
+#[derive(Debug, Default)]
pub struct romfs_dir {
- pub parent: u32,
- pub sibling: u32,
- pub childDir: u32,
- pub childFile: u32,
- pub nextHash: u32,
- pub nameLen: u32,
- pub name: __IncompleteArrayField<u16>,
+ pub parent: u32_,
+ pub sibling: u32_,
+ pub childDir: u32_,
+ pub childFile: u32_,
+ pub nextHash: u32_,
+ pub nameLen: u32_,
+ pub name: __IncompleteArrayField<u16_>,
}
#[repr(C)]
+#[derive(Debug, Default)]
pub struct romfs_file {
- pub parent: u32,
- pub sibling: u32,
- pub dataOff: u64,
- pub dataSize: u64,
- pub nextHash: u32,
- pub nameLen: u32,
- pub name: __IncompleteArrayField<u16>,
+ pub parent: u32_,
+ pub sibling: u32_,
+ pub dataOff: u64_,
+ pub dataSize: u64_,
+ pub nextHash: u32_,
+ pub nameLen: u32_,
+ pub name: __IncompleteArrayField<u16_>,
}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct romfs_mount {
- _unused: [u8; 0],
+extern "C" {
+ pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result;
}
extern "C" {
- pub fn romfsMount(mount: *mut *mut romfs_mount) -> Result;
+ pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result;
}
extern "C" {
- pub fn romfsMountFromFile(file: Handle, offset: u32, mount: *mut *mut romfs_mount) -> Result;
+ pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result;
}
extern "C" {
- pub fn romfsBind(mount: *mut romfs_mount) -> Result;
+ pub fn romfsMountFromTitle(
+ tid: u64_,
+ mediatype: FS_MediaType,
+ name: *const ::libc::c_char,
+ ) -> Result;
}
extern "C" {
- pub fn romfsUnmount(mount: *mut romfs_mount) -> Result;
+ pub fn romfsUnmount(name: *const ::libc::c_char) -> Result;
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct charWidthInfo_s {
pub left: s8,
- pub glyphWidth: u8,
- pub charWidth: u8,
+ pub glyphWidth: u8_,
+ pub charWidth: u8_,
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct TGLP_s {
- pub cellWidth: u8,
- pub cellHeight: u8,
- pub baselinePos: u8,
- pub maxCharWidth: u8,
- pub sheetSize: u32,
- pub nSheets: u16,
- pub sheetFmt: u16,
- pub nRows: u16,
- pub nLines: u16,
- pub sheetWidth: u16,
- pub sheetHeight: u16,
- pub sheetData: *mut u8,
+ pub cellWidth: u8_,
+ pub cellHeight: u8_,
+ pub baselinePos: u8_,
+ pub maxCharWidth: u8_,
+ pub sheetSize: u32_,
+ pub nSheets: u16_,
+ pub sheetFmt: u16_,
+ pub nRows: u16_,
+ pub nLines: u16_,
+ pub sheetWidth: u16_,
+ pub sheetHeight: u16_,
+ pub sheetData: *mut u8_,
+}
+impl Default for TGLP_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
pub type CWDH_s = tag_CWDH_s;
#[repr(C)]
+#[derive(Debug)]
pub struct tag_CWDH_s {
- pub startIndex: u16,
- pub endIndex: u16,
+ pub startIndex: u16_,
+ pub endIndex: u16_,
pub next: *mut CWDH_s,
pub widths: __IncompleteArrayField<charWidthInfo_s>,
}
-pub const CMAP_TYPE_DIRECT: _bindgen_ty_31 = 0;
-pub const CMAP_TYPE_TABLE: _bindgen_ty_31 = 1;
-pub const CMAP_TYPE_SCAN: _bindgen_ty_31 = 2;
-pub type _bindgen_ty_31 = u32;
+impl Default for tag_CWDH_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+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 type _bindgen_ty_36 = ::libc::c_uint;
pub type CMAP_s = tag_CMAP_s;
#[repr(C)]
pub struct tag_CMAP_s {
- pub codeBegin: u16,
- pub codeEnd: u16,
- pub mappingMethod: u16,
- pub reserved: u16,
+ pub codeBegin: u16_,
+ pub codeEnd: u16_,
+ pub mappingMethod: u16_,
+ pub reserved: u16_,
pub next: *mut CMAP_s,
pub __bindgen_anon_1: tag_CMAP_s__bindgen_ty_1,
}
#[repr(C)]
pub struct tag_CMAP_s__bindgen_ty_1 {
- pub indexOffset: __BindgenUnionField<u16>,
- pub indexTable: __BindgenUnionField<[u16; 0usize]>,
+ pub indexOffset: __BindgenUnionField<u16_>,
+ pub indexTable: __BindgenUnionField<[u16_; 0usize]>,
pub __bindgen_anon_1: __BindgenUnionField<tag_CMAP_s__bindgen_ty_1__bindgen_ty_1>,
pub bindgen_union_field: u16,
}
#[repr(C)]
+#[derive(Debug, Default)]
pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1 {
- pub nScanEntries: u16,
+ pub nScanEntries: u16_,
pub scanEntries: __IncompleteArrayField<tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>,
}
#[repr(C)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
- pub code: u16,
- pub glyphIndex: u16,
+ pub code: u16_,
+ pub glyphIndex: u16_,
+}
+impl Default for tag_CMAP_s__bindgen_ty_1 {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
+impl Default for tag_CMAP_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct FINF_s {
- pub signature: u32,
- pub sectionSize: u32,
- pub fontType: u8,
- pub lineFeed: u8,
- pub alterCharIndex: u16,
+ pub signature: u32_,
+ pub sectionSize: u32_,
+ pub fontType: u8_,
+ pub lineFeed: u8_,
+ pub alterCharIndex: u16_,
pub defaultWidth: charWidthInfo_s,
- pub encoding: u8,
+ pub encoding: u8_,
pub tglp: *mut TGLP_s,
pub cwdh: *mut CWDH_s,
pub cmap: *mut CMAP_s,
- pub height: u8,
- pub width: u8,
- pub ascent: u8,
- pub padding: u8,
+ pub height: u8_,
+ pub width: u8_,
+ pub ascent: u8_,
+ pub padding: u8_,
+}
+impl Default for FINF_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
}
#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct CFNT_s {
- pub signature: u32,
- pub endianness: u16,
- pub headerSize: u16,
- pub version: u32,
- pub fileSize: u32,
- pub nBlocks: u32,
+ pub signature: u32_,
+ pub endianness: u16_,
+ pub headerSize: u16_,
+ pub version: u32_,
+ pub fileSize: u32_,
+ pub nBlocks: u32_,
pub finf: FINF_s,
}
+impl Default for CFNT_s {
+ fn default() -> Self {
+ unsafe { ::core::mem::zeroed() }
+ }
+}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct fontGlyphPos_s {
pub sheetIndex: ::libc::c_int,
pub xOffset: f32,
@@ -9870,7 +13103,7 @@ pub struct fontGlyphPos_s {
pub vtxcoord: fontGlyphPos_s__bindgen_ty_2,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct fontGlyphPos_s__bindgen_ty_1 {
pub left: f32,
pub top: f32,
@@ -9878,32 +13111,66 @@ pub struct fontGlyphPos_s__bindgen_ty_1 {
pub bottom: f32,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
+#[derive(Debug, Default, Copy, Clone)]
pub struct fontGlyphPos_s__bindgen_ty_2 {
pub left: f32,
pub top: f32,
pub right: f32,
pub bottom: f32,
}
-pub const GLYPH_POS_CALC_VTXCOORD: _bindgen_ty_32 = 1;
-pub const GLYPH_POS_AT_BASELINE: _bindgen_ty_32 = 2;
-pub const GLYPH_POS_Y_POINTS_UP: _bindgen_ty_32 = 4;
-pub type _bindgen_ty_32 = u32;
+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 type _bindgen_ty_37 = ::libc::c_uint;
extern "C" {
pub fn fontEnsureMapped() -> Result;
}
extern "C" {
- pub fn fontGlyphIndexFromCodePoint(codePoint: u32) -> ::libc::c_int;
+ pub fn fontFixPointers(font: *mut CFNT_s);
+}
+extern "C" {
+ pub fn fontGlyphIndexFromCodePoint(font: *mut CFNT_s, codePoint: u32_) -> ::libc::c_int;
}
extern "C" {
- pub fn fontGetCharWidthInfo(glyphIndex: ::libc::c_int) -> *mut charWidthInfo_s;
+ pub fn fontGetCharWidthInfo(
+ font: *mut CFNT_s,
+ glyphIndex: ::libc::c_int,
+ ) -> *mut charWidthInfo_s;
}
extern "C" {
pub fn fontCalcGlyphPos(
out: *mut fontGlyphPos_s,
+ font: *mut CFNT_s,
glyphIndex: ::libc::c_int,
- flags: u32,
+ flags: u32_,
scaleX: f32,
scaleY: f32,
);
}
+extern "C" {
+ pub fn gdbHioDevInit() -> ::libc::c_int;
+}
+extern "C" {
+ pub fn gdbHioDevExit();
+}
+extern "C" {
+ pub fn gdbHioDevGetStdin() -> ::libc::c_int;
+}
+extern "C" {
+ pub fn gdbHioDevGetStdout() -> ::libc::c_int;
+}
+extern "C" {
+ pub fn gdbHioDevGetStderr() -> ::libc::c_int;
+}
+extern "C" {
+ pub fn gdbHioDevRedirectStdStreams(in_: bool, out: bool, err: bool) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn gdbHioDevGettimeofday(tv: *mut timeval, tz: *mut ::libc::c_void) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn gdbHioDevIsatty(fd: ::libc::c_int) -> ::libc::c_int;
+}
+extern "C" {
+ pub fn gdbHioDevSystem(command: *const ::libc::c_char) -> ::libc::c_int;
+}