From 22183d8765261e8d16ad65b31b9a7f95757303ea Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 02:01:27 +0200 Subject: [PATCH 01/57] Improve calling ``ctru_sys `` functions ergonomics Now instead of handling the error number manually, you can use ``LibCtruError(ctru_sys::xxx())?`` for the cases where ``if r < 0`` executes ``Err(r.into())`` Most changes are migrations to the new system, relevant code changes are in ``src/error.rs`` --- ctru-rs/src/error.rs | 33 +++ ctru-rs/src/lib.rs | 1 + ctru-rs/src/romfs.rs | 7 +- ctru-rs/src/services/apt.rs | 18 +- ctru-rs/src/services/cam.rs | 387 +++++++++-------------------------- ctru-rs/src/services/cfgu.rs | 55 ++--- ctru-rs/src/services/hid.rs | 9 +- ctru-rs/src/services/ps.rs | 26 +-- ctru-rs/src/services/soc.rs | 6 +- ctru-rs/src/services/sslc.rs | 18 +- 10 files changed, 176 insertions(+), 384 deletions(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 047f811..d47d24c 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -1,11 +1,38 @@ use std::error; use std::ffi::CStr; use std::fmt; +use std::ops::{ControlFlow, FromResidual, Try}; use ctru_sys::result::{R_DESCRIPTION, R_LEVEL, R_MODULE, R_SUMMARY}; pub type Result = ::std::result::Result; +#[derive(Debug, Clone, PartialEq, PartialOrd)] +#[repr(transparent)] +pub(crate) struct LibCtruError(pub i32); + +impl Try for LibCtruError { + type Output = (); + type Residual = crate::Result; + + fn from_output(_: Self::Output) -> Self { + Self(0) + } + + fn branch(self) -> ControlFlow { + match self.0 { + 0 => ControlFlow::Continue(()), + _ => ControlFlow::Break(Err(self.into())) + } + } +} + +impl FromResidual for LibCtruError { + fn from_residual(_: ::Residual) -> Self { + Self(1) + } +} + /// The error type returned by all libctru functions. #[non_exhaustive] pub enum Error { @@ -39,6 +66,12 @@ impl From for Error { } } +impl From for Error { + fn from(err: LibCtruError) -> Self { + Self::Os(err.0) + } +} + impl fmt::Debug for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index 70085e9..264d0ef 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -2,6 +2,7 @@ #![crate_name = "ctru"] #![feature(test)] #![feature(custom_test_frameworks)] +#![feature(try_trait_v2)] #![test_runner(test_runner::run)] extern "C" fn services_deinit() { diff --git a/ctru-rs/src/romfs.rs b/ctru-rs/src/romfs.rs index e054985..ba67574 100644 --- a/ctru-rs/src/romfs.rs +++ b/ctru-rs/src/romfs.rs @@ -13,6 +13,7 @@ use once_cell::sync::Lazy; use std::ffi::CStr; use std::sync::Mutex; +use crate::error::LibCtruError; use crate::services::ServiceReference; @@ -30,11 +31,7 @@ impl RomFS { true, || { let mount_name = CStr::from_bytes_with_nul(b"romfs\0").unwrap(); - let r = unsafe { ctru_sys::romfsMountSelf(mount_name.as_ptr()) }; - if r < 0 { - return Err(r.into()); - } - + LibCtruError(unsafe { ctru_sys::romfsMountSelf(mount_name.as_ptr()) })?; Ok(()) }, || { diff --git a/ctru-rs/src/services/apt.rs b/ctru-rs/src/services/apt.rs index 4662a4e..49a49bd 100644 --- a/ctru-rs/src/services/apt.rs +++ b/ctru-rs/src/services/apt.rs @@ -1,14 +1,12 @@ +use crate::error::LibCtruError; + pub struct Apt(()); impl Apt { pub fn init() -> crate::Result { unsafe { - let r = ctru_sys::aptInit(); - if r < 0 { - Err(r.into()) - } else { - Ok(Apt(())) - } + LibCtruError(ctru_sys::aptInit())?; + Ok(Apt(())) } } @@ -18,12 +16,8 @@ impl Apt { pub fn set_app_cpu_time_limit(&self, percent: u32) -> crate::Result<()> { unsafe { - let r = ctru_sys::APT_SetAppCpuTimeLimit(percent); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::APT_SetAppCpuTimeLimit(percent))?; + Ok(()) } } } diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index d8671ef..18960db 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -7,6 +7,7 @@ use crate::services::gspgpu::FramebufferFormat; use bitflags::bitflags; use ctru_sys::Handle; use std::time::Duration; +use crate::error::LibCtruError; /// A reference-counted handle to the CAM service and the usable cameras. /// The service is closed when all instances of this struct fall out of scope. @@ -267,24 +268,15 @@ impl BothOutwardCam { brightness_synchronization: bool, ) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetBrightnessSynchronization(brightness_synchronization); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetBrightnessSynchronization(brightness_synchronization))?; + Ok(()) } } fn synchronize_vsync_timing(&self) -> crate::Result<()> { unsafe { - let r = - ctru_sys::CAMU_SynchronizeVsyncTiming(ctru_sys::SELECT_OUT1, ctru_sys::SELECT_OUT2); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SynchronizeVsyncTiming(ctru_sys::SELECT_OUT1, ctru_sys::SELECT_OUT2))?; + Ok(()) } } } @@ -313,12 +305,8 @@ pub trait Camera { fn is_busy(&self) -> crate::Result { unsafe { let mut is_busy = false; - let r = ctru_sys::CAMU_IsBusy(&mut is_busy, self.port_as_raw()); - if r < 0 { - Err(r.into()) - } else { - Ok(is_busy) - } + LibCtruError(ctru_sys::CAMU_IsBusy(&mut is_busy, self.port_as_raw()))?; + Ok(is_busy) } } @@ -327,12 +315,8 @@ pub trait Camera { fn get_transfer_bytes(&self) -> crate::Result { unsafe { let mut transfer_bytes = 0; - let r = ctru_sys::CAMU_GetTransferBytes(&mut transfer_bytes, self.port_as_raw()); - if r < 0 { - Err(r.into()) - } else { - Ok(transfer_bytes) - } + LibCtruError(ctru_sys::CAMU_GetTransferBytes(&mut transfer_bytes, self.port_as_raw()))?; + Ok(transfer_bytes) } } @@ -340,12 +324,8 @@ pub trait Camera { /// [Camera::set_trimming_params] fn set_trimming(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetTrimming(self.port_as_raw(), enabled); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetTrimming(self.port_as_raw(), enabled))?; + Ok(()) } } @@ -353,30 +333,22 @@ pub trait Camera { fn is_trimming_enabled(&self) -> crate::Result { unsafe { let mut trimming = false; - let r = ctru_sys::CAMU_IsTrimming(&mut trimming, self.port_as_raw()); - if r < 0 { - Err(r.into()) - } else { - Ok(trimming) - } + LibCtruError(ctru_sys::CAMU_IsTrimming(&mut trimming, self.port_as_raw()))?; + Ok(trimming) } } /// Sets trimming parameters based on coordinates specified inside a [CamTrimmingParams] fn set_trimming_params(&mut self, params: CamTrimmingParams) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetTrimmingParams( + LibCtruError(ctru_sys::CAMU_SetTrimmingParams( self.port_as_raw(), params.x_start, params.y_start, params.x_end, params.y_end, - ); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + ))?; + Ok(()) } } @@ -387,23 +359,20 @@ pub trait Camera { let mut y_start = 0; let mut x_end = 0; let mut y_end = 0; - let r = ctru_sys::CAMU_GetTrimmingParams( + LibCtruError(ctru_sys::CAMU_GetTrimmingParams( &mut x_start, &mut y_start, &mut x_end, &mut y_end, self.port_as_raw(), - ); - if r < 0 { - Err(r.into()) - } else { - Ok(CamTrimmingParams { - x_start, - y_start, - x_end, - y_end, - }) - } + ))?; + + Ok(CamTrimmingParams { + x_start, + y_start, + x_end, + y_end, + }) } } @@ -418,42 +387,30 @@ pub trait Camera { cam_height: i16, ) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetTrimmingParamsCenter( + LibCtruError(ctru_sys::CAMU_SetTrimmingParamsCenter( self.port_as_raw(), trim_width, trim_height, cam_width, cam_height, - ); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + ))?; + Ok(()) } } /// Sets the exposure level of the camera fn set_exposure(&mut self, exposure: i8) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetExposure(self.camera_as_raw(), exposure); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetExposure(self.camera_as_raw(), exposure))?; + Ok(()) } } /// Sets the white balance mod of the camera based on the passed [CamWhiteBalance] argument fn set_white_balance(&mut self, white_balance: CamWhiteBalance) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetWhiteBalance(self.camera_as_raw(), white_balance.bits()); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetWhiteBalance(self.camera_as_raw(), white_balance.bits()))?; + Ok(()) } } @@ -464,39 +421,27 @@ pub trait Camera { white_balance: CamWhiteBalance, ) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetWhiteBalanceWithoutBaseUp( + LibCtruError(ctru_sys::CAMU_SetWhiteBalanceWithoutBaseUp( self.camera_as_raw(), white_balance.bits(), - ); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + ))?; + Ok(()) } } /// Sets the sharpness of the camera fn set_sharpness(&mut self, sharpness: i8) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetSharpness(self.camera_as_raw(), sharpness); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetSharpness(self.camera_as_raw(), sharpness))?; + Ok(()) } } /// Sets whether auto exposure is enabled or disabled for the camera fn set_auto_exposure(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetAutoExposure(self.camera_as_raw(), enabled); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetAutoExposure(self.camera_as_raw(), enabled))?; + Ok(()) } } @@ -504,24 +449,16 @@ pub trait Camera { fn is_auto_exposure_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - let r = ctru_sys::CAMU_IsAutoExposure(&mut enabled, self.camera_as_raw()); - if r < 0 { - Err(r.into()) - } else { - Ok(enabled) - } + LibCtruError(ctru_sys::CAMU_IsAutoExposure(&mut enabled, self.camera_as_raw()))?; + Ok(enabled) } } /// Sets whether auto white balance is enabled or disabled for the camera fn set_auto_white_balance(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetAutoWhiteBalance(self.camera_as_raw(), enabled); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalance(self.camera_as_raw(), enabled))?; + Ok(()) } } @@ -529,25 +466,16 @@ pub trait Camera { fn is_auto_white_balance_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - let r = ctru_sys::CAMU_IsAutoWhiteBalance(&mut enabled, self.camera_as_raw()); - if r < 0 { - Err(r.into()) - } else { - Ok(enabled) - } + LibCtruError(ctru_sys::CAMU_IsAutoWhiteBalance(&mut enabled, self.camera_as_raw()))?; + Ok(enabled) } } /// Sets the flip direction of the camera's image based on the passed [CamFlip] argument fn flip_image(&mut self, flip: CamFlip) -> crate::Result<()> { unsafe { - let r = - ctru_sys::CAMU_FlipImage(self.camera_as_raw(), flip.bits(), ctru_sys::CONTEXT_A); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_FlipImage(self.camera_as_raw(), flip.bits(), ctru_sys::CONTEXT_A))?; + Ok(()) } } @@ -571,7 +499,7 @@ pub trait Camera { crop_1: (i16, i16), ) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetDetailSize( + LibCtruError(ctru_sys::CAMU_SetDetailSize( self.camera_as_raw(), width, height, @@ -580,48 +508,32 @@ pub trait Camera { crop_1.0, crop_1.1, ctru_sys::CONTEXT_A, - ); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + ))?; + Ok(()) } } /// Sets the view size of the camera based on the passed [CamSize] argument. fn set_view_size(&mut self, size: CamSize) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetSize(self.camera_as_raw(), size.bits(), ctru_sys::CONTEXT_A); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetSize(self.camera_as_raw(), size.bits(), ctru_sys::CONTEXT_A))?; + Ok(()) } } /// Sets the frame rate of the camera based on the passed [CamFrameRate] argument. fn set_frame_rate(&mut self, frame_rate: CamFrameRate) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetFrameRate(self.camera_as_raw(), frame_rate.bits()); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetFrameRate(self.camera_as_raw(), frame_rate.bits()))?; + Ok(()) } } /// Sets the photo mode of the camera based on the passed [CamPhotoMode] argument. fn set_photo_mode(&mut self, photo_mode: CamPhotoMode) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetPhotoMode(self.camera_as_raw(), photo_mode.bits()); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetPhotoMode(self.camera_as_raw(), photo_mode.bits()))?; + Ok(()) } } @@ -630,53 +542,36 @@ pub trait Camera { /// Multiple effects can be set at once by combining the bitflags of [CamEffect] fn set_effect(&mut self, effect: CamEffect) -> crate::Result<()> { unsafe { - let r = - ctru_sys::CAMU_SetEffect(self.camera_as_raw(), effect.bits(), ctru_sys::CONTEXT_A); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetEffect(self.camera_as_raw(), effect.bits(), ctru_sys::CONTEXT_A))?; + Ok(()) } } /// Sets the contrast of the camera based on the passed [CamContrast] argument. fn set_contrast(&mut self, contrast: CamContrast) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetContrast(self.camera_as_raw(), contrast.bits()); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetContrast(self.camera_as_raw(), contrast.bits()))?; + Ok(()) } } /// Sets the lens correction of the camera based on the passed [CamLensCorrection] argument. fn set_lens_correction(&mut self, lens_correction: CamLensCorrection) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetLensCorrection(self.camera_as_raw(), lens_correction.bits()); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetLensCorrection(self.camera_as_raw(), lens_correction.bits()))?; + Ok(()) } } /// Sets the output format of the camera based on the passed [CamOutputFormat] argument. fn set_output_format(&mut self, format: CamOutputFormat) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetOutputFormat( + LibCtruError(ctru_sys::CAMU_SetOutputFormat( self.camera_as_raw(), format.bits(), ctru_sys::CONTEXT_A, - ); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + ))?; + Ok(()) } } @@ -696,12 +591,8 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetAutoExposureWindow(self.camera_as_raw(), x, y, width, height); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetAutoExposureWindow(self.camera_as_raw(), x, y, width, height))?; + Ok(()) } } @@ -721,25 +612,16 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - let r = - ctru_sys::CAMU_SetAutoWhiteBalanceWindow(self.camera_as_raw(), x, y, width, height); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalanceWindow(self.camera_as_raw(), x, y, width, height))?; + Ok(()) } } /// Sets whether the noise filter should be enabled or disabled for the camera fn set_noise_filter(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetNoiseFilter(self.camera_as_raw(), enabled); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetNoiseFilter(self.camera_as_raw(), enabled))?; + Ok(()) } } @@ -750,12 +632,8 @@ pub trait Camera { data: ImageQualityCalibrationData, ) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetImageQualityCalibrationData(data.0); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetImageQualityCalibrationData(data.0))?; + Ok(()) } } @@ -763,12 +641,8 @@ pub trait Camera { fn get_image_quality_calibration_data(&self) -> crate::Result { unsafe { let mut data = ImageQualityCalibrationData::default(); - let r = ctru_sys::CAMU_GetImageQualityCalibrationData(&mut data.0); - if r < 0 { - Err(r.into()) - } else { - Ok(data) - } + LibCtruError(ctru_sys::CAMU_GetImageQualityCalibrationData(&mut data.0))?; + Ok(data) } } @@ -776,12 +650,8 @@ pub trait Camera { // TODO: Explain sleep camera fn set_sleep_camera(&mut self) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_SetSleepCamera(self.camera_as_raw()); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_SetSleepCamera(self.camera_as_raw()))?; + Ok(()) } } @@ -804,12 +674,8 @@ pub trait Camera { ) -> crate::Result> { let transfer_unit = unsafe { let mut buf_size = 0; - let r = ctru_sys::CAMU_GetMaxBytes(&mut buf_size, width as i16, height as i16); - if r < 0 { - Err(crate::Error::from(r)) - } else { - Ok(buf_size) - } + LibCtruError(ctru_sys::CAMU_GetMaxBytes(&mut buf_size, width as i16, height as i16))?; + Ok::(buf_size) }?; let screen_size = u32::from(width) * u32::from(width) * 2; @@ -817,83 +683,40 @@ pub trait Camera { let mut buf = vec![0u8; usize::try_from(screen_size).unwrap()]; unsafe { - let r = ctru_sys::CAMU_SetTransferBytes( + LibCtruError(ctru_sys::CAMU_SetTransferBytes( self.port_as_raw(), transfer_unit, width as i16, height as i16, - ); - if r < 0 { - return Err(r.into()); - } - }; - - unsafe { - let r = ctru_sys::CAMU_Activate(self.camera_as_raw()); - if r < 0 { - return Err(r.into()); - } + ))?; }; unsafe { - let r = ctru_sys::CAMU_ClearBuffer(self.port_as_raw()); - if r < 0 { - return Err(r.into()); - } - }; - - unsafe { - let r = ctru_sys::CAMU_StartCapture(self.port_as_raw()); - if r < 0 { - return Err(r.into()); - } + LibCtruError(ctru_sys::CAMU_Activate(self.camera_as_raw()))?; + LibCtruError(ctru_sys::CAMU_ClearBuffer(self.port_as_raw()))?; + LibCtruError(ctru_sys::CAMU_StartCapture(self.port_as_raw()))?; }; let receive_event = unsafe { let mut completion_handle: Handle = 0; - let r = ctru_sys::CAMU_SetReceiving( + LibCtruError(ctru_sys::CAMU_SetReceiving( &mut completion_handle, buf.as_mut_ptr() as *mut ::libc::c_void, self.port_as_raw(), screen_size, transfer_unit.try_into().unwrap(), - ); - if r < 0 { - Err(crate::Error::from(r)) - } else { - Ok(completion_handle) - } + ))?; + Ok::(completion_handle) }?; unsafe { - let r = ctru_sys::svcWaitSynchronization( + LibCtruError(ctru_sys::svcWaitSynchronization( receive_event, timeout.as_nanos().try_into().unwrap(), - ); - if r < 0 { - return Err(r.into()); - } - }; - - unsafe { - let r = ctru_sys::CAMU_StopCapture(self.port_as_raw()); - if r < 0 { - return Err(r.into()); - } - }; - - unsafe { - let r = ctru_sys::svcCloseHandle(receive_event); - if r < 0 { - return Err(r.into()); - } - }; - - unsafe { - let r = ctru_sys::CAMU_Activate(ctru_sys::SELECT_NONE); - if r < 0 { - return Err(r.into()); - } + ))?; + LibCtruError(ctru_sys::CAMU_StopCapture(self.port_as_raw()))?; + LibCtruError(ctru_sys::svcCloseHandle(receive_event))?; + LibCtruError(ctru_sys::CAMU_Activate(ctru_sys::SELECT_NONE))?; }; Ok(buf) @@ -910,29 +733,21 @@ impl Cam { /// rare in practice. pub fn init() -> crate::Result { unsafe { - let r = ctru_sys::camInit(); - if r < 0 { - Err(r.into()) - } else { - Ok(Cam { - inner_cam: InwardCam, - outer_right_cam: OutwardRightCam, - outer_left_cam: OutwardLeftCam, - both_outer_cams: BothOutwardCam, - }) - } + LibCtruError(ctru_sys::camInit())?; + Ok(Cam { + inner_cam: InwardCam, + outer_right_cam: OutwardRightCam, + outer_left_cam: OutwardLeftCam, + both_outer_cams: BothOutwardCam, + }) } } /// Plays the specified sound based on the [CamShutterSoundType] argument pub fn play_shutter_sound(&self, sound: CamShutterSoundType) -> crate::Result<()> { unsafe { - let r = ctru_sys::CAMU_PlayShutterSound(sound.bits()); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::CAMU_PlayShutterSound(sound.bits()))?; + Ok(()) } } } diff --git a/ctru-rs/src/services/cfgu.rs b/ctru-rs/src/services/cfgu.rs index bc8d986..9863cda 100644 --- a/ctru-rs/src/services/cfgu.rs +++ b/ctru-rs/src/services/cfgu.rs @@ -2,6 +2,8 @@ //! //! This module contains basic methods to retrieve and change configuration from the console. +use crate::error::LibCtruError; + #[derive(Copy, Clone, Debug)] #[repr(u32)] pub enum Region { @@ -60,77 +62,48 @@ impl Cfgu { /// as many times as desired and the service will not exit until all /// instances of Cfgu drop out of scope. pub fn init() -> crate::Result { - unsafe { - let r = ctru_sys::cfguInit(); - if r < 0 { - Err(r.into()) - } else { - Ok(Cfgu(())) - } - } + LibCtruError(unsafe { ctru_sys::cfguInit() })?; + Ok(Cfgu(())) } /// Gets system region from secure info pub fn get_region(&self) -> crate::Result { let mut region: u8 = 0; - let r = unsafe { ctru_sys::CFGU_SecureInfoGetRegion(&mut region) }; - if r < 0 { - Err(r.into()) - } else { - // The system shouldn't give an invalid value - Ok(Region::try_from(region).unwrap()) - } + LibCtruError(unsafe { ctru_sys::CFGU_SecureInfoGetRegion(&mut region) })?; + Ok(Region::try_from(region).unwrap()) } /// Gets system's model pub fn get_model(&self) -> crate::Result { let mut model: u8 = 0; - let r = unsafe { ctru_sys::CFGU_GetSystemModel(&mut model) }; - if r < 0 { - Err(r.into()) - } else { - // The system shouldn't give an invalid value - Ok(SystemModel::try_from(model).unwrap()) - } + LibCtruError(unsafe { ctru_sys::CFGU_GetSystemModel(&mut model) })?; + Ok(SystemModel::try_from(model).unwrap()) } /// Gets system's language pub fn get_language(&self) -> crate::Result { let mut language: u8 = 0; - let r = unsafe { ctru_sys::CFGU_GetSystemLanguage(&mut language) }; - if r < 0 { - Err(r.into()) - } else { - // The system shouldn't give an invalid value - Ok(Language::try_from(language).unwrap()) - } + LibCtruError(unsafe { ctru_sys::CFGU_GetSystemLanguage(&mut language) })?; + Ok(Language::try_from(language).unwrap()) } /// Checks if NFC is supported by the console pub fn is_nfc_supported(&self) -> crate::Result { let mut supported: bool = false; - let r = unsafe { ctru_sys::CFGU_IsNFCSupported(&mut supported) }; - if r < 0 { - Err(r.into()) - } else { - Ok(supported) - } + LibCtruError(unsafe { ctru_sys::CFGU_IsNFCSupported(&mut supported) })?; + Ok(supported) } /// Check if the console is from the 2DS family (2DS, New2DS, New2DSXL) pub fn is_2ds_family(&self) -> crate::Result { let mut is_2ds_family: u8 = 0; - let r = unsafe { ctru_sys::CFGU_GetModelNintendo2DS(&mut is_2ds_family) }; - if r < 0 { - Err(r.into()) - } else { - Ok(is_2ds_family == 0) - } + LibCtruError(unsafe { ctru_sys::CFGU_GetModelNintendo2DS(&mut is_2ds_family) })?; + Ok(is_2ds_family == 0) } } diff --git a/ctru-rs/src/services/hid.rs b/ctru-rs/src/services/hid.rs index 18790f1..21cf952 100644 --- a/ctru-rs/src/services/hid.rs +++ b/ctru-rs/src/services/hid.rs @@ -4,6 +4,7 @@ //! and circle pad information. It also provides information from the sound volume slider, //! the accelerometer, and the gyroscope. +use crate::error::LibCtruError; bitflags::bitflags! { /// A set of flags corresponding to the button and directional pad /// inputs on the 3DS @@ -62,12 +63,8 @@ pub struct CirclePosition(ctru_sys::circlePosition); impl Hid { pub fn init() -> crate::Result { unsafe { - let r = ctru_sys::hidInit(); - if r < 0 { - Err(r.into()) - } else { - Ok(Hid(())) - } + LibCtruError(ctru_sys::hidInit())?; + Ok(Hid(())) } } diff --git a/ctru-rs/src/services/ps.rs b/ctru-rs/src/services/ps.rs index 3b4ef1a..b1585df 100644 --- a/ctru-rs/src/services/ps.rs +++ b/ctru-rs/src/services/ps.rs @@ -4,6 +4,8 @@ //! As such, it is initialized by default in `ctru::init` instead of having a safety handler //! See also +use crate::error::LibCtruError; + #[repr(u32)] pub enum AESAlgorithm { CbcEnc, @@ -31,32 +33,20 @@ pub enum AESKeyType { pub fn local_friend_code_seed() -> crate::Result { let mut seed: u64 = 0; - let r = unsafe { ctru_sys::PS_GetLocalFriendCodeSeed(&mut seed) }; - if r < 0 { - Err(r.into()) - } else { - Ok(seed) - } + LibCtruError(unsafe { ctru_sys::PS_GetLocalFriendCodeSeed(&mut seed) })?; + Ok(seed) } pub fn device_id() -> crate::Result { let mut id: u32 = 0; - let r = unsafe { ctru_sys::PS_GetDeviceId(&mut id) }; - if r < 0 { - Err(r.into()) - } else { - Ok(id) - } + LibCtruError(unsafe { ctru_sys::PS_GetDeviceId(&mut id) })?; + Ok(id) } pub fn generate_random_bytes(out: &mut [u8]) -> crate::Result<()> { - let r = unsafe { ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len() as u32) }; - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(unsafe { ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len() as u32) })?; + Ok(()) } #[cfg(test)] diff --git a/ctru-rs/src/services/soc.rs b/ctru-rs/src/services/soc.rs index dad4188..1579d51 100644 --- a/ctru-rs/src/services/soc.rs +++ b/ctru-rs/src/services/soc.rs @@ -5,6 +5,7 @@ use std::sync::Mutex; use crate::services::ServiceReference; use crate::Error; +use crate::error::LibCtruError; /// Soc service. Initializing this service will enable the use of network sockets and utilities /// such as those found in `std::net`. The service will be closed when this struct is is dropped. @@ -38,10 +39,7 @@ impl Soc { false, || { let soc_mem = unsafe { memalign(0x1000, num_bytes) } as *mut u32; - let r = unsafe { ctru_sys::socInit(soc_mem, num_bytes as u32) }; - if r < 0 { - return Err(r.into()); - } + LibCtruError(unsafe { ctru_sys::socInit(soc_mem, num_bytes as u32) })?; Ok(()) }, diff --git a/ctru-rs/src/services/sslc.rs b/ctru-rs/src/services/sslc.rs index bdd5407..ef1e015 100644 --- a/ctru-rs/src/services/sslc.rs +++ b/ctru-rs/src/services/sslc.rs @@ -1,29 +1,23 @@ // TODO: Implement remaining functions +use crate::error::LibCtruError; + pub struct SslC(()); impl SslC { /// Initialize sslc pub fn init() -> crate::Result { unsafe { - let r = ctru_sys::sslcInit(0); - if r < 0 { - Err(r.into()) - } else { - Ok(SslC(())) - } + LibCtruError(ctru_sys::sslcInit(0))?; + Ok(SslC(())) } } /// Fill `buf` with `buf.len()` random bytes pub fn generate_random_data(&self, buf: &mut [u8]) -> crate::Result<()> { unsafe { - let r = ctru_sys::sslcGenerateRandomData(buf.as_ptr() as _, buf.len() as u32); - if r < 0 { - Err(r.into()) - } else { - Ok(()) - } + LibCtruError(ctru_sys::sslcGenerateRandomData(buf.as_ptr() as _, buf.len() as u32))?; + Ok(()) } } } From 77709c3afddf22cd7edecd7e265ebb9ac4b44507 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 02:04:15 +0200 Subject: [PATCH 02/57] Fix formatting --- ctru-rs/src/error.rs | 2 +- ctru-rs/src/romfs.rs | 2 +- ctru-rs/src/services/cam.rs | 101 ++++++++++++++++++++++++++++------- ctru-rs/src/services/ps.rs | 4 +- ctru-rs/src/services/soc.rs | 2 +- ctru-rs/src/services/sslc.rs | 5 +- 6 files changed, 92 insertions(+), 24 deletions(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index d47d24c..73b78b5 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -22,7 +22,7 @@ impl Try for LibCtruError { fn branch(self) -> ControlFlow { match self.0 { 0 => ControlFlow::Continue(()), - _ => ControlFlow::Break(Err(self.into())) + _ => ControlFlow::Break(Err(self.into())), } } } diff --git a/ctru-rs/src/romfs.rs b/ctru-rs/src/romfs.rs index ba67574..0b706b4 100644 --- a/ctru-rs/src/romfs.rs +++ b/ctru-rs/src/romfs.rs @@ -10,10 +10,10 @@ //! romfs_dir = "romfs" //! ``` +use crate::error::LibCtruError; use once_cell::sync::Lazy; use std::ffi::CStr; use std::sync::Mutex; -use crate::error::LibCtruError; use crate::services::ServiceReference; diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index 18960db..86dd83f 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -3,11 +3,11 @@ //! The CAM service provides access to the cameras. Cameras can return 2D images //! in the form of byte vectors which can be used for display or other usages. +use crate::error::LibCtruError; use crate::services::gspgpu::FramebufferFormat; use bitflags::bitflags; use ctru_sys::Handle; use std::time::Duration; -use crate::error::LibCtruError; /// A reference-counted handle to the CAM service and the usable cameras. /// The service is closed when all instances of this struct fall out of scope. @@ -268,14 +268,19 @@ impl BothOutwardCam { brightness_synchronization: bool, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetBrightnessSynchronization(brightness_synchronization))?; + LibCtruError(ctru_sys::CAMU_SetBrightnessSynchronization( + brightness_synchronization, + ))?; Ok(()) } } fn synchronize_vsync_timing(&self) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SynchronizeVsyncTiming(ctru_sys::SELECT_OUT1, ctru_sys::SELECT_OUT2))?; + LibCtruError(ctru_sys::CAMU_SynchronizeVsyncTiming( + ctru_sys::SELECT_OUT1, + ctru_sys::SELECT_OUT2, + ))?; Ok(()) } } @@ -315,7 +320,10 @@ pub trait Camera { fn get_transfer_bytes(&self) -> crate::Result { unsafe { let mut transfer_bytes = 0; - LibCtruError(ctru_sys::CAMU_GetTransferBytes(&mut transfer_bytes, self.port_as_raw()))?; + LibCtruError(ctru_sys::CAMU_GetTransferBytes( + &mut transfer_bytes, + self.port_as_raw(), + ))?; Ok(transfer_bytes) } } @@ -409,7 +417,10 @@ pub trait Camera { /// Sets the white balance mod of the camera based on the passed [CamWhiteBalance] argument fn set_white_balance(&mut self, white_balance: CamWhiteBalance) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetWhiteBalance(self.camera_as_raw(), white_balance.bits()))?; + LibCtruError(ctru_sys::CAMU_SetWhiteBalance( + self.camera_as_raw(), + white_balance.bits(), + ))?; Ok(()) } } @@ -440,7 +451,10 @@ pub trait Camera { /// Sets whether auto exposure is enabled or disabled for the camera fn set_auto_exposure(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoExposure(self.camera_as_raw(), enabled))?; + LibCtruError(ctru_sys::CAMU_SetAutoExposure( + self.camera_as_raw(), + enabled, + ))?; Ok(()) } } @@ -449,7 +463,10 @@ pub trait Camera { fn is_auto_exposure_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - LibCtruError(ctru_sys::CAMU_IsAutoExposure(&mut enabled, self.camera_as_raw()))?; + LibCtruError(ctru_sys::CAMU_IsAutoExposure( + &mut enabled, + self.camera_as_raw(), + ))?; Ok(enabled) } } @@ -457,7 +474,10 @@ pub trait Camera { /// Sets whether auto white balance is enabled or disabled for the camera fn set_auto_white_balance(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalance(self.camera_as_raw(), enabled))?; + LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalance( + self.camera_as_raw(), + enabled, + ))?; Ok(()) } } @@ -466,7 +486,10 @@ pub trait Camera { fn is_auto_white_balance_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - LibCtruError(ctru_sys::CAMU_IsAutoWhiteBalance(&mut enabled, self.camera_as_raw()))?; + LibCtruError(ctru_sys::CAMU_IsAutoWhiteBalance( + &mut enabled, + self.camera_as_raw(), + ))?; Ok(enabled) } } @@ -474,7 +497,11 @@ pub trait Camera { /// Sets the flip direction of the camera's image based on the passed [CamFlip] argument fn flip_image(&mut self, flip: CamFlip) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_FlipImage(self.camera_as_raw(), flip.bits(), ctru_sys::CONTEXT_A))?; + LibCtruError(ctru_sys::CAMU_FlipImage( + self.camera_as_raw(), + flip.bits(), + ctru_sys::CONTEXT_A, + ))?; Ok(()) } } @@ -516,7 +543,11 @@ pub trait Camera { /// Sets the view size of the camera based on the passed [CamSize] argument. fn set_view_size(&mut self, size: CamSize) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetSize(self.camera_as_raw(), size.bits(), ctru_sys::CONTEXT_A))?; + LibCtruError(ctru_sys::CAMU_SetSize( + self.camera_as_raw(), + size.bits(), + ctru_sys::CONTEXT_A, + ))?; Ok(()) } } @@ -524,7 +555,10 @@ pub trait Camera { /// Sets the frame rate of the camera based on the passed [CamFrameRate] argument. fn set_frame_rate(&mut self, frame_rate: CamFrameRate) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetFrameRate(self.camera_as_raw(), frame_rate.bits()))?; + LibCtruError(ctru_sys::CAMU_SetFrameRate( + self.camera_as_raw(), + frame_rate.bits(), + ))?; Ok(()) } } @@ -532,7 +566,10 @@ pub trait Camera { /// Sets the photo mode of the camera based on the passed [CamPhotoMode] argument. fn set_photo_mode(&mut self, photo_mode: CamPhotoMode) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetPhotoMode(self.camera_as_raw(), photo_mode.bits()))?; + LibCtruError(ctru_sys::CAMU_SetPhotoMode( + self.camera_as_raw(), + photo_mode.bits(), + ))?; Ok(()) } } @@ -542,7 +579,11 @@ pub trait Camera { /// Multiple effects can be set at once by combining the bitflags of [CamEffect] fn set_effect(&mut self, effect: CamEffect) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetEffect(self.camera_as_raw(), effect.bits(), ctru_sys::CONTEXT_A))?; + LibCtruError(ctru_sys::CAMU_SetEffect( + self.camera_as_raw(), + effect.bits(), + ctru_sys::CONTEXT_A, + ))?; Ok(()) } } @@ -550,7 +591,10 @@ pub trait Camera { /// Sets the contrast of the camera based on the passed [CamContrast] argument. fn set_contrast(&mut self, contrast: CamContrast) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetContrast(self.camera_as_raw(), contrast.bits()))?; + LibCtruError(ctru_sys::CAMU_SetContrast( + self.camera_as_raw(), + contrast.bits(), + ))?; Ok(()) } } @@ -558,7 +602,10 @@ pub trait Camera { /// Sets the lens correction of the camera based on the passed [CamLensCorrection] argument. fn set_lens_correction(&mut self, lens_correction: CamLensCorrection) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetLensCorrection(self.camera_as_raw(), lens_correction.bits()))?; + LibCtruError(ctru_sys::CAMU_SetLensCorrection( + self.camera_as_raw(), + lens_correction.bits(), + ))?; Ok(()) } } @@ -591,7 +638,13 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoExposureWindow(self.camera_as_raw(), x, y, width, height))?; + LibCtruError(ctru_sys::CAMU_SetAutoExposureWindow( + self.camera_as_raw(), + x, + y, + width, + height, + ))?; Ok(()) } } @@ -612,7 +665,13 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalanceWindow(self.camera_as_raw(), x, y, width, height))?; + LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalanceWindow( + self.camera_as_raw(), + x, + y, + width, + height, + ))?; Ok(()) } } @@ -674,7 +733,11 @@ pub trait Camera { ) -> crate::Result> { let transfer_unit = unsafe { let mut buf_size = 0; - LibCtruError(ctru_sys::CAMU_GetMaxBytes(&mut buf_size, width as i16, height as i16))?; + LibCtruError(ctru_sys::CAMU_GetMaxBytes( + &mut buf_size, + width as i16, + height as i16, + ))?; Ok::(buf_size) }?; diff --git a/ctru-rs/src/services/ps.rs b/ctru-rs/src/services/ps.rs index b1585df..fc91d96 100644 --- a/ctru-rs/src/services/ps.rs +++ b/ctru-rs/src/services/ps.rs @@ -45,7 +45,9 @@ pub fn device_id() -> crate::Result { } pub fn generate_random_bytes(out: &mut [u8]) -> crate::Result<()> { - LibCtruError(unsafe { ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len() as u32) })?; + LibCtruError(unsafe { + ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len() as u32) + })?; Ok(()) } diff --git a/ctru-rs/src/services/soc.rs b/ctru-rs/src/services/soc.rs index 1579d51..8fe231a 100644 --- a/ctru-rs/src/services/soc.rs +++ b/ctru-rs/src/services/soc.rs @@ -3,9 +3,9 @@ use once_cell::sync::Lazy; use std::net::Ipv4Addr; use std::sync::Mutex; +use crate::error::LibCtruError; use crate::services::ServiceReference; use crate::Error; -use crate::error::LibCtruError; /// Soc service. Initializing this service will enable the use of network sockets and utilities /// such as those found in `std::net`. The service will be closed when this struct is is dropped. diff --git a/ctru-rs/src/services/sslc.rs b/ctru-rs/src/services/sslc.rs index ef1e015..fc933b4 100644 --- a/ctru-rs/src/services/sslc.rs +++ b/ctru-rs/src/services/sslc.rs @@ -16,7 +16,10 @@ impl SslC { /// Fill `buf` with `buf.len()` random bytes pub fn generate_random_data(&self, buf: &mut [u8]) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::sslcGenerateRandomData(buf.as_ptr() as _, buf.len() as u32))?; + LibCtruError(ctru_sys::sslcGenerateRandomData( + buf.as_ptr() as _, + buf.len() as u32, + ))?; Ok(()) } } From 28cb72addd2b9836df4e56ceeae416f734d83703 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 02:13:33 +0200 Subject: [PATCH 03/57] Fix ``Try`` logic --- ctru-rs/src/error.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 73b78b5..38841da 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -20,9 +20,10 @@ impl Try for LibCtruError { } fn branch(self) -> ControlFlow { - match self.0 { - 0 => ControlFlow::Continue(()), - _ => ControlFlow::Break(Err(self.into())), + if self.0 < 0 { + ControlFlow::Break(Err(self.into())) + } else { + ControlFlow::Continue(()) } } } From a3297aebd0e69af1b09718ab6cb0da34a09622b9 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 02:27:05 +0200 Subject: [PATCH 04/57] Fix ``FromResidual`` logic --- ctru-rs/src/error.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 38841da..9a1657e 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -29,8 +29,15 @@ impl Try for LibCtruError { } impl FromResidual for LibCtruError { - fn from_residual(_: ::Residual) -> Self { - Self(1) + fn from_residual(e: ::Residual) -> Self { + if let Some(e) = e.err() { + match e { + Error::Os(result) => Self(result), + _ => Self(-1), + } + } else { + Self(-1) + } } } From c3e24358b7774b32a14294cad46575e356f7ceff Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 13:46:45 +0200 Subject: [PATCH 05/57] Remove ``synchronize_vsync_timing`` function [ref](https://github.com/Meziu/ctru-rs/pull/74#issuecomment-1272454085) --- ctru-rs/src/services/cam.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index 86dd83f..59a65f9 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -274,16 +274,6 @@ impl BothOutwardCam { Ok(()) } } - - fn synchronize_vsync_timing(&self) -> crate::Result<()> { - unsafe { - LibCtruError(ctru_sys::CAMU_SynchronizeVsyncTiming( - ctru_sys::SELECT_OUT1, - ctru_sys::SELECT_OUT2, - ))?; - Ok(()) - } - } } impl Camera for BothOutwardCam { From 8b4b8ef3953c640a0995a7bb1c65d6dec964ead0 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 13:50:44 +0200 Subject: [PATCH 06/57] Fix ``camera-image.rs`` example --- ctru-rs/examples/camera-image.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ctru-rs/examples/camera-image.rs b/ctru-rs/examples/camera-image.rs index 45dcb13..e9fa760 100644 --- a/ctru-rs/examples/camera-image.rs +++ b/ctru-rs/examples/camera-image.rs @@ -1,9 +1,8 @@ use ctru::console::Console; -use ctru::gfx::{Screen, Side}; +use ctru::gfx::{Gfx, Side}; use ctru::services::cam::{Cam, CamOutputFormat, CamShutterSoundType, CamSize, Camera}; use ctru::services::hid::KeyPad; use ctru::services::{Apt, Hid}; -use ctru::Gfx; use std::time::Duration; const WIDTH: usize = 400; From 0dc83d03f1d9a81b6a88ae4646b32074786e37e4 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 13:54:04 +0200 Subject: [PATCH 07/57] Fix ``camera-image.rs`` example (II) --- ctru-rs/examples/camera-image.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/examples/camera-image.rs b/ctru-rs/examples/camera-image.rs index e9fa760..fb51229 100644 --- a/ctru-rs/examples/camera-image.rs +++ b/ctru-rs/examples/camera-image.rs @@ -1,5 +1,5 @@ use ctru::console::Console; -use ctru::gfx::{Gfx, Side}; +use ctru::gfx::{Gfx, Screen, Side}; use ctru::services::cam::{Cam, CamOutputFormat, CamShutterSoundType, CamSize, Camera}; use ctru::services::hid::KeyPad; use ctru::services::{Apt, Hid}; From 9ef0a7dcd6884822ab9cc4781e210bea6620838f Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 13:58:05 +0200 Subject: [PATCH 08/57] Fix ``camera-image.rs`` example (III) --- ctru-rs/examples/camera-image.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/examples/camera-image.rs b/ctru-rs/examples/camera-image.rs index fb51229..de97712 100644 --- a/ctru-rs/examples/camera-image.rs +++ b/ctru-rs/examples/camera-image.rs @@ -83,7 +83,7 @@ fn main() { .expect("Failed to take picture"); } - let img = convert_image_to_rgb8(&buf, 0, 0, WIDTH as usize, HEIGHT as usize); + let img = convert_image_to_rgb8(&buf, 0, 0, WIDTH, HEIGHT); unsafe { gfx.top_screen From 1376417aec57a3f158c3f1f3bf92883d84610a32 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 14:05:46 +0200 Subject: [PATCH 09/57] Change the name of ``LibCtruError`` to ``LibCtruResult`` Not everything wrapped in this struct is an error --- ctru-rs/src/error.rs | 10 ++-- ctru-rs/src/romfs.rs | 4 +- ctru-rs/src/services/apt.rs | 6 +-- ctru-rs/src/services/cam.rs | 88 ++++++++++++++++++------------------ ctru-rs/src/services/cfgu.rs | 14 +++--- ctru-rs/src/services/hid.rs | 4 +- ctru-rs/src/services/ps.rs | 8 ++-- ctru-rs/src/services/soc.rs | 4 +- ctru-rs/src/services/sslc.rs | 6 +-- 9 files changed, 72 insertions(+), 72 deletions(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 9a1657e..8d4eb1d 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -9,9 +9,9 @@ pub type Result = ::std::result::Result; #[derive(Debug, Clone, PartialEq, PartialOrd)] #[repr(transparent)] -pub(crate) struct LibCtruError(pub i32); +pub(crate) struct LibCtruResult(pub i32); -impl Try for LibCtruError { +impl Try for LibCtruResult { type Output = (); type Residual = crate::Result; @@ -28,7 +28,7 @@ impl Try for LibCtruError { } } -impl FromResidual for LibCtruError { +impl FromResidual for LibCtruResult { fn from_residual(e: ::Residual) -> Self { if let Some(e) = e.err() { match e { @@ -74,8 +74,8 @@ impl From for Error { } } -impl From for Error { - fn from(err: LibCtruError) -> Self { +impl From for Error { + fn from(err: LibCtruResult) -> Self { Self::Os(err.0) } } diff --git a/ctru-rs/src/romfs.rs b/ctru-rs/src/romfs.rs index 0b706b4..1392aed 100644 --- a/ctru-rs/src/romfs.rs +++ b/ctru-rs/src/romfs.rs @@ -10,7 +10,7 @@ //! romfs_dir = "romfs" //! ``` -use crate::error::LibCtruError; +use crate::error::LibCtruResult; use once_cell::sync::Lazy; use std::ffi::CStr; use std::sync::Mutex; @@ -31,7 +31,7 @@ impl RomFS { true, || { let mount_name = CStr::from_bytes_with_nul(b"romfs\0").unwrap(); - LibCtruError(unsafe { ctru_sys::romfsMountSelf(mount_name.as_ptr()) })?; + LibCtruResult(unsafe { ctru_sys::romfsMountSelf(mount_name.as_ptr()) })?; Ok(()) }, || { diff --git a/ctru-rs/src/services/apt.rs b/ctru-rs/src/services/apt.rs index 49a49bd..e81ae63 100644 --- a/ctru-rs/src/services/apt.rs +++ b/ctru-rs/src/services/apt.rs @@ -1,11 +1,11 @@ -use crate::error::LibCtruError; +use crate::error::LibCtruResult; pub struct Apt(()); impl Apt { pub fn init() -> crate::Result { unsafe { - LibCtruError(ctru_sys::aptInit())?; + LibCtruResult(ctru_sys::aptInit())?; Ok(Apt(())) } } @@ -16,7 +16,7 @@ impl Apt { pub fn set_app_cpu_time_limit(&self, percent: u32) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::APT_SetAppCpuTimeLimit(percent))?; + LibCtruResult(ctru_sys::APT_SetAppCpuTimeLimit(percent))?; Ok(()) } } diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index 59a65f9..68371c2 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -3,7 +3,7 @@ //! The CAM service provides access to the cameras. Cameras can return 2D images //! in the form of byte vectors which can be used for display or other usages. -use crate::error::LibCtruError; +use crate::error::LibCtruResult; use crate::services::gspgpu::FramebufferFormat; use bitflags::bitflags; use ctru_sys::Handle; @@ -268,7 +268,7 @@ impl BothOutwardCam { brightness_synchronization: bool, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetBrightnessSynchronization( + LibCtruResult(ctru_sys::CAMU_SetBrightnessSynchronization( brightness_synchronization, ))?; Ok(()) @@ -300,7 +300,7 @@ pub trait Camera { fn is_busy(&self) -> crate::Result { unsafe { let mut is_busy = false; - LibCtruError(ctru_sys::CAMU_IsBusy(&mut is_busy, self.port_as_raw()))?; + LibCtruResult(ctru_sys::CAMU_IsBusy(&mut is_busy, self.port_as_raw()))?; Ok(is_busy) } } @@ -310,7 +310,7 @@ pub trait Camera { fn get_transfer_bytes(&self) -> crate::Result { unsafe { let mut transfer_bytes = 0; - LibCtruError(ctru_sys::CAMU_GetTransferBytes( + LibCtruResult(ctru_sys::CAMU_GetTransferBytes( &mut transfer_bytes, self.port_as_raw(), ))?; @@ -322,7 +322,7 @@ pub trait Camera { /// [Camera::set_trimming_params] fn set_trimming(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetTrimming(self.port_as_raw(), enabled))?; + LibCtruResult(ctru_sys::CAMU_SetTrimming(self.port_as_raw(), enabled))?; Ok(()) } } @@ -331,7 +331,7 @@ pub trait Camera { fn is_trimming_enabled(&self) -> crate::Result { unsafe { let mut trimming = false; - LibCtruError(ctru_sys::CAMU_IsTrimming(&mut trimming, self.port_as_raw()))?; + LibCtruResult(ctru_sys::CAMU_IsTrimming(&mut trimming, self.port_as_raw()))?; Ok(trimming) } } @@ -339,7 +339,7 @@ pub trait Camera { /// Sets trimming parameters based on coordinates specified inside a [CamTrimmingParams] fn set_trimming_params(&mut self, params: CamTrimmingParams) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetTrimmingParams( + LibCtruResult(ctru_sys::CAMU_SetTrimmingParams( self.port_as_raw(), params.x_start, params.y_start, @@ -357,7 +357,7 @@ pub trait Camera { let mut y_start = 0; let mut x_end = 0; let mut y_end = 0; - LibCtruError(ctru_sys::CAMU_GetTrimmingParams( + LibCtruResult(ctru_sys::CAMU_GetTrimmingParams( &mut x_start, &mut y_start, &mut x_end, @@ -385,7 +385,7 @@ pub trait Camera { cam_height: i16, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetTrimmingParamsCenter( + LibCtruResult(ctru_sys::CAMU_SetTrimmingParamsCenter( self.port_as_raw(), trim_width, trim_height, @@ -399,7 +399,7 @@ pub trait Camera { /// Sets the exposure level of the camera fn set_exposure(&mut self, exposure: i8) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetExposure(self.camera_as_raw(), exposure))?; + LibCtruResult(ctru_sys::CAMU_SetExposure(self.camera_as_raw(), exposure))?; Ok(()) } } @@ -407,7 +407,7 @@ pub trait Camera { /// Sets the white balance mod of the camera based on the passed [CamWhiteBalance] argument fn set_white_balance(&mut self, white_balance: CamWhiteBalance) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetWhiteBalance( + LibCtruResult(ctru_sys::CAMU_SetWhiteBalance( self.camera_as_raw(), white_balance.bits(), ))?; @@ -422,7 +422,7 @@ pub trait Camera { white_balance: CamWhiteBalance, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetWhiteBalanceWithoutBaseUp( + LibCtruResult(ctru_sys::CAMU_SetWhiteBalanceWithoutBaseUp( self.camera_as_raw(), white_balance.bits(), ))?; @@ -433,7 +433,7 @@ pub trait Camera { /// Sets the sharpness of the camera fn set_sharpness(&mut self, sharpness: i8) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetSharpness(self.camera_as_raw(), sharpness))?; + LibCtruResult(ctru_sys::CAMU_SetSharpness(self.camera_as_raw(), sharpness))?; Ok(()) } } @@ -441,7 +441,7 @@ pub trait Camera { /// Sets whether auto exposure is enabled or disabled for the camera fn set_auto_exposure(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoExposure( + LibCtruResult(ctru_sys::CAMU_SetAutoExposure( self.camera_as_raw(), enabled, ))?; @@ -453,7 +453,7 @@ pub trait Camera { fn is_auto_exposure_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - LibCtruError(ctru_sys::CAMU_IsAutoExposure( + LibCtruResult(ctru_sys::CAMU_IsAutoExposure( &mut enabled, self.camera_as_raw(), ))?; @@ -464,7 +464,7 @@ pub trait Camera { /// Sets whether auto white balance is enabled or disabled for the camera fn set_auto_white_balance(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalance( + LibCtruResult(ctru_sys::CAMU_SetAutoWhiteBalance( self.camera_as_raw(), enabled, ))?; @@ -476,7 +476,7 @@ pub trait Camera { fn is_auto_white_balance_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - LibCtruError(ctru_sys::CAMU_IsAutoWhiteBalance( + LibCtruResult(ctru_sys::CAMU_IsAutoWhiteBalance( &mut enabled, self.camera_as_raw(), ))?; @@ -487,7 +487,7 @@ pub trait Camera { /// Sets the flip direction of the camera's image based on the passed [CamFlip] argument fn flip_image(&mut self, flip: CamFlip) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_FlipImage( + LibCtruResult(ctru_sys::CAMU_FlipImage( self.camera_as_raw(), flip.bits(), ctru_sys::CONTEXT_A, @@ -516,7 +516,7 @@ pub trait Camera { crop_1: (i16, i16), ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetDetailSize( + LibCtruResult(ctru_sys::CAMU_SetDetailSize( self.camera_as_raw(), width, height, @@ -533,7 +533,7 @@ pub trait Camera { /// Sets the view size of the camera based on the passed [CamSize] argument. fn set_view_size(&mut self, size: CamSize) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetSize( + LibCtruResult(ctru_sys::CAMU_SetSize( self.camera_as_raw(), size.bits(), ctru_sys::CONTEXT_A, @@ -545,7 +545,7 @@ pub trait Camera { /// Sets the frame rate of the camera based on the passed [CamFrameRate] argument. fn set_frame_rate(&mut self, frame_rate: CamFrameRate) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetFrameRate( + LibCtruResult(ctru_sys::CAMU_SetFrameRate( self.camera_as_raw(), frame_rate.bits(), ))?; @@ -556,7 +556,7 @@ pub trait Camera { /// Sets the photo mode of the camera based on the passed [CamPhotoMode] argument. fn set_photo_mode(&mut self, photo_mode: CamPhotoMode) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetPhotoMode( + LibCtruResult(ctru_sys::CAMU_SetPhotoMode( self.camera_as_raw(), photo_mode.bits(), ))?; @@ -569,7 +569,7 @@ pub trait Camera { /// Multiple effects can be set at once by combining the bitflags of [CamEffect] fn set_effect(&mut self, effect: CamEffect) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetEffect( + LibCtruResult(ctru_sys::CAMU_SetEffect( self.camera_as_raw(), effect.bits(), ctru_sys::CONTEXT_A, @@ -581,7 +581,7 @@ pub trait Camera { /// Sets the contrast of the camera based on the passed [CamContrast] argument. fn set_contrast(&mut self, contrast: CamContrast) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetContrast( + LibCtruResult(ctru_sys::CAMU_SetContrast( self.camera_as_raw(), contrast.bits(), ))?; @@ -592,7 +592,7 @@ pub trait Camera { /// Sets the lens correction of the camera based on the passed [CamLensCorrection] argument. fn set_lens_correction(&mut self, lens_correction: CamLensCorrection) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetLensCorrection( + LibCtruResult(ctru_sys::CAMU_SetLensCorrection( self.camera_as_raw(), lens_correction.bits(), ))?; @@ -603,7 +603,7 @@ pub trait Camera { /// Sets the output format of the camera based on the passed [CamOutputFormat] argument. fn set_output_format(&mut self, format: CamOutputFormat) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetOutputFormat( + LibCtruResult(ctru_sys::CAMU_SetOutputFormat( self.camera_as_raw(), format.bits(), ctru_sys::CONTEXT_A, @@ -628,7 +628,7 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoExposureWindow( + LibCtruResult(ctru_sys::CAMU_SetAutoExposureWindow( self.camera_as_raw(), x, y, @@ -655,7 +655,7 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetAutoWhiteBalanceWindow( + LibCtruResult(ctru_sys::CAMU_SetAutoWhiteBalanceWindow( self.camera_as_raw(), x, y, @@ -669,7 +669,7 @@ pub trait Camera { /// Sets whether the noise filter should be enabled or disabled for the camera fn set_noise_filter(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetNoiseFilter(self.camera_as_raw(), enabled))?; + LibCtruResult(ctru_sys::CAMU_SetNoiseFilter(self.camera_as_raw(), enabled))?; Ok(()) } } @@ -681,7 +681,7 @@ pub trait Camera { data: ImageQualityCalibrationData, ) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetImageQualityCalibrationData(data.0))?; + LibCtruResult(ctru_sys::CAMU_SetImageQualityCalibrationData(data.0))?; Ok(()) } } @@ -690,7 +690,7 @@ pub trait Camera { fn get_image_quality_calibration_data(&self) -> crate::Result { unsafe { let mut data = ImageQualityCalibrationData::default(); - LibCtruError(ctru_sys::CAMU_GetImageQualityCalibrationData(&mut data.0))?; + LibCtruResult(ctru_sys::CAMU_GetImageQualityCalibrationData(&mut data.0))?; Ok(data) } } @@ -699,7 +699,7 @@ pub trait Camera { // TODO: Explain sleep camera fn set_sleep_camera(&mut self) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_SetSleepCamera(self.camera_as_raw()))?; + LibCtruResult(ctru_sys::CAMU_SetSleepCamera(self.camera_as_raw()))?; Ok(()) } } @@ -723,7 +723,7 @@ pub trait Camera { ) -> crate::Result> { let transfer_unit = unsafe { let mut buf_size = 0; - LibCtruError(ctru_sys::CAMU_GetMaxBytes( + LibCtruResult(ctru_sys::CAMU_GetMaxBytes( &mut buf_size, width as i16, height as i16, @@ -736,7 +736,7 @@ pub trait Camera { let mut buf = vec![0u8; usize::try_from(screen_size).unwrap()]; unsafe { - LibCtruError(ctru_sys::CAMU_SetTransferBytes( + LibCtruResult(ctru_sys::CAMU_SetTransferBytes( self.port_as_raw(), transfer_unit, width as i16, @@ -745,14 +745,14 @@ pub trait Camera { }; unsafe { - LibCtruError(ctru_sys::CAMU_Activate(self.camera_as_raw()))?; - LibCtruError(ctru_sys::CAMU_ClearBuffer(self.port_as_raw()))?; - LibCtruError(ctru_sys::CAMU_StartCapture(self.port_as_raw()))?; + LibCtruResult(ctru_sys::CAMU_Activate(self.camera_as_raw()))?; + LibCtruResult(ctru_sys::CAMU_ClearBuffer(self.port_as_raw()))?; + LibCtruResult(ctru_sys::CAMU_StartCapture(self.port_as_raw()))?; }; let receive_event = unsafe { let mut completion_handle: Handle = 0; - LibCtruError(ctru_sys::CAMU_SetReceiving( + LibCtruResult(ctru_sys::CAMU_SetReceiving( &mut completion_handle, buf.as_mut_ptr() as *mut ::libc::c_void, self.port_as_raw(), @@ -763,13 +763,13 @@ pub trait Camera { }?; unsafe { - LibCtruError(ctru_sys::svcWaitSynchronization( + LibCtruResult(ctru_sys::svcWaitSynchronization( receive_event, timeout.as_nanos().try_into().unwrap(), ))?; - LibCtruError(ctru_sys::CAMU_StopCapture(self.port_as_raw()))?; - LibCtruError(ctru_sys::svcCloseHandle(receive_event))?; - LibCtruError(ctru_sys::CAMU_Activate(ctru_sys::SELECT_NONE))?; + LibCtruResult(ctru_sys::CAMU_StopCapture(self.port_as_raw()))?; + LibCtruResult(ctru_sys::svcCloseHandle(receive_event))?; + LibCtruResult(ctru_sys::CAMU_Activate(ctru_sys::SELECT_NONE))?; }; Ok(buf) @@ -786,7 +786,7 @@ impl Cam { /// rare in practice. pub fn init() -> crate::Result { unsafe { - LibCtruError(ctru_sys::camInit())?; + LibCtruResult(ctru_sys::camInit())?; Ok(Cam { inner_cam: InwardCam, outer_right_cam: OutwardRightCam, @@ -799,7 +799,7 @@ impl Cam { /// Plays the specified sound based on the [CamShutterSoundType] argument pub fn play_shutter_sound(&self, sound: CamShutterSoundType) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::CAMU_PlayShutterSound(sound.bits()))?; + LibCtruResult(ctru_sys::CAMU_PlayShutterSound(sound.bits()))?; Ok(()) } } diff --git a/ctru-rs/src/services/cfgu.rs b/ctru-rs/src/services/cfgu.rs index 9863cda..7354505 100644 --- a/ctru-rs/src/services/cfgu.rs +++ b/ctru-rs/src/services/cfgu.rs @@ -2,7 +2,7 @@ //! //! This module contains basic methods to retrieve and change configuration from the console. -use crate::error::LibCtruError; +use crate::error::LibCtruResult; #[derive(Copy, Clone, Debug)] #[repr(u32)] @@ -62,7 +62,7 @@ impl Cfgu { /// as many times as desired and the service will not exit until all /// instances of Cfgu drop out of scope. pub fn init() -> crate::Result { - LibCtruError(unsafe { ctru_sys::cfguInit() })?; + LibCtruResult(unsafe { ctru_sys::cfguInit() })?; Ok(Cfgu(())) } @@ -70,7 +70,7 @@ impl Cfgu { pub fn get_region(&self) -> crate::Result { let mut region: u8 = 0; - LibCtruError(unsafe { ctru_sys::CFGU_SecureInfoGetRegion(&mut region) })?; + LibCtruResult(unsafe { ctru_sys::CFGU_SecureInfoGetRegion(&mut region) })?; Ok(Region::try_from(region).unwrap()) } @@ -78,7 +78,7 @@ impl Cfgu { pub fn get_model(&self) -> crate::Result { let mut model: u8 = 0; - LibCtruError(unsafe { ctru_sys::CFGU_GetSystemModel(&mut model) })?; + LibCtruResult(unsafe { ctru_sys::CFGU_GetSystemModel(&mut model) })?; Ok(SystemModel::try_from(model).unwrap()) } @@ -86,7 +86,7 @@ impl Cfgu { pub fn get_language(&self) -> crate::Result { let mut language: u8 = 0; - LibCtruError(unsafe { ctru_sys::CFGU_GetSystemLanguage(&mut language) })?; + LibCtruResult(unsafe { ctru_sys::CFGU_GetSystemLanguage(&mut language) })?; Ok(Language::try_from(language).unwrap()) } @@ -94,7 +94,7 @@ impl Cfgu { pub fn is_nfc_supported(&self) -> crate::Result { let mut supported: bool = false; - LibCtruError(unsafe { ctru_sys::CFGU_IsNFCSupported(&mut supported) })?; + LibCtruResult(unsafe { ctru_sys::CFGU_IsNFCSupported(&mut supported) })?; Ok(supported) } @@ -102,7 +102,7 @@ impl Cfgu { pub fn is_2ds_family(&self) -> crate::Result { let mut is_2ds_family: u8 = 0; - LibCtruError(unsafe { ctru_sys::CFGU_GetModelNintendo2DS(&mut is_2ds_family) })?; + LibCtruResult(unsafe { ctru_sys::CFGU_GetModelNintendo2DS(&mut is_2ds_family) })?; Ok(is_2ds_family == 0) } } diff --git a/ctru-rs/src/services/hid.rs b/ctru-rs/src/services/hid.rs index 21cf952..d0aa012 100644 --- a/ctru-rs/src/services/hid.rs +++ b/ctru-rs/src/services/hid.rs @@ -4,7 +4,7 @@ //! and circle pad information. It also provides information from the sound volume slider, //! the accelerometer, and the gyroscope. -use crate::error::LibCtruError; +use crate::error::LibCtruResult; bitflags::bitflags! { /// A set of flags corresponding to the button and directional pad /// inputs on the 3DS @@ -63,7 +63,7 @@ pub struct CirclePosition(ctru_sys::circlePosition); impl Hid { pub fn init() -> crate::Result { unsafe { - LibCtruError(ctru_sys::hidInit())?; + LibCtruResult(ctru_sys::hidInit())?; Ok(Hid(())) } } diff --git a/ctru-rs/src/services/ps.rs b/ctru-rs/src/services/ps.rs index fc91d96..65f900d 100644 --- a/ctru-rs/src/services/ps.rs +++ b/ctru-rs/src/services/ps.rs @@ -4,7 +4,7 @@ //! As such, it is initialized by default in `ctru::init` instead of having a safety handler //! See also -use crate::error::LibCtruError; +use crate::error::LibCtruResult; #[repr(u32)] pub enum AESAlgorithm { @@ -33,19 +33,19 @@ pub enum AESKeyType { pub fn local_friend_code_seed() -> crate::Result { let mut seed: u64 = 0; - LibCtruError(unsafe { ctru_sys::PS_GetLocalFriendCodeSeed(&mut seed) })?; + LibCtruResult(unsafe { ctru_sys::PS_GetLocalFriendCodeSeed(&mut seed) })?; Ok(seed) } pub fn device_id() -> crate::Result { let mut id: u32 = 0; - LibCtruError(unsafe { ctru_sys::PS_GetDeviceId(&mut id) })?; + LibCtruResult(unsafe { ctru_sys::PS_GetDeviceId(&mut id) })?; Ok(id) } pub fn generate_random_bytes(out: &mut [u8]) -> crate::Result<()> { - LibCtruError(unsafe { + LibCtruResult(unsafe { ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len() as u32) })?; Ok(()) diff --git a/ctru-rs/src/services/soc.rs b/ctru-rs/src/services/soc.rs index 8fe231a..ce8a31f 100644 --- a/ctru-rs/src/services/soc.rs +++ b/ctru-rs/src/services/soc.rs @@ -3,7 +3,7 @@ use once_cell::sync::Lazy; use std::net::Ipv4Addr; use std::sync::Mutex; -use crate::error::LibCtruError; +use crate::error::LibCtruResult; use crate::services::ServiceReference; use crate::Error; @@ -39,7 +39,7 @@ impl Soc { false, || { let soc_mem = unsafe { memalign(0x1000, num_bytes) } as *mut u32; - LibCtruError(unsafe { ctru_sys::socInit(soc_mem, num_bytes as u32) })?; + LibCtruResult(unsafe { ctru_sys::socInit(soc_mem, num_bytes as u32) })?; Ok(()) }, diff --git a/ctru-rs/src/services/sslc.rs b/ctru-rs/src/services/sslc.rs index fc933b4..b422028 100644 --- a/ctru-rs/src/services/sslc.rs +++ b/ctru-rs/src/services/sslc.rs @@ -1,6 +1,6 @@ // TODO: Implement remaining functions -use crate::error::LibCtruError; +use crate::error::LibCtruResult; pub struct SslC(()); @@ -8,7 +8,7 @@ impl SslC { /// Initialize sslc pub fn init() -> crate::Result { unsafe { - LibCtruError(ctru_sys::sslcInit(0))?; + LibCtruResult(ctru_sys::sslcInit(0))?; Ok(SslC(())) } } @@ -16,7 +16,7 @@ impl SslC { /// Fill `buf` with `buf.len()` random bytes pub fn generate_random_data(&self, buf: &mut [u8]) -> crate::Result<()> { unsafe { - LibCtruError(ctru_sys::sslcGenerateRandomData( + LibCtruResult(ctru_sys::sslcGenerateRandomData( buf.as_ptr() as _, buf.len() as u32, ))?; From 19990694d6762f19700c2ff3609e357e1dba5b29 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 14:45:55 +0200 Subject: [PATCH 10/57] Make documentation on ``bindings.rs`` more _rustdoc-ly_ This adds a "_bin-dependency_" on ``ctru-sys`` to doxygen-rs, a project I've been roking on to improve Doxygen to Rustdoc conversion: https://github.com/Techie-Pi/doxygen-rs --- ctru-sys/Cargo.toml | 8 + ctru-sys/bindgen.sh | 2 +- ctru-sys/src/bin/docstring-to-rustdoc.rs | 41 +- ctru-sys/src/bindings.rs | 19347 +++++++++++++++------ 4 files changed, 14196 insertions(+), 5202 deletions(-) diff --git a/ctru-sys/Cargo.toml b/ctru-sys/Cargo.toml index 6367b13..92a6c9e 100644 --- a/ctru-sys/Cargo.toml +++ b/ctru-sys/Cargo.toml @@ -8,3 +8,11 @@ edition = "2021" [dependencies] libc = { version = "0.2.121", default-features = false } +doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", rev = "ef2300a4d6e7c6dc5a6061096d69bf054a9f7896", optional = true } + +[features] +build-binary = ["doxygen-rs"] + +[[bin]] +name = "docstring-to-rustdoc" +required-features = ["build-binary"] diff --git a/ctru-sys/bindgen.sh b/ctru-sys/bindgen.sh index 3ad7a6a..eab2db2 100755 --- a/ctru-sys/bindgen.sh +++ b/ctru-sys/bindgen.sh @@ -29,4 +29,4 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \ -D__3DS__ \ > src/bindings.rs -cargo run --bin docstring-to-rustdoc -- src/bindings.rs +cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs diff --git a/ctru-sys/src/bin/docstring-to-rustdoc.rs b/ctru-sys/src/bin/docstring-to-rustdoc.rs index 21b1185..a23d8cf 100644 --- a/ctru-sys/src/bin/docstring-to-rustdoc.rs +++ b/ctru-sys/src/bin/docstring-to-rustdoc.rs @@ -7,17 +7,7 @@ //! //! # Transformations //! -//! The following are _completely_ removed, but _its contents are kept_: -//! * `@brief` -//! * `@ref` -//! * `@note` -//! * `@return` -//! * `@sa` -//! * `<` -//! * `[out]` and `[in]` -//! -//! The followings are _partially_ transformed to Rustdoc format: -//! * `@param` +//! Check [doxygen-rs docs](https://techie-pi.github.io/doxygen-rs/doxygen_rs/) use std::path::Path; use std::{env, fs, io}; @@ -26,35 +16,8 @@ fn main() -> io::Result<()> { let args: Vec = env::args().collect(); let bindings_path = Path::new(args.get(1).expect("bindings.rs not provided in the args")); - let bindings_string: String = fs::read_to_string(bindings_path)?; - let parsed = bindings_string - .lines() - .map(|v| { - // Only modify lines with the following structure: `` #[doc ... ] `` - if v.trim_start().starts_with("#[doc") && v.trim_end().ends_with(']') { - v.replace("@brief", "") - // Example: ``@param offset Offset of the RomFS...`` -> ``- offset Offset of the RomFS...`` - // Will improve in the future - .replace("@param", "* ") - .replace("@ref", "") - .replace("@note", "") - .replace("@return", "") - .replace("@sa", "") - .replace("< ", "") - // Remove things like ``@param[out]`` - .replace("[out]", "") - .replace("[in]", "") - // Trim start of the Rustdoc: ``...= " ...`` -> ``...= "...`` - .replace("= \" ", "= \"") - // Double pass because _most_ annotations are at the start - .replace("= \" ", "= \"") - } else { - String::from(v) - } - }) - .map(|v| v + "\n") - .collect::(); + let parsed = doxygen_rs::transform_bindgen(&bindings_path)?; let old_bindings_path = bindings_path.to_str().unwrap().to_owned() + ".old"; diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs index ceb856d..fbf1333 100644 --- a/ctru-sys/src/bindings.rs +++ b/ctru-sys/src/bindings.rs @@ -1291,41 +1291,63 @@ pub type Result = s32; pub type ThreadFunc = ::core::option::Option; pub type voidfn = ::core::option::Option; #[doc = "Structure representing CPU registers"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CpuRegisters { - #[doc = "r0-r12."] +#[doc = "r0-r12."] +#[doc = ""] + pub r: [u32_; 13usize], - #[doc = "sp."] +#[doc = "sp."] +#[doc = ""] + pub sp: u32_, - #[doc = "lr."] +#[doc = "lr."] +#[doc = ""] + pub lr: u32_, - #[doc = "pc. May need to be adjusted."] +#[doc = "pc. May need to be adjusted."] +#[doc = ""] + pub pc: u32_, - #[doc = "cpsr."] +#[doc = "cpsr."] +#[doc = ""] + pub cpsr: u32_, } #[doc = "Structure representing FPU registers"] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct FpuRegisters { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1, - #[doc = "fpscr."] +#[doc = "fpscr."] +#[doc = ""] + pub fpscr: u32_, - #[doc = "fpexc."] +#[doc = "fpexc."] +#[doc = ""] + pub fpexc: u32_, } #[repr(C)] #[derive(Copy, Clone)] pub union FpuRegisters__bindgen_ty_1 { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1__bindgen_ty_1, - #[doc = "s0-s31."] +#[doc = "s0-s31."] +#[doc = ""] + pub s: [f32; 32usize], } #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FpuRegisters__bindgen_ty_1__bindgen_ty_1 { - #[doc = "d0-d15."] +#[doc = "d0-d15."] +#[doc = ""] + pub d: [f64; 16usize], } impl Default for FpuRegisters__bindgen_ty_1 { @@ -1356,6 +1378,8 @@ pub const RL_PERMANENT: _bindgen_ty_1 = 27; pub const RL_TEMPORARY: _bindgen_ty_1 = 26; pub const RL_STATUS: _bindgen_ty_1 = 25; #[doc = "Result code level values."] +#[doc = ""] + pub type _bindgen_ty_1 = ::libc::c_uint; pub const RS_SUCCESS: _bindgen_ty_2 = 0; pub const RS_NOP: _bindgen_ty_2 = 1; @@ -1371,6 +1395,8 @@ pub const RS_STATUSCHANGED: _bindgen_ty_2 = 10; pub const RS_INTERNAL: _bindgen_ty_2 = 11; pub const RS_INVALIDRESVAL: _bindgen_ty_2 = 63; #[doc = "Result code summary values."] +#[doc = ""] + pub type _bindgen_ty_2 = ::libc::c_uint; pub const RM_COMMON: _bindgen_ty_3 = 0; pub const RM_KERNEL: _bindgen_ty_3 = 1; @@ -1471,6 +1497,8 @@ pub const RM_NFP: _bindgen_ty_3 = 97; pub const RM_APPLICATION: _bindgen_ty_3 = 254; pub const RM_INVALIDRESVAL: _bindgen_ty_3 = 255; #[doc = "Result code module values."] +#[doc = ""] + pub type _bindgen_ty_3 = ::libc::c_uint; pub const RD_SUCCESS: _bindgen_ty_4 = 0; pub const RD_INVALID_RESULT_VALUE: _bindgen_ty_4 = 1023; @@ -1498,194 +1526,377 @@ 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; #[doc = "Result code generic description values."] +#[doc = ""] + pub type _bindgen_ty_4 = ::libc::c_uint; #[doc = "Readable"] +#[doc = ""] + pub const IPC_BUFFER_R: IPC_BufferRights = 2; #[doc = "Writable"] +#[doc = ""] + pub const IPC_BUFFER_W: IPC_BufferRights = 4; #[doc = "Readable and Writable"] +#[doc = ""] + pub const IPC_BUFFER_RW: IPC_BufferRights = 6; #[doc = "IPC buffer access rights."] +#[doc = ""] + pub type IPC_BufferRights = ::libc::c_uint; #[doc = "Memory un-mapping"] +#[doc = ""] + pub const MEMOP_FREE: MemOp = 1; #[doc = "Reserve memory"] +#[doc = ""] + pub const MEMOP_RESERVE: MemOp = 2; #[doc = "Memory mapping"] +#[doc = ""] + pub const MEMOP_ALLOC: MemOp = 3; #[doc = "Mirror mapping"] +#[doc = ""] + pub const MEMOP_MAP: MemOp = 4; #[doc = "Mirror unmapping"] +#[doc = ""] + pub const MEMOP_UNMAP: MemOp = 5; #[doc = "Change protection"] +#[doc = ""] + pub const MEMOP_PROT: MemOp = 6; #[doc = "APPLICATION memory region."] +#[doc = ""] + pub const MEMOP_REGION_APP: MemOp = 256; #[doc = "SYSTEM memory region."] +#[doc = ""] + pub const MEMOP_REGION_SYSTEM: MemOp = 512; #[doc = "BASE memory region."] +#[doc = ""] + pub const MEMOP_REGION_BASE: MemOp = 768; #[doc = "Operation bitmask."] +#[doc = ""] + pub const MEMOP_OP_MASK: MemOp = 255; #[doc = "Region bitmask."] +#[doc = ""] + pub const MEMOP_REGION_MASK: MemOp = 3840; #[doc = "Flag for linear memory operations"] +#[doc = ""] + pub const MEMOP_LINEAR_FLAG: MemOp = 65536; #[doc = "Allocates linear memory."] +#[doc = ""] + pub const MEMOP_ALLOC_LINEAR: MemOp = 65539; -#[doc = " svcControlMemory operation flags"] +#[doc = "@ref svcControlMemory operation flags"] +#[doc = ""] #[doc = ""] #[doc = "The lowest 8 bits are the operation"] +#[doc = ""] + pub type MemOp = ::libc::c_uint; #[doc = "Free memory"] +#[doc = ""] + pub const MEMSTATE_FREE: MemState = 0; #[doc = "Reserved memory"] +#[doc = ""] + pub const MEMSTATE_RESERVED: MemState = 1; #[doc = "I/O memory"] +#[doc = ""] + pub const MEMSTATE_IO: MemState = 2; #[doc = "Static memory"] +#[doc = ""] + pub const MEMSTATE_STATIC: MemState = 3; #[doc = "Code memory"] +#[doc = ""] + pub const MEMSTATE_CODE: MemState = 4; #[doc = "Private memory"] +#[doc = ""] + pub const MEMSTATE_PRIVATE: MemState = 5; #[doc = "Shared memory"] +#[doc = ""] + pub const MEMSTATE_SHARED: MemState = 6; #[doc = "Continuous memory"] +#[doc = ""] + pub const MEMSTATE_CONTINUOUS: MemState = 7; #[doc = "Aliased memory"] +#[doc = ""] + pub const MEMSTATE_ALIASED: MemState = 8; #[doc = "Alias memory"] +#[doc = ""] + pub const MEMSTATE_ALIAS: MemState = 9; #[doc = "Aliased code memory"] +#[doc = ""] + pub const MEMSTATE_ALIASCODE: MemState = 10; #[doc = "Locked memory"] +#[doc = ""] + pub const MEMSTATE_LOCKED: MemState = 11; #[doc = "The state of a memory block."] +#[doc = ""] + pub type MemState = ::libc::c_uint; #[doc = "Readable"] +#[doc = ""] + pub const MEMPERM_READ: MemPerm = 1; #[doc = "Writable"] +#[doc = ""] + pub const MEMPERM_WRITE: MemPerm = 2; #[doc = "Executable"] +#[doc = ""] + pub const MEMPERM_EXECUTE: MemPerm = 4; #[doc = "Readable and writable"] +#[doc = ""] + pub const MEMPERM_READWRITE: MemPerm = 3; #[doc = "Readable and executable"] +#[doc = ""] + pub const MEMPERM_READEXECUTE: MemPerm = 5; #[doc = "Don't care"] +#[doc = ""] + pub const MEMPERM_DONTCARE: MemPerm = 268435456; #[doc = "Memory permission flags"] +#[doc = ""] + pub type MemPerm = ::libc::c_uint; #[doc = "All regions."] +#[doc = ""] + pub const MEMREGION_ALL: MemRegion = 0; #[doc = "APPLICATION memory."] +#[doc = ""] + pub const MEMREGION_APPLICATION: MemRegion = 1; #[doc = "SYSTEM memory."] +#[doc = ""] + pub const MEMREGION_SYSTEM: MemRegion = 2; #[doc = "BASE memory."] +#[doc = ""] + pub const MEMREGION_BASE: MemRegion = 3; #[doc = "Memory regions."] +#[doc = ""] + pub type MemRegion = ::libc::c_uint; #[doc = "Memory information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MemInfo { - #[doc = "Base address."] +#[doc = "Base address."] +#[doc = ""] + pub base_addr: u32_, - #[doc = "Size."] +#[doc = "Size."] +#[doc = ""] + pub size: u32_, - #[doc = "Memory permissions. See MemPerm"] +#[doc = "Memory permissions. See @ref MemPerm"] +#[doc = ""] + pub perm: u32_, - #[doc = "Memory state. See MemState"] +#[doc = "Memory state. See @ref MemState"] +#[doc = ""] + pub state: u32_, } #[doc = "Memory page information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PageInfo { - #[doc = "Page flags."] +#[doc = "Page flags."] +#[doc = ""] + pub flags: u32_, } #[doc = "Signal #value threads for wake-up."] +#[doc = ""] + pub const ARBITRATION_SIGNAL: ArbitrationType = 0; #[doc = "If the memory at the address is strictly lower than #value, then wait for signal."] +#[doc = ""] + pub const ARBITRATION_WAIT_IF_LESS_THAN: ArbitrationType = 1; #[doc = "If the memory at the address is strictly lower than #value, then decrement it and wait for signal."] +#[doc = ""] + pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN: ArbitrationType = 2; #[doc = "If the memory at the address is strictly lower than #value, then wait for signal or timeout."] +#[doc = ""] + pub const ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 3; #[doc = "If the memory at the address is strictly lower than #value, then decrement it and wait for signal or timeout."] +#[doc = ""] + pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 4; #[doc = "Arbitration modes."] +#[doc = ""] + pub type ArbitrationType = ::libc::c_uint; #[doc = "When the primitive is signaled, it will wake up exactly one thread and will clear itself automatically."] +#[doc = ""] + pub const RESET_ONESHOT: ResetType = 0; #[doc = "When the primitive is signaled, it will wake up all threads and it won't clear itself automatically."] +#[doc = ""] + pub const RESET_STICKY: ResetType = 1; #[doc = "Only meaningful for timers: same as ONESHOT but it will periodically signal the timer instead of just once."] +#[doc = ""] + pub const RESET_PULSE: ResetType = 2; #[doc = "Reset types (for use with events and timers)"] +#[doc = ""] + pub type ResetType = ::libc::c_uint; #[doc = "Unknown."] +#[doc = ""] + pub const THREADINFO_TYPE_UNKNOWN: ThreadInfoType = 0; #[doc = "Types of thread info."] +#[doc = ""] + pub type ThreadInfoType = ::libc::c_uint; #[doc = "Thread priority"] +#[doc = ""] + pub const RESLIMIT_PRIORITY: ResourceLimitType = 0; #[doc = "Quantity of allocatable memory"] +#[doc = ""] + pub const RESLIMIT_COMMIT: ResourceLimitType = 1; #[doc = "Number of threads"] +#[doc = ""] + pub const RESLIMIT_THREAD: ResourceLimitType = 2; #[doc = "Number of events"] +#[doc = ""] + pub const RESLIMIT_EVENT: ResourceLimitType = 3; #[doc = "Number of mutexes"] +#[doc = ""] + pub const RESLIMIT_MUTEX: ResourceLimitType = 4; #[doc = "Number of semaphores"] +#[doc = ""] + pub const RESLIMIT_SEMAPHORE: ResourceLimitType = 5; #[doc = "Number of timers"] +#[doc = ""] + pub const RESLIMIT_TIMER: ResourceLimitType = 6; -#[doc = "Number of shared memory objects, see svcCreateMemoryBlock"] +#[doc = "Number of shared memory objects, see @ref svcCreateMemoryBlock"] +#[doc = ""] + pub const RESLIMIT_SHAREDMEMORY: ResourceLimitType = 7; #[doc = "Number of address arbiters"] +#[doc = ""] + pub const RESLIMIT_ADDRESSARBITER: ResourceLimitType = 8; #[doc = "CPU time. Value expressed in percentage regular until it reaches 90."] +#[doc = ""] + pub const RESLIMIT_CPUTIME: ResourceLimitType = 9; #[doc = "Forces enum size to be 32 bits"] +#[doc = ""] + pub const RESLIMIT_BIT: ResourceLimitType = 2147483648; #[doc = "Types of resource limit"] +#[doc = ""] + pub type ResourceLimitType = ::libc::c_uint; #[doc = "DMA transfer involving at least one device is starting and has not reached DMAWFP yet."] +#[doc = ""] + pub const DMASTATE_STARTING: DmaState = 0; #[doc = "DMA channel is in WFP state for the destination device (2nd loop iteration onwards)."] +#[doc = ""] + pub const DMASTATE_WFP_DST: DmaState = 1; #[doc = "DMA channel is in WFP state for the source device (2nd loop iteration onwards)."] +#[doc = ""] + pub const DMASTATE_WFP_SRC: DmaState = 2; #[doc = "DMA transfer is running."] +#[doc = ""] + pub const DMASTATE_RUNNING: DmaState = 3; #[doc = "DMA transfer is done."] +#[doc = ""] + pub const DMASTATE_DONE: DmaState = 4; #[doc = "DMA transfer state."] +#[doc = ""] + pub type DmaState = ::libc::c_uint; #[doc = "DMA source is a device/peripheral. Address will not auto-increment."] +#[doc = ""] + pub const DMACFG_SRC_IS_DEVICE: _bindgen_ty_5 = 1; #[doc = "DMA destination is a device/peripheral. Address will not auto-increment."] +#[doc = ""] + pub const DMACFG_DST_IS_DEVICE: _bindgen_ty_5 = 2; #[doc = "Make \\ref svcStartInterProcessDma wait for the channel to be unlocked."] +#[doc = ""] + pub const DMACFG_WAIT_AVAILABLE: _bindgen_ty_5 = 4; #[doc = "Keep the channel locked after the transfer. Required for \\ref svcRestartDma."] +#[doc = ""] + pub const DMACFG_KEEP_LOCKED: _bindgen_ty_5 = 8; #[doc = "Use the provided source device configuration even if the DMA source is not a device."] +#[doc = ""] + pub const DMACFG_USE_SRC_CONFIG: _bindgen_ty_5 = 64; #[doc = "Use the provided destination device configuration even if the DMA destination is not a device."] +#[doc = ""] + pub const DMACFG_USE_DST_CONFIG: _bindgen_ty_5 = 128; #[doc = "Configuration flags for \\ref DmaConfig."] +#[doc = ""] + pub type _bindgen_ty_5 = ::libc::c_uint; #[doc = "Unlock the channel after transfer."] +#[doc = ""] + pub const DMARST_UNLOCK: _bindgen_ty_6 = 1; #[doc = "Replace DMAFLUSHP instructions by NOP (they may not be regenerated even if this flag is not set)."] +#[doc = ""] + pub const DMARST_RESUME_DEVICE: _bindgen_ty_6 = 2; #[doc = "Configuration flags for \\ref svcRestartDma."] +#[doc = ""] + pub type _bindgen_ty_6 = ::libc::c_uint; #[doc = "Device configuration structure, part of \\ref DmaConfig."] #[doc = ""] @@ -1693,83 +1904,153 @@ pub type _bindgen_ty_6 = ::libc::c_uint; #[doc = "- the kernel uses DMAMOV instead of DMAADNH, when having to decrement (possibly working around an erratum);"] #[doc = "this forces all loops to be unrolled -- you need to keep that in mind when using negative increments, as the kernel"] #[doc = "uses a limit of 100 DMA instruction bytes per channel."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaDeviceConfig { - #[doc = "DMA device ID."] +#[doc = "DMA device ID."] +#[doc = ""] + pub deviceId: s8, - #[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] +#[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] +#[doc = ""] + pub allowedAlignments: s8, - #[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] +#[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] +#[doc = ""] + pub burstSize: s16, - #[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] +#[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] +#[doc = ""] + pub transferSize: s16, - #[doc = "Burst loop stride, can be <= 0."] +#[doc = "Burst loop stride, can be <= 0."] +#[doc = ""] + pub burstStride: s16, - #[doc = "\"Transfer\" loop stride, can be <= 0."] +#[doc = "\"Transfer\" loop stride, can be <= 0."] +#[doc = ""] + pub transferStride: s16, } #[doc = "Configuration stucture for \\ref svcStartInterProcessDma."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaConfig { - #[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] +#[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] +#[doc = ""] + pub channelId: s8, - #[doc = "Endian swap size (can be 0)."] +#[doc = "Endian swap size (can be 0)."] +#[doc = ""] + pub endianSwapSize: s8, - #[doc = "DMACFG_* flags."] +#[doc = "DMACFG_* flags."] +#[doc = ""] + pub flags: u8_, pub _padding: u8_, - #[doc = "Source device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] +#[doc = "Source device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] +#[doc = ""] + pub srcCfg: DmaDeviceConfig, - #[doc = "Destination device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] +#[doc = "Destination device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] +#[doc = ""] + pub dstCfg: DmaDeviceConfig, } #[doc = "Enable and lock perfmon. functionality."] +#[doc = ""] + pub const PERFCOUNTEROP_ENABLE: PerfCounterOperation = 0; #[doc = "Disable and forcibly unlock perfmon. functionality."] +#[doc = ""] + pub const PERFCOUNTEROP_DISABLE: PerfCounterOperation = 1; #[doc = "Get the value of a counter register."] +#[doc = ""] + pub const PERFCOUNTEROP_GET_VALUE: PerfCounterOperation = 2; #[doc = "Set the value of a counter register."] +#[doc = ""] + pub const PERFCOUNTEROP_SET_VALUE: PerfCounterOperation = 3; #[doc = "Get the overflow flags for all CP15 and SCU counters."] +#[doc = ""] + pub const PERFCOUNTEROP_GET_OVERFLOW_FLAGS: PerfCounterOperation = 4; #[doc = "Reset the value and/or overflow flags of selected counters."] +#[doc = ""] + pub const PERFCOUNTEROP_RESET: PerfCounterOperation = 5; #[doc = "Get the event ID associated to a particular counter."] +#[doc = ""] + pub const PERFCOUNTEROP_GET_EVENT: PerfCounterOperation = 6; #[doc = "Set the event ID associated to a paritcular counter."] +#[doc = ""] + pub const PERFCOUNTEROP_SET_EVENT: PerfCounterOperation = 7; #[doc = "(Dis)allow the kernel to track counter overflows and to use 64-bit counter values."] +#[doc = ""] + pub const PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED: PerfCounterOperation = 8; #[doc = "Operations for \\ref svcControlPerformanceCounter"] -pub type PerfCounterOperation = ::libc::c_uint; +#[doc = ""] + +pub type PerfCounterOperation = ::libc::c_uint; pub const PERFCOUNTERREG_CORE_BASE: PerfCounterRegister = 0; #[doc = "CP15 PMN0."] +#[doc = ""] + pub const PERFCOUNTERREG_CORE_COUNT_REG_0: PerfCounterRegister = 0; #[doc = "CP15 PMN1."] +#[doc = ""] + pub const PERFCOUNTERREG_CORE_COUNT_REG_1: PerfCounterRegister = 1; #[doc = "CP15 CCNT."] +#[doc = ""] + pub const PERFCOUNTERREG_CORE_CYCLE_COUNTER: PerfCounterRegister = 2; pub const PERFCOUNTERREG_SCU_BASE: PerfCounterRegister = 16; #[doc = "SCU MN0."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_0: PerfCounterRegister = 16; #[doc = "SCU MN1."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_1: PerfCounterRegister = 17; #[doc = "SCU MN2."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_2: PerfCounterRegister = 18; #[doc = "SCU MN3."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_3: PerfCounterRegister = 19; #[doc = "SCU MN4. Prod-N3DS only. IRQ line missing."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_4: PerfCounterRegister = 20; #[doc = "SCU MN5. Prod-N3DS only. IRQ line missing."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_5: PerfCounterRegister = 21; #[doc = "SCU MN6. Prod-N3DS only. IRQ line missing."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_6: PerfCounterRegister = 22; #[doc = "SCU MN7. Prod-N3DS only. IRQ line missing."] +#[doc = ""] + pub const PERFCOUNTERREG_SCU_7: PerfCounterRegister = 23; #[doc = "Performance counter register IDs (CP15 and SCU)."] +#[doc = ""] + pub type PerfCounterRegister = ::libc::c_uint; pub const PERFCOUNTEREVT_CORE_BASE: PerfCounterEvent = 0; pub const PERFCOUNTEREVT_CORE_INST_CACHE_MISS: PerfCounterEvent = 0; @@ -1794,8 +2075,12 @@ 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; #[doc = "One cycle elapsed."] +#[doc = ""] + pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT: PerfCounterEvent = 255; #[doc = "64 cycles elapsed."] +#[doc = ""] + pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT_64: PerfCounterEvent = 4095; pub const PERFCOUNTEREVT_SCU_BASE: PerfCounterEvent = 4096; pub const PERFCOUNTEREVT_SCU_DISABLED: PerfCounterEvent = 4096; @@ -1821,36 +2106,60 @@ pub const PERFCOUNTEREVT_SCU_EXTERNAL_WRITE: PerfCounterEvent = 4115; pub const PERFCOUNTEREVT_SCU_CYCLE_COUNT: PerfCounterEvent = 4127; #[doc = "Performance counter event IDs (CP15 or SCU)."] #[doc = ""] -#[doc = "Refer to:"] -#[doc = " - CP15: https://developer.arm.com/documentation/ddi0360/e/control-coprocessor-cp15/register-descriptions/c15--performance-monitor-control-register--pmnc-"] -#[doc = " - SCU: https://developer.arm.com/documentation/ddi0360/e/mpcore-private-memory-region/about-the-mpcore-private-memory-region/performance-monitor-event-registers"] +#[doc = ""] +#[doc = "- CP15: https://developer.arm.com/documentation/ddi0360/e/control-coprocessor-cp15/register-descriptions/c15--performance-monitor-control-register--pmnc-"] +#[doc = "- SCU: https://developer.arm.com/documentation/ddi0360/e/mpcore-private-memory-region/about-the-mpcore-private-memory-region/performance-monitor-event-registers"] +#[doc = ""] + pub type PerfCounterEvent = ::libc::c_uint; #[doc = "Event relating to the attachment of a process."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachProcessEvent { - #[doc = "ID of the program."] +#[doc = "ID of the program."] +#[doc = ""] + pub program_id: u64_, - #[doc = "Name of the process."] +#[doc = "Name of the process."] +#[doc = ""] + pub process_name: [::libc::c_char; 8usize], - #[doc = "ID of the process."] +#[doc = "ID of the process."] +#[doc = ""] + pub process_id: u32_, - #[doc = "Always 0"] +#[doc = "Always 0"] +#[doc = ""] + pub other_flags: u32_, } #[doc = "Process exited either normally or due to an uncaught exception."] +#[doc = ""] + pub const EXITPROCESS_EVENT_EXIT: ExitProcessEventReason = 0; -#[doc = "Process has been terminated by svcTerminateProcess."] +#[doc = "Process has been terminated by @ref svcTerminateProcess."] +#[doc = ""] + pub const EXITPROCESS_EVENT_TERMINATE: ExitProcessEventReason = 1; -#[doc = "Process has been terminated by svcTerminateDebugProcess."] +#[doc = "Process has been terminated by @ref svcTerminateDebugProcess."] +#[doc = ""] + pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2; #[doc = "Reasons for an exit process event."] +#[doc = ""] + pub type ExitProcessEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a process."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitProcessEvent { - #[doc = "Reason for exiting. See ExitProcessEventReason"] +#[doc = "Reason for exiting. See @ref ExitProcessEventReason"] +#[doc = ""] + pub reason: ExitProcessEventReason, } impl Default for ExitProcessEvent { @@ -1863,31 +2172,53 @@ impl Default for ExitProcessEvent { } } #[doc = "Event relating to the attachment of a thread."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachThreadEvent { - #[doc = "ID of the creating thread."] +#[doc = "ID of the creating thread."] +#[doc = ""] + pub creator_thread_id: u32_, - #[doc = "Thread local storage."] +#[doc = "Thread local storage."] +#[doc = ""] + pub thread_local_storage: u32_, - #[doc = "Entry point of the thread."] +#[doc = "Entry point of the thread."] +#[doc = ""] + pub entry_point: u32_, } #[doc = "Thread exited."] +#[doc = ""] + pub const EXITTHREAD_EVENT_EXIT: ExitThreadEventReason = 0; #[doc = "Thread terminated."] +#[doc = ""] + pub const EXITTHREAD_EVENT_TERMINATE: ExitThreadEventReason = 1; #[doc = "Process exited either normally or due to an uncaught exception."] +#[doc = ""] + pub const EXITTHREAD_EVENT_EXIT_PROCESS: ExitThreadEventReason = 2; -#[doc = "Process has been terminated by svcTerminateProcess."] +#[doc = "Process has been terminated by @ref svcTerminateProcess."] +#[doc = ""] + pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3; #[doc = "Reasons for an exit thread event."] +#[doc = ""] + pub type ExitThreadEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a thread."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitThreadEvent { - #[doc = "Reason for exiting. See ExitThreadEventReason"] +#[doc = "Reason for exiting. See @ref ExitThreadEventReason"] +#[doc = ""] + pub reason: ExitThreadEventReason, } impl Default for ExitThreadEvent { @@ -1900,59 +2231,109 @@ impl Default for ExitThreadEvent { } } #[doc = "Panic."] +#[doc = ""] + pub const USERBREAK_PANIC: UserBreakType = 0; #[doc = "Assertion failed."] +#[doc = ""] + pub const USERBREAK_ASSERT: UserBreakType = 1; #[doc = "User related."] +#[doc = ""] + pub const USERBREAK_USER: UserBreakType = 2; #[doc = "Load RO."] +#[doc = ""] + pub const USERBREAK_LOAD_RO: UserBreakType = 3; #[doc = "Unload RO."] +#[doc = ""] + pub const USERBREAK_UNLOAD_RO: UserBreakType = 4; #[doc = "Reasons for a user break."] +#[doc = ""] + pub type UserBreakType = ::libc::c_uint; #[doc = "Undefined instruction."] +#[doc = ""] + pub const EXCEVENT_UNDEFINED_INSTRUCTION: ExceptionEventType = 0; #[doc = "Prefetch abort."] +#[doc = ""] + pub const EXCEVENT_PREFETCH_ABORT: ExceptionEventType = 1; #[doc = "Data abort (other than the below kind)."] +#[doc = ""] + pub const EXCEVENT_DATA_ABORT: ExceptionEventType = 2; #[doc = "Unaligned data access."] +#[doc = ""] + pub const EXCEVENT_UNALIGNED_DATA_ACCESS: ExceptionEventType = 3; #[doc = "Attached break."] +#[doc = ""] + pub const EXCEVENT_ATTACH_BREAK: ExceptionEventType = 4; #[doc = "Stop point reached."] +#[doc = ""] + pub const EXCEVENT_STOP_POINT: ExceptionEventType = 5; #[doc = "User break occurred."] +#[doc = ""] + pub const EXCEVENT_USER_BREAK: ExceptionEventType = 6; #[doc = "Debugger break occurred."] +#[doc = ""] + pub const EXCEVENT_DEBUGGER_BREAK: ExceptionEventType = 7; #[doc = "Undefined syscall."] +#[doc = ""] + pub const EXCEVENT_UNDEFINED_SYSCALL: ExceptionEventType = 8; #[doc = "Reasons for an exception event."] +#[doc = ""] + pub type ExceptionEventType = ::libc::c_uint; #[doc = "Event relating to fault exceptions (CPU exceptions other than stop points and undefined syscalls)."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FaultExceptionEvent { - #[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] +#[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] +#[doc = ""] + pub fault_information: u32_, } -#[doc = "See SVC_STOP_POINT."] +#[doc = "See @ref SVC_STOP_POINT."] +#[doc = ""] + pub const STOPPOINT_SVC_FF: StopPointType = 0; #[doc = "Breakpoint."] +#[doc = ""] + pub const STOPPOINT_BREAKPOINT: StopPointType = 1; #[doc = "Watchpoint."] +#[doc = ""] + pub const STOPPOINT_WATCHPOINT: StopPointType = 2; #[doc = "Stop point types"] +#[doc = ""] + pub type StopPointType = ::libc::c_uint; #[doc = "Event relating to stop points"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StopPointExceptionEvent { - #[doc = "Stop point type, see StopPointType."] +#[doc = "Stop point type, see @ref StopPointType."] +#[doc = ""] + pub type_: StopPointType, - #[doc = "FAR for Watchpoints, otherwise 0."] +#[doc = "FAR for Watchpoints, otherwise 0."] +#[doc = ""] + pub fault_information: u32_, } impl Default for StopPointExceptionEvent { @@ -1964,15 +2345,23 @@ impl Default for StopPointExceptionEvent { } } } -#[doc = "Event relating to svcBreak"] +#[doc = "Event relating to @ref svcBreak"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UserBreakExceptionEvent { - #[doc = "User break type, see UserBreakType."] +#[doc = "User break type, see @ref UserBreakType."] +#[doc = ""] + pub type_: UserBreakType, - #[doc = "For LOAD_RO and UNLOAD_RO."] +#[doc = "For LOAD_RO and UNLOAD_RO."] +#[doc = ""] + pub croInfo: u32_, - #[doc = "For LOAD_RO and UNLOAD_RO."] +#[doc = "For LOAD_RO and UNLOAD_RO."] +#[doc = ""] + pub croInfoSize: u32_, } impl Default for UserBreakExceptionEvent { @@ -1984,33 +2373,51 @@ impl Default for UserBreakExceptionEvent { } } } -#[doc = "Event relating to svcBreakDebugProcess"] +#[doc = "Event relating to @ref svcBreakDebugProcess"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DebuggerBreakExceptionEvent { - #[doc = "IDs of the attached process's threads that were running on each core at the time of the svcBreakDebugProcess call, or -1 (only the first 2 values are meaningful on O3DS)."] +#[doc = "IDs of the attached process's threads that were running on each core at the time of the @ref svcBreakDebugProcess call, or -1 (only the first 2 values are meaningful on O3DS)."] +#[doc = ""] + pub thread_ids: [s32; 4usize], } #[doc = "Event relating to exceptions."] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct ExceptionEvent { - #[doc = "Type of event. See ExceptionEventType."] +#[doc = "Type of event. See @ref ExceptionEventType."] +#[doc = ""] + pub type_: ExceptionEventType, - #[doc = "Address of the exception."] +#[doc = "Address of the exception."] +#[doc = ""] + pub address: u32_, pub __bindgen_anon_1: ExceptionEvent__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ExceptionEvent__bindgen_ty_1 { - #[doc = "Fault exception event data."] +#[doc = "Fault exception event data."] +#[doc = ""] + pub fault: FaultExceptionEvent, - #[doc = "Stop point exception event data."] +#[doc = "Stop point exception event data."] +#[doc = ""] + pub stop_point: StopPointExceptionEvent, - #[doc = "User break exception event data."] +#[doc = "User break exception event data."] +#[doc = ""] + pub user_break: UserBreakExceptionEvent, - #[doc = "Debugger break exception event data"] +#[doc = "Debugger break exception event data"] +#[doc = ""] + pub debugger_break: DebuggerBreakExceptionEvent, } impl Default for ExceptionEvent__bindgen_ty_1 { @@ -2032,41 +2439,67 @@ impl Default for ExceptionEvent { } } #[doc = "Event relating to the scheduler."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ScheduleInOutEvent { - #[doc = "Clock tick that the event occurred."] +#[doc = "Clock tick that the event occurred."] +#[doc = ""] + pub clock_tick: u64_, } #[doc = "Event relating to syscalls."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SyscallInOutEvent { - #[doc = "Clock tick that the event occurred."] +#[doc = "Clock tick that the event occurred."] +#[doc = ""] + pub clock_tick: u64_, - #[doc = "Syscall sent/received."] +#[doc = "Syscall sent/received."] +#[doc = ""] + pub syscall: u32_, } #[doc = "Event relating to debug output."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OutputStringEvent { - #[doc = "Address of the outputted string."] +#[doc = "Address of the outputted string."] +#[doc = ""] + pub string_addr: u32_, - #[doc = "Size of the outputted string."] +#[doc = "Size of the outputted string."] +#[doc = ""] + pub string_size: u32_, } #[doc = "Event relating to the mapping of memory."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MapEvent { - #[doc = "Mapped address."] +#[doc = "Mapped address."] +#[doc = ""] + pub mapped_addr: u32_, - #[doc = "Mapped size."] +#[doc = "Mapped size."] +#[doc = ""] + pub mapped_size: u32_, - #[doc = "Memory permissions. See MemPerm."] +#[doc = "Memory permissions. See @ref MemPerm."] +#[doc = ""] + pub memperm: MemPerm, - #[doc = "Memory state. See MemState."] +#[doc = "Memory state. See @ref MemState."] +#[doc = ""] + pub memstate: MemState, } impl Default for MapEvent { @@ -2079,67 +2512,123 @@ impl Default for MapEvent { } } #[doc = "Process attached event."] +#[doc = ""] + pub const DBGEVENT_ATTACH_PROCESS: DebugEventType = 0; #[doc = "Thread attached event."] +#[doc = ""] + pub const DBGEVENT_ATTACH_THREAD: DebugEventType = 1; #[doc = "Thread exit event."] +#[doc = ""] + pub const DBGEVENT_EXIT_THREAD: DebugEventType = 2; #[doc = "Process exit event."] +#[doc = ""] + pub const DBGEVENT_EXIT_PROCESS: DebugEventType = 3; #[doc = "Exception event."] +#[doc = ""] + pub const DBGEVENT_EXCEPTION: DebugEventType = 4; #[doc = "DLL load event."] +#[doc = ""] + pub const DBGEVENT_DLL_LOAD: DebugEventType = 5; #[doc = "DLL unload event."] +#[doc = ""] + pub const DBGEVENT_DLL_UNLOAD: DebugEventType = 6; #[doc = "Schedule in event."] +#[doc = ""] + pub const DBGEVENT_SCHEDULE_IN: DebugEventType = 7; #[doc = "Schedule out event."] +#[doc = ""] + pub const DBGEVENT_SCHEDULE_OUT: DebugEventType = 8; #[doc = "Syscall in event."] +#[doc = ""] + pub const DBGEVENT_SYSCALL_IN: DebugEventType = 9; #[doc = "Syscall out event."] +#[doc = ""] + pub const DBGEVENT_SYSCALL_OUT: DebugEventType = 10; #[doc = "Output string event."] +#[doc = ""] + pub const DBGEVENT_OUTPUT_STRING: DebugEventType = 11; #[doc = "Map event."] +#[doc = ""] + pub const DBGEVENT_MAP: DebugEventType = 12; #[doc = "Debug event type."] +#[doc = ""] + pub type DebugEventType = ::libc::c_uint; #[doc = "Information about a debug event."] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct DebugEventInfo { - #[doc = "Type of event. See DebugEventType"] +#[doc = "Type of event. See @ref DebugEventType"] +#[doc = ""] + pub type_: DebugEventType, - #[doc = "ID of the thread."] +#[doc = "ID of the thread."] +#[doc = ""] + pub thread_id: u32_, - #[doc = "Flags. Bit0 means that svcContinueDebugEvent needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] +#[doc = "Flags. Bit0 means that @ref svcContinueDebugEvent needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] +#[doc = ""] + pub flags: u32_, - #[doc = "Always 0."] +#[doc = "Always 0."] +#[doc = ""] + pub remnants: [u8_; 4usize], pub __bindgen_anon_1: DebugEventInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union DebugEventInfo__bindgen_ty_1 { - #[doc = "Process attachment event data."] +#[doc = "Process attachment event data."] +#[doc = ""] + pub attach_process: AttachProcessEvent, - #[doc = "Thread attachment event data."] +#[doc = "Thread attachment event data."] +#[doc = ""] + pub attach_thread: AttachThreadEvent, - #[doc = "Thread exit event data."] +#[doc = "Thread exit event data."] +#[doc = ""] + pub exit_thread: ExitThreadEvent, - #[doc = "Process exit event data."] +#[doc = "Process exit event data."] +#[doc = ""] + pub exit_process: ExitProcessEvent, - #[doc = "Exception event data."] +#[doc = "Exception event data."] +#[doc = ""] + pub exception: ExceptionEvent, - #[doc = "Schedule in/out event data."] +#[doc = "Schedule in/out event data."] +#[doc = ""] + pub scheduler: ScheduleInOutEvent, - #[doc = "Syscall in/out event data."] +#[doc = "Syscall in/out event data."] +#[doc = ""] + pub syscall: SyscallInOutEvent, - #[doc = "Output string event data."] +#[doc = "Output string event data."] +#[doc = ""] + pub output_string: OutputStringEvent, - #[doc = "Map event data."] +#[doc = "Map event data."] +#[doc = ""] + pub map: MapEvent, } impl Default for DebugEventInfo__bindgen_ty_1 { @@ -2160,24 +2649,40 @@ impl Default for DebugEventInfo { } } } -#[doc = "Inhibit user-defined CPU exception handlers (including watchpoints and breakpoints, regardless of any svcKernelSetState call)."] +#[doc = "Inhibit user-defined CPU exception handlers (including watchpoints and breakpoints, regardless of any @ref svcKernelSetState call)."] +#[doc = ""] + pub const DBG_INHIBIT_USER_CPU_EXCEPTION_HANDLERS: DebugFlags = 1; -#[doc = "Signal fault exception events. See FaultExceptionEvent."] +#[doc = "Signal fault exception events. See @ref FaultExceptionEvent."] +#[doc = ""] + pub const DBG_SIGNAL_FAULT_EXCEPTION_EVENTS: DebugFlags = 2; -#[doc = "Signal schedule in/out events. See ScheduleInOutEvent."] +#[doc = "Signal schedule in/out events. See @ref ScheduleInOutEvent."] +#[doc = ""] + pub const DBG_SIGNAL_SCHEDULE_EVENTS: DebugFlags = 4; -#[doc = "Signal syscall in/out events. See SyscallInOutEvent."] +#[doc = "Signal syscall in/out events. See @ref SyscallInOutEvent."] +#[doc = ""] + pub const DBG_SIGNAL_SYSCALL_EVENTS: DebugFlags = 8; -#[doc = "Signal map events. See MapEvent."] +#[doc = "Signal map events. See @ref MapEvent."] +#[doc = ""] + pub const DBG_SIGNAL_MAP_EVENTS: DebugFlags = 16; -#[doc = "Debug flags for an attached process, set by svcContinueDebugEvent"] +#[doc = "Debug flags for an attached process, set by @ref svcContinueDebugEvent"] +#[doc = ""] + pub type DebugFlags = ::libc::c_uint; #[repr(C)] #[derive(Copy, Clone)] pub struct ThreadContext { - #[doc = "CPU registers."] +#[doc = "CPU registers."] +#[doc = ""] + pub cpu_registers: CpuRegisters, - #[doc = "FPU registers."] +#[doc = "FPU registers."] +#[doc = ""] + pub fpu_registers: FpuRegisters, } impl Default for ThreadContext { @@ -2190,75 +2695,137 @@ impl Default for ThreadContext { } } #[doc = "Control r0-r12."] +#[doc = ""] + pub const THREADCONTEXT_CONTROL_CPU_GPRS: ThreadContextControlFlags = 1; #[doc = "Control sp, lr, pc, cpsr."] +#[doc = ""] + pub const THREADCONTEXT_CONTROL_CPU_SPRS: ThreadContextControlFlags = 2; #[doc = "Control d0-d15 (or s0-s31)."] +#[doc = ""] + pub const THREADCONTEXT_CONTROL_FPU_GPRS: ThreadContextControlFlags = 4; #[doc = "Control fpscr, fpexc."] +#[doc = ""] + pub const THREADCONTEXT_CONTROL_FPU_SPRS: ThreadContextControlFlags = 8; #[doc = "Control r0-r12, sp, lr, pc, cpsr."] +#[doc = ""] + pub const THREADCONTEXT_CONTROL_CPU_REGS: ThreadContextControlFlags = 3; #[doc = "Control d0-d15, fpscr, fpexc."] +#[doc = ""] + pub const THREADCONTEXT_CONTROL_FPU_REGS: ThreadContextControlFlags = 12; #[doc = "Control all of the above."] +#[doc = ""] + pub const THREADCONTEXT_CONTROL_ALL: ThreadContextControlFlags = 15; -#[doc = "Control flags for svcGetDebugThreadContext and svcSetDebugThreadContext"] +#[doc = "Control flags for @ref svcGetDebugThreadContext and @ref svcSetDebugThreadContext"] +#[doc = ""] + pub type ThreadContextControlFlags = ::libc::c_uint; #[doc = "Thread priority."] +#[doc = ""] + pub const DBGTHREAD_PARAMETER_PRIORITY: DebugThreadParameter = 0; #[doc = "Low scheduling mask."] +#[doc = ""] + pub const DBGTHREAD_PARAMETER_SCHEDULING_MASK_LOW: DebugThreadParameter = 1; #[doc = "Ideal processor."] +#[doc = ""] + pub const DBGTHREAD_PARAMETER_CPU_IDEAL: DebugThreadParameter = 2; #[doc = "Processor that created the threod."] +#[doc = ""] + pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3; -#[doc = "Thread parameter field for svcGetDebugThreadParameter"] +#[doc = "Thread parameter field for @ref svcGetDebugThreadParameter"] +#[doc = ""] + pub type DebugThreadParameter = ::libc::c_uint; #[doc = "Information on address space for process. All sizes are in pages (0x1000 bytes)"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CodeSetInfo { - #[doc = "ASCII name of codeset"] +#[doc = "ASCII name of codeset"] +#[doc = ""] + pub name: [u8_; 8usize], pub unk1: u16_, pub unk2: u16_, pub unk3: u32_, - #[doc = ".text start address"] +#[doc = ".text start address"] +#[doc = ""] + pub text_addr: u32_, - #[doc = ".text number of pages"] +#[doc = ".text number of pages"] +#[doc = ""] + pub text_size: u32_, - #[doc = ".rodata start address"] +#[doc = ".rodata start address"] +#[doc = ""] + pub ro_addr: u32_, - #[doc = ".rodata number of pages"] +#[doc = ".rodata number of pages"] +#[doc = ""] + pub ro_size: u32_, - #[doc = ".data, .bss start address"] +#[doc = ".data, .bss start address"] +#[doc = ""] + pub rw_addr: u32_, - #[doc = ".data number of pages"] +#[doc = ".data number of pages"] +#[doc = ""] + pub rw_size: u32_, - #[doc = "total pages for .text (aligned)"] +#[doc = "total pages for .text (aligned)"] +#[doc = ""] + pub text_size_total: u32_, - #[doc = "total pages for .rodata (aligned)"] +#[doc = "total pages for .rodata (aligned)"] +#[doc = ""] + pub ro_size_total: u32_, - #[doc = "total pages for .data, .bss (aligned)"] +#[doc = "total pages for .data, .bss (aligned)"] +#[doc = ""] + pub rw_size_total: u32_, pub unk4: u32_, - #[doc = "Program ID"] +#[doc = "Program ID"] +#[doc = ""] + pub program_id: u64_, } #[doc = "Information for the main thread of a process."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StartupInfo { - #[doc = "Priority of the main thread."] +#[doc = "Priority of the main thread."] +#[doc = ""] + pub priority: ::libc::c_int, - #[doc = "Size of the stack of the main thread."] +#[doc = "Size of the stack of the main thread."] +#[doc = ""] + pub stack_size: u32_, - #[doc = "Unused on retail kernel."] +#[doc = "Unused on retail kernel."] +#[doc = ""] + pub argc: ::libc::c_int, - #[doc = "Unused on retail kernel."] +#[doc = "Unused on retail kernel."] +#[doc = ""] + pub argv: *mut u16_, - #[doc = "Unused on retail kernel."] +#[doc = "Unused on retail kernel."] +#[doc = ""] + pub envp: *mut u16_, } impl Default for StartupInfo { @@ -2272,27 +2839,24 @@ impl Default for StartupInfo { } extern "C" { #[must_use] - #[doc = "@name Memory management"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Controls memory mapping"] - #[doc = "* * addr_out The virtual address resulting from the operation. Usually the same as addr0."] - #[doc = "* * addr0 The virtual address to be used for the operation."] - #[doc = "* * addr1 The virtual address to be (un)mirrored by @p addr0 when using MEMOP_MAP or MEMOP_UNMAP."] - #[doc = "* It has to be pointing to a RW memory."] - #[doc = "* Use NULL if the operation is MEMOP_FREE or MEMOP_ALLOC."] - #[doc = "* * size The requested size for MEMOP_ALLOC and MEMOP_ALLOC_LINEAR."] - #[doc = "* * op Operation flags. See MemOp."] - #[doc = "* * perm A combination of MEMPERM_READ and MEMPERM_WRITE. Using MEMPERM_EXECUTE will return an error."] - #[doc = "* Value 0 is used when unmapping memory."] - #[doc = "*"] - #[doc = "* If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] - #[doc = "* MEMOP_MAP will fail if @p addr1 was already mapped to another address."] - #[doc = "*"] - #[doc = "* More information is available at http://3dbrew.org/wiki/SVC#Memory_Mapping."] - #[doc = "*"] - #[doc = "* svcControlProcessMemory"] - #[doc = "*/"] +#[doc = "Controls memory mapping"] +#[doc = ""] +#[doc = "It has to be pointing to a RW memory."] +#[doc = "Use NULL if the operation is @ref MEMOP_FREE or @ref MEMOP_ALLOC."] +#[doc = "Value 0 is used when unmapping memory."] +#[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] +#[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] +#[doc = "More information is available at http://3dbrew.org/wiki/SVC#Memory_Mapping."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] +#[doc = "* `addr0` - The virtual address to be used for the operation."] +#[doc = "* `addr1` - The virtual address to be (un)mirrored by @p addr0 when using @ref MEMOP_MAP or @ref MEMOP_UNMAP."] +#[doc = "* `size` - The requested size for @ref MEMOP_ALLOC and @ref MEMOP_ALLOC_LINEAR."] +#[doc = "* `op` - Operation flags. See @ref MemOp."] +#[doc = "* `perm` - A combination of @ref MEMPERM_READ and @ref MEMPERM_WRITE. Using MEMPERM_EXECUTE will return an error."] + pub fn svcControlMemory( addr_out: *mut u32_, addr0: u32_, @@ -2304,16 +2868,19 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Controls the memory mapping of a process"] - #[doc = "* addr0 The virtual address to map"] - #[doc = "* addr1 The virtual address to be mapped by @p addr0"] - #[doc = "* type Only operations MEMOP_MAP, MEMOP_UNMAP and MEMOP_PROT are allowed."] - #[doc = ""] - #[doc = "This is the only SVC which allows mapping executable memory."] - #[doc = "Using MEMOP_PROT will change the memory permissions of an already mapped memory."] - #[doc = ""] - #[doc = "The pseudo handle for the current process is not supported by this service call."] - #[doc = "svcControlProcess"] +#[doc = "Controls the memory mapping of a process"] +#[doc = ""] +#[doc = ""] +#[doc = "This is the only SVC which allows mapping executable memory."] +#[doc = "Using @ref MEMOP_PROT will change the memory permissions of an already mapped memory."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `addr0` - The virtual address to map"] +#[doc = "* `addr1` - The virtual address to be mapped by @p addr0"] +#[doc = "* `type` - Only operations @ref MEMOP_MAP, @ref MEMOP_UNMAP and @ref MEMOP_PROT are allowed."] + pub fn svcControlProcessMemory( process: Handle, addr0: u32_, @@ -2325,14 +2892,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a block of shared memory"] - #[doc = "* memblock Pointer to store the handle of the block"] - #[doc = "* addr Address of the memory to map, page-aligned. So its alignment must be 0x1000."] - #[doc = "* size Size of the memory to map, a multiple of 0x1000."] - #[doc = "* my_perm Memory permissions for the current process"] - #[doc = "* other_perm Memory permissions for the other processes"] - #[doc = ""] - #[doc = "The shared memory block, and its rights, are destroyed when the handle is closed."] +#[doc = "Creates a block of shared memory"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `memblock` - Pointer to store the handle of the block [Direction: In, Out]"] +#[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] +#[doc = "* `size` - Size of the memory to map, a multiple of 0x1000."] +#[doc = "* `my_perm` - Memory permissions for the current process"] +#[doc = "* `other_perm` - Memory permissions for the other processes"] + pub fn svcCreateMemoryBlock( memblock: *mut Handle, addr: u32_, @@ -2343,13 +2914,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Maps a block of shared memory"] - #[doc = "* memblock Handle of the block"] - #[doc = "* addr Address of the memory to map, page-aligned. So its alignment must be 0x1000."] - #[doc = "* my_perm Memory permissions for the current process"] - #[doc = "* other_perm Memory permissions for the other processes"] - #[doc = ""] - #[doc = "The shared memory block, and its rights, are destroyed when the handle is closed."] +#[doc = "Maps a block of shared memory"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `memblock` - Handle of the block"] +#[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] +#[doc = "* `my_perm` - Memory permissions for the current process"] +#[doc = "* `other_perm` - Memory permissions for the other processes"] + pub fn svcMapMemoryBlock( memblock: Handle, addr: u32_, @@ -2359,42 +2934,62 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Maps a block of process memory, starting from address 0x00100000."] - #[doc = "* process Handle of the process."] - #[doc = "* destAddress Address of the block of memory to map, in the current (destination) process."] - #[doc = "* size Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] +#[doc = "Maps a block of process memory, starting from address 0x00100000."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `destAddress` - Address of the block of memory to map, in the current (destination) process."] +#[doc = "* `size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] + pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Unmaps a block of process memory, starting from address 0x00100000."] - #[doc = "* process Handle of the process."] - #[doc = "* destAddress Address of the block of memory to unmap, in the current (destination) process."] - #[doc = "* size Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] +#[doc = "Unmaps a block of process memory, starting from address 0x00100000."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `destAddress` - Address of the block of memory to unmap, in the current (destination) process."] +#[doc = "* `size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] + pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Unmaps a block of shared memory"] - #[doc = "* memblock Handle of the block"] - #[doc = "* addr Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] +#[doc = "Unmaps a block of shared memory"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `memblock` - Handle of the block"] +#[doc = "* `addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] + pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Queries memory information."] - #[doc = "* info Pointer to output memory info to."] - #[doc = "* out Pointer to output page info to."] - #[doc = "* addr Virtual memory address to query."] +#[doc = "Queries memory information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] +#[doc = "* `out` - Pointer to output page info to."] +#[doc = "* `addr` - Virtual memory address to query."] + pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Queries process memory information."] - #[doc = "* info Pointer to output memory info to."] - #[doc = "* out Pointer to output page info to."] - #[doc = "* process Process to query memory from."] - #[doc = "* addr Virtual memory address to query."] +#[doc = "Queries process memory information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] +#[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] +#[doc = "* `process` - Process to query memory from."] +#[doc = "* `addr` - Virtual memory address to query."] + pub fn svcQueryProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -2404,46 +2999,64 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "@name Process management"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Gets the handle of a process."] - #[doc = "* * process The handle of the process"] - #[doc = "* * processId The ID of the process to open"] - #[doc = "*/"] +#[doc = "Gets the handle of a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - The handle of the process [Direction: In, Out]"] +#[doc = "* `processId` - The ID of the process to open"] + pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result; } extern "C" { - #[doc = "Exits the current process."] +#[doc = "Exits the current process."] +#[doc = ""] + pub fn svcExitProcess(); } extern "C" { #[must_use] - #[doc = "Terminates a process."] - #[doc = "* process Handle of the process to terminate."] +#[doc = "Terminates a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process to terminate."] + pub fn svcTerminateProcess(process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets information about a process."] - #[doc = "* out Pointer to output process info to."] - #[doc = "* process Handle of the process to get information about."] - #[doc = "* type Type of information to retreieve."] +#[doc = "Gets information about a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output process info to. [Direction: In, Out]"] +#[doc = "* `process` - Handle of the process to get information about."] +#[doc = "* `type` - Type of information to retreieve."] + pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the ID of a process."] - #[doc = "* out Pointer to output the process ID to."] - #[doc = "* handle Handle of the process to get the ID of."] +#[doc = "Gets the ID of a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the process ID to. [Direction: In, Out]"] +#[doc = "* `handle` - Handle of the process to get the ID of."] + pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a list of running processes."] - #[doc = "* processCount Pointer to output the process count to."] - #[doc = "* processIds Pointer to output the process IDs to."] - #[doc = "* processIdMaxCount Maximum number of process IDs."] +#[doc = "Gets a list of running processes."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `processCount` - Pointer to output the process count to. [Direction: In, Out]"] +#[doc = "* `processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] +#[doc = "* `processIdMaxCount` - Maximum number of process IDs."] + pub fn svcGetProcessList( processCount: *mut s32, processIds: *mut u32_, @@ -2452,11 +3065,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a list of the threads of a process."] - #[doc = "* threadCount Pointer to output the thread count to."] - #[doc = "* threadIds Pointer to output the thread IDs to."] - #[doc = "* threadIdMaxCount Maximum number of thread IDs."] - #[doc = "* process Process handle to list the threads of."] +#[doc = "Gets a list of the threads of a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `threadCount` - Pointer to output the thread count to. [Direction: In, Out]"] +#[doc = "* `threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] +#[doc = "* `threadIdMaxCount` - Maximum number of thread IDs."] +#[doc = "* `process` - Process handle to list the threads of."] + pub fn svcGetThreadList( threadCount: *mut s32, threadIds: *mut u32_, @@ -2466,11 +3083,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a port."] - #[doc = "* portServer Pointer to output the port server handle to."] - #[doc = "* portClient Pointer to output the port client handle to."] - #[doc = "* name Name of the port."] - #[doc = "* maxSessions Maximum number of sessions that can connect to the port."] +#[doc = "Creates a port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `portServer` - Pointer to output the port server handle to. [Direction: In, Out]"] +#[doc = "* `portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] +#[doc = "* `name` - Name of the port."] +#[doc = "* `maxSessions` - Maximum number of sessions that can connect to the port."] + pub fn svcCreatePort( portServer: *mut Handle, portClient: *mut Handle, @@ -2480,19 +3101,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Connects to a port."] - #[doc = "* out Pointer to output the port handle to."] - #[doc = "* portName Name of the port."] +#[doc = "Connects to a port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the port handle to. [Direction: In, Out]"] +#[doc = "* `portName` - Name of the port."] + pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Sets up virtual address space for a new process"] - #[doc = "* out Pointer to output the code set handle to."] - #[doc = "* info Description for setting up the addresses"] - #[doc = "* code_ptr Pointer to .text in shared memory"] - #[doc = "* ro_ptr Pointer to .rodata in shared memory"] - #[doc = "* data_ptr Pointer to .data in shared memory"] +#[doc = "Sets up virtual address space for a new process"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the code set handle to. [Direction: In, Out]"] +#[doc = "* `info` - Description for setting up the addresses"] +#[doc = "* `code_ptr` - Pointer to .text in shared memory"] +#[doc = "* `ro_ptr` - Pointer to .rodata in shared memory"] +#[doc = "* `data_ptr` - Pointer to .data in shared memory"] + pub fn svcCreateCodeSet( out: *mut Handle, info: *const CodeSetInfo, @@ -2503,11 +3132,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets up virtual address space for a new process"] - #[doc = "* out Pointer to output the process handle to."] - #[doc = "* codeset Codeset created for this process"] - #[doc = "* arm11kernelcaps ARM11 Kernel Capabilities from exheader"] - #[doc = "* arm11kernelcaps_num Number of kernel capabilities"] +#[doc = "Sets up virtual address space for a new process"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the process handle to. [Direction: In, Out]"] +#[doc = "* `codeset` - Codeset created for this process"] +#[doc = "* `arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] +#[doc = "* `arm11kernelcaps_num` - Number of kernel capabilities"] + pub fn svcCreateProcess( out: *mut Handle, codeset: Handle, @@ -2517,10 +3150,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a process's affinity mask."] - #[doc = "* affinitymask Pointer to store the affinity masks."] - #[doc = "* process Handle of the process."] - #[doc = "* processorcount Number of processors."] +#[doc = "Gets a process's affinity mask."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `processorcount` - Number of processors."] + pub fn svcGetProcessAffinityMask( affinitymask: *mut u8_, process: Handle, @@ -2529,10 +3166,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets a process's affinity mask."] - #[doc = "* process Handle of the process."] - #[doc = "* affinitymask Pointer to retrieve the affinity masks from."] - #[doc = "* processorcount Number of processors."] +#[doc = "Sets a process's affinity mask."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] +#[doc = "* `processorcount` - Number of processors."] + pub fn svcSetProcessAffinityMask( process: Handle, affinitymask: *const u8_, @@ -2541,49 +3182,58 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a process's ideal processor."] - #[doc = "* processorid Pointer to store the ID of the process's ideal processor."] - #[doc = "* process Handle of the process."] +#[doc = "Gets a process's ideal processor."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] +#[doc = "* `process` - Handle of the process."] + pub fn svcGetProcessIdealProcessor(processorid: *mut s32, process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a process's ideal processor."] - #[doc = "* process Handle of the process."] - #[doc = "* processorid ID of the process's ideal processor."] +#[doc = "Sets a process's ideal processor."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `processorid` - ID of the process's ideal processor."] + pub fn svcSetProcessIdealProcessor(process: Handle, processorid: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Launches the main thread of the process."] - #[doc = "* process Handle of the process."] - #[doc = "* info Pointer to a StartupInfo structure describing information for the main thread."] +#[doc = "Launches the main thread of the process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `info` - Pointer to a StartupInfo structure describing information for the main thread."] + pub fn svcRun(process: Handle, info: *const StartupInfo) -> Result; } extern "C" { #[must_use] - #[doc = "@name Multithreading"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Creates a new thread."] - #[doc = "* * thread The thread handle"] - #[doc = "* * entrypoint The function that will be called first upon thread creation"] - #[doc = "* * arg The argument passed to @p entrypoint"] - #[doc = "* * stack_top The top of the thread's stack. Must be 0x8 bytes mem-aligned."] - #[doc = "* * thread_priority Low values gives the thread higher priority."] - #[doc = "* For userland apps, this has to be within the range [0x18;0x3F]"] - #[doc = "* * processor_id The id of the processor the thread should be ran on. Those are labelled starting from 0."] - #[doc = "* For old 3ds it has to be <2, and for new 3DS <4."] - #[doc = "* Value -1 means all CPUs and -2 read from the Exheader."] - #[doc = "*"] - #[doc = "* The processor with ID 1 is the system processor."] - #[doc = "* To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] - #[doc = "*"] - #[doc = "* Since a thread is considered as a waitable object, you can use svcWaitSynchronization"] - #[doc = "* and svcWaitSynchronizationN to join with it."] - #[doc = "*"] - #[doc = "* The kernel will clear the @p stack_top's address low 3 bits to make sure it is 0x8-bytes aligned."] - #[doc = "*/"] +#[doc = "Creates a new thread."] +#[doc = ""] +#[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] +#[doc = "For old 3ds it has to be <2, and for new 3DS <4."] +#[doc = "Value -1 means all CPUs and -2 read from the Exheader."] +#[doc = "The processor with ID 1 is the system processor."] +#[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] +#[doc = "Since a thread is considered as a waitable object, you can use @ref svcWaitSynchronization"] +#[doc = "and @ref svcWaitSynchronizationN to join with it."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - The thread handle [Direction: In, Out]"] +#[doc = "* `entrypoint` - The function that will be called first upon thread creation"] +#[doc = "* `arg` - The argument passed to @p entrypoint"] +#[doc = "* `stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] +#[doc = "* `thread_priority` - Low values gives the thread higher priority."] +#[doc = "* `processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] + pub fn svcCreateThread( thread: *mut Handle, entrypoint: ThreadFunc, @@ -2595,42 +3245,64 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the handle of a thread."] - #[doc = "* thread The handle of the thread"] - #[doc = "* process The ID of the process linked to the thread"] +#[doc = "Gets the handle of a thread."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - The handle of the thread [Direction: In, Out]"] +#[doc = "* `process` - The ID of the process linked to the thread"] + pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result; } extern "C" { - #[doc = "Exits the current thread."] - #[doc = ""] - #[doc = "This will trigger a state change and hence release all svcWaitSynchronization operations."] - #[doc = "It means that you can join a thread by calling @code svcWaitSynchronization(threadHandle,yourtimeout); @endcode"] +#[doc = "Exits the current thread."] +#[doc = ""] +#[doc = ""] +#[doc = "This will trigger a state change and hence release all @ref svcWaitSynchronization operations."] +#[doc = "It means that you can join a thread by calling @code svcWaitSynchronization(threadHandle,yourtimeout); @endcode"] +#[doc = ""] + pub fn svcExitThread(); } extern "C" { - #[doc = "Puts the current thread to sleep."] - #[doc = "* ns The minimum number of nanoseconds to sleep for."] +#[doc = "Puts the current thread to sleep."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ns` - The minimum number of nanoseconds to sleep for."] + pub fn svcSleepThread(ns: s64); } extern "C" { #[must_use] - #[doc = "Retrieves the priority of a thread."] +#[doc = "Retrieves the priority of a thread."] +#[doc = ""] + pub fn svcGetThreadPriority(out: *mut s32, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Changes the priority of a thread"] - #[doc = "* prio For userland apps, this has to be within the range [0x18;0x3F]"] - #[doc = ""] - #[doc = "Low values gives the thread higher priority."] +#[doc = "Changes the priority of a thread"] +#[doc = ""] +#[doc = ""] +#[doc = "Low values gives the thread higher priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `prio` - For userland apps, this has to be within the range [0x18;0x3F]"] + pub fn svcSetThreadPriority(thread: Handle, prio: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a thread's affinity mask."] - #[doc = "* affinitymask Pointer to output the affinity masks to."] - #[doc = "* thread Handle of the thread."] - #[doc = "* processorcount Number of processors."] +#[doc = "Gets a thread's affinity mask."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] +#[doc = "* `thread` - Handle of the thread."] +#[doc = "* `processorcount` - Number of processors."] + pub fn svcGetThreadAffinityMask( affinitymask: *mut u8_, thread: Handle, @@ -2639,10 +3311,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets a thread's affinity mask."] - #[doc = "* thread Handle of the thread."] - #[doc = "* affinitymask Pointer to retrieve the affinity masks from."] - #[doc = "* processorcount Number of processors."] +#[doc = "Sets a thread's affinity mask."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - Handle of the thread."] +#[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] +#[doc = "* `processorcount` - Number of processors."] + pub fn svcSetThreadAffinityMask( thread: Handle, affinitymask: *const u8_, @@ -2651,44 +3327,65 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a thread's ideal processor."] - #[doc = "* processorid Pointer to output the ID of the thread's ideal processor to."] - #[doc = "* thread Handle of the thread."] +#[doc = "Gets a thread's ideal processor."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] +#[doc = "* `thread` - Handle of the thread."] + pub fn svcGetThreadIdealProcessor(processorid: *mut s32, thread: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a thread's ideal processor."] - #[doc = "* thread Handle of the thread."] - #[doc = "* processorid ID of the thread's ideal processor."] +#[doc = "Sets a thread's ideal processor."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - Handle of the thread."] +#[doc = "* `processorid` - ID of the thread's ideal processor."] + pub fn svcSetThreadIdealProcessor(thread: Handle, processorid: s32) -> Result; } extern "C" { - #[doc = "Returns the ID of the processor the current thread is running on."] - #[doc = "svcCreateThread"] +#[doc = "Returns the ID of the processor the current thread is running on."] +#[doc = ""] + pub fn svcGetProcessorID() -> s32; } extern "C" { #[must_use] - #[doc = "Gets the ID of a thread."] - #[doc = "* out Pointer to output the thread ID of the thread @p handle to."] - #[doc = "* handle Handle of the thread."] +#[doc = "Gets the ID of a thread."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] +#[doc = "* `handle` - Handle of the thread."] + pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the resource limit set of a process."] - #[doc = "* resourceLimit Pointer to output the resource limit set handle to."] - #[doc = "* process Process to get the resource limits of."] +#[doc = "Gets the resource limit set of a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] +#[doc = "* `process` - Process to get the resource limits of."] + pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the value limits of a resource limit set."] - #[doc = "* values Pointer to output the value limits to."] - #[doc = "* resourceLimit Resource limit set to use."] - #[doc = "* names Resource limit names to get the limits of."] - #[doc = "* nameCount Number of resource limit names."] +#[doc = "Gets the value limits of a resource limit set."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `values` - Pointer to output the value limits to. [Direction: In, Out]"] +#[doc = "* `resourceLimit` - Resource limit set to use."] +#[doc = "* `names` - Resource limit names to get the limits of."] +#[doc = "* `nameCount` - Number of resource limit names."] + pub fn svcGetResourceLimitLimitValues( values: *mut s64, resourceLimit: Handle, @@ -2698,11 +3395,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the values of a resource limit set."] - #[doc = "* values Pointer to output the values to."] - #[doc = "* resourceLimit Resource limit set to use."] - #[doc = "* names Resource limit names to get the values of."] - #[doc = "* nameCount Number of resource limit names."] +#[doc = "Gets the values of a resource limit set."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `values` - Pointer to output the values to. [Direction: In, Out]"] +#[doc = "* `resourceLimit` - Resource limit set to use."] +#[doc = "* `names` - Resource limit names to get the values of."] +#[doc = "* `nameCount` - Number of resource limit names."] + pub fn svcGetResourceLimitCurrentValues( values: *mut s64, resourceLimit: Handle, @@ -2712,25 +3413,38 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the resource limit set of a process."] - #[doc = "* process Process to set the resource limit set to."] - #[doc = "* resourceLimit Resource limit set handle."] +#[doc = "Sets the resource limit set of a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Process to set the resource limit set to."] +#[doc = "* `resourceLimit` - Resource limit set handle."] + pub fn svcSetProcessResourceLimits(process: Handle, resourceLimit: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a resource limit set."] - #[doc = "* resourceLimit Pointer to output the resource limit set handle to."] +#[doc = "Creates a resource limit set."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] + pub fn svcCreateResourceLimit(resourceLimit: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the value limits of a resource limit set."] - #[doc = "* resourceLimit Resource limit set to use."] - #[doc = "* names Resource limit names to set the limits of."] - #[doc = "* values Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] - #[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] - #[doc = "* nameCount Number of resource limit names."] +#[doc = "Sets the value limits of a resource limit set."] +#[doc = ""] +#[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `resourceLimit` - Resource limit set to use."] +#[doc = "* `names` - Resource limit names to set the limits of."] +#[doc = "* `values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] +#[doc = "* `nameCount` - Number of resource limit names."] + pub fn svcSetResourceLimitValues( resourceLimit: Handle, names: *const ResourceLimitType, @@ -2740,88 +3454,126 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the process ID of a thread."] - #[doc = "* out Pointer to output the process ID of the thread @p handle to."] - #[doc = "* handle Handle of the thread."] - #[doc = "svcOpenProcess"] +#[doc = "Gets the process ID of a thread."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] +#[doc = "* `handle` - Handle of the thread."] + pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if a thread handle is valid."] - #[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] - #[doc = "0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle"] - #[doc = "0xD8E007F7 (BAD_HANDLE) if it isn't."] +#[doc = "Checks if a thread handle is valid."] +#[doc = ""] +#[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] +#[doc = ""] +#[doc = "Returns: 0xD8E007F7 (BAD_HANDLE) if it isn't."] +#[doc = ""] + pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result; } extern "C" { #[must_use] - #[doc = "@name Synchronization"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Creates a mutex."] - #[doc = "* * mutex Pointer to output the handle of the created mutex to."] - #[doc = "* * initially_locked Whether the mutex should be initially locked."] - #[doc = "*/"] +#[doc = "Creates a mutex."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] +#[doc = "* `initially_locked` - Whether the mutex should be initially locked."] + pub fn svcCreateMutex(mutex: *mut Handle, initially_locked: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Releases a mutex."] - #[doc = "* handle Handle of the mutex."] +#[doc = "Releases a mutex."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the mutex."] + pub fn svcReleaseMutex(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a semaphore."] - #[doc = "* semaphore Pointer to output the handle of the created semaphore to."] - #[doc = "* initial_count Initial count of the semaphore."] - #[doc = "* max_count Maximum count of the semaphore."] +#[doc = "Creates a semaphore."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] +#[doc = "* `initial_count` - Initial count of the semaphore."] +#[doc = "* `max_count` - Maximum count of the semaphore."] + pub fn svcCreateSemaphore(semaphore: *mut Handle, initial_count: s32, max_count: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Releases a semaphore."] - #[doc = "* count Pointer to output the current count of the semaphore to."] - #[doc = "* semaphore Handle of the semaphore."] - #[doc = "* release_count Number to increase the semaphore count by."] +#[doc = "Releases a semaphore."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] +#[doc = "* `semaphore` - Handle of the semaphore."] +#[doc = "* `release_count` - Number to increase the semaphore count by."] + pub fn svcReleaseSemaphore(count: *mut s32, semaphore: Handle, release_count: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Creates an event handle."] - #[doc = "* event Pointer to output the created event handle to."] - #[doc = "* reset_type Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] +#[doc = "Creates an event handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to output the created event handle to. [Direction: In, Out]"] +#[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] + pub fn svcCreateEvent(event: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] - #[doc = "Signals an event."] - #[doc = "* handle Handle of the event to signal."] +#[doc = "Signals an event."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the event to signal."] + pub fn svcSignalEvent(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Clears an event."] - #[doc = "* handle Handle of the event to clear."] +#[doc = "Clears an event."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the event to clear."] + pub fn svcClearEvent(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for synchronization on a handle."] - #[doc = "* handle Handle to wait on."] - #[doc = "* nanoseconds Maximum nanoseconds to wait for."] +#[doc = "Waits for synchronization on a handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle to wait on."] +#[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] + pub fn svcWaitSynchronization(handle: Handle, nanoseconds: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for synchronization on multiple handles."] - #[doc = "* out Pointer to output the index of the synchronized handle to."] - #[doc = "* handles Handles to wait on."] - #[doc = "* handles_num Number of handles."] - #[doc = "* wait_all Whether to wait for synchronization on all handles."] - #[doc = "* nanoseconds Maximum nanoseconds to wait for."] +#[doc = "Waits for synchronization on multiple handles."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the index of the synchronized handle to. [Direction: In, Out]"] +#[doc = "* `handles` - Handles to wait on."] +#[doc = "* `handles_num` - Number of handles."] +#[doc = "* `wait_all` - Whether to wait for synchronization on all handles."] +#[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] + pub fn svcWaitSynchronizationN( out: *mut s32, handles: *const Handle, @@ -2832,21 +3584,26 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates an address arbiter"] - #[doc = "* mutex Pointer to output the handle of the created address arbiter to."] - #[doc = "svcArbitrateAddress"] +#[doc = "Creates an address arbiter"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] + pub fn svcCreateAddressArbiter(arbiter: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Arbitrate an address, can be used for synchronization"] - #[doc = "* arbiter Handle of the arbiter"] - #[doc = "* addr A pointer to a s32 value."] - #[doc = "* type Type of action to be performed by the arbiter"] - #[doc = "* value Number of threads to signal if using ARBITRATION_SIGNAL, or the value used for comparison."] - #[doc = "* timeout_ns Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use \\ref svcArbitrateAddressNoTimeout instead."] - #[doc = "Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] - #[doc = "@warning Please use \\ref syncArbitrateAddressWithTimeout instead."] +#[doc = "Arbitrate an address, can be used for synchronization"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `arbiter` - Handle of the arbiter"] +#[doc = "* `addr` - A pointer to a s32 value."] +#[doc = "* `type` - Type of action to be performed by the arbiter"] +#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] +#[doc = "* `timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use \\ref svcArbitrateAddressNoTimeout instead."] + pub fn svcArbitrateAddress( arbiter: Handle, addr: u32_, @@ -2857,13 +3614,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Same as \\ref svcArbitrateAddress but with the timeout_ns parameter undefined."] - #[doc = "* arbiter Handle of the arbiter"] - #[doc = "* addr A pointer to a s32 value."] - #[doc = "* type Type of action to be performed by the arbiter"] - #[doc = "* value Number of threads to signal if using ARBITRATION_SIGNAL, or the value used for comparison."] - #[doc = "Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] - #[doc = "@warning Please use \\ref syncArbitrateAddress instead."] +#[doc = "Same as \\ref svcArbitrateAddress but with the timeout_ns parameter undefined."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `arbiter` - Handle of the arbiter"] +#[doc = "* `addr` - A pointer to a s32 value."] +#[doc = "* `type` - Type of action to be performed by the arbiter"] +#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] + pub fn svcArbitrateAddressNoTimeout( arbiter: Handle, addr: u32_, @@ -2873,38 +3632,58 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends a synchronized request to a session handle."] - #[doc = "* session Handle of the session."] +#[doc = "Sends a synchronized request to a session handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `session` - Handle of the session."] + pub fn svcSendSyncRequest(session: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Connects to a port via a handle."] - #[doc = "* clientSession Pointer to output the client session handle to."] - #[doc = "* clientPort Port client endpoint to connect to."] +#[doc = "Connects to a port via a handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] +#[doc = "* `clientPort` - Port client endpoint to connect to."] + pub fn svcCreateSessionToPort(clientSession: *mut Handle, clientPort: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a linked pair of session endpoints."] - #[doc = "* serverSession Pointer to output the created server endpoint handle to."] - #[doc = "* clientSession Pointer to output the created client endpoint handle to."] +#[doc = "Creates a linked pair of session endpoints."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] +#[doc = "* `clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] + pub fn svcCreateSession(serverSession: *mut Handle, clientSession: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Accepts a session."] - #[doc = "* session Pointer to output the created session handle to."] - #[doc = "* port Handle of the port to accept a session from."] +#[doc = "Accepts a session."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `session` - Pointer to output the created session handle to. [Direction: In, Out]"] +#[doc = "* `port` - Handle of the port to accept a session from."] + pub fn svcAcceptSession(session: *mut Handle, port: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Replies to and receives a new request."] - #[doc = "* index Pointer to the index of the request."] - #[doc = "* handles Session handles to receive requests from."] - #[doc = "* handleCount Number of handles."] - #[doc = "* replyTarget Handle of the session to reply to."] +#[doc = "Replies to and receives a new request."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `index` - Pointer to the index of the request."] +#[doc = "* `handles` - Session handles to receive requests from."] +#[doc = "* `handleCount` - Number of handles."] +#[doc = "* `replyTarget` - Handle of the session to reply to."] + pub fn svcReplyAndReceive( index: *mut s32, handles: *const Handle, @@ -2914,86 +3693,121 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "@name Time"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Creates a timer."] - #[doc = "* * timer Pointer to output the handle of the created timer to."] - #[doc = "* * reset_type Type of reset to perform on the timer."] - #[doc = "*/"] - pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result; +#[doc = "Creates a timer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] +#[doc = "* `reset_type` - Type of reset to perform on the timer."] + + pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a timer."] - #[doc = "* timer Handle of the timer to set."] - #[doc = "* initial Initial value of the timer."] - #[doc = "* interval Interval of the timer."] +#[doc = "Sets a timer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timer` - Handle of the timer to set."] +#[doc = "* `initial` - Initial value of the timer."] +#[doc = "* `interval` - Interval of the timer."] + pub fn svcSetTimer(timer: Handle, initial: s64, interval: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels a timer."] - #[doc = "* timer Handle of the timer to cancel."] +#[doc = "Cancels a timer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timer` - Handle of the timer to cancel."] + pub fn svcCancelTimer(timer: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Clears a timer."] - #[doc = "* timer Handle of the timer to clear."] +#[doc = "Clears a timer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timer` - Handle of the timer to clear."] + pub fn svcClearTimer(timer: Handle) -> Result; } extern "C" { - #[doc = "Gets the current system tick."] - #[doc = "The current system tick."] +#[doc = "Gets the current system tick."] +#[doc = ""] +#[doc = "Returns: The current system tick."] +#[doc = ""] + pub fn svcGetSystemTick() -> u64_; } extern "C" { #[must_use] - #[doc = "@name System"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Closes a handle."] - #[doc = "* * handle Handle to close."] - #[doc = "*/"] +#[doc = "Closes a handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle to close."] + pub fn svcCloseHandle(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Duplicates a handle."] - #[doc = "* out Pointer to output the duplicated handle to."] - #[doc = "* original Handle to duplicate."] +#[doc = "Duplicates a handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] +#[doc = "* `original` - Handle to duplicate."] + pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a handle info."] - #[doc = "* out Pointer to output the handle info to."] - #[doc = "* handle Handle to get the info for."] - #[doc = "* param Parameter clarifying the handle info type."] +#[doc = "Gets a handle info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the handle info to. [Direction: In, Out]"] +#[doc = "* `handle` - Handle to get the info for."] +#[doc = "* `param` - Parameter clarifying the handle info type."] + pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system info."] - #[doc = "* out Pointer to output the system info to."] - #[doc = "* type Type of system info to retrieve."] - #[doc = "* param Parameter clarifying the system info type."] +#[doc = "Gets the system info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the system info to. [Direction: In, Out]"] +#[doc = "* `type` - Type of system info to retrieve."] +#[doc = "* `param` - Parameter clarifying the system info type."] + pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current kernel state."] - #[doc = "* type Type of state to set (the other parameters depend on it)."] +#[doc = "Sets the current kernel state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `type` - Type of state to set (the other parameters depend on it)."] + pub fn svcKernelSetState(type_: u32_, ...) -> Result; } extern "C" { #[must_use] - #[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] - #[doc = "* interruptId Interrupt identfier (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] - #[doc = "* eventOrSemaphore Event or semaphore handle to bind to the given interrupt."] - #[doc = "* priority Priority of the interrupt for the current process."] - #[doc = "* isManualClear Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] +#[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `interruptId` - Interrupt identfier (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] +#[doc = "* `eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] +#[doc = "* `priority` - Priority of the interrupt for the current process."] +#[doc = "* `isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] + pub fn svcBindInterrupt( interruptId: u32_, eventOrSemaphore: Handle, @@ -3003,46 +3817,65 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] - #[doc = "* interruptId Interrupt identfier, see (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] - #[doc = "* eventOrSemaphore Event or semaphore handle to unbind from the given interrupt."] +#[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `interruptId` - Interrupt identfier, see (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] +#[doc = "* `eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] + pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates a process's data cache."] - #[doc = "* process Handle of the process."] - #[doc = "* addr Address to invalidate."] - #[doc = "* size Size of the memory to invalidate."] +#[doc = "Invalidates a process's data cache."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `addr` - Address to invalidate."] +#[doc = "* `size` - Size of the memory to invalidate."] + pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Cleans a process's data cache."] - #[doc = "* process Handle of the process."] - #[doc = "* addr Address to clean."] - #[doc = "* size Size of the memory to clean."] +#[doc = "Cleans a process's data cache."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `addr` - Address to clean."] +#[doc = "* `size` - Size of the memory to clean."] + pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes (cleans and invalidates) a process's data cache."] - #[doc = "* process Handle of the process."] - #[doc = "* addr Address to flush."] - #[doc = "* size Size of the memory to flush."] +#[doc = "Flushes (cleans and invalidates) a process's data cache."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Handle of the process."] +#[doc = "* `addr` - Address to flush."] +#[doc = "* `size` - Size of the memory to flush."] + pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Begins an inter-process DMA transfer."] - #[doc = "* dma Pointer to output the handle of the DMA channel object to."] - #[doc = "* dstProcess Destination process handle."] - #[doc = "* dstAddr Address in the destination process to write data to."] - #[doc = "* srcProcess Source process handle."] - #[doc = "* srcAddr Address in the source to read data from."] - #[doc = "* size Size of the data to transfer."] - #[doc = "* cfg Configuration structure."] - #[doc = "The handle is signaled when the transfer finishes."] +#[doc = "Begins an inter-process DMA transfer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dma` - Pointer to output the handle of the DMA channel object to. [Direction: In, Out]"] +#[doc = "* `dstProcess` - Destination process handle."] +#[doc = "* `dstAddr` - Address in the destination process to write data to."] +#[doc = "* `srcProcess` - Source process handle."] +#[doc = "* `srcAddr` - Address in the source to read data from."] +#[doc = "* `size` - Size of the data to transfer."] +#[doc = "* `cfg` - Configuration structure."] + pub fn svcStartInterProcessDma( dma: *mut Handle, dstProcess: Handle, @@ -3055,27 +3888,38 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Stops an inter-process DMA transfer."] - #[doc = "* dma Handle of the DMA channel object."] +#[doc = "Stops an inter-process DMA transfer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dma` - Handle of the DMA channel object."] + pub fn svcStopDma(dma: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the state of an inter-process DMA transfer."] - #[doc = "* state Pointer to output the state of the DMA transfer to."] - #[doc = "* dma Handle of the DMA channel object."] +#[doc = "Gets the state of an inter-process DMA transfer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] +#[doc = "* `dma` - Handle of the DMA channel object."] + pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Restarts a DMA transfer, using the same configuration as before."] - #[doc = "* state Pointer to output the state of the DMA transfer to."] - #[doc = "* dma Handle of the DMA channel object."] - #[doc = "* dstAddr Address in the destination process to write data to."] - #[doc = "* srcAddr Address in the source to read data from."] - #[doc = "* size Size of the data to transfer."] - #[doc = "* flags Restart flags, \\ref DMARST_UNLOCK and/or \\ref DMARST_RESUME_DEVICE."] - #[doc = "The first transfer has to be configured with \\ref DMACFG_KEEP_LOCKED."] +#[doc = "Restarts a DMA transfer, using the same configuration as before."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] +#[doc = "* `dma` - Handle of the DMA channel object."] +#[doc = "* `dstAddr` - Address in the destination process to write data to."] +#[doc = "* `srcAddr` - Address in the source to read data from."] +#[doc = "* `size` - Size of the data to transfer."] +#[doc = "* `flags` - Restart flags, \\ref DMARST_UNLOCK and/or \\ref DMARST_RESUME_DEVICE."] + pub fn svcRestartDma( dma: Handle, dstAddr: u32_, @@ -3086,30 +3930,42 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] - #[doc = "* useApplicationRestriction Whether to use the register value used for APPLICATION titles."] +#[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] + pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Enables or disables Wi-Fi. 11.4+ only."] - #[doc = "* enabled Whether to enable or disable Wi-Fi."] +#[doc = "Enables or disables Wi-Fi. 11.4+ only."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enabled` - Whether to enable or disable Wi-Fi."] + pub fn svcSetWifiEnabled(enabled: bool) -> Result; } extern "C" { - #[doc = "@name Debugging"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Breaks execution."] - #[doc = "* * breakReason Reason for breaking."] - #[doc = "*/"] +#[doc = "Breaks execution."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `breakReason` - Reason for breaking."] + pub fn svcBreak(breakReason: UserBreakType); } extern "C" { - #[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] - #[doc = "* breakReason Debug reason for breaking."] - #[doc = "* croInfo Library information."] - #[doc = "* croInfoSize Size of the above structure."] +#[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `breakReason` - Debug reason for breaking."] +#[doc = "* `croInfo` - Library information."] +#[doc = "* `croInfoSize` - Size of the above structure."] + pub fn svcBreakRO( breakReason: UserBreakType, croInfo: *const ::libc::c_void, @@ -3118,35 +3974,44 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Outputs a debug string."] - #[doc = "* str String to output."] - #[doc = "* length Length of the string to output, needs to be positive."] +#[doc = "Outputs a debug string."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `str` - String to output."] +#[doc = "* `length` - Length of the string to output, needs to be positive."] + pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Controls performance monitoring on the CP15 interface and the SCU."] - #[doc = "The meaning of the parameters depend on the operation."] - #[doc = "* out Output."] - #[doc = "* op Operation, see details."] - #[doc = "* param1 First parameter."] - #[doc = "* param2 Second parameter."] - #[doc = "@details The operations are the following:"] - #[doc = " - \\ref PERFCOUNTEROP_ENABLE (void) -> void, tries to enable and lock perfmon. functionality."] - #[doc = " - \\ref PERFCOUNTEROP_DISABLE (void) -> void, disable and forcibly unlocks perfmon. functionality."] - #[doc = " - \\ref PERFCOUNTEROP_GET_VALUE (\\ref PerfCounterRegister reg) -> u64, gets the value of a particular counter register."] - #[doc = " - \\ref PERFCOUNTEROP_SET_VALUE (\\ref PerfCounterRegister reg, u64 value) -> void, sets the value of a particular counter register."] - #[doc = " - \\ref PERFCOUNTEROP_GET_OVERFLOW_FLAGS (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] - #[doc = " - Format is a bitfield of \\ref PerfCounterRegister."] - #[doc = " - \\ref PERFCOUNTEROP_RESET (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] - #[doc = " overflow flags of selected registers."] - #[doc = " - Format is two bitfields of \\ref PerfCounterRegister."] - #[doc = " - \\ref PERFCOUNTEROP_GET_EVENT (\\ref PerfCounterRegister reg) -> \\ref PerfCounterEvent, gets the event associated"] - #[doc = " to a particular counter register."] - #[doc = " - \\ref PERFCOUNTEROP_SET_EVENT (\\ref PerfCounterRegister reg, \\ref PerfCounterEvent) -> void, sets the event associated"] - #[doc = " to a particular counter register."] - #[doc = " - \\ref PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] - #[doc = " and to use 64-bit counter values."] +#[doc = "Controls performance monitoring on the CP15 interface and the SCU."] +#[doc = ""] +#[doc = "The meaning of the parameters depend on the operation."] +#[doc = "The operations are the following:"] +#[doc = "- \\ref PERFCOUNTEROP_ENABLE (void) -> void, tries to enable and lock perfmon. functionality."] +#[doc = "- \\ref PERFCOUNTEROP_DISABLE (void) -> void, disable and forcibly unlocks perfmon. functionality."] +#[doc = "- \\ref PERFCOUNTEROP_GET_VALUE (\\ref PerfCounterRegister reg) -> u64, gets the value of a particular counter register."] +#[doc = "- \\ref PERFCOUNTEROP_SET_VALUE (\\ref PerfCounterRegister reg, u64 value) -> void, sets the value of a particular counter register."] +#[doc = "- \\ref PERFCOUNTEROP_GET_OVERFLOW_FLAGS (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] +#[doc = "- Format is a bitfield of \\ref PerfCounterRegister."] +#[doc = "- \\ref PERFCOUNTEROP_RESET (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] +#[doc = "overflow flags of selected registers."] +#[doc = "- Format is two bitfields of \\ref PerfCounterRegister."] +#[doc = "- \\ref PERFCOUNTEROP_GET_EVENT (\\ref PerfCounterRegister reg) -> \\ref PerfCounterEvent, gets the event associated"] +#[doc = "to a particular counter register."] +#[doc = "- \\ref PERFCOUNTEROP_SET_EVENT (\\ref PerfCounterRegister reg, \\ref PerfCounterEvent) -> void, sets the event associated"] +#[doc = "to a particular counter register."] +#[doc = "- \\ref PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] +#[doc = "and to use 64-bit counter values."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output. [Direction: In, Out]"] +#[doc = "* `op` - Operation, see details."] +#[doc = "* `param1` - First parameter."] +#[doc = "* `param2` - Second parameter."] + pub fn svcControlPerformanceCounter( out: *mut u64_, op: PerfCounterOperation, @@ -3156,44 +4021,68 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a debug handle for an active process."] - #[doc = "* debug Pointer to output the created debug handle to."] - #[doc = "* processId ID of the process to debug."] +#[doc = "Creates a debug handle for an active process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] +#[doc = "* `processId` - ID of the process to debug."] + pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Breaks a debugged process."] - #[doc = "* debug Debug handle of the process."] +#[doc = "Breaks a debugged process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `debug` - Debug handle of the process."] + pub fn svcBreakDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates a debugged process."] - #[doc = "* debug Debug handle of the process."] +#[doc = "Terminates a debugged process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `debug` - Debug handle of the process."] + pub fn svcTerminateDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current debug event of a debugged process."] - #[doc = "* info Pointer to output the debug event information to."] - #[doc = "* debug Debug handle of the process."] +#[doc = "Gets the current debug event of a debugged process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output the debug event information to. [Direction: In, Out]"] +#[doc = "* `debug` - Debug handle of the process."] + pub fn svcGetProcessDebugEvent(info: *mut DebugEventInfo, debug: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Continues the current debug event of a debugged process (not necessarily the same as svcGetProcessDebugEvent)."] - #[doc = "* debug Debug handle of the process."] - #[doc = "* flags Flags to continue with, see DebugFlags."] +#[doc = "Continues the current debug event of a debugged process (not necessarily the same as @ref svcGetProcessDebugEvent)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `debug` - Debug handle of the process."] +#[doc = "* `flags` - Flags to continue with, see @ref DebugFlags."] + pub fn svcContinueDebugEvent(debug: Handle, flags: DebugFlags) -> Result; } extern "C" { #[must_use] - #[doc = "Fetches the saved registers of a thread, either inactive or awaiting svcContinueDebugEvent, belonging to a debugged process."] - #[doc = "* context Values of the registers to fetch, see ThreadContext."] - #[doc = "* debug Debug handle of the parent process."] - #[doc = "* threadId ID of the thread to fetch the saved registers of."] - #[doc = "* controlFlags Which registers to fetch, see ThreadContextControlFlags."] +#[doc = "Fetches the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Values of the registers to fetch, see @ref ThreadContext. [Direction: In, Out]"] +#[doc = "* `debug` - Debug handle of the parent process."] +#[doc = "* `threadId` - ID of the thread to fetch the saved registers of."] +#[doc = "* `controlFlags` - Which registers to fetch, see @ref ThreadContextControlFlags."] + pub fn svcGetDebugThreadContext( context: *mut ThreadContext, debug: Handle, @@ -3203,11 +4092,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Updates the saved registers of a thread, either inactive or awaiting svcContinueDebugEvent, belonging to a debugged process."] - #[doc = "* debug Debug handle of the parent process."] - #[doc = "* threadId ID of the thread to update the saved registers of."] - #[doc = "* context Values of the registers to update, see ThreadContext."] - #[doc = "* controlFlags Which registers to update, see ThreadContextControlFlags."] +#[doc = "Updates the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `debug` - Debug handle of the parent process."] +#[doc = "* `threadId` - ID of the thread to update the saved registers of."] +#[doc = "* `context` - Values of the registers to update, see @ref ThreadContext."] +#[doc = "* `controlFlags` - Which registers to update, see @ref ThreadContextControlFlags."] + pub fn svcSetDebugThreadContext( debug: Handle, threadId: u32_, @@ -3217,11 +4110,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Queries memory information of a debugged process."] - #[doc = "* info Pointer to output memory info to."] - #[doc = "* out Pointer to output page info to."] - #[doc = "* debug Debug handle of the process to query memory from."] - #[doc = "* addr Virtual memory address to query."] +#[doc = "Queries memory information of a debugged process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] +#[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] +#[doc = "* `debug` - Debug handle of the process to query memory from."] +#[doc = "* `addr` - Virtual memory address to query."] + pub fn svcQueryDebugProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -3231,11 +4128,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a debugged process's memory."] - #[doc = "* buffer Buffer to read data to."] - #[doc = "* debug Debug handle of the process."] - #[doc = "* addr Address to read from."] - #[doc = "* size Size of the memory to read."] +#[doc = "Reads from a debugged process's memory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buffer` - Buffer to read data to."] +#[doc = "* `debug` - Debug handle of the process."] +#[doc = "* `addr` - Address to read from."] +#[doc = "* `size` - Size of the memory to read."] + pub fn svcReadProcessMemory( buffer: *mut ::libc::c_void, debug: Handle, @@ -3245,11 +4146,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a debugged process's memory."] - #[doc = "* debug Debug handle of the process."] - #[doc = "* buffer Buffer to write data from."] - #[doc = "* addr Address to write to."] - #[doc = "* size Size of the memory to write."] +#[doc = "Writes to a debugged process's memory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `debug` - Debug handle of the process."] +#[doc = "* `buffer` - Buffer to write data from."] +#[doc = "* `addr` - Address to write to."] +#[doc = "* `size` - Size of the memory to write."] + pub fn svcWriteProcessMemory( debug: Handle, buffer: *const ::libc::c_void, @@ -3259,20 +4164,28 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see http://infocenter.arm.com/help/topic/com.arm.doc.ddi0360f/CEGEBGFC.html ."] - #[doc = "* registerId range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] - #[doc = "* control Value of the control regiser."] - #[doc = "* value Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] +#[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see http://infocenter.arm.com/help/topic/com.arm.doc.ddi0360f/CEGEBGFC.html ."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] +#[doc = "* `control` - Value of the control regiser."] +#[doc = "* `value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] + pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a debugged thread's parameter."] - #[doc = "* unused Unused."] - #[doc = "* out Output value."] - #[doc = "* debug Debug handle of the process."] - #[doc = "* threadId ID of the thread"] - #[doc = "* parameter Parameter to fetch, see DebugThreadParameter."] +#[doc = "Gets a debugged thread's parameter."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `unused` - Unused. [Direction: In, Out]"] +#[doc = "* `out` - Output value. [Direction: In, Out]"] +#[doc = "* `debug` - Debug handle of the process."] +#[doc = "* `threadId` - ID of the thread"] +#[doc = "* `parameter` - Parameter to fetch, see @ref DebugThreadParameter."] + pub fn svcGetDebugThreadParam( unused: *mut s64, out: *mut u32_, @@ -3283,111 +4196,213 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a function in supervisor mode."] - #[doc = "* callback Function to execute."] +#[doc = "Executes a function in supervisor mode."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `callback` - Function to execute."] + pub fn svcBackdoor(callback: ::core::option::Option s32>) -> Result; } #[doc = "Mount \"nand:/\""] +#[doc = ""] + pub const ARM9DESC_MOUNT_NAND: _bindgen_ty_7 = 1; #[doc = "Mount nand:/ro/ as read-write"] +#[doc = ""] + pub const ARM9DESC_MOUNT_NANDRO_RW: _bindgen_ty_7 = 2; #[doc = "Mount \"twln:/\""] +#[doc = ""] + pub const ARM9DESC_MOUNT_TWLN: _bindgen_ty_7 = 4; #[doc = "Mount \"wnand:/\""] +#[doc = ""] + pub const ARM9DESC_MOUNT_WNAND: _bindgen_ty_7 = 8; #[doc = "Mount \"cardspi:/\""] +#[doc = ""] + pub const ARM9DESC_MOUNT_CARDSPI: _bindgen_ty_7 = 16; #[doc = "Use SDIF3"] +#[doc = ""] + pub const ARM9DESC_USE_SDIF3: _bindgen_ty_7 = 32; #[doc = "Create seed (movable.sed)"] +#[doc = ""] + pub const ARM9DESC_CREATE_SEED: _bindgen_ty_7 = 64; #[doc = "Use card SPI, required by multiple pxi:dev commands"] +#[doc = ""] + pub const ARM9DESC_USE_CARD_SPI: _bindgen_ty_7 = 128; #[doc = "SD application (not checked)"] +#[doc = ""] + pub const ARM9DESC_SD_APPLICATION: _bindgen_ty_7 = 256; #[doc = "Mount \"sdmc:/\" as read-write"] +#[doc = ""] + pub const ARM9DESC_MOUNT_SDMC_RW: _bindgen_ty_7 = 512; #[doc = "ARM9 descriptor flags"] +#[doc = ""] + pub type _bindgen_ty_7 = ::libc::c_uint; #[doc = "Category \"system application\""] +#[doc = ""] + pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: _bindgen_ty_8 = 1; #[doc = "Category \"hardware check\""] +#[doc = ""] + pub const FSACCESS_CATEGORY_HARDWARE_CHECK: _bindgen_ty_8 = 2; #[doc = "Category \"filesystem tool\""] +#[doc = ""] + pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: _bindgen_ty_8 = 4; #[doc = "Debug"] +#[doc = ""] + pub const FSACCESS_DEBUG: _bindgen_ty_8 = 8; #[doc = "TWLCARD backup"] +#[doc = ""] + pub const FSACCESS_TWLCARD_BACKUP: _bindgen_ty_8 = 16; #[doc = "TWLNAND data"] +#[doc = ""] + pub const FSACCESS_TWLNAND_DATA: _bindgen_ty_8 = 32; #[doc = "BOSS (SpotPass)"] +#[doc = ""] + pub const FSACCESS_BOSS: _bindgen_ty_8 = 64; #[doc = "SDMC (read-write)"] +#[doc = ""] + pub const FSACCESS_SDMC_RW: _bindgen_ty_8 = 128; #[doc = "Core"] +#[doc = ""] + pub const FSACCESS_CORE: _bindgen_ty_8 = 256; #[doc = "nand:/ro/ (read-only)"] +#[doc = ""] + pub const FSACCESS_NANDRO_RO: _bindgen_ty_8 = 512; #[doc = "nand:/rw/"] +#[doc = ""] + pub const FSACCESS_NANDRW: _bindgen_ty_8 = 1024; #[doc = "nand:/ro/ (read-write)"] +#[doc = ""] + pub const FSACCESS_NANDRO_RW: _bindgen_ty_8 = 2048; #[doc = "Category \"System Settings\""] +#[doc = ""] + pub const FSACCESS_CATEGORY_SYSTEM_SETTINGS: _bindgen_ty_8 = 4096; #[doc = "Cardboard (System Transfer)"] +#[doc = ""] + pub const FSACCESS_CARDBOARD: _bindgen_ty_8 = 8192; #[doc = "Export/Import IVs (movable.sed)"] +#[doc = ""] + pub const FSACCESS_EXPORT_IMPORT_IVS: _bindgen_ty_8 = 16384; #[doc = "SDMC (write-only)"] +#[doc = ""] + pub const FSACCESS_SDMC_WO: _bindgen_ty_8 = 32768; #[doc = "\"Switch cleanup\" (3.0+)"] +#[doc = ""] + pub const FSACCESS_SWITCH_CLEANUP: _bindgen_ty_8 = 65536; #[doc = "Savedata move (5.0+)"] +#[doc = ""] + pub const FSACCESS_SAVEDATA_MOVE: _bindgen_ty_8 = 131072; #[doc = "Shop (5.0+)"] +#[doc = ""] + pub const FSACCESS_SHOP: _bindgen_ty_8 = 262144; #[doc = "Shop (5.0+)"] +#[doc = ""] + pub const FSACCESS_SHELL: _bindgen_ty_8 = 524288; #[doc = "Category \"Home Menu\" (6.0+)"] +#[doc = ""] + pub const FSACCESS_CATEGORY_HOME_MENU: _bindgen_ty_8 = 1048576; #[doc = "Seed DB (9.6+)"] +#[doc = ""] + pub const FSACCESS_SEEDDB: _bindgen_ty_8 = 2097152; #[doc = "Filesystem access flags"] +#[doc = ""] + pub type _bindgen_ty_8 = ::libc::c_uint; #[doc = "Regular application"] +#[doc = ""] + pub const RESLIMIT_CATEGORY_APPLICATION: ResourceLimitCategory = 0; #[doc = "System applet"] +#[doc = ""] + pub const RESLIMIT_CATEGORY_SYS_APPLET: ResourceLimitCategory = 1; #[doc = "Library applet"] +#[doc = ""] + pub const RESLIMIT_CATEGORY_LIB_APPLET: ResourceLimitCategory = 2; #[doc = "System modules running inside the BASE memregion"] +#[doc = ""] + pub const RESLIMIT_CATEGORY_OTHER: ResourceLimitCategory = 3; #[doc = "The resource limit category of a title"] +#[doc = ""] + pub type ResourceLimitCategory = ::libc::c_uint; #[doc = "64MB of usable application memory"] +#[doc = ""] + pub const SYSMODE_O3DS_PROD: SystemMode = 0; #[doc = "124MB of usable application memory. Unusable on O3DS"] +#[doc = ""] + pub const SYSMODE_N3DS_PROD: SystemMode = 1; #[doc = "97MB/178MB of usable application memory"] +#[doc = ""] + pub const SYSMODE_DEV1: SystemMode = 2; #[doc = "80MB/124MB of usable application memory"] +#[doc = ""] + pub const SYSMODE_DEV2: SystemMode = 3; #[doc = "72MB of usable application memory. Same as \"Prod\" on N3DS"] +#[doc = ""] + pub const SYSMODE_DEV3: SystemMode = 4; #[doc = "32MB of usable application memory. Same as \"Prod\" on N3DS"] +#[doc = ""] + pub const SYSMODE_DEV4: SystemMode = 5; #[doc = "The system mode a title should be launched under"] +#[doc = ""] + pub type SystemMode = ::libc::c_uint; #[doc = "The system info flags and remaster version of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_SystemInfoFlags { - #[doc = "Reserved"] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 5usize], pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Remaster version"] +#[doc = "Remaster version"] +#[doc = ""] + pub remaster_version: u16_, } impl ExHeader_SystemInfoFlags { @@ -3431,46 +4446,80 @@ impl ExHeader_SystemInfoFlags { } } #[doc = "Information about a title's section"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSectionInfo { - #[doc = "The address of the section"] +#[doc = "The address of the section"] +#[doc = ""] + pub address: u32_, - #[doc = "The number of pages the section occupies"] +#[doc = "The number of pages the section occupies"] +#[doc = ""] + pub num_pages: u32_, - #[doc = "The size of the section"] +#[doc = "The size of the section"] +#[doc = ""] + pub size: u32_, } #[doc = "The name of a title and infomation about its section"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSetInfo { - #[doc = "Title name"] +#[doc = "Title name"] +#[doc = ""] + pub name: [::libc::c_char; 8usize], - #[doc = "System info flags, see ExHeader_SystemInfoFlags"] +#[doc = "System info flags, see @ref ExHeader_SystemInfoFlags"] +#[doc = ""] + pub flags: ExHeader_SystemInfoFlags, - #[doc = ".text section info, see ExHeader_CodeSectionInfo"] +#[doc = ".text section info, see @ref ExHeader_CodeSectionInfo"] +#[doc = ""] + pub text: ExHeader_CodeSectionInfo, - #[doc = "Stack size"] +#[doc = "Stack size"] +#[doc = ""] + pub stack_size: u32_, - #[doc = ".rodata section info, see ExHeader_CodeSectionInfo"] +#[doc = ".rodata section info, see @ref ExHeader_CodeSectionInfo"] +#[doc = ""] + pub rodata: ExHeader_CodeSectionInfo, - #[doc = "Reserved"] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: u32_, - #[doc = ".data section info, see ExHeader_CodeSectionInfo"] +#[doc = ".data section info, see @ref ExHeader_CodeSectionInfo"] +#[doc = ""] + pub data: ExHeader_CodeSectionInfo, - #[doc = ".bss section size"] +#[doc = ".bss section size"] +#[doc = ""] + pub bss_size: u32_, } #[doc = "The savedata size and jump ID of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemInfo { - #[doc = "Savedata size"] +#[doc = "Savedata size"] +#[doc = ""] + pub savedata_size: u64_, - #[doc = "Jump ID"] +#[doc = "Jump ID"] +#[doc = ""] + pub jump_id: u64_, - #[doc = "Reserved"] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 48usize], } impl Default for ExHeader_SystemInfo { @@ -3483,14 +4532,22 @@ impl Default for ExHeader_SystemInfo { } } #[doc = "The code set info, dependencies and system info of a title (SCI)"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemControlInfo { - #[doc = "Code set info, see ExHeader_CodeSetInfo"] +#[doc = "Code set info, see @ref ExHeader_CodeSetInfo"] +#[doc = ""] + pub codeset_info: ExHeader_CodeSetInfo, - #[doc = "Title IDs of the titles that this program depends on"] +#[doc = "Title IDs of the titles that this program depends on"] +#[doc = ""] + pub dependencies: [u64_; 48usize], - #[doc = "System info, see ExHeader_SystemInfo"] +#[doc = "System info, see @ref ExHeader_SystemInfo"] +#[doc = ""] + pub system_info: ExHeader_SystemInfo, } impl Default for ExHeader_SystemControlInfo { @@ -3503,16 +4560,26 @@ impl Default for ExHeader_SystemControlInfo { } } #[doc = "The ARM11 filesystem info of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11StorageInfo { - #[doc = "Extdata ID"] +#[doc = "Extdata ID"] +#[doc = ""] + pub extdata_id: u64_, - #[doc = "IDs of the system savedata accessible by the title"] +#[doc = "IDs of the system savedata accessible by the title"] +#[doc = ""] + pub system_savedata_ids: [u32_; 2usize], - #[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] +#[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] +#[doc = ""] + pub accessible_savedata_ids: u64_, - #[doc = "FS access flags"] +#[doc = "FS access flags"] +#[doc = ""] + pub fs_access_info: u32_, pub _bitfield_align_1: [u32; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, @@ -3575,14 +4642,20 @@ impl ExHeader_Arm11StorageInfo { } } #[doc = "The CPU-related and memory-layout-related info of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11CoreInfo { - #[doc = "The low title ID of the target firmware"] +#[doc = "The low title ID of the target firmware"] +#[doc = ""] + pub core_version: u32_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, - #[doc = "The priority of the title's main thread"] +#[doc = "The priority of the title's main thread"] +#[doc = ""] + pub priority: u8_, } impl Default for ExHeader_Arm11CoreInfo { @@ -3732,22 +4805,38 @@ impl ExHeader_Arm11CoreInfo { } } #[doc = "The ARM11 system-local capabilities of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11SystemLocalCapabilities { - #[doc = "Title ID"] +#[doc = "Title ID"] +#[doc = ""] + pub title_id: u64_, - #[doc = "Core info, see ExHeader_Arm11CoreInfo"] +#[doc = "Core info, see @ref ExHeader_Arm11CoreInfo"] +#[doc = ""] + pub core_info: ExHeader_Arm11CoreInfo, - #[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] +#[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] +#[doc = ""] + pub reslimits: [u16_; 16usize], - #[doc = "Storage info, see ExHeader_Arm11StorageInfo"] +#[doc = "Storage info, see @ref ExHeader_Arm11StorageInfo"] +#[doc = ""] + pub storage_info: ExHeader_Arm11StorageInfo, - #[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] +#[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] +#[doc = ""] + pub service_access: [[::libc::c_char; 8usize]; 34usize], - #[doc = "Reserved"] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 15usize], - #[doc = "Resource limit category, see ExHeader_Arm11SystemLocalCapabilities"] +#[doc = "Resource limit category, see @ref ExHeader_Arm11SystemLocalCapabilities"] +#[doc = ""] + pub reslimit_category: ResourceLimitCategory, } impl Default for ExHeader_Arm11SystemLocalCapabilities { @@ -3760,32 +4849,52 @@ impl Default for ExHeader_Arm11SystemLocalCapabilities { } } #[doc = "The ARM11 kernel capabilities of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11KernelCapabilities { - #[doc = "ARM11 kernel descriptors, see 3dbrew"] +#[doc = "ARM11 kernel descriptors, see 3dbrew"] +#[doc = ""] + pub descriptors: [u32_; 28usize], - #[doc = "Reserved"] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 16usize], } #[doc = "The ARM9 access control of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm9AccessControl { - #[doc = "Process9 FS descriptors, see 3dbrew"] +#[doc = "Process9 FS descriptors, see 3dbrew"] +#[doc = ""] + pub descriptors: [u8_; 15usize], - #[doc = "Descriptor version"] +#[doc = "Descriptor version"] +#[doc = ""] + pub descriptor_version: u8_, } #[doc = "The access control information of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessControlInfo { - #[doc = "ARM11 system-local capabilities, see ExHeader_Arm11SystemLocalCapabilities"] +#[doc = "ARM11 system-local capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] +#[doc = ""] + pub local_caps: ExHeader_Arm11SystemLocalCapabilities, - #[doc = "ARM11 kernel capabilities, see ExHeader_Arm11SystemLocalCapabilities"] +#[doc = "ARM11 kernel capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] +#[doc = ""] + pub kernel_caps: ExHeader_Arm11KernelCapabilities, - #[doc = "ARM9 access control, see ExHeader_Arm9AccessControl"] +#[doc = "ARM9 access control, see @ref ExHeader_Arm9AccessControl"] +#[doc = ""] + pub access_control: ExHeader_Arm9AccessControl, } impl Default for ExHeader_AccessControlInfo { @@ -3798,12 +4907,18 @@ impl Default for ExHeader_AccessControlInfo { } } #[doc = "Main extended header data, as returned by PXIPM, Loader and FSREG service commands"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Info { - #[doc = "System control info, see ExHeader_SystemControlInfo"] +#[doc = "System control info, see @ref ExHeader_SystemControlInfo"] +#[doc = ""] + pub sci: ExHeader_SystemControlInfo, - #[doc = "Access control info, see ExHeader_AccessControlInfo"] +#[doc = "Access control info, see @ref ExHeader_AccessControlInfo"] +#[doc = ""] + pub aci: ExHeader_AccessControlInfo, } impl Default for ExHeader_Info { @@ -3816,14 +4931,22 @@ impl Default for ExHeader_Info { } } #[doc = "Extended header access descriptor"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessDescriptor { - #[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] +#[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] +#[doc = ""] + pub signature: [u8_; 256usize], - #[doc = "The modulus used for the above signature, with 65537 as public exponent"] +#[doc = "The modulus used for the above signature, with 65537 as public exponent"] +#[doc = ""] + pub ncchModulus: [u8_; 256usize], - #[doc = "This is compared for equality with the first ACI by Process9, see ExHeader_AccessControlInfo"] +#[doc = "This is compared for equality with the first ACI by Process9, see @ref ExHeader_AccessControlInfo"] +#[doc = ""] + pub acli: ExHeader_AccessControlInfo, } impl Default for ExHeader_AccessDescriptor { @@ -3836,12 +4959,18 @@ impl Default for ExHeader_AccessDescriptor { } } #[doc = "The NCCH Extended Header of a title"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader { - #[doc = "Main extended header data, see ExHeader_Info"] +#[doc = "Main extended header data, see @ref ExHeader_Info"] +#[doc = ""] + pub info: ExHeader_Info, - #[doc = "Access descriptor, see ExHeader_AccessDescriptor"] +#[doc = "Access descriptor, see @ref ExHeader_AccessDescriptor"] +#[doc = ""] + pub access_descriptor: ExHeader_AccessDescriptor, } impl Default for ExHeader { @@ -3855,52 +4984,80 @@ impl Default for ExHeader { } extern "C" { #[must_use] - #[doc = "Initializes the service API."] +#[doc = "Initializes the service API."] +#[doc = ""] + pub fn srvInit() -> Result; } extern "C" { - #[doc = "Exits the service API."] +#[doc = "Exits the service API."] +#[doc = ""] + pub fn srvExit(); } extern "C" { - #[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] - #[doc = "* blocking Whether srvGetServiceHandle should be non-blocking."] - #[doc = " srvGetServiceHandle will always block if the service hasn't been registered yet,"] - #[doc = " use srvIsServiceRegistered to check whether that is the case or not."] +#[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] +#[doc = ""] +#[doc = "srvGetServiceHandle will always block if the service hasn't been registered yet,"] +#[doc = "use srvIsServiceRegistered to check whether that is the case or not."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `blocking` - Whether srvGetServiceHandle should be non-blocking."] + pub fn srvSetBlockingPolicy(nonBlocking: bool); } extern "C" { - #[doc = "Gets the current service API session handle."] - #[doc = "The current service API session handle."] +#[doc = "Gets the current service API session handle."] +#[doc = ""] +#[doc = "Returns: The current service API session handle."] +#[doc = ""] + pub fn srvGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] - #[doc = "* out Pointer to write the handle to."] - #[doc = "* name Name of the service."] - #[doc = "0 if no error occured,"] - #[doc = " 0xD8E06406 if the caller has no right to access the service,"] - #[doc = " 0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see srvSetBlockingPolicy)."] +#[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] +#[doc = ""] +#[doc = "0xD8E06406 if the caller has no right to access the service,"] +#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] +#[doc = ""] +#[doc = "Returns: 0 if no error occured,"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the handle to."] +#[doc = "* `name` - Name of the service."] + pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Registers the current process as a client to the service API."] +#[doc = "Registers the current process as a client to the service API."] +#[doc = ""] + pub fn srvRegisterClient() -> Result; } extern "C" { #[must_use] - #[doc = "Enables service notificatios, returning a notification semaphore."] - #[doc = "* semaphoreOut Pointer to output the notification semaphore to."] +#[doc = "Enables service notificatios, returning a notification semaphore."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `semaphoreOut` - Pointer to output the notification semaphore to."] + pub fn srvEnableNotification(semaphoreOut: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Registers the current process as a service."] - #[doc = "* out Pointer to write the service handle to."] - #[doc = "* name Name of the service."] - #[doc = "* maxSessions Maximum number of sessions the service can handle."] +#[doc = "Registers the current process as a service."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the service handle to."] +#[doc = "* `name` - Name of the service."] +#[doc = "* `maxSessions` - Maximum number of sessions the service can handle."] + pub fn srvRegisterService( out: *mut Handle, name: *const ::libc::c_char, @@ -3909,77 +5066,123 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters the current process as a service."] - #[doc = "* name Name of the service."] +#[doc = "Unregisters the current process as a service."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Name of the service."] + pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves a service handle."] - #[doc = "* out Pointer to output the handle to."] - #[doc = "* name Name of the service."] - #[doc = "* 0 if no error occured,"] - #[doc = " 0xD8E06406 if the caller has no right to access the service,"] - #[doc = " 0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see srvSetBlockingPolicy)."] +#[doc = "Retrieves a service handle."] +#[doc = ""] +#[doc = "0xD8E06406 if the caller has no right to access the service,"] +#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] +#[doc = ""] +#[doc = "Returns: 0 if no error occured,"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the handle to."] +#[doc = "* `name` - Name of the service."] + pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Registers a port."] - #[doc = "* name Name of the port."] - #[doc = "* clientHandle Client handle of the port."] +#[doc = "Registers a port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Name of the port."] +#[doc = "* `clientHandle` - Client handle of the port."] + pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Unregisters a port."] - #[doc = "* name Name of the port."] +#[doc = "Unregisters a port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Name of the port."] + pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves a port handle."] - #[doc = "* out Pointer to output the handle to."] - #[doc = "* name Name of the port."] +#[doc = "Retrieves a port handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the handle to."] +#[doc = "* `name` - Name of the port."] + pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for a port to be registered."] - #[doc = "* name Name of the port to wait for registration."] +#[doc = "Waits for a port to be registered."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Name of the port to wait for registration."] + pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Subscribes to a notification."] - #[doc = "* notificationId ID of the notification."] +#[doc = "Subscribes to a notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `notificationId` - ID of the notification."] + pub fn srvSubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Unsubscribes from a notification."] - #[doc = "* notificationId ID of the notification."] +#[doc = "Unsubscribes from a notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `notificationId` - ID of the notification."] + pub fn srvUnsubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Receives a notification."] - #[doc = "* notificationIdOut Pointer to output the ID of the received notification to."] +#[doc = "Receives a notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `notificationIdOut` - Pointer to output the ID of the received notification to."] + pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Publishes a notification to subscribers."] - #[doc = "* notificationId ID of the notification."] - #[doc = "* flags Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] +#[doc = "Publishes a notification to subscribers."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `notificationId` - ID of the notification."] +#[doc = "* `flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] + pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] - #[doc = "* processIdCountOut Pointer to output the number of process IDs to."] - #[doc = "* processIdsOut Pointer to output the process IDs to. Should have size \"60 * sizeof(u32)\"."] - #[doc = "* notificationId ID of the notification."] +#[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `processIdCountOut` - Pointer to output the number of process IDs to."] +#[doc = "* `processIdsOut` - Pointer to output the process IDs to. Should have size \"60 * sizeof(u32)\"."] +#[doc = "* `notificationId` - ID of the notification."] + pub fn srvPublishAndGetSubscriber( processIdCountOut: *mut u32_, processIdsOut: *mut u32_, @@ -3988,51 +5191,89 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks whether a service is registered."] - #[doc = "* registeredOut Pointer to output the registration status to."] - #[doc = "* name Name of the service to check."] +#[doc = "Checks whether a service is registered."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `registeredOut` - Pointer to output the registration status to."] +#[doc = "* `name` - Name of the service to check."] + pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Checks whether a port is registered."] - #[doc = "* registeredOut Pointer to output the registration status to."] - #[doc = "* name Name of the port to check."] +#[doc = "Checks whether a port is registered."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `registeredOut` - Pointer to output the registration status to."] +#[doc = "* `name` - Name of the port to check."] + pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } #[doc = "For generic errors. Shows miscellaneous info."] +#[doc = ""] + pub const ERRF_ERRTYPE_GENERIC: ERRF_ErrType = 0; #[doc = "Same output as generic, but informs the user that \"the System Memory has been damaged\"."] +#[doc = ""] + pub const ERRF_ERRTYPE_MEM_CORRUPT: ERRF_ErrType = 1; #[doc = "Displays the \"The Game Card was removed.\" message."] +#[doc = ""] + pub const ERRF_ERRTYPE_CARD_REMOVED: ERRF_ErrType = 2; #[doc = "For exceptions, or more specifically 'crashes'. union data should be exception_data."] +#[doc = ""] + pub const ERRF_ERRTYPE_EXCEPTION: ERRF_ErrType = 3; #[doc = "For general failure. Shows a message. union data should have a string set in failure_mesg"] +#[doc = ""] + pub const ERRF_ERRTYPE_FAILURE: ERRF_ErrType = 4; #[doc = "Outputs logs to NAND in some cases."] +#[doc = ""] + pub const ERRF_ERRTYPE_LOGGED: ERRF_ErrType = 5; #[doc = "Types of errors that can be thrown by err:f."] +#[doc = ""] + pub type ERRF_ErrType = ::libc::c_uint; #[doc = "Prefetch Abort"] +#[doc = ""] + pub const ERRF_EXCEPTION_PREFETCH_ABORT: ERRF_ExceptionType = 0; #[doc = "Data abort"] +#[doc = ""] + pub const ERRF_EXCEPTION_DATA_ABORT: ERRF_ExceptionType = 1; #[doc = "Undefined instruction"] +#[doc = ""] + pub const ERRF_EXCEPTION_UNDEFINED: ERRF_ExceptionType = 2; #[doc = "VFP (floating point) exception."] +#[doc = ""] + pub const ERRF_EXCEPTION_VFP: ERRF_ExceptionType = 3; #[doc = "Types of 'Exceptions' thrown for ERRF_ERRTYPE_EXCEPTION"] +#[doc = ""] + pub type ERRF_ExceptionType = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionInfo { - #[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] +#[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] +#[doc = ""] + pub type_: ERRF_ExceptionType, pub reserved: [u8_; 3usize], - #[doc = "ifsr (prefetch abort) / dfsr (data abort)"] +#[doc = "ifsr (prefetch abort) / dfsr (data abort)"] +#[doc = ""] + pub fsr: u32_, - #[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] +#[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] +#[doc = ""] + pub far: u32_, pub fpexc: u32_, pub fpinst: u32_, @@ -4050,9 +5291,13 @@ impl Default for ERRF_ExceptionInfo { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionData { - #[doc = "Exception info struct"] +#[doc = "Exception info struct"] +#[doc = ""] + pub excep: ERRF_ExceptionInfo, - #[doc = "CPU register dump."] +#[doc = "CPU register dump."] +#[doc = ""] + pub regs: CpuRegisters, } impl Default for ERRF_ExceptionData { @@ -4067,31 +5312,53 @@ impl Default for ERRF_ExceptionData { #[repr(C)] #[derive(Copy, Clone)] pub struct ERRF_FatalErrInfo { - #[doc = "Type, one of the ERRF_ERRTYPE_* enum"] +#[doc = "Type, one of the ERRF_ERRTYPE_* enum"] +#[doc = ""] + pub type_: ERRF_ErrType, - #[doc = "High revison ID"] +#[doc = "High revison ID"] +#[doc = ""] + pub revHigh: u8_, - #[doc = "Low revision ID"] +#[doc = "Low revision ID"] +#[doc = ""] + pub revLow: u16_, - #[doc = "Result code"] +#[doc = "Result code"] +#[doc = ""] + pub resCode: u32_, - #[doc = "PC address at exception"] +#[doc = "PC address at exception"] +#[doc = ""] + pub pcAddr: u32_, - #[doc = "Process ID."] +#[doc = "Process ID."] +#[doc = ""] + pub procId: u32_, - #[doc = "Title ID."] +#[doc = "Title ID."] +#[doc = ""] + pub titleId: u64_, - #[doc = "Application Title ID."] +#[doc = "Application Title ID."] +#[doc = ""] + pub appTitleId: u64_, - #[doc = "The different types of data for errors."] +#[doc = "The different types of data for errors."] +#[doc = ""] + pub data: ERRF_FatalErrInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ERRF_FatalErrInfo__bindgen_ty_1 { - #[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] +#[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] +#[doc = ""] + pub exception_data: ERRF_ExceptionData, - #[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] +#[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] +#[doc = ""] + pub failure_mesg: [::libc::c_char; 96usize], } impl Default for ERRF_FatalErrInfo__bindgen_ty_1 { @@ -4114,72 +5381,100 @@ impl Default for ERRF_FatalErrInfo { } extern "C" { #[must_use] - #[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] +#[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] +#[doc = ""] + pub fn errfInit() -> Result; } extern "C" { - #[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] +#[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] +#[doc = ""] + pub fn errfExit(); } extern "C" { - #[doc = "Gets the current err:f API session handle."] - #[doc = "The current err:f API session handle."] +#[doc = "Gets the current err:f API session handle."] +#[doc = ""] +#[doc = "Returns: The current err:f API session handle."] +#[doc = ""] + pub fn errfGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Throws a system error and possibly results in ErrDisp triggering."] - #[doc = "* error Error to throw."] - #[doc = ""] - #[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] - #[doc = "top screen with a developer console or the proper patches in a CFW applied."] - #[doc = ""] - #[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] - #[doc = ""] - #[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] - #[doc = "constructing the ERRF_FatalErrInfo struct yourself."] +#[doc = "Throws a system error and possibly results in ErrDisp triggering."] +#[doc = ""] +#[doc = ""] +#[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] +#[doc = "top screen with a developer console or the proper patches in a CFW applied."] +#[doc = ""] +#[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] +#[doc = ""] +#[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] +#[doc = "constructing the ERRF_FatalErrInfo struct yourself."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `error` - Error to throw. [Direction: In]"] + pub fn ERRF_Throw(error: *const ERRF_FatalErrInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Throws a system error with the given Result code."] - #[doc = "* failure Result code to throw."] - #[doc = ""] - #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] - #[doc = ""] - #[doc = "This function \\em does fill in the address where this function was called from."] - #[doc = ""] - #[doc = "See https://3dbrew.org/wiki/ERR:Throw#Generic for expected top screen output"] - #[doc = "on development units/patched ErrDisp."] +#[doc = "Throws a system error with the given Result code."] +#[doc = ""] +#[doc = ""] +#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] +#[doc = ""] +#[doc = "This function \\em does fill in the address where this function was called from."] +#[doc = ""] +#[doc = "See https://3dbrew.org/wiki/ERR:Throw#Generic for expected top screen output"] +#[doc = "on development units/patched ErrDisp."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `failure` - Result code to throw. [Direction: In]"] + pub fn ERRF_ThrowResult(failure: Result) -> Result; } extern "C" { #[must_use] - #[doc = "Throws a system error with the given Result code and message."] - #[doc = "* failure Result code to throw."] - #[doc = "* message The message to display."] - #[doc = ""] - #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] - #[doc = ""] - #[doc = "This function does \\em not fill in the address where this function was called from because it"] - #[doc = "would not be displayed."] - #[doc = ""] - #[doc = "The message is only displayed on development units/patched ErrDisp."] - #[doc = ""] - #[doc = "See https://3dbrew.org/wiki/ERR:Throw#Result_Failure for expected top screen output"] - #[doc = "on development units/patched ErrDisp."] +#[doc = "Throws a system error with the given Result code and message."] +#[doc = ""] +#[doc = ""] +#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] +#[doc = ""] +#[doc = "This function does \\em not fill in the address where this function was called from because it"] +#[doc = "would not be displayed."] +#[doc = ""] +#[doc = "The message is only displayed on development units/patched ErrDisp."] +#[doc = ""] +#[doc = "See https://3dbrew.org/wiki/ERR:Throw#Result_Failure for expected top screen output"] +#[doc = "on development units/patched ErrDisp."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `failure` - Result code to throw. [Direction: In]"] +#[doc = "* `message` - The message to display. [Direction: In]"] + pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result; } extern "C" { - #[doc = "Handles an exception using ErrDisp."] - #[doc = "* excep Exception information"] - #[doc = "* regs CPU registers"] - #[doc = ""] - #[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] - #[doc = "threadOnException"] +#[doc = "Handles an exception using ErrDisp."] +#[doc = ""] +#[doc = ""] +#[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `excep` - Exception information"] +#[doc = "* `regs` - CPU registers"] + pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters); } #[doc = "Kernel configuration page (read-only)."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osKernelConfig_s { @@ -4204,19 +5499,31 @@ pub struct osKernelConfig_s { pub firm_ctrsdk_ver: u32_, } #[doc = "Time reference information struct (filled in by PTM)."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osTimeRef_s { - #[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] +#[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] +#[doc = ""] + pub value_ms: u64_, - #[doc = "System ticks elapsed since boot when this structure was last updated"] +#[doc = "System ticks elapsed since boot when this structure was last updated"] +#[doc = ""] + pub value_tick: u64_, - #[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around \\ref SYSCLOCK_ARM11)"] +#[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around \\ref SYSCLOCK_ARM11)"] +#[doc = ""] + pub sysclock_hz: s64, - #[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] +#[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] +#[doc = ""] + pub drift_ms: s64, } #[doc = "Shared system configuration page structure (read-only or read-write depending on exheader)."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osSharedConfig_s { @@ -4241,15 +5548,23 @@ pub struct osSharedConfig_s { pub headset_connected: vu8, } #[doc = "Tick counter."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct TickCounter { - #[doc = "Elapsed CPU ticks between measurements."] +#[doc = "Elapsed CPU ticks between measurements."] +#[doc = ""] + pub elapsed: u64_, - #[doc = "Point in time used as reference."] +#[doc = "Point in time used as reference."] +#[doc = ""] + pub reference: u64_, } #[doc = "OS_VersionBin. Format of the system version: \"..-\""] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OS_VersionBin { @@ -4261,53 +5576,90 @@ pub struct OS_VersionBin { pub reserved_x5: [u8_; 3usize], } extern "C" { - #[doc = "Converts an address from virtual (process) memory to physical memory."] - #[doc = "* vaddr Input virtual address."] - #[doc = "The corresponding physical address."] - #[doc = "It is sometimes required by services or when using the GPU command buffer."] +#[doc = "Converts an address from virtual (process) memory to physical memory."] +#[doc = ""] +#[doc = "It is sometimes required by services or when using the GPU command buffer."] +#[doc = ""] +#[doc = "Returns: The corresponding physical address."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `vaddr` - Input virtual address."] + pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32_; } extern "C" { - #[doc = "Converts 0x14* vmem to 0x30*."] - #[doc = "* vaddr Input virtual address."] - #[doc = "The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] - pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void; -} +#[doc = "Converts 0x14* vmem to 0x30*."] +#[doc = ""] +#[doc = "Returns: The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `vaddr` - Input virtual address."] + + pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void; +} extern "C" { - #[doc = "Retrieves basic information about a service error."] - #[doc = "* error Error to retrieve information about."] - #[doc = "A string containing a summary of an error."] - #[doc = ""] - #[doc = "This can be used to get some details about an error returned by a service call."] +#[doc = "Retrieves basic information about a service error."] +#[doc = ""] +#[doc = ""] +#[doc = "This can be used to get some details about an error returned by a service call."] +#[doc = ""] +#[doc = "Returns: A string containing a summary of an error."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `error` - Error to retrieve information about."] + pub fn osStrError(error: Result) -> *const ::libc::c_char; } extern "C" { - #[doc = "Reads the latest reference timepoint published by PTM."] - #[doc = "Structure (see \\ref osTimeRef_s)."] +#[doc = "Reads the latest reference timepoint published by PTM."] +#[doc = ""] +#[doc = "Returns: Structure (see \\ref osTimeRef_s)."] +#[doc = ""] + pub fn osGetTimeRef() -> osTimeRef_s; } extern "C" { - #[doc = "Gets the current time."] - #[doc = "The number of milliseconds since 1st Jan 1900 00:00."] +#[doc = "Gets the current time."] +#[doc = ""] +#[doc = "Returns: The number of milliseconds since 1st Jan 1900 00:00."] +#[doc = ""] + pub fn osGetTime() -> u64_; } extern "C" { - #[doc = "Reads the elapsed time in a tick counter."] - #[doc = "* cnt The tick counter."] - #[doc = "The number of milliseconds elapsed."] +#[doc = "Reads the elapsed time in a tick counter."] +#[doc = ""] +#[doc = "Returns: The number of milliseconds elapsed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cnt` - The tick counter."] + pub fn osTickCounterRead(cnt: *const TickCounter) -> f64; } extern "C" { - #[doc = "Configures the New 3DS speedup."] - #[doc = "* enable Specifies whether to enable or disable the speedup."] +#[doc = "Configures the New 3DS speedup."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Specifies whether to enable or disable the speedup."] + pub fn osSetSpeedupEnable(enable: bool); } extern "C" { #[must_use] - #[doc = "Gets the NAND system-version stored in NVer/CVer."] - #[doc = "* nver_versionbin Output OS_VersionBin structure for the data read from NVer."] - #[doc = "* cver_versionbin Output OS_VersionBin structure for the data read from CVer."] - #[doc = "The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] +#[doc = "Gets the NAND system-version stored in NVer/CVer."] +#[doc = ""] +#[doc = "Returns: The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] +#[doc = "* `cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] + pub fn osGetSystemVersionData( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -4315,12 +5667,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This is a wrapper for osGetSystemVersionData."] - #[doc = "* nver_versionbin Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] - #[doc = "* cver_versionbin Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] - #[doc = "* sysverstr Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] - #[doc = "* sysverstr_maxsize Max size of the above string buffer, *including* NULL-terminator."] - #[doc = "See osGetSystemVersionData."] +#[doc = "This is a wrapper for osGetSystemVersionData."] +#[doc = ""] +#[doc = "Returns: See osGetSystemVersionData."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nver_versionbin` - Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] +#[doc = "* `cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] +#[doc = "* `sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] +#[doc = "* `sysverstr_maxsize` - Max size of the above string buffer, *including* NULL-terminator."] + pub fn osGetSystemVersionDataString( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -4368,65 +5725,89 @@ extern "C" { pub fn __libc_lock_try_acquire_recursive(lock: *mut _LOCK_RECURSIVE_T) -> ::libc::c_int; } #[doc = "A light lock."] +#[doc = ""] + pub type LightLock = _LOCK_T; #[doc = "A recursive lock."] +#[doc = ""] + pub type RecursiveLock = _LOCK_RECURSIVE_T; #[doc = "A condition variable."] +#[doc = ""] + pub type CondVar = s32; #[doc = "A light event."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightEvent { - #[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] +#[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] +#[doc = ""] + pub state: s32, - #[doc = "Lock used for sticky timer operation"] +#[doc = "Lock used for sticky timer operation"] +#[doc = ""] + pub lock: LightLock, } #[doc = "A light semaphore."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightSemaphore { - #[doc = "The current release count of the semaphore"] +#[doc = "The current release count of the semaphore"] +#[doc = ""] + pub current_count: s32, - #[doc = "Number of threads concurrently acquiring the semaphore"] +#[doc = "Number of threads concurrently acquiring the semaphore"] +#[doc = ""] + pub num_threads_acq: s16, - #[doc = "The maximum release count of the semaphore"] +#[doc = "The maximum release count of the semaphore"] +#[doc = ""] + pub max_count: s16, } extern "C" { #[must_use] - #[doc = "Function used to implement user-mode synchronization primitives."] - #[doc = "* addr Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] - #[doc = "* type Type of action to be performed by the arbiter"] - #[doc = "* value Number of threads to signal if using ARBITRATION_SIGNAL, or the value used for comparison."] - #[doc = ""] - #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] - #[doc = ""] - #[doc = "@code"] - #[doc = "s32 val=0;"] - #[doc = "// Does *nothing* since val >= 0"] - #[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] - #[doc = "@endcode"] - #[doc = ""] - #[doc = "Usage of this function entails an implicit Data Memory Barrier (dmb)."] +#[doc = "Function used to implement user-mode synchronization primitives."] +#[doc = ""] +#[doc = ""] +#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] +#[doc = ""] +#[doc = "s32 val=0;"] +#[doc = "// Does *nothing* since val >= 0"] +#[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] +#[doc = "* `type` - Type of action to be performed by the arbiter"] +#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] + pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] - #[doc = "* addr Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] - #[doc = "* type Type of action to be performed by the arbiter (must use \\ref ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT or \\ref ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)"] - #[doc = "* value Number of threads to signal if using ARBITRATION_SIGNAL, or the value used for comparison."] - #[doc = ""] - #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] - #[doc = ""] - #[doc = "@code"] - #[doc = "s32 val=0;"] - #[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] - #[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] - #[doc = "@endcode"] - #[doc = ""] - #[doc = "Usage of this function entails an implicit Data Memory Barrier (dmb)."] +#[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] +#[doc = ""] +#[doc = ""] +#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] +#[doc = ""] +#[doc = "s32 val=0;"] +#[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] +#[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] +#[doc = "* `type` - Type of action to be performed by the arbiter (must use \\ref ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT or \\ref ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)"] +#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] + pub fn syncArbitrateAddressWithTimeout( addr: *mut s32, type_: ArbitrationType, @@ -4435,64 +5816,111 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Initializes a light lock."] - #[doc = "* lock Pointer to the lock."] +#[doc = "Initializes a light lock."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn LightLock_Init(lock: *mut LightLock); } extern "C" { - #[doc = "Locks a light lock."] - #[doc = "* lock Pointer to the lock."] +#[doc = "Locks a light lock."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn LightLock_Lock(lock: *mut LightLock); } extern "C" { - #[doc = "Attempts to lock a light lock."] - #[doc = "* lock Pointer to the lock."] - #[doc = "Zero on success, non-zero on failure."] +#[doc = "Attempts to lock a light lock."] +#[doc = ""] +#[doc = "Returns: Zero on success, non-zero on failure."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn LightLock_TryLock(lock: *mut LightLock) -> ::libc::c_int; } extern "C" { - #[doc = "Unlocks a light lock."] - #[doc = "* lock Pointer to the lock."] +#[doc = "Unlocks a light lock."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn LightLock_Unlock(lock: *mut LightLock); } extern "C" { - #[doc = "Initializes a recursive lock."] - #[doc = "* lock Pointer to the lock."] +#[doc = "Initializes a recursive lock."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn RecursiveLock_Init(lock: *mut RecursiveLock); } extern "C" { - #[doc = "Locks a recursive lock."] - #[doc = "* lock Pointer to the lock."] +#[doc = "Locks a recursive lock."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn RecursiveLock_Lock(lock: *mut RecursiveLock); } extern "C" { - #[doc = "Attempts to lock a recursive lock."] - #[doc = "* lock Pointer to the lock."] - #[doc = "Zero on success, non-zero on failure."] +#[doc = "Attempts to lock a recursive lock."] +#[doc = ""] +#[doc = "Returns: Zero on success, non-zero on failure."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> ::libc::c_int; } extern "C" { - #[doc = "Unlocks a recursive lock."] - #[doc = "* lock Pointer to the lock."] +#[doc = "Unlocks a recursive lock."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `lock` - Pointer to the lock."] + pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock); } extern "C" { - #[doc = "Initializes a condition variable."] - #[doc = "* cv Pointer to the condition variable."] +#[doc = "Initializes a condition variable."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cv` - Pointer to the condition variable."] + pub fn CondVar_Init(cv: *mut CondVar); } extern "C" { - #[doc = "Waits on a condition variable."] - #[doc = "* cv Pointer to the condition variable."] - #[doc = "* lock Pointer to the lock to atomically unlock/relock during the wait."] +#[doc = "Waits on a condition variable."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cv` - Pointer to the condition variable."] +#[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] + pub fn CondVar_Wait(cv: *mut CondVar, lock: *mut LightLock); } extern "C" { - #[doc = "Waits on a condition variable with a timeout."] - #[doc = "* cv Pointer to the condition variable."] - #[doc = "* lock Pointer to the lock to atomically unlock/relock during the wait."] - #[doc = "* timeout_ns Timeout in nanoseconds."] - #[doc = "Zero on success, non-zero on failure."] +#[doc = "Waits on a condition variable with a timeout."] +#[doc = ""] +#[doc = "Returns: Zero on success, non-zero on failure."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cv` - Pointer to the condition variable."] +#[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] +#[doc = "* `timeout_ns` - Timeout in nanoseconds."] + pub fn CondVar_WaitTimeout( cv: *mut CondVar, lock: *mut LightLock, @@ -4500,74 +5928,125 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { - #[doc = "Wakes up threads waiting on a condition variable."] - #[doc = "* cv Pointer to the condition variable."] - #[doc = "* num_threads Maximum number of threads to wake up (or \\ref ARBITRATION_SIGNAL_ALL to wake them all)."] +#[doc = "Wakes up threads waiting on a condition variable."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cv` - Pointer to the condition variable."] +#[doc = "* `num_threads` - Maximum number of threads to wake up (or \\ref ARBITRATION_SIGNAL_ALL to wake them all)."] + pub fn CondVar_WakeUp(cv: *mut CondVar, num_threads: s32); } extern "C" { - #[doc = "Initializes a light event."] - #[doc = "* event Pointer to the event."] - #[doc = "* reset_type Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] +#[doc = "Initializes a light event."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the event."] +#[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] + pub fn LightEvent_Init(event: *mut LightEvent, reset_type: ResetType); } extern "C" { - #[doc = "Clears a light event."] - #[doc = "* event Pointer to the event."] +#[doc = "Clears a light event."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the event."] + pub fn LightEvent_Clear(event: *mut LightEvent); } extern "C" { - #[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] - #[doc = "* event Pointer to the event."] +#[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the event."] + pub fn LightEvent_Pulse(event: *mut LightEvent); } extern "C" { - #[doc = "Signals a light event, waking up threads waiting on it."] - #[doc = "* event Pointer to the event."] +#[doc = "Signals a light event, waking up threads waiting on it."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the event."] + pub fn LightEvent_Signal(event: *mut LightEvent); } extern "C" { - #[doc = "Attempts to wait on a light event."] - #[doc = "* event Pointer to the event."] - #[doc = "Non-zero if the event was signaled, zero otherwise."] +#[doc = "Attempts to wait on a light event."] +#[doc = ""] +#[doc = "Returns: Non-zero if the event was signaled, zero otherwise."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the event."] + pub fn LightEvent_TryWait(event: *mut LightEvent) -> ::libc::c_int; } extern "C" { - #[doc = "Waits on a light event."] - #[doc = "* event Pointer to the event."] +#[doc = "Waits on a light event."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the event."] + pub fn LightEvent_Wait(event: *mut LightEvent); } extern "C" { - #[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] - #[doc = "* event Pointer to the event."] - #[doc = "* timeout_ns Timeout in nanoseconds."] - #[doc = "Non-zero on timeout, zero otherwise."] +#[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] +#[doc = ""] +#[doc = "Returns: Non-zero on timeout, zero otherwise."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the event."] +#[doc = "* `timeout_ns` - Timeout in nanoseconds."] + pub fn LightEvent_WaitTimeout(event: *mut LightEvent, timeout_ns: s64) -> ::libc::c_int; } extern "C" { - #[doc = "Initializes a light semaphore."] - #[doc = "* event Pointer to the semaphore."] - #[doc = "* max_count Initial count of the semaphore."] - #[doc = "* max_count Maximum count of the semaphore."] +#[doc = "Initializes a light semaphore."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to the semaphore."] +#[doc = "* `max_count` - Initial count of the semaphore."] +#[doc = "* `max_count` - Maximum count of the semaphore."] + pub fn LightSemaphore_Init(semaphore: *mut LightSemaphore, initial_count: s16, max_count: s16); } extern "C" { - #[doc = "Acquires a light semaphore."] - #[doc = "* semaphore Pointer to the semaphore."] - #[doc = "* count Acquire count"] +#[doc = "Acquires a light semaphore."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `semaphore` - Pointer to the semaphore."] +#[doc = "* `count` - Acquire count"] + pub fn LightSemaphore_Acquire(semaphore: *mut LightSemaphore, count: s32); } extern "C" { - #[doc = "Attempts to acquire a light semaphore."] - #[doc = "* semaphore Pointer to the semaphore."] - #[doc = "* count Acquire count"] - #[doc = "Zero on success, non-zero on failure"] +#[doc = "Attempts to acquire a light semaphore."] +#[doc = ""] +#[doc = "Returns: Zero on success, non-zero on failure"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `semaphore` - Pointer to the semaphore."] +#[doc = "* `count` - Acquire count"] + pub fn LightSemaphore_TryAcquire(semaphore: *mut LightSemaphore, count: s32) -> ::libc::c_int; } extern "C" { - #[doc = "Releases a light semaphore."] - #[doc = "* semaphore Pointer to the semaphore."] - #[doc = "* count Release count"] +#[doc = "Releases a light semaphore."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `semaphore` - Pointer to the semaphore."] +#[doc = "* `count` - Release count"] + pub fn LightSemaphore_Release(semaphore: *mut LightSemaphore, count: s32); } #[repr(C)] @@ -4576,34 +6055,42 @@ pub struct Thread_tag { _unused: [u8; 0], } #[doc = "libctru thread handle type"] +#[doc = ""] + pub type Thread = *mut Thread_tag; #[doc = "Exception handler type, necessarily an ARM function that does not return."] +#[doc = ""] + pub type ExceptionHandler = ::core::option::Option< unsafe extern "C" fn(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters), >; extern "C" { - #[doc = "Creates a new libctru thread."] - #[doc = "* entrypoint The function that will be called first upon thread creation"] - #[doc = "* arg The argument passed to @p entrypoint"] - #[doc = "* stack_size The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] - #[doc = "* prio Low values gives the thread higher priority."] - #[doc = " For userland apps, this has to be within the range [0x18;0x3F]."] - #[doc = " The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] - #[doc = " to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] - #[doc = "* core_id The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] - #[doc = " On Old3DS it must be <2, and on New3DS it must be <4."] - #[doc = " Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] - #[doc = "* detached When set to true, the thread is automatically freed when it finishes."] - #[doc = "The libctru thread handle on success, NULL on failure."] - #[doc = ""] - #[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] - #[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] - #[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] - #[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] - #[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] - #[doc = ""] - #[doc = "Default exit code of a thread is 0."] - #[doc = "@warning svcExitThread should never be called from the thread, use threadExit instead."] +#[doc = "Creates a new libctru thread."] +#[doc = ""] +#[doc = "For userland apps, this has to be within the range [0x18;0x3F]."] +#[doc = "The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] +#[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] +#[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] +#[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] +#[doc = ""] +#[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] +#[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] +#[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] +#[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] +#[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: The libctru thread handle on success, NULL on failure."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `entrypoint` - The function that will be called first upon thread creation"] +#[doc = "* `arg` - The argument passed to @p entrypoint"] +#[doc = "* `stack_size` - The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] +#[doc = "* `prio` - Low values gives the thread higher priority."] +#[doc = "* `core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] +#[doc = "* `detached` - When set to true, the thread is automatically freed when it finishes."] + pub fn threadCreate( entrypoint: ThreadFunc, arg: *mut ::libc::c_void, @@ -4614,62 +6101,106 @@ extern "C" { ) -> Thread; } extern "C" { - #[doc = "Retrieves the OS thread handle of a libctru thread."] - #[doc = "* thread libctru thread handle"] - #[doc = "OS thread handle"] +#[doc = "Retrieves the OS thread handle of a libctru thread."] +#[doc = ""] +#[doc = "Returns: OS thread handle"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - libctru thread handle"] + pub fn threadGetHandle(thread: Thread) -> Handle; } extern "C" { - #[doc = "Retrieves the exit code of a finished libctru thread."] - #[doc = "* thread libctru thread handle"] - #[doc = "Exit code"] +#[doc = "Retrieves the exit code of a finished libctru thread."] +#[doc = ""] +#[doc = "Returns: Exit code"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - libctru thread handle"] + pub fn threadGetExitCode(thread: Thread) -> ::libc::c_int; } extern "C" { - #[doc = "Frees a finished libctru thread."] - #[doc = "* thread libctru thread handle"] - #[doc = "@remarks This function should not be called if the thread is detached, as it is freed automatically when it finishes."] +#[doc = "Frees a finished libctru thread."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - libctru thread handle"] + pub fn threadFree(thread: Thread); } extern "C" { #[must_use] - #[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] - #[doc = "* thread libctru thread handle"] - #[doc = "* timeout_ns Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] +#[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - libctru thread handle"] +#[doc = "* `timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] + pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result; } extern "C" { - #[doc = " Changes a thread's status from attached to detached."] - #[doc = "* thread libctru thread handle"] +#[doc = "Changes a thread's status from attached to detached."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `thread` - libctru thread handle"] + pub fn threadDetach(thread: Thread); } extern "C" { - #[doc = "Retrieves the libctru thread handle of the current thread."] - #[doc = "libctru thread handle of the current thread, or NULL for the main thread"] +#[doc = "Retrieves the libctru thread handle of the current thread."] +#[doc = ""] +#[doc = "Returns: Libctru thread handle of the current thread, or NULL for the main thread"] +#[doc = ""] + pub fn threadGetCurrent() -> Thread; } extern "C" { - #[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] - #[doc = "* rc Exit code"] +#[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `rc` - Exit code"] + pub fn threadExit(rc: ::libc::c_int); } #[doc = "Framebuffer information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_FramebufferInfo { - #[doc = "Active framebuffer. (0 = first, 1 = second)"] +#[doc = "Active framebuffer. (0 = first, 1 = second)"] +#[doc = ""] + pub active_framebuf: u32_, - #[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] +#[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] +#[doc = ""] + pub framebuf0_vaddr: *mut u32_, - #[doc = "For the main screen: 3D right framebuffer address."] +#[doc = "For the main screen: 3D right framebuffer address."] +#[doc = ""] + pub framebuf1_vaddr: *mut u32_, - #[doc = "Value for 0x1EF00X90, controls framebuffer width."] +#[doc = "Value for 0x1EF00X90, controls framebuffer width."] +#[doc = ""] + pub framebuf_widthbytesize: u32_, - #[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] +#[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] +#[doc = ""] + pub format: u32_, - #[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] +#[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] +#[doc = ""] + pub framebuf_dispselect: u32_, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unk: u32_, } impl Default for GSPGPU_FramebufferInfo { @@ -4682,28 +6213,50 @@ impl Default for GSPGPU_FramebufferInfo { } } #[doc = "RGBA8. (4 bytes)"] +#[doc = ""] + pub const GSP_RGBA8_OES: GSPGPU_FramebufferFormat = 0; #[doc = "BGR8. (3 bytes)"] +#[doc = ""] + pub const GSP_BGR8_OES: GSPGPU_FramebufferFormat = 1; #[doc = "RGB565. (2 bytes)"] +#[doc = ""] + pub const GSP_RGB565_OES: GSPGPU_FramebufferFormat = 2; #[doc = "RGB5A1. (2 bytes)"] +#[doc = ""] + pub const GSP_RGB5_A1_OES: GSPGPU_FramebufferFormat = 3; #[doc = "RGBA4. (2 bytes)"] +#[doc = ""] + pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormat = 4; #[doc = "Framebuffer format."] +#[doc = ""] + pub type GSPGPU_FramebufferFormat = ::libc::c_uint; #[doc = "Capture info entry."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfoEntry { - #[doc = "Left framebuffer."] +#[doc = "Left framebuffer."] +#[doc = ""] + pub framebuf0_vaddr: *mut u32_, - #[doc = "Right framebuffer."] +#[doc = "Right framebuffer."] +#[doc = ""] + pub framebuf1_vaddr: *mut u32_, - #[doc = "Framebuffer format."] +#[doc = "Framebuffer format."] +#[doc = ""] + pub format: u32_, - #[doc = "Framebuffer pitch."] +#[doc = "Framebuffer pitch."] +#[doc = ""] + pub framebuf_widthbytesize: u32_, } impl Default for GSPGPU_CaptureInfoEntry { @@ -4716,10 +6269,14 @@ impl Default for GSPGPU_CaptureInfoEntry { } } #[doc = "Capture info."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfo { - #[doc = "Capture info entries, one for each screen."] +#[doc = "Capture info entries, one for each screen."] +#[doc = ""] + pub screencapture: [GSPGPU_CaptureInfoEntry; 2usize], } impl Default for GSPGPU_CaptureInfo { @@ -4732,51 +6289,82 @@ impl Default for GSPGPU_CaptureInfo { } } #[doc = "Memory fill completed."] +#[doc = ""] + pub const GSPGPU_EVENT_PSC0: GSPGPU_Event = 0; #[doc = "TODO"] +#[doc = ""] + pub const GSPGPU_EVENT_PSC1: GSPGPU_Event = 1; #[doc = "TODO"] +#[doc = ""] + pub const GSPGPU_EVENT_VBlank0: GSPGPU_Event = 2; #[doc = "TODO"] +#[doc = ""] + pub const GSPGPU_EVENT_VBlank1: GSPGPU_Event = 3; #[doc = "Display transfer finished."] +#[doc = ""] + pub const GSPGPU_EVENT_PPF: GSPGPU_Event = 4; #[doc = "Command list processing finished."] +#[doc = ""] + pub const GSPGPU_EVENT_P3D: GSPGPU_Event = 5; #[doc = "TODO"] +#[doc = ""] + pub const GSPGPU_EVENT_DMA: GSPGPU_Event = 6; #[doc = "Used to know how many events there are."] +#[doc = ""] + pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7; #[doc = "GSPGPU events."] +#[doc = ""] + pub type GSPGPU_Event = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes GSPGPU."] +#[doc = "Initializes GSPGPU."] +#[doc = ""] + pub fn gspInit() -> Result; } extern "C" { - #[doc = "Exits GSPGPU."] +#[doc = "Exits GSPGPU."] +#[doc = ""] + pub fn gspExit(); } extern "C" { - #[doc = "Gets a pointer to the current gsp::Gpu session handle."] - #[doc = "A pointer to the current gsp::Gpu session handle."] +#[doc = "Gets a pointer to the current gsp::Gpu session handle."] +#[doc = ""] +#[doc = "Returns: A pointer to the current gsp::Gpu session handle."] +#[doc = ""] + pub fn gspGetSessionHandle() -> *mut Handle; } extern "C" { - #[doc = "Returns true if the application currently has GPU rights."] +#[doc = "Returns true if the application currently has GPU rights."] +#[doc = ""] + pub fn gspHasGpuRight() -> bool; } extern "C" { - #[doc = "Presents a buffer to the specified screen."] - #[doc = "* screen Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] - #[doc = "* swap Specifies which set of framebuffer registers to configure and activate (0 or 1)"] - #[doc = "* fb_a Pointer to the framebuffer (in stereo mode: left eye)"] - #[doc = "* fb_b Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] - #[doc = "* stride Stride in bytes between scanlines"] - #[doc = "* mode Mode configuration to be written to LCD register"] - #[doc = "true if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] - #[doc = "The most recently presented buffer is processed and configured during the specified screen's next VBlank event."] +#[doc = "Presents a buffer to the specified screen."] +#[doc = ""] +#[doc = "Returns: True if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] +#[doc = "* `swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] +#[doc = "* `fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] +#[doc = "* `fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] +#[doc = "* `stride` - Stride in bytes between scanlines"] +#[doc = "* `mode` - Mode configuration to be written to LCD register"] + pub fn gspPresentBuffer( screen: ::libc::c_uint, swap: ::libc::c_uint, @@ -4787,85 +6375,129 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Returns true if a prior \\ref gspPresentBuffer command is still pending to be processed by GSP."] - #[doc = "* screen Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] +#[doc = "Returns true if a prior \\ref gspPresentBuffer command is still pending to be processed by GSP."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] + pub fn gspIsPresentPending(screen: ::libc::c_uint) -> bool; } extern "C" { - #[doc = "Configures a callback to run when a GSPGPU event occurs."] - #[doc = "* id ID of the event."] - #[doc = "* cb Callback to run."] - #[doc = "* data Data to be passed to the callback."] - #[doc = "* oneShot When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] - pub fn gspSetEventCallback( - id: GSPGPU_Event, +#[doc = "Configures a callback to run when a GSPGPU event occurs."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the event."] +#[doc = "* `cb` - Callback to run."] +#[doc = "* `data` - Data to be passed to the callback."] +#[doc = "* `oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] + + pub fn gspSetEventCallback( + id: GSPGPU_Event, cb: ThreadFunc, data: *mut ::libc::c_void, oneShot: bool, ); } extern "C" { - #[doc = "Waits for a GSPGPU event to occur."] - #[doc = "* id ID of the event."] - #[doc = "* nextEvent Whether to discard the current event and wait for the next event."] +#[doc = "Waits for a GSPGPU event to occur."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the event."] +#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + pub fn gspWaitForEvent(id: GSPGPU_Event, nextEvent: bool); } extern "C" { - #[doc = "Waits for any GSPGPU event to occur."] - #[doc = "The ID of the event that occurred."] - #[doc = ""] - #[doc = "The function returns immediately if there are unprocessed events at the time of call."] +#[doc = "Waits for any GSPGPU event to occur."] +#[doc = ""] +#[doc = ""] +#[doc = "The function returns immediately if there are unprocessed events at the time of call."] +#[doc = ""] +#[doc = "Returns: The ID of the event that occurred."] +#[doc = ""] + pub fn gspWaitForAnyEvent() -> GSPGPU_Event; } extern "C" { #[must_use] - #[doc = "Submits a GX command."] - #[doc = "* gxCommand GX command to execute."] +#[doc = "Submits a GX command."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `gxCommand` - GX command to execute."] + pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Acquires GPU rights."] - #[doc = "* flags Flags to acquire with."] +#[doc = "Acquires GPU rights."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flags` - Flags to acquire with."] + pub fn GSPGPU_AcquireRight(flags: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Releases GPU rights."] +#[doc = "Releases GPU rights."] +#[doc = ""] + pub fn GSPGPU_ReleaseRight() -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves display capture info."] - #[doc = "* captureinfo Pointer to output capture info to."] +#[doc = "Retrieves display capture info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `captureinfo` - Pointer to output capture info to."] + pub fn GSPGPU_ImportDisplayCaptureInfo(captureinfo: *mut GSPGPU_CaptureInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Saves the VRAM sys area."] +#[doc = "Saves the VRAM sys area."] +#[doc = ""] + pub fn GSPGPU_SaveVramSysArea() -> Result; } extern "C" { #[must_use] - #[doc = "Resets the GPU"] +#[doc = "Resets the GPU"] +#[doc = ""] + pub fn GSPGPU_ResetGpuCore() -> Result; } extern "C" { #[must_use] - #[doc = "Restores the VRAM sys area."] +#[doc = "Restores the VRAM sys area."] +#[doc = ""] + pub fn GSPGPU_RestoreVramSysArea() -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to force the LCD to black."] - #[doc = "* flags Whether to force the LCD to black. (0 = no, non-zero = yes)"] +#[doc = "Sets whether to force the LCD to black."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] + pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Updates a screen's framebuffer state."] - #[doc = "* screenid ID of the screen to update."] - #[doc = "* framebufinfo Framebuffer information to update with."] +#[doc = "Updates a screen's framebuffer state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screenid` - ID of the screen to update."] +#[doc = "* `framebufinfo` - Framebuffer information to update with."] + pub fn GSPGPU_SetBufferSwap( screenid: u32_, framebufinfo: *const GSPGPU_FramebufferInfo, @@ -4873,34 +6505,50 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Flushes memory from the data cache."] - #[doc = "* adr Address to flush."] - #[doc = "* size Size of the memory to flush."] +#[doc = "Flushes memory from the data cache."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `adr` - Address to flush."] +#[doc = "* `size` - Size of the memory to flush."] + pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates memory in the data cache."] - #[doc = "* adr Address to invalidate."] - #[doc = "* size Size of the memory to invalidate."] +#[doc = "Invalidates memory in the data cache."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `adr` - Address to invalidate."] +#[doc = "* `size` - Size of the memory to invalidate."] + pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to GPU hardware registers."] - #[doc = "* regAddr Register address to write to."] - #[doc = "* data Data to write."] - #[doc = "* size Size of the data to write."] +#[doc = "Writes to GPU hardware registers."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `regAddr` - Register address to write to."] +#[doc = "* `data` - Data to write."] +#[doc = "* `size` - Size of the data to write."] + pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to GPU hardware registers with a mask."] - #[doc = "* regAddr Register address to write to."] - #[doc = "* data Data to write."] - #[doc = "* datasize Size of the data to write."] - #[doc = "* maskdata Data of the mask."] - #[doc = "* masksize Size of the mask."] +#[doc = "Writes to GPU hardware registers with a mask."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `regAddr` - Register address to write to."] +#[doc = "* `data` - Data to write."] +#[doc = "* `datasize` - Size of the data to write."] +#[doc = "* `maskdata` - Data of the mask."] +#[doc = "* `masksize` - Size of the mask."] + pub fn GSPGPU_WriteHWRegsWithMask( regAddr: u32_, data: *const u32_, @@ -4911,19 +6559,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from GPU hardware registers."] - #[doc = "* regAddr Register address to read from."] - #[doc = "* data Buffer to read data to."] - #[doc = "* size Size of the buffer."] +#[doc = "Reads from GPU hardware registers."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `regAddr` - Register address to read from."] +#[doc = "* `data` - Buffer to read data to."] +#[doc = "* `size` - Size of the buffer."] + pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Registers the interrupt relay queue."] - #[doc = "* eventHandle Handle of the GX command event."] - #[doc = "* flags Flags to register with."] - #[doc = "* outMemHandle Pointer to output the shared memory handle to."] - #[doc = "* threadID Pointer to output the GSP thread ID to."] +#[doc = "Registers the interrupt relay queue."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `eventHandle` - Handle of the GX command event."] +#[doc = "* `flags` - Flags to register with."] +#[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] +#[doc = "* `threadID` - Pointer to output the GSP thread ID to."] + pub fn GSPGPU_RegisterInterruptRelayQueue( eventHandle: Handle, flags: u32_, @@ -4933,50 +6589,78 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters the interrupt relay queue."] +#[doc = "Unregisters the interrupt relay queue."] +#[doc = ""] + pub fn GSPGPU_UnregisterInterruptRelayQueue() -> Result; } extern "C" { #[must_use] - #[doc = "Triggers a handling of commands written to shared memory."] +#[doc = "Triggers a handling of commands written to shared memory."] +#[doc = ""] + pub fn GSPGPU_TriggerCmdReqQueue() -> Result; } extern "C" { #[must_use] - #[doc = "Sets 3D_LEDSTATE to the input state value."] - #[doc = "* disable False = 3D LED enable, true = 3D LED disable."] +#[doc = "Sets 3D_LEDSTATE to the input state value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] + pub fn GSPGPU_SetLedForceOff(disable: bool) -> Result; } #[doc = "Top screen"] +#[doc = ""] + pub const GFX_TOP: gfxScreen_t = 0; #[doc = "Bottom screen"] +#[doc = ""] + pub const GFX_BOTTOM: gfxScreen_t = 1; #[doc = "Screen IDs."] +#[doc = ""] + pub type gfxScreen_t = ::libc::c_uint; #[doc = "Left eye framebuffer"] +#[doc = ""] + pub const GFX_LEFT: gfx3dSide_t = 0; #[doc = "Right eye framebuffer"] +#[doc = ""] + pub const GFX_RIGHT: gfx3dSide_t = 1; #[doc = "Top screen framebuffer side."] #[doc = ""] +#[doc = ""] #[doc = "This is only meaningful when stereoscopic 3D is enabled on the top screen."] #[doc = "In any other case, use \\ref GFX_LEFT."] +#[doc = ""] + pub type gfx3dSide_t = ::libc::c_uint; extern "C" { - #[doc = "Initializes the LCD framebuffers with default parameters"] - #[doc = "This is equivalent to calling: @code gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); @endcode"] +#[doc = "Initializes the LCD framebuffers with default parameters"] +#[doc = ""] +#[doc = "This is equivalent to calling: @code gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); @endcode"] +#[doc = ""] + pub fn gfxInitDefault(); } extern "C" { - #[doc = "Initializes the LCD framebuffers."] - #[doc = "* topFormat The format of the top screen framebuffers."] - #[doc = "* bottomFormat The format of the bottom screen framebuffers."] - #[doc = "* vramBuffers Whether to allocate the framebuffers in VRAM."] - #[doc = ""] - #[doc = "This function allocates memory for the framebuffers in the specified memory region."] - #[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] - #[doc = ""] - #[doc = "This function internally calls \\ref gspInit."] +#[doc = "Initializes the LCD framebuffers."] +#[doc = ""] +#[doc = ""] +#[doc = "This function allocates memory for the framebuffers in the specified memory region."] +#[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `topFormat` - The format of the top screen framebuffers."] +#[doc = "* `bottomFormat` - The format of the bottom screen framebuffers."] +#[doc = "* `vramBuffers` - Whether to allocate the framebuffers in VRAM."] + pub fn gfxInit( topFormat: GSPGPU_FramebufferFormat, bottomFormat: GSPGPU_FramebufferFormat, @@ -4984,65 +6668,93 @@ extern "C" { ); } extern "C" { - #[doc = "Deinitializes and frees the LCD framebuffers."] - #[doc = "This function internally calls \\ref gspExit."] +#[doc = "Deinitializes and frees the LCD framebuffers."] +#[doc = ""] + pub fn gfxExit(); } extern "C" { - #[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] - #[doc = "* enable Pass true to enable, false to disable."] - #[doc = "Stereoscopic 3D is disabled by default."] +#[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Pass true to enable, false to disable."] + pub fn gfxSet3D(enable: bool); } extern "C" { - #[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] - #[doc = "true if 3D enabled, false otherwise."] +#[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] +#[doc = ""] +#[doc = "Returns: True if 3D enabled, false otherwise."] +#[doc = ""] + pub fn gfxIs3D() -> bool; } extern "C" { - #[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] - #[doc = "true if wide mode enabled, false otherwise."] +#[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] +#[doc = ""] +#[doc = "Returns: True if wide mode enabled, false otherwise."] +#[doc = ""] + pub fn gfxIsWide() -> bool; } extern "C" { - #[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] - #[doc = "* enable Pass true to enable, false to disable."] - #[doc = "Wide mode is disabled by default."] - #[doc = "Wide and stereoscopic 3D modes are mutually exclusive."] - #[doc = "In wide mode pixels are not square, since scanlines are half as tall as they normally are."] - #[doc = "@warning Wide mode does not work on Old 2DS consoles (however it does work on New 2DS XL consoles)."] +#[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Pass true to enable, false to disable."] + pub fn gfxSetWide(enable: bool); } extern "C" { - #[doc = "Changes the pixel format of a screen."] - #[doc = "* screen Screen ID (see \\ref gfxScreen_t)"] - #[doc = "* format Pixel format (see \\ref GSPGPU_FramebufferFormat)"] - #[doc = "If the currently allocated framebuffers are too small for the specified format,"] - #[doc = " they are freed and new ones are reallocated."] +#[doc = "Changes the pixel format of a screen."] +#[doc = ""] +#[doc = "they are freed and new ones are reallocated."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] +#[doc = "* `format` - Pixel format (see \\ref GSPGPU_FramebufferFormat)"] + pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormat); } extern "C" { - #[doc = "Retrieves the current pixel format of a screen."] - #[doc = "* screen Screen ID (see \\ref gfxScreen_t)"] - #[doc = "Pixel format (see \\ref GSPGPU_FramebufferFormat)"] +#[doc = "Retrieves the current pixel format of a screen."] +#[doc = ""] +#[doc = "Returns: Pixel format (see \\ref GSPGPU_FramebufferFormat)"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] + pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormat; } extern "C" { - #[doc = "Enables or disables double buffering on a screen."] - #[doc = "* screen Screen ID (see \\ref gfxScreen_t)"] - #[doc = "* enable Pass true to enable, false to disable."] - #[doc = "Double buffering is enabled by default."] +#[doc = "Enables or disables double buffering on a screen."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] +#[doc = "* `enable` - Pass true to enable, false to disable."] + pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, enable: bool); } extern "C" { - #[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] - #[doc = "* screen Screen ID (see \\ref gfxScreen_t)"] - #[doc = "* side Framebuffer side (see \\ref gfx3dSide_t) (pass \\ref GFX_LEFT if not using stereoscopic 3D)"] - #[doc = "* width Pointer that will hold the width of the framebuffer in pixels."] - #[doc = "* height Pointer that will hold the height of the framebuffer in pixels."] - #[doc = "A pointer to the current framebuffer of the chosen screen."] - #[doc = ""] - #[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] +#[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] +#[doc = ""] +#[doc = ""] +#[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] +#[doc = ""] +#[doc = "Returns: A pointer to the current framebuffer of the chosen screen."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] +#[doc = "* `side` - Framebuffer side (see \\ref gfx3dSide_t) (pass \\ref GFX_LEFT if not using stereoscopic 3D)"] +#[doc = "* `width` - Pointer that will hold the width of the framebuffer in pixels."] +#[doc = "* `height` - Pointer that will hold the height of the framebuffer in pixels."] + pub fn gfxGetFramebuffer( screen: gfxScreen_t, side: gfx3dSide_t, @@ -5051,51 +6763,73 @@ extern "C" { ) -> *mut u8_; } extern "C" { - #[doc = "Flushes the data cache for the current framebuffers."] - #[doc = "@warning This is **only used during software rendering**. Since this function has significant overhead,"] - #[doc = " it is preferred to call this only once per frame, after all software rendering is completed."] +#[doc = "Flushes the data cache for the current framebuffers."] +#[doc = ""] +#[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] +#[doc = ""] + pub fn gfxFlushBuffers(); } extern "C" { - #[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] - #[doc = "* scr Screen ID (see \\ref gfxScreen_t)"] - #[doc = "* hasStereo For the top screen in 3D mode: true if the framebuffer contains individual images"] - #[doc = " for both eyes, or false if the left image should be duplicated to the right eye."] - #[doc = "Previously rendered content will be displayed on the screen after the next VBlank."] - #[doc = "This function is still useful even if double buffering is disabled, as it must be used to commit configuration changes."] - #[doc = "@warning Only call this once per screen per frame, otherwise graphical glitches will occur"] - #[doc = " since this API does not implement triple buffering."] +#[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] +#[doc = ""] +#[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] +#[doc = "since this API does not implement triple buffering."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] +#[doc = "* `hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] + pub fn gfxScreenSwapBuffers(scr: gfxScreen_t, hasStereo: bool); } extern "C" { - #[doc = "Same as \\ref gfxScreenSwapBuffers, but with hasStereo set to true."] - #[doc = "* scr Screen ID (see \\ref gfxScreen_t)"] - #[doc = "* immediate This parameter no longer has any effect and is thus ignored."] - #[doc = "@deprecated This function has been superseded by \\ref gfxScreenSwapBuffers, please use that instead."] +#[doc = "**Warning!** This is deprecated! - This function has been superseded by \\ref gfxScreenSwapBuffers, please use that instead."] +#[doc = ""] +#[doc = "Same as \\ref gfxScreenSwapBuffers, but with hasStereo set to true."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] +#[doc = "* `immediate` - This parameter no longer has any effect and is thus ignored."] + pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool); } extern "C" { - #[doc = "Updates the configuration of both screens."] - #[doc = "This function is equivalent to: \\code gfxScreenSwapBuffers(GFX_TOP,true); gfxScreenSwapBuffers(GFX_BOTTOM,true); \\endcode"] +#[doc = "Updates the configuration of both screens."] +#[doc = ""] + pub fn gfxSwapBuffers(); } extern "C" { - #[doc = "Same as \\ref gfxSwapBuffers (formerly different)."] +#[doc = "Same as \\ref gfxSwapBuffers (formerly different)."] +#[doc = ""] + pub fn gfxSwapBuffersGpu(); } #[doc = "A callback for printing a character."] +#[doc = ""] + pub type ConsolePrint = ::core::option::Option< unsafe extern "C" fn(con: *mut ::libc::c_void, c: ::libc::c_int) -> bool, >; #[doc = "A font struct for the console."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ConsoleFont { - #[doc = "A pointer to the font graphics"] +#[doc = "A pointer to the font graphics"] +#[doc = ""] + pub gfx: *mut u8_, - #[doc = "Offset to the first valid character in the font table"] +#[doc = "Offset to the first valid character in the font table"] +#[doc = ""] + pub asciiOffset: u16_, - #[doc = "Number of characters in the font graphics"] +#[doc = "Number of characters in the font graphics"] +#[doc = ""] + pub numChars: u16_, } impl Default for ConsoleFont { @@ -5109,68 +6843,87 @@ impl Default for ConsoleFont { } #[doc = "Console structure used to store the state of a console render context."] #[doc = ""] +#[doc = ""] #[doc = "Default values from consoleGetDefault();"] -#[doc = "@code"] #[doc = "PrintConsole defaultConsole ="] #[doc = "{"] -#[doc = "\t//Font:"] -#[doc = "\t{"] -#[doc = "\t\t(u8*)default_font_bin, //font gfx"] -#[doc = "\t\t0, //first ascii character in the set"] -#[doc = "\t\t128, //number of characters in the font set"] -#[doc = "\t},"] -#[doc = "\t0,0, //cursorX cursorY"] -#[doc = "\t0,0, //prevcursorX prevcursorY"] -#[doc = "\t40, //console width"] -#[doc = "\t30, //console height"] -#[doc = "\t0, //window x"] -#[doc = "\t0, //window y"] -#[doc = "\t32, //window width"] -#[doc = "\t24, //window height"] -#[doc = "\t3, //tab size"] -#[doc = "\t0, //font character offset"] -#[doc = "\t0, //print callback"] -#[doc = "\tfalse //console initialized"] #[doc = "};"] -#[doc = "@endcode"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PrintConsole { - #[doc = "Font of the console"] +#[doc = "Font of the console"] +#[doc = ""] + pub font: ConsoleFont, - #[doc = "Framebuffer address"] +#[doc = "Framebuffer address"] +#[doc = ""] + pub frameBuffer: *mut u16_, - #[doc = "Current X location of the cursor (as a tile offset by default)"] +#[doc = "Current X location of the cursor (as a tile offset by default)"] +#[doc = ""] + pub cursorX: ::libc::c_int, - #[doc = "Current Y location of the cursor (as a tile offset by default)"] +#[doc = "Current Y location of the cursor (as a tile offset by default)"] +#[doc = ""] + pub cursorY: ::libc::c_int, - #[doc = "Internal state"] +#[doc = "Internal state"] +#[doc = ""] + pub prevCursorX: ::libc::c_int, - #[doc = "Internal state"] +#[doc = "Internal state"] +#[doc = ""] + pub prevCursorY: ::libc::c_int, - #[doc = "Width of the console hardware layer in characters"] +#[doc = "Width of the console hardware layer in characters"] +#[doc = ""] + pub consoleWidth: ::libc::c_int, - #[doc = "Height of the console hardware layer in characters"] +#[doc = "Height of the console hardware layer in characters"] +#[doc = ""] + pub consoleHeight: ::libc::c_int, - #[doc = "Window X location in characters (not implemented)"] +#[doc = "Window X location in characters (not implemented)"] +#[doc = ""] + pub windowX: ::libc::c_int, - #[doc = "Window Y location in characters (not implemented)"] +#[doc = "Window Y location in characters (not implemented)"] +#[doc = ""] + pub windowY: ::libc::c_int, - #[doc = "Window width in characters (not implemented)"] +#[doc = "Window width in characters (not implemented)"] +#[doc = ""] + pub windowWidth: ::libc::c_int, - #[doc = "Window height in characters (not implemented)"] +#[doc = "Window height in characters (not implemented)"] +#[doc = ""] + pub windowHeight: ::libc::c_int, - #[doc = "Size of a tab"] +#[doc = "Size of a tab"] +#[doc = ""] + pub tabSize: ::libc::c_int, - #[doc = "Foreground color"] +#[doc = "Foreground color"] +#[doc = ""] + pub fg: u16_, - #[doc = "Background color"] +#[doc = "Background color"] +#[doc = ""] + pub bg: u16_, - #[doc = "Reverse/bright flags"] +#[doc = "Reverse/bright flags"] +#[doc = ""] + pub flags: ::libc::c_int, - #[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] +#[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] +#[doc = ""] + pub PrintChar: ConsolePrint, - #[doc = "True if the console is initialized"] +#[doc = "True if the console is initialized"] +#[doc = ""] + pub consoleInitialised: bool, } impl Default for PrintConsole { @@ -5183,27 +6936,43 @@ impl Default for PrintConsole { } } #[doc = "Swallows prints to stderr"] +#[doc = ""] + pub const debugDevice_NULL: debugDevice = 0; #[doc = "Outputs stderr debug statements using svcOutputDebugString, which can then be captured by interactive debuggers"] +#[doc = ""] + pub const debugDevice_SVC: debugDevice = 1; #[doc = "Directs stderr debug statements to 3DS console window"] +#[doc = ""] + pub const debugDevice_CONSOLE: debugDevice = 2; pub const debugDevice_3DMOO: debugDevice = 1; #[doc = "Console debug devices supported by libnds."] +#[doc = ""] + pub type debugDevice = ::libc::c_uint; extern "C" { - #[doc = "Loads the font into the console."] - #[doc = "* console Pointer to the console to update, if NULL it will update the current console."] - #[doc = "* font The font to load."] +#[doc = "Loads the font into the console."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `console` - Pointer to the console to update, if NULL it will update the current console."] +#[doc = "* `font` - The font to load."] + pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont); } extern "C" { - #[doc = "Sets the print window."] - #[doc = "* console Console to set, if NULL it will set the current console window."] - #[doc = "* x X location of the window."] - #[doc = "* y Y location of the window."] - #[doc = "* width Width of the window."] - #[doc = "* height Height of the window."] +#[doc = "Sets the print window."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `console` - Console to set, if NULL it will set the current console window."] +#[doc = "* `x` - X location of the window."] +#[doc = "* `y` - Y location of the window."] +#[doc = "* `width` - Width of the window."] +#[doc = "* `height` - Height of the window."] + pub fn consoleSetWindow( console: *mut PrintConsole, x: ::libc::c_int, @@ -5213,45 +6982,78 @@ extern "C" { ); } extern "C" { - #[doc = "Gets a pointer to the console with the default values."] - #[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] - #[doc = "A pointer to the console with the default values."] +#[doc = "Gets a pointer to the console with the default values."] +#[doc = ""] +#[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] +#[doc = ""] +#[doc = "Returns: A pointer to the console with the default values."] +#[doc = ""] + pub fn consoleGetDefault() -> *mut PrintConsole; } extern "C" { - #[doc = "Make the specified console the render target."] - #[doc = "* console A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console))."] - #[doc = "A pointer to the previous console."] +#[doc = "Make the specified console the render target."] +#[doc = ""] +#[doc = "Returns: A pointer to the previous console."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console))."] + pub fn consoleSelect(console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { - #[doc = "Initialise the console."] - #[doc = "* screen The screen to use for the console."] - #[doc = "* console A pointer to the console data to initialize (if it's NULL, the default console will be used)."] - #[doc = "A pointer to the current console."] +#[doc = "Initialise the console."] +#[doc = ""] +#[doc = "Returns: A pointer to the current console."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - The screen to use for the console."] +#[doc = "* `console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] + pub fn consoleInit(screen: gfxScreen_t, console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { - #[doc = "Initializes debug console output on stderr to the specified device."] - #[doc = "* device The debug device (or devices) to output debug print statements to."] +#[doc = "Initializes debug console output on stderr to the specified device."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `device` - The debug device (or devices) to output debug print statements to."] + pub fn consoleDebugInit(device: debugDevice); } extern "C" { - #[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] +#[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] +#[doc = ""] + pub fn consoleClear(); } #[doc = "Use APT workaround."] +#[doc = ""] + pub const RUNFLAG_APTWORKAROUND: _bindgen_ty_9 = 1; #[doc = "Reinitialize APT."] +#[doc = ""] + pub const RUNFLAG_APTREINIT: _bindgen_ty_9 = 2; #[doc = "Chainload APT on return."] +#[doc = ""] + pub const RUNFLAG_APTCHAINLOAD: _bindgen_ty_9 = 4; #[doc = "System run-flags."] +#[doc = ""] + pub type _bindgen_ty_9 = ::libc::c_uint; extern "C" { - #[doc = "Retrieves a handle from the environment handle list."] - #[doc = "* name Name of the handle."] - #[doc = "The retrieved handle."] +#[doc = "Retrieves a handle from the environment handle list."] +#[doc = ""] +#[doc = "Returns: The retrieved handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Name of the handle."] + pub fn envGetHandle(name: *const ::libc::c_char) -> Handle; } pub type _off_t = __int64_t; @@ -5450,43 +7252,79 @@ pub struct pthread_once_t { pub init_executed: ::libc::c_int, } #[doc = "Dummy compression"] +#[doc = ""] + pub const DECOMPRESS_DUMMY: decompressType = 0; #[doc = "LZSS/LZ10 compression"] +#[doc = ""] + pub const DECOMPRESS_LZSS: decompressType = 16; #[doc = "LZSS/LZ10 compression"] +#[doc = ""] + pub const DECOMPRESS_LZ10: decompressType = 16; #[doc = "LZ11 compression"] +#[doc = ""] + pub const DECOMPRESS_LZ11: decompressType = 17; #[doc = "Huffman compression with 1-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF1: decompressType = 33; #[doc = "Huffman compression with 2-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF2: decompressType = 34; #[doc = "Huffman compression with 3-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF3: decompressType = 35; #[doc = "Huffman compression with 4-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF4: decompressType = 36; #[doc = "Huffman compression with 5-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF5: decompressType = 37; #[doc = "Huffman compression with 6-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF6: decompressType = 38; #[doc = "Huffman compression with 7-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF7: decompressType = 39; #[doc = "Huffman compression with 8-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF8: decompressType = 40; #[doc = "Huffman compression with 8-bit data"] +#[doc = ""] + pub const DECOMPRESS_HUFF: decompressType = 40; #[doc = "Run-length encoding compression"] +#[doc = ""] + pub const DECOMPRESS_RLE: decompressType = 48; #[doc = "Compression types"] +#[doc = ""] + pub type decompressType = ::libc::c_uint; #[doc = "I/O vector"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct decompressIOVec { - #[doc = "I/O buffer"] +#[doc = "I/O buffer"] +#[doc = ""] + pub data: *mut ::libc::c_void, - #[doc = "Buffer size"] - pub size: size_t, +#[doc = "Buffer size"] +#[doc = ""] + + pub size: size_t, } impl Default for decompressIOVec { fn default() -> Self { @@ -5498,6 +7336,8 @@ impl Default for decompressIOVec { } } #[doc = "Data callback"] +#[doc = ""] + pub type decompressCallback = ::core::option::Option< unsafe extern "C" fn( userdata: *mut ::libc::c_void, @@ -5506,11 +7346,16 @@ pub type decompressCallback = ::core::option::Option< ) -> ssize_t, >; extern "C" { - #[doc = "Decompression callback for file descriptors"] - #[doc = "* userdata Address of file descriptor"] - #[doc = "* buffer Buffer to write into"] - #[doc = "* size Size to read from file descriptor"] - #[doc = "s Number of bytes read"] +#[doc = "Decompression callback for file descriptors"] +#[doc = ""] +#[doc = "Returns: Number of bytes read"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `userdata` - Address of file descriptor [Direction: In]"] +#[doc = "* `buffer` - Buffer to write into [Direction: In]"] +#[doc = "* `size` - Size to read from file descriptor [Direction: In]"] + pub fn decompressCallback_FD( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -5518,11 +7363,16 @@ extern "C" { ) -> ssize_t; } extern "C" { - #[doc = "Decompression callback for stdio FILE*"] - #[doc = "* userdata FILE*"] - #[doc = "* buffer Buffer to write into"] - #[doc = "* size Size to read from file descriptor"] - #[doc = "s Number of bytes read"] +#[doc = "Decompression callback for stdio FILE*"] +#[doc = ""] +#[doc = "Returns: Number of bytes read"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `userdata` - FILE* [Direction: In]"] +#[doc = "* `buffer` - Buffer to write into [Direction: In]"] +#[doc = "* `size` - Size to read from file descriptor [Direction: In]"] + pub fn decompressCallback_Stdio( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -5530,14 +7380,18 @@ extern "C" { ) -> ssize_t; } extern "C" { - #[doc = "Decode decompression header"] - #[doc = "* type Decompression type"] - #[doc = "* size Decompressed size"] - #[doc = "* callback Data callback (see decompressV())"] - #[doc = "* userdata User data passed to callback (see decompressV())"] - #[doc = "* insize Size of userdata (see decompressV())"] - #[doc = "s Bytes consumed"] - #[doc = "@retval -1 error"] +#[doc = "Decode decompression header"] +#[doc = ""] +#[doc = "Returns: Bytes consumed"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `type` - Decompression type [Direction: In, Out]"] +#[doc = "* `size` - Decompressed size [Direction: In, Out]"] +#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + pub fn decompressHeader( type_: *mut decompressType, size: *mut size_t, @@ -5547,18 +7401,23 @@ extern "C" { ) -> ssize_t; } extern "C" { - #[doc = "Decompress data"] - #[doc = "* iov Output vector"] - #[doc = "* iovcnt Number of buffers"] - #[doc = "* callback Data callback (see note)"] - #[doc = "* userdata User data passed to callback (see note)"] - #[doc = "* insize Size of userdata (see note)"] - #[doc = "s Whether succeeded"] - #[doc = ""] - #[doc = " If callback is null, userdata is a pointer to memory to read from,"] - #[doc = " and insize is the size of that data. If callback is not null,"] - #[doc = " userdata is passed to callback to fetch more data, and insize is"] - #[doc = " unused."] +#[doc = "Decompress data"] +#[doc = ""] +#[doc = ""] +#[doc = "and insize is the size of that data. If callback is not null,"] +#[doc = "userdata is passed to callback to fetch more data, and insize is"] +#[doc = "unused."] +#[doc = ""] +#[doc = "Returns: Whether succeeded"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `iov` - Output vector [Direction: In]"] +#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] +#[doc = "* `callback` - Data callback (see note) [Direction: In]"] +#[doc = "* `userdata` - User data passed to callback (see note) [Direction: In]"] +#[doc = "* `insize` - Size of userdata (see note) [Direction: In]"] + pub fn decompressV( iov: *const decompressIOVec, iovcnt: size_t, @@ -5568,13 +7427,18 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress LZSS/LZ10"] - #[doc = "* iov Output vector"] - #[doc = "* iovcnt Number of buffers"] - #[doc = "* callback Data callback (see decompressV())"] - #[doc = "* userdata User data passed to callback (see decompressV())"] - #[doc = "* insize Size of userdata (see decompressV())"] - #[doc = "s Whether succeeded"] +#[doc = "Decompress LZSS/LZ10"] +#[doc = ""] +#[doc = "Returns: Whether succeeded"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `iov` - Output vector [Direction: In]"] +#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] +#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + pub fn decompressV_LZSS( iov: *const decompressIOVec, iovcnt: size_t, @@ -5584,13 +7448,18 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress LZ11"] - #[doc = "* iov Output vector"] - #[doc = "* iovcnt Number of buffers"] - #[doc = "* callback Data callback (see decompressV())"] - #[doc = "* userdata User data passed to callback (see decompressV())"] - #[doc = "* insize Size of userdata (see decompressV())"] - #[doc = "s Whether succeeded"] +#[doc = "Decompress LZ11"] +#[doc = ""] +#[doc = "Returns: Whether succeeded"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `iov` - Output vector [Direction: In]"] +#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] +#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + pub fn decompressV_LZ11( iov: *const decompressIOVec, iovcnt: size_t, @@ -5600,14 +7469,19 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress Huffman"] - #[doc = "* bits Data size in bits (usually 4 or 8)"] - #[doc = "* iov Output vector"] - #[doc = "* iovcnt Number of buffers"] - #[doc = "* callback Data callback (see decompressV())"] - #[doc = "* userdata User data passed to callback (see decompressV())"] - #[doc = "* insize Size of userdata (see decompressV())"] - #[doc = "s Whether succeeded"] +#[doc = "Decompress Huffman"] +#[doc = ""] +#[doc = "Returns: Whether succeeded"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bits` - Data size in bits (usually 4 or 8) [Direction: In]"] +#[doc = "* `iov` - Output vector [Direction: In]"] +#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] +#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + pub fn decompressV_Huff( bits: size_t, iov: *const decompressIOVec, @@ -5618,13 +7492,18 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress run-length encoding"] - #[doc = "* iov Output vector"] - #[doc = "* iovcnt Number of buffers"] - #[doc = "* callback Data callback (see decompressV())"] - #[doc = "* userdata User data passed to callback (see decompressV())"] - #[doc = "* insize Size of userdata (see decompressV())"] - #[doc = "s Whether succeeded"] +#[doc = "Decompress run-length encoding"] +#[doc = ""] +#[doc = "Returns: Whether succeeded"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `iov` - Output vector [Direction: In]"] +#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] +#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + pub fn decompressV_RLE( iov: *const decompressIOVec, iovcnt: size_t, @@ -5634,203 +7513,274 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] - #[doc = ""] - #[doc = "* out Output codepoint"] - #[doc = "* in Input sequence"] - #[doc = ""] - #[doc = "s number of input code units consumed"] - #[doc = "s -1 for error"] +#[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output codepoint [Direction: In, Out]"] +#[doc = "* `in` - Input sequence [Direction: In]"] + pub fn decode_utf8(out: *mut u32, in_: *const u8) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] - #[doc = ""] - #[doc = "* out Output codepoint"] - #[doc = "* in Input sequence"] - #[doc = ""] - #[doc = "s number of input code units consumed"] - #[doc = "s -1 for error"] +#[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output codepoint [Direction: In, Out]"] +#[doc = "* `in` - Input sequence [Direction: In]"] + pub fn decode_utf16(out: *mut u32, in_: *const u16) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input codepoint"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out must be able to store 4 code units"] +#[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input codepoint [Direction: In]"] + pub fn encode_utf8(out: *mut u8, in_: u32) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input codepoint"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out must be able to store 2 code units"] +#[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input codepoint [Direction: In]"] + pub fn encode_utf16(out: *mut u16, in_: u32) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] - #[doc = ""] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input sequence (null-terminated)"] - #[doc = "* len Output length"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out is not null-terminated"] +#[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] +#[doc = ""] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "* `len` - Output length [Direction: In]"] + pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] - #[doc = ""] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input sequence (null-terminated)"] - #[doc = "* len Output length"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out is not null-terminated"] +#[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] +#[doc = ""] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "* `len` - Output length [Direction: In]"] + pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] - #[doc = ""] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input sequence (null-terminated)"] - #[doc = "* len Output length"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out is not null-terminated"] +#[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] +#[doc = ""] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "* `len` - Output length [Direction: In]"] + pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] - #[doc = ""] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input sequence (null-terminated)"] - #[doc = "* len Output length"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out is not null-terminated"] +#[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] +#[doc = ""] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "* `len` - Output length [Direction: In]"] + pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] - #[doc = ""] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input sequence (null-terminated)"] - #[doc = "* len Output length"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out is not null-terminated"] +#[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] +#[doc = ""] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "* `len` - Output length [Direction: In]"] + pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] - #[doc = ""] - #[doc = "* out Output sequence"] - #[doc = "* in Input sequence (null-terminated)"] - #[doc = "* len Output length"] - #[doc = ""] - #[doc = "s number of output code units produced"] - #[doc = "s -1 for error"] - #[doc = ""] - #[doc = " \\a out is not null-terminated"] +#[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: -1 for error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output sequence [Direction: In, Out]"] +#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "* `len` - Output length [Direction: In]"] + pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Allocates a 0x80-byte aligned buffer."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "The allocated buffer."] +#[doc = "Allocates a 0x80-byte aligned buffer."] +#[doc = ""] +#[doc = "Returns: The allocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the buffer to allocate."] + pub fn linearAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a buffer aligned to the given size."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "* alignment Alignment to use."] - #[doc = "The allocated buffer."] +#[doc = "Allocates a buffer aligned to the given size."] +#[doc = ""] +#[doc = "Returns: The allocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the buffer to allocate."] +#[doc = "* `alignment` - Alignment to use."] + pub fn linearMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Reallocates a buffer."] - #[doc = "Note: Not implemented yet."] - #[doc = "* mem Buffer to reallocate."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "The reallocated buffer."] +#[doc = "Reallocates a buffer."] +#[doc = ""] +#[doc = "Note: Not implemented yet."] +#[doc = ""] +#[doc = "Returns: The reallocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mem` - Buffer to reallocate."] +#[doc = "* `size` - Size of the buffer to allocate."] + pub fn linearRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Retrieves the allocated size of a buffer."] - #[doc = "The size of the buffer."] +#[doc = "Retrieves the allocated size of a buffer."] +#[doc = ""] +#[doc = "Returns: The size of the buffer."] +#[doc = ""] + pub fn linearGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { - #[doc = "Frees a buffer."] - #[doc = "* mem Buffer to free."] +#[doc = "Frees a buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mem` - Buffer to free."] + pub fn linearFree(mem: *mut ::libc::c_void); } extern "C" { - #[doc = "Gets the current linear free space."] - #[doc = "The current linear free space."] +#[doc = "Gets the current linear free space."] +#[doc = ""] +#[doc = "Returns: The current linear free space."] +#[doc = ""] + pub fn linearSpaceFree() -> u32_; } extern "C" { - #[doc = "Initializes the mappable allocator."] - #[doc = "* addrMin Minimum address."] - #[doc = "* addrMax Maxium address."] +#[doc = "Initializes the mappable allocator."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `addrMin` - Minimum address."] +#[doc = "* `addrMax` - Maxium address."] + pub fn mappableInit(addrMin: u32_, addrMax: u32_); } extern "C" { - #[doc = "Finds a mappable memory area."] - #[doc = "* size Size of the area to find."] - #[doc = "The mappable area."] +#[doc = "Finds a mappable memory area."] +#[doc = ""] +#[doc = "Returns: The mappable area."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the area to find."] + pub fn mappableAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Frees a mappable area (stubbed)."] - #[doc = "* mem Mappable area to free."] +#[doc = "Frees a mappable area (stubbed)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mem` - Mappable area to free."] + pub fn mappableFree(mem: *mut ::libc::c_void); } pub const VRAM_ALLOC_A: vramAllocPos = 1; @@ -5838,31 +7788,51 @@ pub const VRAM_ALLOC_B: vramAllocPos = 2; pub const VRAM_ALLOC_ANY: vramAllocPos = 3; pub type vramAllocPos = ::libc::c_uint; extern "C" { - #[doc = "Allocates a 0x80-byte aligned buffer."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "The allocated buffer."] +#[doc = "Allocates a 0x80-byte aligned buffer."] +#[doc = ""] +#[doc = "Returns: The allocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the buffer to allocate."] + pub fn vramAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "* pos VRAM bank to use (see \\ref vramAllocPos)."] - #[doc = "The allocated buffer."] +#[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] +#[doc = ""] +#[doc = "Returns: The allocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the buffer to allocate."] +#[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] + pub fn vramAllocAt(size: size_t, pos: vramAllocPos) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a buffer aligned to the given size."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "* alignment Alignment to use."] - #[doc = "The allocated buffer."] +#[doc = "Allocates a buffer aligned to the given size."] +#[doc = ""] +#[doc = "Returns: The allocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the buffer to allocate."] +#[doc = "* `alignment` - Alignment to use."] + pub fn vramMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "* alignment Alignment to use."] - #[doc = "* pos VRAM bank to use (see \\ref vramAllocPos)."] - #[doc = "The allocated buffer."] +#[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] +#[doc = ""] +#[doc = "Returns: The allocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the buffer to allocate."] +#[doc = "* `alignment` - Alignment to use."] +#[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] + pub fn vramMemAlignAt( size: size_t, alignment: size_t, @@ -5870,47 +7840,83 @@ extern "C" { ) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Reallocates a buffer."] - #[doc = "Note: Not implemented yet."] - #[doc = "* mem Buffer to reallocate."] - #[doc = "* size Size of the buffer to allocate."] - #[doc = "The reallocated buffer."] +#[doc = "Reallocates a buffer."] +#[doc = ""] +#[doc = "Note: Not implemented yet."] +#[doc = ""] +#[doc = "Returns: The reallocated buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mem` - Buffer to reallocate."] +#[doc = "* `size` - Size of the buffer to allocate."] + pub fn vramRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Retrieves the allocated size of a buffer."] - #[doc = "The size of the buffer."] +#[doc = "Retrieves the allocated size of a buffer."] +#[doc = ""] +#[doc = "Returns: The size of the buffer."] +#[doc = ""] + pub fn vramGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { - #[doc = "Frees a buffer."] - #[doc = "* mem Buffer to free."] +#[doc = "Frees a buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mem` - Buffer to free."] + pub fn vramFree(mem: *mut ::libc::c_void); } extern "C" { - #[doc = "Gets the current VRAM free space."] - #[doc = "The current VRAM free space."] +#[doc = "Gets the current VRAM free space."] +#[doc = ""] +#[doc = "Returns: The current VRAM free space."] +#[doc = ""] + pub fn vramSpaceFree() -> u32_; } #[doc = "Open authentication."] +#[doc = ""] + pub const AC_OPEN: acSecurityMode = 0; #[doc = "WEP 40-bit authentication."] +#[doc = ""] + pub const AC_WEP_40BIT: acSecurityMode = 1; #[doc = "WEP 104-bit authentication."] +#[doc = ""] + pub const AC_WEP_104BIT: acSecurityMode = 2; #[doc = "WEP 128-bit authentication."] +#[doc = ""] + pub const AC_WEP_128BIT: acSecurityMode = 3; #[doc = "WPA TKIP authentication."] +#[doc = ""] + pub const AC_WPA_TKIP: acSecurityMode = 4; #[doc = "WPA2 TKIP authentication."] +#[doc = ""] + pub const AC_WPA2_TKIP: acSecurityMode = 5; #[doc = "WPA AES authentication."] +#[doc = ""] + pub const AC_WPA_AES: acSecurityMode = 6; #[doc = "WPA2 AES authentication."] +#[doc = ""] + pub const AC_WPA2_AES: acSecurityMode = 7; #[doc = "Wifi security modes."] +#[doc = ""] + pub type acSecurityMode = ::libc::c_uint; #[doc = "Struct to contain the data for connecting to a Wifi network from a stored slot."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct acuConfig { @@ -5927,297 +7933,541 @@ impl Default for acuConfig { } extern "C" { #[must_use] - #[doc = "Initializes AC."] +#[doc = "Initializes AC."] +#[doc = ""] + pub fn acInit() -> Result; } extern "C" { - #[doc = "Exits AC."] +#[doc = "Exits AC."] +#[doc = ""] + pub fn acExit(); } extern "C" { #[must_use] - #[doc = "Waits for the system to connect to the internet."] +#[doc = "Waits for the system to connect to the internet."] +#[doc = ""] + pub fn acWaitInternetConnection() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi status."] - #[doc = "* out Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] +#[doc = "Gets the connected Wifi status."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] + pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi status."] - #[doc = "* out Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] +#[doc = "Gets the connected Wifi status."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] + pub fn ACU_GetStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi security mode."] - #[doc = "* mode Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] +#[doc = "Gets the connected Wifi security mode."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] + pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi SSID."] - #[doc = "* SSID Pointer to output the connected Wifi SSID to."] +#[doc = "Gets the connected Wifi SSID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `SSID` - Pointer to output the connected Wifi SSID to."] + pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi SSID length."] - #[doc = "* out Pointer to output the connected Wifi SSID length to."] +#[doc = "Gets the connected Wifi SSID length."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the connected Wifi SSID length to."] + pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Determines whether proxy is enabled for the connected network."] - #[doc = "* enable Pointer to output the proxy status to."] +#[doc = "Determines whether proxy is enabled for the connected network."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Pointer to output the proxy status to."] + pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected network's proxy port."] - #[doc = "* out Pointer to output the proxy port to."] +#[doc = "Gets the connected network's proxy port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the proxy port to."] + pub fn ACU_GetProxyPort(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected network's proxy username."] - #[doc = "* username Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] +#[doc = "Gets the connected network's proxy username."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] + pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected network's proxy password."] - #[doc = "* password Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] +#[doc = "Gets the connected network's proxy password."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] + pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the last error to occur during a connection."] - #[doc = "* errorCode Pointer to output the error code to."] +#[doc = "Gets the last error to occur during a connection."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `errorCode` - Pointer to output the error code to."] + pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the last detailed error to occur during a connection."] - #[doc = "* errorCode Pointer to output the error code to."] +#[doc = "Gets the last detailed error to occur during a connection."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `errorCode` - Pointer to output the error code to."] + pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares a buffer to hold the configuration data to start a connection."] - #[doc = "* config Pointer to an acuConfig struct to contain the data."] +#[doc = "Prepares a buffer to hold the configuration data to start a connection."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to an acuConfig struct to contain the data."] + pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Sets something that makes the connection reliable."] - #[doc = "* config Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - #[doc = "* area Always 2 ?"] +#[doc = "Sets something that makes the connection reliable."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = "* `area` - Always 2 ?"] + pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the slot to use when connecting."] - #[doc = "* config Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - #[doc = "* type Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] +#[doc = "Sets the slot to use when connecting."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = "* `type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] + pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets something that makes the connection reliable."] - #[doc = "* config Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = "Sets something that makes the connection reliable."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Starts the connection procedure."] - #[doc = "* config Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - #[doc = "* connectionHandle Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] +#[doc = "Starts the connection procedure."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = "* `connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] + pub fn ACU_ConnectAsync(config: *const acuConfig, connectionHandle: Handle) -> Result; } #[doc = "Open for reading."] +#[doc = ""] + pub const FS_OPEN_READ: _bindgen_ty_10 = 1; #[doc = "Open for writing."] +#[doc = ""] + pub const FS_OPEN_WRITE: _bindgen_ty_10 = 2; #[doc = "Create file."] +#[doc = ""] + pub const FS_OPEN_CREATE: _bindgen_ty_10 = 4; #[doc = "Open flags."] +#[doc = ""] + pub type _bindgen_ty_10 = ::libc::c_uint; #[doc = "Flush."] +#[doc = ""] + pub const FS_WRITE_FLUSH: _bindgen_ty_11 = 1; #[doc = "Update file timestamp."] +#[doc = ""] + pub const FS_WRITE_UPDATE_TIME: _bindgen_ty_11 = 256; #[doc = "Write flags."] +#[doc = ""] + pub type _bindgen_ty_11 = ::libc::c_uint; #[doc = "Directory."] +#[doc = ""] + pub const FS_ATTRIBUTE_DIRECTORY: _bindgen_ty_12 = 1; #[doc = "Hidden."] +#[doc = ""] + pub const FS_ATTRIBUTE_HIDDEN: _bindgen_ty_12 = 256; #[doc = "Archive."] +#[doc = ""] + pub const FS_ATTRIBUTE_ARCHIVE: _bindgen_ty_12 = 65536; #[doc = "Read-only."] +#[doc = ""] + pub const FS_ATTRIBUTE_READ_ONLY: _bindgen_ty_12 = 16777216; #[doc = "Attribute flags."] +#[doc = ""] + pub type _bindgen_ty_12 = ::libc::c_uint; #[doc = "NAND."] +#[doc = ""] + pub const MEDIATYPE_NAND: FS_MediaType = 0; #[doc = "SD card."] +#[doc = ""] + pub const MEDIATYPE_SD: FS_MediaType = 1; #[doc = "Game card."] +#[doc = ""] + pub const MEDIATYPE_GAME_CARD: FS_MediaType = 2; #[doc = "Media types."] +#[doc = ""] + pub type FS_MediaType = ::libc::c_uint; #[doc = "CTR NAND."] +#[doc = ""] + pub const SYSTEM_MEDIATYPE_CTR_NAND: FS_SystemMediaType = 0; #[doc = "TWL NAND."] +#[doc = ""] + pub const SYSTEM_MEDIATYPE_TWL_NAND: FS_SystemMediaType = 1; #[doc = "SD card."] +#[doc = ""] + pub const SYSTEM_MEDIATYPE_SD: FS_SystemMediaType = 2; #[doc = "TWL Photo."] +#[doc = ""] + pub const SYSTEM_MEDIATYPE_TWL_PHOTO: FS_SystemMediaType = 3; #[doc = "System media types."] +#[doc = ""] + pub type FS_SystemMediaType = ::libc::c_uint; #[doc = "RomFS archive."] +#[doc = ""] + pub const ARCHIVE_ROMFS: FS_ArchiveID = 3; #[doc = "Save data archive."] +#[doc = ""] + pub const ARCHIVE_SAVEDATA: FS_ArchiveID = 4; #[doc = "Ext data archive."] +#[doc = ""] + pub const ARCHIVE_EXTDATA: FS_ArchiveID = 6; #[doc = "Shared ext data archive."] +#[doc = ""] + pub const ARCHIVE_SHARED_EXTDATA: FS_ArchiveID = 7; #[doc = "System save data archive."] +#[doc = ""] + pub const ARCHIVE_SYSTEM_SAVEDATA: FS_ArchiveID = 8; #[doc = "SDMC archive."] +#[doc = ""] + pub const ARCHIVE_SDMC: FS_ArchiveID = 9; #[doc = "Write-only SDMC archive."] +#[doc = ""] + pub const ARCHIVE_SDMC_WRITE_ONLY: FS_ArchiveID = 10; #[doc = "BOSS ext data archive."] +#[doc = ""] + pub const ARCHIVE_BOSS_EXTDATA: FS_ArchiveID = 305419896; #[doc = "Card SPI FS archive."] +#[doc = ""] + pub const ARCHIVE_CARD_SPIFS: FS_ArchiveID = 305419897; #[doc = "Ext data and BOSS ext data archive."] +#[doc = ""] + pub const ARCHIVE_EXTDATA_AND_BOSS_EXTDATA: FS_ArchiveID = 305419899; #[doc = "System save data archive."] +#[doc = ""] + pub const ARCHIVE_SYSTEM_SAVEDATA2: FS_ArchiveID = 305419900; #[doc = "Read-write NAND archive."] +#[doc = ""] + pub const ARCHIVE_NAND_RW: FS_ArchiveID = 305419901; #[doc = "Read-only NAND archive."] +#[doc = ""] + pub const ARCHIVE_NAND_RO: FS_ArchiveID = 305419902; #[doc = "Read-only write access NAND archive."] +#[doc = ""] + pub const ARCHIVE_NAND_RO_WRITE_ACCESS: FS_ArchiveID = 305419903; #[doc = "User save data and ExeFS/RomFS archive."] +#[doc = ""] + pub const ARCHIVE_SAVEDATA_AND_CONTENT: FS_ArchiveID = 591751050; #[doc = "User save data and ExeFS/RomFS archive (only ExeFS for fs:LDR)."] +#[doc = ""] + pub const ARCHIVE_SAVEDATA_AND_CONTENT2: FS_ArchiveID = 591751054; #[doc = "NAND CTR FS archive."] +#[doc = ""] + pub const ARCHIVE_NAND_CTR_FS: FS_ArchiveID = 1450741931; #[doc = "TWL PHOTO archive."] +#[doc = ""] + pub const ARCHIVE_TWL_PHOTO: FS_ArchiveID = 1450741932; #[doc = "TWL SOUND archive."] +#[doc = ""] + pub const ARCHIVE_TWL_SOUND: FS_ArchiveID = 1450741933; #[doc = "NAND TWL FS archive."] +#[doc = ""] + pub const ARCHIVE_NAND_TWL_FS: FS_ArchiveID = 1450741934; #[doc = "NAND W FS archive."] +#[doc = ""] + pub const ARCHIVE_NAND_W_FS: FS_ArchiveID = 1450741935; #[doc = "Game card save data archive."] +#[doc = ""] + pub const ARCHIVE_GAMECARD_SAVEDATA: FS_ArchiveID = 1450741937; #[doc = "User save data archive."] +#[doc = ""] + pub const ARCHIVE_USER_SAVEDATA: FS_ArchiveID = 1450741938; #[doc = "Demo save data archive."] +#[doc = ""] + pub const ARCHIVE_DEMO_SAVEDATA: FS_ArchiveID = 1450741940; #[doc = "Archive IDs."] +#[doc = ""] + pub type FS_ArchiveID = ::libc::c_uint; #[doc = "Invalid path."] +#[doc = ""] + pub const PATH_INVALID: FS_PathType = 0; #[doc = "Empty path."] +#[doc = ""] + pub const PATH_EMPTY: FS_PathType = 1; #[doc = "Binary path. Meaning is per-archive."] +#[doc = ""] + pub const PATH_BINARY: FS_PathType = 2; #[doc = "ASCII text path."] +#[doc = ""] + pub const PATH_ASCII: FS_PathType = 3; #[doc = "UTF-16 text path."] +#[doc = ""] + pub const PATH_UTF16: FS_PathType = 4; #[doc = "Path types."] +#[doc = ""] + pub type FS_PathType = ::libc::c_uint; #[doc = "SD application."] +#[doc = ""] + pub const SECUREVALUE_SLOT_SD: FS_SecureValueSlot = 4096; #[doc = "Secure value slot."] +#[doc = ""] + pub type FS_SecureValueSlot = ::libc::c_uint; #[doc = "512KHz."] +#[doc = ""] + pub const BAUDRATE_512KHZ: FS_CardSpiBaudRate = 0; #[doc = "1MHz."] +#[doc = ""] + pub const BAUDRATE_1MHZ: FS_CardSpiBaudRate = 1; #[doc = "2MHz."] +#[doc = ""] + pub const BAUDRATE_2MHZ: FS_CardSpiBaudRate = 2; #[doc = "4MHz."] +#[doc = ""] + pub const BAUDRATE_4MHZ: FS_CardSpiBaudRate = 3; #[doc = "8MHz."] +#[doc = ""] + pub const BAUDRATE_8MHZ: FS_CardSpiBaudRate = 4; #[doc = "16MHz."] +#[doc = ""] + pub const BAUDRATE_16MHZ: FS_CardSpiBaudRate = 5; #[doc = "Card SPI baud rate."] +#[doc = ""] + pub type FS_CardSpiBaudRate = ::libc::c_uint; #[doc = "1-bit."] +#[doc = ""] + pub const BUSMODE_1BIT: FS_CardSpiBusMode = 0; #[doc = "4-bit."] +#[doc = ""] + pub const BUSMODE_4BIT: FS_CardSpiBusMode = 1; #[doc = "Card SPI bus mode."] +#[doc = ""] + pub type FS_CardSpiBusMode = ::libc::c_uint; #[doc = "Update."] +#[doc = ""] + pub const SPECIALCONTENT_UPDATE: FS_SpecialContentType = 1; #[doc = "Manual."] +#[doc = ""] + pub const SPECIALCONTENT_MANUAL: FS_SpecialContentType = 2; #[doc = "DLP child."] +#[doc = ""] + pub const SPECIALCONTENT_DLP_CHILD: FS_SpecialContentType = 3; #[doc = "Card SPI bus mode."] +#[doc = ""] + pub type FS_SpecialContentType = ::libc::c_uint; #[doc = "CTR card."] +#[doc = ""] + pub const CARD_CTR: FS_CardType = 0; #[doc = "TWL card."] +#[doc = ""] + pub const CARD_TWL: FS_CardType = 1; pub type FS_CardType = ::libc::c_uint; pub const FS_ACTION_UNKNOWN: FS_Action = 0; #[doc = "FS control actions."] +#[doc = ""] + pub type FS_Action = ::libc::c_uint; #[doc = "Commits save data changes. No inputs/outputs."] +#[doc = ""] + pub const ARCHIVE_ACTION_COMMIT_SAVE_DATA: FS_ArchiveAction = 0; #[doc = "Retrieves a file's last-modified timestamp. In: \"u16*, UTF-16 Path\", Out: \"u64, Time Stamp\"."] +#[doc = ""] + pub const ARCHIVE_ACTION_GET_TIMESTAMP: FS_ArchiveAction = 1; pub const ARCHIVE_ACTION_UNKNOWN: FS_ArchiveAction = 30877; #[doc = "Archive control actions."] +#[doc = ""] + pub type FS_ArchiveAction = ::libc::c_uint; #[doc = "Deletes a save's secure value. In: \"u64, ((SecureValueSlot <32) | (TitleUniqueId <8) | TitleVariation)\", Out: \"u8, Value Existed\""] +#[doc = ""] + pub const SECURESAVE_ACTION_DELETE: FS_SecureSaveAction = 0; #[doc = "Formats a save. No inputs/outputs."] +#[doc = ""] + pub const SECURESAVE_ACTION_FORMAT: FS_SecureSaveAction = 1; #[doc = "Secure save control actions."] +#[doc = ""] + pub type FS_SecureSaveAction = ::libc::c_uint; pub const FILE_ACTION_UNKNOWN: FS_FileAction = 0; #[doc = "File control actions."] +#[doc = ""] + pub type FS_FileAction = ::libc::c_uint; pub const DIRECTORY_ACTION_UNKNOWN: FS_DirectoryAction = 0; #[doc = "Directory control actions."] +#[doc = ""] + pub type FS_DirectoryAction = ::libc::c_uint; #[doc = "Directory entry."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_DirectoryEntry { - #[doc = "UTF-16 directory name."] +#[doc = "UTF-16 directory name."] +#[doc = ""] + pub name: [u16_; 262usize], - #[doc = "File name."] +#[doc = "File name."] +#[doc = ""] + pub shortName: [::libc::c_char; 10usize], - #[doc = "File extension."] +#[doc = "File extension."] +#[doc = ""] + pub shortExt: [::libc::c_char; 4usize], - #[doc = "Valid flag. (Always 1)"] +#[doc = "Valid flag. (Always 1)"] +#[doc = ""] + pub valid: u8_, - #[doc = "Reserved."] +#[doc = "Reserved."] +#[doc = ""] + pub reserved: u8_, - #[doc = "Attributes."] +#[doc = "Attributes."] +#[doc = ""] + pub attributes: u32_, - #[doc = "File size."] +#[doc = "File size."] +#[doc = ""] + pub fileSize: u64_, } impl Default for FS_DirectoryEntry { @@ -6230,27 +8480,43 @@ impl Default for FS_DirectoryEntry { } } #[doc = "Archive resource information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ArchiveResource { - #[doc = "Size of each sector, in bytes."] +#[doc = "Size of each sector, in bytes."] +#[doc = ""] + pub sectorSize: u32_, - #[doc = "Size of each cluster, in bytes."] +#[doc = "Size of each cluster, in bytes."] +#[doc = ""] + pub clusterSize: u32_, - #[doc = "Total number of clusters."] +#[doc = "Total number of clusters."] +#[doc = ""] + pub totalClusters: u32_, - #[doc = "Number of free clusters."] +#[doc = "Number of free clusters."] +#[doc = ""] + pub freeClusters: u32_, } #[doc = "Program information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_ProgramInfo { - #[doc = "Program ID."] +#[doc = "Program ID."] +#[doc = ""] + pub programId: u64_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Padding."] +#[doc = "Padding."] +#[doc = ""] + pub padding: [u8_; 7usize], } impl Default for FS_ProgramInfo { @@ -6285,23 +8551,37 @@ impl FS_ProgramInfo { } } #[doc = "Product information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ProductInfo { - #[doc = "Product code."] +#[doc = "Product code."] +#[doc = ""] + pub productCode: [::libc::c_char; 16usize], - #[doc = "Company code."] +#[doc = "Company code."] +#[doc = ""] + pub companyCode: [::libc::c_char; 2usize], - #[doc = "Remaster version."] +#[doc = "Remaster version."] +#[doc = ""] + pub remasterVersion: u16_, } #[doc = "Integrity verification seed."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_IntegrityVerificationSeed { - #[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] +#[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] +#[doc = ""] + pub aesCbcMac: [u8_; 16usize], - #[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] +#[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] +#[doc = ""] + pub movableSed: [u8_; 288usize], } impl Default for FS_IntegrityVerificationSeed { @@ -6314,18 +8594,28 @@ impl Default for FS_IntegrityVerificationSeed { } } #[doc = "Ext save data information."] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct FS_ExtSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unknown: u8_, - #[doc = "Reserved."] +#[doc = "Reserved."] +#[doc = ""] + pub reserved1: u16_, - #[doc = "Save ID."] +#[doc = "Save ID."] +#[doc = ""] + pub saveId: u64_, - #[doc = "Reserved."] +#[doc = "Reserved."] +#[doc = ""] + pub reserved2: u32_, } impl Default for FS_ExtSaveDataInfo { @@ -6360,16 +8650,24 @@ impl FS_ExtSaveDataInfo { } } #[doc = "System save data information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_SystemSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unknown: u8_, - #[doc = "Reserved."] +#[doc = "Reserved."] +#[doc = ""] + pub reserved: u16_, - #[doc = "Save ID."] +#[doc = "Save ID."] +#[doc = ""] + pub saveId: u32_, } impl Default for FS_SystemSaveDataInfo { @@ -6404,23 +8702,37 @@ impl FS_SystemSaveDataInfo { } } #[doc = "Device move context."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_DeviceMoveContext { - #[doc = "IVs."] +#[doc = "IVs."] +#[doc = ""] + pub ivs: [u8_; 16usize], - #[doc = "Encrypt parameter."] +#[doc = "Encrypt parameter."] +#[doc = ""] + pub encryptParameter: [u8_; 16usize], } #[doc = "Filesystem path data, detailing the specific target of an operation."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_Path { - #[doc = "FS path type."] +#[doc = "FS path type."] +#[doc = ""] + pub type_: FS_PathType, - #[doc = "FS path size."] +#[doc = "FS path size."] +#[doc = ""] + pub size: u32_, - #[doc = "Pointer to FS path data."] +#[doc = "Pointer to FS path data."] +#[doc = ""] + pub data: *const ::libc::c_void, } impl Default for FS_Path { @@ -6433,67 +8745,108 @@ impl Default for FS_Path { } } #[doc = "SDMC/NAND speed information"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_SdMmcSpeedInfo { - #[doc = "Whether or not High Speed Mode is enabled."] +#[doc = "Whether or not High Speed Mode is enabled."] +#[doc = ""] + pub highSpeedModeEnabled: bool, - #[doc = "Whether or not a clock divider of 2 is being used."] +#[doc = "Whether or not a clock divider of 2 is being used."] +#[doc = ""] + pub usesHighestClockRate: bool, - #[doc = "The value of the SD_CLK_CTRL register."] +#[doc = "The value of the SD_CLK_CTRL register."] +#[doc = ""] + pub sdClkCtrl: u16_, } #[doc = "Filesystem archive handle, providing access to a filesystem's contents."] +#[doc = ""] + pub type FS_Archive = u64_; extern "C" { #[must_use] - #[doc = "Initializes FS."] +#[doc = "Initializes FS."] +#[doc = ""] + pub fn fsInit() -> Result; } extern "C" { - #[doc = "Exits FS."] +#[doc = "Exits FS."] +#[doc = ""] + pub fn fsExit(); } extern "C" { - #[doc = "Sets the FSUSER session to use in the current thread."] - #[doc = "* session The handle of the FSUSER session to use."] +#[doc = "Sets the FSUSER session to use in the current thread."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `session` - The handle of the FSUSER session to use."] + pub fn fsUseSession(session: Handle); } extern "C" { - #[doc = "Disables the FSUSER session override in the current thread."] +#[doc = "Disables the FSUSER session override in the current thread."] +#[doc = ""] + pub fn fsEndUseSession(); } extern "C" { - #[doc = "Exempts an archive from using alternate FS session handles provided with fsUseSession"] - #[doc = "Instead, the archive will use the default FS session handle, opened with srvGetSessionHandle"] - #[doc = "* archive Archive to exempt."] +#[doc = "Exempts an archive from using alternate FS session handles provided with @ref fsUseSession"] +#[doc = ""] +#[doc = "Instead, the archive will use the default FS session handle, opened with @ref srvGetSessionHandle"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to exempt."] + pub fn fsExemptFromSession(archive: FS_Archive); } extern "C" { - #[doc = "Unexempts an archive from using alternate FS session handles provided with fsUseSession"] - #[doc = "* archive Archive to remove from the exemption list."] +#[doc = "Unexempts an archive from using alternate FS session handles provided with @ref fsUseSession"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to remove from the exemption list."] + pub fn fsUnexemptFromSession(archive: FS_Archive); } extern "C" { - #[doc = "Creates an FS_Path instance."] - #[doc = "* type Type of path."] - #[doc = "* path Path to use."] - #[doc = "The created FS_Path instance."] +#[doc = "Creates an FS_Path instance."] +#[doc = ""] +#[doc = "Returns: The created FS_Path instance."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `type` - Type of path."] +#[doc = "* `path` - Path to use."] + pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void) -> FS_Path; } extern "C" { - #[doc = "Gets the current FS session handle."] - #[doc = "The current FS session handle."] +#[doc = "Gets the current FS session handle."] +#[doc = ""] +#[doc = "Returns: The current FS session handle."] +#[doc = ""] + pub fn fsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Performs a control operation on the filesystem."] - #[doc = "* action Action to perform."] - #[doc = "* input Buffer to read input from."] - #[doc = "* inputSize Size of the input."] - #[doc = "* output Buffer to write output to."] - #[doc = "* outputSize Size of the output."] +#[doc = "Performs a control operation on the filesystem."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `action` - Action to perform."] +#[doc = "* `input` - Buffer to read input from."] +#[doc = "* `inputSize` - Size of the input."] +#[doc = "* `output` - Buffer to write output to."] +#[doc = "* `outputSize` - Size of the output."] + pub fn FSUSER_Control( action: FS_Action, input: *mut ::libc::c_void, @@ -6504,18 +8857,26 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes a FSUSER session."] - #[doc = "* session The handle of the FSUSER session to initialize."] +#[doc = "Initializes a FSUSER session."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `session` - The handle of the FSUSER session to initialize."] + pub fn FSUSER_Initialize(session: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Opens a file."] - #[doc = "* out Pointer to output the file handle to."] - #[doc = "* archive Archive containing the file."] - #[doc = "* path Path of the file."] - #[doc = "* openFlags Flags to open the file with."] - #[doc = "* attributes Attributes of the file."] +#[doc = "Opens a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the file handle to."] +#[doc = "* `archive` - Archive containing the file."] +#[doc = "* `path` - Path of the file."] +#[doc = "* `openFlags` - Flags to open the file with."] +#[doc = "* `attributes` - Attributes of the file."] + pub fn FSUSER_OpenFile( out: *mut Handle, archive: FS_Archive, @@ -6526,13 +8887,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] - #[doc = "* out Pointer to output the file handle to."] - #[doc = "* archiveId ID of the archive containing the file."] - #[doc = "* archivePath Path of the archive containing the file."] - #[doc = "* filePath Path of the file."] - #[doc = "* openFlags Flags to open the file with."] - #[doc = "* attributes Attributes of the file."] +#[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the file handle to."] +#[doc = "* `archiveId` - ID of the archive containing the file."] +#[doc = "* `archivePath` - Path of the archive containing the file."] +#[doc = "* `filePath` - Path of the file."] +#[doc = "* `openFlags` - Flags to open the file with."] +#[doc = "* `attributes` - Attributes of the file."] + pub fn FSUSER_OpenFileDirectly( out: *mut Handle, archiveId: FS_ArchiveID, @@ -6544,18 +8909,26 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a file."] - #[doc = "* archive Archive containing the file."] - #[doc = "* path Path of the file."] +#[doc = "Deletes a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive containing the file."] +#[doc = "* `path` - Path of the file."] + pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Renames a file."] - #[doc = "* srcArchive Archive containing the source file."] - #[doc = "* srcPath Path of the source file."] - #[doc = "* dstArchive Archive containing the destination file."] - #[doc = "* dstPath Path of the destination file."] +#[doc = "Renames a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `srcArchive` - Archive containing the source file."] +#[doc = "* `srcPath` - Path of the source file."] +#[doc = "* `dstArchive` - Archive containing the destination file."] +#[doc = "* `dstPath` - Path of the destination file."] + pub fn FSUSER_RenameFile( srcArchive: FS_Archive, srcPath: FS_Path, @@ -6565,25 +8938,37 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a directory, failing if it is not empty."] - #[doc = "* archive Archive containing the directory."] - #[doc = "* path Path of the directory."] +#[doc = "Deletes a directory, failing if it is not empty."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive containing the directory."] +#[doc = "* `path` - Path of the directory."] + pub fn FSUSER_DeleteDirectory(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a directory, also deleting its contents."] - #[doc = "* archive Archive containing the directory."] - #[doc = "* path Path of the directory."] +#[doc = "Deletes a directory, also deleting its contents."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive containing the directory."] +#[doc = "* `path` - Path of the directory."] + pub fn FSUSER_DeleteDirectoryRecursively(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a file."] - #[doc = "* archive Archive to create the file in."] - #[doc = "* path Path of the file."] - #[doc = "* attributes Attributes of the file."] - #[doc = "* fileSize Size of the file."] +#[doc = "Creates a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to create the file in."] +#[doc = "* `path` - Path of the file."] +#[doc = "* `attributes` - Attributes of the file."] +#[doc = "* `fileSize` - Size of the file."] + pub fn FSUSER_CreateFile( archive: FS_Archive, path: FS_Path, @@ -6593,19 +8978,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a directory"] - #[doc = "* archive Archive to create the directory in."] - #[doc = "* path Path of the directory."] - #[doc = "* attributes Attributes of the directory."] +#[doc = "Creates a directory"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to create the directory in."] +#[doc = "* `path` - Path of the directory."] +#[doc = "* `attributes` - Attributes of the directory."] + pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Renames a directory."] - #[doc = "* srcArchive Archive containing the source directory."] - #[doc = "* srcPath Path of the source directory."] - #[doc = "* dstArchive Archive containing the destination directory."] - #[doc = "* dstPath Path of the destination directory."] +#[doc = "Renames a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `srcArchive` - Archive containing the source directory."] +#[doc = "* `srcPath` - Path of the source directory."] +#[doc = "* `dstArchive` - Archive containing the destination directory."] +#[doc = "* `dstPath` - Path of the destination directory."] + pub fn FSUSER_RenameDirectory( srcArchive: FS_Archive, srcPath: FS_Path, @@ -6615,29 +9008,41 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a directory."] - #[doc = "* out Pointer to output the directory handle to."] - #[doc = "* archive Archive containing the directory."] - #[doc = "* path Path of the directory."] +#[doc = "Opens a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the directory handle to."] +#[doc = "* `archive` - Archive containing the directory."] +#[doc = "* `path` - Path of the directory."] + pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Opens an archive."] - #[doc = "* archive Pointer to output the opened archive to."] - #[doc = "* id ID of the archive."] - #[doc = "* path Path of the archive."] +#[doc = "Opens an archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Pointer to output the opened archive to."] +#[doc = "* `id` - ID of the archive."] +#[doc = "* `path` - Path of the archive."] + pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Performs a control operation on an archive."] - #[doc = "* archive Archive to control."] - #[doc = "* action Action to perform."] - #[doc = "* input Buffer to read input from."] - #[doc = "* inputSize Size of the input."] - #[doc = "* output Buffer to write output to."] - #[doc = "* outputSize Size of the output."] +#[doc = "Performs a control operation on an archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to control."] +#[doc = "* `action` - Action to perform."] +#[doc = "* `input` - Buffer to read input from."] +#[doc = "* `inputSize` - Size of the input."] +#[doc = "* `output` - Buffer to write output to."] +#[doc = "* `outputSize` - Size of the output."] + pub fn FSUSER_ControlArchive( archive: FS_Archive, action: FS_ArchiveAction, @@ -6649,146 +9054,234 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes an archive."] - #[doc = "* archive Archive to close."] +#[doc = "Closes an archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to close."] + pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the number of free bytes within an archive."] - #[doc = "* freeBytes Pointer to output the free bytes to."] - #[doc = "* archive Archive to check."] +#[doc = "Gets the number of free bytes within an archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `freeBytes` - Pointer to output the free bytes to."] +#[doc = "* `archive` - Archive to check."] + pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the inserted card type."] - #[doc = "* type Pointer to output the card type to."] +#[doc = "Gets the inserted card type."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `type` - Pointer to output the card type to."] + pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC archive resource information."] - #[doc = "* archiveResource Pointer to output the archive resource information to."] +#[doc = "Gets the SDMC archive resource information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + pub fn FSUSER_GetSdmcArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND archive resource information."] - #[doc = "* archiveResource Pointer to output the archive resource information to."] +#[doc = "Gets the NAND archive resource information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the last SDMC fatfs error."] - #[doc = "* error Pointer to output the error to."] +#[doc = "Gets the last SDMC fatfs error."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `error` - Pointer to output the error to."] + pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether an SD card is detected."] - #[doc = "* detected Pointer to output the detection status to."] +#[doc = "Gets whether an SD card is detected."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `detected` - Pointer to output the detection status to."] + pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the SD card is writable."] - #[doc = "* writable Pointer to output the writable status to."] +#[doc = "Gets whether the SD card is writable."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `writable` - Pointer to output the writable status to."] + pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC CID."] - #[doc = "* out Pointer to output the CID to."] - #[doc = "* length Length of the CID buffer. (should be 0x10)"] +#[doc = "Gets the SDMC CID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the CID to."] +#[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] + pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND CID."] - #[doc = "* out Pointer to output the CID to."] - #[doc = "* length Length of the CID buffer. (should be 0x10)"] +#[doc = "Gets the NAND CID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the CID to."] +#[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] + pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC speed info."] - #[doc = "* speedInfo Pointer to output the speed info to."] +#[doc = "Gets the SDMC speed info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `speedInfo` - Pointer to output the speed info to."] + pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND speed info."] - #[doc = "* speedInfo Pointer to output the speed info to."] +#[doc = "Gets the NAND speed info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `speedInfo` - Pointer to output the speed info to."] + pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC log."] - #[doc = "* out Pointer to output the log to."] - #[doc = "* length Length of the log buffer."] +#[doc = "Gets the SDMC log."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the log to."] +#[doc = "* `length` - Length of the log buffer."] + pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND log."] - #[doc = "* out Pointer to output the log to."] - #[doc = "* length Length of the log buffer."] +#[doc = "Gets the NAND log."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the log to."] +#[doc = "* `length` - Length of the log buffer."] + pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the SDMC log."] +#[doc = "Clears the SDMC log."] +#[doc = ""] + pub fn FSUSER_ClearSdmcLog() -> Result; } extern "C" { #[must_use] - #[doc = "Clears the NAND log."] +#[doc = "Clears the NAND log."] +#[doc = ""] + pub fn FSUSER_ClearNandLog() -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether a card is inserted."] - #[doc = "* inserted Pointer to output the insertion status to."] +#[doc = "Gets whether a card is inserted."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inserted` - Pointer to output the insertion status to."] + pub fn FSUSER_CardSlotIsInserted(inserted: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers on the card slot."] - #[doc = "* status Pointer to output the power status to."] +#[doc = "Powers on the card slot."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `status` - Pointer to output the power status to."] + pub fn FSUSER_CardSlotPowerOn(status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers off the card slot."] - #[doc = "* status Pointer to output the power status to."] +#[doc = "Powers off the card slot."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `status` - Pointer to output the power status to."] + pub fn FSUSER_CardSlotPowerOff(status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the card's power status."] - #[doc = "* status Pointer to output the power status to."] +#[doc = "Gets the card's power status."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `status` - Pointer to output the power status to."] + pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command."] - #[doc = "* commandId ID of the command."] +#[doc = "Executes a CARDNOR direct command."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] + pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command with an address."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] +#[doc = "Executes a CARDNOR direct command with an address."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] + pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read."] - #[doc = "* commandId ID of the command."] - #[doc = "* size Size of the output buffer."] - #[doc = "* output Output buffer."] +#[doc = "Executes a CARDNOR direct read."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `size` - Size of the output buffer."] +#[doc = "* `output` - Output buffer."] + pub fn FSUSER_CardNorDirectRead( commandId: u8_, size: u32_, @@ -6797,11 +9290,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read with an address."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the output buffer."] - #[doc = "* output Output buffer."] +#[doc = "Executes a CARDNOR direct read with an address."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the output buffer."] +#[doc = "* `output` - Output buffer."] + pub fn FSUSER_CardNorDirectReadWithAddress( commandId: u8_, address: u32_, @@ -6811,10 +9308,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write."] - #[doc = "* commandId ID of the command."] - #[doc = "* size Size of the input buffer."] - #[doc = "* output Input buffer."] +#[doc = "Executes a CARDNOR direct write."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `size` - Size of the input buffer."] +#[doc = "* `output` - Input buffer."] + pub fn FSUSER_CardNorDirectWrite( commandId: u8_, size: u32_, @@ -6823,11 +9324,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write with an address."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the input buffer."] - #[doc = "* input Input buffer."] +#[doc = "Executes a CARDNOR direct write with an address."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the input buffer."] +#[doc = "* `input` - Input buffer."] + pub fn FSUSER_CardNorDirectWriteWithAddress( commandId: u8_, address: u32_, @@ -6837,11 +9342,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR 4xIO direct read."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the output buffer."] - #[doc = "* output Output buffer."] +#[doc = "Executes a CARDNOR 4xIO direct read."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the output buffer."] +#[doc = "* `output` - Output buffer."] + pub fn FSUSER_CardNorDirectRead_4xIO( commandId: u8_, address: u32_, @@ -6851,10 +9360,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct CPU write without verify."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the input buffer."] - #[doc = "* output Input buffer."] +#[doc = "Executes a CARDNOR direct CPU write without verify."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the input buffer."] +#[doc = "* `output` - Input buffer."] + pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify( address: u32_, size: u32_, @@ -6863,48 +9376,74 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct sector erase without verify."] - #[doc = "* address Address to provide."] +#[doc = "Executes a CARDNOR direct sector erase without verify."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `address` - Address to provide."] + pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a process's product info."] - #[doc = "* info Pointer to output the product info to."] - #[doc = "* processId ID of the process."] +#[doc = "Gets a process's product info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output the product info to."] +#[doc = "* `processId` - ID of the process."] + pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a process's program launch info."] - #[doc = "* info Pointer to output the program launch info to."] - #[doc = "* processId ID of the process."] +#[doc = "Gets a process's program launch info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output the program launch info to."] +#[doc = "* `processId` - ID of the process."] + pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI baud rate."] - #[doc = "* baudRate Baud rate to set."] +#[doc = "Sets the CARDSPI baud rate."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `baudRate` - Baud rate to set."] + pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI bus mode."] - #[doc = "* busMode Bus mode to set."] +#[doc = "Sets the CARDSPI bus mode."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `busMode` - Bus mode to set."] + pub fn FSUSER_SetCardSpiBusMode(busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] - #[doc = "Sends initialization info to ARM9."] +#[doc = "Sends initialization info to ARM9."] +#[doc = ""] + pub fn FSUSER_SendInitializeInfoTo9() -> Result; } extern "C" { #[must_use] - #[doc = "Gets a special content's index."] - #[doc = "* index Pointer to output the index to."] - #[doc = "* mediaType Media type of the special content."] - #[doc = "* programId Program ID owning the special content."] - #[doc = "* type Type of special content."] +#[doc = "Gets a special content's index."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `index` - Pointer to output the index to."] +#[doc = "* `mediaType` - Media type of the special content."] +#[doc = "* `programId` - Program ID owning the special content."] +#[doc = "* `type` - Type of special content."] + pub fn FSUSER_GetSpecialContentIndex( index: *mut u16_, mediaType: FS_MediaType, @@ -6914,10 +9453,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy ROM header of a program."] - #[doc = "* mediaType Media type of the program."] - #[doc = "* programId ID of the program."] - #[doc = "* header Pointer to output the legacy ROM header to. (size = 0x3B4)"] +#[doc = "Gets the legacy ROM header of a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Media type of the program."] +#[doc = "* `programId` - ID of the program."] +#[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] + pub fn FSUSER_GetLegacyRomHeader( mediaType: FS_MediaType, programId: u64_, @@ -6926,10 +9469,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy banner data of a program."] - #[doc = "* mediaType Media type of the program."] - #[doc = "* programId ID of the program."] - #[doc = "* header Pointer to output the legacy banner data to. (size = 0x23C0)"] +#[doc = "Gets the legacy banner data of a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Media type of the program."] +#[doc = "* `programId` - ID of the program."] +#[doc = "* `header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] + pub fn FSUSER_GetLegacyBannerData( mediaType: FS_MediaType, programId: u64_, @@ -6938,11 +9485,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks a process's authority to access a save data archive."] - #[doc = "* access Pointer to output the access status to."] - #[doc = "* mediaType Media type of the save data."] - #[doc = "* saveId ID of the save data."] - #[doc = "* processId ID of the process to check."] +#[doc = "Checks a process's authority to access a save data archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `access` - Pointer to output the access status to."] +#[doc = "* `mediaType` - Media type of the save data."] +#[doc = "* `saveId` - ID of the save data."] +#[doc = "* `processId` - ID of the process to check."] + pub fn FSUSER_CheckAuthorityToAccessExtSaveData( access: *mut bool, mediaType: FS_MediaType, @@ -6952,12 +9503,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Queries the total quota size of a save data archive."] - #[doc = "* quotaSize Pointer to output the quota size to."] - #[doc = "* directories Number of directories."] - #[doc = "* files Number of files."] - #[doc = "* fileSizeCount Number of file sizes to provide."] - #[doc = "* fileSizes File sizes to provide."] +#[doc = "Queries the total quota size of a save data archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `quotaSize` - Pointer to output the quota size to."] +#[doc = "* `directories` - Number of directories."] +#[doc = "* `files` - Number of files."] +#[doc = "* `fileSizeCount` - Number of file sizes to provide."] +#[doc = "* `fileSizes` - File sizes to provide."] + pub fn FSUSER_QueryTotalQuotaSize( quotaSize: *mut u64_, directories: u32_, @@ -6968,39 +9523,55 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Abnegates an access right."] - #[doc = "* accessRight Access right to abnegate."] +#[doc = "Abnegates an access right."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `accessRight` - Access right to abnegate."] + pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the 3DS SDMC root."] +#[doc = "Deletes the 3DS SDMC root."] +#[doc = ""] + pub fn FSUSER_DeleteSdmcRoot() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all ext save data on the NAND."] +#[doc = "Deletes all ext save data on the NAND."] +#[doc = ""] + pub fn FSUSER_DeleteAllExtSaveDataOnNand() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CTR file system."] +#[doc = "Initializes the CTR file system."] +#[doc = ""] + pub fn FSUSER_InitializeCtrFileSystem() -> Result; } extern "C" { #[must_use] - #[doc = "Creates the FS seed."] +#[doc = "Creates the FS seed."] +#[doc = ""] + pub fn FSUSER_CreateSeed() -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves archive format info."] - #[doc = "* totalSize Pointer to output the total size to."] - #[doc = "* directories Pointer to output the number of directories to."] - #[doc = "* files Pointer to output the number of files to."] - #[doc = "* duplicateData Pointer to output whether to duplicate data to."] - #[doc = "* archiveId ID of the archive."] - #[doc = "* path Path of the archive."] +#[doc = "Retrieves archive format info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `totalSize` - Pointer to output the total size to."] +#[doc = "* `directories` - Pointer to output the number of directories to."] +#[doc = "* `files` - Pointer to output the number of files to."] +#[doc = "* `duplicateData` - Pointer to output whether to duplicate data to."] +#[doc = "* `archiveId` - ID of the archive."] +#[doc = "* `path` - Path of the archive."] + pub fn FSUSER_GetFormatInfo( totalSize: *mut u32_, directories: *mut u32_, @@ -7012,11 +9583,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy ROM header of a program."] - #[doc = "* headerSize Size of the ROM header."] - #[doc = "* mediaType Media type of the program."] - #[doc = "* programId ID of the program."] - #[doc = "* header Pointer to output the legacy ROM header to."] +#[doc = "Gets the legacy ROM header of a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `headerSize` - Size of the ROM header."] +#[doc = "* `mediaType` - Media type of the program."] +#[doc = "* `programId` - ID of the program."] +#[doc = "* `header` - Pointer to output the legacy ROM header to."] + pub fn FSUSER_GetLegacyRomHeader2( headerSize: u32_, mediaType: FS_MediaType, @@ -7026,16 +9601,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the CTR SDMC root path."] - #[doc = "* out Pointer to output the root path to."] - #[doc = "* length Length of the output buffer."] +#[doc = "Gets the CTR SDMC root path."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the root path to."] +#[doc = "* `length` - Length of the output buffer."] + pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an archive's resource information."] - #[doc = "* archiveResource Pointer to output the archive resource information to."] - #[doc = "* mediaType System media type to check."] +#[doc = "Gets an archive's resource information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] +#[doc = "* `mediaType` - System media type to check."] + pub fn FSUSER_GetArchiveResource( archiveResource: *mut FS_ArchiveResource, mediaType: FS_SystemMediaType, @@ -7043,31 +9626,43 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Exports the integrity verification seed."] - #[doc = "* seed Pointer to output the seed to."] +#[doc = "Exports the integrity verification seed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `seed` - Pointer to output the seed to."] + pub fn FSUSER_ExportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] - #[doc = "Imports an integrity verification seed."] - #[doc = "* seed Seed to import."] +#[doc = "Imports an integrity verification seed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `seed` - Seed to import."] + pub fn FSUSER_ImportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] - #[doc = "Formats save data."] - #[doc = "* archiveId ID of the save data archive."] - #[doc = "* path Path of the save data."] - #[doc = "* blocks Size of the save data in blocks. (512 bytes)"] - #[doc = "* directories Number of directories."] - #[doc = "* files Number of files."] - #[doc = "* directoryBuckets Directory hash tree bucket count."] - #[doc = "* fileBuckets File hash tree bucket count."] - #[doc = "* duplicateData Whether to store an internal duplicate of the data."] +#[doc = "Formats save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archiveId` - ID of the save data archive."] +#[doc = "* `path` - Path of the save data."] +#[doc = "* `blocks` - Size of the save data in blocks. (512 bytes)"] +#[doc = "* `directories` - Number of directories."] +#[doc = "* `files` - Number of files."] +#[doc = "* `directoryBuckets` - Directory hash tree bucket count."] +#[doc = "* `fileBuckets` - File hash tree bucket count."] +#[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] + pub fn FSUSER_FormatSaveData( archiveId: FS_ArchiveID, path: FS_Path, @@ -7081,11 +9676,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy sub banner data of a program."] - #[doc = "* bannerSize Size of the banner."] - #[doc = "* mediaType Media type of the program."] - #[doc = "* programId ID of the program."] - #[doc = "* header Pointer to output the legacy sub banner data to."] +#[doc = "Gets the legacy sub banner data of a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bannerSize` - Size of the banner."] +#[doc = "* `mediaType` - Media type of the program."] +#[doc = "* `programId` - ID of the program."] +#[doc = "* `header` - Pointer to output the legacy sub banner data to."] + pub fn FSUSER_GetLegacySubBannerData( bannerSize: u32_, mediaType: FS_MediaType, @@ -7095,10 +9694,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Hashes the given data and outputs a SHA256 hash."] - #[doc = "* data Pointer to the data to be hashed."] - #[doc = "* inputSize The size of the data."] - #[doc = "* hash Hash output pointer."] +#[doc = "Hashes the given data and outputs a SHA256 hash."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to the data to be hashed."] +#[doc = "* `inputSize` - The size of the data."] +#[doc = "* `hash` - Hash output pointer."] + pub fn FSUSER_UpdateSha256Context( data: *const ::libc::c_void, inputSize: u32_, @@ -7107,11 +9710,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a special file."] - #[doc = "* bytesRead Pointer to output the number of bytes read to."] - #[doc = "* fileOffset Offset of the file."] - #[doc = "* size Size of the buffer."] - #[doc = "* data Buffer to read to."] +#[doc = "Reads from a special file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "* `fileOffset` - Offset of the file."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `data` - Buffer to read to."] + pub fn FSUSER_ReadSpecialFile( bytesRead: *mut u32_, fileOffset: u64_, @@ -7121,19 +9728,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the size of a special file."] - #[doc = "* fileSize Pointer to output the size to."] +#[doc = "Gets the size of a special file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `fileSize` - Pointer to output the size to."] + pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates ext save data."] - #[doc = "* info Info of the save data."] - #[doc = "* directories Number of directories."] - #[doc = "* files Number of files."] - #[doc = "* sizeLimit Size limit of the save data."] - #[doc = "* smdhSize Size of the save data's SMDH data."] - #[doc = "* smdh SMDH data."] +#[doc = "Creates ext save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Info of the save data."] +#[doc = "* `directories` - Number of directories."] +#[doc = "* `files` - Number of files."] +#[doc = "* `sizeLimit` - Size limit of the save data."] +#[doc = "* `smdhSize` - Size of the save data's SMDH data."] +#[doc = "* `smdh` - SMDH data."] + pub fn FSUSER_CreateExtSaveData( info: FS_ExtSaveDataInfo, directories: u32_, @@ -7145,17 +9760,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes ext save data."] - #[doc = "* info Info of the save data."] +#[doc = "Deletes ext save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Info of the save data."] + pub fn FSUSER_DeleteExtSaveData(info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Reads the SMDH icon of ext save data."] - #[doc = "* bytesRead Pointer to output the number of bytes read to."] - #[doc = "* info Info of the save data."] - #[doc = "* smdhSize Size of the save data SMDH."] - #[doc = "* smdh Pointer to output SMDH data to."] +#[doc = "Reads the SMDH icon of ext save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "* `info` - Info of the save data."] +#[doc = "* `smdhSize` - Size of the save data SMDH."] +#[doc = "* `smdh` - Pointer to output SMDH data to."] + pub fn FSUSER_ReadExtSaveDataIcon( bytesRead: *mut u32_, info: FS_ExtSaveDataInfo, @@ -7165,11 +9788,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an ext data archive's block information."] - #[doc = "* totalBlocks Pointer to output the total blocks to."] - #[doc = "* freeBlocks Pointer to output the free blocks to."] - #[doc = "* blockSize Pointer to output the block size to."] - #[doc = "* info Info of the save data."] +#[doc = "Gets an ext data archive's block information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `totalBlocks` - Pointer to output the total blocks to."] +#[doc = "* `freeBlocks` - Pointer to output the free blocks to."] +#[doc = "* `blockSize` - Pointer to output the block size to."] +#[doc = "* `info` - Info of the save data."] + pub fn FSUSER_GetExtDataBlockSize( totalBlocks: *mut u64_, freeBlocks: *mut u64_, @@ -7179,13 +9806,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Enumerates ext save data."] - #[doc = "* idsWritten Pointer to output the number of IDs written to."] - #[doc = "* idsSize Size of the IDs buffer."] - #[doc = "* mediaType Media type to enumerate over."] - #[doc = "* idSize Size of each ID element."] - #[doc = "* shared Whether to enumerate shared ext save data."] - #[doc = "* ids Pointer to output IDs to."] +#[doc = "Enumerates ext save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "* `idsSize` - Size of the IDs buffer."] +#[doc = "* `mediaType` - Media type to enumerate over."] +#[doc = "* `idSize` - Size of each ID element."] +#[doc = "* `shared` - Whether to enumerate shared ext save data."] +#[doc = "* `ids` - Pointer to output IDs to."] + pub fn FSUSER_EnumerateExtSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -7197,15 +9828,19 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates system save data."] - #[doc = "* info Info of the save data."] - #[doc = "* totalSize Total size of the save data."] - #[doc = "* blockSize Block size of the save data. (usually 0x1000)"] - #[doc = "* directories Number of directories."] - #[doc = "* files Number of files."] - #[doc = "* directoryBuckets Directory hash tree bucket count."] - #[doc = "* fileBuckets File hash tree bucket count."] - #[doc = "* duplicateData Whether to store an internal duplicate of the data."] +#[doc = "Creates system save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Info of the save data."] +#[doc = "* `totalSize` - Total size of the save data."] +#[doc = "* `blockSize` - Block size of the save data. (usually 0x1000)"] +#[doc = "* `directories` - Number of directories."] +#[doc = "* `files` - Number of files."] +#[doc = "* `directoryBuckets` - Directory hash tree bucket count."] +#[doc = "* `fileBuckets` - File hash tree bucket count."] +#[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] + pub fn FSUSER_CreateSystemSaveData( info: FS_SystemSaveDataInfo, totalSize: u32_, @@ -7219,21 +9854,33 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes system save data."] - #[doc = "* info Info of the save data."] +#[doc = "Deletes system save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Info of the save data."] + pub fn FSUSER_DeleteSystemSaveData(info: FS_SystemSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates a device move as the source device."] - #[doc = "* context Pointer to output the context to."] +#[doc = "Initiates a device move as the source device."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Pointer to output the context to."] + pub fn FSUSER_StartDeviceMoveAsSource(context: *mut FS_DeviceMoveContext) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates a device move as the destination device."] - #[doc = "* context Context to use."] - #[doc = "* clear Whether to clear the device's data first."] +#[doc = "Initiates a device move as the destination device."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `clear` - Whether to clear the device's data first."] + pub fn FSUSER_StartDeviceMoveAsDestination( context: FS_DeviceMoveContext, clear: bool, @@ -7241,37 +9888,57 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets an archive's priority."] - #[doc = "* archive Archive to use."] - #[doc = "* priority Priority to set."] +#[doc = "Sets an archive's priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to use."] +#[doc = "* `priority` - Priority to set."] + pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an archive's priority."] - #[doc = "* priority Pointer to output the priority to."] - #[doc = "* archive Archive to use."] +#[doc = "Gets an archive's priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `priority` - Pointer to output the priority to."] +#[doc = "* `archive` - Archive to use."] + pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Configures CTRCARD latency emulation."] - #[doc = "* latency Latency to apply, in milliseconds."] - #[doc = "* emulateEndurance Whether to emulate card endurance."] +#[doc = "Configures CTRCARD latency emulation."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `latency` - Latency to apply, in milliseconds."] +#[doc = "* `emulateEndurance` - Whether to emulate card endurance."] + pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Toggles cleaning up invalid save data."] - #[doc = "* enable Whether to enable cleaning up invalid save data."] +#[doc = "Toggles cleaning up invalid save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Whether to enable cleaning up invalid save data."] + pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Enumerates system save data."] - #[doc = "* idsWritten Pointer to output the number of IDs written to."] - #[doc = "* idsSize Size of the IDs buffer."] - #[doc = "* ids Pointer to output IDs to."] +#[doc = "Enumerates system save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "* `idsSize` - Size of the IDs buffer."] +#[doc = "* `ids` - Pointer to output IDs to."] + pub fn FSUSER_EnumerateSystemSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -7280,30 +9947,46 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes a FSUSER session with an SDK version."] - #[doc = "* session The handle of the FSUSER session to initialize."] - #[doc = "* version SDK version to initialize with."] +#[doc = "Initializes a FSUSER session with an SDK version."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `session` - The handle of the FSUSER session to initialize."] +#[doc = "* `version` - SDK version to initialize with."] + pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the file system priority."] - #[doc = "* priority Priority to set."] +#[doc = "Sets the file system priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `priority` - Priority to set."] + pub fn FSUSER_SetPriority(priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the file system priority."] - #[doc = "* priority Pointer to output the priority to."] - pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result; +#[doc = "Gets the file system priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `priority` - Pointer to output the priority to."] + + pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the save data secure value."] - #[doc = "* value Secure value to set."] - #[doc = "* slot Slot of the secure value."] - #[doc = "* titleUniqueId Unique ID of the title. (default = 0)"] - #[doc = "* titleVariation Variation of the title. (default = 0)"] +#[doc = "Sets the save data secure value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Secure value to set."] +#[doc = "* `slot` - Slot of the secure value."] +#[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] +#[doc = "* `titleVariation` - Variation of the title. (default = 0)"] + pub fn FSUSER_SetSaveDataSecureValue( value: u64_, slot: FS_SecureValueSlot, @@ -7313,12 +9996,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the save data secure value."] - #[doc = "* exists Pointer to output whether the secure value exists to."] - #[doc = "* value Pointer to output the secure value to."] - #[doc = "* slot Slot of the secure value."] - #[doc = "* titleUniqueId Unique ID of the title. (default = 0)"] - #[doc = "* titleVariation Variation of the title. (default = 0)"] +#[doc = "Gets the save data secure value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `exists` - Pointer to output whether the secure value exists to."] +#[doc = "* `value` - Pointer to output the secure value to."] +#[doc = "* `slot` - Slot of the secure value."] +#[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] +#[doc = "* `titleVariation` - Variation of the title. (default = 0)"] + pub fn FSUSER_GetSaveDataSecureValue( exists: *mut bool, value: *mut u64_, @@ -7329,12 +10016,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Performs a control operation on a secure save."] - #[doc = "* action Action to perform."] - #[doc = "* input Buffer to read input from."] - #[doc = "* inputSize Size of the input."] - #[doc = "* output Buffer to write output to."] - #[doc = "* outputSize Size of the output."] +#[doc = "Performs a control operation on a secure save."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `action` - Action to perform."] +#[doc = "* `input` - Buffer to read input from."] +#[doc = "* `inputSize` - Size of the input."] +#[doc = "* `output` - Buffer to write output to."] +#[doc = "* `outputSize` - Size of the output."] + pub fn FSUSER_ControlSecureSave( action: FS_SecureSaveAction, input: *mut ::libc::c_void, @@ -7345,19 +10036,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the media type of the current application."] - #[doc = "* mediaType Pointer to output the media type to."] +#[doc = "Gets the media type of the current application."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Pointer to output the media type to."] + pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result; } extern "C" { #[must_use] - #[doc = "Performs a control operation on a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* action Action to perform."] - #[doc = "* input Buffer to read input from."] - #[doc = "* inputSize Size of the input."] - #[doc = "* output Buffer to write output to."] - #[doc = "* outputSize Size of the output."] +#[doc = "Performs a control operation on a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `action` - Action to perform."] +#[doc = "* `input` - Buffer to read input from."] +#[doc = "* `inputSize` - Size of the input."] +#[doc = "* `output` - Buffer to write output to."] +#[doc = "* `outputSize` - Size of the output."] + pub fn FSFILE_Control( handle: Handle, action: FS_FileAction, @@ -7369,11 +10068,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a handle to a sub-section of a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* subFile Pointer to output the sub-file to."] - #[doc = "* offset Offset of the sub-section."] - #[doc = "* size Size of the sub-section."] +#[doc = "Opens a handle to a sub-section of a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `subFile` - Pointer to output the sub-file to."] +#[doc = "* `offset` - Offset of the sub-section."] +#[doc = "* `size` - Size of the sub-section."] + pub fn FSFILE_OpenSubFile( handle: Handle, subFile: *mut Handle, @@ -7383,12 +10086,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* bytesRead Pointer to output the number of bytes read to."] - #[doc = "* offset Offset to read from."] - #[doc = "* buffer Buffer to read to."] - #[doc = "* size Size of the buffer."] +#[doc = "Reads from a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "* `offset` - Offset to read from."] +#[doc = "* `buffer` - Buffer to read to."] +#[doc = "* `size` - Size of the buffer."] + pub fn FSFILE_Read( handle: Handle, bytesRead: *mut u32_, @@ -7399,13 +10106,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* bytesWritten Pointer to output the number of bytes written to."] - #[doc = "* offset Offset to write to."] - #[doc = "* buffer Buffer to write from."] - #[doc = "* size Size of the buffer."] - #[doc = "* flags Flags to use when writing."] +#[doc = "Writes to a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] +#[doc = "* `offset` - Offset to write to."] +#[doc = "* `buffer` - Buffer to write from."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `flags` - Flags to use when writing."] + pub fn FSFILE_Write( handle: Handle, bytesWritten: *mut u32_, @@ -7417,74 +10128,114 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the size of a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* size Pointer to output the size to."] +#[doc = "Gets the size of a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `size` - Pointer to output the size to."] + pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the size of a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* size Size to set."] +#[doc = "Sets the size of a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `size` - Size to set."] + pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the attributes of a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* attributes Pointer to output the attributes to."] +#[doc = "Gets the attributes of a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `attributes` - Pointer to output the attributes to."] + pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the attributes of a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* attributes Attributes to set."] +#[doc = "Sets the attributes of a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `attributes` - Attributes to set."] + pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Closes a file."] - #[doc = "* handle Handle of the file."] +#[doc = "Closes a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] + pub fn FSFILE_Close(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes a file's contents."] - #[doc = "* handle Handle of the file."] +#[doc = "Flushes a file's contents."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] + pub fn FSFILE_Flush(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a file's priority."] - #[doc = "* handle Handle of the file."] - #[doc = "* priority Priority to set."] +#[doc = "Sets a file's priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `priority` - Priority to set."] + pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a file's priority."] - #[doc = "* handle Handle of the file."] - #[doc = "* priority Pointer to output the priority to."] +#[doc = "Gets a file's priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `priority` - Pointer to output the priority to."] + pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Opens a duplicate handle to a file."] - #[doc = "* handle Handle of the file."] - #[doc = "* linkFile Pointer to output the link handle to."] +#[doc = "Opens a duplicate handle to a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the file."] +#[doc = "* `linkFile` - Pointer to output the link handle to."] + pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Performs a control operation on a directory."] - #[doc = "* handle Handle of the directory."] - #[doc = "* action Action to perform."] - #[doc = "* input Buffer to read input from."] - #[doc = "* inputSize Size of the input."] - #[doc = "* output Buffer to write output to."] - #[doc = "* outputSize Size of the output."] +#[doc = "Performs a control operation on a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the directory."] +#[doc = "* `action` - Action to perform."] +#[doc = "* `input` - Buffer to read input from."] +#[doc = "* `inputSize` - Size of the input."] +#[doc = "* `output` - Buffer to write output to."] +#[doc = "* `outputSize` - Size of the output."] + pub fn FSDIR_Control( handle: Handle, action: FS_DirectoryAction, @@ -7496,11 +10247,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads one or more directory entries."] - #[doc = "* handle Handle of the directory."] - #[doc = "* entriesRead Pointer to output the number of entries read to."] - #[doc = "* entryCount Number of entries to read."] - #[doc = "* entryOut Pointer to output directory entries to."] +#[doc = "Reads one or more directory entries."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the directory."] +#[doc = "* `entriesRead` - Pointer to output the number of entries read to."] +#[doc = "* `entryCount` - Number of entries to read."] +#[doc = "* `entryOut` - Pointer to output directory entries to."] + pub fn FSDIR_Read( handle: Handle, entriesRead: *mut u32_, @@ -7510,141 +10265,241 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes a directory."] - #[doc = "* handle Handle of the directory."] +#[doc = "Closes a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the directory."] + pub fn FSDIR_Close(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a directory's priority."] - #[doc = "* handle Handle of the directory."] - #[doc = "* priority Priority to set."] +#[doc = "Sets a directory's priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the directory."] +#[doc = "* `priority` - Priority to set."] + pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a directory's priority."] - #[doc = "* handle Handle of the directory."] - #[doc = "* priority Pointer to output the priority to."] +#[doc = "Gets a directory's priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Handle of the directory."] +#[doc = "* `priority` - Pointer to output the priority to."] + pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } #[doc = "Contains basic information about a title."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TitleEntry { - #[doc = "The title's ID."] +#[doc = "The title's ID."] +#[doc = ""] + pub titleID: u64_, - #[doc = "The title's installed size."] +#[doc = "The title's installed size."] +#[doc = ""] + pub size: u64_, - #[doc = "The title's version."] +#[doc = "The title's version."] +#[doc = ""] + pub version: u16_, - #[doc = "Unknown title data."] +#[doc = "Unknown title data."] +#[doc = ""] + pub unk: [u8_; 6usize], } #[doc = "Titles currently installing."] +#[doc = ""] + pub const AM_STATUS_MASK_INSTALLING: _bindgen_ty_13 = 1; #[doc = "Titles awaiting finalization."] +#[doc = ""] + pub const AM_STATUS_MASK_AWAITING_FINALIZATION: _bindgen_ty_13 = 2; #[doc = "Pending title status mask values."] +#[doc = ""] + pub type _bindgen_ty_13 = ::libc::c_uint; #[doc = "Install aborted."] +#[doc = ""] + pub const AM_STATUS_ABORTED: AM_InstallStatus = 2; #[doc = "Title saved, but not installed."] +#[doc = ""] + pub const AM_STATUS_SAVED: AM_InstallStatus = 3; #[doc = "Install in progress."] +#[doc = ""] + pub const AM_STATUS_INSTALL_IN_PROGRESS: AM_InstallStatus = 2050; #[doc = "Awaiting finalization."] +#[doc = ""] + pub const AM_STATUS_AWAITING_FINALIZATION: AM_InstallStatus = 2051; #[doc = "Pending title status values."] +#[doc = ""] + pub type AM_InstallStatus = ::libc::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_PendingTitleEntry { - #[doc = "Title ID"] +#[doc = "Title ID"] +#[doc = ""] + pub titleId: u64_, - #[doc = "Version"] +#[doc = "Version"] +#[doc = ""] + pub version: u16_, - #[doc = "AM_InstallStatus"] +#[doc = "@ref AM_InstallStatus"] +#[doc = ""] + pub status: u16_, - #[doc = "Title Type"] +#[doc = "Title Type"] +#[doc = ""] + pub titleType: u32_, - #[doc = "Unknown"] +#[doc = "Unknown"] +#[doc = ""] + pub unk: [u8_; 8usize], } #[doc = "Non-system titles."] +#[doc = ""] + pub const AM_DELETE_PENDING_NON_SYSTEM: _bindgen_ty_14 = 1; #[doc = "System titles."] +#[doc = ""] + pub const AM_DELETE_PENDING_SYSTEM: _bindgen_ty_14 = 2; #[doc = "Pending title deletion flags."] +#[doc = ""] + pub type _bindgen_ty_14 = ::libc::c_uint; #[doc = "Information about the TWL NAND partition."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TWLPartitionInfo { - #[doc = "Total capacity."] +#[doc = "Total capacity."] +#[doc = ""] + pub capacity: u64_, - #[doc = "Total free space."] +#[doc = "Total free space."] +#[doc = ""] + pub freeSpace: u64_, - #[doc = "Capacity for titles."] +#[doc = "Capacity for titles."] +#[doc = ""] + pub titlesCapacity: u64_, - #[doc = "Free space for titles."] +#[doc = "Free space for titles."] +#[doc = ""] + pub titlesFreeSpace: u64_, } #[doc = "Contains information about a title's content."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_ContentInfo { - #[doc = "Index of the content in the title."] +#[doc = "Index of the content in the title."] +#[doc = ""] + pub index: u16_, - #[doc = "?"] +#[doc = "?"] +#[doc = ""] + pub type_: u16_, - #[doc = "ID of the content in the title."] +#[doc = "ID of the content in the title."] +#[doc = ""] + pub contentId: u32_, - #[doc = "Size of the content in the title."] +#[doc = "Size of the content in the title."] +#[doc = ""] + pub size: u64_, - #[doc = "AM_ContentInfoFlags"] +#[doc = "@ref AM_ContentInfoFlags"] +#[doc = ""] + pub flags: u8_, - #[doc = "Padding"] +#[doc = "Padding"] +#[doc = ""] + pub padding: [u8_; 7usize], } #[doc = "?"] +#[doc = ""] + pub const AM_CONTENT_DOWNLOADED: AM_ContentInfoFlags = 1; #[doc = "?"] +#[doc = ""] + pub const AM_CONTENT_OWNED: AM_ContentInfoFlags = 2; #[doc = "Title ContentInfo flags."] +#[doc = ""] + pub type AM_ContentInfoFlags = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] +#[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] +#[doc = ""] + pub fn amInit() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] +#[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] +#[doc = ""] + pub fn amAppInit() -> Result; } extern "C" { - #[doc = "Exits AM."] +#[doc = "Exits AM."] +#[doc = ""] + pub fn amExit(); } extern "C" { - #[doc = "Gets the current AM session handle."] +#[doc = "Gets the current AM session handle."] +#[doc = ""] + pub fn amGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the number of titles for a given media type."] - #[doc = "* mediatype Media type to get titles from."] - #[doc = "* count Pointer to write the title count to."] +#[doc = "Gets the number of titles for a given media type."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to get titles from."] +#[doc = "* `count` - Pointer to write the title count to. [Direction: In, Out]"] + pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a list of title IDs present in a mediatype."] - #[doc = "* titlesRead Pointer to output the number of read titles to."] - #[doc = "* mediatype Media type to get titles from."] - #[doc = "* titleCount Number of title IDs to get."] - #[doc = "* titleIds Buffer to output the retrieved title IDs to."] +#[doc = "Gets a list of title IDs present in a mediatype."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titlesRead` - Pointer to output the number of read titles to. [Direction: In, Out]"] +#[doc = "* `mediatype` - Media type to get titles from."] +#[doc = "* `titleCount` - Number of title IDs to get."] +#[doc = "* `titleIds` - Buffer to output the retrieved title IDs to."] + pub fn AM_GetTitleList( titlesRead: *mut u32_, mediatype: FS_MediaType, @@ -7654,11 +10509,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a list of details about installed titles."] - #[doc = "* mediatype Media type to get titles from."] - #[doc = "* titleCount Number of titles to list."] - #[doc = "* titleIds List of title IDs to retrieve details for."] - #[doc = "* titleInfo Buffer to write AM_TitleEntry's to."] +#[doc = "Gets a list of details about installed titles."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to get titles from."] +#[doc = "* `titleCount` - Number of titles to list."] +#[doc = "* `titleIds` - List of title IDs to retrieve details for."] +#[doc = "* `titleInfo` - Buffer to write AM_TitleEntry's to."] + pub fn AM_GetTitleInfo( mediatype: FS_MediaType, titleCount: u32_, @@ -7668,17 +10527,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the number of tickets installed on the system."] - #[doc = "* count Pointer to output the ticket count to."] +#[doc = "Gets the number of tickets installed on the system."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `count` - Pointer to output the ticket count to. [Direction: In, Out]"] + pub fn AM_GetTicketCount(count: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a list of tickets installed on the system."] - #[doc = "* ticketsRead Pointer to output the number of read tickets to."] - #[doc = "* ticketCount Number of tickets to read."] - #[doc = "* skip Number of tickets to skip."] - #[doc = "* ticketIds Buffer to output the retrieved ticket IDs to."] +#[doc = "Gets a list of tickets installed on the system."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ticketsRead` - Pointer to output the number of read tickets to. [Direction: In, Out]"] +#[doc = "* `ticketCount` - Number of tickets to read."] +#[doc = "* `skip` - Number of tickets to skip."] +#[doc = "* `ticketIds` - Buffer to output the retrieved ticket IDs to."] + pub fn AM_GetTicketList( ticketsRead: *mut u32_, ticketCount: u32_, @@ -7688,10 +10555,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the number of pending titles on this system."] - #[doc = "* count Pointer to output the pending title count to."] - #[doc = "* mediatype Media type of pending titles to count."] - #[doc = "* statusMask Bit mask of status values to include."] +#[doc = "Gets the number of pending titles on this system."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `count` - Pointer to output the pending title count to. [Direction: In, Out]"] +#[doc = "* `mediatype` - Media type of pending titles to count."] +#[doc = "* `statusMask` - Bit mask of status values to include."] + pub fn AM_GetPendingTitleCount( count: *mut u32_, mediatype: FS_MediaType, @@ -7700,12 +10571,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a list of pending titles on this system."] - #[doc = "* titlesRead Pointer to output the number of read pending titles to."] - #[doc = "* titleCount Number of pending titles to read."] - #[doc = "* mediatype Media type of pending titles to list."] - #[doc = "* statusMask Bit mask of status values to include."] - #[doc = "* titleIds Buffer to output the retrieved pending title IDs to."] +#[doc = "Gets a list of pending titles on this system."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titlesRead` - Pointer to output the number of read pending titles to. [Direction: In, Out]"] +#[doc = "* `titleCount` - Number of pending titles to read."] +#[doc = "* `mediatype` - Media type of pending titles to list."] +#[doc = "* `statusMask` - Bit mask of status values to include."] +#[doc = "* `titleIds` - Buffer to output the retrieved pending title IDs to."] + pub fn AM_GetPendingTitleList( titlesRead: *mut u32_, titleCount: u32_, @@ -7716,11 +10591,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets information about pending titles on this system."] - #[doc = "* titleCount Number of pending titles to read."] - #[doc = "* mediatype Media type of pending titles to get information on."] - #[doc = "* titleIds IDs of the titles to get information about."] - #[doc = "* titleInfo Buffer to output the retrieved pending title info to."] +#[doc = "Gets information about pending titles on this system."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleCount` - Number of pending titles to read."] +#[doc = "* `mediatype` - Media type of pending titles to get information on."] +#[doc = "* `titleIds` - IDs of the titles to get information about."] +#[doc = "* `titleInfo` - Buffer to output the retrieved pending title info to."] + pub fn AM_GetPendingTitleInfo( titleCount: u32_, mediatype: FS_MediaType, @@ -7730,18 +10609,26 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a 32-bit device-specific ID."] - #[doc = "* deviceID Pointer to write the device ID to."] +#[doc = "Gets a 32-bit device-specific ID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `deviceID` - Pointer to write the device ID to."] + pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Exports DSiWare to the specified filepath."] - #[doc = "* titleID TWL titleID."] - #[doc = "* operation DSiWare operation type."] - #[doc = "* workbuf Work buffer."] - #[doc = "* workbuf_size Work buffer size, must be >=0x20000."] - #[doc = "* filepath UTF-8 filepath(converted to UTF-16 internally)."] +#[doc = "Exports DSiWare to the specified filepath."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleID` - TWL titleID."] +#[doc = "* `operation` - DSiWare operation type."] +#[doc = "* `workbuf` - Work buffer."] +#[doc = "* `workbuf_size` - Work buffer size, must be >=0x20000."] +#[doc = "* `filepath` - UTF-8 filepath(converted to UTF-16 internally)."] + pub fn AM_ExportTwlBackup( titleID: u64_, operation: u8_, @@ -7752,11 +10639,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Imports DSiWare from the specified file."] - #[doc = "* filehandle FSUSER file handle."] - #[doc = "* operation DSiWare operation type."] - #[doc = "* buffer Work buffer."] - #[doc = "* size Buffer size, must be >=0x20000."] +#[doc = "Imports DSiWare from the specified file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `filehandle` - FSUSER file handle."] +#[doc = "* `operation` - DSiWare operation type."] +#[doc = "* `buffer` - Work buffer."] +#[doc = "* `size` - Buffer size, must be >=0x20000."] + pub fn AM_ImportTwlBackup( filehandle: Handle, operation: u8_, @@ -7766,14 +10657,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] - #[doc = "* filehandle FSUSER file handle."] - #[doc = "* outinfo Output info buffer."] - #[doc = "* outinfo_size Output info buffer size."] - #[doc = "* workbuf Work buffer."] - #[doc = "* workbuf_size Work buffer size."] - #[doc = "* banner Output banner buffer."] - #[doc = "* banner_size Output banner buffer size."] +#[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `filehandle` - FSUSER file handle."] +#[doc = "* `outinfo` - Output info buffer."] +#[doc = "* `outinfo_size` - Output info buffer size."] +#[doc = "* `workbuf` - Work buffer."] +#[doc = "* `workbuf_size` - Work buffer size."] +#[doc = "* `banner` - Output banner buffer."] +#[doc = "* `banner_size` - Output banner buffer size."] + pub fn AM_ReadTwlBackupInfo( filehandle: Handle, outinfo: *mut ::libc::c_void, @@ -7786,48 +10681,76 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Retrieves information about the NAND TWL partition."] - #[doc = "* info Pointer to output the TWL partition info to."] +#[doc = "Retrieves information about the NAND TWL partition."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] + pub fn AM_GetTWLPartitionInfo(info: *mut AM_TWLPartitionInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] - #[doc = "* mediatype Media type to install the CIA to."] - #[doc = "* ciaHandle Pointer to write the CIA handle to."] +#[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to install the CIA to."] +#[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] + pub fn AM_StartCiaInstall(mediatype: FS_MediaType, ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] - #[doc = "* ciaHandle Pointer to write the CIA handle to."] +#[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] + pub fn AM_StartDlpChildCiaInstall(ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts the CIA install process."] - #[doc = "* ciaHandle CIA handle to cancel."] +#[doc = "Aborts the CIA install process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ciaHandle` - CIA handle to cancel."] + pub fn AM_CancelCIAInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finalizes the CIA install process."] - #[doc = "* ciaHandle CIA handle to finalize."] +#[doc = "Finalizes the CIA install process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ciaHandle` - CIA handle to finalize."] + pub fn AM_FinishCiaInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] - #[doc = "* ciaHandle CIA handle to finalize."] +#[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ciaHandle` - CIA handle to finalize."] + pub fn AM_FinishCiaInstallWithoutCommit(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Commits installed CIAs."] - #[doc = "* mediaType Location of the titles to finalize."] - #[doc = "* titleCount Number of titles to finalize."] - #[doc = "* temp Whether the titles being finalized are in the temporary database."] - #[doc = "* titleIds Title IDs to finalize."] +#[doc = "Commits installed CIAs."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Location of the titles to finalize."] +#[doc = "* `titleCount` - Number of titles to finalize."] +#[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] +#[doc = "* `titleIds` - Title IDs to finalize."] + pub fn AM_CommitImportPrograms( mediaType: FS_MediaType, titleCount: u32_, @@ -7837,61 +10760,95 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a title."] - #[doc = "* mediatype Media type to delete from."] - #[doc = "* titleID ID of the title to delete."] +#[doc = "Deletes a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to delete from."] +#[doc = "* `titleID` - ID of the title to delete."] + pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a title, provided that it is not a system title."] - #[doc = "* mediatype Media type to delete from."] - #[doc = "* titleID ID of the title to delete."] +#[doc = "Deletes a title, provided that it is not a system title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to delete from."] +#[doc = "* `titleID` - ID of the title to delete."] + pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a ticket."] - #[doc = "* titleID ID of the ticket to delete."] +#[doc = "Deletes a ticket."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleID` - ID of the ticket to delete."] + pub fn AM_DeleteTicket(ticketId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a pending title."] - #[doc = "* mediatype Media type to delete from."] - #[doc = "* titleId ID of the pending title to delete."] +#[doc = "Deletes a pending title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to delete from."] +#[doc = "* `titleId` - ID of the pending title to delete."] + pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes pending titles."] - #[doc = "* mediatype Media type to delete from."] - #[doc = "* flags Flags used to select pending titles."] +#[doc = "Deletes pending titles."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to delete from."] +#[doc = "* `flags` - Flags used to select pending titles."] + pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all pending titles."] - #[doc = "* mediatype Media type to delete from."] +#[doc = "Deletes all pending titles."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to delete from."] + pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] - #[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] +#[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] +#[doc = ""] + pub fn AM_InstallNativeFirm() -> Result; } extern "C" { #[must_use] - #[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] - #[doc = "* titleID Title ID of the NATIVE_FIRM to install."] +#[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleID` - Title ID of the NATIVE_FIRM to install."] + pub fn AM_InstallFirm(titleID: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the product code of a title."] - #[doc = "* mediatype Media type of the title."] - #[doc = "* titleID ID of the title."] - #[doc = "* productCode Pointer to output the product code to. (length = 16)"] +#[doc = "Gets the product code of a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type of the title."] +#[doc = "* `titleID` - ID of the title."] +#[doc = "* `productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] + pub fn AM_GetTitleProductCode( mediatype: FS_MediaType, titleId: u64_, @@ -7900,10 +10857,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the ext data ID of a title."] - #[doc = "* extDataId Pointer to output the ext data ID to."] - #[doc = "* mediatype Media type of the title."] - #[doc = "* titleID ID of the title."] +#[doc = "Gets the ext data ID of a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] +#[doc = "* `mediatype` - Media type of the title."] +#[doc = "* `titleID` - ID of the title."] + pub fn AM_GetTitleExtDataId( extDataId: *mut u64_, mediatype: FS_MediaType, @@ -7912,10 +10873,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an AM_TitleEntry instance for a CIA file."] - #[doc = "* mediatype Media type that this CIA would be installed to."] - #[doc = "* titleEntry Pointer to write the AM_TitleEntry instance to."] - #[doc = "* fileHandle Handle of the CIA file."] +#[doc = "Gets an AM_TitleEntry instance for a CIA file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type that this CIA would be installed to."] +#[doc = "* `titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] +#[doc = "* `fileHandle` - Handle of the CIA file."] + pub fn AM_GetCiaFileInfo( mediatype: FS_MediaType, titleEntry: *mut AM_TitleEntry, @@ -7924,38 +10889,58 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the SMDH icon data of a CIA file."] - #[doc = "* icon Buffer to store the icon data in. Must be of size 0x36C0 bytes."] - #[doc = "* fileHandle Handle of the CIA file."] +#[doc = "Gets the SMDH icon data of a CIA file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] +#[doc = "* `fileHandle` - Handle of the CIA file."] + pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the title ID dependency list of a CIA file."] - #[doc = "* dependencies Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] - #[doc = "* fileHandle Handle of the CIA file."] +#[doc = "Gets the title ID dependency list of a CIA file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] +#[doc = "* `fileHandle` - Handle of the CIA file."] + pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the meta section offset of a CIA file."] - #[doc = "* metaOffset Pointer to output the meta section offset to."] - #[doc = "* fileHandle Handle of the CIA file."] +#[doc = "Gets the meta section offset of a CIA file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] +#[doc = "* `fileHandle` - Handle of the CIA file."] + pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the core version of a CIA file."] - #[doc = "* coreVersion Pointer to output the core version to."] - #[doc = "* fileHandle Handle of the CIA file."] +#[doc = "Gets the core version of a CIA file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] +#[doc = "* `fileHandle` - Handle of the CIA file."] + pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the free space, in bytes, required to install a CIA file."] - #[doc = "* requiredSpace Pointer to output the required free space to."] - #[doc = "* mediaType Media type to check free space needed to install to."] - #[doc = "* fileHandle Handle of the CIA file."] +#[doc = "Gets the free space, in bytes, required to install a CIA file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] +#[doc = "* `mediaType` - Media type to check free space needed to install to."] +#[doc = "* `fileHandle` - Handle of the CIA file."] + pub fn AM_GetCiaRequiredSpace( requiredSpace: *mut u64_, mediaType: FS_MediaType, @@ -7964,10 +10949,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the full meta section of a CIA file."] - #[doc = "* meta Buffer to store the meta section in."] - #[doc = "* size Size of the buffer. Must be greater than or equal to the actual section data's size."] - #[doc = "* fileHandle Handle of the CIA file."] +#[doc = "Gets the full meta section of a CIA file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `meta` - Buffer to store the meta section in."] +#[doc = "* `size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] +#[doc = "* `fileHandle` - Handle of the CIA file."] + pub fn AM_GetCiaMetaSection( meta: *mut ::libc::c_void, size: u32_, @@ -7976,71 +10965,109 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes the external (SD) title database."] - #[doc = "* overwrite Overwrites the database if it already exists."] +#[doc = "Initializes the external (SD) title database."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `overwrite` - Overwrites the database if it already exists."] + pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Queries whether the external title database is available."] - #[doc = "* available Pointer to output the availability status to."] +#[doc = "Queries whether the external title database is available."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `available` - Pointer to output the availability status to. [Direction: In, Out]"] + pub fn AM_QueryAvailableExternalTitleDatabase(available: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Begins installing a ticket."] - #[doc = "* ticketHandle Pointer to output a handle to write ticket data to."] +#[doc = "Begins installing a ticket."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] + pub fn AM_InstallTicketBegin(ticketHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts installing a ticket."] - #[doc = "* ticketHandle Handle of the installation to abort."] +#[doc = "Aborts installing a ticket."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ticketHandle` - Handle of the installation to abort."] + pub fn AM_InstallTicketAbort(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing a ticket."] - #[doc = "* ticketHandle Handle of the installation to finalize."] +#[doc = "Finishes installing a ticket."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ticketHandle` - Handle of the installation to finalize."] + pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Begins installing a title."] - #[doc = "* mediaType Destination to install to."] - #[doc = "* titleId ID of the title to install."] - #[doc = "* unk Unknown. (usually false)"] +#[doc = "Begins installing a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Destination to install to."] +#[doc = "* `titleId` - ID of the title to install."] +#[doc = "* `unk` - Unknown. (usually false)"] + pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Stops installing a title, generally to be resumed later."] +#[doc = "Stops installing a title, generally to be resumed later."] +#[doc = ""] + pub fn AM_InstallTitleStop() -> Result; } extern "C" { #[must_use] - #[doc = "Resumes installing a title."] - #[doc = "* mediaType Destination to install to."] - #[doc = "* titleId ID of the title to install."] +#[doc = "Resumes installing a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Destination to install to."] +#[doc = "* `titleId` - ID of the title to install."] + pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts installing a title."] +#[doc = "Aborts installing a title."] +#[doc = ""] + pub fn AM_InstallTitleAbort() -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing a title."] +#[doc = "Finishes installing a title."] +#[doc = ""] + pub fn AM_InstallTitleFinish() -> Result; } extern "C" { #[must_use] - #[doc = "Commits installed titles."] - #[doc = "* mediaType Location of the titles to finalize."] - #[doc = "* titleCount Number of titles to finalize."] - #[doc = "* temp Whether the titles being finalized are in the temporary database."] - #[doc = "* titleIds Title IDs to finalize."] +#[doc = "Commits installed titles."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Location of the titles to finalize."] +#[doc = "* `titleCount` - Number of titles to finalize."] +#[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] +#[doc = "* `titleIds` - Title IDs to finalize."] + pub fn AM_CommitImportTitles( mediaType: FS_MediaType, titleCount: u32_, @@ -8050,49 +11077,77 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Begins installing a TMD."] - #[doc = "* tmdHandle Pointer to output a handle to write TMD data to."] +#[doc = "Begins installing a TMD."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] + pub fn AM_InstallTmdBegin(tmdHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts installing a TMD."] - #[doc = "* tmdHandle Handle of the installation to abort."] +#[doc = "Aborts installing a TMD."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `tmdHandle` - Handle of the installation to abort."] + pub fn AM_InstallTmdAbort(tmdHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing a TMD."] - #[doc = "* tmdHandle Handle of the installation to finalize."] - #[doc = "* unk Unknown. (usually true)"] +#[doc = "Finishes installing a TMD."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `tmdHandle` - Handle of the installation to finalize."] +#[doc = "* `unk` - Unknown. (usually true)"] + pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares to import title contents."] - #[doc = "* contentCount Number of contents to be imported."] - #[doc = "* contentIndices Indices of the contents to be imported."] +#[doc = "Prepares to import title contents."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `contentCount` - Number of contents to be imported."] +#[doc = "* `contentIndices` - Indices of the contents to be imported."] + pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Begins installing title content."] - #[doc = "* contentHandle Pointer to output a handle to write content data to."] - #[doc = "* index Index of the content to install."] +#[doc = "Begins installing title content."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] +#[doc = "* `index` - Index of the content to install."] + pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Stops installing title content, generally to be resumed later."] - #[doc = "* contentHandle Handle of the installation to abort."] +#[doc = "Stops installing title content, generally to be resumed later."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `contentHandle` - Handle of the installation to abort."] + pub fn AM_InstallContentStop(contentHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Resumes installing title content."] - #[doc = "* contentHandle Pointer to output a handle to write content data to."] - #[doc = "* resumeOffset Pointer to write the offset to resume content installation at to."] - #[doc = "* index Index of the content to install."] +#[doc = "Resumes installing title content."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] +#[doc = "* `resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] +#[doc = "* `index` - Index of the content to install."] + pub fn AM_InstallContentResume( contentHandle: *mut Handle, resumeOffset: *mut u64_, @@ -8101,27 +11156,39 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Cancels installing title content."] - #[doc = "* contentHandle Handle of the installation to finalize."] +#[doc = "Cancels installing title content."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `contentHandle` - Handle of the installation to finalize."] + pub fn AM_InstallContentCancel(contentHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing title content."] - #[doc = "* contentHandle Handle of the installation to finalize."] +#[doc = "Finishes installing title content."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `contentHandle` - Handle of the installation to finalize."] + pub fn AM_InstallContentFinish(contentHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Imports up to four certificates into the ticket certificate chain."] - #[doc = "* cert1Size Size of the first certificate."] - #[doc = "* cert1 Data of the first certificate."] - #[doc = "* cert2Size Size of the second certificate."] - #[doc = "* cert2 Data of the second certificate."] - #[doc = "* cert3Size Size of the third certificate."] - #[doc = "* cert3 Data of the third certificate."] - #[doc = "* cert4Size Size of the fourth certificate."] - #[doc = "* cert4 Data of the fourth certificate."] +#[doc = "Imports up to four certificates into the ticket certificate chain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cert1Size` - Size of the first certificate."] +#[doc = "* `cert1` - Data of the first certificate."] +#[doc = "* `cert2Size` - Size of the second certificate."] +#[doc = "* `cert2` - Data of the second certificate."] +#[doc = "* `cert3Size` - Size of the third certificate."] +#[doc = "* `cert3` - Data of the third certificate."] +#[doc = "* `cert4Size` - Size of the fourth certificate."] +#[doc = "* `cert4` - Data of the fourth certificate."] + pub fn AM_ImportCertificates( cert1Size: u32_, cert1: *mut ::libc::c_void, @@ -8135,18 +11202,26 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Imports a certificate into the ticket certificate chain."] - #[doc = "* certSize Size of the certificate."] - #[doc = "* cert Data of the certificate."] +#[doc = "Imports a certificate into the ticket certificate chain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `certSize` - Size of the certificate."] +#[doc = "* `cert` - Data of the certificate."] + pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Commits installed titles, and updates FIRM if necessary."] - #[doc = "* mediaType Location of the titles to finalize."] - #[doc = "* titleCount Number of titles to finalize."] - #[doc = "* temp Whether the titles being finalized are in the temporary database."] - #[doc = "* titleIds Title IDs to finalize."] +#[doc = "Commits installed titles, and updates FIRM if necessary."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Location of the titles to finalize."] +#[doc = "* `titleCount` - Number of titles to finalize."] +#[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] +#[doc = "* `titleIds` - Title IDs to finalize."] + pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto( mediaType: FS_MediaType, titleCount: u32_, @@ -8156,31 +11231,45 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Resets play count of all installed demos by deleting their launch info."] +#[doc = "Resets play count of all installed demos by deleting their launch info."] +#[doc = ""] + pub fn AM_DeleteAllDemoLaunchInfos() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes temporary titles."] +#[doc = "Deletes temporary titles."] +#[doc = ""] + pub fn AM_DeleteAllTemporaryTitles() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all expired titles."] - #[doc = "* mediatype Media type to delete from."] +#[doc = "Deletes all expired titles."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Media type to delete from."] + pub fn AM_DeleteAllExpiredTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all TWL titles."] +#[doc = "Deletes all TWL titles."] +#[doc = ""] + pub fn AM_DeleteAllTwlTitles() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the number of content index installed under the specified DLC title."] - #[doc = "* count Pointer to output the number of content indices to."] - #[doc = "* mediatype Media type of the title."] - #[doc = "* titleID Title ID to retrieve the count for (high-id is 0x0004008C)."] +#[doc = "Gets the number of content index installed under the specified DLC title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `count` - Pointer to output the number of content indices to. [Direction: In, Out]"] +#[doc = "* `mediatype` - Media type of the title."] +#[doc = "* `titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] + pub fn AMAPP_GetDLCContentInfoCount( count: *mut u32_, mediatype: FS_MediaType, @@ -8189,13 +11278,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets content infos installed under the specified DLC title."] - #[doc = "* contentInfoRead Pointer to output the number of content infos read to."] - #[doc = "* mediatype Media type of the title."] - #[doc = "* titleID Title ID to retrieve the content infos for (high-id is 0x0004008C)."] - #[doc = "* contentInfoCount Number of content infos to retrieve."] - #[doc = "* offset Offset from the first content index the count starts at."] - #[doc = "* contentInfos Pointer to output the content infos read to."] +#[doc = "Gets content infos installed under the specified DLC title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `contentInfoRead` - Pointer to output the number of content infos read to. [Direction: In, Out]"] +#[doc = "* `mediatype` - Media type of the title."] +#[doc = "* `titleID` - Title ID to retrieve the content infos for (high-id is 0x0004008C)."] +#[doc = "* `contentInfoCount` - Number of content infos to retrieve."] +#[doc = "* `offset` - Offset from the first content index the count starts at."] +#[doc = "* `contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] + pub fn AMAPP_ListDLCContentInfos( contentInfoRead: *mut u32_, mediatype: FS_MediaType, @@ -8207,23 +11300,33 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes AMPXI."] - #[doc = "* servhandle Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] +#[doc = "Initializes AMPXI."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] + pub fn ampxiInit(servhandle: Handle) -> Result; } extern "C" { - #[doc = "Exits AMPXI."] +#[doc = "Exits AMPXI."] +#[doc = ""] + pub fn ampxiExit(); } extern "C" { #[must_use] - #[doc = "Writes a TWL save-file to NAND. https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] - #[doc = "* titleid ID of the TWL title."] - #[doc = "* buffer Savedata buffer ptr."] - #[doc = "* size Size of the savedata buffer."] - #[doc = "* image_filepos Filepos to use for writing the data to the NAND savedata file."] - #[doc = "* section_type https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] - #[doc = "* operation https://3dbrew.org/wiki/AM:ImportDSiWare"] +#[doc = "Writes a TWL save-file to NAND. https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleid` - ID of the TWL title."] +#[doc = "* `buffer` - Savedata buffer ptr."] +#[doc = "* `size` - Size of the savedata buffer."] +#[doc = "* `image_filepos` - Filepos to use for writing the data to the NAND savedata file."] +#[doc = "* `section_type` - https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] +#[doc = "* `operation` - https://3dbrew.org/wiki/AM:ImportDSiWare"] + pub fn AMPXI_WriteTWLSavedata( titleid: u64_, buffer: *mut u8_, @@ -8235,12 +11338,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Finalizes title installation. https://3dbrew.org/wiki/AMPXI:InstallTitlesFinish"] - #[doc = "* mediaType Mediatype of the titles to finalize."] - #[doc = "* db Which title database to use."] - #[doc = "* size Size of the savedata buffer."] - #[doc = "* titlecount Total titles."] - #[doc = "* tidlist List of titleIDs."] +#[doc = "Finalizes title installation. https://3dbrew.org/wiki/AMPXI:InstallTitlesFinish"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Mediatype of the titles to finalize."] +#[doc = "* `db` - Which title database to use."] +#[doc = "* `size` - Size of the savedata buffer."] +#[doc = "* `titlecount` - Total titles."] +#[doc = "* `tidlist` - List of titleIDs."] + pub fn AMPXI_InstallTitlesFinish( mediaType: FS_MediaType, db: u8_, @@ -8250,134 +11357,259 @@ extern "C" { } pub const APPID_NONE: NS_APPID = 0; #[doc = "Home Menu"] +#[doc = ""] + pub const APPID_HOMEMENU: NS_APPID = 257; #[doc = "Camera applet"] +#[doc = ""] + pub const APPID_CAMERA: NS_APPID = 272; #[doc = "Friends List applet"] +#[doc = ""] + pub const APPID_FRIENDS_LIST: NS_APPID = 274; #[doc = "Game Notes applet"] +#[doc = ""] + pub const APPID_GAME_NOTES: NS_APPID = 275; #[doc = "Internet Browser"] +#[doc = ""] + pub const APPID_WEB: NS_APPID = 276; #[doc = "Instruction Manual applet"] +#[doc = ""] + pub const APPID_INSTRUCTION_MANUAL: NS_APPID = 277; #[doc = "Notifications applet"] +#[doc = ""] + pub const APPID_NOTIFICATIONS: NS_APPID = 278; #[doc = "Miiverse applet (olv)"] +#[doc = ""] + pub const APPID_MIIVERSE: NS_APPID = 279; #[doc = "Miiverse posting applet (solv3)"] +#[doc = ""] + pub const APPID_MIIVERSE_POSTING: NS_APPID = 280; #[doc = "Amiibo settings applet (cabinet)"] +#[doc = ""] + pub const APPID_AMIIBO_SETTINGS: NS_APPID = 281; #[doc = "Application"] +#[doc = ""] + pub const APPID_APPLICATION: NS_APPID = 768; #[doc = "eShop (tiger)"] +#[doc = ""] + pub const APPID_ESHOP: NS_APPID = 769; #[doc = "Software Keyboard"] +#[doc = ""] + pub const APPID_SOFTWARE_KEYBOARD: NS_APPID = 1025; #[doc = "appletEd"] +#[doc = ""] + pub const APPID_APPLETED: NS_APPID = 1026; #[doc = "PNOTE_AP"] +#[doc = ""] + pub const APPID_PNOTE_AP: NS_APPID = 1028; #[doc = "SNOTE_AP"] +#[doc = ""] + pub const APPID_SNOTE_AP: NS_APPID = 1029; #[doc = "error"] +#[doc = ""] + pub const APPID_ERROR: NS_APPID = 1030; #[doc = "mint"] +#[doc = ""] + pub const APPID_MINT: NS_APPID = 1031; #[doc = "extrapad"] +#[doc = ""] + pub const APPID_EXTRAPAD: NS_APPID = 1032; #[doc = "memolib"] +#[doc = ""] + pub const APPID_MEMOLIB: NS_APPID = 1033; #[doc = "NS Application IDs."] #[doc = ""] +#[doc = ""] #[doc = "Retrieved from http://3dbrew.org/wiki/NS_and_APT_Services#AppIDs"] +#[doc = ""] + pub type NS_APPID = ::libc::c_uint; #[doc = "No position specified."] +#[doc = ""] + pub const APTPOS_NONE: APT_AppletPos = -1; #[doc = "Application."] +#[doc = ""] + pub const APTPOS_APP: APT_AppletPos = 0; #[doc = "Application library (?)."] +#[doc = ""] + pub const APTPOS_APPLIB: APT_AppletPos = 1; #[doc = "System applet."] +#[doc = ""] + pub const APTPOS_SYS: APT_AppletPos = 2; #[doc = "System library (?)."] +#[doc = ""] + pub const APTPOS_SYSLIB: APT_AppletPos = 3; #[doc = "Resident applet."] +#[doc = ""] + pub const APTPOS_RESIDENT: APT_AppletPos = 4; #[doc = "APT applet position."] +#[doc = ""] + 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; #[doc = "APT query reply."] +#[doc = ""] + pub type APT_QueryReply = ::libc::c_uint; #[doc = "No signal received."] +#[doc = ""] + pub const APTSIGNAL_NONE: APT_Signal = 0; #[doc = "HOME button pressed."] +#[doc = ""] + pub const APTSIGNAL_HOMEBUTTON: APT_Signal = 1; #[doc = "HOME button pressed (again?)."] +#[doc = ""] + pub const APTSIGNAL_HOMEBUTTON2: APT_Signal = 2; #[doc = "Prepare to enter sleep mode."] +#[doc = ""] + pub const APTSIGNAL_SLEEP_QUERY: APT_Signal = 3; #[doc = "Triggered when ptm:s GetShellStatus() returns 5."] +#[doc = ""] + pub const APTSIGNAL_SLEEP_CANCEL: APT_Signal = 4; #[doc = "Enter sleep mode."] +#[doc = ""] + pub const APTSIGNAL_SLEEP_ENTER: APT_Signal = 5; #[doc = "Wake from sleep mode."] +#[doc = ""] + pub const APTSIGNAL_SLEEP_WAKEUP: APT_Signal = 6; #[doc = "Shutdown."] +#[doc = ""] + pub const APTSIGNAL_SHUTDOWN: APT_Signal = 7; #[doc = "POWER button pressed."] +#[doc = ""] + pub const APTSIGNAL_POWERBUTTON: APT_Signal = 8; #[doc = "POWER button cleared (?)."] +#[doc = ""] + pub const APTSIGNAL_POWERBUTTON2: APT_Signal = 9; #[doc = "System sleeping (?)."] +#[doc = ""] + pub const APTSIGNAL_TRY_SLEEP: APT_Signal = 10; #[doc = "Order to close (such as when an error happens?)."] +#[doc = ""] + pub const APTSIGNAL_ORDERTOCLOSE: APT_Signal = 11; #[doc = "APT signals."] +#[doc = ""] + pub type APT_Signal = ::libc::c_uint; #[doc = "No command received."] +#[doc = ""] + pub const APTCMD_NONE: APT_Command = 0; #[doc = "Applet should wake up."] +#[doc = ""] + pub const APTCMD_WAKEUP: APT_Command = 1; #[doc = "Source applet sent us a parameter."] +#[doc = ""] + pub const APTCMD_REQUEST: APT_Command = 2; #[doc = "Target applet replied to our parameter."] +#[doc = ""] + pub const APTCMD_RESPONSE: APT_Command = 3; #[doc = "Exit (??)"] +#[doc = ""] + pub const APTCMD_EXIT: APT_Command = 4; #[doc = "Message (??)"] +#[doc = ""] + pub const APTCMD_MESSAGE: APT_Command = 5; #[doc = "HOME button pressed once."] +#[doc = ""] + pub const APTCMD_HOMEBUTTON_ONCE: APT_Command = 6; #[doc = "HOME button pressed twice (double-pressed)."] +#[doc = ""] + pub const APTCMD_HOMEBUTTON_TWICE: APT_Command = 7; #[doc = "DSP should sleep (manual DSP rights related?)."] +#[doc = ""] + pub const APTCMD_DSP_SLEEP: APT_Command = 8; #[doc = "DSP should wake up (manual DSP rights related?)."] +#[doc = ""] + pub const APTCMD_DSP_WAKEUP: APT_Command = 9; #[doc = "Applet wakes up due to a different applet exiting."] +#[doc = ""] + pub const APTCMD_WAKEUP_EXIT: APT_Command = 10; #[doc = "Applet wakes up after being paused through HOME menu."] +#[doc = ""] + pub const APTCMD_WAKEUP_PAUSE: APT_Command = 11; #[doc = "Applet wakes up due to being cancelled."] +#[doc = ""] + pub const APTCMD_WAKEUP_CANCEL: APT_Command = 12; #[doc = "Applet wakes up due to all applets being cancelled."] +#[doc = ""] + pub const APTCMD_WAKEUP_CANCELALL: APT_Command = 13; #[doc = "Applet wakes up due to POWER button being pressed (?)."] +#[doc = ""] + pub const APTCMD_WAKEUP_POWERBUTTON: APT_Command = 14; #[doc = "Applet wakes up and is instructed to jump to HOME menu (?)."] +#[doc = ""] + pub const APTCMD_WAKEUP_JUMPTOHOME: APT_Command = 15; #[doc = "Request for sysapplet (?)."] +#[doc = ""] + pub const APTCMD_SYSAPPLET_REQUEST: APT_Command = 16; #[doc = "Applet wakes up and is instructed to launch another applet (?)."] +#[doc = ""] + pub const APTCMD_WAKEUP_LAUNCHAPP: APT_Command = 17; #[doc = "APT commands."] +#[doc = ""] + pub type APT_Command = ::libc::c_uint; #[doc = "APT capture buffer information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct aptCaptureBufInfo { @@ -8394,31 +11626,55 @@ pub struct aptCaptureBufInfo__bindgen_ty_1 { pub format: u32_, } #[doc = "App suspended."] +#[doc = ""] + pub const APTHOOK_ONSUSPEND: APT_HookType = 0; #[doc = "App restored."] +#[doc = ""] + pub const APTHOOK_ONRESTORE: APT_HookType = 1; #[doc = "App sleeping."] +#[doc = ""] + pub const APTHOOK_ONSLEEP: APT_HookType = 2; #[doc = "App waking up."] +#[doc = ""] + pub const APTHOOK_ONWAKEUP: APT_HookType = 3; #[doc = "App exiting."] +#[doc = ""] + pub const APTHOOK_ONEXIT: APT_HookType = 4; #[doc = "Number of APT hook types."] +#[doc = ""] + pub const APTHOOK_COUNT: APT_HookType = 5; #[doc = "APT hook types."] +#[doc = ""] + pub type APT_HookType = ::libc::c_uint; #[doc = "APT hook function."] +#[doc = ""] + pub type aptHookFn = ::core::option::Option; #[doc = "APT hook cookie."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_aptHookCookie { - #[doc = "Next cookie."] +#[doc = "Next cookie."] +#[doc = ""] + pub next: *mut tag_aptHookCookie, - #[doc = "Hook callback."] +#[doc = "Hook callback."] +#[doc = ""] + pub callback: aptHookFn, - #[doc = "Callback parameter."] +#[doc = "Callback parameter."] +#[doc = ""] + pub param: *mut ::libc::c_void, } impl Default for tag_aptHookCookie { @@ -8431,8 +11687,12 @@ impl Default for tag_aptHookCookie { } } #[doc = "APT hook cookie."] +#[doc = ""] + pub type aptHookCookie = tag_aptHookCookie; #[doc = "APT message callback."] +#[doc = ""] + pub type aptMessageCb = ::core::option::Option< unsafe extern "C" fn( user: *mut ::libc::c_void, @@ -8443,88 +11703,135 @@ pub type aptMessageCb = ::core::option::Option< >; extern "C" { #[must_use] - #[doc = "Initializes APT."] +#[doc = "Initializes APT."] +#[doc = ""] + pub fn aptInit() -> Result; } extern "C" { - #[doc = "Exits APT."] +#[doc = "Exits APT."] +#[doc = ""] + pub fn aptExit(); } extern "C" { #[must_use] - #[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] - #[doc = "* aptcmdbuf Pointer to command buffer (should have capacity for at least 16 words)."] +#[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] + pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result; } extern "C" { - #[doc = "Returns true if the application is currently in the foreground."] - pub fn aptIsActive() -> bool; +#[doc = "Returns true if the application is currently in the foreground."] +#[doc = ""] + + pub fn aptIsActive() -> bool; } extern "C" { - #[doc = "Returns true if the system has told the application to close."] +#[doc = "Returns true if the system has told the application to close."] +#[doc = ""] + pub fn aptShouldClose() -> bool; } extern "C" { - #[doc = "Returns true if the system can enter sleep mode while the application is active."] +#[doc = "Returns true if the system can enter sleep mode while the application is active."] +#[doc = ""] + pub fn aptIsSleepAllowed() -> bool; } extern "C" { - #[doc = "Configures whether the system can enter sleep mode while the application is active."] +#[doc = "Configures whether the system can enter sleep mode while the application is active."] +#[doc = ""] + pub fn aptSetSleepAllowed(allowed: bool); } extern "C" { - #[doc = "Handles incoming sleep mode requests."] +#[doc = "Handles incoming sleep mode requests."] +#[doc = ""] + pub fn aptHandleSleep(); } extern "C" { - #[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] +#[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] +#[doc = ""] + pub fn aptIsHomeAllowed() -> bool; } extern "C" { - #[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] +#[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] +#[doc = ""] + pub fn aptSetHomeAllowed(allowed: bool); } extern "C" { - #[doc = "Returns true if the system requires the application to jump back to the HOME menu."] +#[doc = "Returns true if the system requires the application to jump back to the HOME menu."] +#[doc = ""] + pub fn aptShouldJumpToHome() -> bool; } extern "C" { - #[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by \\ref aptSetHomeAllowed (use this to show a \"no HOME allowed\" icon)."] +#[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by \\ref aptSetHomeAllowed (use this to show a \"no HOME allowed\" icon)."] +#[doc = ""] + pub fn aptCheckHomePressRejected() -> bool; } extern "C" { - #[doc = "Jumps back to the HOME menu."] +#[doc = "Jumps back to the HOME menu."] +#[doc = ""] + pub fn aptJumpToHomeMenu(); } extern "C" { - #[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] - #[doc = "true if the application should keep running, false otherwise (see \\ref aptShouldClose)."] +#[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] +#[doc = ""] +#[doc = "Returns: True if the application should keep running, false otherwise (see \\ref aptShouldClose)."] +#[doc = ""] + pub fn aptMainLoop() -> bool; } extern "C" { - #[doc = "Sets up an APT status hook."] - #[doc = "* cookie Hook cookie to use."] - #[doc = "* callback Function to call when APT's status changes."] - #[doc = "* param User-defined parameter to pass to the callback."] +#[doc = "Sets up an APT status hook."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cookie` - Hook cookie to use."] +#[doc = "* `callback` - Function to call when APT's status changes."] +#[doc = "* `param` - User-defined parameter to pass to the callback."] + pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut ::libc::c_void); } extern "C" { - #[doc = "Removes an APT status hook."] - #[doc = "* cookie Hook cookie to remove."] +#[doc = "Removes an APT status hook."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cookie` - Hook cookie to remove."] + pub fn aptUnhook(cookie: *mut aptHookCookie); } extern "C" { - #[doc = "Sets the function to be called when an APT message from another applet is received."] - #[doc = "* callback Callback function."] - #[doc = "* user User-defined data to be passed to the callback."] +#[doc = "Sets the function to be called when an APT message from another applet is received."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `callback` - Callback function."] +#[doc = "* `user` - User-defined data to be passed to the callback."] + pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut ::libc::c_void); } extern "C" { - #[doc = "Launches a library applet."] - #[doc = "* appId ID of the applet to launch."] - #[doc = "* buf Input/output buffer that contains launch parameters on entry and result data on exit."] - #[doc = "* bufsize Size of the buffer."] - #[doc = "* handle Handle to pass to the library applet."] +#[doc = "Launches a library applet."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appId` - ID of the applet to launch."] +#[doc = "* `buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] +#[doc = "* `bufsize` - Size of the buffer."] +#[doc = "* `handle` - Handle to pass to the library applet."] + pub fn aptLaunchLibraryApplet( appId: NS_APPID, buf: *mut ::libc::c_void, @@ -8533,33 +11840,49 @@ extern "C" { ); } extern "C" { - #[doc = "Clears the chainloader state."] +#[doc = "Clears the chainloader state."] +#[doc = ""] + pub fn aptClearChainloader(); } extern "C" { - #[doc = "Configures the chainloader to launch a specific application."] - #[doc = "* programID ID of the program to chainload to."] - #[doc = "* mediatype Media type of the program to chainload to."] +#[doc = "Configures the chainloader to launch a specific application."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programID` - ID of the program to chainload to."] +#[doc = "* `mediatype` - Media type of the program to chainload to."] + pub fn aptSetChainloader(programID: u64_, mediatype: u8_); } extern "C" { - #[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] +#[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] +#[doc = ""] + pub fn aptSetChainloaderToSelf(); } extern "C" { #[must_use] - #[doc = "Gets an APT lock handle."] - #[doc = "* flags Flags to use."] - #[doc = "* lockHandle Pointer to output the lock handle to."] +#[doc = "Gets an APT lock handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flags` - Flags to use."] +#[doc = "* `lockHandle` - Pointer to output the lock handle to."] + pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes an application's registration with APT."] - #[doc = "* appId ID of the application."] - #[doc = "* attr Attributes of the application."] - #[doc = "* signalEvent Pointer to output the signal event handle to."] - #[doc = "* resumeEvent Pointer to output the resume event handle to."] +#[doc = "Initializes an application's registration with APT."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appId` - ID of the application."] +#[doc = "* `attr` - Attributes of the application."] +#[doc = "* `signalEvent` - Pointer to output the signal event handle to."] +#[doc = "* `resumeEvent` - Pointer to output the resume event handle to."] + pub fn APT_Initialize( appId: NS_APPID, attr: APT_AppletAttr, @@ -8569,29 +11892,43 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Terminates an application's registration with APT."] - #[doc = "* appID ID of the application."] +#[doc = "Terminates an application's registration with APT."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - ID of the application."] + pub fn APT_Finalize(appId: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Asynchronously resets the hardware."] +#[doc = "Asynchronously resets the hardware."] +#[doc = ""] + pub fn APT_HardwareResetAsync() -> Result; } extern "C" { #[must_use] - #[doc = "Enables APT."] - #[doc = "* attr Attributes of the application."] +#[doc = "Enables APT."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `attr` - Attributes of the application."] + pub fn APT_Enable(attr: APT_AppletAttr) -> Result; } extern "C" { #[must_use] - #[doc = "Gets applet management info."] - #[doc = "* inpos Requested applet position."] - #[doc = "* outpos Pointer to output the position of the current applet to."] - #[doc = "* req_appid Pointer to output the AppID of the applet at the requested position to."] - #[doc = "* menu_appid Pointer to output the HOME menu AppID to."] - #[doc = "* active_appid Pointer to output the AppID of the currently active applet to."] +#[doc = "Gets applet management info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inpos` - Requested applet position."] +#[doc = "* `outpos` - Pointer to output the position of the current applet to."] +#[doc = "* `req_appid` - Pointer to output the AppID of the applet at the requested position to."] +#[doc = "* `menu_appid` - Pointer to output the HOME menu AppID to."] +#[doc = "* `active_appid` - Pointer to output the AppID of the currently active applet to."] + pub fn APT_GetAppletManInfo( inpos: APT_AppletPos, outpos: *mut APT_AppletPos, @@ -8602,13 +11939,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an applet's information."] - #[doc = "* appID AppID of the applet."] - #[doc = "* pProgramID Pointer to output the program ID to."] - #[doc = "* pMediaType Pointer to output the media type to."] - #[doc = "* pRegistered Pointer to output the registration status to."] - #[doc = "* pLoadState Pointer to output the load state to."] - #[doc = "* pAttributes Pointer to output the applet atrributes to."] +#[doc = "Gets an applet's information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - AppID of the applet."] +#[doc = "* `pProgramID` - Pointer to output the program ID to."] +#[doc = "* `pMediaType` - Pointer to output the media type to."] +#[doc = "* `pRegistered` - Pointer to output the registration status to."] +#[doc = "* `pLoadState` - Pointer to output the load state to."] +#[doc = "* `pAttributes` - Pointer to output the applet atrributes to."] + pub fn APT_GetAppletInfo( appID: NS_APPID, pProgramID: *mut u64_, @@ -8620,37 +11961,52 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an applet's program information."] - #[doc = "* id ID of the applet."] - #[doc = "* flags Flags to use when retreiving the information."] - #[doc = "* titleversion Pointer to output the applet's title version to."] - #[doc = ""] - #[doc = "Flags:"] - #[doc = "- 0x01: Use AM_ListTitles with NAND media type."] - #[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] - #[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] - #[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] - #[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] - #[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] +#[doc = "Gets an applet's program information."] +#[doc = ""] +#[doc = ""] +#[doc = "Flags:"] +#[doc = "- 0x01: Use AM_ListTitles with NAND media type."] +#[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] +#[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] +#[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] +#[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] +#[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the applet."] +#[doc = "* `flags` - Flags to use when retreiving the information."] +#[doc = "* `titleversion` - Pointer to output the applet's title version to."] + pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current application's program ID."] - #[doc = "* pProgramID Pointer to output the program ID to."] +#[doc = "Gets the current application's program ID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pProgramID` - Pointer to output the program ID to."] + pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares to jump to the home menu."] +#[doc = "Prepares to jump to the home menu."] +#[doc = ""] + pub fn APT_PrepareToJumpToHomeMenu() -> Result; } extern "C" { #[must_use] - #[doc = "Jumps to the home menu."] - #[doc = "* param Parameters to jump with."] - #[doc = "* Size of the parameter buffer."] - #[doc = "* handle Handle to pass."] +#[doc = "Jumps to the home menu."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `param` - Parameters to jump with."] +#[doc = "* `Size` - of the parameter buffer."] +#[doc = "* `handle` - Handle to pass."] + pub fn APT_JumpToHomeMenu( param: *const ::libc::c_void, paramSize: size_t, @@ -8659,16 +12015,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Prepares to jump to an application."] - #[doc = "* exiting Specifies whether the applet is exiting."] +#[doc = "Prepares to jump to an application."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `exiting` - Specifies whether the applet is exiting."] + pub fn APT_PrepareToJumpToApplication(exiting: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Jumps to an application."] - #[doc = "* param Parameters to jump with."] - #[doc = "* Size of the parameter buffer."] - #[doc = "* handle Handle to pass."] +#[doc = "Jumps to an application."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `param` - Parameters to jump with."] +#[doc = "* `Size` - of the parameter buffer."] +#[doc = "* `handle` - Handle to pass."] + pub fn APT_JumpToApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -8677,39 +12041,60 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets whether an application is registered."] - #[doc = "* appID ID of the application."] - #[doc = "* out Pointer to output the registration state to."] +#[doc = "Gets whether an application is registered."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - ID of the application."] +#[doc = "* `out` - Pointer to output the registration state to."] + pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Inquires as to whether a signal has been received."] - #[doc = "* appID ID of the application."] - #[doc = "* signalType Pointer to output the signal type to."] +#[doc = "Inquires as to whether a signal has been received."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - ID of the application."] +#[doc = "* `signalType` - Pointer to output the signal type to."] + pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result; } extern "C" { #[must_use] - #[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] - #[doc = "* wakeEvents The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] - #[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] +#[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] +#[doc = ""] +#[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] + pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result; } extern "C" { #[must_use] - #[doc = "Notifies an application to wait."] - #[doc = "* appID ID of the application."] +#[doc = "Notifies an application to wait."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - ID of the application."] + pub fn APT_NotifyToWait(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Calls an applet utility function."] - #[doc = "* id Utility function to call."] - #[doc = "* out Pointer to write output data to."] - #[doc = "* outSize Size of the output buffer."] - #[doc = "* in Pointer to the input data."] - #[doc = "* inSize Size of the input buffer."] +#[doc = "Calls an applet utility function."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - Utility function to call."] +#[doc = "* `out` - Pointer to write output data to."] +#[doc = "* `outSize` - Size of the output buffer."] +#[doc = "* `in` - Pointer to the input data."] +#[doc = "* `inSize` - Size of the input buffer."] + pub fn APT_AppletUtility( id: ::libc::c_int, out: *mut ::libc::c_void, @@ -8720,39 +12105,57 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sleeps if shell is closed (?)."] +#[doc = "Sleeps if shell is closed (?)."] +#[doc = ""] + pub fn APT_SleepIfShellClosed() -> Result; } extern "C" { #[must_use] - #[doc = "Locks a transition (?)."] - #[doc = "* transition Transition ID."] - #[doc = "* flag Flag (?)"] +#[doc = "Locks a transition (?)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `transition` - Transition ID."] +#[doc = "* `flag` - Flag (?)"] + pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Tries to lock a transition (?)."] - #[doc = "* transition Transition ID."] - #[doc = "* succeeded Pointer to output whether the lock was successfully applied."] +#[doc = "Tries to lock a transition (?)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `transition` - Transition ID."] +#[doc = "* `succeeded` - Pointer to output whether the lock was successfully applied."] + pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Unlocks a transition (?)."] - #[doc = "* transition Transition ID."] +#[doc = "Unlocks a transition (?)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `transition` - Transition ID."] + pub fn APT_UnlockTransition(transition: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Glances at a receieved parameter without removing it from the queue."] - #[doc = "* appID AppID of the application."] - #[doc = "* buffer Buffer to receive to."] - #[doc = "* bufferSize Size of the buffer."] - #[doc = "* sender Pointer to output the sender's AppID to."] - #[doc = "* command Pointer to output the command ID to."] - #[doc = "* actualSize Pointer to output the actual received data size to."] - #[doc = "* parameter Pointer to output the parameter handle to."] +#[doc = "Glances at a receieved parameter without removing it from the queue."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - AppID of the application."] +#[doc = "* `buffer` - Buffer to receive to."] +#[doc = "* `bufferSize` - Size of the buffer."] +#[doc = "* `sender` - Pointer to output the sender's AppID to."] +#[doc = "* `command` - Pointer to output the command ID to."] +#[doc = "* `actualSize` - Pointer to output the actual received data size to."] +#[doc = "* `parameter` - Pointer to output the parameter handle to."] + pub fn APT_GlanceParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -8765,14 +12168,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Receives a parameter."] - #[doc = "* appID AppID of the application."] - #[doc = "* buffer Buffer to receive to."] - #[doc = "* bufferSize Size of the buffer."] - #[doc = "* sender Pointer to output the sender's AppID to."] - #[doc = "* command Pointer to output the command ID to."] - #[doc = "* actualSize Pointer to output the actual received data size to."] - #[doc = "* parameter Pointer to output the parameter handle to."] +#[doc = "Receives a parameter."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - AppID of the application."] +#[doc = "* `buffer` - Buffer to receive to."] +#[doc = "* `bufferSize` - Size of the buffer."] +#[doc = "* `sender` - Pointer to output the sender's AppID to."] +#[doc = "* `command` - Pointer to output the command ID to."] +#[doc = "* `actualSize` - Pointer to output the actual received data size to."] +#[doc = "* `parameter` - Pointer to output the parameter handle to."] + pub fn APT_ReceiveParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -8785,13 +12192,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends a parameter."] - #[doc = "* source AppID of the source application."] - #[doc = "* dest AppID of the destination application."] - #[doc = "* command Command to send."] - #[doc = "* buffer Buffer to send."] - #[doc = "* bufferSize Size of the buffer."] - #[doc = "* parameter Parameter handle to pass."] +#[doc = "Sends a parameter."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `source` - AppID of the source application."] +#[doc = "* `dest` - AppID of the destination application."] +#[doc = "* `command` - Command to send."] +#[doc = "* `buffer` - Buffer to send."] +#[doc = "* `bufferSize` - Size of the buffer."] +#[doc = "* `parameter` - Parameter handle to pass."] + pub fn APT_SendParameter( source: NS_APPID, dest: NS_APPID, @@ -8803,43 +12214,67 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] - #[doc = "* source AppID of the source application (use APPID_NONE to disable the check)."] - #[doc = "* dest AppID of the destination application (use APPID_NONE to disable the check)."] - #[doc = "* success Pointer to output true if a parameter was cancelled, or false otherwise."] +#[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `source` - AppID of the source application (use APPID_NONE to disable the check)."] +#[doc = "* `dest` - AppID of the destination application (use APPID_NONE to disable the check)."] +#[doc = "* `success` - Pointer to output true if a parameter was cancelled, or false otherwise."] + pub fn APT_CancelParameter(source: NS_APPID, dest: NS_APPID, success: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sends capture buffer information."] - #[doc = "* captureBuf Capture buffer information to send."] +#[doc = "Sends capture buffer information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `captureBuf` - Capture buffer information to send."] + pub fn APT_SendCaptureBufferInfo(captureBuf: *const aptCaptureBufInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Replies to a sleep query."] - #[doc = "* appID ID of the application."] - #[doc = "* reply Query reply value."] +#[doc = "Replies to a sleep query."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - ID of the application."] +#[doc = "* `reply` - Query reply value."] + pub fn APT_ReplySleepQuery(appID: NS_APPID, reply: APT_QueryReply) -> Result; } extern "C" { #[must_use] - #[doc = "Replies that a sleep notification has been completed."] - #[doc = "* appID ID of the application."] +#[doc = "Replies that a sleep notification has been completed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - ID of the application."] + pub fn APT_ReplySleepNotificationComplete(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares to close the application."] - #[doc = "* cancelPreload Whether applet preloads should be cancelled."] +#[doc = "Prepares to close the application."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cancelPreload` - Whether applet preloads should be cancelled."] + pub fn APT_PrepareToCloseApplication(cancelPreload: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Closes the application."] - #[doc = "* param Parameters to close with."] - #[doc = "* paramSize Size of param."] - #[doc = "* handle Handle to pass."] +#[doc = "Closes the application."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `param` - Parameters to close with."] +#[doc = "* `paramSize` - Size of param."] +#[doc = "* `handle` - Handle to pass."] + pub fn APT_CloseApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -8848,36 +12283,56 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the application's CPU time limit."] - #[doc = "* percent CPU time limit percentage to set."] +#[doc = "Sets the application's CPU time limit."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `percent` - CPU time limit percentage to set."] + pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the application's CPU time limit."] - #[doc = "* percent Pointer to output the CPU time limit percentage to."] +#[doc = "Gets the application's CPU time limit."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `percent` - Pointer to output the CPU time limit percentage to."] + pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks whether the system is a New 3DS."] - #[doc = "* out Pointer to write the New 3DS flag to."] +#[doc = "Checks whether the system is a New 3DS."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the New 3DS flag to."] + pub fn APT_CheckNew3DS(out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares for an applicaton jump."] - #[doc = "* flags Flags to use."] - #[doc = "* programID ID of the program to jump to."] - #[doc = "* mediatype Media type of the program to jump to."] +#[doc = "Prepares for an applicaton jump."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flags` - Flags to use."] +#[doc = "* `programID` - ID of the program to jump to."] +#[doc = "* `mediatype` - Media type of the program to jump to."] + pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Performs an application jump."] - #[doc = "* param Parameter buffer."] - #[doc = "* paramSize Size of parameter buffer."] - #[doc = "* hmac HMAC buffer (should be 0x20 bytes long)."] +#[doc = "Performs an application jump."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `param` - Parameter buffer."] +#[doc = "* `paramSize` - Size of parameter buffer."] +#[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] + pub fn APT_DoApplicationJump( param: *const ::libc::c_void, paramSize: size_t, @@ -8886,17 +12341,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Prepares to start a library applet."] - #[doc = "* appID AppID of the applet to start."] +#[doc = "Prepares to start a library applet."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - AppID of the applet to start."] + pub fn APT_PrepareToStartLibraryApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Starts a library applet."] - #[doc = "* appID AppID of the applet to launch."] - #[doc = "* param Buffer containing applet parameters."] - #[doc = "* paramsize Size of the buffer."] - #[doc = "* handle Handle to pass to the applet."] +#[doc = "Starts a library applet."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - AppID of the applet to launch."] +#[doc = "* `param` - Buffer containing applet parameters."] +#[doc = "* `paramsize` - Size of the buffer."] +#[doc = "* `handle` - Handle to pass to the applet."] + pub fn APT_StartLibraryApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -8906,17 +12369,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Prepares to start a system applet."] - #[doc = "* appID AppID of the applet to start."] +#[doc = "Prepares to start a system applet."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - AppID of the applet to start."] + pub fn APT_PrepareToStartSystemApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Starts a system applet."] - #[doc = "* appID AppID of the applet to launch."] - #[doc = "* param Buffer containing applet parameters."] - #[doc = "* paramSize Size of the parameter buffer."] - #[doc = "* handle Handle to pass to the applet."] +#[doc = "Starts a system applet."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appID` - AppID of the applet to launch."] +#[doc = "* `param` - Buffer containing applet parameters."] +#[doc = "* `paramSize` - Size of the parameter buffer."] +#[doc = "* `handle` - Handle to pass to the applet."] + pub fn APT_StartSystemApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -8926,19 +12397,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Retrieves the shared system font."] - #[doc = "fontHandle Pointer to write the handle of the system font memory block to."] - #[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] +#[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] +#[doc = ""] + pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Receives the deliver (launch) argument"] - #[doc = "* param Parameter buffer."] - #[doc = "* paramSize Size of parameter buffer."] - #[doc = "* hmac HMAC buffer (should be 0x20 bytes long)."] - #[doc = "* sender Pointer to output the sender's AppID to."] - #[doc = "* received Pointer to output whether an argument was received to."] +#[doc = "Receives the deliver (launch) argument"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `param` - Parameter buffer."] +#[doc = "* `paramSize` - Size of parameter buffer."] +#[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] +#[doc = "* `sender` - Pointer to output the sender's AppID to."] +#[doc = "* `received` - Pointer to output whether an argument was received to."] + pub fn APT_ReceiveDeliverArg( param: *const ::libc::c_void, paramSize: size_t, @@ -8948,6 +12423,8 @@ extern "C" { ) -> Result; } #[doc = "BOSS context."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bossContext { @@ -8982,76 +12459,116 @@ impl Default for bossContext { pub const BOSSTASKSTATUS_STARTED: bossTaskStatus = 2; pub const BOSSTASKSTATUS_ERROR: bossTaskStatus = 7; #[doc = "BOSS task status."] +#[doc = ""] + pub type bossTaskStatus = ::libc::c_uint; pub const bossNsDataHeaderInfoType_ContentSize: bossNsDataHeaderInfoTypes = 3; #[doc = "Type values for bossGetNsDataHeaderInfo()."] +#[doc = ""] + pub type bossNsDataHeaderInfoTypes = ::libc::c_uint; pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSizes = 4; #[doc = "Size of the output data for bossGetNsDataHeaderInfo()."] +#[doc = ""] + pub type bossNsDataHeaderInfoTypeSizes = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes BOSS."] - #[doc = "* programID programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] - #[doc = "* force_user When true, just use bossU instead of trying to initialize with bossP first."] +#[doc = "Initializes BOSS."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] +#[doc = "* `force_user` - When true, just use bossU instead of trying to initialize with bossP first."] + pub fn bossInit(programID: u64_, force_user: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] - #[doc = "* programID programID to use, 0 for the current process."] +#[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programID` - programID to use, 0 for the current process."] + pub fn bossReinit(programID: u64_) -> Result; } extern "C" { - #[doc = "Exits BOSS."] +#[doc = "Exits BOSS."] +#[doc = ""] + pub fn bossExit(); } extern "C" { - #[doc = "Returns the BOSS session handle."] +#[doc = "Returns the BOSS session handle."] +#[doc = ""] + pub fn bossGetSessionHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Set the content data storage location."] - #[doc = "* extdataID u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] - #[doc = "* boss_size Probably the max size in the extdata which BOSS can use."] - #[doc = "* mediaType Roughly the same as FS mediatype."] +#[doc = "Set the content data storage location."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] +#[doc = "* `boss_size` - Probably the max size in the extdata which BOSS can use."] +#[doc = "* `mediaType` - Roughly the same as FS mediatype."] + pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] +#[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] +#[doc = ""] + pub fn bossUnregisterStorage() -> Result; } extern "C" { #[must_use] - #[doc = "Register a task."] - #[doc = "* taskID BOSS taskID."] - #[doc = "* unk0 Unknown, usually zero."] - #[doc = "* unk1 Unknown, usually zero."] +#[doc = "Register a task."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `taskID` - BOSS taskID."] +#[doc = "* `unk0` - Unknown, usually zero."] +#[doc = "* `unk1` - Unknown, usually zero."] + pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Send a property."] - #[doc = "* PropertyID PropertyID"] - #[doc = "* buf Input buffer data."] - #[doc = "* size Buffer size."] +#[doc = "Send a property."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `PropertyID` - PropertyID"] +#[doc = "* `buf` - Input buffer data."] +#[doc = "* `size` - Buffer size."] + pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the content file for the specified NsDataId."] - #[doc = "* NsDataId NsDataId"] +#[doc = "Deletes the content file for the specified NsDataId."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `NsDataId` - NsDataId"] + pub fn bossDeleteNsData(NsDataId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets header info for the specified NsDataId."] - #[doc = "* NsDataId NsDataId"] - #[doc = "* type Type of data to load."] - #[doc = "* buffer Output buffer."] - #[doc = "* size Output buffer size."] +#[doc = "Gets header info for the specified NsDataId."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `NsDataId` - NsDataId"] +#[doc = "* `type` - Type of data to load."] +#[doc = "* `buffer` - Output buffer."] +#[doc = "* `size` - Output buffer size."] + pub fn bossGetNsDataHeaderInfo( NsDataId: u32_, type_: u8_, @@ -9061,13 +12578,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads data from the content for the specified NsDataId."] - #[doc = "* NsDataId NsDataId"] - #[doc = "* offset Offset in the content."] - #[doc = "* buffer Output buffer."] - #[doc = "* size Output buffer size."] - #[doc = "* transfer_total Optional output actual read size, can be NULL."] - #[doc = "* unk_out Optional unknown output, can be NULL."] +#[doc = "Reads data from the content for the specified NsDataId."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `NsDataId` - NsDataId"] +#[doc = "* `offset` - Offset in the content."] +#[doc = "* `buffer` - Output buffer."] +#[doc = "* `size` - Output buffer size."] +#[doc = "* `transfer_total` - Optional output actual read size, can be NULL."] +#[doc = "* `unk_out` - Optional unknown output, can be NULL."] + pub fn bossReadNsData( NsDataId: u32_, offset: u64_, @@ -9079,31 +12600,47 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Starts a task soon after running this command."] - #[doc = "* taskID BOSS taskID."] +#[doc = "Starts a task soon after running this command."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `taskID` - BOSS taskID."] + pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Similar to bossStartTaskImmediate?"] - #[doc = "* taskID BOSS taskID."] +#[doc = "Similar to bossStartTaskImmediate?"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `taskID` - BOSS taskID."] + pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] - #[doc = "* taskID BOSS taskID."] - #[doc = "* unk Unknown, usually zero?"] +#[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `taskID` - BOSS taskID."] +#[doc = "* `unk` - Unknown, usually zero?"] + pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns task state."] - #[doc = "* taskID BOSS taskID."] - #[doc = "* inval Unknown, normally 0?"] - #[doc = "* status Output status, see bossTaskStatus."] - #[doc = "* out1 Output field."] - #[doc = "* out2 Output field."] +#[doc = "Returns task state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `taskID` - BOSS taskID."] +#[doc = "* `inval` - Unknown, normally 0?"] +#[doc = "* `status` - Output status, see bossTaskStatus."] +#[doc = "* `out1` - Output field."] +#[doc = "* `out2` - Output field."] + pub fn bossGetTaskState( taskID: *const ::libc::c_char, inval: s8, @@ -9114,15 +12651,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This loads the current state of PropertyID 0x0 for the specified task."] - #[doc = "* taskID BOSS taskID."] +#[doc = "This loads the current state of PropertyID 0x0 for the specified task."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `taskID` - BOSS taskID."] + pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result; } extern "C" { - #[doc = "Setup a BOSS context with the default config."] - #[doc = "* bossContext BOSS context."] - #[doc = "* seconds_interval Interval in seconds for running the task automatically."] - #[doc = "* url Task URL."] +#[doc = "Setup a BOSS context with the default config."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bossContext` - BOSS context."] +#[doc = "* `seconds_interval` - Interval in seconds for running the task automatically."] +#[doc = "* `url` - Task URL."] + pub fn bossSetupContextDefault( ctx: *mut bossContext, seconds_interval: u32_, @@ -9131,116 +12676,200 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends the config stored in the context. Used before registering a task."] - #[doc = "* bossContext BOSS context."] +#[doc = "Sends the config stored in the context. Used before registering a task."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bossContext` - BOSS context."] + pub fn bossSendContextConfig(ctx: *mut bossContext) -> Result; } #[doc = "8-bit per component, planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P."] +#[doc = ""] + pub const INPUT_YUV422_INDIV_8: Y2RU_InputFormat = 0; #[doc = "8-bit per component, planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples).\\n Usually named YUV420P."] +#[doc = ""] + pub const INPUT_YUV420_INDIV_8: Y2RU_InputFormat = 1; #[doc = "16-bit per component, planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P16."] +#[doc = ""] + pub const INPUT_YUV422_INDIV_16: Y2RU_InputFormat = 2; #[doc = "16-bit per component, planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples).\\n Usually named YUV420P16."] +#[doc = ""] + pub const INPUT_YUV420_INDIV_16: Y2RU_InputFormat = 3; #[doc = "8-bit per component, packed YUV 4:2:2, 16bpp, (Y0 Cb Y1 Cr).\\n Usually named YUYV422."] +#[doc = ""] + pub const INPUT_YUV422_BATCH: Y2RU_InputFormat = 4; #[doc = "Input color formats"] #[doc = ""] +#[doc = ""] #[doc = "For the 16-bit per component formats, bits 15-8 are padding and 7-0 contains the value."] +#[doc = ""] + pub type Y2RU_InputFormat = ::libc::c_uint; -#[doc = "32-bit RGBA8888. The alpha component is the 8-bit value set by Y2RU_SetAlpha"] +#[doc = "32-bit RGBA8888. The alpha component is the 8-bit value set by @ref Y2RU_SetAlpha"] +#[doc = ""] + pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0; #[doc = "24-bit RGB888."] +#[doc = ""] + pub const OUTPUT_RGB_24: Y2RU_OutputFormat = 1; -#[doc = "16-bit RGBA5551. The alpha bit is the 7th bit of the alpha value set by Y2RU_SetAlpha"] +#[doc = "16-bit RGBA5551. The alpha bit is the 7th bit of the alpha value set by @ref Y2RU_SetAlpha"] +#[doc = ""] + pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2; #[doc = "16-bit RGB565."] +#[doc = ""] + pub const OUTPUT_RGB_16_565: Y2RU_OutputFormat = 3; #[doc = "Output color formats"] #[doc = ""] +#[doc = ""] #[doc = "Those are the same as the framebuffer and GPU texture formats."] +#[doc = ""] + pub type Y2RU_OutputFormat = ::libc::c_uint; #[doc = "No rotation."] +#[doc = ""] + pub const ROTATION_NONE: Y2RU_Rotation = 0; #[doc = "Clockwise 90 degrees."] +#[doc = ""] + pub const ROTATION_CLOCKWISE_90: Y2RU_Rotation = 1; #[doc = "Clockwise 180 degrees."] -pub const ROTATION_CLOCKWISE_180: Y2RU_Rotation = 2; +#[doc = ""] + +pub const ROTATION_CLOCKWISE_180: Y2RU_Rotation = 2; #[doc = "Clockwise 270 degrees."] +#[doc = ""] + pub const ROTATION_CLOCKWISE_270: Y2RU_Rotation = 3; #[doc = "Rotation to be applied to the output."] +#[doc = ""] + pub type Y2RU_Rotation = ::libc::c_uint; #[doc = "The result buffer will be laid out in linear format, the usual way."] +#[doc = ""] + pub const BLOCK_LINE: Y2RU_BlockAlignment = 0; #[doc = "The result will be stored as 8x8 blocks in Z-order.\\n Useful for textures since it is the format used by the PICA200."] +#[doc = ""] + pub const BLOCK_8_BY_8: Y2RU_BlockAlignment = 1; #[doc = "Block alignment of output"] #[doc = ""] +#[doc = ""] #[doc = "Defines the way the output will be laid out in memory."] +#[doc = ""] + pub type Y2RU_BlockAlignment = ::libc::c_uint; #[doc = "Coefficients of the YUV->RGB conversion formula."] #[doc = ""] +#[doc = ""] #[doc = "A set of coefficients configuring the RGB to YUV conversion. Coefficients 0-4 are unsigned 2.8"] #[doc = "fixed pointer numbers representing entries on the conversion matrix, while coefficient 5-7 are"] #[doc = "signed 11.5 fixed point numbers added as offsets to the RGB result."] #[doc = ""] #[doc = "The overall conversion process formula is:"] -#[doc = "@code"] #[doc = "R = trunc((rgb_Y * Y + r_V * V) + 0.75 + r_offset)"] #[doc = "G = trunc((rgb_Y * Y - g_U * U - g_V * V) + 0.75 + g_offset)"] #[doc = "B = trunc((rgb_Y * Y + b_U * U ) + 0.75 + b_offset)"] -#[doc = "@endcode"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_ColorCoefficients { - #[doc = "RGB per unit Y."] +#[doc = "RGB per unit Y."] +#[doc = ""] + pub rgb_Y: u16_, - #[doc = "Red per unit V."] +#[doc = "Red per unit V."] +#[doc = ""] + pub r_V: u16_, - #[doc = "Green per unit V."] +#[doc = "Green per unit V."] +#[doc = ""] + pub g_V: u16_, - #[doc = "Green per unit U."] +#[doc = "Green per unit U."] +#[doc = ""] + pub g_U: u16_, - #[doc = "Blue per unit U."] +#[doc = "Blue per unit U."] +#[doc = ""] + pub b_U: u16_, - #[doc = "Red offset."] +#[doc = "Red offset."] +#[doc = ""] + pub r_offset: u16_, - #[doc = "Green offset."] +#[doc = "Green offset."] +#[doc = ""] + pub g_offset: u16_, - #[doc = "Blue offset."] +#[doc = "Blue offset."] +#[doc = ""] + pub b_offset: u16_, } #[doc = "Coefficients from the ITU-R BT.601 standard with PC ranges."] +#[doc = ""] + pub const COEFFICIENT_ITU_R_BT_601: Y2RU_StandardCoefficient = 0; #[doc = "Coefficients from the ITU-R BT.709 standard with PC ranges."] +#[doc = ""] + pub const COEFFICIENT_ITU_R_BT_709: Y2RU_StandardCoefficient = 1; #[doc = "Coefficients from the ITU-R BT.601 standard with TV ranges."] +#[doc = ""] + pub const COEFFICIENT_ITU_R_BT_601_SCALING: Y2RU_StandardCoefficient = 2; #[doc = "Coefficients from the ITU-R BT.709 standard with TV ranges."] +#[doc = ""] + pub const COEFFICIENT_ITU_R_BT_709_SCALING: Y2RU_StandardCoefficient = 3; #[doc = "Preset conversion coefficients based on ITU standards for the YUV->RGB formula."] #[doc = ""] -#[doc = "For more details refer to Y2RU_ColorCoefficients"] +#[doc = ""] +#[doc = "For more details refer to @ref Y2RU_ColorCoefficients"] +#[doc = ""] + pub type Y2RU_StandardCoefficient = ::libc::c_uint; #[doc = "Structure used to configure all parameters at once."] #[doc = ""] -#[doc = "You can send a batch of configuration parameters using this structure and Y2RU_SetConversionParams."] +#[doc = ""] +#[doc = "You can send a batch of configuration parameters using this structure and @ref Y2RU_SetConversionParams."] +#[doc = ""] + #[repr(C)] #[repr(align(4))] #[derive(Debug, Copy, Clone)] pub struct Y2RU_ConversionParams { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - #[doc = "Value passed to Y2RU_SetInputLineWidth"] +#[doc = "Value passed to @ref Y2RU_SetInputLineWidth"] +#[doc = ""] + pub input_line_width: s16, - #[doc = "Value passed to Y2RU_SetInputLines"] +#[doc = "Value passed to @ref Y2RU_SetInputLines"] +#[doc = ""] + pub input_lines: s16, pub _bitfield_align_2: [u8; 0], pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Unused."] +#[doc = "Unused."] +#[doc = ""] + pub unused: u8_, - #[doc = "Value passed to Y2RU_SetAlpha"] +#[doc = "Value passed to @ref Y2RU_SetAlpha"] +#[doc = ""] + pub alpha: u16_, } impl Default for Y2RU_ConversionParams { @@ -9347,199 +12976,319 @@ impl Y2RU_ConversionParams { } } #[doc = "Dithering weights."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_DitheringWeightParams { - #[doc = "Weight 0 for even X, even Y."] +#[doc = "Weight 0 for even X, even Y."] +#[doc = ""] + pub w0_xEven_yEven: u16_, - #[doc = "Weight 0 for odd X, even Y."] +#[doc = "Weight 0 for odd X, even Y."] +#[doc = ""] + pub w0_xOdd_yEven: u16_, - #[doc = "Weight 0 for even X, odd Y."] +#[doc = "Weight 0 for even X, odd Y."] +#[doc = ""] + pub w0_xEven_yOdd: u16_, - #[doc = "Weight 0 for odd X, odd Y."] +#[doc = "Weight 0 for odd X, odd Y."] +#[doc = ""] + pub w0_xOdd_yOdd: u16_, - #[doc = "Weight 1 for even X, even Y."] +#[doc = "Weight 1 for even X, even Y."] +#[doc = ""] + pub w1_xEven_yEven: u16_, - #[doc = "Weight 1 for odd X, even Y."] +#[doc = "Weight 1 for odd X, even Y."] +#[doc = ""] + pub w1_xOdd_yEven: u16_, - #[doc = "Weight 1 for even X, odd Y."] +#[doc = "Weight 1 for even X, odd Y."] +#[doc = ""] + pub w1_xEven_yOdd: u16_, - #[doc = "Weight 1 for odd X, odd Y."] +#[doc = "Weight 1 for odd X, odd Y."] +#[doc = ""] + pub w1_xOdd_yOdd: u16_, - #[doc = "Weight 2 for even X, even Y."] +#[doc = "Weight 2 for even X, even Y."] +#[doc = ""] + pub w2_xEven_yEven: u16_, - #[doc = "Weight 2 for odd X, even Y."] +#[doc = "Weight 2 for odd X, even Y."] +#[doc = ""] + pub w2_xOdd_yEven: u16_, - #[doc = "Weight 2 for even X, odd Y."] +#[doc = "Weight 2 for even X, odd Y."] +#[doc = ""] + pub w2_xEven_yOdd: u16_, - #[doc = "Weight 2 for odd X, odd Y."] +#[doc = "Weight 2 for odd X, odd Y."] +#[doc = ""] + pub w2_xOdd_yOdd: u16_, - #[doc = "Weight 3 for even X, even Y."] +#[doc = "Weight 3 for even X, even Y."] +#[doc = ""] + pub w3_xEven_yEven: u16_, - #[doc = "Weight 3 for odd X, even Y."] +#[doc = "Weight 3 for odd X, even Y."] +#[doc = ""] + pub w3_xOdd_yEven: u16_, - #[doc = "Weight 3 for even X, odd Y."] +#[doc = "Weight 3 for even X, odd Y."] +#[doc = ""] + pub w3_xEven_yOdd: u16_, - #[doc = "Weight 3 for odd X, odd Y."] +#[doc = "Weight 3 for odd X, odd Y."] +#[doc = ""] + pub w3_xOdd_yOdd: u16_, } extern "C" { #[must_use] - #[doc = "Initializes the y2r service."] - #[doc = ""] - #[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] +#[doc = "Initializes the y2r service."] +#[doc = ""] +#[doc = ""] +#[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] +#[doc = ""] + pub fn y2rInit() -> Result; } extern "C" { - #[doc = "Closes the y2r service."] - #[doc = ""] - #[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] +#[doc = "Closes the y2r service."] +#[doc = ""] +#[doc = ""] +#[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] +#[doc = ""] + pub fn y2rExit(); } extern "C" { #[must_use] - #[doc = "Used to configure the input format."] - #[doc = "* format Input format to use."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the input format."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `format` - Input format to use."] + pub fn Y2RU_SetInputFormat(format: Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured input format."] - #[doc = "* format Pointer to output the input format to."] +#[doc = "Gets the configured input format."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `format` - Pointer to output the input format to."] + pub fn Y2RU_GetInputFormat(format: *mut Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the output format."] - #[doc = "* format Output format to use."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the output format."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `format` - Output format to use."] + pub fn Y2RU_SetOutputFormat(format: Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured output format."] - #[doc = "* format Pointer to output the output format to."] +#[doc = "Gets the configured output format."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `format` - Pointer to output the output format to."] + pub fn Y2RU_GetOutputFormat(format: *mut Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the rotation of the output."] - #[doc = "* rotation Rotation to use."] - #[doc = ""] - #[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the rotation of the output."] +#[doc = ""] +#[doc = ""] +#[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `rotation` - Rotation to use."] + pub fn Y2RU_SetRotation(rotation: Y2RU_Rotation) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured rotation."] - #[doc = "* rotation Pointer to output the rotation to."] +#[doc = "Gets the configured rotation."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `rotation` - Pointer to output the rotation to."] + pub fn Y2RU_GetRotation(rotation: *mut Y2RU_Rotation) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the alignment of the output buffer."] - #[doc = "* alignment Alignment to use."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the alignment of the output buffer."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `alignment` - Alignment to use."] + pub fn Y2RU_SetBlockAlignment(alignment: Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured alignment."] - #[doc = "* alignment Pointer to output the alignment to."] +#[doc = "Gets the configured alignment."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `alignment` - Pointer to output the alignment to."] + pub fn Y2RU_GetBlockAlignment(alignment: *mut Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to use spacial dithering."] - #[doc = "* enable Whether to use spacial dithering."] +#[doc = "Sets whether to use spacial dithering."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Whether to use spacial dithering."] + pub fn Y2RU_SetSpacialDithering(enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether to use spacial dithering."] - #[doc = "* enable Pointer to output the spacial dithering state to."] +#[doc = "Gets whether to use spacial dithering."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Pointer to output the spacial dithering state to."] + pub fn Y2RU_GetSpacialDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to use temporal dithering."] - #[doc = "* enable Whether to use temporal dithering."] +#[doc = "Sets whether to use temporal dithering."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Whether to use temporal dithering."] + pub fn Y2RU_SetTemporalDithering(enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether to use temporal dithering."] - #[doc = "* enable Pointer to output the temporal dithering state to."] +#[doc = "Gets whether to use temporal dithering."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Pointer to output the temporal dithering state to."] + pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the width of the image."] - #[doc = "* line_width Width of the image in pixels. Must be a multiple of 8, up to 1024."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the width of the image."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] + pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured input line width."] - #[doc = "* line_width Pointer to output the line width to."] +#[doc = "Gets the configured input line width."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `line_width` - Pointer to output the line width to."] + pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the height of the image."] - #[doc = "* num_lines Number of lines to be converted."] - #[doc = ""] - #[doc = "A multiple of 8 seems to be preferred."] - #[doc = "If using the BLOCK_8_BY_8 mode, it must be a multiple of 8."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the height of the image."] +#[doc = ""] +#[doc = ""] +#[doc = "A multiple of 8 seems to be preferred."] +#[doc = "If using the @ref BLOCK_8_BY_8 mode, it must be a multiple of 8."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `num_lines` - Number of lines to be converted."] + pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured number of input lines."] - #[doc = "* num_lines Pointer to output the input lines to."] +#[doc = "Gets the configured number of input lines."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `num_lines` - Pointer to output the input lines to."] + pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the color conversion formula."] - #[doc = "* coefficients Coefficients to use."] - #[doc = ""] - #[doc = "See Y2RU_ColorCoefficients for more information about the coefficients."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the color conversion formula."] +#[doc = ""] +#[doc = ""] +#[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `coefficients` - Coefficients to use."] + pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured color coefficients."] - #[doc = "* num_lines Pointer to output the coefficients to."] +#[doc = "Gets the configured color coefficients."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `num_lines` - Pointer to output the coefficients to."] + pub fn Y2RU_GetCoefficients(coefficients: *mut Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] - #[doc = "* coefficient Standard coefficient to use."] - #[doc = ""] - #[doc = "See Y2RU_ColorCoefficients for more information about the coefficients."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] +#[doc = ""] +#[doc = ""] +#[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `coefficient` - Standard coefficient to use."] + pub fn Y2RU_SetStandardCoefficient(coefficient: Y2RU_StandardCoefficient) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the color coefficient parameters of a standard coefficient."] - #[doc = "* coefficients Pointer to output the coefficients to."] - #[doc = "* standardCoeff Standard coefficient to check."] +#[doc = "Gets the color coefficient parameters of a standard coefficient."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `coefficients` - Pointer to output the coefficients to."] +#[doc = "* `standardCoeff` - Standard coefficient to check."] + pub fn Y2RU_GetStandardCoefficient( coefficients: *mut Y2RU_ColorCoefficients, standardCoeff: Y2RU_StandardCoefficient, @@ -9547,59 +13296,83 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Used to configure the alpha value of the output."] - #[doc = "* alpha 8-bit value to be used for the output when the format requires it."] - #[doc = ""] - #[doc = "Prefer using Y2RU_SetConversionParams if you have to set multiple parameters."] +#[doc = "Used to configure the alpha value of the output."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `alpha` - 8-bit value to be used for the output when the format requires it."] + pub fn Y2RU_SetAlpha(alpha: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured output alpha value."] - #[doc = "* alpha Pointer to output the alpha value to."] +#[doc = "Gets the configured output alpha value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `alpha` - Pointer to output the alpha value to."] + pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Used to enable the end of conversion interrupt."] - #[doc = "* should_interrupt Enables the interrupt if true, disable it if false."] - #[doc = ""] - #[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] - #[doc = "This interrupt will then be used to fire an event. See Y2RU_GetTransferEndEvent."] - #[doc = "By default the interrupt is enabled."] - #[doc = ""] - #[doc = "It seems that the event can be fired too soon in some cases, depending the transfer_unit size.\\n Please see the note at Y2RU_SetReceiving"] +#[doc = "Used to enable the end of conversion interrupt."] +#[doc = ""] +#[doc = ""] +#[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] +#[doc = "This interrupt will then be used to fire an event. See @ref Y2RU_GetTransferEndEvent."] +#[doc = "By default the interrupt is enabled."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `should_interrupt` - Enables the interrupt if true, disable it if false."] + pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the transfer end interrupt is enabled."] - #[doc = "* should_interrupt Pointer to output the interrupt state to."] +#[doc = "Gets whether the transfer end interrupt is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `should_interrupt` - Pointer to output the interrupt state to."] + pub fn Y2RU_GetTransferEndInterrupt(should_interrupt: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an handle to the end of conversion event."] - #[doc = "* end_event Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] - #[doc = ""] - #[doc = "To enable this event you have to use @code{C} Y2RU_SetTransferEndInterrupt(true);@endcode"] - #[doc = "The event will be triggered when the corresponding interrupt is fired."] - #[doc = ""] - #[doc = "It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."] +#[doc = "Gets an handle to the end of conversion event."] +#[doc = ""] +#[doc = ""] +#[doc = "To enable this event you have to use @code{C} Y2RU_SetTransferEndInterrupt(true);@endcode"] +#[doc = "The event will be triggered when the corresponding interrupt is fired."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] + pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Configures the Y plane buffer."] - #[doc = "* src_buf A pointer to the beginning of your Y data buffer."] - #[doc = "* image_size The total size of the data buffer."] - #[doc = "* transfer_unit Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* transfer_gap Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] - #[doc = "@warning transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling Y2RU_StartConversion."] +#[doc = "Configures the Y plane buffer."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] +#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "* `image_size` - The total size of the data buffer."] +#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + pub fn Y2RU_SetSendingY( src_buf: *const ::libc::c_void, image_size: u32_, @@ -9609,16 +13382,20 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the U plane buffer."] - #[doc = "* src_buf A pointer to the beginning of your Y data buffer."] - #[doc = "* image_size The total size of the data buffer."] - #[doc = "* transfer_unit Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* transfer_gap Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] - #[doc = "@warning transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling Y2RU_StartConversion."] +#[doc = "Configures the U plane buffer."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] +#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "* `image_size` - The total size of the data buffer."] +#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + pub fn Y2RU_SetSendingU( src_buf: *const ::libc::c_void, image_size: u32_, @@ -9628,16 +13405,20 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the V plane buffer."] - #[doc = "* src_buf A pointer to the beginning of your Y data buffer."] - #[doc = "* image_size The total size of the data buffer."] - #[doc = "* transfer_unit Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* transfer_gap Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] - #[doc = "@warning transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling Y2RU_StartConversion."] +#[doc = "Configures the V plane buffer."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] +#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "* `image_size` - The total size of the data buffer."] +#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + pub fn Y2RU_SetSendingV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -9647,16 +13428,20 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the YUYV source buffer."] - #[doc = "* src_buf A pointer to the beginning of your Y data buffer."] - #[doc = "* image_size The total size of the data buffer."] - #[doc = "* transfer_unit Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* transfer_gap Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] - #[doc = "@warning transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "This specifies the YUYV data buffer for the packed input format INPUT_YUV422_BATCH."] - #[doc = "The actual transfer will only happen after calling Y2RU_StartConversion."] +#[doc = "Configures the YUYV source buffer."] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "This specifies the YUYV data buffer for the packed input format @ref INPUT_YUV422_BATCH."] +#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "* `image_size` - The total size of the data buffer."] +#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + pub fn Y2RU_SetSendingYUYV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -9666,24 +13451,26 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the destination buffer."] - #[doc = "* src_buf A pointer to the beginning of your destination buffer in FCRAM"] - #[doc = "* image_size The total size of the data buffer."] - #[doc = "* transfer_unit Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* transfer_gap Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] - #[doc = "This specifies the destination buffer of the conversion."] - #[doc = "The actual transfer will only happen after calling Y2RU_StartConversion."] - #[doc = "The buffer does NOT need to be allocated in the linear heap."] - #[doc = ""] - #[doc = "@warning transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = ""] - #[doc = " It seems that depending on the size of the image and of the transfer unit,\\n"] - #[doc = " it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] - #[doc = " One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] - #[doc = ""] - #[doc = "Setting a transfer_unit of 4 or 8 lines seems to bring the best results in terms of speed for a 400x240 image."] +#[doc = "Configures the destination buffer."] +#[doc = ""] +#[doc = ""] +#[doc = "This specifies the destination buffer of the conversion."] +#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] +#[doc = "The buffer does NOT need to be allocated in the linear heap."] +#[doc = ""] +#[doc = ""] +#[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] +#[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] +#[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `src_buf` - A pointer to the beginning of your destination buffer in FCRAM"] +#[doc = "* `image_size` - The total size of the data buffer."] +#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + pub fn Y2RU_SetReceiving( dst_buf: *mut ::libc::c_void, image_size: u32_, @@ -9693,205 +13480,368 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the Y buffer."] - #[doc = "* is_done Pointer to the boolean that will hold the result."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with Y2RU_SetSendingY."] +#[doc = "Checks if the DMA has finished sending the Y buffer."] +#[doc = ""] +#[doc = ""] +#[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with @ref Y2RU_SetSendingY."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + pub fn Y2RU_IsDoneSendingY(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the U buffer."] - #[doc = "* is_done Pointer to the boolean that will hold the result."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with Y2RU_SetSendingU."] +#[doc = "Checks if the DMA has finished sending the U buffer."] +#[doc = ""] +#[doc = ""] +#[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with @ref Y2RU_SetSendingU."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + pub fn Y2RU_IsDoneSendingU(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the V buffer."] - #[doc = "* is_done Pointer to the boolean that will hold the result."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with Y2RU_SetSendingV."] +#[doc = "Checks if the DMA has finished sending the V buffer."] +#[doc = ""] +#[doc = ""] +#[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with @ref Y2RU_SetSendingV."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + pub fn Y2RU_IsDoneSendingV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the YUYV buffer."] - #[doc = "* is_done Pointer to the boolean that will hold the result."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with Y2RU_SetSendingYUYV."] +#[doc = "Checks if the DMA has finished sending the YUYV buffer."] +#[doc = ""] +#[doc = ""] +#[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with @ref Y2RU_SetSendingYUYV."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + pub fn Y2RU_IsDoneSendingYUYV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the converted result."] - #[doc = "* is_done Pointer to the boolean that will hold the result."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] - pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result; -} -extern "C" { - #[must_use] - #[doc = "Configures the dithering weight parameters."] - #[doc = "* params Dithering weight parameters to use."] +#[doc = "Checks if the DMA has finished sending the converted result."] +#[doc = ""] +#[doc = ""] +#[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + + pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result; +} +extern "C" { + #[must_use] +#[doc = "Configures the dithering weight parameters."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `params` - Dithering weight parameters to use."] + pub fn Y2RU_SetDitheringWeightParams(params: *const Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured dithering weight parameters."] - #[doc = "* params Pointer to output the dithering weight parameters to."] +#[doc = "Gets the configured dithering weight parameters."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `params` - Pointer to output the dithering weight parameters to."] + pub fn Y2RU_GetDitheringWeightParams(params: *mut Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] - #[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] - #[doc = "* params Conversion parameters to set."] - #[doc = ""] - #[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] +#[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] +#[doc = ""] +#[doc = ""] +#[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `params` - Conversion parameters to set."] + pub fn Y2RU_SetConversionParams(params: *const Y2RU_ConversionParams) -> Result; } extern "C" { #[must_use] - #[doc = "Starts the conversion process"] +#[doc = "Starts the conversion process"] +#[doc = ""] + pub fn Y2RU_StartConversion() -> Result; } extern "C" { #[must_use] - #[doc = "Cancels the conversion"] +#[doc = "Cancels the conversion"] +#[doc = ""] + pub fn Y2RU_StopConversion() -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the conversion and DMA transfer are finished."] - #[doc = "* is_busy Pointer to output the busy state to."] - #[doc = ""] - #[doc = "This can have the same problems as the event and interrupt. See Y2RU_SetTransferEndInterrupt."] +#[doc = "Checks if the conversion and DMA transfer are finished."] +#[doc = ""] +#[doc = ""] +#[doc = "This can have the same problems as the event and interrupt. See @ref Y2RU_SetTransferEndInterrupt."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `is_busy` - Pointer to output the busy state to."] + pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks whether Y2R is ready to be used."] - #[doc = "* ping Pointer to output the ready status to."] +#[doc = "Checks whether Y2R is ready to be used."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ping` - Pointer to output the ready status to."] + pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the Y2R driver."] +#[doc = "Initializes the Y2R driver."] +#[doc = ""] + pub fn Y2RU_DriverInitialize() -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the Y2R driver."] +#[doc = "Terminates the Y2R driver."] +#[doc = ""] + pub fn Y2RU_DriverFinalize() -> Result; } #[doc = "No port."] +#[doc = ""] + pub const PORT_NONE: _bindgen_ty_15 = 0; #[doc = "CAM1 port."] +#[doc = ""] + pub const PORT_CAM1: _bindgen_ty_15 = 1; #[doc = "CAM2 port."] +#[doc = ""] + pub const PORT_CAM2: _bindgen_ty_15 = 2; #[doc = "Both ports."] +#[doc = ""] + pub const PORT_BOTH: _bindgen_ty_15 = 3; #[doc = "Camera connection target ports."] +#[doc = ""] + pub type _bindgen_ty_15 = ::libc::c_uint; #[doc = "No camera."] +#[doc = ""] + pub const SELECT_NONE: _bindgen_ty_16 = 0; #[doc = "Outer camera 1."] +#[doc = ""] + pub const SELECT_OUT1: _bindgen_ty_16 = 1; #[doc = "Inner camera 1."] +#[doc = ""] + pub const SELECT_IN1: _bindgen_ty_16 = 2; #[doc = "Outer camera 2."] +#[doc = ""] + pub const SELECT_OUT2: _bindgen_ty_16 = 4; #[doc = "Outer camera 1 and inner camera 1."] +#[doc = ""] + pub const SELECT_IN1_OUT1: _bindgen_ty_16 = 3; #[doc = "Both outer cameras."] +#[doc = ""] + pub const SELECT_OUT1_OUT2: _bindgen_ty_16 = 5; #[doc = "Inner camera 1 and outer camera 2."] +#[doc = ""] + pub const SELECT_IN1_OUT2: _bindgen_ty_16 = 6; #[doc = "All cameras."] +#[doc = ""] + pub const SELECT_ALL: _bindgen_ty_16 = 7; #[doc = "Camera combinations."] +#[doc = ""] + pub type _bindgen_ty_16 = ::libc::c_uint; #[doc = "No context."] +#[doc = ""] + pub const CONTEXT_NONE: CAMU_Context = 0; #[doc = "Context A."] +#[doc = ""] + pub const CONTEXT_A: CAMU_Context = 1; #[doc = "Context B."] +#[doc = ""] + pub const CONTEXT_B: CAMU_Context = 2; #[doc = "Both contexts."] +#[doc = ""] + pub const CONTEXT_BOTH: CAMU_Context = 3; #[doc = "Camera contexts."] +#[doc = ""] + pub type CAMU_Context = ::libc::c_uint; #[doc = "No flip."] +#[doc = ""] + pub const FLIP_NONE: CAMU_Flip = 0; #[doc = "Horizontal flip."] +#[doc = ""] + pub const FLIP_HORIZONTAL: CAMU_Flip = 1; #[doc = "Vertical flip."] +#[doc = ""] + pub const FLIP_VERTICAL: CAMU_Flip = 2; #[doc = "Reverse flip."] +#[doc = ""] + pub const FLIP_REVERSE: CAMU_Flip = 3; #[doc = "Ways to flip the camera image."] +#[doc = ""] + pub type CAMU_Flip = ::libc::c_uint; #[doc = "VGA size. (640x480)"] +#[doc = ""] + pub const SIZE_VGA: CAMU_Size = 0; #[doc = "QVGA size. (320x240)"] +#[doc = ""] + pub const SIZE_QVGA: CAMU_Size = 1; #[doc = "QQVGA size. (160x120)"] +#[doc = ""] + pub const SIZE_QQVGA: CAMU_Size = 2; #[doc = "CIF size. (352x288)"] +#[doc = ""] + pub const SIZE_CIF: CAMU_Size = 3; #[doc = "QCIF size. (176x144)"] +#[doc = ""] + pub const SIZE_QCIF: CAMU_Size = 4; #[doc = "DS LCD size. (256x192)"] +#[doc = ""] + pub const SIZE_DS_LCD: CAMU_Size = 5; #[doc = "DS LCD x4 size. (512x384)"] +#[doc = ""] + pub const SIZE_DS_LCDx4: CAMU_Size = 6; #[doc = "CTR Top LCD size. (400x240)"] +#[doc = ""] + pub const SIZE_CTR_TOP_LCD: CAMU_Size = 7; #[doc = "CTR Bottom LCD size. (320x240)"] +#[doc = ""] + pub const SIZE_CTR_BOTTOM_LCD: CAMU_Size = 1; #[doc = "Camera image resolutions."] +#[doc = ""] + pub type CAMU_Size = ::libc::c_uint; #[doc = "15 FPS."] +#[doc = ""] + pub const FRAME_RATE_15: CAMU_FrameRate = 0; #[doc = "15-5 FPS."] +#[doc = ""] + pub const FRAME_RATE_15_TO_5: CAMU_FrameRate = 1; #[doc = "15-2 FPS."] +#[doc = ""] + pub const FRAME_RATE_15_TO_2: CAMU_FrameRate = 2; #[doc = "10 FPS."] +#[doc = ""] + pub const FRAME_RATE_10: CAMU_FrameRate = 3; #[doc = "8.5 FPS."] +#[doc = ""] + pub const FRAME_RATE_8_5: CAMU_FrameRate = 4; #[doc = "5 FPS."] +#[doc = ""] + pub const FRAME_RATE_5: CAMU_FrameRate = 5; #[doc = "20 FPS."] +#[doc = ""] + pub const FRAME_RATE_20: CAMU_FrameRate = 6; #[doc = "20-5 FPS."] +#[doc = ""] + pub const FRAME_RATE_20_TO_5: CAMU_FrameRate = 7; #[doc = "30 FPS."] +#[doc = ""] + pub const FRAME_RATE_30: CAMU_FrameRate = 8; #[doc = "30-5 FPS."] +#[doc = ""] + pub const FRAME_RATE_30_TO_5: CAMU_FrameRate = 9; #[doc = "15-10 FPS."] +#[doc = ""] + pub const FRAME_RATE_15_TO_10: CAMU_FrameRate = 10; #[doc = "20-10 FPS."] +#[doc = ""] + pub const FRAME_RATE_20_TO_10: CAMU_FrameRate = 11; #[doc = "30-10 FPS."] +#[doc = ""] + pub const FRAME_RATE_30_TO_10: CAMU_FrameRate = 12; #[doc = "Camera capture frame rates."] +#[doc = ""] + pub type CAMU_FrameRate = ::libc::c_uint; #[doc = "Auto white balance."] +#[doc = ""] + pub const WHITE_BALANCE_AUTO: CAMU_WhiteBalance = 0; #[doc = "3200K white balance."] +#[doc = ""] + pub const WHITE_BALANCE_3200K: CAMU_WhiteBalance = 1; #[doc = "4150K white balance."] +#[doc = ""] + pub const WHITE_BALANCE_4150K: CAMU_WhiteBalance = 2; #[doc = "5200K white balance."] +#[doc = ""] + pub const WHITE_BALANCE_5200K: CAMU_WhiteBalance = 3; #[doc = "6000K white balance."] +#[doc = ""] + pub const WHITE_BALANCE_6000K: CAMU_WhiteBalance = 4; #[doc = "7000K white balance."] +#[doc = ""] + pub const WHITE_BALANCE_7000K: CAMU_WhiteBalance = 5; pub const WHITE_BALANCE_NORMAL: CAMU_WhiteBalance = 0; pub const WHITE_BALANCE_TUNGSTEN: CAMU_WhiteBalance = 1; @@ -9901,298 +13851,550 @@ pub const WHITE_BALANCE_CLOUDY: CAMU_WhiteBalance = 4; pub const WHITE_BALANCE_HORIZON: CAMU_WhiteBalance = 4; pub const WHITE_BALANCE_SHADE: CAMU_WhiteBalance = 5; #[doc = "Camera white balance modes."] +#[doc = ""] + pub type CAMU_WhiteBalance = ::libc::c_uint; #[doc = "Normal mode."] +#[doc = ""] + pub const PHOTO_MODE_NORMAL: CAMU_PhotoMode = 0; #[doc = "Portrait mode."] +#[doc = ""] + pub const PHOTO_MODE_PORTRAIT: CAMU_PhotoMode = 1; #[doc = "Landscape mode."] +#[doc = ""] + pub const PHOTO_MODE_LANDSCAPE: CAMU_PhotoMode = 2; #[doc = "Night mode."] +#[doc = ""] + pub const PHOTO_MODE_NIGHTVIEW: CAMU_PhotoMode = 3; #[doc = "Letter mode."] +#[doc = ""] + pub const PHOTO_MODE_LETTER: CAMU_PhotoMode = 4; #[doc = "Camera photo modes."] +#[doc = ""] + pub type CAMU_PhotoMode = ::libc::c_uint; #[doc = "No effects."] +#[doc = ""] + pub const EFFECT_NONE: CAMU_Effect = 0; #[doc = "Mono effect."] +#[doc = ""] + pub const EFFECT_MONO: CAMU_Effect = 1; #[doc = "Sepia effect."] +#[doc = ""] + pub const EFFECT_SEPIA: CAMU_Effect = 2; #[doc = "Negative effect."] +#[doc = ""] + pub const EFFECT_NEGATIVE: CAMU_Effect = 3; #[doc = "Negative film effect."] +#[doc = ""] + pub const EFFECT_NEGAFILM: CAMU_Effect = 4; #[doc = "Sepia effect."] +#[doc = ""] + pub const EFFECT_SEPIA01: CAMU_Effect = 5; #[doc = "Camera special effects."] +#[doc = ""] + pub type CAMU_Effect = ::libc::c_uint; #[doc = "Pattern 1."] +#[doc = ""] + pub const CONTRAST_PATTERN_01: CAMU_Contrast = 0; #[doc = "Pattern 2."] +#[doc = ""] + pub const CONTRAST_PATTERN_02: CAMU_Contrast = 1; #[doc = "Pattern 3."] +#[doc = ""] + pub const CONTRAST_PATTERN_03: CAMU_Contrast = 2; #[doc = "Pattern 4."] +#[doc = ""] + pub const CONTRAST_PATTERN_04: CAMU_Contrast = 3; #[doc = "Pattern 5."] +#[doc = ""] + pub const CONTRAST_PATTERN_05: CAMU_Contrast = 4; #[doc = "Pattern 6."] +#[doc = ""] + pub const CONTRAST_PATTERN_06: CAMU_Contrast = 5; #[doc = "Pattern 7."] +#[doc = ""] + pub const CONTRAST_PATTERN_07: CAMU_Contrast = 6; #[doc = "Pattern 8."] +#[doc = ""] + pub const CONTRAST_PATTERN_08: CAMU_Contrast = 7; #[doc = "Pattern 9."] +#[doc = ""] + pub const CONTRAST_PATTERN_09: CAMU_Contrast = 8; #[doc = "Pattern 10."] +#[doc = ""] + pub const CONTRAST_PATTERN_10: CAMU_Contrast = 9; #[doc = "Pattern 11."] +#[doc = ""] + pub const CONTRAST_PATTERN_11: CAMU_Contrast = 10; #[doc = "Low contrast. (5)"] +#[doc = ""] + pub const CONTRAST_LOW: CAMU_Contrast = 4; #[doc = "Normal contrast. (6)"] +#[doc = ""] + pub const CONTRAST_NORMAL: CAMU_Contrast = 5; #[doc = "High contrast. (7)"] +#[doc = ""] + pub const CONTRAST_HIGH: CAMU_Contrast = 6; #[doc = "Camera contrast patterns."] +#[doc = ""] + pub type CAMU_Contrast = ::libc::c_uint; #[doc = "No lens correction."] +#[doc = ""] + pub const LENS_CORRECTION_OFF: CAMU_LensCorrection = 0; #[doc = "Edge-to-center brightness ratio of 70."] +#[doc = ""] + pub const LENS_CORRECTION_ON_70: CAMU_LensCorrection = 1; #[doc = "Edge-to-center brightness ratio of 90."] +#[doc = ""] + pub const LENS_CORRECTION_ON_90: CAMU_LensCorrection = 2; #[doc = "Dark lens correction. (OFF)"] +#[doc = ""] + pub const LENS_CORRECTION_DARK: CAMU_LensCorrection = 0; #[doc = "Normal lens correction. (70)"] +#[doc = ""] + pub const LENS_CORRECTION_NORMAL: CAMU_LensCorrection = 1; #[doc = "Bright lens correction. (90)"] +#[doc = ""] + pub const LENS_CORRECTION_BRIGHT: CAMU_LensCorrection = 2; #[doc = "Camera lens correction modes."] +#[doc = ""] + pub type CAMU_LensCorrection = ::libc::c_uint; #[doc = "YUV422"] +#[doc = ""] + pub const OUTPUT_YUV_422: CAMU_OutputFormat = 0; #[doc = "RGB565"] +#[doc = ""] + pub const OUTPUT_RGB_565: CAMU_OutputFormat = 1; #[doc = "Camera image output formats."] +#[doc = ""] + pub type CAMU_OutputFormat = ::libc::c_uint; #[doc = "Normal shutter sound."] +#[doc = ""] + pub const SHUTTER_SOUND_TYPE_NORMAL: CAMU_ShutterSoundType = 0; #[doc = "Shutter sound to begin a movie."] +#[doc = ""] + pub const SHUTTER_SOUND_TYPE_MOVIE: CAMU_ShutterSoundType = 1; #[doc = "Shutter sound to end a movie."] +#[doc = ""] + pub const SHUTTER_SOUND_TYPE_MOVIE_END: CAMU_ShutterSoundType = 2; #[doc = "Camera shutter sounds."] +#[doc = ""] + pub type CAMU_ShutterSoundType = ::libc::c_uint; #[doc = "Image quality calibration data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_ImageQualityCalibrationData { - #[doc = "Auto exposure base target brightness."] +#[doc = "Auto exposure base target brightness."] +#[doc = ""] + pub aeBaseTarget: s16, - #[doc = "Left color correction matrix red normalization coefficient."] +#[doc = "Left color correction matrix red normalization coefficient."] +#[doc = ""] + pub kRL: s16, - #[doc = "Left color correction matrix green normalization coefficient."] +#[doc = "Left color correction matrix green normalization coefficient."] +#[doc = ""] + pub kGL: s16, - #[doc = "Left color correction matrix blue normalization coefficient."] +#[doc = "Left color correction matrix blue normalization coefficient."] +#[doc = ""] + pub kBL: s16, - #[doc = "Color correction matrix position."] +#[doc = "Color correction matrix position."] +#[doc = ""] + pub ccmPosition: s16, - #[doc = "Right camera, left color correction matrix red/green gain."] +#[doc = "Right camera, left color correction matrix red/green gain."] +#[doc = ""] + pub awbCcmL9Right: u16_, - #[doc = "Left camera, left color correction matrix red/green gain."] +#[doc = "Left camera, left color correction matrix red/green gain."] +#[doc = ""] + pub awbCcmL9Left: u16_, - #[doc = "Right camera, left color correction matrix blue/green gain."] +#[doc = "Right camera, left color correction matrix blue/green gain."] +#[doc = ""] + pub awbCcmL10Right: u16_, - #[doc = "Left camera, left color correction matrix blue/green gain."] +#[doc = "Left camera, left color correction matrix blue/green gain."] +#[doc = ""] + pub awbCcmL10Left: u16_, - #[doc = "Right camera, color correction matrix position threshold."] +#[doc = "Right camera, color correction matrix position threshold."] +#[doc = ""] + pub awbX0Right: u16_, - #[doc = "Left camera, color correction matrix position threshold."] +#[doc = "Left camera, color correction matrix position threshold."] +#[doc = ""] + pub awbX0Left: u16_, } #[doc = "Stereo camera calibration data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_StereoCameraCalibrationData { - #[doc = "#bool Whether the X and Y rotation data is valid."] +#[doc = "#bool Whether the X and Y rotation data is valid."] +#[doc = ""] + pub isValidRotationXY: u8_, - #[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] +#[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] +#[doc = ""] + pub padding: [u8_; 3usize], - #[doc = "Scale to match the left camera image with the right."] +#[doc = "Scale to match the left camera image with the right."] +#[doc = ""] + pub scale: f32, - #[doc = "Z axis rotation to match the left camera image with the right."] +#[doc = "Z axis rotation to match the left camera image with the right."] +#[doc = ""] + pub rotationZ: f32, - #[doc = "X axis translation to match the left camera image with the right."] +#[doc = "X axis translation to match the left camera image with the right."] +#[doc = ""] + pub translationX: f32, - #[doc = "Y axis translation to match the left camera image with the right."] +#[doc = "Y axis translation to match the left camera image with the right."] +#[doc = ""] + pub translationY: f32, - #[doc = "X axis rotation to match the left camera image with the right."] +#[doc = "X axis rotation to match the left camera image with the right."] +#[doc = ""] + pub rotationX: f32, - #[doc = "Y axis rotation to match the left camera image with the right."] +#[doc = "Y axis rotation to match the left camera image with the right."] +#[doc = ""] + pub rotationY: f32, - #[doc = "Right camera angle of view."] +#[doc = "Right camera angle of view."] +#[doc = ""] + pub angleOfViewRight: f32, - #[doc = "Left camera angle of view."] +#[doc = "Left camera angle of view."] +#[doc = ""] + pub angleOfViewLeft: f32, - #[doc = "Distance between cameras and measurement chart."] +#[doc = "Distance between cameras and measurement chart."] +#[doc = ""] + pub distanceToChart: f32, - #[doc = "Distance between left and right cameras."] +#[doc = "Distance between left and right cameras."] +#[doc = ""] + pub distanceCameras: f32, - #[doc = "Image width."] +#[doc = "Image width."] +#[doc = ""] + pub imageWidth: s16, - #[doc = "Image height."] +#[doc = "Image height."] +#[doc = ""] + pub imageHeight: s16, - #[doc = "Reserved for future use. (unused)"] +#[doc = "Reserved for future use. (unused)"] +#[doc = ""] + pub reserved: [u8_; 16usize], } #[doc = "Batch camera configuration for use without a context."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterCameraSelect { - #[doc = "Selected camera."] +#[doc = "Selected camera."] +#[doc = ""] + pub camera: u8_, - #[doc = "Camera exposure."] +#[doc = "Camera exposure."] +#[doc = ""] + pub exposure: s8, - #[doc = "#CAMU_WhiteBalance Camera white balance."] +#[doc = "#CAMU_WhiteBalance Camera white balance."] +#[doc = ""] + pub whiteBalance: u8_, - #[doc = "Camera sharpness."] +#[doc = "Camera sharpness."] +#[doc = ""] + pub sharpness: s8, - #[doc = "#bool Whether to automatically determine the proper exposure."] +#[doc = "#bool Whether to automatically determine the proper exposure."] +#[doc = ""] + pub autoExposureOn: u8_, - #[doc = "#bool Whether to automatically determine the white balance mode."] +#[doc = "#bool Whether to automatically determine the white balance mode."] +#[doc = ""] + pub autoWhiteBalanceOn: u8_, - #[doc = "#CAMU_FrameRate Camera frame rate."] +#[doc = "#CAMU_FrameRate Camera frame rate."] +#[doc = ""] + pub frameRate: u8_, - #[doc = "#CAMU_PhotoMode Camera photo mode."] +#[doc = "#CAMU_PhotoMode Camera photo mode."] +#[doc = ""] + pub photoMode: u8_, - #[doc = "#CAMU_Contrast Camera contrast."] +#[doc = "#CAMU_Contrast Camera contrast."] +#[doc = ""] + pub contrast: u8_, - #[doc = "#CAMU_LensCorrection Camera lens correction."] +#[doc = "#CAMU_LensCorrection Camera lens correction."] +#[doc = ""] + pub lensCorrection: u8_, - #[doc = "#bool Whether to enable the camera's noise filter."] +#[doc = "#bool Whether to enable the camera's noise filter."] +#[doc = ""] + pub noiseFilterOn: u8_, - #[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] +#[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] +#[doc = ""] + pub padding: u8_, - #[doc = "X of the region to use for auto exposure."] +#[doc = "X of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowX: s16, - #[doc = "Y of the region to use for auto exposure."] +#[doc = "Y of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowY: s16, - #[doc = "Width of the region to use for auto exposure."] +#[doc = "Width of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowWidth: s16, - #[doc = "Height of the region to use for auto exposure."] +#[doc = "Height of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowHeight: s16, - #[doc = "X of the region to use for auto white balance."] +#[doc = "X of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowX: s16, - #[doc = "Y of the region to use for auto white balance."] +#[doc = "Y of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowY: s16, - #[doc = "Width of the region to use for auto white balance."] +#[doc = "Width of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowWidth: s16, - #[doc = "Height of the region to use for auto white balance."] +#[doc = "Height of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowHeight: s16, } #[doc = "Batch camera configuration for use with a context."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContext { - #[doc = "Selected camera."] +#[doc = "Selected camera."] +#[doc = ""] + pub camera: u8_, - #[doc = "#CAMU_Context Selected context."] +#[doc = "#CAMU_Context Selected context."] +#[doc = ""] + pub context: u8_, - #[doc = "#CAMU_Flip Camera image flip mode."] +#[doc = "#CAMU_Flip Camera image flip mode."] +#[doc = ""] + pub flip: u8_, - #[doc = "#CAMU_Effect Camera image special effects."] +#[doc = "#CAMU_Effect Camera image special effects."] +#[doc = ""] + pub effect: u8_, - #[doc = "#CAMU_Size Camera image resolution."] +#[doc = "#CAMU_Size Camera image resolution."] +#[doc = ""] + pub size: u8_, } #[doc = "Batch camera configuration for use with a context and with detailed size information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContextDetail { - #[doc = "Selected camera."] +#[doc = "Selected camera."] +#[doc = ""] + pub camera: u8_, - #[doc = "#CAMU_Context Selected context."] +#[doc = "#CAMU_Context Selected context."] +#[doc = ""] + pub context: u8_, - #[doc = "#CAMU_Flip Camera image flip mode."] +#[doc = "#CAMU_Flip Camera image flip mode."] +#[doc = ""] + pub flip: u8_, - #[doc = "#CAMU_Effect Camera image special effects."] +#[doc = "#CAMU_Effect Camera image special effects."] +#[doc = ""] + pub effect: u8_, - #[doc = "Image width."] +#[doc = "Image width."] +#[doc = ""] + pub width: s16, - #[doc = "Image height."] +#[doc = "Image height."] +#[doc = ""] + pub height: s16, - #[doc = "First crop point X."] +#[doc = "First crop point X."] +#[doc = ""] + pub cropX0: s16, - #[doc = "First crop point Y."] +#[doc = "First crop point Y."] +#[doc = ""] + pub cropY0: s16, - #[doc = "Second crop point X."] +#[doc = "Second crop point X."] +#[doc = ""] + pub cropX1: s16, - #[doc = "Second crop point Y."] +#[doc = "Second crop point Y."] +#[doc = ""] + pub cropY1: s16, } extern "C" { #[must_use] - #[doc = "Initializes the cam service."] - #[doc = ""] - #[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] +#[doc = "Initializes the cam service."] +#[doc = ""] +#[doc = ""] +#[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] +#[doc = ""] + pub fn camInit() -> Result; } extern "C" { - #[doc = "Closes the cam service."] - #[doc = ""] - #[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] +#[doc = "Closes the cam service."] +#[doc = ""] +#[doc = ""] +#[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] +#[doc = ""] + pub fn camExit(); } extern "C" { #[must_use] - #[doc = "Begins capture on the specified camera port."] - #[doc = "* port Port to begin capture on."] +#[doc = "Begins capture on the specified camera port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to begin capture on."] + pub fn CAMU_StartCapture(port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates capture on the specified camera port."] - #[doc = "* port Port to terminate capture on."] +#[doc = "Terminates capture on the specified camera port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to terminate capture on."] + pub fn CAMU_StopCapture(port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the specified camera port is busy."] - #[doc = "* busy Pointer to output the busy state to."] - #[doc = "* port Port to check."] +#[doc = "Gets whether the specified camera port is busy."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `busy` - Pointer to output the busy state to."] +#[doc = "* `port` - Port to check."] + pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the buffer and error flags of the specified camera port."] - #[doc = "* port Port to clear."] +#[doc = "Clears the buffer and error flags of the specified camera port."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to clear."] + pub fn CAMU_ClearBuffer(port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a handle to the event signaled on vsync interrupts."] - #[doc = "* event Pointer to output the event handle to."] - #[doc = "* port Port to use."] +#[doc = "Gets a handle to the event signaled on vsync interrupts."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to output the event handle to."] +#[doc = "* `port` - Port to use."] + pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a handle to the event signaled on camera buffer errors."] - #[doc = "* event Pointer to output the event handle to."] - #[doc = "* port Port to use."] +#[doc = "Gets a handle to the event signaled on camera buffer errors."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to output the event handle to."] +#[doc = "* `port` - Port to use."] + pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates the process of receiving a camera frame."] - #[doc = "* event Pointer to output the completion event handle to."] - #[doc = "* dst Buffer to write data to."] - #[doc = "* port Port to receive from."] - #[doc = "* imageSize Size of the image to receive."] - #[doc = "* transferUnit Transfer unit to use when receiving."] +#[doc = "Initiates the process of receiving a camera frame."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to output the completion event handle to."] +#[doc = "* `dst` - Buffer to write data to."] +#[doc = "* `port` - Port to receive from."] +#[doc = "* `imageSize` - Size of the image to receive."] +#[doc = "* `transferUnit` - Transfer unit to use when receiving."] + pub fn CAMU_SetReceiving( event: *mut Handle, dst: *mut ::libc::c_void, @@ -10203,74 +14405,110 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets whether the specified camera port has finished receiving image data."] - #[doc = "* finishedReceiving Pointer to output the receiving status to."] - #[doc = "* port Port to check."] +#[doc = "Gets whether the specified camera port has finished receiving image data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `finishedReceiving` - Pointer to output the receiving status to."] +#[doc = "* `port` - Port to check."] + pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the number of lines to transfer into an image buffer."] - #[doc = "* port Port to use."] - #[doc = "* lines Lines to transfer."] - #[doc = "* width Width of the image."] - #[doc = "* height Height of the image."] +#[doc = "Sets the number of lines to transfer into an image buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to use."] +#[doc = "* `lines` - Lines to transfer."] +#[doc = "* `width` - Width of the image."] +#[doc = "* `height` - Height of the image."] + pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the maximum number of lines that can be saved to an image buffer."] - #[doc = "* maxLines Pointer to write the maximum number of lines to."] - #[doc = "* width Width of the image."] - #[doc = "* height Height of the image."] +#[doc = "Gets the maximum number of lines that can be saved to an image buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `maxLines` - Pointer to write the maximum number of lines to."] +#[doc = "* `width` - Width of the image."] +#[doc = "* `height` - Height of the image."] + pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the number of bytes to transfer into an image buffer."] - #[doc = "* port Port to use."] - #[doc = "* bytes Bytes to transfer."] - #[doc = "* width Width of the image."] - #[doc = "* height Height of the image."] +#[doc = "Sets the number of bytes to transfer into an image buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to use."] +#[doc = "* `bytes` - Bytes to transfer."] +#[doc = "* `width` - Width of the image."] +#[doc = "* `height` - Height of the image."] + pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the number of bytes to transfer into an image buffer."] - #[doc = "* transferBytes Pointer to write the number of bytes to."] - #[doc = "* port Port to use."] +#[doc = "Gets the number of bytes to transfer into an image buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `transferBytes` - Pointer to write the number of bytes to."] +#[doc = "* `port` - Port to use."] + pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] - #[doc = "* maxBytes Pointer to write the maximum number of bytes to."] - #[doc = "* width Width of the image."] - #[doc = "* height Height of the image."] +#[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `maxBytes` - Pointer to write the maximum number of bytes to."] +#[doc = "* `width` - Width of the image."] +#[doc = "* `height` - Height of the image."] + pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether image trimming is enabled."] - #[doc = "* port Port to use."] - #[doc = "* trimming Whether image trimming is enabled."] +#[doc = "Sets whether image trimming is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to use."] +#[doc = "* `trimming` - Whether image trimming is enabled."] + pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether image trimming is enabled."] - #[doc = "* trimming Pointer to output the trim state to."] - #[doc = "* port Port to use."] +#[doc = "Gets whether image trimming is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `trimming` - Pointer to output the trim state to."] +#[doc = "* `port` - Port to use."] + pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the parameters used for trimming images."] - #[doc = "* port Port to use."] - #[doc = "* xStart Start X coordinate."] - #[doc = "* yStart Start Y coordinate."] - #[doc = "* xEnd End X coordinate."] - #[doc = "* yEnd End Y coordinate."] +#[doc = "Sets the parameters used for trimming images."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to use."] +#[doc = "* `xStart` - Start X coordinate."] +#[doc = "* `yStart` - Start Y coordinate."] +#[doc = "* `xEnd` - End X coordinate."] +#[doc = "* `yEnd` - End Y coordinate."] + pub fn CAMU_SetTrimmingParams( port: u32_, xStart: s16, @@ -10281,12 +14519,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the parameters used for trimming images."] - #[doc = "* xStart Pointer to write the start X coordinate to."] - #[doc = "* yStart Pointer to write the start Y coordinate to."] - #[doc = "* xEnd Pointer to write the end X coordinate to."] - #[doc = "* yEnd Pointer to write the end Y coordinate to."] - #[doc = "* port Port to use."] +#[doc = "Gets the parameters used for trimming images."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `xStart` - Pointer to write the start X coordinate to."] +#[doc = "* `yStart` - Pointer to write the start Y coordinate to."] +#[doc = "* `xEnd` - Pointer to write the end X coordinate to."] +#[doc = "* `yEnd` - Pointer to write the end Y coordinate to."] +#[doc = "* `port` - Port to use."] + pub fn CAMU_GetTrimmingParams( xStart: *mut s16, yStart: *mut s16, @@ -10297,12 +14539,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the parameters used for trimming images, relative to the center of the image."] - #[doc = "* port Port to use."] - #[doc = "* trimWidth Trim width."] - #[doc = "* trimHeight Trim height."] - #[doc = "* camWidth Camera width."] - #[doc = "* camHeight Camera height."] +#[doc = "Sets the parameters used for trimming images, relative to the center of the image."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `port` - Port to use."] +#[doc = "* `trimWidth` - Trim width."] +#[doc = "* `trimHeight` - Trim height."] +#[doc = "* `camWidth` - Camera width."] +#[doc = "* `camHeight` - Camera height."] + pub fn CAMU_SetTrimmingParamsCenter( port: u32_, trimWidth: s16, @@ -10313,37 +14559,58 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Activates the specified camera."] - #[doc = "* select Camera to use."] +#[doc = "Activates the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] + pub fn CAMU_Activate(select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Switches the specified camera's active context."] - #[doc = "* select Camera to use."] - #[doc = "* context Context to use."] +#[doc = "Switches the specified camera's active context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `context` - Context to use."] + pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the exposure value of the specified camera."] - #[doc = "* select Camera to use."] - #[doc = "* exposure Exposure value to use."] +#[doc = "Sets the exposure value of the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `exposure` - Exposure value to use."] + pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the white balance mode of the specified camera."] - #[doc = "* select Camera to use."] - #[doc = "* whiteBalance White balance mode to use."] +#[doc = "Sets the white balance mode of the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `whiteBalance` - White balance mode to use."] + pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the white balance mode of the specified camera."] - #[doc = "TODO: Explain \"without base up\"?"] - #[doc = "* select Camera to use."] - #[doc = "* whiteBalance White balance mode to use."] +#[doc = "Sets the white balance mode of the specified camera."] +#[doc = ""] +#[doc = "TODO: Explain \"without base up\"?"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `whiteBalance` - White balance mode to use."] + pub fn CAMU_SetWhiteBalanceWithoutBaseUp( select: u32_, whiteBalance: CAMU_WhiteBalance, @@ -10351,58 +14618,86 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the sharpness of the specified camera."] - #[doc = "* select Camera to use."] - #[doc = "* sharpness Sharpness to use."] +#[doc = "Sets the sharpness of the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `sharpness` - Sharpness to use."] + pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether auto exposure is enabled on the specified camera."] - #[doc = "* select Camera to use."] - #[doc = "* autoWhiteBalance Whether auto exposure is enabled."] +#[doc = "Sets whether auto exposure is enabled on the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `autoWhiteBalance` - Whether auto exposure is enabled."] + pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether auto exposure is enabled on the specified camera."] - #[doc = "* autoExposure Pointer to output the auto exposure state to."] - #[doc = "* select Camera to use."] +#[doc = "Gets whether auto exposure is enabled on the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `autoExposure` - Pointer to output the auto exposure state to."] +#[doc = "* `select` - Camera to use."] + pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether auto white balance is enabled on the specified camera."] - #[doc = "* select Camera to use."] - #[doc = "* autoWhiteBalance Whether auto white balance is enabled."] +#[doc = "Sets whether auto white balance is enabled on the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `autoWhiteBalance` - Whether auto white balance is enabled."] + pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether auto white balance is enabled on the specified camera."] - #[doc = "* autoWhiteBalance Pointer to output the auto white balance state to."] - #[doc = "* select Camera to use."] +#[doc = "Gets whether auto white balance is enabled on the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `autoWhiteBalance` - Pointer to output the auto white balance state to."] +#[doc = "* `select` - Camera to use."] + pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Flips the image of the specified camera in the specified context."] - #[doc = "* select Camera to use."] - #[doc = "* flip Flip mode to use."] - #[doc = "* context Context to use."] +#[doc = "Flips the image of the specified camera in the specified context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `flip` - Flip mode to use."] +#[doc = "* `context` - Context to use."] + pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the image resolution of the given camera in the given context, in detail."] - #[doc = "* select Camera to use."] - #[doc = "* width Width to use."] - #[doc = "* height Height to use."] - #[doc = "* cropX0 First crop point X."] - #[doc = "* cropY0 First crop point Y."] - #[doc = "* cropX1 Second crop point X."] - #[doc = "* cropY1 Second crop point Y."] - #[doc = "* context Context to use."] +#[doc = "Sets the image resolution of the given camera in the given context, in detail."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `width` - Width to use."] +#[doc = "* `height` - Height to use."] +#[doc = "* `cropX0` - First crop point X."] +#[doc = "* `cropY0` - First crop point Y."] +#[doc = "* `cropX1` - Second crop point X."] +#[doc = "* `cropY1` - Second crop point Y."] +#[doc = "* `context` - Context to use."] + pub fn CAMU_SetDetailSize( select: u32_, width: s16, @@ -10416,54 +14711,82 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the image resolution of the given camera in the given context."] - #[doc = "* select Camera to use."] - #[doc = "* size Size to use."] - #[doc = "* context Context to use."] +#[doc = "Sets the image resolution of the given camera in the given context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `size` - Size to use."] +#[doc = "* `context` - Context to use."] + pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the frame rate of the given camera."] - #[doc = "* select Camera to use."] - #[doc = "* frameRate Frame rate to use."] +#[doc = "Sets the frame rate of the given camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `frameRate` - Frame rate to use."] + pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the photo mode of the given camera."] - #[doc = "* select Camera to use."] - #[doc = "* photoMode Photo mode to use."] +#[doc = "Sets the photo mode of the given camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `photoMode` - Photo mode to use."] + pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the special effects of the given camera in the given context."] - #[doc = "* select Camera to use."] - #[doc = "* effect Effect to use."] - #[doc = "* context Context to use."] +#[doc = "Sets the special effects of the given camera in the given context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `effect` - Effect to use."] +#[doc = "* `context` - Context to use."] + pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the contrast mode of the given camera."] - #[doc = "* select Camera to use."] - #[doc = "* contrast Contrast mode to use."] +#[doc = "Sets the contrast mode of the given camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `contrast` - Contrast mode to use."] + pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the lens correction mode of the given camera."] - #[doc = "* select Camera to use."] - #[doc = "* lensCorrection Lens correction mode to use."] +#[doc = "Sets the lens correction mode of the given camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `lensCorrection` - Lens correction mode to use."] + pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the output format of the given camera in the given context."] - #[doc = "* select Camera to use."] - #[doc = "* format Format to output."] - #[doc = "* context Context to use."] +#[doc = "Sets the output format of the given camera in the given context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `format` - Format to output."] +#[doc = "* `context` - Context to use."] + pub fn CAMU_SetOutputFormat( select: u32_, format: CAMU_OutputFormat, @@ -10472,12 +14795,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the region to base auto exposure off of for the specified camera."] - #[doc = "* select Camera to use."] - #[doc = "* x X of the region."] - #[doc = "* y Y of the region."] - #[doc = "* width Width of the region."] - #[doc = "* height Height of the region."] +#[doc = "Sets the region to base auto exposure off of for the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `x` - X of the region."] +#[doc = "* `y` - Y of the region."] +#[doc = "* `width` - Width of the region."] +#[doc = "* `height` - Height of the region."] + pub fn CAMU_SetAutoExposureWindow( select: u32_, x: s16, @@ -10488,12 +14815,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the region to base auto white balance off of for the specified camera."] - #[doc = "* select Camera to use."] - #[doc = "* x X of the region."] - #[doc = "* y Y of the region."] - #[doc = "* width Width of the region."] - #[doc = "* height Height of the region."] +#[doc = "Sets the region to base auto white balance off of for the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `x` - X of the region."] +#[doc = "* `y` - Y of the region."] +#[doc = "* `width` - Width of the region."] +#[doc = "* `height` - Height of the region."] + pub fn CAMU_SetAutoWhiteBalanceWindow( select: u32_, x: s16, @@ -10504,530 +14835,878 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets whether the specified camera's noise filter is enabled."] - #[doc = "* select Camera to use."] - #[doc = "* noiseFilter Whether the noise filter is enabled."] +#[doc = "Sets whether the specified camera's noise filter is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to use."] +#[doc = "* `noiseFilter` - Whether the noise filter is enabled."] + pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Synchronizes the specified cameras' vsync timing."] - #[doc = "* select1 First camera."] - #[doc = "* select2 Second camera."] +#[doc = "Synchronizes the specified cameras' vsync timing."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select1` - First camera."] +#[doc = "* `select2` - Second camera."] + pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] - #[doc = "* timing Pointer to write timing data to. (size \"past * sizeof(s64)\")"] - #[doc = "* port Port to use."] - #[doc = "* past Number of past timings to retrieve."] +#[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timing` - Pointer to write timing data to. (size \"past * sizeof(s64)\")"] +#[doc = "* `port` - Port to use."] +#[doc = "* `past` - Number of past timings to retrieve."] + pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the specified camera's stereo camera calibration data."] - #[doc = "* data Pointer to output the stereo camera data to."] +#[doc = "Gets the specified camera's stereo camera calibration data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to output the stereo camera data to."] + pub fn CAMU_GetStereoCameraCalibrationData( data: *mut CAMU_StereoCameraCalibrationData, ) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the specified camera's stereo camera calibration data."] - #[doc = "* data Data to set."] +#[doc = "Sets the specified camera's stereo camera calibration data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Data to set."] + pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to the specified I2C register of the specified camera."] - #[doc = "* select Camera to write to."] - #[doc = "* addr Address to write to."] - #[doc = "* data Data to write."] +#[doc = "Writes to the specified I2C register of the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to write to."] +#[doc = "* `addr` - Address to write to."] +#[doc = "* `data` - Data to write."] + pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to the specified MCU variable of the specified camera."] - #[doc = "* select Camera to write to."] - #[doc = "* addr Address to write to."] - #[doc = "* data Data to write."] +#[doc = "Writes to the specified MCU variable of the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to write to."] +#[doc = "* `addr` - Address to write to."] +#[doc = "* `data` - Data to write."] + pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Reads the specified I2C register of the specified camera."] - #[doc = "* data Pointer to read data to."] - #[doc = "* select Camera to read from."] - #[doc = "* addr Address to read."] +#[doc = "Reads the specified I2C register of the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to read data to."] +#[doc = "* `select` - Camera to read from."] +#[doc = "* `addr` - Address to read."] + pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Reads the specified MCU variable of the specified camera."] - #[doc = "* data Pointer to read data to."] - #[doc = "* select Camera to read from."] - #[doc = "* addr Address to read."] +#[doc = "Reads the specified MCU variable of the specified camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to read data to."] +#[doc = "* `select` - Camera to read from."] +#[doc = "* `addr` - Address to read."] + pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the specified camera's image quality calibration data."] - #[doc = "* data Data to set."] +#[doc = "Sets the specified camera's image quality calibration data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Data to set."] + pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the specified camera's image quality calibration data."] - #[doc = "* data Pointer to write the quality data to."] +#[doc = "Gets the specified camera's image quality calibration data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to write the quality data to."] + pub fn CAMU_GetImageQualityCalibrationData( data: *mut CAMU_ImageQualityCalibrationData, ) -> Result; } extern "C" { #[must_use] - #[doc = "Configures a camera with pre-packaged configuration data without a context."] - #[doc = "* Parameter to use."] +#[doc = "Configures a camera with pre-packaged configuration data without a context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `Parameter` - to use."] + pub fn CAMU_SetPackageParameterWithoutContext( param: CAMU_PackageParameterCameraSelect, ) -> Result; } extern "C" { #[must_use] - #[doc = "Configures a camera with pre-packaged configuration data with a context."] - #[doc = "* Parameter to use."] +#[doc = "Configures a camera with pre-packaged configuration data with a context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `Parameter` - to use."] + pub fn CAMU_SetPackageParameterWithContext(param: CAMU_PackageParameterContext) -> Result; } extern "C" { #[must_use] - #[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] - #[doc = "* Parameter to use."] +#[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `Parameter` - to use."] + pub fn CAMU_SetPackageParameterWithContextDetail( param: CAMU_PackageParameterContextDetail, ) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the Y2R coefficient applied to image data by the camera."] - #[doc = "* coefficient Pointer to output the Y2R coefficient to."] +#[doc = "Gets the Y2R coefficient applied to image data by the camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `coefficient` - Pointer to output the Y2R coefficient to."] + pub fn CAMU_GetSuitableY2rStandardCoefficient( coefficient: *mut Y2RU_StandardCoefficient, ) -> Result; } extern "C" { #[must_use] - #[doc = "Plays the specified shutter sound."] - #[doc = "* sound Shutter sound to play."] +#[doc = "Plays the specified shutter sound."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sound` - Shutter sound to play."] + pub fn CAMU_PlayShutterSound(sound: CAMU_ShutterSoundType) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the camera driver."] +#[doc = "Initializes the camera driver."] +#[doc = ""] + pub fn CAMU_DriverInitialize() -> Result; } extern "C" { #[must_use] - #[doc = "Finalizes the camera driver."] +#[doc = "Finalizes the camera driver."] +#[doc = ""] + pub fn CAMU_DriverFinalize() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current activated camera."] - #[doc = "* select Pointer to output the current activated camera to."] +#[doc = "Gets the current activated camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Pointer to output the current activated camera to."] + pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current sleep camera."] - #[doc = "* select Pointer to output the current sleep camera to."] +#[doc = "Gets the current sleep camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Pointer to output the current sleep camera to."] + pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current sleep camera."] - #[doc = "* select Camera to set."] +#[doc = "Sets the current sleep camera."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `select` - Camera to set."] + pub fn CAMU_SetSleepCamera(select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] - #[doc = "* brightnessSynchronization Whether to enable brightness synchronization."] +#[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `brightnessSynchronization` - Whether to enable brightness synchronization."] + pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes CFGNOR."] - #[doc = "* value Unknown, usually 1."] +#[doc = "Initializes CFGNOR."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Unknown, usually 1."] + pub fn cfgnorInit(value: u8_) -> Result; } extern "C" { - #[doc = "Exits CFGNOR"] +#[doc = "Exits CFGNOR"] +#[doc = ""] + pub fn cfgnorExit(); } extern "C" { #[must_use] - #[doc = "Dumps the NOR flash."] - #[doc = "* buf Buffer to dump to."] - #[doc = "* size Size of the buffer."] +#[doc = "Dumps the NOR flash."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Buffer to dump to."] +#[doc = "* `size` - Size of the buffer."] + pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the NOR flash."] - #[doc = "* buf Buffer to write from."] - #[doc = "* size Size of the buffer."] +#[doc = "Writes the NOR flash."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Buffer to write from."] +#[doc = "* `size` - Size of the buffer."] + pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CFGNOR session."] - #[doc = "* value Unknown, usually 1."] +#[doc = "Initializes the CFGNOR session."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Unknown, usually 1."] + pub fn CFGNOR_Initialize(value: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Shuts down the CFGNOR session."] +#[doc = "Shuts down the CFGNOR session."] +#[doc = ""] + pub fn CFGNOR_Shutdown() -> Result; } extern "C" { #[must_use] - #[doc = "Reads data from NOR."] - #[doc = "* offset Offset to read from."] - #[doc = "* buf Buffer to read data to."] - #[doc = "* size Size of the buffer."] +#[doc = "Reads data from NOR."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `offset` - Offset to read from."] +#[doc = "* `buf` - Buffer to read data to."] +#[doc = "* `size` - Size of the buffer."] + pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes data to NOR."] - #[doc = "* offset Offset to write to."] - #[doc = "* buf Buffer to write data from."] - #[doc = "* size Size of the buffer."] +#[doc = "Writes data to NOR."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `offset` - Offset to write to."] +#[doc = "* `buf` - Buffer to write data from."] +#[doc = "* `size` - Size of the buffer."] + pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } #[doc = "Japan"] +#[doc = ""] + pub const CFG_REGION_JPN: CFG_Region = 0; #[doc = "USA"] +#[doc = ""] + pub const CFG_REGION_USA: CFG_Region = 1; #[doc = "Europe"] +#[doc = ""] + pub const CFG_REGION_EUR: CFG_Region = 2; #[doc = "Australia"] +#[doc = ""] + pub const CFG_REGION_AUS: CFG_Region = 3; #[doc = "China"] +#[doc = ""] + pub const CFG_REGION_CHN: CFG_Region = 4; #[doc = "Korea"] +#[doc = ""] + pub const CFG_REGION_KOR: CFG_Region = 5; #[doc = "Taiwan"] +#[doc = ""] + pub const CFG_REGION_TWN: CFG_Region = 6; #[doc = "Configuration region values."] +#[doc = ""] + pub type CFG_Region = ::libc::c_uint; #[doc = "Japanese"] +#[doc = ""] + pub const CFG_LANGUAGE_JP: CFG_Language = 0; #[doc = "English"] +#[doc = ""] + pub const CFG_LANGUAGE_EN: CFG_Language = 1; #[doc = "French"] +#[doc = ""] + pub const CFG_LANGUAGE_FR: CFG_Language = 2; #[doc = "German"] +#[doc = ""] + pub const CFG_LANGUAGE_DE: CFG_Language = 3; #[doc = "Italian"] +#[doc = ""] + pub const CFG_LANGUAGE_IT: CFG_Language = 4; #[doc = "Spanish"] +#[doc = ""] + pub const CFG_LANGUAGE_ES: CFG_Language = 5; #[doc = "Simplified Chinese"] +#[doc = ""] + pub const CFG_LANGUAGE_ZH: CFG_Language = 6; #[doc = "Korean"] +#[doc = ""] + pub const CFG_LANGUAGE_KO: CFG_Language = 7; #[doc = "Dutch"] +#[doc = ""] + pub const CFG_LANGUAGE_NL: CFG_Language = 8; #[doc = "Portugese"] +#[doc = ""] + pub const CFG_LANGUAGE_PT: CFG_Language = 9; #[doc = "Russian"] +#[doc = ""] + pub const CFG_LANGUAGE_RU: CFG_Language = 10; #[doc = "Traditional Chinese"] +#[doc = ""] + pub const CFG_LANGUAGE_TW: CFG_Language = 11; #[doc = "Configuration language values."] +#[doc = ""] + pub type CFG_Language = ::libc::c_uint; #[doc = "Old 3DS (CTR)"] +#[doc = ""] + pub const CFG_MODEL_3DS: CFG_SystemModel = 0; #[doc = "Old 3DS XL (SPR)"] +#[doc = ""] + pub const CFG_MODEL_3DSXL: CFG_SystemModel = 1; #[doc = "New 3DS (KTR)"] +#[doc = ""] + pub const CFG_MODEL_N3DS: CFG_SystemModel = 2; #[doc = "Old 2DS (FTR)"] +#[doc = ""] + pub const CFG_MODEL_2DS: CFG_SystemModel = 3; #[doc = "New 3DS XL (RED)"] +#[doc = ""] + pub const CFG_MODEL_N3DSXL: CFG_SystemModel = 4; #[doc = "New 2DS XL (JAN)"] +#[doc = ""] + pub const CFG_MODEL_N2DSXL: CFG_SystemModel = 5; pub type CFG_SystemModel = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes CFGU."] +#[doc = "Initializes CFGU."] +#[doc = ""] + pub fn cfguInit() -> Result; } extern "C" { - #[doc = "Exits CFGU."] +#[doc = "Exits CFGU."] +#[doc = ""] + pub fn cfguExit(); } extern "C" { #[must_use] - #[doc = "Gets the system's region from secure info."] - #[doc = "* region Pointer to output the region to. (see CFG_Region)"] +#[doc = "Gets the system's region from secure info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `region` - Pointer to output the region to. (see @ref CFG_Region)"] + pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Generates a console-unique hash."] - #[doc = "* appIDSalt Salt to use."] - #[doc = "* hash Pointer to output the hash to."] +#[doc = "Generates a console-unique hash."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `appIDSalt` - Salt to use."] +#[doc = "* `hash` - Pointer to output the hash to."] + pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the system's region is Canada or USA."] - #[doc = "* value Pointer to output the result to. (0 = no, 1 = yes)"] +#[doc = "Gets whether the system's region is Canada or USA."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Pointer to output the result to. (0 = no, 1 = yes)"] + pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's model."] - #[doc = "* model Pointer to output the model to. (see CFG_SystemModel)"] +#[doc = "Gets the system's model."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `model` - Pointer to output the model to. (see @ref CFG_SystemModel)"] + pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the system is a 2DS."] - #[doc = "* value Pointer to output the result to. (0 = yes, 1 = no)"] +#[doc = "Gets whether the system is a 2DS."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Pointer to output the result to. (0 = yes, 1 = no)"] + pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a string representing a country code."] - #[doc = "* code Country code to use."] - #[doc = "* string Pointer to output the string to."] +#[doc = "Gets a string representing a country code."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `code` - Country code to use."] +#[doc = "* `string` - Pointer to output the string to."] + pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a country code ID from its string."] - #[doc = "* string String to use."] - #[doc = "* code Pointer to output the country code to."] +#[doc = "Gets a country code ID from its string."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `string` - String to use."] +#[doc = "* `code` - Pointer to output the country code to."] + pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if NFC (code name: fangate) is supported."] - #[doc = "* isSupported pointer to the output the result to."] +#[doc = "Checks if NFC (code name: fangate) is supported."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `isSupported` - pointer to the output the result to."] + pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a config info block with flags = 2."] - #[doc = "* size Size of the data to retrieve."] - #[doc = "* blkID ID of the block to retrieve."] - #[doc = "* outData Pointer to write the block data to."] +#[doc = "Gets a config info block with flags = 2."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the data to retrieve."] +#[doc = "* `blkID` - ID of the block to retrieve."] +#[doc = "* `outData` - Pointer to write the block data to."] + pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a config info block with flags = 4."] - #[doc = "* size Size of the data to retrieve."] - #[doc = "* blkID ID of the block to retrieve."] - #[doc = "* outData Pointer to write the block data to."] +#[doc = "Gets a config info block with flags = 4."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the data to retrieve."] +#[doc = "* `blkID` - ID of the block to retrieve."] +#[doc = "* `outData` - Pointer to write the block data to."] + pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a config info block with flags = 8."] - #[doc = "* size Size of the data to retrieve."] - #[doc = "* blkID ID of the block to retrieve."] - #[doc = "* outData Pointer to write the block data to."] +#[doc = "Gets a config info block with flags = 8."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the data to retrieve."] +#[doc = "* `blkID` - ID of the block to retrieve."] +#[doc = "* `outData` - Pointer to write the block data to."] + pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a config info block with flags = 4."] - #[doc = "* size Size of the data to retrieve."] - #[doc = "* blkID ID of the block to retrieve."] - #[doc = "* inData Pointer to block data to write."] +#[doc = "Sets a config info block with flags = 4."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the data to retrieve."] +#[doc = "* `blkID` - ID of the block to retrieve."] +#[doc = "* `inData` - Pointer to block data to write."] + pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a config info block with flags = 8."] - #[doc = "* size Size of the data to retrieve."] - #[doc = "* blkID ID of the block to retrieve."] - #[doc = "* inData Pointer to block data to write."] +#[doc = "Sets a config info block with flags = 8."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the data to retrieve."] +#[doc = "* `blkID` - ID of the block to retrieve."] +#[doc = "* `inData` - Pointer to block data to write."] + pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the CFG buffer in memory to the savegame in NAND."] +#[doc = "Writes the CFG buffer in memory to the savegame in NAND."] +#[doc = ""] + pub fn CFG_UpdateConfigSavegame() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's language."] - #[doc = "* language Pointer to write the language to. (see CFG_Language)"] +#[doc = "Gets the system's language."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `language` - Pointer to write the language to. (see @ref CFG_Language)"] + pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] +#[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] +#[doc = ""] + pub fn CFGI_RestoreLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] +#[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] +#[doc = ""] + pub fn CFGI_RestoreSecureInfo() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] +#[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] +#[doc = ""] + pub fn CFGI_DeleteConfigSavefile() -> Result; } extern "C" { #[must_use] - #[doc = "Formats Config_Savegame."] +#[doc = "Formats Config_Savegame."] +#[doc = ""] + pub fn CFGI_FormatConfig() -> Result; } extern "C" { #[must_use] - #[doc = "Clears parental controls"] +#[doc = "Clears parental controls"] +#[doc = ""] + pub fn CFGI_ClearParentalControls() -> Result; } extern "C" { #[must_use] - #[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] +#[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] +#[doc = ""] + pub fn CFGI_VerifySigLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] - #[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] +#[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] +#[doc = ""] + pub fn CFGI_VerifySigSecureInfo() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's serial number."] - #[doc = "* serial Pointer to output the serial to. (This is normally 0xF)"] +#[doc = "Gets the system's serial number."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `serial` - Pointer to output the serial to. (This is normally 0xF)"] + pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] - #[doc = "* data Pointer to output the buffer. (The size must be at least 0x110-bytes)"] +#[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] + pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 64-bit local friend code seed."] - #[doc = "* seed Pointer to write the friend code seed to."] +#[doc = "Gets the 64-bit local friend code seed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `seed` - Pointer to write the friend code seed to."] + pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 0x11-byte data following the SecureInfo signature."] - #[doc = "* data Pointer to output the buffer. (The size must be at least 0x11-bytes)"] +#[doc = "Gets the 0x11-byte data following the SecureInfo signature."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] + pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] - #[doc = "* data Pointer to output the buffer. (The size must be at least 0x100-bytes)"] +#[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] + pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result; } #[doc = "PCM8"] +#[doc = ""] + pub const CSND_ENCODING_PCM8: _bindgen_ty_17 = 0; #[doc = "PCM16"] +#[doc = ""] + pub const CSND_ENCODING_PCM16: _bindgen_ty_17 = 1; #[doc = "IMA-ADPCM"] +#[doc = ""] + pub const CSND_ENCODING_ADPCM: _bindgen_ty_17 = 2; #[doc = "PSG (Similar to DS?)"] +#[doc = ""] + pub const CSND_ENCODING_PSG: _bindgen_ty_17 = 3; #[doc = "CSND encodings."] +#[doc = ""] + pub type _bindgen_ty_17 = ::libc::c_uint; #[doc = "Manual loop."] +#[doc = ""] + pub const CSND_LOOPMODE_MANUAL: _bindgen_ty_18 = 0; #[doc = "Normal loop."] +#[doc = ""] + pub const CSND_LOOPMODE_NORMAL: _bindgen_ty_18 = 1; #[doc = "Do not loop."] +#[doc = ""] + pub const CSND_LOOPMODE_ONESHOT: _bindgen_ty_18 = 2; #[doc = "Don't reload."] +#[doc = ""] + pub const CSND_LOOPMODE_NORELOAD: _bindgen_ty_18 = 3; #[doc = "CSND loop modes."] +#[doc = ""] + pub type _bindgen_ty_18 = ::libc::c_uint; #[doc = "Linear interpolation."] +#[doc = ""] + pub const SOUND_LINEAR_INTERP: _bindgen_ty_19 = 64; #[doc = "Repeat the sound."] +#[doc = ""] + pub const SOUND_REPEAT: _bindgen_ty_19 = 1024; #[doc = "Play the sound once."] +#[doc = ""] + pub const SOUND_ONE_SHOT: _bindgen_ty_19 = 2048; #[doc = "PCM8"] +#[doc = ""] + pub const SOUND_FORMAT_8BIT: _bindgen_ty_19 = 0; #[doc = "PCM16"] +#[doc = ""] + pub const SOUND_FORMAT_16BIT: _bindgen_ty_19 = 4096; #[doc = "ADPCM"] +#[doc = ""] + pub const SOUND_FORMAT_ADPCM: _bindgen_ty_19 = 8192; #[doc = "PSG"] +#[doc = ""] + pub const SOUND_FORMAT_PSG: _bindgen_ty_19 = 12288; #[doc = "Enable sound."] +#[doc = ""] + pub const SOUND_ENABLE: _bindgen_ty_19 = 16384; #[doc = "Sound flags."] +#[doc = ""] + pub type _bindgen_ty_19 = ::libc::c_uint; #[doc = "Repeat capture."] +#[doc = ""] + pub const CAPTURE_REPEAT: _bindgen_ty_20 = 0; #[doc = "Capture once."] +#[doc = ""] + pub const CAPTURE_ONE_SHOT: _bindgen_ty_20 = 1; #[doc = "PCM16"] +#[doc = ""] + pub const CAPTURE_FORMAT_16BIT: _bindgen_ty_20 = 0; #[doc = "PCM8"] +#[doc = ""] + pub const CAPTURE_FORMAT_8BIT: _bindgen_ty_20 = 2; #[doc = "Enable capture."] +#[doc = ""] + pub const CAPTURE_ENABLE: _bindgen_ty_20 = 32768; #[doc = "Capture modes."] +#[doc = ""] + pub type _bindgen_ty_20 = ::libc::c_uint; #[doc = "0.0% duty cycle"] +#[doc = ""] + pub const DutyCycle_0: CSND_DutyCycle = 7; #[doc = "12.5% duty cycle"] +#[doc = ""] + pub const DutyCycle_12: CSND_DutyCycle = 0; #[doc = "25.0% duty cycle"] +#[doc = ""] + pub const DutyCycle_25: CSND_DutyCycle = 1; #[doc = "37.5% duty cycle"] +#[doc = ""] + pub const DutyCycle_37: CSND_DutyCycle = 2; #[doc = "50.0% duty cycle"] +#[doc = ""] + pub const DutyCycle_50: CSND_DutyCycle = 3; #[doc = "62.5% duty cycle"] +#[doc = ""] + pub const DutyCycle_62: CSND_DutyCycle = 4; #[doc = "75.0% duty cycle"] +#[doc = ""] + pub const DutyCycle_75: CSND_DutyCycle = 5; #[doc = "87.5% duty cycle"] +#[doc = ""] + pub const DutyCycle_87: CSND_DutyCycle = 6; #[doc = "Duty cycles for a PSG channel."] +#[doc = ""] + pub type CSND_DutyCycle = ::libc::c_uint; #[doc = "Channel info."] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub union CSND_ChnInfo { - #[doc = "Raw values."] +#[doc = "Raw values."] +#[doc = ""] + pub value: [u32_; 3usize], pub __bindgen_anon_1: CSND_ChnInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_ChnInfo__bindgen_ty_1 { - #[doc = "Channel active."] +#[doc = "Channel active."] +#[doc = ""] + pub active: u8_, - #[doc = "Padding."] +#[doc = "Padding."] +#[doc = ""] + pub _pad1: u8_, - #[doc = "Padding."] +#[doc = "Padding."] +#[doc = ""] + pub _pad2: u16_, - #[doc = "Current ADPCM sample."] +#[doc = "Current ADPCM sample."] +#[doc = ""] + pub adpcmSample: s16, - #[doc = "Current ADPCM index."] +#[doc = "Current ADPCM index."] +#[doc = ""] + pub adpcmIndex: u8_, - #[doc = "Padding."] +#[doc = "Padding."] +#[doc = ""] + pub _pad3: u8_, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unknownZero: u32_, } impl Default for CSND_ChnInfo { @@ -11040,23 +15719,35 @@ impl Default for CSND_ChnInfo { } } #[doc = "Capture info."] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub union CSND_CapInfo { - #[doc = "Raw values."] +#[doc = "Raw values."] +#[doc = ""] + pub value: [u32_; 2usize], pub __bindgen_anon_1: CSND_CapInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_CapInfo__bindgen_ty_1 { - #[doc = "Capture active."] +#[doc = "Capture active."] +#[doc = ""] + pub active: u8_, - #[doc = "Padding."] +#[doc = "Padding."] +#[doc = ""] + pub _pad1: u8_, - #[doc = "Padding."] +#[doc = "Padding."] +#[doc = ""] + pub _pad2: u16_, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unknownZero: u32_, } impl Default for CSND_CapInfo { @@ -11069,152 +15760,242 @@ impl Default for CSND_CapInfo { } } extern "C" { - #[doc = "CSND shared memory."] +#[doc = "CSND shared memory."] +#[doc = ""] + pub static mut csndSharedMem: *mut vu32; } extern "C" { - #[doc = "CSND shared memory size."] +#[doc = "CSND shared memory size."] +#[doc = ""] + pub static mut csndSharedMemSize: u32_; } extern "C" { - #[doc = "Bitmask of channels that are allowed for usage."] +#[doc = "Bitmask of channels that are allowed for usage."] +#[doc = ""] + pub static mut csndChannels: u32_; } extern "C" { #[must_use] - #[doc = "Acquires a capture unit."] - #[doc = "* capUnit Pointer to output the capture unit to."] +#[doc = "Acquires a capture unit."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Pointer to output the capture unit to."] + pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Releases a capture unit."] - #[doc = "* capUnit Capture unit to release."] +#[doc = "Releases a capture unit."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to release."] + pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes the data cache of a memory region."] - #[doc = "* adr Address of the memory region."] - #[doc = "* size Size of the memory region."] +#[doc = "Flushes the data cache of a memory region."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `adr` - Address of the memory region."] +#[doc = "* `size` - Size of the memory region."] + pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Stores the data cache of a memory region."] - #[doc = "* adr Address of the memory region."] - #[doc = "* size Size of the memory region."] +#[doc = "Stores the data cache of a memory region."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `adr` - Address of the memory region."] +#[doc = "* `size` - Size of the memory region."] + pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates the data cache of a memory region."] - #[doc = "* adr Address of the memory region."] - #[doc = "* size Size of the memory region."] +#[doc = "Invalidates the data cache of a memory region."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `adr` - Address of the memory region."] +#[doc = "* `size` - Size of the memory region."] + pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Resets CSND."] - #[doc = "Note: Currently breaks sound, don't use for now!"] +#[doc = "Resets CSND."] +#[doc = ""] +#[doc = "Note: Currently breaks sound, don't use for now!"] +#[doc = ""] + pub fn CSND_Reset() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes CSND."] +#[doc = "Initializes CSND."] +#[doc = ""] + pub fn csndInit() -> Result; } extern "C" { - #[doc = "Exits CSND."] +#[doc = "Exits CSND."] +#[doc = ""] + pub fn csndExit(); } extern "C" { - #[doc = "Adds a command to the list, returning a buffer to write arguments to."] - #[doc = "* cmdid ID of the command to add."] - #[doc = "A buffer to write command arguments to."] +#[doc = "Adds a command to the list, returning a buffer to write arguments to."] +#[doc = ""] +#[doc = "Returns: A buffer to write command arguments to."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cmdid` - ID of the command to add."] + pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32_; } extern "C" { - #[doc = "Adds a command to the list, copying its arguments from a buffer."] - #[doc = "* cmdid ID of the command to add."] - #[doc = "* cmdparams Buffer containing the command's parameters."] +#[doc = "Adds a command to the list, copying its arguments from a buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cmdid` - ID of the command to add."] +#[doc = "* `cmdparams` - Buffer containing the command's parameters."] + pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_); } extern "C" { #[must_use] - #[doc = "Executes pending CSND commands."] - #[doc = "* waitDone Whether to wait until the commands have finished executing."] +#[doc = "Executes pending CSND commands."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `waitDone` - Whether to wait until the commands have finished executing."] + pub fn csndExecCmds(waitDone: bool) -> Result; } extern "C" { - #[doc = "Sets a channel's play state, resetting registers on stop."] - #[doc = "* channel Channel to use."] - #[doc = "* value Play state to set."] +#[doc = "Sets a channel's play state, resetting registers on stop."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `value` - Play state to set."] + pub fn CSND_SetPlayStateR(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets a channel's play state."] - #[doc = "* channel Channel to use."] - #[doc = "* value Play state to set."] +#[doc = "Sets a channel's play state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `value` - Play state to set."] + pub fn CSND_SetPlayState(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets a channel's encoding."] - #[doc = "* channel Channel to use."] - #[doc = "* value Encoding to set."] +#[doc = "Sets a channel's encoding."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `value` - Encoding to set."] + pub fn CSND_SetEncoding(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets the data of a channel's block."] - #[doc = "* channel Channel to use."] - #[doc = "* block Block to set."] - #[doc = "* physaddr Physical address to set the block to."] - #[doc = "* size Size of the block."] +#[doc = "Sets the data of a channel's block."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `block` - Block to set."] +#[doc = "* `physaddr` - Physical address to set the block to."] +#[doc = "* `size` - Size of the block."] + pub fn CSND_SetBlock(channel: u32_, block: ::libc::c_int, physaddr: u32_, size: u32_); } extern "C" { - #[doc = "Sets whether to loop a channel."] - #[doc = "* channel Channel to use."] - #[doc = "* value Whether to loop the channel."] +#[doc = "Sets whether to loop a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `value` - Whether to loop the channel."] + pub fn CSND_SetLooping(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets bit 7 of a channel."] - #[doc = "* channel Channel to use."] - #[doc = "* set Value to set."] +#[doc = "Sets bit 7 of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `set` - Value to set."] + pub fn CSND_SetBit7(channel: u32_, set: bool); } extern "C" { - #[doc = "Sets whether a channel should use interpolation."] - #[doc = "* channel Channel to use."] - #[doc = "* interp Whether to use interpolation."] +#[doc = "Sets whether a channel should use interpolation."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `interp` - Whether to use interpolation."] + pub fn CSND_SetInterp(channel: u32_, interp: bool); } extern "C" { - #[doc = "Sets a channel's duty."] - #[doc = "* channel Channel to use."] - #[doc = "* duty Duty to set."] +#[doc = "Sets a channel's duty."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `duty` - Duty to set."] + pub fn CSND_SetDuty(channel: u32_, duty: CSND_DutyCycle); } extern "C" { - #[doc = "Sets a channel's timer."] - #[doc = "* channel Channel to use."] - #[doc = "* timer Timer to set."] +#[doc = "Sets a channel's timer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `timer` - Timer to set."] + pub fn CSND_SetTimer(channel: u32_, timer: u32_); } extern "C" { - #[doc = "Sets a channel's volume."] - #[doc = "* channel Channel to use."] - #[doc = "* chnVolumes Channel volume data to set."] - #[doc = "* capVolumes Capture volume data to set."] +#[doc = "Sets a channel's volume."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `chnVolumes` - Channel volume data to set."] +#[doc = "* `capVolumes` - Capture volume data to set."] + pub fn CSND_SetVol(channel: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { - #[doc = "Sets a channel's ADPCM state."] - #[doc = "* channel Channel to use."] - #[doc = "* block Current block."] - #[doc = "* sample Current sample."] - #[doc = "* index Current index."] +#[doc = "Sets a channel's ADPCM state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `block` - Current block."] +#[doc = "* `sample` - Current sample."] +#[doc = "* `index` - Current index."] + pub fn CSND_SetAdpcmState( channel: u32_, block: ::libc::c_int, @@ -11223,19 +16004,27 @@ extern "C" { ); } extern "C" { - #[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] - #[doc = "* channel Channel to use."] - #[doc = "* reload Whether to reload ADPCM data."] +#[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to use."] +#[doc = "* `reload` - Whether to reload ADPCM data."] + pub fn CSND_SetAdpcmReload(channel: u32_, reload: bool); } extern "C" { - #[doc = "Sets CSND's channel registers."] - #[doc = "* flags Flags to set."] - #[doc = "* physaddr0 Physical address of the first buffer to play."] - #[doc = "* physaddr1 Physical address of the second buffer to play."] - #[doc = "* totalbytesize Total size of the data to play."] - #[doc = "* chnVolumes Channel volume data."] - #[doc = "* capVolumes Capture volume data."] +#[doc = "Sets CSND's channel registers."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flags` - Flags to set."] +#[doc = "* `physaddr0` - Physical address of the first buffer to play."] +#[doc = "* `physaddr1` - Physical address of the second buffer to play."] +#[doc = "* `totalbytesize` - Total size of the data to play."] +#[doc = "* `chnVolumes` - Channel volume data."] +#[doc = "* `capVolumes` - Capture volume data."] + pub fn CSND_SetChnRegs( flags: u32_, physaddr0: u32_, @@ -11246,11 +16035,15 @@ extern "C" { ); } extern "C" { - #[doc = "Sets CSND's PSG channel registers."] - #[doc = "* flags Flags to set."] - #[doc = "* chnVolumes Channel volume data."] - #[doc = "* capVolumes Capture volume data."] - #[doc = "* duty Duty value to set."] +#[doc = "Sets CSND's PSG channel registers."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flags` - Flags to set."] +#[doc = "* `chnVolumes` - Channel volume data."] +#[doc = "* `capVolumes` - Capture volume data."] +#[doc = "* `duty` - Duty value to set."] + pub fn CSND_SetChnRegsPSG( flags: u32_, chnVolumes: u32_, @@ -11259,82 +16052,127 @@ extern "C" { ); } extern "C" { - #[doc = "Sets CSND's noise channel registers."] - #[doc = "* flags Flags to set."] - #[doc = "* chnVolumes Channel volume data."] - #[doc = "* capVolumes Capture volume data."] +#[doc = "Sets CSND's noise channel registers."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flags` - Flags to set."] +#[doc = "* `chnVolumes` - Channel volume data."] +#[doc = "* `capVolumes` - Capture volume data."] + pub fn CSND_SetChnRegsNoise(flags: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { - #[doc = "Sets whether a capture unit is enabled."] - #[doc = "* capUnit Capture unit to use."] - #[doc = "* enable Whether to enable the capture unit."] +#[doc = "Sets whether a capture unit is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to use."] +#[doc = "* `enable` - Whether to enable the capture unit."] + pub fn CSND_CapEnable(capUnit: u32_, enable: bool); } extern "C" { - #[doc = "Sets whether a capture unit should repeat."] - #[doc = "* capUnit Capture unit to use."] - #[doc = "* repeat Whether the capture unit should repeat."] +#[doc = "Sets whether a capture unit should repeat."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to use."] +#[doc = "* `repeat` - Whether the capture unit should repeat."] + pub fn CSND_CapSetRepeat(capUnit: u32_, repeat: bool); } extern "C" { - #[doc = "Sets a capture unit's format."] - #[doc = "* capUnit Capture unit to use."] - #[doc = "* eightbit Format to use."] +#[doc = "Sets a capture unit's format."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to use."] +#[doc = "* `eightbit` - Format to use."] + pub fn CSND_CapSetFormat(capUnit: u32_, eightbit: bool); } extern "C" { - #[doc = "Sets a capture unit's second bit."] - #[doc = "* capUnit Capture unit to use."] - #[doc = "* set Value to set."] +#[doc = "Sets a capture unit's second bit."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to use."] +#[doc = "* `set` - Value to set."] + pub fn CSND_CapSetBit2(capUnit: u32_, set: bool); } extern "C" { - #[doc = "Sets a capture unit's timer."] - #[doc = "* capUnit Capture unit to use."] - #[doc = "* timer Timer to set."] +#[doc = "Sets a capture unit's timer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to use."] +#[doc = "* `timer` - Timer to set."] + pub fn CSND_CapSetTimer(capUnit: u32_, timer: u32_); } extern "C" { - #[doc = "Sets a capture unit's buffer."] - #[doc = "* capUnit Capture unit to use."] - #[doc = "* addr Buffer address to use."] - #[doc = "* size Size of the buffer."] +#[doc = "Sets a capture unit's buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to use."] +#[doc = "* `addr` - Buffer address to use."] +#[doc = "* `size` - Size of the buffer."] + pub fn CSND_CapSetBuffer(capUnit: u32_, addr: u32_, size: u32_); } extern "C" { - #[doc = "Sets a capture unit's capture registers."] - #[doc = "* capUnit Capture unit to use."] - #[doc = "* flags Capture unit flags."] - #[doc = "* addr Capture unit buffer address."] - #[doc = "* size Buffer size."] +#[doc = "Sets a capture unit's capture registers."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to use."] +#[doc = "* `flags` - Capture unit flags."] +#[doc = "* `addr` - Capture unit buffer address."] +#[doc = "* `size` - Buffer size."] + pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_); } extern "C" { #[must_use] - #[doc = "Sets up DSP flags."] - #[doc = "* waitDone Whether to wait for completion."] +#[doc = "Sets up DSP flags."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `waitDone` - Whether to wait for completion."] + pub fn CSND_SetDspFlags(waitDone: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Updates CSND information."] - #[doc = "* waitDone Whether to wait for completion."] +#[doc = "Updates CSND information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `waitDone` - Whether to wait for completion."] + pub fn CSND_UpdateInfo(waitDone: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Plays a sound."] - #[doc = "* chn Channel to play the sound on."] - #[doc = "* flags Flags containing information about the sound."] - #[doc = "* sampleRate Sample rate of the sound."] - #[doc = "* vol The volume, ranges from 0.0 to 1.0 included."] - #[doc = "* pan The pan, ranges from -1.0 to 1.0 included."] - #[doc = "* data0 First block of sound data."] - #[doc = "* data1 Second block of sound data. This is the block that will be looped over."] - #[doc = "* size Size of the sound data."] - #[doc = ""] - #[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] +#[doc = "Plays a sound."] +#[doc = ""] +#[doc = ""] +#[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `chn` - Channel to play the sound on."] +#[doc = "* `flags` - Flags containing information about the sound."] +#[doc = "* `sampleRate` - Sample rate of the sound."] +#[doc = "* `vol` - The volume, ranges from 0.0 to 1.0 included."] +#[doc = "* `pan` - The pan, ranges from -1.0 to 1.0 included."] +#[doc = "* `data0` - First block of sound data."] +#[doc = "* `data1` - Second block of sound data. This is the block that will be looped over."] +#[doc = "* `size` - Size of the sound data."] + pub fn csndPlaySound( chn: ::libc::c_int, flags: u32_, @@ -11347,61 +16185,106 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Gets CSND's DSP flags."] - #[doc = "Note: Requires previous CSND_UpdateInfo()"] - #[doc = "* outSemFlags Pointer to write semaphore flags to."] - #[doc = "* outIrqFlags Pointer to write interrupt flags to."] +#[doc = "Gets CSND's DSP flags."] +#[doc = ""] +#[doc = "Note: Requires previous CSND_UpdateInfo()"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `outSemFlags` - Pointer to write semaphore flags to."] +#[doc = "* `outIrqFlags` - Pointer to write interrupt flags to."] + pub fn csndGetDspFlags(outSemFlags: *mut u32_, outIrqFlags: *mut u32_); } extern "C" { - #[doc = "Gets a channel's information."] - #[doc = "Note: Requires previous CSND_UpdateInfo()"] - #[doc = "* channel Channel to get information for."] - #[doc = "The channel's information."] +#[doc = "Gets a channel's information."] +#[doc = ""] +#[doc = "Note: Requires previous CSND_UpdateInfo()"] +#[doc = ""] +#[doc = "Returns: The channel's information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to get information for."] + pub fn csndGetChnInfo(channel: u32_) -> *mut CSND_ChnInfo; } extern "C" { - #[doc = "Gets a capture unit's information."] - #[doc = "Note: Requires previous CSND_UpdateInfo()"] - #[doc = "* capUnit Capture unit to get information for."] - #[doc = "The capture unit's information."] +#[doc = "Gets a capture unit's information."] +#[doc = ""] +#[doc = "Note: Requires previous CSND_UpdateInfo()"] +#[doc = ""] +#[doc = "Returns: The capture unit's information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capUnit` - Capture unit to get information for."] + pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo; } extern "C" { #[must_use] - #[doc = "Gets a channel's state."] - #[doc = "* channel Channel to get the state of."] - #[doc = "* out Pointer to output channel information to."] +#[doc = "Gets a channel's state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to get the state of."] +#[doc = "* `out` - Pointer to output channel information to."] + pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether a channel is playing."] - #[doc = "* channel Channel to check."] - #[doc = "* status Pointer to output the channel status to."] +#[doc = "Gets whether a channel is playing."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Channel to check."] +#[doc = "* `status` - Pointer to output the channel status to."] + pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result; } #[doc = "Pipe interrupt."] +#[doc = ""] + pub const DSP_INTERRUPT_PIPE: DSP_InterruptType = 2; #[doc = "DSP interrupt types."] +#[doc = ""] + pub type DSP_InterruptType = ::libc::c_uint; #[doc = "DSP is going to sleep."] +#[doc = ""] + pub const DSPHOOK_ONSLEEP: DSP_HookType = 0; #[doc = "DSP is waking up."] +#[doc = ""] + pub const DSPHOOK_ONWAKEUP: DSP_HookType = 1; #[doc = "DSP was sleeping and the app was cancelled."] +#[doc = ""] + pub const DSPHOOK_ONCANCEL: DSP_HookType = 2; #[doc = "DSP hook types."] +#[doc = ""] + pub type DSP_HookType = ::libc::c_uint; #[doc = "DSP hook function."] +#[doc = ""] + pub type dspHookFn = ::core::option::Option; #[doc = "DSP hook cookie."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_dspHookCookie { - #[doc = "Next cookie."] +#[doc = "Next cookie."] +#[doc = ""] + pub next: *mut tag_dspHookCookie, - #[doc = "Hook callback."] +#[doc = "Hook callback."] +#[doc = ""] + pub callback: dspHookFn, } impl Default for tag_dspHookCookie { @@ -11414,89 +16297,133 @@ impl Default for tag_dspHookCookie { } } #[doc = "DSP hook cookie."] +#[doc = ""] + pub type dspHookCookie = tag_dspHookCookie; extern "C" { #[must_use] - #[doc = "Initializes the dsp service."] - #[doc = ""] - #[doc = "Call this before calling any DSP_* function."] - #[doc = "This will also unload any previously loaded DSP binary."] - #[doc = " It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] +#[doc = "Initializes the dsp service."] +#[doc = ""] +#[doc = ""] +#[doc = "Call this before calling any DSP_* function."] +#[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] +#[doc = ""] + pub fn dspInit() -> Result; } extern "C" { - #[doc = "Closes the dsp service."] - #[doc = "This will also unload the DSP binary."] +#[doc = "Closes the dsp service."] +#[doc = ""] + pub fn dspExit(); } extern "C" { - #[doc = "Returns true if a component is loaded, false otherwise."] +#[doc = "Returns true if a component is loaded, false otherwise."] +#[doc = ""] + pub fn dspIsComponentLoaded() -> bool; } extern "C" { - #[doc = "Sets up a DSP status hook."] - #[doc = "* cookie Hook cookie to use."] - #[doc = "* callback Function to call when DSP's status changes."] +#[doc = "Sets up a DSP status hook."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cookie` - Hook cookie to use."] +#[doc = "* `callback` - Function to call when DSP's status changes."] + pub fn dspHook(cookie: *mut dspHookCookie, callback: dspHookFn); } extern "C" { - #[doc = "Removes a DSP status hook."] - #[doc = "* cookie Hook cookie to remove."] +#[doc = "Removes a DSP status hook."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cookie` - Hook cookie to remove."] + pub fn dspUnhook(cookie: *mut dspHookCookie); } extern "C" { #[must_use] - #[doc = "Checks if a headphone is inserted."] - #[doc = "* is_inserted Pointer to output the insertion status to."] +#[doc = "Checks if a headphone is inserted."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `is_inserted` - Pointer to output the insertion status to."] + pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes the cache"] - #[doc = "* address Beginning of the memory range to flush, inside the Linear or DSP memory regions"] - #[doc = "* size Size of the memory range to flush"] - #[doc = ""] - #[doc = "Flushes the cache for the specified memory range and invalidates the cache"] +#[doc = "Flushes the cache"] +#[doc = ""] +#[doc = ""] +#[doc = "Flushes the cache for the specified memory range and invalidates the cache"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] +#[doc = "* `size` - Size of the memory range to flush"] + pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates the cache"] - #[doc = "* address Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] - #[doc = "* size Size of the memory range to flush"] - #[doc = ""] - #[doc = "Invalidates the cache for the specified memory range"] +#[doc = "Invalidates the cache"] +#[doc = ""] +#[doc = ""] +#[doc = "Invalidates the cache for the specified memory range"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] +#[doc = "* `size` - Size of the memory range to flush"] + pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves the handle of the DSP semaphore."] - #[doc = "* semaphore Pointer to output the semaphore to."] +#[doc = "Retrieves the handle of the DSP semaphore."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `semaphore` - Pointer to output the semaphore to."] + pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the DSP hardware semaphore value."] - #[doc = "* value Value to set."] +#[doc = "Sets the DSP hardware semaphore value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Value to set."] + pub fn DSP_SetSemaphore(value: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Masks the DSP hardware semaphore value."] - #[doc = "* mask Mask to apply."] +#[doc = "Masks the DSP hardware semaphore value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mask` - Mask to apply."] + pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Loads a DSP binary and starts the DSP"] - #[doc = "* component The program file address in memory"] - #[doc = "* size The size of the program"] - #[doc = "* prog_mask DSP memory block related ? Default is 0xff."] - #[doc = "* data_mask DSP memory block related ? Default is 0xff."] - #[doc = "* is_loaded Indicates if the DSP was succesfully loaded."] - #[doc = ""] - #[doc = "The binary must be signed (http://3dbrew.org/wiki/DSP_Binary)"] - #[doc = "Seems to be called when the 3ds leaves the Sleep mode"] +#[doc = "Loads a DSP binary and starts the DSP"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `component` - The program file address in memory"] +#[doc = "* `size` - The size of the program"] +#[doc = "* `prog_mask` - DSP memory block related ? Default is 0xff."] +#[doc = "* `data_mask` - DSP memory block related ? Default is 0xff."] +#[doc = "* `is_loaded` - Indicates if the DSP was succesfully loaded."] + pub fn DSP_LoadComponent( component: *const ::libc::c_void, size: u32_, @@ -11507,27 +16434,37 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Stops the DSP by unloading the binary."] +#[doc = "Stops the DSP by unloading the binary."] +#[doc = ""] + pub fn DSP_UnloadComponent() -> Result; } extern "C" { #[must_use] - #[doc = "Registers an event handle with the DSP through IPC"] - #[doc = "* handle Event handle to register."] - #[doc = "* interrupt The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] - #[doc = "* channel The pipe channel. Usual value is 2"] - #[doc = ""] - #[doc = "It is possible that interrupt are inverted"] +#[doc = "Registers an event handle with the DSP through IPC"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Event handle to register."] +#[doc = "* `interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] +#[doc = "* `channel` - The pipe channel. Usual value is 2"] + pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Reads a pipe if possible."] - #[doc = "* channel unknown. Usually 2"] - #[doc = "* peer unknown. Usually 0"] - #[doc = "* buffer The buffer that will store the values read from the pipe"] - #[doc = "* length Length of the buffer"] - #[doc = "* length_read Number of bytes read by the command"] +#[doc = "Reads a pipe if possible."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - unknown. Usually 2"] +#[doc = "* `peer` - unknown. Usually 0"] +#[doc = "* `buffer` - The buffer that will store the values read from the pipe"] +#[doc = "* `length` - Length of the buffer"] +#[doc = "* `length_read` - Number of bytes read by the command"] + pub fn DSP_ReadPipeIfPossible( channel: u32_, peer: u32_, @@ -11538,10 +16475,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a pipe."] - #[doc = "* channel unknown. Usually 2"] - #[doc = "* buffer The message to send to the DSP process"] - #[doc = "* length Length of the message"] +#[doc = "Writes to a pipe."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - unknown. Usually 2"] +#[doc = "* `buffer` - The message to send to the DSP process"] +#[doc = "* `length` - Length of the message"] + pub fn DSP_WriteProcessPipe( channel: u32_, buffer: *const ::libc::c_void, @@ -11550,9 +16491,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Converts a DSP memory address to a virtual address usable by the process."] - #[doc = "* dsp_address Address to convert."] - #[doc = "* arm_address Pointer to output the converted address to."] +#[doc = "Converts a DSP memory address to a virtual address usable by the process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dsp_address` - Address to convert."] +#[doc = "* `arm_address` - Pointer to output the converted address to."] + pub fn DSP_ConvertProcessAddressFromDspDram( dsp_address: u32_, arm_address: *mut u32_, @@ -11560,34 +16505,50 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads a DSP register"] - #[doc = "* regNo Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* value Pointer to read the register value to."] +#[doc = "Reads a DSP register"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "* `value` - Pointer to read the register value to."] + pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if you can read a DSP register"] - #[doc = "* regNo Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* is_ready Pointer to write the ready status to."] - #[doc = ""] - #[doc = "@warning This call might hang if the data is not ready. See DSP_SendDataIsEmpty."] +#[doc = "Checks if you can read a DSP register"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "* `is_ready` - Pointer to write the ready status to."] + pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to a DSP register"] - #[doc = "* regNo Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* value Value to write."] - #[doc = ""] - #[doc = "@warning This call might hang if the SendData is not empty. See DSP_SendDataIsEmpty."] +#[doc = "Writes to a DSP register"] +#[doc = ""] +#[doc = ""] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "* `value` - Value to write."] + pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if you can write to a DSP register ?"] - #[doc = "* regNo Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* is_empty Pointer to write the empty status to."] +#[doc = "Checks if you can write to a DSP register ?"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "* `is_empty` - Pointer to write the empty status to."] + pub fn DSP_SendDataIsEmpty(regNo: u16_, is_empty: *mut bool) -> Result; } pub type FSPXI_Archive = u64_; @@ -11595,12 +16556,16 @@ pub type FSPXI_File = u64_; pub type FSPXI_Directory = u64_; extern "C" { #[must_use] - #[doc = "Opens a file."] - #[doc = "* out Pointer to output the file handle to."] - #[doc = "* archive Archive containing the file."] - #[doc = "* path Path of the file."] - #[doc = "* flags Flags to open the file with."] - #[doc = "* attributes Attributes of the file."] +#[doc = "Opens a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the file handle to."] +#[doc = "* `archive` - Archive containing the file."] +#[doc = "* `path` - Path of the file."] +#[doc = "* `flags` - Flags to open the file with."] +#[doc = "* `attributes` - Attributes of the file."] + pub fn FSPXI_OpenFile( serviceHandle: Handle, out: *mut FSPXI_File, @@ -11612,19 +16577,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a file."] - #[doc = "* archive Archive containing the file."] - #[doc = "* path Path of the file."] +#[doc = "Deletes a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive containing the file."] +#[doc = "* `path` - Path of the file."] + pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Renames a file."] - #[doc = "* srcArchive Archive containing the source file."] - #[doc = "* srcPath Path of the source file."] - #[doc = "* dstArchive Archive containing the destination file."] - #[doc = "* dstPath Path of the destination file."] +#[doc = "Renames a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `srcArchive` - Archive containing the source file."] +#[doc = "* `srcPath` - Path of the source file."] +#[doc = "* `dstArchive` - Archive containing the destination file."] +#[doc = "* `dstPath` - Path of the destination file."] + pub fn FSPXI_RenameFile( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -11635,9 +16608,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a directory."] - #[doc = "* archive Archive containing the directory."] - #[doc = "* path Path of the directory."] +#[doc = "Deletes a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive containing the directory."] +#[doc = "* `path` - Path of the directory."] + pub fn FSPXI_DeleteDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -11646,11 +16623,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a file."] - #[doc = "* archive Archive to create the file in."] - #[doc = "* path Path of the file."] - #[doc = "* attributes Attributes of the file."] - #[doc = "* size Size of the file."] +#[doc = "Creates a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to create the file in."] +#[doc = "* `path` - Path of the file."] +#[doc = "* `attributes` - Attributes of the file."] +#[doc = "* `size` - Size of the file."] + pub fn FSPXI_CreateFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -11661,10 +16642,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a directory."] - #[doc = "* archive Archive to create the directory in."] - #[doc = "* path Path of the directory."] - #[doc = "* attributes Attributes of the directory."] +#[doc = "Creates a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to create the directory in."] +#[doc = "* `path` - Path of the directory."] +#[doc = "* `attributes` - Attributes of the directory."] + pub fn FSPXI_CreateDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -11674,11 +16659,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Renames a directory."] - #[doc = "* srcArchive Archive containing the source directory."] - #[doc = "* srcPath Path of the source directory."] - #[doc = "* dstArchive Archive containing the destination directory."] - #[doc = "* dstPath Path of the destination directory."] +#[doc = "Renames a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `srcArchive` - Archive containing the source directory."] +#[doc = "* `srcPath` - Path of the source directory."] +#[doc = "* `dstArchive` - Archive containing the destination directory."] +#[doc = "* `dstPath` - Path of the destination directory."] + pub fn FSPXI_RenameDirectory( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -11689,10 +16678,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a directory."] - #[doc = "* out Pointer to output the directory handle to."] - #[doc = "* archive Archive containing the directory."] - #[doc = "* path Path of the directory."] +#[doc = "Opens a directory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the directory handle to."] +#[doc = "* `archive` - Archive containing the directory."] +#[doc = "* `path` - Path of the directory."] + pub fn FSPXI_OpenDirectory( serviceHandle: Handle, out: *mut FSPXI_Directory, @@ -11702,12 +16695,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a file."] - #[doc = "* file File to read from."] - #[doc = "* bytesRead Pointer to output the number of read bytes to."] - #[doc = "* offset Offset to read from."] - #[doc = "* buffer Buffer to read to."] - #[doc = "* size Size of the buffer."] +#[doc = "Reads from a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to read from."] +#[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] +#[doc = "* `offset` - Offset to read from."] +#[doc = "* `buffer` - Buffer to read to."] +#[doc = "* `size` - Size of the buffer."] + pub fn FSPXI_ReadFile( serviceHandle: Handle, file: FSPXI_File, @@ -11719,10 +16716,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Calculate SHA256 of a file."] - #[doc = "* file File to calculate the hash of."] - #[doc = "* buffer Buffer to output the hash to."] - #[doc = "* size Size of the buffer."] +#[doc = "Calculate SHA256 of a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to calculate the hash of."] +#[doc = "* `buffer` - Buffer to output the hash to."] +#[doc = "* `size` - Size of the buffer."] + pub fn FSPXI_CalculateFileHashSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -11732,13 +16733,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a file."] - #[doc = "* file File to write to."] - #[doc = "* bytesWritten Pointer to output the number of bytes written to."] - #[doc = "* offset Offset to write to."] - #[doc = "* buffer Buffer to write from."] - #[doc = "* size Size of the buffer."] - #[doc = "* flags Flags to use when writing."] +#[doc = "Writes to a file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to write to."] +#[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] +#[doc = "* `offset` - Offset to write to."] +#[doc = "* `buffer` - Buffer to write from."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `flags` - Flags to use when writing."] + pub fn FSPXI_WriteFile( serviceHandle: Handle, file: FSPXI_File, @@ -11751,12 +16756,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Calculates the MAC used in a DISA/DIFF header?"] - #[doc = "* file Unsure"] - #[doc = "* inBuffer 0x100-byte DISA/DIFF input buffer."] - #[doc = "* inSize Size of inBuffer."] - #[doc = "* outBuffer Buffer to write MAC to."] - #[doc = "* outSize Size of outBuffer."] +#[doc = "Calculates the MAC used in a DISA/DIFF header?"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - Unsure"] +#[doc = "* `inBuffer` - 0x100-byte DISA/DIFF input buffer."] +#[doc = "* `inSize` - Size of inBuffer."] +#[doc = "* `outBuffer` - Buffer to write MAC to."] +#[doc = "* `outSize` - Size of outBuffer."] + pub fn FSPXI_CalcSavegameMAC( serviceHandle: Handle, file: FSPXI_File, @@ -11768,31 +16777,47 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get size of a file"] - #[doc = "* file File to get the size of."] - #[doc = "* size Pointer to output size to."] +#[doc = "Get size of a file"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to get the size of."] +#[doc = "* `size` - Pointer to output size to."] + pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Set size of a file"] - #[doc = "* file File to set the size of"] - #[doc = "* size Size to set the file to"] +#[doc = "Set size of a file"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to set the size of"] +#[doc = "* `size` - Size to set the file to"] + pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Close a file"] - #[doc = "* file File to close"] +#[doc = "Close a file"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to close"] + pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result; } extern "C" { #[must_use] - #[doc = "Reads one or more directory entries."] - #[doc = "* directory Directory to read from."] - #[doc = "* entriesRead Pointer to output the number of entries read to."] - #[doc = "* entryCount Number of entries to read."] - #[doc = "* entryOut Pointer to output directory entries to."] +#[doc = "Reads one or more directory entries."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `directory` - Directory to read from."] +#[doc = "* `entriesRead` - Pointer to output the number of entries read to."] +#[doc = "* `entryCount` - Number of entries to read."] +#[doc = "* `entryOut` - Pointer to output directory entries to."] + pub fn FSPXI_ReadDirectory( serviceHandle: Handle, directory: FSPXI_Directory, @@ -11803,16 +16828,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Close a directory"] - #[doc = "* directory Directory to close."] +#[doc = "Close a directory"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `directory` - Directory to close."] + pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result; } extern "C" { #[must_use] - #[doc = "Opens an archive."] - #[doc = "* archive Pointer to output the opened archive to."] - #[doc = "* id ID of the archive."] - #[doc = "* path Path of the archive."] +#[doc = "Opens an archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Pointer to output the opened archive to."] +#[doc = "* `id` - ID of the archive."] +#[doc = "* `path` - Path of the archive."] + pub fn FSPXI_OpenArchive( serviceHandle: Handle, archive: *mut FSPXI_Archive, @@ -11822,10 +16855,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks if the archive contains a file at path."] - #[doc = "* archive Archive to check."] - #[doc = "* out Pointer to output existence to."] - #[doc = "* path Path to check for file"] +#[doc = "Checks if the archive contains a file at path."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to check."] +#[doc = "* `out` - Pointer to output existence to."] +#[doc = "* `path` - Path to check for file"] + pub fn FSPXI_HasFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -11835,10 +16872,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks if the archive contains a directory at path."] - #[doc = "* archive Archive to check."] - #[doc = "* out Pointer to output existence to."] - #[doc = "* path Path to check for directory"] +#[doc = "Checks if the archive contains a directory at path."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to check."] +#[doc = "* `out` - Pointer to output existence to."] +#[doc = "* `path` - Path to check for directory"] + pub fn FSPXI_HasDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -11848,23 +16889,34 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Commits an archive's save data."] - #[doc = "* archive Archive to commit."] - #[doc = "* id Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] - #[doc = "@remark Unsure why id is sent. This appears to be the default action for FSUSER_ControlArchive, with every action other than 0 and 0x789D being sent to this command."] +#[doc = "Commits an archive's save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to commit."] +#[doc = "* `id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] + pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Close an archive"] - #[doc = "* archive Archive to close."] +#[doc = "Close an archive"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive to close."] + pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] - #[doc = "* archive Archive handle to check validity of."] - #[doc = "* out Pointer to output validity to."] +#[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - Archive handle to check validity of."] +#[doc = "* `out` - Pointer to output validity to."] + pub fn FSPXI_Unknown0x17( serviceHandle: Handle, archive: FSPXI_Archive, @@ -11873,14 +16925,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the inserted card type."] - #[doc = "* out Pointer to output the card type to."] +#[doc = "Gets the inserted card type."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the card type to."] + pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC archive resource information."] - #[doc = "* out Pointer to output the archive resource information to."] +#[doc = "Gets the SDMC archive resource information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the archive resource information to."] + pub fn FSPXI_GetSdmcArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -11888,8 +16948,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the NAND archive resource information."] - #[doc = "* out Pointer to output the archive resource information to."] +#[doc = "Gets the NAND archive resource information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the archive resource information to."] + pub fn FSPXI_GetNandArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -11897,107 +16961,171 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the error code from the SDMC FatFS driver"] - #[doc = "* out Pointer to output the error code to"] +#[doc = "Gets the error code from the SDMC FatFS driver"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the error code to"] + pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether PXIFS0 detects the SD"] - #[doc = "* out Pointer to output the detection status to"] +#[doc = "Gets whether PXIFS0 detects the SD"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the detection status to"] + pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether PXIFS0 can write to the SD"] - #[doc = "* out Pointer to output the writable status to"] +#[doc = "Gets whether PXIFS0 can write to the SD"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the writable status to"] + pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC CID"] - #[doc = "* out Buffer to output the CID to."] - #[doc = "* size Size of buffer."] +#[doc = "Gets the SDMC CID"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Buffer to output the CID to."] +#[doc = "* `size` - Size of buffer."] + pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND CID"] - #[doc = "* out Buffer to output the CID to."] - #[doc = "* size Size of buffer."] +#[doc = "Gets the NAND CID"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Buffer to output the CID to."] +#[doc = "* `size` - Size of buffer."] + pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC speed info"] - #[doc = "* out Buffer to output the speed info to."] +#[doc = "Gets the SDMC speed info"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Buffer to output the speed info to."] + pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND speed info"] - #[doc = "* out Buffer to output the speed info to."] +#[doc = "Gets the NAND speed info"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Buffer to output the speed info to."] + pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC log"] - #[doc = "* out Buffer to output the log to."] - #[doc = "* size Size of buffer."] +#[doc = "Gets the SDMC log"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Buffer to output the log to."] +#[doc = "* `size` - Size of buffer."] + pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND log"] - #[doc = "* out Buffer to output the log to."] - #[doc = "* size Size of buffer."] +#[doc = "Gets the NAND log"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Buffer to output the log to."] +#[doc = "* `size` - Size of buffer."] + pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the SDMC log"] +#[doc = "Clears the SDMC log"] +#[doc = ""] + pub fn FSPXI_ClearSdmcLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the NAND log"] +#[doc = "Clears the NAND log"] +#[doc = ""] + pub fn FSPXI_ClearNandLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether a card is inserted."] - #[doc = "* inserted Pointer to output the insertion status to."] +#[doc = "Gets whether a card is inserted."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inserted` - Pointer to output the insertion status to."] + pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers on the card slot."] - #[doc = "* status Pointer to output the power status to."] +#[doc = "Powers on the card slot."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `status` - Pointer to output the power status to."] + pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers off the card slot."] - #[doc = "* status Pointer to output the power status to."] +#[doc = "Powers off the card slot."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `status` - Pointer to output the power status to."] + pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the card's power status."] - #[doc = "* status Pointer to output the power status to."] +#[doc = "Gets the card's power status."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `status` - Pointer to output the power status to."] + pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command."] - #[doc = "* commandId ID of the command."] +#[doc = "Executes a CARDNOR direct command."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] + pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command with an address."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] +#[doc = "Executes a CARDNOR direct command with an address."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] + pub fn FSPXI_CardNorDirectCommandWithAddress( serviceHandle: Handle, commandId: u8_, @@ -12006,10 +17134,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read."] - #[doc = "* commandId ID of the command."] - #[doc = "* size Size of the output buffer."] - #[doc = "* output Output buffer."] +#[doc = "Executes a CARDNOR direct read."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `size` - Size of the output buffer."] +#[doc = "* `output` - Output buffer."] + pub fn FSPXI_CardNorDirectRead( serviceHandle: Handle, commandId: u8_, @@ -12019,11 +17151,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read with an address."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the output buffer."] - #[doc = "* output Output buffer."] +#[doc = "Executes a CARDNOR direct read with an address."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the output buffer."] +#[doc = "* `output` - Output buffer."] + pub fn FSPXI_CardNorDirectReadWithAddress( serviceHandle: Handle, commandId: u8_, @@ -12034,11 +17170,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write."] - #[doc = "* commandId ID of the command."] - #[doc = "* size Size of the input buffer."] - #[doc = "* output Input buffer."] - #[doc = "@remark Stubbed in latest firmware, since ?.?.?"] +#[doc = "Executes a CARDNOR direct write."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `size` - Size of the input buffer."] +#[doc = "* `output` - Input buffer."] + pub fn FSPXI_CardNorDirectWrite( serviceHandle: Handle, commandId: u8_, @@ -12048,11 +17187,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write with an address."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the input buffer."] - #[doc = "* input Input buffer."] +#[doc = "Executes a CARDNOR direct write with an address."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the input buffer."] +#[doc = "* `input` - Input buffer."] + pub fn FSPXI_CardNorDirectWriteWithAddress( serviceHandle: Handle, commandId: u8_, @@ -12063,11 +17206,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR 4xIO direct read."] - #[doc = "* commandId ID of the command."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the output buffer."] - #[doc = "* output Output buffer."] +#[doc = "Executes a CARDNOR 4xIO direct read."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `commandId` - ID of the command."] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the output buffer."] +#[doc = "* `output` - Output buffer."] + pub fn FSPXI_CardNorDirectRead_4xIO( serviceHandle: Handle, commandId: u8_, @@ -12078,10 +17225,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct CPU write without verify."] - #[doc = "* address Address to provide."] - #[doc = "* size Size of the input buffer."] - #[doc = "* output Input buffer."] +#[doc = "Executes a CARDNOR direct CPU write without verify."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `address` - Address to provide."] +#[doc = "* `size` - Size of the input buffer."] +#[doc = "* `output` - Input buffer."] + pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify( serviceHandle: Handle, address: u32_, @@ -12091,8 +17242,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct sector erase without verify."] - #[doc = "* address Address to provide."] +#[doc = "Executes a CARDNOR direct sector erase without verify."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `address` - Address to provide."] + pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify( serviceHandle: Handle, address: u32_, @@ -12100,9 +17255,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an NCCH's product info"] - #[doc = "* info Pointer to output the product info to."] - #[doc = "* archive Open NCCH content archive"] +#[doc = "Gets an NCCH's product info"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Pointer to output the product info to."] +#[doc = "* `archive` - Open NCCH content archive"] + pub fn FSPXI_GetProductInfo( serviceHandle: Handle, info: *mut FS_ProductInfo, @@ -12111,43 +17270,67 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI baud rate."] - #[doc = "* baudRate Baud rate to set."] +#[doc = "Sets the CARDSPI baud rate."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `baudRate` - Baud rate to set."] + pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI bus mode."] - #[doc = "* busMode Bus mode to set."] +#[doc = "Sets the CARDSPI bus mode."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `busMode` - Bus mode to set."] + pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] - #[doc = "Sends initialization info to ARM9"] - #[doc = "* unk FS sends *(0x1FF81086)"] +#[doc = "Sends initialization info to ARM9"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `unk` - FS sends *(0x1FF81086)"] + pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates ext save data."] - #[doc = "* info Info of the save data."] +#[doc = "Creates ext save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Info of the save data."] + pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes ext save data."] - #[doc = "* info Info of the save data."] +#[doc = "Deletes ext save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Info of the save data."] + pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Enumerates ext save data."] - #[doc = "* idsWritten Pointer to output the number of IDs written to."] - #[doc = "* idsSize Size of the IDs buffer."] - #[doc = "* mediaType Media type to enumerate over."] - #[doc = "* idSize Size of each ID element."] - #[doc = "* shared Whether to enumerate shared ext save data."] - #[doc = "* ids Pointer to output IDs to."] +#[doc = "Enumerates ext save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "* `idsSize` - Size of the IDs buffer."] +#[doc = "* `mediaType` - Media type to enumerate over."] +#[doc = "* `idSize` - Size of each ID element."] +#[doc = "* `shared` - Whether to enumerate shared ext save data."] +#[doc = "* `ids` - Pointer to output IDs to."] + pub fn FSPXI_EnumerateExtSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -12160,11 +17343,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a special content's index."] - #[doc = "* index Pointer to output the index to."] - #[doc = "* mediaType Media type of the special content."] - #[doc = "* programId Program ID owning the special content."] - #[doc = "* type Type of special content."] +#[doc = "Gets a special content's index."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `index` - Pointer to output the index to."] +#[doc = "* `mediaType` - Media type of the special content."] +#[doc = "* `programId` - Program ID owning the special content."] +#[doc = "* `type` - Type of special content."] + pub fn FSPXI_GetSpecialContentIndex( serviceHandle: Handle, index: *mut u16_, @@ -12175,10 +17362,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy ROM header of a program."] - #[doc = "* mediaType Media type of the program."] - #[doc = "* programId ID of the program."] - #[doc = "* header Pointer to output the legacy ROM header to. (size = 0x3B4)"] +#[doc = "Gets the legacy ROM header of a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Media type of the program."] +#[doc = "* `programId` - ID of the program."] +#[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] + pub fn FSPXI_GetLegacyRomHeader( serviceHandle: Handle, mediaType: FS_MediaType, @@ -12188,11 +17379,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy banner data of a program."] - #[doc = "* mediaType Media type of the program."] - #[doc = "* programId ID of the program."] - #[doc = "* banner Pointer to output the legacy banner data to. (size = 0x23C0)"] - #[doc = "* unk Unknown. Always 1?"] +#[doc = "Gets the legacy banner data of a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediaType` - Media type of the program."] +#[doc = "* `programId` - ID of the program."] +#[doc = "* `banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] +#[doc = "* `unk` - Unknown. Always 1?"] + pub fn FSPXI_GetLegacyBannerData( serviceHandle: Handle, mediaType: FS_MediaType, @@ -12203,42 +17398,62 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Formats the CARDNOR device."] - #[doc = "* unk Unknown. Transaction?"] +#[doc = "Formats the CARDNOR device."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `unk` - Unknown. Transaction?"] + pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the 3DS SDMC root."] +#[doc = "Deletes the 3DS SDMC root."] +#[doc = ""] + pub fn FSPXI_DeleteSdmcRoot(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all ext save data on the NAND."] +#[doc = "Deletes all ext save data on the NAND."] +#[doc = ""] + pub fn FSPXI_DeleteAllExtSaveDataOnNand(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CTR file system."] +#[doc = "Initializes the CTR file system."] +#[doc = ""] + pub fn FSPXI_InitializeCtrFilesystem(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates the FS seed."] +#[doc = "Creates the FS seed."] +#[doc = ""] + pub fn FSPXI_CreateSeed(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the CTR SDMC root path."] - #[doc = "* out Pointer to output the root path to."] - #[doc = "* length Length of the output buffer in bytes."] +#[doc = "Gets the CTR SDMC root path."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to output the root path to."] +#[doc = "* `length` - Length of the output buffer in bytes."] + pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an archive's resource information."] - #[doc = "* archiveResource Pointer to output the archive resource information to."] - #[doc = "* mediaType System media type to check."] +#[doc = "Gets an archive's resource information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] +#[doc = "* `mediaType` - System media type to check."] + pub fn FSPXI_GetArchiveResource( serviceHandle: Handle, archiveResource: *mut FS_ArchiveResource, @@ -12247,8 +17462,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Exports the integrity verification seed."] - #[doc = "* seed Pointer to output the seed to."] +#[doc = "Exports the integrity verification seed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `seed` - Pointer to output the seed to."] + pub fn FSPXI_ExportIntegrityVerificationSeed( serviceHandle: Handle, seed: *mut FS_IntegrityVerificationSeed, @@ -12256,8 +17475,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Imports an integrity verification seed."] - #[doc = "* seed Seed to import."] +#[doc = "Imports an integrity verification seed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `seed` - Seed to import."] + pub fn FSPXI_ImportIntegrityVerificationSeed( serviceHandle: Handle, seed: *const FS_IntegrityVerificationSeed, @@ -12265,11 +17488,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy sub banner data of a program."] - #[doc = "* bannerSize Size of the banner."] - #[doc = "* mediaType Media type of the program."] - #[doc = "* programId ID of the program."] - #[doc = "* header Pointer to output the legacy sub banner data to."] +#[doc = "Gets the legacy sub banner data of a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bannerSize` - Size of the banner."] +#[doc = "* `mediaType` - Media type of the program."] +#[doc = "* `programId` - ID of the program."] +#[doc = "* `header` - Pointer to output the legacy sub banner data to."] + pub fn FSPXI_GetLegacySubBannerData( serviceHandle: Handle, bannerSize: u32_, @@ -12280,9 +17507,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] - #[doc = "* buf Buffer to output random bytes to."] - #[doc = "* size Size of buffer."] +#[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Buffer to output random bytes to."] +#[doc = "* `size` - Size of buffer."] + pub fn FSPXI_GenerateRandomBytes( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -12291,11 +17522,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the last modified time of a file in an archive."] - #[doc = "* archive The archive that contains the file."] - #[doc = "* out The pointer to write the timestamp to."] - #[doc = "* path The UTF-16 path of the file."] - #[doc = "* size The size of the path."] +#[doc = "Gets the last modified time of a file in an archive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `archive` - The archive that contains the file."] +#[doc = "* `out` - The pointer to write the timestamp to."] +#[doc = "* `path` - The UTF-16 path of the file."] +#[doc = "* `size` - The size of the path."] + pub fn FSPXI_GetFileLastModified( serviceHandle: Handle, archive: FSPXI_Archive, @@ -12306,11 +17541,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a special file."] - #[doc = "* bytesRead Pointer to output the number of bytes read to."] - #[doc = "* fileOffset Offset of the file."] - #[doc = "* size Size of the buffer."] - #[doc = "* data Buffer to read to."] +#[doc = "Reads from a special file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "* `fileOffset` - Offset of the file."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `data` - Buffer to read to."] + pub fn FSPXI_ReadSpecialFile( serviceHandle: Handle, bytesRead: *mut u32_, @@ -12321,14 +17560,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the size of a special file."] - #[doc = "* fileSize Pointer to output the size to."] +#[doc = "Gets the size of a special file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `fileSize` - Pointer to output the size to."] + pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates a device move as the source device."] - #[doc = "* context Pointer to output the context to."] +#[doc = "Initiates a device move as the source device."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Pointer to output the context to."] + pub fn FSPXI_StartDeviceMoveAsSource( serviceHandle: Handle, context: *mut FS_DeviceMoveContext, @@ -12336,9 +17583,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initiates a device move as the destination device."] - #[doc = "* context Context to use."] - #[doc = "* clear Whether to clear the device's data first."] +#[doc = "Initiates a device move as the destination device."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `clear` - Whether to clear the device's data first."] + pub fn FSPXI_StartDeviceMoveAsDestination( serviceHandle: Handle, context: FS_DeviceMoveContext, @@ -12347,15 +17598,19 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads data and stores SHA256 hashes of blocks"] - #[doc = "* file File to read from."] - #[doc = "* bytesRead Pointer to output the number of read bytes to."] - #[doc = "* offset Offset to read from."] - #[doc = "* readBuffer Pointer to store read data in."] - #[doc = "* readBufferSize Size of readBuffer."] - #[doc = "* hashtable Pointer to store SHA256 hashes in."] - #[doc = "* hashtableSize Size of hashtable."] - #[doc = "* unk Unknown. Always 0x00001000? Possibly block size?"] +#[doc = "Reads data and stores SHA256 hashes of blocks"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to read from."] +#[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] +#[doc = "* `offset` - Offset to read from."] +#[doc = "* `readBuffer` - Pointer to store read data in."] +#[doc = "* `readBufferSize` - Size of readBuffer."] +#[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] +#[doc = "* `hashtableSize` - Size of hashtable."] +#[doc = "* `unk` - Unknown. Always 0x00001000? Possibly block size?"] + pub fn FSPXI_ReadFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -12370,16 +17625,20 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] - #[doc = "* file File to write to."] - #[doc = "* bytesWritten Pointer to output the number of written bytes to."] - #[doc = "* offset Offset to write to."] - #[doc = "* writeBuffer Buffer to write from."] - #[doc = "* writeBufferSize Size of writeBuffer."] - #[doc = "* hashtable Pointer to store SHA256 hashes in."] - #[doc = "* hashtableSize Size of hashtable"] - #[doc = "* unk1 Unknown. Might match with ReadFileSHA256's unknown?"] - #[doc = "* unk2 Unknown. Might match with ReadFileSHA256's unknown?"] +#[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `file` - File to write to."] +#[doc = "* `bytesWritten` - Pointer to output the number of written bytes to."] +#[doc = "* `offset` - Offset to write to."] +#[doc = "* `writeBuffer` - Buffer to write from."] +#[doc = "* `writeBufferSize` - Size of writeBuffer."] +#[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] +#[doc = "* `hashtableSize` - Size of hashtable"] +#[doc = "* `unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] +#[doc = "* `unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] + pub fn FSPXI_WriteFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -12395,28 +17654,44 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures CTRCARD latency emulation."] - #[doc = "* latency Latency to apply."] +#[doc = "Configures CTRCARD latency emulation."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `latency` - Latency to apply."] + pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the file system priority."] - #[doc = "* priority Priority to set."] +#[doc = "Sets the file system priority."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `priority` - Priority to set."] + pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Toggles cleaning up invalid save data."] - #[doc = "* enable Whether to enable cleaning up invalid save data."] +#[doc = "Toggles cleaning up invalid save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enable` - Whether to enable cleaning up invalid save data."] + pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Enumerates system save data."] - #[doc = "* idsWritten Pointer to output the number of IDs written to."] - #[doc = "* idsSize Size of the IDs buffer."] - #[doc = "* ids Pointer to output IDs to."] +#[doc = "Enumerates system save data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "* `idsSize` - Size of the IDs buffer."] +#[doc = "* `ids` - Pointer to output IDs to."] + pub fn FSPXI_EnumerateSystemSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -12426,10 +17701,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads the NAND report."] - #[doc = "* unk Unknown"] - #[doc = "* buffer Buffer to write the report to."] - #[doc = "* size Size of buffer"] +#[doc = "Reads the NAND report."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `unk` - Unknown"] +#[doc = "* `buffer` - Buffer to write the report to."] +#[doc = "* `size` - Size of buffer"] + pub fn FSPXI_ReadNandReport( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -12439,8 +17718,9 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unknown command 0x56"] - #[doc = "@remark Called by FSUSER_ControlArchive with ArchiveAction 0x789D"] +#[doc = "Unknown command 0x56"] +#[doc = ""] + pub fn FSPXI_Unknown0x56( serviceHandle: Handle, out: *mut u32_, @@ -12450,25 +17730,36 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes fs:REG."] +#[doc = "Initializes fs:REG."] +#[doc = ""] + pub fn fsRegInit() -> Result; } extern "C" { - #[doc = "Exits fs:REG."] +#[doc = "Exits fs:REG."] +#[doc = ""] + pub fn fsRegExit(); } extern "C" { - #[doc = "Gets the current fs:REG session handle."] - #[doc = "The current fs:REG session handle."] +#[doc = "Gets the current fs:REG session handle."] +#[doc = ""] +#[doc = "Returns: The current fs:REG session handle."] +#[doc = ""] + pub fn fsRegGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Registers a program's storage information."] - #[doc = "* pid The Process ID of the program."] - #[doc = "* programHandle The program handle."] - #[doc = "* programInfo Information about the program."] - #[doc = "* storageInfo Storage information to register."] +#[doc = "Registers a program's storage information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pid` - The Process ID of the program."] +#[doc = "* `programHandle` - The program handle."] +#[doc = "* `programInfo` - Information about the program."] +#[doc = "* `storageInfo` - Storage information to register."] + pub fn FSREG_Register( pid: u32_, programHandle: u64_, @@ -12478,16 +17769,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters a program's storage information."] - #[doc = "* pid The Process ID of the program."] +#[doc = "Unregisters a program's storage information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pid` - The Process ID of the program."] + pub fn FSREG_Unregister(pid: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] - #[doc = "* exheaderInfos Pointer to the output exheader information set(s)."] - #[doc = "* maxNumEntries The maximum number of entries."] - #[doc = "* programHandle The program handle."] +#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set(s)."] +#[doc = "* `maxNumEntries` - The maximum number of entries."] +#[doc = "* `programHandle` - The program handle."] + pub fn FSREG_GetProgramInfo( exheaderInfos: *mut ExHeader_Info, maxNumEntries: u32_, @@ -12496,9 +17795,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Loads a program."] - #[doc = "* programHandle Pointer to the output the program handle to."] - #[doc = "* programInfo Information about the program to load."] +#[doc = "Loads a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] +#[doc = "* `programInfo` - Information about the program to load."] + pub fn FSREG_LoadProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -12506,23 +17809,35 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unloads a program."] - #[doc = "* programHandle The program handle."] +#[doc = "Unloads a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programHandle` - The program handle."] + pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if a program has been loaded by fs:REG."] - #[doc = "* programHandle The program handle."] +#[doc = "Checks if a program has been loaded by fs:REG."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programHandle` - The program handle."] + pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result; } #[doc = "Shared Mii struct"] +#[doc = ""] + #[repr(C)] #[repr(align(1))] pub struct MiiData { pub _bindgen_opaque_blob: [u8; 92usize], } #[doc = "Mii options"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_1 { @@ -12602,6 +17917,8 @@ impl MiiData__bindgen_ty_1 { } } #[doc = "Mii position in Mii selector or Mii maker"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_2 { @@ -12646,6 +17963,8 @@ impl MiiData__bindgen_ty_2 { } } #[doc = "Console Identity"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_3 { @@ -12693,6 +18012,8 @@ impl MiiData__bindgen_ty_3 { } } #[doc = "Mii details"] +#[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -12789,6 +18110,8 @@ impl MiiData__bindgen_ty_4 { } } #[doc = "Face style"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_5 { @@ -12852,6 +18175,8 @@ impl MiiData__bindgen_ty_5 { } } #[doc = "Face details"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_6 { @@ -12896,6 +18221,8 @@ impl MiiData__bindgen_ty_6 { } } #[doc = "Hair details"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_7 { @@ -12940,6 +18267,8 @@ impl MiiData__bindgen_ty_7 { } } #[doc = "Eye details"] +#[doc = ""] + #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -13068,6 +18397,8 @@ impl MiiData__bindgen_ty_8 { } } #[doc = "Eyebrow details"] +#[doc = ""] + #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -13212,6 +18543,8 @@ impl MiiData__bindgen_ty_9 { } } #[doc = "Nose details"] +#[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -13276,6 +18609,8 @@ impl MiiData__bindgen_ty_10 { } } #[doc = "Mouth details"] +#[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -13356,6 +18691,8 @@ impl MiiData__bindgen_ty_11 { } } #[doc = "Mustache details"] +#[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -13420,6 +18757,8 @@ impl MiiData__bindgen_ty_12 { } } #[doc = "Beard details"] +#[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -13500,6 +18839,8 @@ impl MiiData__bindgen_ty_13 { } } #[doc = "Glasses details"] +#[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -13580,6 +18921,8 @@ impl MiiData__bindgen_ty_14 { } } #[doc = "Mole details"] +#[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -13669,6 +19012,8 @@ impl Default for MiiData { } } #[doc = "Friend key data"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendKey { @@ -13677,6 +19022,8 @@ pub struct FriendKey { pub localFriendCode: u64_, } #[doc = "Friend Title data"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct TitleData { @@ -13685,22 +19032,36 @@ pub struct TitleData { pub unk: u32_, } #[doc = "Friend profile data"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendProfile { - #[doc = "The region code for the hardware."] +#[doc = "The region code for the hardware."] +#[doc = ""] + pub region: u8_, - #[doc = "Country code."] +#[doc = "Country code."] +#[doc = ""] + pub country: u8_, - #[doc = "Area code."] +#[doc = "Area code."] +#[doc = ""] + pub area: u8_, - #[doc = "Language code."] +#[doc = "Language code."] +#[doc = ""] + pub language: u8_, - #[doc = "Platform code."] +#[doc = "Platform code."] +#[doc = ""] + pub platform: u8_, pub padding: u32_, } #[doc = "Game Description structure"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct GameDescription { @@ -13717,6 +19078,8 @@ impl Default for GameDescription { } } #[doc = "Friend Notification Event structure"] +#[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationEvent { @@ -13726,73 +19089,121 @@ pub struct NotificationEvent { pub key: FriendKey, } #[doc = "Self went online"] +#[doc = ""] + pub const USER_WENT_ONLINE: NotificationTypes = 1; #[doc = "Self went offline"] +#[doc = ""] + pub const USER_WENT_OFFLINE: NotificationTypes = 2; #[doc = "Friend Went Online"] +#[doc = ""] + pub const FRIEND_WENT_ONLINE: NotificationTypes = 3; #[doc = "Friend Presence changed"] +#[doc = ""] + pub const FRIEND_UPDATED_PRESENCE: NotificationTypes = 4; #[doc = "Friend Mii changed"] +#[doc = ""] + pub const FRIEND_UPDATED_MII: NotificationTypes = 5; #[doc = "Friend Profile changed"] +#[doc = ""] + pub const FRIEND_UPDATED_PROFILE: NotificationTypes = 6; #[doc = "Friend went offline"] +#[doc = ""] + pub const FRIEND_WENT_OFFLINE: NotificationTypes = 7; #[doc = "Friend registered self as friend"] +#[doc = ""] + pub const FRIEND_REGISTERED_USER: NotificationTypes = 8; #[doc = "Friend Sent invitation"] +#[doc = ""] + pub const FRIEND_SENT_INVITATION: NotificationTypes = 9; #[doc = "Enum to use with FRD_GetNotificationEvent"] +#[doc = ""] + pub type NotificationTypes = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes FRD service."] +#[doc = "Initializes FRD service."] +#[doc = ""] + pub fn frdInit() -> Result; } extern "C" { - #[doc = "Exists FRD."] +#[doc = "Exists FRD."] +#[doc = ""] + pub fn frdExit(); } extern "C" { - #[doc = "Get FRD handle."] +#[doc = "Get FRD handle."] +#[doc = ""] + pub fn frdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the login status of the current user."] - #[doc = "* state Pointer to write the current user's login status to."] +#[doc = "Gets the login status of the current user."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to write the current user's login status to."] + pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the online status of the current user."] - #[doc = "* state Pointer to write the current user's online status to."] +#[doc = "Gets the online status of the current user."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to write the current user's online status to."] + pub fn FRDU_IsOnline(state: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Logs out of Nintendo's friend server."] +#[doc = "Logs out of Nintendo's friend server."] +#[doc = ""] + pub fn FRD_Logout() -> Result; } extern "C" { #[must_use] - #[doc = "Log in to Nintendo's friend server."] - #[doc = "* event Event to signal when Login is done."] +#[doc = "Log in to Nintendo's friend server."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Event to signal when Login is done."] + pub fn FRD_Login(event: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's friend key."] - #[doc = "* key Pointer to write the current user's friend key to."] +#[doc = "Gets the current user's friend key."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `key` - Pointer to write the current user's friend key to."] + pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's privacy information."] - #[doc = "* isPublicMode Determines whether friends are notified of the current user's online status."] - #[doc = "* isShowGameName Determines whether friends are notified of the application that the current user is running."] - #[doc = "* isShowPlayedGame Determiens whether to display the current user's game history."] +#[doc = "Gets the current user's privacy information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `isPublicMode` - Determines whether friends are notified of the current user's online status."] +#[doc = "* `isShowGameName` - Determines whether friends are notified of the application that the current user is running."] +#[doc = "* `isShowPlayedGame` - Determiens whether to display the current user's game history."] + pub fn FRD_GetMyPreference( isPublicMode: *mut bool, isShowGameName: *mut bool, @@ -13801,49 +19212,77 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the current user's profile information."] - #[doc = "* profile Pointer to write the current user's profile information to."] +#[doc = "Gets the current user's profile information."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `profile` - Pointer to write the current user's profile information to."] + pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's screen name."] - #[doc = "* name Pointer to write the current user's screen name to."] - #[doc = "* max_size Max size of the screen name."] +#[doc = "Gets the current user's screen name."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Pointer to write the current user's screen name to."] +#[doc = "* `max_size` - Max size of the screen name."] + pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's Mii data."] - #[doc = "* mii Pointer to write the current user's mii data to."] +#[doc = "Gets the current user's Mii data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mii` - Pointer to write the current user's mii data to."] + pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's playing game."] - #[doc = "* titleId Pointer to write the current user's playing game to."] +#[doc = "Gets the current user's playing game."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleId` - Pointer to write the current user's playing game to."] + pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's favourite game."] - #[doc = "* titleId Pointer to write the title ID of current user's favourite game to."] +#[doc = "Gets the current user's favourite game."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleId` - Pointer to write the title ID of current user's favourite game to."] + pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's comment on their friend profile."] - #[doc = "* comment Pointer to write the current user's comment to."] - #[doc = "* max_size Max size of the comment."] +#[doc = "Gets the current user's comment on their friend profile."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `comment` - Pointer to write the current user's comment to."] +#[doc = "* `max_size` - Max size of the comment."] + pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's friend key list."] - #[doc = "* friendKeyList Pointer to write the friend key list to."] - #[doc = "* num Stores the number of friend keys obtained."] - #[doc = "* offset The index of the friend key to start with."] - #[doc = "* size Size of the friend key list. (FRIEND_LIST_SIZE)"] +#[doc = "Gets the current user's friend key list."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `friendKeyList` - Pointer to write the friend key list to."] +#[doc = "* `num` - Stores the number of friend keys obtained."] +#[doc = "* `offset` - The index of the friend key to start with."] +#[doc = "* `size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] + pub fn FRD_GetFriendKeyList( friendKeyList: *mut FriendKey, num: *mut u32_, @@ -13853,10 +19292,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the current user's friends' Mii data."] - #[doc = "* miiDataList Pointer to write Mii data to."] - #[doc = "* friendKeyList Pointer to FriendKeys."] - #[doc = "* size Number of Friendkeys."] +#[doc = "Gets the current user's friends' Mii data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `miiDataList` - Pointer to write Mii data to."] +#[doc = "* `friendKeyList` - Pointer to FriendKeys."] +#[doc = "* `size` - Number of Friendkeys."] + pub fn FRD_GetFriendMii( miiDataList: *mut MiiData, friendKeyList: *const FriendKey, @@ -13865,10 +19308,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get the current user's friends' profile data."] - #[doc = "* profile Pointer to write profile data to."] - #[doc = "* friendKeyList Pointer to FriendKeys."] - #[doc = "* size Number of FriendKeys."] +#[doc = "Get the current user's friends' profile data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `profile` - Pointer to write profile data to."] +#[doc = "* `friendKeyList` - Pointer to FriendKeys."] +#[doc = "* `size` - Number of FriendKeys."] + pub fn FRD_GetFriendProfile( profile: *mut FriendProfile, friendKeyList: *const FriendKey, @@ -13877,10 +19324,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get the current user's friends' playing game."] - #[doc = "* desc Pointer to write Game Description data to."] - #[doc = "* friendKeyList Pointer to FriendKeys,"] - #[doc = "* size Number Of FriendKeys."] +#[doc = "Get the current user's friends' playing game."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `desc` - Pointer to write Game Description data to."] +#[doc = "* `friendKeyList` - Pointer to FriendKeys,"] +#[doc = "* `size` - Number Of FriendKeys."] + pub fn FRD_GetFriendPlayingGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -13889,10 +19340,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get the current user's friends' favourite game."] - #[doc = "* desc Pointer to write Game Description data to."] - #[doc = "* friendKeyList Pointer to FriendKeys,"] - #[doc = "* count Number Of FriendKeys."] +#[doc = "Get the current user's friends' favourite game."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `desc` - Pointer to write Game Description data to."] +#[doc = "* `friendKeyList` - Pointer to FriendKeys,"] +#[doc = "* `count` - Number Of FriendKeys."] + pub fn FRD_GetFriendFavouriteGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -13901,29 +19356,45 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets whether a friend key is included in the current user's friend list."] - #[doc = "* friendKeyList Pointer to a list of friend keys."] - #[doc = "* isFromList Pointer to a write the friendship status to."] +#[doc = "Gets whether a friend key is included in the current user's friend list."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `friendKeyList` - Pointer to a list of friend keys."] +#[doc = "* `isFromList` - Pointer to a write the friendship status to."] + pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Updates the game mode description string."] - #[doc = "* desc Pointer to write the game mode description to."] +#[doc = "Updates the game mode description string."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `desc` - Pointer to write the game mode description to."] + pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Event which is signaled when friend login states change."] - #[doc = "* event event which will be signaled."] +#[doc = "Event which is signaled when friend login states change."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - event which will be signaled."] + pub fn FRD_AttachToEventNotification(event: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Get Latest Event Notification"] - #[doc = "* event Pointer to write recieved notification event struct to."] - #[doc = "* count Number of events"] - #[doc = "* recievedNotifCount Number of notification reccieved."] +#[doc = "Get Latest Event Notification"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Pointer to write recieved notification event struct to."] +#[doc = "* `count` - Number of events"] +#[doc = "* `recievedNotifCount` - Number of notification reccieved."] + pub fn FRD_GetEventNotification( event: *mut NotificationEvent, count: u32_, @@ -13932,326 +19403,553 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Returns the friend code using the given principal ID."] - #[doc = "* principalId The principal ID being used."] - #[doc = "* friendCode Pointer to write the friend code to."] +#[doc = "Returns the friend code using the given principal ID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `principalId` - The principal ID being used."] +#[doc = "* `friendCode` - Pointer to write the friend code to."] + pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the principal ID using the given friend code."] - #[doc = "* friendCode The friend code being used."] - #[doc = "* principalId Pointer to write the principal ID to."] +#[doc = "Returns the principal ID using the given friend code."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `friendCode` - The friend code being used."] +#[doc = "* `principalId` - Pointer to write the principal ID to."] + pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the friend code is valid."] - #[doc = "* friendCode The friend code being used."] - #[doc = "* isValid Pointer to write the validity of the friend code to."] +#[doc = "Checks if the friend code is valid."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `friendCode` - The friend code being used."] +#[doc = "* `isValid` - Pointer to write the validity of the friend code to."] + pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the Friend API to use a specific SDK version."] - #[doc = "* sdkVer The SDK version needed to be used."] +#[doc = "Sets the Friend API to use a specific SDK version."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sdkVer` - The SDK version needed to be used."] + pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Add a Friend online."] - #[doc = "* event Event signaled when friend is registered."] - #[doc = "* principalId PrincipalId of the friend to add."] +#[doc = "Add a Friend online."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `event` - Event signaled when friend is registered."] +#[doc = "* `principalId` - PrincipalId of the friend to add."] + pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Remove a Friend."] - #[doc = "* principalId PrinipalId of the friend code to remove."] - #[doc = "* localFriendCode LocalFriendCode of the friend code to remove."] +#[doc = "Remove a Friend."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `principalId` - PrinipalId of the friend code to remove."] +#[doc = "* `localFriendCode` - LocalFriendCode of the friend code to remove."] + pub fn FRD_RemoveFriend(principalId: u32_, localFriendCode: u64_) -> Result; } #[doc = "Top screen."] +#[doc = ""] + pub const GSPLCD_SCREEN_TOP: _bindgen_ty_21 = 1; #[doc = "Bottom screen."] +#[doc = ""] + pub const GSPLCD_SCREEN_BOTTOM: _bindgen_ty_21 = 2; #[doc = "Both screens."] +#[doc = ""] + pub const GSPLCD_SCREEN_BOTH: _bindgen_ty_21 = 3; #[doc = "LCD screens."] +#[doc = ""] + pub type _bindgen_ty_21 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes GSPLCD."] +#[doc = "Initializes GSPLCD."] +#[doc = ""] + pub fn gspLcdInit() -> Result; } extern "C" { - #[doc = "Exits GSPLCD."] +#[doc = "Exits GSPLCD."] +#[doc = ""] + pub fn gspLcdExit(); } extern "C" { - #[doc = "Gets a pointer to the current gsp::Lcd session handle."] - #[doc = "A pointer to the current gsp::Lcd session handle."] +#[doc = "Gets a pointer to the current gsp::Lcd session handle."] +#[doc = ""] +#[doc = "Returns: A pointer to the current gsp::Lcd session handle."] +#[doc = ""] + pub fn gspLcdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Powers on both backlights."] +#[doc = "Powers on both backlights."] +#[doc = ""] + pub fn GSPLCD_PowerOnAllBacklights() -> Result; } extern "C" { #[must_use] - #[doc = "Powers off both backlights."] +#[doc = "Powers off both backlights."] +#[doc = ""] + pub fn GSPLCD_PowerOffAllBacklights() -> Result; } extern "C" { #[must_use] - #[doc = "Powers on the backlight."] - #[doc = "* screen Screen to power on."] +#[doc = "Powers on the backlight."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen to power on."] + pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Powers off the backlight."] - #[doc = "* screen Screen to power off."] +#[doc = "Powers off the backlight."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen to power off."] + pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets 3D_LEDSTATE to the input state value."] - #[doc = "* disable False = 3D LED enable, true = 3D LED disable."] +#[doc = "Sets 3D_LEDSTATE to the input state value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] + pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] - #[doc = "* vendor Pointer to output the screen vendors to."] +#[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `vendor` - Pointer to output the screen vendors to."] + pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] - #[doc = "* screen Screen to get the brightness value of."] - #[doc = "* brightness Brightness value returned."] +#[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen to get the brightness value of."] +#[doc = "* `brightness` - Brightness value returned."] + pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the LCD screens' brightness."] - #[doc = "* screen Screen to set the brightness value of."] - #[doc = "* brightness Brightness value set."] +#[doc = "Sets the LCD screens' brightness."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen to set the brightness value of."] +#[doc = "* `brightness` - Brightness value set."] + pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the LCD screens' raw brightness."] - #[doc = "* screen Screen to set the brightness value of."] - #[doc = "* brightness Brightness value set."] +#[doc = "Sets the LCD screens' raw brightness."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `screen` - Screen to set the brightness value of."] +#[doc = "* `brightness` - Brightness value set."] + pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result; } #[doc = "A"] +#[doc = ""] + pub const KEY_A: _bindgen_ty_22 = 1; #[doc = "B"] +#[doc = ""] + pub const KEY_B: _bindgen_ty_22 = 2; #[doc = "Select"] +#[doc = ""] + pub const KEY_SELECT: _bindgen_ty_22 = 4; #[doc = "Start"] +#[doc = ""] + pub const KEY_START: _bindgen_ty_22 = 8; #[doc = "D-Pad Right"] +#[doc = ""] + pub const KEY_DRIGHT: _bindgen_ty_22 = 16; #[doc = "D-Pad Left"] +#[doc = ""] + pub const KEY_DLEFT: _bindgen_ty_22 = 32; #[doc = "D-Pad Up"] +#[doc = ""] + pub const KEY_DUP: _bindgen_ty_22 = 64; #[doc = "D-Pad Down"] +#[doc = ""] + pub const KEY_DDOWN: _bindgen_ty_22 = 128; #[doc = "R"] +#[doc = ""] + pub const KEY_R: _bindgen_ty_22 = 256; #[doc = "L"] +#[doc = ""] + pub const KEY_L: _bindgen_ty_22 = 512; #[doc = "X"] +#[doc = ""] + pub const KEY_X: _bindgen_ty_22 = 1024; #[doc = "Y"] +#[doc = ""] + pub const KEY_Y: _bindgen_ty_22 = 2048; #[doc = "ZL (New 3DS only)"] +#[doc = ""] + pub const KEY_ZL: _bindgen_ty_22 = 16384; #[doc = "ZR (New 3DS only)"] +#[doc = ""] + pub const KEY_ZR: _bindgen_ty_22 = 32768; #[doc = "Touch (Not actually provided by HID)"] +#[doc = ""] + pub const KEY_TOUCH: _bindgen_ty_22 = 1048576; #[doc = "C-Stick Right (New 3DS only)"] +#[doc = ""] + pub const KEY_CSTICK_RIGHT: _bindgen_ty_22 = 16777216; #[doc = "C-Stick Left (New 3DS only)"] +#[doc = ""] + pub const KEY_CSTICK_LEFT: _bindgen_ty_22 = 33554432; #[doc = "C-Stick Up (New 3DS only)"] +#[doc = ""] + pub const KEY_CSTICK_UP: _bindgen_ty_22 = 67108864; #[doc = "C-Stick Down (New 3DS only)"] +#[doc = ""] + pub const KEY_CSTICK_DOWN: _bindgen_ty_22 = 134217728; #[doc = "Circle Pad Right"] +#[doc = ""] + pub const KEY_CPAD_RIGHT: _bindgen_ty_22 = 268435456; #[doc = "Circle Pad Left"] +#[doc = ""] + pub const KEY_CPAD_LEFT: _bindgen_ty_22 = 536870912; #[doc = "Circle Pad Up"] +#[doc = ""] + pub const KEY_CPAD_UP: _bindgen_ty_22 = 1073741824; #[doc = "Circle Pad Down"] +#[doc = ""] + pub const KEY_CPAD_DOWN: _bindgen_ty_22 = 2147483648; #[doc = "D-Pad Up or Circle Pad Up"] +#[doc = ""] + pub const KEY_UP: _bindgen_ty_22 = 1073741888; #[doc = "D-Pad Down or Circle Pad Down"] +#[doc = ""] + pub const KEY_DOWN: _bindgen_ty_22 = 2147483776; #[doc = "D-Pad Left or Circle Pad Left"] +#[doc = ""] + pub const KEY_LEFT: _bindgen_ty_22 = 536870944; #[doc = "D-Pad Right or Circle Pad Right"] +#[doc = ""] + pub const KEY_RIGHT: _bindgen_ty_22 = 268435472; #[doc = "Key values."] +#[doc = ""] + pub type _bindgen_ty_22 = ::libc::c_uint; #[doc = "Touch position."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct touchPosition { - #[doc = "Touch X"] +#[doc = "Touch X"] +#[doc = ""] + pub px: u16_, - #[doc = "Touch Y"] +#[doc = "Touch Y"] +#[doc = ""] + pub py: u16_, } #[doc = "Circle Pad position."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct circlePosition { - #[doc = "Pad X"] +#[doc = "Pad X"] +#[doc = ""] + pub dx: s16, - #[doc = "Pad Y"] +#[doc = "Pad Y"] +#[doc = ""] + pub dy: s16, } #[doc = "Accelerometer vector."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct accelVector { - #[doc = "Accelerometer X"] +#[doc = "Accelerometer X"] +#[doc = ""] + pub x: s16, - #[doc = "Accelerometer Y"] +#[doc = "Accelerometer Y"] +#[doc = ""] + pub y: s16, - #[doc = "Accelerometer Z"] +#[doc = "Accelerometer Z"] +#[doc = ""] + pub z: s16, } #[doc = "Gyroscope angular rate."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct angularRate { - #[doc = "Roll"] +#[doc = "Roll"] +#[doc = ""] + pub x: s16, - #[doc = "Yaw"] +#[doc = "Yaw"] +#[doc = ""] + pub z: s16, - #[doc = "Pitch"] +#[doc = "Pitch"] +#[doc = ""] + pub y: s16, } #[doc = "Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was updated."] +#[doc = ""] + pub const HIDEVENT_PAD0: HID_Event = 0; #[doc = "Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was updated."] +#[doc = ""] + pub const HIDEVENT_PAD1: HID_Event = 1; #[doc = "Event signaled by HID-module, when the sharedmem accelerometer state was updated."] +#[doc = ""] + pub const HIDEVENT_Accel: HID_Event = 2; #[doc = "Event signaled by HID-module, when the sharedmem gyroscope state was updated."] +#[doc = ""] + pub const HIDEVENT_Gyro: HID_Event = 3; #[doc = "Event signaled by HID-module, when the sharedmem DebugPad state was updated."] +#[doc = ""] + pub const HIDEVENT_DebugPad: HID_Event = 4; #[doc = "Used to know how many events there are."] +#[doc = ""] + pub const HIDEVENT_MAX: HID_Event = 5; #[doc = "HID events."] +#[doc = ""] + pub type HID_Event = ::libc::c_uint; extern "C" { - #[doc = "HID shared memory handle."] +#[doc = "HID shared memory handle."] +#[doc = ""] + pub static mut hidMemHandle: Handle; } extern "C" { - #[doc = "HID shared memory."] +#[doc = "HID shared memory."] +#[doc = ""] + pub static mut hidSharedMem: *mut vu32; } extern "C" { #[must_use] - #[doc = "Initializes HID."] +#[doc = "Initializes HID."] +#[doc = ""] + pub fn hidInit() -> Result; } extern "C" { - #[doc = "Exits HID."] +#[doc = "Exits HID."] +#[doc = ""] + pub fn hidExit(); } extern "C" { - #[doc = "Sets the key repeat parameters for hidKeysRepeat."] - #[doc = "* delay Initial delay."] - #[doc = "* interval Repeat interval."] +#[doc = "Sets the key repeat parameters for @ref hidKeysRepeat."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `delay` - Initial delay."] +#[doc = "* `interval` - Repeat interval."] + pub fn hidSetRepeatParameters(delay: u32_, interval: u32_); } extern "C" { - #[doc = "Scans HID for input data."] +#[doc = "Scans HID for input data."] +#[doc = ""] + pub fn hidScanInput(); } extern "C" { - #[doc = "Returns a bitmask of held buttons."] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = "32-bit bitmask of held buttons (1+ frames)."] +#[doc = "Returns a bitmask of held buttons."] +#[doc = ""] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = ""] +#[doc = "Returns: 32-bit bitmask of held buttons (1+ frames)."] +#[doc = ""] + pub fn hidKeysHeld() -> u32_; } extern "C" { - #[doc = "Returns a bitmask of newly pressed buttons, this frame."] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = "32-bit bitmask of newly pressed buttons."] +#[doc = "Returns a bitmask of newly pressed buttons, this frame."] +#[doc = ""] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = ""] +#[doc = "Returns: 32-bit bitmask of newly pressed buttons."] +#[doc = ""] + pub fn hidKeysDown() -> u32_; } extern "C" { - #[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = "32-bit bitmask of newly pressed or repeated buttons."] +#[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] +#[doc = ""] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = ""] +#[doc = "Returns: 32-bit bitmask of newly pressed or repeated buttons."] +#[doc = ""] + pub fn hidKeysDownRepeat() -> u32_; } extern "C" { - #[doc = "Returns a bitmask of newly released buttons, this frame."] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = "32-bit bitmask of newly released buttons."] +#[doc = "Returns a bitmask of newly released buttons, this frame."] +#[doc = ""] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = ""] +#[doc = "Returns: 32-bit bitmask of newly released buttons."] +#[doc = ""] + pub fn hidKeysUp() -> u32_; } extern "C" { - #[doc = "Reads the current touch position."] - #[doc = "* pos Pointer to output the touch position to."] +#[doc = "Reads the current touch position."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pos` - Pointer to output the touch position to."] + pub fn hidTouchRead(pos: *mut touchPosition); } extern "C" { - #[doc = "Reads the current circle pad position."] - #[doc = "* pos Pointer to output the circle pad position to."] +#[doc = "Reads the current circle pad position."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pos` - Pointer to output the circle pad position to."] + pub fn hidCircleRead(pos: *mut circlePosition); } extern "C" { - #[doc = "Reads the current accelerometer data."] - #[doc = "* vector Pointer to output the accelerometer data to."] +#[doc = "Reads the current accelerometer data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `vector` - Pointer to output the accelerometer data to."] + pub fn hidAccelRead(vector: *mut accelVector); } extern "C" { - #[doc = "Reads the current gyroscope data."] - #[doc = "* rate Pointer to output the gyroscope data to."] +#[doc = "Reads the current gyroscope data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `rate` - Pointer to output the gyroscope data to."] + pub fn hidGyroRead(rate: *mut angularRate); } extern "C" { - #[doc = "Waits for an HID event."] - #[doc = "* id ID of the event."] - #[doc = "* nextEvent Whether to discard the current event and wait for the next event."] +#[doc = "Waits for an HID event."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the event."] +#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool); } extern "C" { #[must_use] - #[doc = "Waits for any HID or IRRST event."] - #[doc = "* nextEvents Whether to discard the current events and wait for the next events."] - #[doc = "* cancelEvent Optional additional handle to wait on, otherwise 0."] - #[doc = "* timeout Timeout."] +#[doc = "Waits for any HID or IRRST event."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nextEvents` - Whether to discard the current events and wait for the next events."] +#[doc = "* `cancelEvent` - Optional additional handle to wait on, otherwise 0."] +#[doc = "* `timeout` - Timeout."] + pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the handles for HID operation."] - #[doc = "* outMemHandle Pointer to output the shared memory handle to."] - #[doc = "* eventpad0 Pointer to output the pad 0 event handle to."] - #[doc = "* eventpad1 Pointer to output the pad 1 event handle to."] - #[doc = "* eventaccel Pointer to output the accelerometer event handle to."] - #[doc = "* eventgyro Pointer to output the gyroscope event handle to."] - #[doc = "* eventdebugpad Pointer to output the debug pad event handle to."] +#[doc = "Gets the handles for HID operation."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] +#[doc = "* `eventpad0` - Pointer to output the pad 0 event handle to."] +#[doc = "* `eventpad1` - Pointer to output the pad 1 event handle to."] +#[doc = "* `eventaccel` - Pointer to output the accelerometer event handle to."] +#[doc = "* `eventgyro` - Pointer to output the gyroscope event handle to."] +#[doc = "* `eventdebugpad` - Pointer to output the debug pad event handle to."] + pub fn HIDUSER_GetHandles( outMemHandle: *mut Handle, eventpad0: *mut Handle, @@ -14263,102 +19961,157 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Enables the accelerometer."] +#[doc = "Enables the accelerometer."] +#[doc = ""] + pub fn HIDUSER_EnableAccelerometer() -> Result; } extern "C" { #[must_use] - #[doc = "Disables the accelerometer."] +#[doc = "Disables the accelerometer."] +#[doc = ""] + pub fn HIDUSER_DisableAccelerometer() -> Result; } extern "C" { #[must_use] - #[doc = "Enables the gyroscope."] +#[doc = "Enables the gyroscope."] +#[doc = ""] + pub fn HIDUSER_EnableGyroscope() -> Result; } extern "C" { #[must_use] - #[doc = "Disables the gyroscope."] +#[doc = "Disables the gyroscope."] +#[doc = ""] + pub fn HIDUSER_DisableGyroscope() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the gyroscope raw to dps coefficient."] - #[doc = "* coeff Pointer to output the coefficient to."] +#[doc = "Gets the gyroscope raw to dps coefficient."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `coeff` - Pointer to output the coefficient to."] + pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current volume slider value. (0-63)"] - #[doc = "* volume Pointer to write the volume slider value to."] +#[doc = "Gets the current volume slider value. (0-63)"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `volume` - Pointer to write the volume slider value to."] + pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result; } extern "C" { - #[doc = "IRRST's shared memory handle."] +#[doc = "IRRST's shared memory handle."] +#[doc = ""] + pub static mut irrstMemHandle: Handle; } extern "C" { - #[doc = "IRRST's shared memory."] +#[doc = "IRRST's shared memory."] +#[doc = ""] + pub static mut irrstSharedMem: *mut vu32; } extern "C" { - #[doc = "IRRST's state update event"] +#[doc = "IRRST's state update event"] +#[doc = ""] + pub static mut irrstEvent: Handle; } extern "C" { #[must_use] - #[doc = "Initializes IRRST."] +#[doc = "Initializes IRRST."] +#[doc = ""] + pub fn irrstInit() -> Result; } extern "C" { - #[doc = "Exits IRRST."] +#[doc = "Exits IRRST."] +#[doc = ""] + pub fn irrstExit(); } extern "C" { - #[doc = "Scans IRRST for input."] +#[doc = "Scans IRRST for input."] +#[doc = ""] + pub fn irrstScanInput(); } extern "C" { - #[doc = "Gets IRRST's held keys."] - #[doc = "IRRST's held keys."] +#[doc = "Gets IRRST's held keys."] +#[doc = ""] +#[doc = "Returns: IRRST's held keys."] +#[doc = ""] + pub fn irrstKeysHeld() -> u32_; } extern "C" { - #[doc = "Reads the current c-stick position."] - #[doc = "* pos Pointer to output the current c-stick position to."] +#[doc = "Reads the current c-stick position."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pos` - Pointer to output the current c-stick position to."] + pub fn irrstCstickRead(pos: *mut circlePosition); } extern "C" { - #[doc = "Waits for the IRRST input event to trigger."] - #[doc = "* nextEvent Whether to discard the current event and wait until the next event."] +#[doc = "Waits for the IRRST input event to trigger."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nextEvent` - Whether to discard the current event and wait until the next event."] + pub fn irrstWaitForEvent(nextEvent: bool); } extern "C" { #[must_use] - #[doc = "Gets the shared memory and event handles for IRRST."] - #[doc = "* outMemHandle Pointer to write the shared memory handle to."] - #[doc = "* outEventHandle Pointer to write the event handle to."] +#[doc = "Gets the shared memory and event handles for IRRST."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `outMemHandle` - Pointer to write the shared memory handle to."] +#[doc = "* `outEventHandle` - Pointer to write the event handle to."] + pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes IRRST."] - #[doc = "* unk1 Unknown."] - #[doc = "* unk2 Unknown."] +#[doc = "Initializes IRRST."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `unk1` - Unknown."] +#[doc = "* `unk2` - Unknown."] + pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Shuts down IRRST."] +#[doc = "Shuts down IRRST."] +#[doc = ""] + pub fn IRRST_Shutdown() -> Result; } #[doc = "sslc context."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct sslcContext { - #[doc = "Service handle."] +#[doc = "Service handle."] +#[doc = ""] + pub servhandle: Handle, - #[doc = "SSLC handle."] +#[doc = "SSLC handle."] +#[doc = ""] + pub sslchandle: u32_, pub sharedmem_handle: Handle, } @@ -14380,34 +20133,52 @@ pub const SSLCOPT_Default: _bindgen_ty_23 = 0; pub const SSLCOPT_DisableVerify: _bindgen_ty_23 = 512; pub const SSLCOPT_TLSv10: _bindgen_ty_23 = 2048; #[doc = "sslc options. https://www.3dbrew.org/wiki/SSL_Services#SSLOpt"] +#[doc = ""] + pub type _bindgen_ty_23 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] +#[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] +#[doc = ""] + pub fn sslcInit(session_handle: Handle) -> Result; } extern "C" { - #[doc = "Exits SSLC."] +#[doc = "Exits SSLC."] +#[doc = ""] + pub fn sslcExit(); } extern "C" { #[must_use] - #[doc = "Creates a RootCertChain."] - #[doc = "* RootCertChain_contexthandle Output contexthandle."] +#[doc = "Creates a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - Output contexthandle."] + pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Destroys a RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain contexthandle."] +#[doc = "Destroys a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain contexthandle."] + pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a trusted RootCA cert to a RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain to use."] - #[doc = "* cert Pointer to the DER cert."] - #[doc = "* certsize Size of the DER cert."] +#[doc = "Adds a trusted RootCA cert to a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "* `cert` - Pointer to the DER cert."] +#[doc = "* `certsize` - Size of the DER cert."] + pub fn sslcAddTrustedRootCA( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -14417,10 +20188,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default RootCA cert to a RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain to use."] - #[doc = "* certID ID of the cert to add."] - #[doc = "* cert_contexthandle Optional, the cert contexthandle can be written here."] +#[doc = "Adds a default RootCA cert to a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "* `certID` - ID of the cert to add."] +#[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] + pub fn sslcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -14429,9 +20204,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Removes the specified cert from the RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain to use."] - #[doc = "* cert_contexthandle Cert contexthandle to remove from the RootCertChain."] +#[doc = "Removes the specified cert from the RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] + pub fn sslcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -14439,22 +20218,34 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates an unknown CertChain."] - #[doc = "* CertChain_contexthandle Output contexthandle."] +#[doc = "Creates an unknown CertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `CertChain_contexthandle` - Output contexthandle."] + pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Destroys a CertChain from sslcCreate8CertChain()."] - #[doc = "* CertChain_contexthandle CertChain contexthandle."] +#[doc = "Destroys a CertChain from sslcCreate8CertChain()."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `CertChain_contexthandle` - CertChain contexthandle."] + pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] - #[doc = "* CertChain_contexthandle CertChain to use."] - #[doc = "* cert Pointer to the cert."] - #[doc = "* certsize Size of the cert."] +#[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `CertChain_contexthandle` - CertChain to use."] +#[doc = "* `cert` - Pointer to the cert."] +#[doc = "* `certsize` - Size of the cert."] + pub fn sslc8CertChainAddCert( CertChain_contexthandle: u32_, cert: *const u8_, @@ -14464,10 +20255,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] - #[doc = "* CertChain_contexthandle CertChain to use."] - #[doc = "* certID ID of the cert to add."] - #[doc = "* cert_contexthandle Optional, the cert contexthandle can be written here."] +#[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `CertChain_contexthandle` - CertChain to use."] +#[doc = "* `certID` - ID of the cert to add."] +#[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] + pub fn sslc8CertChainAddDefaultCert( CertChain_contexthandle: u32_, certID: u8_, @@ -14476,9 +20271,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] - #[doc = "* CertChain_contexthandle CertChain to use."] - #[doc = "* cert_contexthandle Cert contexthandle to remove from the CertChain."] +#[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `CertChain_contexthandle` - CertChain to use."] +#[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the CertChain."] + pub fn sslc8CertChainRemoveCert( CertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -14486,12 +20285,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a new ClientCert-context."] - #[doc = "* cert Pointer to the DER cert."] - #[doc = "* certsize Size of the DER cert."] - #[doc = "* key Pointer to the DER key."] - #[doc = "* keysize Size of the DER key."] - #[doc = "* ClientCert_contexthandle Output contexthandle."] +#[doc = "Opens a new ClientCert-context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cert` - Pointer to the DER cert."] +#[doc = "* `certsize` - Size of the DER cert."] +#[doc = "* `key` - Pointer to the DER key."] +#[doc = "* `keysize` - Size of the DER key."] +#[doc = "* `ClientCert_contexthandle` - Output contexthandle."] + pub fn sslcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -14502,9 +20305,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a ClientCert-context with a default certID."] - #[doc = "* certID ID of the ClientCert to use."] - #[doc = "* ClientCert_contexthandle Output contexthandle."] +#[doc = "Opens a ClientCert-context with a default certID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `certID` - ID of the ClientCert to use."] +#[doc = "* `ClientCert_contexthandle` - Output contexthandle."] + pub fn sslcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -14512,29 +20319,43 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes the specified ClientCert-context."] - #[doc = "* ClientCert_contexthandle ClientCert-context to use."] +#[doc = "Closes the specified ClientCert-context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ClientCert_contexthandle` - ClientCert-context to use."] + pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "This uses ps:ps SeedRNG internally."] +#[doc = "This uses ps:ps SeedRNG internally."] +#[doc = ""] + pub fn sslcSeedRNG() -> Result; } extern "C" { #[must_use] - #[doc = "This uses ps:ps GenerateRandomData internally."] - #[doc = "* buf Output buffer."] - #[doc = "* size Output size."] +#[doc = "This uses ps:ps GenerateRandomData internally."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Output buffer."] +#[doc = "* `size` - Output size."] + pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a sslc context."] - #[doc = "* context sslc context."] - #[doc = "* sockfd Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] - #[doc = "* input_opt Input sslc options bitmask."] - #[doc = "* hostname Server hostname."] +#[doc = "Creates a sslc context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - sslc context."] +#[doc = "* `sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] +#[doc = "* `input_opt` - Input sslc options bitmask."] +#[doc = "* `hostname` - Server hostname."] + pub fn sslcCreateContext( context: *mut sslcContext, sockfd: ::libc::c_int, @@ -14607,12 +20428,18 @@ extern "C" { pub fn sslcAddCert(context: *mut sslcContext, buf: *const u8_, size: u32_) -> Result; } #[doc = "HTTP context."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct httpcContext { - #[doc = "Service handle."] +#[doc = "Service handle."] +#[doc = ""] + pub servhandle: Handle, - #[doc = "HTTP handle."] +#[doc = "HTTP handle."] +#[doc = ""] + pub httphandle: u32_, } pub const HTTPC_METHOD_GET: HTTPC_RequestMethod = 1; @@ -14621,32 +20448,50 @@ pub const HTTPC_METHOD_HEAD: HTTPC_RequestMethod = 3; pub const HTTPC_METHOD_PUT: HTTPC_RequestMethod = 4; pub const HTTPC_METHOD_DELETE: HTTPC_RequestMethod = 5; #[doc = "HTTP request method."] +#[doc = ""] + pub type HTTPC_RequestMethod = ::libc::c_uint; #[doc = "Request in progress."] +#[doc = ""] + pub const HTTPC_STATUS_REQUEST_IN_PROGRESS: HTTPC_RequestStatus = 5; #[doc = "Download ready."] +#[doc = ""] + pub const HTTPC_STATUS_DOWNLOAD_READY: HTTPC_RequestStatus = 7; #[doc = "HTTP request status."] +#[doc = ""] + pub type HTTPC_RequestStatus = ::libc::c_uint; pub const HTTPC_KEEPALIVE_DISABLED: HTTPC_KeepAlive = 0; pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1; #[doc = "HTTP KeepAlive option."] +#[doc = ""] + pub type HTTPC_KeepAlive = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] +#[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] +#[doc = ""] + pub fn httpcInit(sharedmem_size: u32_) -> Result; } extern "C" { - #[doc = "Exits HTTPC."] +#[doc = "Exits HTTPC."] +#[doc = ""] + pub fn httpcExit(); } extern "C" { #[must_use] - #[doc = "Opens a HTTP context."] - #[doc = "* context Context to open."] - #[doc = "* url URL to connect to."] - #[doc = "* use_defaultproxy Whether the default proxy should be used (0 for default)"] +#[doc = "Opens a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to open."] +#[doc = "* `url` - URL to connect to."] +#[doc = "* `use_defaultproxy` - Whether the default proxy should be used (0 for default)"] + pub fn httpcOpenContext( context: *mut httpcContext, method: HTTPC_RequestMethod, @@ -14656,22 +20501,34 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes a HTTP context."] - #[doc = "* context Context to close."] +#[doc = "Closes a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to close."] + pub fn httpcCloseContext(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels a HTTP connection."] - #[doc = "* context Context to close."] +#[doc = "Cancels a HTTP connection."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to close."] + pub fn httpcCancelConnection(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a request header field to a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* name Name of the field."] - #[doc = "* value Value of the field."] +#[doc = "Adds a request header field to a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `name` - Name of the field."] +#[doc = "* `value` - Value of the field."] + pub fn httpcAddRequestHeaderField( context: *mut httpcContext, name: *const ::libc::c_char, @@ -14680,10 +20537,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a POST form field to a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* name Name of the field."] - #[doc = "* value Value of the field."] +#[doc = "Adds a POST form field to a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `name` - Name of the field."] +#[doc = "* `value` - Value of the field."] + pub fn httpcAddPostDataAscii( context: *mut httpcContext, name: *const ::libc::c_char, @@ -14692,11 +20553,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a POST form field with binary data to a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* name Name of the field."] - #[doc = "* value The binary data to pass as a value."] - #[doc = "* len Length of the binary data which has been passed."] +#[doc = "Adds a POST form field with binary data to a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `name` - Name of the field."] +#[doc = "* `value` - The binary data to pass as a value."] +#[doc = "* `len` - Length of the binary data which has been passed."] + pub fn httpcAddPostDataBinary( context: *mut httpcContext, name: *const ::libc::c_char, @@ -14706,33 +20571,49 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a POST body to a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* data The data to be passed as raw into the body of the post request."] - #[doc = "* len Length of data passed by data param."] +#[doc = "Adds a POST body to a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `data` - The data to be passed as raw into the body of the post request."] +#[doc = "* `len` - Length of data passed by data param."] + pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Begins a HTTP request."] - #[doc = "* context Context to use."] +#[doc = "Begins a HTTP request."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] + pub fn httpcBeginRequest(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] - #[doc = "Receives data from a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* buffer Buffer to receive data to."] - #[doc = "* size Size of the buffer."] +#[doc = "Receives data from a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `buffer` - Buffer to receive data to."] +#[doc = "* `size` - Size of the buffer."] + pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Receives data from a HTTP context with a timeout value."] - #[doc = "* context Context to use."] - #[doc = "* buffer Buffer to receive data to."] - #[doc = "* size Size of the buffer."] - #[doc = "* timeout Maximum time in nanoseconds to wait for a reply."] +#[doc = "Receives data from a HTTP context with a timeout value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `buffer` - Buffer to receive data to."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] + pub fn httpcReceiveDataTimeout( context: *mut httpcContext, buffer: *mut u8_, @@ -14742,9 +20623,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the request state of a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* out Pointer to output the HTTP request state to."] +#[doc = "Gets the request state of a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `out` - Pointer to output the HTTP request state to."] + pub fn httpcGetRequestState( context: *mut httpcContext, out: *mut HTTPC_RequestStatus, @@ -14752,10 +20637,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the download size state of a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* downloadedsize Pointer to output the downloaded size to."] - #[doc = "* contentsize Pointer to output the total content size to."] +#[doc = "Gets the download size state of a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `downloadedsize` - Pointer to output the downloaded size to."] +#[doc = "* `contentsize` - Pointer to output the total content size to."] + pub fn httpcGetDownloadSizeState( context: *mut httpcContext, downloadedsize: *mut u32_, @@ -14764,17 +20653,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the response code of the HTTP context."] - #[doc = "* context Context to get the response code of."] - #[doc = "* out Pointer to write the response code to."] +#[doc = "Gets the response code of the HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to get the response code of."] +#[doc = "* `out` - Pointer to write the response code to."] + pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the response code of the HTTP context with a timeout value."] - #[doc = "* context Context to get the response code of."] - #[doc = "* out Pointer to write the response code to."] - #[doc = "* timeout Maximum time in nanoseconds to wait for a reply."] +#[doc = "Gets the response code of the HTTP context with a timeout value."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to get the response code of."] +#[doc = "* `out` - Pointer to write the response code to."] +#[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] + pub fn httpcGetResponseStatusCodeTimeout( context: *mut httpcContext, out: *mut u32_, @@ -14783,11 +20680,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a response header field from a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* name Name of the field."] - #[doc = "* value Pointer to output the value of the field to."] - #[doc = "* valuebuf_maxsize Maximum size of the value buffer."] +#[doc = "Gets a response header field from a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `name` - Name of the field."] +#[doc = "* `value` - Pointer to output the value of the field to."] +#[doc = "* `valuebuf_maxsize` - Maximum size of the value buffer."] + pub fn httpcGetResponseHeader( context: *mut httpcContext, name: *const ::libc::c_char, @@ -14797,10 +20698,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a trusted RootCA cert to a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* cert Pointer to DER cert."] - #[doc = "* certsize Size of the DER cert."] +#[doc = "Adds a trusted RootCA cert to a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `cert` - Pointer to DER cert."] +#[doc = "* `certsize` - Size of the DER cert."] + pub fn httpcAddTrustedRootCA( context: *mut httpcContext, cert: *const u8_, @@ -14809,16 +20714,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default RootCA cert to a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* certID ID of the cert to add, see sslc.h."] +#[doc = "Adds a default RootCA cert to a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `certID` - ID of the cert to add, see sslc.h."] + pub fn httpcAddDefaultCert(context: *mut httpcContext, certID: SSLC_DefaultRootCert) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the RootCertChain for a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* RootCertChain_contexthandle Contexthandle for the RootCertChain."] +#[doc = "Sets the RootCertChain for a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] + pub fn httpcSelectRootCertChain( context: *mut httpcContext, RootCertChain_contexthandle: u32_, @@ -14826,12 +20739,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the ClientCert for a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* cert Pointer to DER cert."] - #[doc = "* certsize Size of the DER cert."] - #[doc = "* privk Pointer to the DER private key."] - #[doc = "* privk_size Size of the privk."] +#[doc = "Sets the ClientCert for a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `cert` - Pointer to DER cert."] +#[doc = "* `certsize` - Size of the DER cert."] +#[doc = "* `privk` - Pointer to the DER private key."] +#[doc = "* `privk_size` - Size of the privk."] + pub fn httpcSetClientCert( context: *mut httpcContext, cert: *const u8_, @@ -14842,9 +20759,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the default clientcert for a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* certID ID of the cert to add, see sslc.h."] +#[doc = "Sets the default clientcert for a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `certID` - ID of the cert to add, see sslc.h."] + pub fn httpcSetClientCertDefault( context: *mut httpcContext, certID: SSLC_DefaultClientCert, @@ -14852,9 +20773,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the ClientCert contexthandle for a HTTP context."] - #[doc = "* context Context to use."] - #[doc = "* ClientCert_contexthandle Contexthandle for the ClientCert."] +#[doc = "Sets the ClientCert contexthandle for a HTTP context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to use."] +#[doc = "* `ClientCert_contexthandle` - Contexthandle for the ClientCert."] + pub fn httpcSetClientCertContext( context: *mut httpcContext, ClientCert_contexthandle: u32_, @@ -14862,39 +20787,61 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets SSL options for the context."] - #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] - #[doc = "* context Context to set flags on."] - #[doc = "* options SSL option flags."] +#[doc = "Sets SSL options for the context."] +#[doc = ""] +#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to set flags on."] +#[doc = "* `options` - SSL option flags."] + pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the SSL options which will be cleared for the context."] - #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] - #[doc = "* context Context to clear flags on."] - #[doc = "* options SSL option flags."] +#[doc = "Sets the SSL options which will be cleared for the context."] +#[doc = ""] +#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to clear flags on."] +#[doc = "* `options` - SSL option flags."] + pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] - #[doc = "* RootCertChain_contexthandle Output RootCertChain contexthandle."] +#[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - Output RootCertChain contexthandle."] + pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Destroy a RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain to use."] +#[doc = "Destroy a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a RootCA cert to a RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain to use."] - #[doc = "* cert Pointer to DER cert."] - #[doc = "* certsize Size of the DER cert."] - #[doc = "* cert_contexthandle Optional output ptr for the cert contexthandle(this can be NULL)."] +#[doc = "Adds a RootCA cert to a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "* `cert` - Pointer to DER cert."] +#[doc = "* `certsize` - Size of the DER cert."] +#[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] + pub fn httpcRootCertChainAddCert( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -14904,10 +20851,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default RootCA cert to a RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain to use."] - #[doc = "* certID ID of the cert to add, see sslc.h."] - #[doc = "* cert_contexthandle Optional output ptr for the cert contexthandle(this can be NULL)."] +#[doc = "Adds a default RootCA cert to a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "* `certID` - ID of the cert to add, see sslc.h."] +#[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] + pub fn httpcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -14916,9 +20867,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Removes a cert from a RootCertChain."] - #[doc = "* RootCertChain_contexthandle RootCertChain to use."] - #[doc = "* cert_contexthandle Contexthandle of the cert to remove."] +#[doc = "Removes a cert from a RootCertChain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "* `cert_contexthandle` - Contexthandle of the cert to remove."] + pub fn httpcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -14926,12 +20881,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] - #[doc = "* cert Pointer to DER cert."] - #[doc = "* certsize Size of the DER cert."] - #[doc = "* privk Pointer to the DER private key."] - #[doc = "* privk_size Size of the privk."] - #[doc = "* ClientCert_contexthandle Output ClientCert context handle."] +#[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cert` - Pointer to DER cert."] +#[doc = "* `certsize` - Size of the DER cert."] +#[doc = "* `privk` - Pointer to the DER private key."] +#[doc = "* `privk_size` - Size of the privk."] +#[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] + pub fn httpcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -14942,9 +20901,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] - #[doc = "* certID ID of the cert to add, see sslc.h."] - #[doc = "* ClientCert_contexthandle Output ClientCert context handle."] +#[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `certID` - ID of the cert to add, see sslc.h."] +#[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] + pub fn httpcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -14952,18 +20915,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes a ClientCert context."] - #[doc = "* ClientCert_contexthandle ClientCert context to use."] +#[doc = "Closes a ClientCert context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ClientCert_contexthandle` - ClientCert context to use."] + pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Downloads data from the HTTP context into a buffer."] - #[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] - #[doc = "* context Context to download data from."] - #[doc = "* buffer Buffer to write data to."] - #[doc = "* size Size of the buffer."] - #[doc = "* downloadedsize Pointer to write the size of the downloaded data to."] +#[doc = "Downloads data from the HTTP context into a buffer."] +#[doc = ""] +#[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to download data from."] +#[doc = "* `buffer` - Buffer to write data to."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `downloadedsize` - Pointer to write the size of the downloaded data to."] + pub fn httpcDownloadData( context: *mut httpcContext, buffer: *mut u8_, @@ -14973,12 +20945,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets Keep-Alive for the context."] - #[doc = "* context Context to set the KeepAlive flag on."] - #[doc = "* option HTTPC_KeepAlive option."] +#[doc = "Sets Keep-Alive for the context."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context` - Context to set the KeepAlive flag on."] +#[doc = "* `option` - HTTPC_KeepAlive option."] + pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result; } #[doc = "Node info struct."] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct udsNodeInfo { @@ -15021,6 +20999,8 @@ impl Default for udsNodeInfo { } } #[doc = "Connection status struct."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct udsConnectionStatus { @@ -15034,6 +21014,8 @@ pub struct udsConnectionStatus { pub node_bitmask: u16_, } #[doc = "Network struct stored as big-endian."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct udsNetworkStruct { @@ -15074,6 +21056,8 @@ pub struct udsBindContext { pub spectator: bool, } #[doc = "General NWM input structure used for AP scanning."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nwmScanInputStruct { @@ -15094,6 +21078,8 @@ impl Default for nwmScanInputStruct { } } #[doc = "General NWM output structure from AP scanning."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyHeader { @@ -15102,6 +21088,8 @@ pub struct nwmBeaconDataReplyHeader { pub total_entries: u32_, } #[doc = "General NWM output structure from AP scanning, for each entry."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyEntry { @@ -15116,6 +21104,8 @@ pub struct nwmBeaconDataReplyEntry { pub val_x1c: u32_, } #[doc = "Output structure generated from host scanning output."] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct udsNetworkScanInfo { @@ -15145,20 +21135,30 @@ pub const UDSCONTYPE_Spectator: udsConnectionType = 2; pub type udsConnectionType = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes UDS."] - #[doc = "* sharedmem_size This must be 0x1000-byte aligned."] - #[doc = "* username Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] +#[doc = "Initializes UDS."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sharedmem_size` - This must be 0x1000-byte aligned."] +#[doc = "* `username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] + pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result; } extern "C" { - #[doc = "Exits UDS."] +#[doc = "Exits UDS."] +#[doc = ""] + pub fn udsExit(); } extern "C" { #[must_use] - #[doc = "Generates a NodeInfo struct with data loaded from system-config."] - #[doc = "* nodeinfo Output NodeInfo struct."] - #[doc = "* username If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] +#[doc = "Generates a NodeInfo struct with data loaded from system-config."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nodeinfo` - Output NodeInfo struct."] +#[doc = "* `username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] + pub fn udsGenerateNodeInfo( nodeinfo: *mut udsNodeInfo, username: *const ::libc::c_char, @@ -15166,25 +21166,37 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] - #[doc = "* nodeinfo Input NodeInfo struct."] - #[doc = "* username This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] +#[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nodeinfo` - Input NodeInfo struct."] +#[doc = "* `username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] + pub fn udsGetNodeInfoUsername( nodeinfo: *const udsNodeInfo, username: *mut ::libc::c_char, ) -> Result; } extern "C" { - #[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] - #[doc = "* nodeinfo Input NodeInfo struct."] +#[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nodeinfo` - Input NodeInfo struct."] + pub fn udsCheckNodeInfoInitialized(nodeinfo: *const udsNodeInfo) -> bool; } extern "C" { - #[doc = "Generates a default NetworkStruct for creating networks."] - #[doc = "* network The output struct."] - #[doc = "* wlancommID Unique local-WLAN communications ID for each application."] - #[doc = "* id8 Additional ID that can be used by the application for different types of networks."] - #[doc = "* max_nodes Maximum number of nodes(devices) that can be connected to the network, including the host."] +#[doc = "Generates a default NetworkStruct for creating networks."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `network` - The output struct."] +#[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] +#[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] +#[doc = "* `max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] + pub fn udsGenerateDefaultNetworkStruct( network: *mut udsNetworkStruct, wlancommID: u32_, @@ -15194,15 +21206,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Scans for networks via beacon-scanning."] - #[doc = "* outbuf Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] - #[doc = "* maxsize Max size of the buffer."] - #[doc = "@Param networks Ptr where the allocated udsNetworkScanInfo array buffer is written. The allocsize is sizeof(udsNetworkScanInfo)*total_networks."] - #[doc = "@Param total_networks Total number of networks stored under the networks buffer."] - #[doc = "* wlancommID Unique local-WLAN communications ID for each application."] - #[doc = "* id8 Additional ID that can be used by the application for different types of networks."] - #[doc = "* host_macaddress When set, this code will only return network info from the specified host MAC address."] - #[doc = "@connected When not connected to a network this *must* be false. When connected to a network this *must* be true."] +#[doc = "Scans for networks via beacon-scanning."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `outbuf` - Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] +#[doc = "* `maxsize` - Max size of the buffer."] +#[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] +#[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] +#[doc = "* `host_macaddress` - When set, this code will only return network info from the specified host MAC address."] + pub fn udsScanBeacons( outbuf: *mut ::libc::c_void, maxsize: size_t, @@ -15216,17 +21229,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] - #[doc = "* buf Appdata buffer."] - #[doc = "* size Size of the input appdata."] +#[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Appdata buffer."] +#[doc = "* `size` - Size of the input appdata."] + pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] - #[doc = "* buf Appdata buffer."] - #[doc = "* size Max size of the output buffer."] - #[doc = "* actual_size If set, the actual size of the appdata written into the buffer is stored here."] +#[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Appdata buffer."] +#[doc = "* `size` - Max size of the output buffer."] +#[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] + pub fn udsGetApplicationData( buf: *mut ::libc::c_void, size: size_t, @@ -15235,10 +21256,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] - #[doc = "* buf Appdata buffer."] - #[doc = "* size Max size of the output buffer."] - #[doc = "* actual_size If set, the actual size of the appdata written into the buffer is stored here."] +#[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Appdata buffer."] +#[doc = "* `size` - Max size of the output buffer."] +#[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] + pub fn udsGetNetworkStructApplicationData( network: *const udsNetworkStruct, buf: *mut ::libc::c_void, @@ -15248,12 +21273,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Create a bind."] - #[doc = "* bindcontext The output bind context."] - #[doc = "* NetworkNodeID This is the NetworkNodeID which this bind can receive data from."] - #[doc = "* spectator False for a regular bind, true for a spectator."] - #[doc = "* data_channel This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] - #[doc = "* recv_buffer_size Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] +#[doc = "Create a bind."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bindcontext` - The output bind context."] +#[doc = "* `NetworkNodeID` - This is the NetworkNodeID which this bind can receive data from."] +#[doc = "* `spectator` - False for a regular bind, true for a spectator."] +#[doc = "* `data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] +#[doc = "* `recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] + pub fn udsBind( bindcontext: *mut udsBindContext, NetworkNodeID: u16_, @@ -15264,16 +21293,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Remove a bind."] - #[doc = "* bindcontext The bind context."] +#[doc = "Remove a bind."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bindcontext` - The bind context."] + pub fn udsUnbind(bindcontext: *mut udsBindContext) -> Result; } extern "C" { - #[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] - #[doc = "Always true. However if wait=false, this will return false if the event wasn't signaled."] - #[doc = "* bindcontext The bind context."] - #[doc = "* nextEvent Whether to discard the current event and wait for the next event."] - #[doc = "* wait When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] +#[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] +#[doc = ""] +#[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bindcontext` - The bind context."] +#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] +#[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] + pub fn udsWaitDataAvailable( bindcontext: *const udsBindContext, nextEvent: bool, @@ -15282,12 +21320,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] - #[doc = "* bindcontext Bind context."] - #[doc = "* buf Output receive buffer."] - #[doc = "* size Size of the buffer."] - #[doc = "* actual_size If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] - #[doc = "* src_NetworkNodeID If set, the source NetworkNodeID is written here. This is zero when no data was received."] +#[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bindcontext` - Bind context."] +#[doc = "* `buf` - Output receive buffer."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] +#[doc = "* `src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] + pub fn udsPullPacket( bindcontext: *const udsBindContext, buf: *mut ::libc::c_void, @@ -15298,12 +21340,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends data over the network."] - #[doc = "* dst_NetworkNodeID Destination NetworkNodeID."] - #[doc = "* data_channel See udsBind()."] - #[doc = "* flags Send flags, see the UDS_SENDFLAG enum values."] - #[doc = "* buf Input send buffer."] - #[doc = "* size Size of the buffer."] +#[doc = "Sends data over the network."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dst_NetworkNodeID` - Destination NetworkNodeID."] +#[doc = "* `data_channel` - See udsBind()."] +#[doc = "* `flags` - Send flags, see the UDS_SENDFLAG enum values."] +#[doc = "* `buf` - Input send buffer."] +#[doc = "* `size` - Size of the buffer."] + pub fn udsSendTo( dst_NetworkNodeID: u16_, data_channel: u8_, @@ -15314,19 +21360,27 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the wifi channel currently being used."] - #[doc = "* channel Output channel."] +#[doc = "Gets the wifi channel currently being used."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `channel` - Output channel."] + pub fn udsGetChannel(channel: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Starts hosting a new network."] - #[doc = "* network The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] - #[doc = "* passphrase Raw input passphrase buffer."] - #[doc = "* passphrase_size Size of the passphrase buffer."] - #[doc = "* context Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] - #[doc = "* data_channel This is the data_channel value which will be passed to udsBind() internally."] - #[doc = "* recv_buffer_size This is the recv_buffer_size value which will be passed to udsBind() internally."] +#[doc = "Starts hosting a new network."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `network` - The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] +#[doc = "* `passphrase` - Raw input passphrase buffer."] +#[doc = "* `passphrase_size` - Size of the passphrase buffer."] +#[doc = "* `context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] +#[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] +#[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] + pub fn udsCreateNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -15338,15 +21392,19 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Connect to a network."] - #[doc = "* network The NetworkStruct, you can use udsScanBeacons() for this."] - #[doc = "* passphrase Raw input passphrase buffer."] - #[doc = "* passphrase_size Size of the passphrase buffer."] - #[doc = "* context Optional output bind context which will be created for this host."] - #[doc = "* recv_NetworkNodeID This is the NetworkNodeID passed to udsBind() internally."] - #[doc = "* connection_type Type of connection, see the udsConnectionType enum values."] - #[doc = "* data_channel This is the data_channel value which will be passed to udsBind() internally."] - #[doc = "* recv_buffer_size This is the recv_buffer_size value which will be passed to udsBind() internally."] +#[doc = "Connect to a network."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `network` - The NetworkStruct, you can use udsScanBeacons() for this."] +#[doc = "* `passphrase` - Raw input passphrase buffer."] +#[doc = "* `passphrase_size` - Size of the passphrase buffer."] +#[doc = "* `context` - Optional output bind context which will be created for this host."] +#[doc = "* `recv_NetworkNodeID` - This is the NetworkNodeID passed to udsBind() internally."] +#[doc = "* `connection_type` - Type of connection, see the udsConnectionType enum values."] +#[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] +#[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] + pub fn udsConnectNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -15360,63 +21418,96 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Stop hosting the network."] +#[doc = "Stop hosting the network."] +#[doc = ""] + pub fn udsDestroyNetwork() -> Result; } extern "C" { #[must_use] - #[doc = "Disconnect this client device from the network."] +#[doc = "Disconnect this client device from the network."] +#[doc = ""] + pub fn udsDisconnectNetwork() -> Result; } extern "C" { #[must_use] - #[doc = "This can be used by the host to force-disconnect client(s)."] - #[doc = "* NetworkNodeID Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] +#[doc = "This can be used by the host to force-disconnect client(s)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] + pub fn udsEjectClient(NetworkNodeID: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] +#[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] +#[doc = ""] + pub fn udsEjectSpectator() -> Result; } extern "C" { #[must_use] - #[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] - #[doc = "* bitmask Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] - #[doc = "* flag When false, bit-clear, otherwise bit-set."] +#[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] +#[doc = "* `flag` - When false, bit-clear, otherwise bit-set."] + pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result; } extern "C" { #[must_use] - #[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] - #[doc = "* block When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] - #[doc = "* clients When true, (un)block regular clients."] - #[doc = "* flag When true, update UDSNETATTR_x4. Normally this should be false."] +#[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] +#[doc = "* `clients` - When true, (un)block regular clients."] +#[doc = "* `flag` - When true, update UDSNETATTR_x4. Normally this should be false."] + pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result; } extern "C" { #[must_use] - #[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] +#[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] +#[doc = ""] + pub fn udsAllowSpectators() -> Result; } extern "C" { #[must_use] - #[doc = "This loads the current ConnectionStatus struct."] - #[doc = "* output Output ConnectionStatus struct."] +#[doc = "This loads the current ConnectionStatus struct."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `output` - Output ConnectionStatus struct."] + pub fn udsGetConnectionStatus(output: *mut udsConnectionStatus) -> Result; } extern "C" { - #[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] - #[doc = "Always true. However if wait=false, this will return false if the event wasn't signaled."] - #[doc = "* nextEvent Whether to discard the current event and wait for the next event."] - #[doc = "* wait When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] +#[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] +#[doc = ""] +#[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] +#[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] + pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool; } extern "C" { #[must_use] - #[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] - #[doc = "* NetworkNodeID Target NetworkNodeID."] - #[doc = "* output Output NodeInfo struct."] +#[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `NetworkNodeID` - Target NetworkNodeID."] +#[doc = "* `output` - Output NodeInfo struct."] + pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result; } pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0; @@ -15425,6 +21516,8 @@ 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; #[doc = "Exclusive states."] +#[doc = ""] + pub type ndmExclusiveState = ::libc::c_uint; pub const NDM_STATE_INITIAL: ndmState = 0; pub const NDM_STATE_SUSPENDED: ndmState = 1; @@ -15439,6 +21532,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; #[doc = "Current states."] +#[doc = ""] + pub type ndmState = ::libc::c_uint; pub const NDM_DAEMON_CEC: ndmDaemon = 0; pub const NDM_DAEMON_BOSS: ndmDaemon = 1; @@ -15453,6 +21548,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; #[doc = "Used to specify multiple daemons."] +#[doc = ""] + pub type ndmDaemonMask = ::libc::c_uint; pub const NDM_DAEMON_STATUS_BUSY: ndmDaemonStatus = 0; pub const NDM_DAEMON_STATUS_IDLE: ndmDaemonStatus = 1; @@ -15461,190 +21558,320 @@ pub const NDM_DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3; pub type ndmDaemonStatus = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes ndmu."] +#[doc = "Initializes ndmu."] +#[doc = ""] + pub fn ndmuInit() -> Result; } extern "C" { - #[doc = "Exits ndmu."] +#[doc = "Exits ndmu."] +#[doc = ""] + pub fn ndmuExit(); } extern "C" { #[must_use] - #[doc = "Sets the network daemon to an exclusive state."] - #[doc = "* state State specified in the ndmExclusiveState enumerator."] +#[doc = "Sets the network daemon to an exclusive state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - State specified in the ndmExclusiveState enumerator."] + pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels an exclusive state for the network daemon."] +#[doc = "Cancels an exclusive state for the network daemon."] +#[doc = ""] + pub fn NDMU_LeaveExclusiveState() -> Result; } extern "C" { #[must_use] - #[doc = "Returns the exclusive state for the network daemon."] - #[doc = "* state Pointer to write the exclsuive state to."] +#[doc = "Returns the exclusive state for the network daemon."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to write the exclsuive state to."] + pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result; } extern "C" { #[must_use] - #[doc = "Locks the exclusive state."] +#[doc = "Locks the exclusive state."] +#[doc = ""] + pub fn NDMU_LockState() -> Result; } extern "C" { #[must_use] - #[doc = "Unlocks the exclusive state."] +#[doc = "Unlocks the exclusive state."] +#[doc = ""] + pub fn NDMU_UnlockState() -> Result; } extern "C" { #[must_use] - #[doc = "Suspends network daemon."] - #[doc = "* mask The specified daemon."] +#[doc = "Suspends network daemon."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mask` - The specified daemon."] + pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] - #[doc = "Resumes network daemon."] - #[doc = "* mask The specified daemon."] +#[doc = "Resumes network daemon."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mask` - The specified daemon."] + pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] - #[doc = "Suspends scheduling for all network daemons."] - #[doc = "* flag 0 = Wait for completion, 1 = Perform in background."] +#[doc = "Suspends scheduling for all network daemons."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `flag` - 0 = Wait for completion, 1 = Perform in background."] + pub fn NDMU_SuspendScheduler(flag: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Resumes daemon scheduling."] +#[doc = "Resumes daemon scheduling."] +#[doc = ""] + pub fn NDMU_ResumeScheduler() -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current state for the network daemon."] - #[doc = "* state Pointer to write the current state to."] +#[doc = "Returns the current state for the network daemon."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to write the current state to."] + pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the daemon state."] - #[doc = "* state Pointer to write the daemons state to."] +#[doc = "Returns the daemon state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to write the daemons state to."] + pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the scan interval."] - #[doc = "* interval Value to set the scan interval to."] +#[doc = "Sets the scan interval."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `interval` - Value to set the scan interval to."] + pub fn NDMU_SetScanInterval(interval: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the scan interval."] - #[doc = "* interval Pointer to write the interval value to."] +#[doc = "Returns the scan interval."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `interval` - Pointer to write the interval value to."] + pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the retry interval."] - #[doc = "* interval Pointer to write the interval value to."] +#[doc = "Returns the retry interval."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `interval` - Pointer to write the interval value to."] + pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Reverts network daemon to defaults."] +#[doc = "Reverts network daemon to defaults."] +#[doc = ""] + pub fn NDMU_ResetDaemons() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current default daemon bit mask."] - #[doc = "* interval Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] +#[doc = "Gets the current default daemon bit mask."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] + pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result; } extern "C" { #[must_use] - #[doc = "Clears half awake mac filter."] +#[doc = "Clears half awake mac filter."] +#[doc = ""] + pub fn NDMU_ClearMacFilter() -> Result; } #[doc = "Initial installation"] +#[doc = ""] + pub const IM_DEFAULT: NIM_InstallationMode = 0; #[doc = "Unknown"] +#[doc = ""] + pub const IM_UNKNOWN1: NIM_InstallationMode = 1; #[doc = "Unknown"] +#[doc = ""] + pub const IM_UNKNOWN2: NIM_InstallationMode = 2; #[doc = "Reinstall currently installed title; use this if the title is already installed (including updates)"] +#[doc = ""] + pub const IM_REINSTALL: NIM_InstallationMode = 3; #[doc = "Mode that NIM downloads/installs a title with."] +#[doc = ""] + pub type NIM_InstallationMode = ::libc::c_uint; #[doc = "Download not yet initialized"] +#[doc = ""] + pub const DS_NOT_INITIALIZED: NIM_DownloadState = 0; #[doc = "Download initialized"] +#[doc = ""] + pub const DS_INITIALIZED: NIM_DownloadState = 1; #[doc = "Downloading and installing TMD"] +#[doc = ""] + pub const DS_DOWNLOAD_TMD: NIM_DownloadState = 2; #[doc = "Initializing save data"] +#[doc = ""] + pub const DS_PREPARE_SAVE_DATA: NIM_DownloadState = 3; #[doc = "Downloading and installing contents"] +#[doc = ""] + pub const DS_DOWNLOAD_CONTENTS: NIM_DownloadState = 4; #[doc = "Waiting before calling AM_CommitImportTitles"] +#[doc = ""] + pub const DS_WAIT_COMMIT: NIM_DownloadState = 5; #[doc = "Running AM_CommitImportTitles"] +#[doc = ""] + pub const DS_COMMITTING: NIM_DownloadState = 6; #[doc = "Title installation finished"] +#[doc = ""] + pub const DS_FINISHED: NIM_DownloadState = 7; #[doc = "(unknown error regarding title version)"] +#[doc = ""] + pub const DS_VERSION_ERROR: NIM_DownloadState = 8; #[doc = "Creating the .ctx file?"] +#[doc = ""] + pub const DS_CREATE_CONTEXT: NIM_DownloadState = 9; #[doc = "Irrecoverable error encountered (e.g. out of space)"] +#[doc = ""] + pub const DS_CANNOT_RECOVER: NIM_DownloadState = 10; #[doc = "Invalid state"] +#[doc = ""] + pub const DS_INVALID: NIM_DownloadState = 11; #[doc = "Current state of a NIM download/installation."] +#[doc = ""] + pub type NIM_DownloadState = ::libc::c_uint; #[doc = "Input configuration for NIM download/installation tasks."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleConfig { - #[doc = "Title ID"] +#[doc = "Title ID"] +#[doc = ""] + pub titleId: u64_, - #[doc = "Title version"] +#[doc = "Title version"] +#[doc = ""] + pub version: u32_, - #[doc = "Always 0"] +#[doc = "Always 0"] +#[doc = ""] + pub unknown_0: u32_, - #[doc = "Age for the HOME Menu parental controls"] +#[doc = "Age for the HOME Menu parental controls"] +#[doc = ""] + pub ratingAge: u8_, - #[doc = "Media type, see FS_MediaType enum"] +#[doc = "Media type, see @ref FS_MediaType enum"] +#[doc = ""] + pub mediaType: u8_, - #[doc = "Padding"] +#[doc = "Padding"] +#[doc = ""] + pub padding: [u8_; 2usize], - #[doc = "Unknown input, seems to be always 0"] +#[doc = "Unknown input, seems to be always 0"] +#[doc = ""] + pub unknown_1: u32_, } #[doc = "Output struct for NIM downloads/installations in progress."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleProgress { - #[doc = "State, see NIM_DownloadState enum"] +#[doc = "State, see NIM_DownloadState enum"] +#[doc = ""] + pub state: u32_, - #[doc = "Last result code in NIM"] +#[doc = "Last result code in NIM"] +#[doc = ""] + pub lastResult: Result, - #[doc = "Amount of bytes that have been downloaded"] +#[doc = "Amount of bytes that have been downloaded"] +#[doc = ""] + pub downloadedSize: u64_, - #[doc = "Amount of bytes that need to be downloaded in total"] +#[doc = "Amount of bytes that need to be downloaded in total"] +#[doc = ""] + pub totalSize: u64_, } extern "C" { #[must_use] - #[doc = "Initializes nim:s. This uses networking and is blocking."] - #[doc = "* buffer A buffer for internal use. It must be at least 0x20000 bytes long."] - #[doc = "* buffer_len Length of the passed buffer."] +#[doc = "Initializes nim:s. This uses networking and is blocking."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] +#[doc = "* `buffer_len` - Length of the passed buffer."] + pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] - #[doc = "* buffer A buffer for internal use. It must be at least 0x20000 bytes long."] - #[doc = "* buffer_len Length of the passed buffer."] - #[doc = "* TIN The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use nimsInit instead."] +#[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] +#[doc = "* `buffer_len` - Length of the passed buffer."] +#[doc = "* `TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use @ref nimsInit instead."] + pub fn nimsInitWithTIN( buffer: *mut ::libc::c_void, buffer_len: size_t, @@ -15652,33 +21879,49 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Exits nim:s."] +#[doc = "Exits nim:s."] +#[doc = ""] + pub fn nimsExit(); } extern "C" { - #[doc = "Gets the current nim:s session handle."] +#[doc = "Gets the current nim:s session handle."] +#[doc = ""] + pub fn nimsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Sets an attribute."] - #[doc = "* attr Name of the attribute."] - #[doc = "* val Value of the attribute."] +#[doc = "Sets an attribute."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `attr` - Name of the attribute."] +#[doc = "* `val` - Value of the attribute."] + pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if nim wants a system update."] - #[doc = "* want_update Set to true if a system update is required. Can be NULL."] +#[doc = "Checks if nim wants a system update."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `want_update` - Set to true if a system update is required. Can be NULL."] + pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result; } extern "C" { - #[doc = "Makes a TitleConfig struct for use with NIMS_RegisterTask, NIMS_StartDownload or NIMS_StartDownloadSimple."] - #[doc = "* cfg Struct to initialize."] - #[doc = "* titleId Title ID to download and install."] - #[doc = "* version Version of the title to download and install."] - #[doc = "* ratingAge Age for which the title is aged; used by parental controls in HOME Menu."] - #[doc = "* mediaType Media type of the title to download and install."] +#[doc = "Makes a TitleConfig struct for use with @ref NIMS_RegisterTask, @ref NIMS_StartDownload or @ref NIMS_StartDownloadSimple."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cfg` - Struct to initialize."] +#[doc = "* `titleId` - Title ID to download and install."] +#[doc = "* `version` - Version of the title to download and install."] +#[doc = "* `ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] +#[doc = "* `mediaType` - Media type of the title to download and install."] + pub fn NIMS_MakeTitleConfig( cfg: *mut NIM_TitleConfig, titleId: u64_, @@ -15689,10 +21932,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] - #[doc = "* cfg Title config to use. See NIMS_MakeTitleConfig."] - #[doc = "* name Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] - #[doc = "* maker Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] +#[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] +#[doc = "* `name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] +#[doc = "* `maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] + pub fn NIMS_RegisterTask( cfg: *const NIM_TitleConfig, name: *const ::libc::c_char, @@ -15701,39 +21948,61 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks whether a background download task for the given title is registered with NIM."] - #[doc = "* titleId Title ID to check for."] - #[doc = "* registered Whether there is a background download task registered."] +#[doc = "Checks whether a background download task for the given title is registered with NIM."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleId` - Title ID to check for."] +#[doc = "* `registered` - Whether there is a background download task registered."] + pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Unregisters a background download task."] - #[doc = "* titleId Title ID whose background download task to cancel."] +#[doc = "Unregisters a background download task."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleId` - Title ID whose background download task to cancel."] + pub fn NIMS_UnregisterTask(titleId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Starts an active download with NIM. Progress can be checked with NIMS_GetProcess. Do not exit the process while a download is in progress without calling NIMS_CancelDownload."] - #[doc = "* cfg Title config to use. See NIMS_MakeTitleConfig."] - #[doc = "* mode The installation mode to use. See NIM_InstallationMode."] +#[doc = "Starts an active download with NIM. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] +#[doc = "* `mode` - The installation mode to use. See @ref NIM_InstallationMode."] + pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result; } extern "C" { #[must_use] - #[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with NIMS_GetProcess. Do not exit the process while a download is in progress without calling NIMS_CancelDownload."] - #[doc = "* cfg Title config to use. See NIMS_MakeTitleConfig."] +#[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] + pub fn NIMS_StartDownloadSimple(cfg: *const NIM_TitleConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Checks the status of the current active download."] - #[doc = "* tp Title progress struct to write to. See NIM_TitleProgress."] +#[doc = "Checks the status of the current active download."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `tp` - Title progress struct to write to. See @ref NIM_TitleProgress."] + pub fn NIMS_GetProgress(tp: *mut NIM_TitleProgress) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels the current active download with NIM."] +#[doc = "Cancels the current active download with NIM."] +#[doc = ""] + pub fn NIMS_CancelDownload() -> Result; } extern "C" { @@ -15745,43 +22014,65 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Turns wireless on or off."] - #[doc = "* enableWifi True enables it, false disables it."] +#[doc = "Turns wireless on or off."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `enableWifi` - True enables it, false disables it."] + pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes IRU."] - #[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] - #[doc = "* sharedmem_addr Address of the shared memory block to use."] - #[doc = "* sharedmem_size Size of the shared memory block."] +#[doc = "Initializes IRU."] +#[doc = ""] +#[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sharedmem_addr` - Address of the shared memory block to use."] +#[doc = "* `sharedmem_size` - Size of the shared memory block."] + pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result; } extern "C" { - #[doc = "Shuts down IRU."] +#[doc = "Shuts down IRU."] +#[doc = ""] + pub fn iruExit(); } extern "C" { - #[doc = "Gets the IRU service handle."] - #[doc = "The IRU service handle."] +#[doc = "Gets the IRU service handle."] +#[doc = ""] +#[doc = "Returns: The IRU service handle."] +#[doc = ""] + pub fn iruGetServHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Sends IR data."] - #[doc = "* buf Buffer to send data from."] - #[doc = "* size Size of the buffer."] - #[doc = "* wait Whether to wait for the data to be sent."] +#[doc = "Sends IR data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Buffer to send data from."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `wait` - Whether to wait for the data to be sent."] + pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Receives IR data."] - #[doc = "* buf Buffer to receive data to."] - #[doc = "* size Size of the buffer."] - #[doc = "* flag Flags to receive data with."] - #[doc = "* transfercount Pointer to output the number of bytes read to."] - #[doc = "* wait Whether to wait for the data to be received."] +#[doc = "Receives IR data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Buffer to receive data to."] +#[doc = "* `size` - Size of the buffer."] +#[doc = "* `flag` - Flags to receive data with."] +#[doc = "* `transfercount` - Pointer to output the number of bytes read to."] +#[doc = "* `wait` - Whether to wait for the data to be received."] + pub fn iruRecvData( buf: *mut u8_, size: u32_, @@ -15792,115 +22083,177 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes the IR session."] +#[doc = "Initializes the IR session."] +#[doc = ""] + pub fn IRU_Initialize() -> Result; } extern "C" { #[must_use] - #[doc = "Shuts down the IR session."] +#[doc = "Shuts down the IR session."] +#[doc = ""] + pub fn IRU_Shutdown() -> Result; } extern "C" { #[must_use] - #[doc = "Begins sending data."] - #[doc = "* buf Buffer to send."] - #[doc = "* size Size of the buffer."] +#[doc = "Begins sending data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Buffer to send."] +#[doc = "* `size` - Size of the buffer."] + pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for a send operation to complete."] +#[doc = "Waits for a send operation to complete."] +#[doc = ""] + pub fn IRU_WaitSendTransfer() -> Result; } extern "C" { #[must_use] - #[doc = "Begins receiving data."] - #[doc = "* size Size of the data to receive."] - #[doc = "* flag Flags to use when receiving."] +#[doc = "Begins receiving data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the data to receive."] +#[doc = "* `flag` - Flags to use when receiving."] + pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for a receive operation to complete."] - #[doc = "* transfercount Pointer to output the number of bytes read to."] +#[doc = "Waits for a receive operation to complete."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `transfercount` - Pointer to output the number of bytes read to."] + pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the IR bit rate."] - #[doc = "* value Bit rate to set."] +#[doc = "Sets the IR bit rate."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Bit rate to set."] + pub fn IRU_SetBitRate(value: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the IR bit rate."] - #[doc = "* out Pointer to write the bit rate to."] +#[doc = "Gets the IR bit rate."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the bit rate to."] + pub fn IRU_GetBitRate(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the IR LED state."] - #[doc = "* value IR LED state to set."] +#[doc = "Sets the IR LED state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - IR LED state to set."] + pub fn IRU_SetIRLEDState(value: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the IR LED state."] - #[doc = "* out Pointer to write the IR LED state to."] +#[doc = "Gets the IR LED state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the IR LED state to."] + pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes NS."] +#[doc = "Initializes NS."] +#[doc = ""] + pub fn nsInit() -> Result; } extern "C" { - #[doc = "Exits NS."] +#[doc = "Exits NS."] +#[doc = ""] + pub fn nsExit(); } extern "C" { #[must_use] - #[doc = "Launches a title and the required firmware (only if necessary)."] - #[doc = "* titleid ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] +#[doc = "Launches a title and the required firmware (only if necessary)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] + pub fn NS_LaunchFIRM(titleid: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Launches a title."] - #[doc = "* titleid ID of the title to launch, or 0 for gamecard."] - #[doc = "* launch_flags Flags used when launching the title."] - #[doc = "* procid Pointer to write the process ID of the launched title to."] +#[doc = "Launches a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleid` - ID of the title to launch, or 0 for gamecard."] +#[doc = "* `launch_flags` - Flags used when launching the title."] +#[doc = "* `procid` - Pointer to write the process ID of the launched title to."] + pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the application from which this function is called"] +#[doc = "Terminates the application from which this function is called"] +#[doc = ""] + pub fn NS_TerminateTitle() -> Result; } extern "C" { #[must_use] - #[doc = "Launches a title and the required firmware."] - #[doc = "* titleid ID of the title to launch, 0 for gamecard."] - #[doc = "* flags Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] +#[doc = "Launches a title and the required firmware."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleid` - ID of the title to launch, 0 for gamecard."] +#[doc = "* `flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] + pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Reboots to a title."] - #[doc = "* mediatype Mediatype of the title."] - #[doc = "* titleid ID of the title to launch."] +#[doc = "Reboots to a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mediatype` - Mediatype of the title."] +#[doc = "* `titleid` - ID of the title to launch."] + pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the process with the specified titleid."] - #[doc = "* titleid ID of the title to terminate."] - #[doc = "* timeout Timeout in nanoseconds. Pass 0 if not required."] +#[doc = "Terminates the process with the specified titleid."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleid` - ID of the title to terminate."] +#[doc = "* `timeout` - Timeout in nanoseconds. Pass 0 if not required."] + pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Reboots the system"] +#[doc = "Reboots the system"] +#[doc = ""] + pub fn NS_RebootSystem() -> Result; } pub const PMLAUNCHFLAG_NORMAL_APPLICATION: _bindgen_ty_26 = 1; @@ -15909,39 +22262,60 @@ pub const PMLAUNCHFLAG_NOTIFY_TERMINATION: _bindgen_ty_26 = 4; pub const PMLAUNCHFLAG_QUEUE_DEBUG_APPLICATION: _bindgen_ty_26 = 8; pub const PMLAUNCHFLAG_TERMINATION_NOTIFICATION_MASK: _bindgen_ty_26 = 240; #[doc = "Forces the usage of the O3DS system mode app memory setting even if N3DS system mode is not \"Legacy\". Dev4 and Dev5 not supported. N3DS only."] +#[doc = ""] + pub const PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM: _bindgen_ty_26 = 256; #[doc = "In conjunction with the above, forces the 96MB app memory setting. N3DS only."] +#[doc = ""] + pub const PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM: _bindgen_ty_26 = 512; pub const PMLAUNCHFLAG_USE_UPDATE_TITLE: _bindgen_ty_26 = 65536; #[doc = "Launch flags for PM launch commands."] +#[doc = ""] + pub type _bindgen_ty_26 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes pm:app."] +#[doc = "Initializes pm:app."] +#[doc = ""] + pub fn pmAppInit() -> Result; } extern "C" { - #[doc = "Exits pm:app."] +#[doc = "Exits pm:app."] +#[doc = ""] + pub fn pmAppExit(); } extern "C" { - #[doc = "Gets the current pm:app session handle."] - #[doc = "The current pm:app session handle."] +#[doc = "Gets the current pm:app session handle."] +#[doc = ""] +#[doc = "Returns: The current pm:app session handle."] +#[doc = ""] + pub fn pmAppGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Launches a title."] - #[doc = "* programInfo Program information of the title."] - #[doc = "* launchFlags Flags to launch the title with."] +#[doc = "Launches a title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programInfo` - Program information of the title."] +#[doc = "* `launchFlags` - Flags to launch the title with."] + pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Launches a title, applying patches."] - #[doc = "* programInfo Program information of the title."] - #[doc = "* programInfoUpdate Program information of the update title."] - #[doc = "* launchFlags Flags to launch the title with."] +#[doc = "Launches a title, applying patches."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programInfo` - Program information of the title."] +#[doc = "* `programInfoUpdate` - Program information of the update title."] +#[doc = "* `launchFlags` - Flags to launch the title with."] + pub fn PMAPP_LaunchTitleUpdate( programInfo: *const FS_ProgramInfo, programInfoUpdate: *const FS_ProgramInfo, @@ -15950,10 +22324,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] - #[doc = "* outCoreInfo Pointer to write the ExHeader Arm11CoreInfo to."] - #[doc = "* outSiFlags Pointer to write the ExHeader SystemInfo flags to."] - #[doc = "* programInfo Program information of the title."] +#[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] +#[doc = "* `outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] +#[doc = "* `programInfo` - Program information of the title."] + pub fn PMAPP_GetTitleExheaderFlags( outCoreInfo: *mut ExHeader_Arm11CoreInfo, outSiFlags: *mut ExHeader_SystemInfoFlags, @@ -15962,24 +22340,36 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the current FIRM launch parameters."] - #[doc = "* size Size of the FIRM launch parameter buffer."] - #[doc = "* in Buffer to retrieve the launch parameters from."] +#[doc = "Sets the current FIRM launch parameters."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the FIRM launch parameter buffer."] +#[doc = "* `in` - Buffer to retrieve the launch parameters from."] + pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current FIRM launch parameters."] - #[doc = "* size Size of the FIRM launch parameter buffer."] - #[doc = "* out Buffer to write the launch parameters to."] +#[doc = "Gets the current FIRM launch parameters."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the FIRM launch parameter buffer."] +#[doc = "* `out` - Buffer to write the launch parameters to. [Direction: In, Out]"] + pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current FIRM launch parameters."] - #[doc = "* firmTidLow Low Title ID of the FIRM title to launch."] - #[doc = "* size Size of the FIRM launch parameter buffer."] - #[doc = "* in Buffer to retrieve the launch parameters from."] +#[doc = "Sets the current FIRM launch parameters."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `firmTidLow` - Low Title ID of the FIRM title to launch."] +#[doc = "* `size` - Size of the FIRM launch parameter buffer."] +#[doc = "* `in` - Buffer to retrieve the launch parameters from."] + pub fn PMAPP_LaunchFIRMSetParams( firmTidLow: u32_, size: u32_, @@ -15988,70 +22378,109 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] - #[doc = "* timeout Time limit in ns for process termination, after which the remaining processes are killed."] +#[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] + pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the current Application"] - #[doc = "* timeout Timeout in nanoseconds"] +#[doc = "Terminates the current Application"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timeout` - Timeout in nanoseconds"] + pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the processes having the specified titleId."] - #[doc = "* titleId Title ID of the processes to terminate"] - #[doc = "* timeout Timeout in nanoseconds"] +#[doc = "Terminates the processes having the specified titleId."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `titleId` - Title ID of the processes to terminate"] +#[doc = "* `timeout` - Timeout in nanoseconds"] + pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the specified process"] - #[doc = "* pid Process-ID of the process to terminate"] - #[doc = "* timeout Timeout in nanoseconds"] +#[doc = "Terminates the specified process"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pid` - Process-ID of the process to terminate"] +#[doc = "* `timeout` - Timeout in nanoseconds"] + pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Unregisters a process"] - #[doc = "* tid TitleID of the process to unregister"] +#[doc = "Unregisters a process"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `tid` - TitleID of the process to unregister"] + pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the APPLICATION cputime reslimit."] - #[doc = "* cpuTime Reslimit value."] - #[doc = "cpuTime can be no higher than reslimitdesc[0] & 0x7F in exheader (or 80 if the latter is 0)."] +#[doc = "Sets the APPLICATION cputime reslimit."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cpuTime` - Reslimit value."] + pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the APPLICATION cputime reslimit."] - #[doc = "* cpuTime Pointer to write the reslimit value to."] +#[doc = "Gets the APPLICATION cputime reslimit."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] + pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes pm:dbg."] +#[doc = "Initializes pm:dbg."] +#[doc = ""] + pub fn pmDbgInit() -> Result; } extern "C" { - #[doc = "Exits pm:dbg."] +#[doc = "Exits pm:dbg."] +#[doc = ""] + pub fn pmDbgExit(); } extern "C" { - #[doc = "Gets the current pm:dbg session handle."] - #[doc = "The current pm:dbg session handle."] +#[doc = "Gets the current pm:dbg session handle."] +#[doc = ""] +#[doc = "Returns: The current pm:dbg session handle."] +#[doc = ""] + pub fn pmDbgGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] - #[doc = "If another process was enqueued, this just calls RunQueuedProcess instead."] - #[doc = "* Pointer to output the debug handle to."] - #[doc = "* programInfo Program information of the title."] - #[doc = "* launchFlags Flags to launch the title with."] +#[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] +#[doc = ""] +#[doc = "If another process was enqueued, this just calls @ref RunQueuedProcess instead."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] +#[doc = "* `programInfo` - Program information of the title."] +#[doc = "* `launchFlags` - Flags to launch the title with."] + pub fn PMDBG_LaunchAppDebug( outDebug: *mut Handle, programInfo: *const FS_ProgramInfo, @@ -16060,54 +22489,100 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Launches an application for debug after setting cpuTime to 0."] - #[doc = "* programInfo Program information of the title."] - #[doc = "* launchFlags Flags to launch the title with."] +#[doc = "Launches an application for debug after setting cpuTime to 0."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programInfo` - Program information of the title."] +#[doc = "* `launchFlags` - Flags to launch the title with."] + pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Runs the queued process and returns a debug handle to it."] - #[doc = "* Pointer to output the debug handle to."] +#[doc = "Runs the queued process and returns a debug handle to it."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] + pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result; } #[doc = "CBC encryption."] +#[doc = ""] + pub const PS_ALGORITHM_CBC_ENC: PS_AESAlgorithm = 0; #[doc = "CBC decryption."] +#[doc = ""] + pub const PS_ALGORITHM_CBC_DEC: PS_AESAlgorithm = 1; #[doc = "CTR encryption."] +#[doc = ""] + pub const PS_ALGORITHM_CTR_ENC: PS_AESAlgorithm = 2; #[doc = "CTR decryption(same as PS_ALGORITHM_CTR_ENC)."] +#[doc = ""] + pub const PS_ALGORITHM_CTR_DEC: PS_AESAlgorithm = 3; #[doc = "CCM encryption."] +#[doc = ""] + pub const PS_ALGORITHM_CCM_ENC: PS_AESAlgorithm = 4; #[doc = "CCM decryption."] +#[doc = ""] + pub const PS_ALGORITHM_CCM_DEC: PS_AESAlgorithm = 5; #[doc = "PS AES algorithms."] +#[doc = ""] + pub type PS_AESAlgorithm = ::libc::c_uint; #[doc = "Key slot 0x0D."] +#[doc = ""] + pub const PS_KEYSLOT_0D: PS_AESKeyType = 0; #[doc = "Key slot 0x2D."] +#[doc = ""] + pub const PS_KEYSLOT_2D: PS_AESKeyType = 1; #[doc = "Key slot 0x31."] +#[doc = ""] + pub const PS_KEYSLOT_31: PS_AESKeyType = 2; #[doc = "Key slot 0x38."] +#[doc = ""] + pub const PS_KEYSLOT_38: PS_AESKeyType = 3; #[doc = "Key slot 0x32."] +#[doc = ""] + pub const PS_KEYSLOT_32: PS_AESKeyType = 4; #[doc = "Key slot 0x39. (DLP)"] +#[doc = ""] + pub const PS_KEYSLOT_39_DLP: PS_AESKeyType = 5; #[doc = "Key slot 0x2E."] +#[doc = ""] + pub const PS_KEYSLOT_2E: PS_AESKeyType = 6; #[doc = "Invalid key slot."] +#[doc = ""] + pub const PS_KEYSLOT_INVALID: PS_AESKeyType = 7; #[doc = "Key slot 0x36."] +#[doc = ""] + pub const PS_KEYSLOT_36: PS_AESKeyType = 8; #[doc = "Key slot 0x39. (NFC)"] +#[doc = ""] + pub const PS_KEYSLOT_39_NFC: PS_AESKeyType = 9; #[doc = "PS key slots."] +#[doc = ""] + pub type PS_AESKeyType = ::libc::c_uint; #[doc = "RSA context."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct psRSAContext { @@ -16127,37 +22602,55 @@ impl Default for psRSAContext { } extern "C" { #[must_use] - #[doc = "Initializes PS."] +#[doc = "Initializes PS."] +#[doc = ""] + pub fn psInit() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PS with the specified session handle."] - #[doc = "* handle Session handle."] +#[doc = "Initializes PS with the specified session handle."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Session handle."] + pub fn psInitHandle(handle: Handle) -> Result; } extern "C" { - #[doc = "Exits PS."] +#[doc = "Exits PS."] +#[doc = ""] + pub fn psExit(); } extern "C" { - #[doc = "Returns the PS session handle."] +#[doc = "Returns the PS session handle."] +#[doc = ""] + pub fn psGetSessionHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Signs a RSA signature."] - #[doc = "* hash SHA256 hash to sign."] - #[doc = "* ctx RSA context."] - #[doc = "* signature RSA signature."] +#[doc = "Signs a RSA signature."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `hash` - SHA256 hash to sign."] +#[doc = "* `ctx` - RSA context."] +#[doc = "* `signature` - RSA signature."] + pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Verifies a RSA signature."] - #[doc = "* hash SHA256 hash to compare with."] - #[doc = "* ctx RSA context."] - #[doc = "* signature RSA signature."] +#[doc = "Verifies a RSA signature."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `hash` - SHA256 hash to compare with."] +#[doc = "* `ctx` - RSA context."] +#[doc = "* `signature` - RSA signature."] + pub fn PS_VerifyRsaSha256( hash: *mut u8_, ctx: *mut psRSAContext, @@ -16166,13 +22659,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] - #[doc = "* size Size of the data."] - #[doc = "* in Input buffer."] - #[doc = "* out Output buffer."] - #[doc = "* aes_algo AES algorithm to use."] - #[doc = "* key_type Key type to use."] - #[doc = "* iv Pointer to the CTR/IV. The output CTR/IV is also written here."] +#[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the data."] +#[doc = "* `in` - Input buffer."] +#[doc = "* `out` - Output buffer."] +#[doc = "* `aes_algo` - AES algorithm to use."] +#[doc = "* `key_type` - Key type to use."] +#[doc = "* `iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] + pub fn PS_EncryptDecryptAes( size: u32_, in_: *mut u8_, @@ -16184,18 +22681,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Encrypts/Decrypts signed AES CCM data."] - #[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] - #[doc = "* in Input buffer."] - #[doc = "* in_size Size of the input buffer. Must include MAC size when decrypting."] - #[doc = "* out Output buffer."] - #[doc = "* out_size Size of the output buffer. Must include MAC size when encrypting."] - #[doc = "* data_len Length of the data to be encrypted/decrypted."] - #[doc = "* mac_data_len Length of the MAC data."] - #[doc = "* mac_len Length of the MAC."] - #[doc = "* aes_algo AES algorithm to use."] - #[doc = "* key_type Key type to use."] - #[doc = "* nonce Pointer to the nonce."] +#[doc = "Encrypts/Decrypts signed AES CCM data."] +#[doc = ""] +#[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `in` - Input buffer."] +#[doc = "* `in_size` - Size of the input buffer. Must include MAC size when decrypting."] +#[doc = "* `out` - Output buffer."] +#[doc = "* `out_size` - Size of the output buffer. Must include MAC size when encrypting."] +#[doc = "* `data_len` - Length of the data to be encrypted/decrypted."] +#[doc = "* `mac_data_len` - Length of the MAC data."] +#[doc = "* `mac_len` - Length of the MAC."] +#[doc = "* `aes_algo` - AES algorithm to use."] +#[doc = "* `key_type` - Key type to use."] +#[doc = "* `nonce` - Pointer to the nonce."] + pub fn PS_EncryptSignDecryptVerifyAesCcm( in_: *mut u8_, in_size: u32_, @@ -16211,277 +22713,452 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the 64-bit console friend code seed."] - #[doc = "* seed Pointer to write the friend code seed to."] +#[doc = "Gets the 64-bit console friend code seed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `seed` - Pointer to write the friend code seed to."] + pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 32-bit device ID."] - #[doc = "* device_id Pointer to write the device ID to."] +#[doc = "Gets the 32-bit device ID."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `device_id` - Pointer to write the device ID to."] + pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Generates cryptographically secure random bytes."] - #[doc = "* out Pointer to the buffer to write the bytes to."] - #[doc = "* len Number of bytes to write."] +#[doc = "Generates cryptographically secure random bytes."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to the buffer to write the bytes to."] +#[doc = "* `len` - Number of bytes to write."] + pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PTMU."] +#[doc = "Initializes PTMU."] +#[doc = ""] + pub fn ptmuInit() -> Result; } extern "C" { - #[doc = "Exits PTMU."] +#[doc = "Exits PTMU."] +#[doc = ""] + pub fn ptmuExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:u session handle."] - #[doc = "A pointer to the current ptm:u session handle."] +#[doc = "Gets a pointer to the current ptm:u session handle."] +#[doc = ""] +#[doc = "Returns: A pointer to the current ptm:u session handle."] +#[doc = ""] + pub fn ptmuGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the system's current shell state."] - #[doc = "* out Pointer to write the current shell state to. (0 = closed, 1 = open)"] +#[doc = "Gets the system's current shell state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] + pub fn PTMU_GetShellState(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's current battery level."] - #[doc = "* out Pointer to write the current battery level to. (0-5)"] +#[doc = "Gets the system's current battery level."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the current battery level to. (0-5)"] + pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's current battery charge state."] - #[doc = "* out Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] +#[doc = "Gets the system's current battery charge state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] + pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's current pedometer state."] - #[doc = "* out Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] +#[doc = "Gets the system's current pedometer state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] + pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the pedometer's total step count."] - #[doc = "* steps Pointer to write the total step count to."] +#[doc = "Gets the pedometer's total step count."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `steps` - Pointer to write the total step count to."] + pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the adapter is plugged in or not"] - #[doc = "* out Pointer to write the adapter state to."] +#[doc = "Gets whether the adapter is plugged in or not"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the adapter state to."] + pub fn PTMU_GetAdapterState(out: *mut bool) -> Result; } #[doc = "PDN wake events and MCU interrupts to select, combined with those of other processes"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmWakeEvents { - #[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] +#[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] +#[doc = ""] + pub pdn_wake_events: u32_, - #[doc = "MCU interrupts to check when a MCU wake event happens."] +#[doc = "MCU interrupts to check when a MCU wake event happens."] +#[doc = ""] + pub mcu_interupt_mask: u32_, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmSleepConfig { - #[doc = "Wake events for which the system should fully wake up."] +#[doc = "Wake events for which the system should fully wake up."] +#[doc = ""] + pub exit_sleep_events: PtmWakeEvents, - #[doc = "Wake events for which the system should return to sleep."] +#[doc = "Wake events for which the system should return to sleep."] +#[doc = ""] + pub continue_sleep_events: PtmWakeEvents, } -#[doc = "PTMSYSM_RequestSleep has been called (ack = 3)"] +#[doc = "@ref PTMSYSM_RequestSleep has been called (ack = 3)"] +#[doc = ""] + pub const PTMNOTIFID_SLEEP_REQUESTED: _bindgen_ty_27 = 257; -#[doc = "The sleep request has been denied by PTMSYSM_ReplyToSleepQuery(true) (no ack required)."] +#[doc = "The sleep request has been denied by @ref PTMSYSM_ReplyToSleepQuery(true) (no ack required)."] +#[doc = ""] + pub const PTMNOTIFID_SLEEP_DENIED: _bindgen_ty_27 = 258; -#[doc = "The sleep request has been allowed by PTMSYSM_ReplyToSleepQuery(false) (ack = 1)."] +#[doc = "The sleep request has been allowed by @ref PTMSYSM_ReplyToSleepQuery(false) (ack = 1)."] +#[doc = ""] + pub const PTMNOTIFID_SLEEP_ALLOWED: _bindgen_ty_27 = 259; #[doc = "All processes not having \"RunnableOnSleep\" have been paused & the system is about to go to sleep (ack = 0)."] +#[doc = ""] + pub const PTMNOTIFID_GOING_TO_SLEEP: _bindgen_ty_27 = 260; #[doc = "The system has been woken up, and the paused processes are about to be unpaused (ack = 1)."] +#[doc = ""] + pub const PTMNOTIFID_FULLY_WAKING_UP: _bindgen_ty_27 = 261; #[doc = "The system is fully awake (no ack required)."] +#[doc = ""] + pub const PTMNOTIFID_FULLY_AWAKE: _bindgen_ty_27 = 262; #[doc = "The system has been woken up but is about to go to sleep again (ack = 2)."] +#[doc = ""] + pub const PTMNOTIFID_HALF_AWAKE: _bindgen_ty_27 = 263; #[doc = "The system is about to power off or reboot."] +#[doc = ""] + pub const PTMNOTIFID_SHUTDOWN: _bindgen_ty_27 = 264; #[doc = "The battery level has reached 5% or below."] +#[doc = ""] + pub const PTMNOTIFID_BATTERY_VERY_LOW: _bindgen_ty_27 = 529; #[doc = "The battery level has reached 10% or below."] +#[doc = ""] + pub const PTMNOTIFID_BATTERY_LOW: _bindgen_ty_27 = 530; pub type _bindgen_ty_27 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes ptm:sysm."] +#[doc = "Initializes ptm:sysm."] +#[doc = ""] + pub fn ptmSysmInit() -> Result; } extern "C" { - #[doc = "Exits ptm:sysm."] +#[doc = "Exits ptm:sysm."] +#[doc = ""] + pub fn ptmSysmExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:sysm session handle."] - #[doc = "A pointer to the current ptm:sysm session handle."] +#[doc = "Gets a pointer to the current ptm:sysm session handle."] +#[doc = ""] +#[doc = "Returns: A pointer to the current ptm:sysm session handle."] +#[doc = ""] + pub fn ptmSysmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Requests to enter sleep mode."] +#[doc = "Requests to enter sleep mode."] +#[doc = ""] + pub fn PTMSYSM_RequestSleep() -> Result; } extern "C" { #[must_use] - #[doc = "Accepts or denies the incoming sleep mode request."] - #[doc = "* deny Whether or not to deny the sleep request."] - #[doc = "If deny = false, this is equivalent to calling PTMSYSM_NotifySleepPreparationComplete(3)"] +#[doc = "Accepts or denies the incoming sleep mode request."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `deny` - Whether or not to deny the sleep request."] + pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] - #[doc = "* ackValue Use ptmSysmGetNotificationAckValue"] - #[doc = " PTMNOTIFID_SLEEP_DENIED and PTMNOTIFID_FULLY_AWAKE don't require this."] +#[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ackValue` - Use @ref ptmSysmGetNotificationAckValue"] + pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] - #[doc = "* sleepConfig Pointer to the two sets of wake events."] - #[doc = "Can only be called just before acknowledging PTMNOTIFID_GOING_TO_SLEEP or PTMNOTIFID_HALF_AWAKE."] +#[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sleepConfig` - Pointer to the two sets of wake events."] + pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] - #[doc = "* sleepConfig Pointer to the two sets of wake events. Only the relevant set will be filled."] +#[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] + pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] +#[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] +#[doc = ""] + pub fn PTMSYSM_Awaken() -> Result; } extern "C" { #[must_use] - #[doc = "Sets the user time by updating the user time offset."] - #[doc = "* msY2k The number of milliseconds since 01/01/2000."] +#[doc = "Sets the user time by updating the user time offset."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + pub fn PTMSYSM_SetUserTime(msY2k: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] +#[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] +#[doc = ""] + pub fn PTMSYSM_InvalidateSystemTime() -> Result; } extern "C" { #[must_use] - #[doc = "Reads the time and date coming from the RTC and converts the result."] - #[doc = "* outMsY2k The pointer to write the number of milliseconds since 01/01/2000 to."] +#[doc = "Reads the time and date coming from the RTC and converts the result."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] + pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the time and date coming to the RTC, after conversion."] - #[doc = "* msY2k The number of milliseconds since 01/01/2000."] +#[doc = "Writes the time and date coming to the RTC, after conversion."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Returns 1 if it's a New 3DS, otherwise 0."] +#[doc = "Returns 1 if it's a New 3DS, otherwise 0."] +#[doc = ""] + pub fn PTMSYSM_CheckNew3DS() -> Result; } extern "C" { #[must_use] - #[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] - #[doc = "* value Bit0: enable higher clock, Bit1: enable L2 cache."] +#[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `value` - Bit0: enable higher clock, Bit1: enable L2 cache."] + pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Trigger a hardware system shutdown via the MCU."] - #[doc = "* timeout: timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] +#[doc = "Trigger a hardware system shutdown via the MCU."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] + pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Trigger a hardware system reboot via the MCU."] - #[doc = "* timeout: timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] +#[doc = "Trigger a hardware system reboot via the MCU."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] + pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PTMGETS."] +#[doc = "Initializes PTMGETS."] +#[doc = ""] + pub fn ptmGetsInit() -> Result; } extern "C" { - #[doc = "Exits PTMGETS."] +#[doc = "Exits PTMGETS."] +#[doc = ""] + pub fn ptmGetsExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:gets session handle."] - #[doc = "A pointer to the current ptm:gets session handle."] +#[doc = "Gets a pointer to the current ptm:gets session handle."] +#[doc = ""] +#[doc = "Returns: A pointer to the current ptm:gets session handle."] +#[doc = ""] + pub fn ptmGetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the system time."] - #[doc = "* outMsY2k The pointer to write the number of milliseconds since 01/01/2000 to."] +#[doc = "Gets the system time."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] + pub fn PTMGETS_GetSystemTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PTMSETS."] +#[doc = "Initializes PTMSETS."] +#[doc = ""] + pub fn ptmSetsInit() -> Result; } extern "C" { - #[doc = "Exits PTMSETS."] +#[doc = "Exits PTMSETS."] +#[doc = ""] + pub fn ptmSetsExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:sets session handle."] - #[doc = "A pointer to the current ptm:sets session handle."] +#[doc = "Gets a pointer to the current ptm:sets session handle."] +#[doc = ""] +#[doc = "Returns: A pointer to the current ptm:sets session handle."] +#[doc = ""] + pub fn ptmSetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Sets the system time."] - #[doc = "* msY2k The number of milliseconds since 01/01/2000."] +#[doc = "Sets the system time."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + pub fn PTMSETS_SetSystemTime(msY2k: s64) -> Result; } #[doc = "Do not wait."] +#[doc = ""] + pub const WAIT_NONE: PXIDEV_WaitType = 0; #[doc = "Sleep for the specified number of nanoseconds."] +#[doc = ""] + pub const WAIT_SLEEP: PXIDEV_WaitType = 1; #[doc = "Wait for IREQ, return if timeout."] +#[doc = ""] + pub const WAIT_IREQ_RETURN: PXIDEV_WaitType = 2; #[doc = "Wait for IREQ, continue if timeout."] +#[doc = ""] + pub const WAIT_IREQ_CONTINUE: PXIDEV_WaitType = 3; #[doc = "Card SPI wait operation type."] +#[doc = ""] + pub type PXIDEV_WaitType = ::libc::c_uint; #[doc = "Do not deassert."] +#[doc = ""] + pub const DEASSERT_NONE: PXIDEV_DeassertType = 0; #[doc = "Deassert before waiting."] +#[doc = ""] + pub const DEASSERT_BEFORE_WAIT: PXIDEV_DeassertType = 1; #[doc = "Deassert after waiting."] +#[doc = ""] + pub const DEASSERT_AFTER_WAIT: PXIDEV_DeassertType = 2; #[doc = "Card SPI register deassertion type."] +#[doc = ""] + pub type PXIDEV_DeassertType = ::libc::c_uint; #[doc = "Card SPI transfer buffer."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PXIDEV_SPIBuffer { - #[doc = "Data pointer."] +#[doc = "Data pointer."] +#[doc = ""] + pub ptr: *mut ::libc::c_void, - #[doc = "Data size."] +#[doc = "Data size."] +#[doc = ""] + pub size: u32_, - #[doc = "Transfer options. See pxiDevMakeTransferOption"] +#[doc = "Transfer options. See @ref pxiDevMakeTransferOption"] +#[doc = ""] + pub transferOption: u8_, - #[doc = "Wait operation. See pxiDevMakeWaitOperation"] +#[doc = "Wait operation. See @ref pxiDevMakeWaitOperation"] +#[doc = ""] + pub waitOperation: u64_, } impl Default for PXIDEV_SPIBuffer { @@ -16495,22 +23172,30 @@ impl Default for PXIDEV_SPIBuffer { } extern "C" { #[must_use] - #[doc = "Initializes pxi:dev."] +#[doc = "Initializes pxi:dev."] +#[doc = ""] + pub fn pxiDevInit() -> Result; } extern "C" { - #[doc = "Shuts down pxi:dev."] +#[doc = "Shuts down pxi:dev."] +#[doc = ""] + pub fn pxiDevExit(); } extern "C" { #[must_use] - #[doc = "Performs multiple card SPI writes and reads."] - #[doc = "* header Header to lead the transfers with. Must be, at most, 8 bytes in size."] - #[doc = "* writeBuffer1 Buffer to make first transfer from."] - #[doc = "* readBuffer1 Buffer to receive first response to."] - #[doc = "* writeBuffer2 Buffer to make second transfer from."] - #[doc = "* readBuffer2 Buffer to receive second response to."] - #[doc = "* footer Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] +#[doc = "Performs multiple card SPI writes and reads."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `header` - Header to lead the transfers with. Must be, at most, 8 bytes in size."] +#[doc = "* `writeBuffer1` - Buffer to make first transfer from."] +#[doc = "* `readBuffer1` - Buffer to receive first response to."] +#[doc = "* `writeBuffer2` - Buffer to make second transfer from."] +#[doc = "* `readBuffer2` - Buffer to receive second response to."] +#[doc = "* `footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] + pub fn PXIDEV_SPIMultiWriteRead( header: *mut PXIDEV_SPIBuffer, writeBuffer1: *mut PXIDEV_SPIBuffer, @@ -16522,11 +23207,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Performs a single card SPI write and read."] - #[doc = "* bytesRead Pointer to output the number of bytes received to."] - #[doc = "* initialWaitOperation Wait operation to perform before transferring data."] - #[doc = "* writeBuffer Buffer to transfer data from."] - #[doc = "* readBuffer Buffer to receive data to."] +#[doc = "Performs a single card SPI write and read."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `bytesRead` - Pointer to output the number of bytes received to."] +#[doc = "* `initialWaitOperation` - Wait operation to perform before transferring data."] +#[doc = "* `writeBuffer` - Buffer to transfer data from."] +#[doc = "* `readBuffer` - Buffer to receive data to."] + pub fn PXIDEV_SPIWriteRead( bytesRead: *mut u32_, initialWaitOperation: u64_, @@ -16536,31 +23225,46 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes PxiPM."] +#[doc = "Initializes PxiPM."] +#[doc = ""] + pub fn pxiPmInit() -> Result; } extern "C" { - #[doc = "Exits PxiPM."] +#[doc = "Exits PxiPM."] +#[doc = ""] + pub fn pxiPmExit(); } extern "C" { - #[doc = "Gets the current PxiPM session handle."] - #[doc = "The current PxiPM session handle."] +#[doc = "Gets the current PxiPM session handle."] +#[doc = ""] +#[doc = "Returns: The current PxiPM session handle."] +#[doc = ""] + pub fn pxiPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] - #[doc = "* exheaderInfos Pointer to the output exheader information set."] - #[doc = "* programHandle The program handle."] +#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set."] +#[doc = "* `programHandle` - The program handle."] + pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Loads a program and registers it to Process9."] - #[doc = "* programHandle Pointer to the output the program handle to."] - #[doc = "* programInfo Information about the program to load."] - #[doc = "* updateInfo Information about the program update to load."] +#[doc = "Loads a program and registers it to Process9."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] +#[doc = "* `programInfo` - Information about the program to load."] +#[doc = "* `updateInfo` - Information about the program update to load."] + pub fn PXIPM_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -16569,8 +23273,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unloads a program and unregisters it from Process9."] - #[doc = "* programHandle The program handle."] +#[doc = "Unloads a program and unregisters it from Process9."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programHandle` - The program handle."] + pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result; } #[repr(C)] @@ -17331,113 +24039,190 @@ pub struct ip_mreq { pub imr_interface: in_addr, } #[doc = "The mac address of the interface (u32 mac[6])"] +#[doc = ""] + pub const NETOPT_MAC_ADDRESS: NetworkOpt = 4100; #[doc = "The ARP table @see SOCU_ARPTableEntry"] +#[doc = ""] + pub const NETOPT_ARP_TABLE: NetworkOpt = 12290; #[doc = "The current IP setup @see SOCU_IPInfo"] +#[doc = ""] + pub const NETOPT_IP_INFO: NetworkOpt = 16387; #[doc = "The value of the IP MTU (u32)"] +#[doc = ""] + pub const NETOPT_IP_MTU: NetworkOpt = 16388; #[doc = "The routing table @see SOCU_RoutingTableEntry"] +#[doc = ""] + pub const NETOPT_ROUTING_TABLE: NetworkOpt = 16390; #[doc = "The number of sockets in the UDP table (u32)"] +#[doc = ""] + pub const NETOPT_UDP_NUMBER: NetworkOpt = 32770; #[doc = "The table of opened UDP sockets @see SOCU_UDPTableEntry"] +#[doc = ""] + pub const NETOPT_UDP_TABLE: NetworkOpt = 32771; #[doc = "The number of sockets in the TCP table (u32)"] +#[doc = ""] + pub const NETOPT_TCP_NUMBER: NetworkOpt = 36866; #[doc = "The table of opened TCP sockets @see SOCU_TCPTableEntry"] +#[doc = ""] + pub const NETOPT_TCP_TABLE: NetworkOpt = 36867; #[doc = "The table of the DNS servers @see SOCU_DNSTableEntry -- Returns a buffer of size 336 but only 2 entries are set ?"] +#[doc = ""] + pub const NETOPT_DNS_TABLE: NetworkOpt = 45059; #[doc = "The DHCP lease time remaining, in seconds"] +#[doc = ""] + pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153; -#[doc = "Options to be used with SOCU_GetNetworkOpt"] +#[doc = "Options to be used with @ref SOCU_GetNetworkOpt"] +#[doc = ""] + pub type NetworkOpt = ::libc::c_uint; -#[doc = "One entry of the ARP table retrieved by using SOCU_GetNetworkOpt and NETOPT_ARP_TABLE"] +#[doc = "One entry of the ARP table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_ARP_TABLE"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_ARPTableEntry { pub unk0: u32_, - #[doc = "The IPv4 address associated to the entry"] +#[doc = "The IPv4 address associated to the entry"] +#[doc = ""] + pub ip: in_addr, - #[doc = "The MAC address of associated to the entry"] +#[doc = "The MAC address of associated to the entry"] +#[doc = ""] + pub mac: [u8_; 6usize], pub padding: [u8_; 2usize], } -#[doc = "Structure returned by SOCU_GetNetworkOpt when using NETOPT_IP_INFO"] +#[doc = "Structure returned by @ref SOCU_GetNetworkOpt when using @ref NETOPT_IP_INFO"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_IPInfo { - #[doc = "Current IPv4 address"] +#[doc = "Current IPv4 address"] +#[doc = ""] + pub ip: in_addr, - #[doc = "Current network mask"] +#[doc = "Current network mask"] +#[doc = ""] + pub netmask: in_addr, - #[doc = "Current network broadcast address"] +#[doc = "Current network broadcast address"] +#[doc = ""] + pub broadcast: in_addr, } -#[doc = "One entry of the routing table retrieved by using SOCU_GetNetworkOpt and NETOPT_ROUTING_TABLE"] +#[doc = "One entry of the routing table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_ROUTING_TABLE"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_RoutingTableEntry { - #[doc = "Destination IP address of the route"] +#[doc = "Destination IP address of the route"] +#[doc = ""] + pub dest_ip: in_addr, - #[doc = "Mask used for this route"] +#[doc = "Mask used for this route"] +#[doc = ""] + pub netmask: in_addr, - #[doc = "Gateway address to reach the network"] +#[doc = "Gateway address to reach the network"] +#[doc = ""] + pub gateway: in_addr, - #[doc = "Linux netstat flags @see ROUTING_FLAG_G"] +#[doc = "Linux netstat flags @see ROUTING_FLAG_G"] +#[doc = ""] + pub flags: u32_, - #[doc = "number of milliseconds since 1st Jan 1900 00:00."] +#[doc = "number of milliseconds since 1st Jan 1900 00:00."] +#[doc = ""] + pub time: u64_, } -#[doc = "One entry of the UDP sockets table retrieved by using SOCU_GetNetworkOpt and NETOPT_UDP_TABLE"] +#[doc = "One entry of the UDP sockets table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_UDP_TABLE"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_UDPTableEntry { - #[doc = "Local address information"] +#[doc = "Local address information"] +#[doc = ""] + pub local: sockaddr_storage, - #[doc = "Remote address information"] +#[doc = "Remote address information"] +#[doc = ""] + pub remote: sockaddr_storage, } -#[doc = "One entry of the TCP sockets table retrieved by using SOCU_GetNetworkOpt and NETOPT_TCP_TABLE"] +#[doc = "One entry of the TCP sockets table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_TCP_TABLE"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_TCPTableEntry { - #[doc = "@see TCP states defines"] +#[doc = "@see TCP states defines"] +#[doc = ""] + pub state: u32_, - #[doc = "Local address information"] +#[doc = "Local address information"] +#[doc = ""] + pub local: sockaddr_storage, - #[doc = "Remote address information"] +#[doc = "Remote address information"] +#[doc = ""] + pub remote: sockaddr_storage, } -#[doc = "One entry of the DNS servers table retrieved by using SOCU_GetNetworkOpt and NETOPT_DNS_TABLE"] +#[doc = "One entry of the DNS servers table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_DNS_TABLE"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_DNSTableEntry { pub family: u32_, - #[doc = "Family of the address of the DNS server"] +#[doc = "Family of the address of the DNS server"] +#[doc = ""] + pub ip: in_addr, - #[doc = "IP of the DNS server"] +#[doc = "IP of the DNS server"] +#[doc = ""] + pub padding: [u8_; 12usize], } extern "C" { #[must_use] - #[doc = "Initializes the SOC service."] - #[doc = "* context_addr Address of a page-aligned (0x1000) buffer to be used."] - #[doc = "* context_size Size of the buffer, a multiple of 0x1000."] - #[doc = "The specified context buffer can no longer be accessed by the process which called this function, since the userland permissions for this block are set to no-access."] +#[doc = "Initializes the SOC service."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `context_addr` - Address of a page-aligned (0x1000) buffer to be used."] +#[doc = "* `context_size` - Size of the buffer, a multiple of 0x1000."] + pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Closes the soc service."] - #[doc = "You need to call this in order to be able to use the buffer again."] +#[doc = "Closes the soc service."] +#[doc = ""] + pub fn socExit() -> Result; } extern "C" { - #[doc = "Gets the system's host ID."] - #[doc = "The system's host ID."] +#[doc = "Gets the system's host ID."] +#[doc = ""] +#[doc = "Returns: The system's host ID."] +#[doc = ""] + pub fn gethostid() -> ::libc::c_long; } extern "C" { @@ -17450,12 +24235,17 @@ extern "C" { pub fn SOCU_CloseSockets() -> ::libc::c_int; } extern "C" { - #[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] - #[doc = "* level Only value allowed seems to be SOL_CONFIG"] - #[doc = "* optname The option to be retrieved"] - #[doc = "* optval Will contain the output of the command"] - #[doc = "* optlen Size of the optval buffer, will be updated to hold the size of the output"] - #[doc = "0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] +#[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] +#[doc = ""] +#[doc = "Returns: 0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `level` - Only value allowed seems to be @ref SOL_CONFIG"] +#[doc = "* `optname` - The option to be retrieved"] +#[doc = "* `optval` - Will contain the output of the command"] +#[doc = "* `optlen` - Size of the optval buffer, will be updated to hold the size of the output"] + pub fn SOCU_GetNetworkOpt( level: ::libc::c_int, optname: NetworkOpt, @@ -17464,8 +24254,11 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { - #[doc = "Gets the system's IP address, netmask, and subnet broadcast"] - #[doc = "error"] +#[doc = "Gets the system's IP address, netmask, and subnet broadcast"] +#[doc = ""] +#[doc = "Returns: Error"] +#[doc = ""] + pub fn SOCU_GetIPInfo( ip: *mut in_addr, netmask: *mut in_addr, @@ -17473,72 +24266,119 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { - #[doc = "Adds a global socket."] - #[doc = "* sockfd The socket fd."] - #[doc = "error"] +#[doc = "Adds a global socket."] +#[doc = ""] +#[doc = "Returns: Error"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sockfd` - The socket fd."] + pub fn SOCU_AddGlobalSocket(sockfd: ::libc::c_int) -> ::libc::c_int; } #[doc = "Unsigned 8-bit PCM."] +#[doc = ""] + pub const MICU_ENCODING_PCM8: MICU_Encoding = 0; #[doc = "Unsigned 16-bit PCM."] +#[doc = ""] + pub const MICU_ENCODING_PCM16: MICU_Encoding = 1; #[doc = "Signed 8-bit PCM."] +#[doc = ""] + pub const MICU_ENCODING_PCM8_SIGNED: MICU_Encoding = 2; #[doc = "Signed 16-bit PCM."] +#[doc = ""] + pub const MICU_ENCODING_PCM16_SIGNED: MICU_Encoding = 3; #[doc = "Microphone audio encodings."] +#[doc = ""] + pub type MICU_Encoding = ::libc::c_uint; #[doc = "32728.498 Hz"] +#[doc = ""] + pub const MICU_SAMPLE_RATE_32730: MICU_SampleRate = 0; #[doc = "16364.479 Hz"] +#[doc = ""] + pub const MICU_SAMPLE_RATE_16360: MICU_SampleRate = 1; #[doc = "10909.499 Hz"] +#[doc = ""] + pub const MICU_SAMPLE_RATE_10910: MICU_SampleRate = 2; #[doc = "8182.1245 Hz"] +#[doc = ""] + pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3; #[doc = "Microphone audio sampling rates."] +#[doc = ""] + pub type MICU_SampleRate = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes MIC."] - #[doc = "* size Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] - #[doc = "* handle Size of the shared memory buffer."] +#[doc = "Initializes MIC."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] +#[doc = "* `handle` - Size of the shared memory buffer."] + pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result; } extern "C" { - #[doc = "Exits MIC."] +#[doc = "Exits MIC."] +#[doc = ""] + pub fn micExit(); } extern "C" { - #[doc = "Gets the size of the sample data area within the shared memory buffer."] - #[doc = "The sample data's size."] +#[doc = "Gets the size of the sample data area within the shared memory buffer."] +#[doc = ""] +#[doc = "Returns: The sample data's size."] +#[doc = ""] + pub fn micGetSampleDataSize() -> u32_; } extern "C" { - #[doc = "Gets the offset within the shared memory buffer of the last sample written."] - #[doc = "The last sample's offset."] +#[doc = "Gets the offset within the shared memory buffer of the last sample written."] +#[doc = ""] +#[doc = "Returns: The last sample's offset."] +#[doc = ""] + pub fn micGetLastSampleOffset() -> u32_; } extern "C" { #[must_use] - #[doc = "Maps MIC shared memory."] - #[doc = "* size Size of the shared memory."] - #[doc = "* handle Handle of the shared memory."] +#[doc = "Maps MIC shared memory."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `size` - Size of the shared memory."] +#[doc = "* `handle` - Handle of the shared memory."] + pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Unmaps MIC shared memory."] +#[doc = "Unmaps MIC shared memory."] +#[doc = ""] + pub fn MICU_UnmapSharedMem() -> Result; } extern "C" { #[must_use] - #[doc = "Begins sampling microphone input."] - #[doc = "* encoding Encoding of outputted audio."] - #[doc = "* sampleRate Sample rate of outputted audio."] - #[doc = "* sharedMemAudioOffset Offset to write audio data to in the shared memory buffer."] - #[doc = "* sharedMemAudioSize Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] - #[doc = "* loop Whether to loop back to the beginning of the buffer when the end is reached."] +#[doc = "Begins sampling microphone input."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `encoding` - Encoding of outputted audio."] +#[doc = "* `sampleRate` - Sample rate of outputted audio."] +#[doc = "* `sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] +#[doc = "* `sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] +#[doc = "* `loop` - Whether to loop back to the beginning of the buffer when the end is reached."] + pub fn MICU_StartSampling( encoding: MICU_Encoding, sampleRate: MICU_SampleRate, @@ -17549,144 +24389,256 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adjusts the configuration of the current sampling session."] - #[doc = "* sampleRate Sample rate of outputted audio."] +#[doc = "Adjusts the configuration of the current sampling session."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sampleRate` - Sample rate of outputted audio."] + pub fn MICU_AdjustSampling(sampleRate: MICU_SampleRate) -> Result; } extern "C" { #[must_use] - #[doc = "Stops sampling microphone input."] +#[doc = "Stops sampling microphone input."] +#[doc = ""] + pub fn MICU_StopSampling() -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether microphone input is currently being sampled."] - #[doc = "* sampling Pointer to output the sampling state to."] +#[doc = "Gets whether microphone input is currently being sampled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sampling` - Pointer to output the sampling state to."] + pub fn MICU_IsSampling(sampling: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an event handle triggered when the shared memory buffer is full."] - #[doc = "* handle Pointer to output the event handle to."] +#[doc = "Gets an event handle triggered when the shared memory buffer is full."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `handle` - Pointer to output the event handle to."] + pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the microphone's gain."] - #[doc = "* gain Gain to set."] +#[doc = "Sets the microphone's gain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `gain` - Gain to set."] + pub fn MICU_SetGain(gain: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the microphone's gain."] - #[doc = "* gain Pointer to output the current gain to."] +#[doc = "Gets the microphone's gain."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `gain` - Pointer to output the current gain to."] + pub fn MICU_GetGain(gain: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether the microphone is powered on."] - #[doc = "* power Whether the microphone is powered on."] +#[doc = "Sets whether the microphone is powered on."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `power` - Whether the microphone is powered on."] + pub fn MICU_SetPower(power: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the microphone is powered on."] - #[doc = "* power Pointer to output the power state to."] +#[doc = "Gets whether the microphone is powered on."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `power` - Pointer to output the power state to."] + pub fn MICU_GetPower(power: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to clamp microphone input."] - #[doc = "* clamp Whether to clamp microphone input."] +#[doc = "Sets whether to clamp microphone input."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `clamp` - Whether to clamp microphone input."] + pub fn MICU_SetClamp(clamp: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether to clamp microphone input."] - #[doc = "* clamp Pointer to output the clamp state to."] +#[doc = "Gets whether to clamp microphone input."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `clamp` - Pointer to output the clamp state to."] + pub fn MICU_GetClamp(clamp: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to allow sampling when the shell is closed."] - #[doc = "* allowShellClosed Whether to allow sampling when the shell is closed."] +#[doc = "Sets whether to allow sampling when the shell is closed."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `allowShellClosed` - Whether to allow sampling when the shell is closed."] + pub fn MICU_SetAllowShellClosed(allowShellClosed: bool) -> Result; } #[doc = "Converting color formats."] +#[doc = ""] + pub const MVDMODE_COLORFORMATCONV: MVDSTD_Mode = 0; #[doc = "Processing video."] +#[doc = ""] + pub const MVDMODE_VIDEOPROCESSING: MVDSTD_Mode = 1; #[doc = "Processing mode."] +#[doc = ""] + pub type MVDSTD_Mode = ::libc::c_uint; #[doc = "YUYV422"] +#[doc = ""] + pub const MVD_INPUT_YUYV422: MVDSTD_InputFormat = 65537; #[doc = "H264"] +#[doc = ""] + pub const MVD_INPUT_H264: MVDSTD_InputFormat = 131073; #[doc = "Input format."] +#[doc = ""] + pub type MVDSTD_InputFormat = ::libc::c_uint; #[doc = "YUYV422"] +#[doc = ""] + pub const MVD_OUTPUT_YUYV422: MVDSTD_OutputFormat = 65537; #[doc = "BGR565"] +#[doc = ""] + pub const MVD_OUTPUT_BGR565: MVDSTD_OutputFormat = 262146; #[doc = "RGB565"] +#[doc = ""] + pub const MVD_OUTPUT_RGB565: MVDSTD_OutputFormat = 262148; #[doc = "Output format."] +#[doc = ""] + pub type MVDSTD_OutputFormat = ::libc::c_uint; #[doc = "Processing configuration."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MVDSTD_Config { - #[doc = "Input type."] +#[doc = "Input type."] +#[doc = ""] + pub input_type: MVDSTD_InputFormat, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x04: u32_, - #[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] +#[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] +#[doc = ""] + pub unk_x08: u32_, - #[doc = "Input width."] +#[doc = "Input width."] +#[doc = ""] + pub inwidth: u32_, - #[doc = "Input height."] +#[doc = "Input height."] +#[doc = ""] + pub inheight: u32_, - #[doc = "Physical address of color conversion input data."] +#[doc = "Physical address of color conversion input data."] +#[doc = ""] + pub physaddr_colorconv_indata: u32_, - #[doc = "Physical address used with color conversion."] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk0: u32_, - #[doc = "Physical address used with color conversion."] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk1: u32_, - #[doc = "Physical address used with color conversion."] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk2: u32_, - #[doc = "Physical address used with color conversion."] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk3: u32_, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x28: [u32_; 6usize], - #[doc = "Enables cropping with the input image when non-zero via the following 4 words."] +#[doc = "Enables cropping with the input image when non-zero via the following 4 words."] +#[doc = ""] + 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_, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x54: u32_, - #[doc = "Output type."] +#[doc = "Output type."] +#[doc = ""] + pub output_type: MVDSTD_OutputFormat, - #[doc = "Output width."] +#[doc = "Output width."] +#[doc = ""] + pub outwidth: u32_, - #[doc = "Output height."] +#[doc = "Output height."] +#[doc = ""] + pub outheight: u32_, - #[doc = "Physical address of output data."] +#[doc = "Physical address of output data."] +#[doc = ""] + pub physaddr_outdata0: u32_, - #[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] +#[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] +#[doc = ""] + pub physaddr_outdata1: u32_, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x6c: [u32_; 38usize], - #[doc = "This enables using the following 4 words when non-zero."] +#[doc = "This enables using the following 4 words when non-zero."] +#[doc = ""] + pub flag_x104: u32_, - #[doc = "Output X position in the output buffer."] +#[doc = "Output X position in the output buffer."] +#[doc = ""] + pub output_x_pos: u32_, - #[doc = "Same as above except for the Y pos."] +#[doc = "Same as above except for the Y pos."] +#[doc = ""] + pub output_y_pos: u32_, - #[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] +#[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] +#[doc = ""] + pub output_width_override: u32_, - #[doc = "Same as output_width_override except for the output height."] +#[doc = "Same as output_width_override except for the output height."] +#[doc = ""] + pub output_height_override: u32_, pub unk_x118: u32_, } @@ -17737,6 +24689,8 @@ impl Default for MVDSTD_OutputBuffersEntryList { } } #[doc = "This can be used to override the default input values for MVDSTD commands during initialization with video-processing. The default for these fields are all-zero, except for cmd1b_inval which is 1. See also here: https://www.3dbrew.org/wiki/MVD_Services"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MVDSTD_InitStruct { @@ -17748,12 +24702,16 @@ pub struct MVDSTD_InitStruct { } extern "C" { #[must_use] - #[doc = "Initializes MVDSTD."] - #[doc = "* mode Mode to initialize MVDSTD to."] - #[doc = "* input_type Type of input to process."] - #[doc = "* output_type Type of output to produce."] - #[doc = "* size Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] - #[doc = "* initstruct Optional MVDSTD_InitStruct, this should be NULL normally."] +#[doc = "Initializes MVDSTD."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mode` - Mode to initialize MVDSTD to."] +#[doc = "* `input_type` - Type of input to process."] +#[doc = "* `output_type` - Type of output to produce."] +#[doc = "* `size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] +#[doc = "* `initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] + pub fn mvdstdInit( mode: MVDSTD_Mode, input_type: MVDSTD_InputFormat, @@ -17763,19 +24721,25 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Shuts down MVDSTD."] +#[doc = "Shuts down MVDSTD."] +#[doc = ""] + pub fn mvdstdExit(); } extern "C" { - #[doc = "Generates a default MVDSTD configuration."] - #[doc = "* config Pointer to output the generated config to."] - #[doc = "* input_width Input width."] - #[doc = "* input_height Input height."] - #[doc = "* output_width Output width."] - #[doc = "* output_height Output height."] - #[doc = "* vaddr_colorconv_indata Virtual address of the color conversion input data."] - #[doc = "* vaddr_outdata0 Virtual address of the output data."] - #[doc = "* vaddr_outdata1 Additional virtual address for output data, only used when the output format type is value 0x00020001."] +#[doc = "Generates a default MVDSTD configuration."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to output the generated config to."] +#[doc = "* `input_width` - Input width."] +#[doc = "* `input_height` - Input height."] +#[doc = "* `output_width` - Output width."] +#[doc = "* `output_height` - Output height."] +#[doc = "* `vaddr_colorconv_indata` - Virtual address of the color conversion input data."] +#[doc = "* `vaddr_outdata0` - Virtual address of the output data."] +#[doc = "* `vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] + pub fn mvdstdGenerateDefaultConfig( config: *mut MVDSTD_Config, input_width: u32_, @@ -17789,17 +24753,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Run color-format-conversion."] - #[doc = "* config Pointer to the configuration to use."] +#[doc = "Run color-format-conversion."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to the configuration to use."] + pub fn mvdstdConvertImage(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] - #[doc = "Processes a video frame(specifically a NAL-unit)."] - #[doc = "* inbuf_vaddr Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] - #[doc = "* size Size of the input buffer."] - #[doc = "* flag See here regarding this input flag: https://www.3dbrew.org/wiki/MVDSTD:ProcessNALUnit"] - #[doc = "* out Optional output MVDSTD_ProcessNALUnitOut structure."] +#[doc = "Processes a video frame(specifically a NAL-unit)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] +#[doc = "* `size` - Size of the input buffer."] +#[doc = "* `flag` - See here regarding this input flag: https://www.3dbrew.org/wiki/MVDSTD:ProcessNALUnit"] +#[doc = "* `out` - Optional output MVDSTD_ProcessNALUnitOut structure."] + pub fn mvdstdProcessVideoFrame( inbuf_vaddr: *mut ::libc::c_void, size: size_t, @@ -17809,22 +24781,34 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Renders the video frame."] - #[doc = "* config Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] - #[doc = "* wait When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] +#[doc = "Renders the video frame."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] +#[doc = "* `wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] + pub fn mvdstdRenderVideoFrame(config: *mut MVDSTD_Config, wait: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current configuration of MVDSTD."] - #[doc = "* config Pointer to the configuration to set."] +#[doc = "Sets the current configuration of MVDSTD."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `config` - Pointer to the configuration to set."] + pub fn MVDSTD_SetConfig(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] - #[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: https://www.3dbrew.org/wiki/MVDSTD:SetupOutputBuffers"] - #[doc = "* entrylist Input entrylist."] - #[doc = "* bufsize Size of each buffer from the entrylist."] +#[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: https://www.3dbrew.org/wiki/MVDSTD:SetupOutputBuffers"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `entrylist` - Input entrylist."] +#[doc = "* `bufsize` - Size of each buffer from the entrylist."] + pub fn mvdstdSetupOutputBuffers( entrylist: *mut MVDSTD_OutputBuffersEntryList, bufsize: u32_, @@ -17832,11 +24816,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: https://www.3dbrew.org/wiki/MVDSTD:OverrideOutputBuffers"] - #[doc = "* cur_outdata0 Linearmem vaddr. The current outdata0 for this entry must match this value."] - #[doc = "* cur_outdata1 Linearmem vaddr. The current outdata1 for this entry must match this value."] - #[doc = "* new_outdata0 Linearmem vaddr. This is the new address to use for outaddr0."] - #[doc = "* new_outdata1 Linearmem vaddr. This is the new address to use for outaddr1."] +#[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: https://www.3dbrew.org/wiki/MVDSTD:OverrideOutputBuffers"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cur_outdata0` - Linearmem vaddr. The current outdata0 for this entry must match this value."] +#[doc = "* `cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] +#[doc = "* `new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] +#[doc = "* `new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] + pub fn mvdstdOverrideOutputBuffers( cur_outdata0: *mut ::libc::c_void, cur_outdata1: *mut ::libc::c_void, @@ -17846,33 +24834,53 @@ extern "C" { } pub const NFC_OpType_1: NFC_OpType = 1; #[doc = "Unknown."] +#[doc = ""] + pub const NFC_OpType_NFCTag: NFC_OpType = 2; #[doc = "This is the default."] +#[doc = ""] + pub const NFC_OpType_RawNFC: NFC_OpType = 3; #[doc = "NFC operation type."] +#[doc = ""] + pub type NFC_OpType = ::libc::c_uint; pub const NFC_TagState_Uninitialized: NFC_TagState = 0; #[doc = "nfcInit() was not used yet."] +#[doc = ""] + pub const NFC_TagState_ScanningStopped: NFC_TagState = 1; #[doc = "Not currently scanning for NFC tags. Set by nfcStopScanning() and nfcInit(), when successful."] +#[doc = ""] + pub const NFC_TagState_Scanning: NFC_TagState = 2; #[doc = "Currently scanning for NFC tags. Set by nfcStartScanning() when successful."] +#[doc = ""] + pub const NFC_TagState_InRange: NFC_TagState = 3; #[doc = "NFC tag is in range. The state automatically changes to this when the state was previously value 2, without using any NFC service commands."] +#[doc = ""] + pub const NFC_TagState_OutOfRange: NFC_TagState = 4; #[doc = "NFC tag is now out of range, where the NFC tag was previously in range. This occurs automatically without using any NFC service commands. Once this state is entered, it won't automatically change to anything else when the tag is moved in range again. Hence, if you want to keep doing tag scanning after this, you must stop+start scanning."] +#[doc = ""] + pub const NFC_TagState_DataReady: NFC_TagState = 5; pub type NFC_TagState = ::libc::c_uint; pub const NFC_amiiboFlag_Setup: _bindgen_ty_28 = 16; #[doc = "This indicates that the amiibo was setup with amiibo Settings. nfcGetAmiiboSettings() will return an all-zero struct when this is not set."] +#[doc = ""] + pub const NFC_amiiboFlag_AppDataSetup: _bindgen_ty_28 = 32; #[doc = "Bit4-7 are always clear with nfcGetAmiiboSettings() due to \"& 0xF\"."] +#[doc = ""] + pub type _bindgen_ty_28 = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_TagInfo { pub id_offset_size: u16_, - #[doc = "\"u16 size/offset of the below ID data. Normally this is 0x7. When this is <=10, this field is the size of the below ID data. When this is >10, this is the offset of the 10-byte ID data, relative to structstart+4+. It's unknown in what cases this 10-byte ID data is used.\""] + pub unk_x2: u8_, pub unk_x3: u8_, pub id: [u8_; 40usize], @@ -17887,17 +24895,19 @@ impl Default for NFC_TagInfo { } } #[doc = "AmiiboSettings structure, see also here: https://3dbrew.org/wiki/NFC:GetAmiiboSettings"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboSettings { pub mii: [u8_; 96usize], - #[doc = "\"Owner Mii.\""] + pub nickname: [u16_; 11usize], - #[doc = "\"UTF-16BE Amiibo nickname.\""] + pub flags: u8_, - #[doc = "\"This is plaintext_amiibosettingsdata[0] & 0xF.\" See also the NFC_amiiboFlag enums."] + pub countrycodeid: u8_, - #[doc = "\"This is plaintext_amiibosettingsdata[1].\" \"Country Code ID, from the system which setup this amiibo.\""] + pub setupdate_year: u16_, pub setupdate_month: u8_, pub setupdate_day: u8_, @@ -17913,6 +24923,8 @@ impl Default for NFC_AmiiboSettings { } } #[doc = "AmiiboConfig structure, see also here: https://3dbrew.org/wiki/NFC:GetAmiiboConfig"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboConfig { @@ -17921,16 +24933,24 @@ pub struct NFC_AmiiboConfig { pub lastwritedate_day: u8_, pub write_counter: u16_, pub characterID: [u8_; 3usize], - #[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] +#[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] +#[doc = ""] + pub series: u8_, - #[doc = "ID of the series"] +#[doc = "ID of the series"] +#[doc = ""] + pub amiiboID: u16_, - #[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] +#[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] +#[doc = ""] + pub type_: u8_, - #[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] +#[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] +#[doc = ""] + pub pagex4_byte3: u8_, pub appdata_size: u16_, - #[doc = "\"NFC module writes hard-coded u8 value 0xD8 here. This is the size of the Amiibo AppData, apps can use this with the AppData R/W commands. ...\""] + pub zeros: [u8_; 48usize], } impl Default for NFC_AmiiboConfig { @@ -17943,6 +24963,8 @@ impl Default for NFC_AmiiboConfig { } } #[doc = "Used by nfcInitializeWriteAppData() internally, see also here: https://3dbrew.org/wiki/NFC:GetAppDataInitStruct"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AppDataInitStruct { @@ -17959,6 +24981,8 @@ impl Default for NFC_AppDataInitStruct { } } #[doc = "Used by nfcWriteAppData() internally, see also: https://3dbrew.org/wiki/NFC:WriteAppData"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NFC_AppDataWriteStruct { @@ -17968,68 +24992,105 @@ pub struct NFC_AppDataWriteStruct { } extern "C" { #[must_use] - #[doc = "Initializes NFC."] - #[doc = "* type See the NFC_OpType enum."] +#[doc = "Initializes NFC."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `type` - See the NFC_OpType enum."] + pub fn nfcInit(type_: NFC_OpType) -> Result; } extern "C" { - #[doc = "Shuts down NFC."] +#[doc = "Shuts down NFC."] +#[doc = ""] + pub fn nfcExit(); } extern "C" { - #[doc = "Gets the NFC service handle."] - #[doc = "The NFC service handle."] +#[doc = "Gets the NFC service handle."] +#[doc = ""] +#[doc = "Returns: The NFC service handle."] +#[doc = ""] + pub fn nfcGetSessionHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Starts scanning for NFC tags."] - #[doc = "* inval Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] +#[doc = "Starts scanning for NFC tags."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] + pub fn nfcStartScanning(inval: u16_) -> Result; } extern "C" { - #[doc = "Stops scanning for NFC tags."] +#[doc = "Stops scanning for NFC tags."] +#[doc = ""] + pub fn nfcStopScanning(); } extern "C" { #[must_use] - #[doc = "Read amiibo NFC data and load in memory."] +#[doc = "Read amiibo NFC data and load in memory."] +#[doc = ""] + pub fn nfcLoadAmiiboData() -> Result; } extern "C" { #[must_use] - #[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] +#[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] +#[doc = ""] + pub fn nfcResetTagScanState() -> Result; } extern "C" { #[must_use] - #[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] +#[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] +#[doc = ""] + pub fn nfcUpdateStoredAmiiboData() -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current NFC tag state."] - #[doc = "* state Pointer to write NFC tag state."] +#[doc = "Returns the current NFC tag state."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - Pointer to write NFC tag state."] + pub fn nfcGetTagState(state: *mut NFC_TagState) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current TagInfo."] - #[doc = "* out Pointer to write the output TagInfo."] +#[doc = "Returns the current TagInfo."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the output TagInfo."] + pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: https://3dbrew.org/wiki/NFC:OpenAppData"] - #[doc = "* amiibo_appid Amiibo AppID. See here: https://www.3dbrew.org/wiki/Amiibo"] +#[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: https://3dbrew.org/wiki/NFC:OpenAppData"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `amiibo_appid` - Amiibo AppID. See here: https://www.3dbrew.org/wiki/Amiibo"] + pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] - #[doc = "* amiibo_appid amiibo AppID. See also nfcOpenAppData()."] - #[doc = "* buf Input buffer."] - #[doc = "* size Buffer size."] +#[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] +#[doc = "* `buf` - Input buffer."] +#[doc = "* `size` - Buffer size."] + pub fn nfcInitializeWriteAppData( amiibo_appid: u32_, buf: *const ::libc::c_void, @@ -18038,17 +25099,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] - #[doc = "* buf Output buffer."] - #[doc = "* size Buffer size."] +#[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Output buffer."] +#[doc = "* `size` - Buffer size."] + pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: https://3dbrew.org/wiki/NFC:WriteAppData"] - #[doc = "* buf Input buffer."] - #[doc = "* size Buffer size."] - #[doc = "* taginfo TagInfo from nfcGetTagInfo()."] +#[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: https://3dbrew.org/wiki/NFC:WriteAppData"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf` - Input buffer."] +#[doc = "* `size` - Buffer size."] +#[doc = "* `taginfo` - TagInfo from nfcGetTagInfo()."] + pub fn nfcWriteAppData( buf: *const ::libc::c_void, size: size_t, @@ -18057,32 +25126,48 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Returns the current AmiiboSettings."] - #[doc = "* out Pointer to write the output AmiiboSettings."] +#[doc = "Returns the current AmiiboSettings."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the output AmiiboSettings."] + pub fn nfcGetAmiiboSettings(out: *mut NFC_AmiiboSettings) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current AmiiboConfig."] - #[doc = "* out Pointer to write the output AmiiboConfig."] +#[doc = "Returns the current AmiiboConfig."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the output AmiiboConfig."] + pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: https://www.3dbrew.org/wiki/NFC:StartOtherTagScanning"] - #[doc = "* unk0 Same as nfcStartScanning() input."] - #[doc = "* unk1 Unknown."] +#[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: https://www.3dbrew.org/wiki/NFC:StartOtherTagScanning"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `unk0` - Same as nfcStartScanning() input."] +#[doc = "* `unk1` - Unknown."] + pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: https://www.3dbrew.org/wiki/NFC:SendTagCommand"] - #[doc = "* inbuf Input buffer."] - #[doc = "* insize Size of the input buffer."] - #[doc = "* outbuf Output buffer."] - #[doc = "* outsize Size of the output buffer."] - #[doc = "* actual_transfer_size Optional output ptr to write the actual output-size to, can be NULL."] - #[doc = "* microseconds Timing-related field in microseconds."] +#[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: https://www.3dbrew.org/wiki/NFC:SendTagCommand"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inbuf` - Input buffer."] +#[doc = "* `insize` - Size of the input buffer."] +#[doc = "* `outbuf` - Output buffer."] +#[doc = "* `outsize` - Size of the output buffer."] +#[doc = "* `actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] +#[doc = "* `microseconds` - Timing-related field in microseconds."] + pub fn nfcSendTagCommand( inbuf: *const ::libc::c_void, insize: size_t, @@ -18094,15 +25179,21 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] +#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] +#[doc = ""] + pub fn nfcCmd21() -> Result; } extern "C" { #[must_use] - #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] +#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] +#[doc = ""] + pub fn nfcCmd22() -> Result; } #[doc = "Notification header data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationHeader { @@ -18121,23 +25212,31 @@ pub struct NotificationHeader { } extern "C" { #[must_use] - #[doc = "Initializes NEWS."] +#[doc = "Initializes NEWS."] +#[doc = ""] + pub fn newsInit() -> Result; } extern "C" { - #[doc = "Exits NEWS."] +#[doc = "Exits NEWS."] +#[doc = ""] + pub fn newsExit(); } extern "C" { #[must_use] - #[doc = "Adds a notification to the home menu Notifications applet."] - #[doc = "* title UTF-16 title of the notification."] - #[doc = "* titleLength Number of characters in the title, not including the null-terminator."] - #[doc = "* message UTF-16 message of the notification, or NULL for no message."] - #[doc = "* messageLength Number of characters in the message, not including the null-terminator."] - #[doc = "* image Data of the image to show in the notification, or NULL for no image."] - #[doc = "* imageSize Size of the image data in bytes."] - #[doc = "* jpeg Whether the image is a JPEG or not."] +#[doc = "Adds a notification to the home menu Notifications applet."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `title` - UTF-16 title of the notification."] +#[doc = "* `titleLength` - Number of characters in the title, not including the null-terminator."] +#[doc = "* `message` - UTF-16 message of the notification, or NULL for no message."] +#[doc = "* `messageLength` - Number of characters in the message, not including the null-terminator."] +#[doc = "* `image` - Data of the image to show in the notification, or NULL for no image."] +#[doc = "* `imageSize` - Size of the image data in bytes."] +#[doc = "* `jpeg` - Whether the image is a JPEG or not."] + pub fn NEWS_AddNotification( title: *const u16_, titleLength: u32_, @@ -18150,38 +25249,58 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets current total notifications number."] - #[doc = "* num Pointer where total number will be saved."] +#[doc = "Gets current total notifications number."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `num` - Pointer where total number will be saved."] + pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a custom header for a specific notification."] - #[doc = "* news_id Identification number of the notification."] - #[doc = "* header Pointer to notification header to set."] +#[doc = "Sets a custom header for a specific notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `news_id` - Identification number of the notification."] +#[doc = "* `header` - Pointer to notification header to set."] + pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the header of a specific notification."] - #[doc = "* news_id Identification number of the notification."] - #[doc = "* header Pointer where header of the notification will be saved."] +#[doc = "Gets the header of a specific notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `news_id` - Identification number of the notification."] +#[doc = "* `header` - Pointer where header of the notification will be saved."] + pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a custom message for a specific notification."] - #[doc = "* news_id Identification number of the notification."] - #[doc = "* message Pointer to UTF-16 message to set."] - #[doc = "* size Size of message to set."] +#[doc = "Sets a custom message for a specific notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `news_id` - Identification number of the notification."] +#[doc = "* `message` - Pointer to UTF-16 message to set."] +#[doc = "* `size` - Size of message to set."] + pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the message of a specific notification."] - #[doc = "* news_id Identification number of the notification."] - #[doc = "* message Pointer where UTF-16 message of the notification will be saved."] - #[doc = "* size Pointer where size of the message data will be saved in bytes."] +#[doc = "Gets the message of a specific notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `news_id` - Identification number of the notification."] +#[doc = "* `message` - Pointer where UTF-16 message of the notification will be saved."] +#[doc = "* `size` - Pointer where size of the message data will be saved in bytes."] + pub fn NEWS_GetNotificationMessage( news_id: u32_, message: *mut u16_, @@ -18190,10 +25309,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets a custom image for a specific notification."] - #[doc = "* news_id Identification number of the notification."] - #[doc = "* buffer Pointer to MPO image to set."] - #[doc = "* size Size of the MPO image to set."] +#[doc = "Sets a custom image for a specific notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `news_id` - Identification number of the notification."] +#[doc = "* `buffer` - Pointer to MPO image to set."] +#[doc = "* `size` - Size of the MPO image to set."] + pub fn NEWS_SetNotificationImage( news_id: u32_, buffer: *const ::libc::c_void, @@ -18202,10 +25325,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the image of a specific notification."] - #[doc = "* news_id Identification number of the notification."] - #[doc = "* buffer Pointer where MPO image of the notification will be saved."] - #[doc = "* size Pointer where size of the image data will be saved in bytes."] +#[doc = "Gets the image of a specific notification."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `news_id` - Identification number of the notification."] +#[doc = "* `buffer` - Pointer where MPO image of the notification will be saved."] +#[doc = "* `size` - Pointer where size of the image data will be saved in bytes."] + pub fn NEWS_GetNotificationImage( news_id: u32_, buffer: *mut ::libc::c_void, @@ -18213,56 +25340,89 @@ extern "C" { ) -> Result; } #[doc = "Head tracking coordinate pair."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfoCoord { - #[doc = "X coordinate."] +#[doc = "X coordinate."] +#[doc = ""] + pub x: f32, - #[doc = "Y coordinate."] +#[doc = "Y coordinate."] +#[doc = ""] + pub y: f32, } #[doc = "Head tracking info."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfo { - #[doc = "Flags."] +#[doc = "Flags."] +#[doc = ""] + pub flags: [u8_; 5usize], - #[doc = "Padding."] +#[doc = "Padding."] +#[doc = ""] + pub padding: [u8_; 3usize], - #[doc = "Unknown. Not used by System_Settings."] +#[doc = "Unknown. Not used by System_Settings."] +#[doc = ""] + pub floatdata_x08: f32, - #[doc = "Head coordinates."] +#[doc = "Head coordinates."] +#[doc = ""] + pub coords0: [QTM_HeadTrackingInfoCoord; 4usize], - #[doc = "Unknown. Not used by System_Settings."] +#[doc = "Unknown. Not used by System_Settings."] +#[doc = ""] + pub unk_x2c: [u32_; 5usize], } extern "C" { #[must_use] - #[doc = "Initializes QTM."] +#[doc = "Initializes QTM."] +#[doc = ""] + pub fn qtmInit() -> Result; } extern "C" { - #[doc = "Exits QTM."] +#[doc = "Exits QTM."] +#[doc = ""] + pub fn qtmExit(); } extern "C" { - #[doc = "Checks whether QTM is initialized."] - #[doc = "Whether QTM is initialized."] +#[doc = "Checks whether QTM is initialized."] +#[doc = ""] +#[doc = "Returns: Whether QTM is initialized."] +#[doc = ""] + pub fn qtmCheckInitialized() -> bool; } extern "C" { - #[doc = "Checks whether a head is fully detected."] - #[doc = "* info Tracking info to check."] +#[doc = "Checks whether a head is fully detected."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `info` - Tracking info to check."] + pub fn qtmCheckHeadFullyDetected(info: *mut QTM_HeadTrackingInfo) -> bool; } extern "C" { #[must_use] - #[doc = "Converts QTM coordinates to screen coordinates."] - #[doc = "* coord Coordinates to convert."] - #[doc = "* screen_width Width of the screen. Can be NULL to use the default value for the top screen."] - #[doc = "* screen_height Height of the screen. Can be NULL to use the default value for the top screen."] - #[doc = "* x Pointer to output the screen X coordinate to."] - #[doc = "* y Pointer to output the screen Y coordinate to."] +#[doc = "Converts QTM coordinates to screen coordinates."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `coord` - Coordinates to convert."] +#[doc = "* `screen_width` - Width of the screen. Can be NULL to use the default value for the top screen."] +#[doc = "* `screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] +#[doc = "* `x` - Pointer to output the screen X coordinate to."] +#[doc = "* `y` - Pointer to output the screen Y coordinate to."] + pub fn qtmConvertCoordToScreen( coord: *mut QTM_HeadTrackingInfoCoord, screen_width: *mut f32, @@ -18273,44 +25433,67 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the current head tracking info."] - #[doc = "* val Normally 0."] - #[doc = "* out Pointer to write head tracking info to."] +#[doc = "Gets the current head tracking info."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `val` - Normally 0."] +#[doc = "* `out` - Pointer to write head tracking info to."] + pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes srv:pm and the service API."] +#[doc = "Initializes srv:pm and the service API."] +#[doc = ""] + pub fn srvPmInit() -> Result; } extern "C" { - #[doc = "Exits srv:pm and the service API."] +#[doc = "Exits srv:pm and the service API."] +#[doc = ""] + pub fn srvPmExit(); } extern "C" { - #[doc = "Gets the current srv:pm session handle."] - #[doc = "The current srv:pm session handle."] +#[doc = "Gets the current srv:pm session handle."] +#[doc = ""] +#[doc = "Returns: The current srv:pm session handle."] +#[doc = ""] + pub fn srvPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Publishes a notification to a process."] - #[doc = "* notificationId ID of the notification."] - #[doc = "* process Process to publish to."] +#[doc = "Publishes a notification to a process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `notificationId` - ID of the notification."] +#[doc = "* `process` - Process to publish to."] + pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Publishes a notification to all processes."] - #[doc = "* notificationId ID of the notification."] +#[doc = "Publishes a notification to all processes."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `notificationId` - ID of the notification."] + pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Registers a process with SRV."] - #[doc = "* pid ID of the process."] - #[doc = "* count Number of services within the service access control data."] - #[doc = "* serviceAccessControlList Service Access Control list."] +#[doc = "Registers a process with SRV."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pid` - ID of the process."] +#[doc = "* `count` - Number of services within the service access control data."] +#[doc = "* `serviceAccessControlList` - Service Access Control list."] + pub fn SRVPM_RegisterProcess( pid: u32_, count: u32_, @@ -18319,32 +25502,48 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters a process with SRV."] - #[doc = "* pid ID of the process."] +#[doc = "Unregisters a process with SRV."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pid` - ID of the process."] + pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes LOADER."] +#[doc = "Initializes LOADER."] +#[doc = ""] + pub fn loaderInit() -> Result; } extern "C" { - #[doc = "Exits LOADER."] +#[doc = "Exits LOADER."] +#[doc = ""] + pub fn loaderExit(); } extern "C" { #[must_use] - #[doc = "Loads a program and returns a process handle to the newly created process."] - #[doc = "* process Pointer to output the process handle to."] - #[doc = "* programHandle The handle of the program to load."] +#[doc = "Loads a program and returns a process handle to the newly created process."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `process` - Pointer to output the process handle to. [Direction: In, Out]"] +#[doc = "* `programHandle` - The handle of the program to load."] + pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Registers a program (along with its update)."] - #[doc = "* programHandle Pointer to output the program handle to."] - #[doc = "* programInfo The program info."] - #[doc = "* programInfo The program update info."] +#[doc = "Registers a program (along with its update)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] +#[doc = "* `programInfo` - The program info."] +#[doc = "* `programInfo` - The program update info."] + pub fn LOADER_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -18353,156 +25552,260 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters a program (along with its update)."] - #[doc = "* programHandle The handle of the program to unregister."] +#[doc = "Unregisters a program (along with its update)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `programHandle` - The handle of the program to unregister."] + pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see ExHeader_Info)."] - #[doc = "* exheaderInfo Pointer to output the main NCCH extended header info."] - #[doc = "* programHandle The handle of the program to unregister"] +#[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see @ref ExHeader_Info)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] +#[doc = "* `programHandle` - The handle of the program to unregister"] + pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } #[doc = "The normal mode of the led"] +#[doc = ""] + pub const LED_NORMAL: powerLedState = 1; #[doc = "The led pulses slowly as it does in the sleep mode"] +#[doc = ""] + pub const LED_SLEEP_MODE: powerLedState = 2; #[doc = "Switch off power led"] +#[doc = ""] + pub const LED_OFF: powerLedState = 3; #[doc = "Red state of the led"] +#[doc = ""] + pub const LED_RED: powerLedState = 4; #[doc = "Blue state of the led"] +#[doc = ""] + pub const LED_BLUE: powerLedState = 5; #[doc = "Blinking red state of power led and notification led"] +#[doc = ""] + pub const LED_BLINK_RED: powerLedState = 6; pub type powerLedState = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes mcuHwc."] +#[doc = "Initializes mcuHwc."] +#[doc = ""] + pub fn mcuHwcInit() -> Result; } extern "C" { - #[doc = "Exits mcuHwc."] +#[doc = "Exits mcuHwc."] +#[doc = ""] + pub fn mcuHwcExit(); } extern "C" { #[must_use] - #[doc = "Reads data from an i2c device3 register"] - #[doc = "* reg Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] - #[doc = "* data Pointer to write the data to."] - #[doc = "* size Size of data to be read"] +#[doc = "Reads data from an i2c device3 register"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] +#[doc = "* `data` - Pointer to write the data to."] +#[doc = "* `size` - Size of data to be read"] + pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes data to a i2c device3 register"] - #[doc = "* reg Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] - #[doc = "* data Pointer to write the data to."] - #[doc = "* size Size of data to be written"] +#[doc = "Writes data to a i2c device3 register"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] +#[doc = "* `data` - Pointer to write the data to."] +#[doc = "* `size` - Size of data to be written"] + pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the battery voltage"] - #[doc = "* voltage Pointer to write the battery voltage to."] +#[doc = "Gets the battery voltage"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `voltage` - Pointer to write the battery voltage to."] + pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the battery level"] - #[doc = "* level Pointer to write the current battery level to."] +#[doc = "Gets the battery level"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `level` - Pointer to write the current battery level to."] + pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the sound slider level"] - #[doc = "* level Pointer to write the slider level to."] +#[doc = "Gets the sound slider level"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `level` - Pointer to write the slider level to."] + pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets Wifi LED state"] - #[doc = "* state State of Wifi LED. (True/False)"] +#[doc = "Sets Wifi LED state"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - State of Wifi LED. (True/False)"] + pub fn MCUHWC_SetWifiLedState(state: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets Power LED state"] - #[doc = "* state powerLedState State of power LED."] +#[doc = "Sets Power LED state"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `state` - powerLedState State of power LED."] + pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result; } extern "C" { #[must_use] - #[doc = "Gets 3d slider level"] - #[doc = "* level Pointer to write 3D slider level to."] +#[doc = "Gets 3d slider level"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `level` - Pointer to write 3D slider level to."] + pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the major MCU firmware version"] - #[doc = "* out Pointer to write the major firmware version to."] +#[doc = "Gets the major MCU firmware version"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the major firmware version to."] + pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the minor MCU firmware version"] - #[doc = "* out Pointer to write the minor firmware version to."] +#[doc = "Gets the minor MCU firmware version"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Pointer to write the minor firmware version to."] + pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result; } #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] +#[doc = ""] + pub const GX_TRANSFER_FMT_RGBA8: GX_TRANSFER_FORMAT = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] +#[doc = ""] + pub const GX_TRANSFER_FMT_RGB8: GX_TRANSFER_FORMAT = 1; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] +#[doc = ""] + pub const GX_TRANSFER_FMT_RGB565: GX_TRANSFER_FORMAT = 2; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] +#[doc = ""] + pub const GX_TRANSFER_FMT_RGB5A1: GX_TRANSFER_FORMAT = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] +#[doc = ""] + pub const GX_TRANSFER_FMT_RGBA4: GX_TRANSFER_FORMAT = 4; #[doc = "Supported transfer pixel formats."] -#[doc = "GSPGPU_FramebufferFormat"] +#[doc = ""] + pub type GX_TRANSFER_FORMAT = ::libc::c_uint; #[doc = "No anti-aliasing"] +#[doc = ""] + pub const GX_TRANSFER_SCALE_NO: GX_TRANSFER_SCALE = 0; #[doc = "2x1 anti-aliasing"] +#[doc = ""] + pub const GX_TRANSFER_SCALE_X: GX_TRANSFER_SCALE = 1; #[doc = "2x2 anti-aliasing"] +#[doc = ""] + pub const GX_TRANSFER_SCALE_XY: GX_TRANSFER_SCALE = 2; #[doc = "Anti-aliasing modes"] #[doc = ""] +#[doc = ""] #[doc = "Please remember that the framebuffer is sideways."] #[doc = "Hence if you activate 2x1 anti-aliasing the destination dimensions are w = 240*2 and h = 400"] +#[doc = ""] + pub type GX_TRANSFER_SCALE = ::libc::c_uint; #[doc = "Trigger the PPF event"] +#[doc = ""] + pub const GX_FILL_TRIGGER: GX_FILL_CONTROL = 1; #[doc = "Indicates if the memory fill is complete. You should not use it when requesting a transfer."] +#[doc = ""] + pub const GX_FILL_FINISHED: GX_FILL_CONTROL = 2; #[doc = "The buffer has a 16 bit per pixel depth"] +#[doc = ""] + pub const GX_FILL_16BIT_DEPTH: GX_FILL_CONTROL = 0; #[doc = "The buffer has a 24 bit per pixel depth"] +#[doc = ""] + pub const GX_FILL_24BIT_DEPTH: GX_FILL_CONTROL = 256; #[doc = "The buffer has a 32 bit per pixel depth"] +#[doc = ""] + pub const GX_FILL_32BIT_DEPTH: GX_FILL_CONTROL = 512; #[doc = "GX transfer control flags"] +#[doc = ""] + pub type GX_FILL_CONTROL = ::libc::c_uint; #[doc = "GX command entry"] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub union gxCmdEntry_s { - #[doc = "Raw command data"] +#[doc = "Raw command data"] +#[doc = ""] + pub data: [u32_; 8usize], pub __bindgen_anon_1: gxCmdEntry_s__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct gxCmdEntry_s__bindgen_ty_1 { - #[doc = "Command type"] +#[doc = "Command type"] +#[doc = ""] + pub type_: u8_, pub unk1: u8_, pub unk2: u8_, pub unk3: u8_, - #[doc = "Command arguments"] +#[doc = "Command arguments"] +#[doc = ""] + pub args: [u32_; 7usize], } impl Default for gxCmdEntry_s { @@ -18515,22 +25818,38 @@ impl Default for gxCmdEntry_s { } } #[doc = "GX command queue structure"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_gxCmdQueue_s { - #[doc = "Pointer to array of GX command entries"] +#[doc = "Pointer to array of GX command entries"] +#[doc = ""] + pub entries: *mut gxCmdEntry_s, - #[doc = "Capacity of the command array"] +#[doc = "Capacity of the command array"] +#[doc = ""] + pub maxEntries: u16_, - #[doc = "Number of commands in the queue"] +#[doc = "Number of commands in the queue"] +#[doc = ""] + pub numEntries: u16_, - #[doc = "Index of the first pending command to be submitted to GX"] +#[doc = "Index of the first pending command to be submitted to GX"] +#[doc = ""] + pub curEntry: u16_, - #[doc = "Number of commands completed by GX"] +#[doc = "Number of commands completed by GX"] +#[doc = ""] + pub lastEntry: u16_, - #[doc = "User callback"] +#[doc = "User callback"] +#[doc = ""] + pub callback: ::core::option::Option, - #[doc = "Data for user callback"] +#[doc = "Data for user callback"] +#[doc = ""] + pub user: *mut ::libc::c_void, } impl Default for tag_gxCmdQueue_s { @@ -18543,67 +25862,106 @@ impl Default for tag_gxCmdQueue_s { } } #[doc = "GX command queue structure"] +#[doc = ""] + pub type gxCmdQueue_s = tag_gxCmdQueue_s; extern "C" { - #[doc = "Clears a GX command queue."] - #[doc = "* queue The GX command queue."] +#[doc = "Clears a GX command queue."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `queue` - The GX command queue."] + pub fn gxCmdQueueClear(queue: *mut gxCmdQueue_s); } extern "C" { - #[doc = "Adds a command to a GX command queue."] - #[doc = "* queue The GX command queue."] - #[doc = "* entry The GX command to add."] +#[doc = "Adds a command to a GX command queue."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `queue` - The GX command queue."] +#[doc = "* `entry` - The GX command to add."] + pub fn gxCmdQueueAdd(queue: *mut gxCmdQueue_s, entry: *const gxCmdEntry_s); } extern "C" { - #[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] - #[doc = "* queue The GX command queue."] +#[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `queue` - The GX command queue."] + pub fn gxCmdQueueRun(queue: *mut gxCmdQueue_s); } extern "C" { - #[doc = "Stops a GX command queue from processing incoming commands."] - #[doc = "* queue The GX command queue."] +#[doc = "Stops a GX command queue from processing incoming commands."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `queue` - The GX command queue."] + pub fn gxCmdQueueStop(queue: *mut gxCmdQueue_s); } extern "C" { - #[doc = "Waits for a GX command queue to finish executing pending commands."] - #[doc = "* queue The GX command queue."] - #[doc = "* timeout Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] - #[doc = "false if timeout expired, true otherwise."] +#[doc = "Waits for a GX command queue to finish executing pending commands."] +#[doc = ""] +#[doc = "Returns: False if timeout expired, true otherwise."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `queue` - The GX command queue."] +#[doc = "* `timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] + pub fn gxCmdQueueWait(queue: *mut gxCmdQueue_s, timeout: s64) -> bool; } extern "C" { - #[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] - #[doc = "* queue The GX command queue. (Pass NULL to remove the bound command queue)"] +#[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] + pub fn GX_BindQueue(queue: *mut gxCmdQueue_s); } extern "C" { #[must_use] - #[doc = "Requests a DMA."] - #[doc = "* src Source to DMA from."] - #[doc = "* dst Destination to DMA to."] - #[doc = "* length Length of data to transfer."] +#[doc = "Requests a DMA."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `src` - Source to DMA from."] +#[doc = "* `dst` - Destination to DMA to."] +#[doc = "* `length` - Length of data to transfer."] + pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Processes a GPU command list."] - #[doc = "* buf0a Command list address."] - #[doc = "* buf0s Command list size."] - #[doc = "* flags Flags to process with."] +#[doc = "Processes a GPU command list."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf0a` - Command list address."] +#[doc = "* `buf0s` - Command list size."] +#[doc = "* `flags` - Flags to process with."] + pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Fills the memory of two buffers with the given values."] - #[doc = "* buf0a Start address of the first buffer."] - #[doc = "* buf0v Dimensions of the first buffer."] - #[doc = "* buf0e End address of the first buffer."] - #[doc = "* control0 Value to fill the first buffer with."] - #[doc = "* buf1a Start address of the second buffer."] - #[doc = "* buf1v Dimensions of the second buffer."] - #[doc = "* buf1e End address of the second buffer."] - #[doc = "* control1 Value to fill the second buffer with."] +#[doc = "Fills the memory of two buffers with the given values."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf0a` - Start address of the first buffer."] +#[doc = "* `buf0v` - Dimensions of the first buffer."] +#[doc = "* `buf0e` - End address of the first buffer."] +#[doc = "* `control0` - Value to fill the first buffer with."] +#[doc = "* `buf1a` - Start address of the second buffer."] +#[doc = "* `buf1v` - Dimensions of the second buffer."] +#[doc = "* `buf1e` - End address of the second buffer."] +#[doc = "* `control1` - Value to fill the second buffer with."] + pub fn GX_MemoryFill( buf0a: *mut u32_, buf0v: u32_, @@ -18617,13 +25975,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initiates a display transfer."] - #[doc = "The PPF event will be signaled on completion."] - #[doc = "* inadr Address of the input."] - #[doc = "* indim Dimensions of the input."] - #[doc = "* outadr Address of the output."] - #[doc = "* outdim Dimensions of the output."] - #[doc = "* flags Flags to transfer with."] +#[doc = "Initiates a display transfer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inadr` - Address of the input."] +#[doc = "* `indim` - Dimensions of the input."] +#[doc = "* `outadr` - Address of the output."] +#[doc = "* `outdim` - Dimensions of the output."] +#[doc = "* `flags` - Flags to transfer with."] + pub fn GX_DisplayTransfer( inadr: *mut u32_, indim: u32_, @@ -18634,14 +25995,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initiates a texture copy."] - #[doc = "The PPF event will be signaled on completion."] - #[doc = "* inadr Address of the input."] - #[doc = "* indim Dimensions of the input."] - #[doc = "* outadr Address of the output."] - #[doc = "* outdim Dimensions of the output."] - #[doc = "* size Size of the data to transfer."] - #[doc = "* flags Flags to transfer with."] +#[doc = "Initiates a texture copy."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `inadr` - Address of the input."] +#[doc = "* `indim` - Dimensions of the input."] +#[doc = "* `outadr` - Address of the output."] +#[doc = "* `outdim` - Dimensions of the output."] +#[doc = "* `size` - Size of the data to transfer."] +#[doc = "* `flags` - Flags to transfer with."] + pub fn GX_TextureCopy( inadr: *mut u32_, indim: u32_, @@ -18653,13 +26017,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] - #[doc = "* buf0a Address of the first buffer."] - #[doc = "* buf0s Size of the first buffer."] - #[doc = "* buf1a Address of the second buffer."] - #[doc = "* buf1s Size of the second buffer."] - #[doc = "* buf2a Address of the third buffer."] - #[doc = "* buf2s Size of the third buffer."] +#[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `buf0a` - Address of the first buffer."] +#[doc = "* `buf0s` - Size of the first buffer."] +#[doc = "* `buf1a` - Address of the second buffer."] +#[doc = "* `buf1s` - Size of the second buffer."] +#[doc = "* `buf2a` - Address of the third buffer."] +#[doc = "* `buf2s` - Size of the third buffer."] + pub fn GX_FlushCacheRegions( buf0a: *mut u32_, buf0s: u32_, @@ -18670,679 +26038,1335 @@ extern "C" { ) -> Result; } #[doc = "Nearest-neighbor interpolation."] +#[doc = ""] + pub const GPU_NEAREST: GPU_TEXTURE_FILTER_PARAM = 0; #[doc = "Linear interpolation."] +#[doc = ""] + pub const GPU_LINEAR: GPU_TEXTURE_FILTER_PARAM = 1; #[doc = "Texture filters."] +#[doc = ""] + pub type GPU_TEXTURE_FILTER_PARAM = ::libc::c_uint; #[doc = "Clamps to edge."] +#[doc = ""] + pub const GPU_CLAMP_TO_EDGE: GPU_TEXTURE_WRAP_PARAM = 0; #[doc = "Clamps to border."] +#[doc = ""] + pub const GPU_CLAMP_TO_BORDER: GPU_TEXTURE_WRAP_PARAM = 1; #[doc = "Repeats texture."] +#[doc = ""] + pub const GPU_REPEAT: GPU_TEXTURE_WRAP_PARAM = 2; #[doc = "Repeats with mirrored texture."] +#[doc = ""] + pub const GPU_MIRRORED_REPEAT: GPU_TEXTURE_WRAP_PARAM = 3; #[doc = "Texture wrap modes."] +#[doc = ""] + pub type GPU_TEXTURE_WRAP_PARAM = ::libc::c_uint; #[doc = "2D texture"] +#[doc = ""] + pub const GPU_TEX_2D: GPU_TEXTURE_MODE_PARAM = 0; #[doc = "Cube map"] +#[doc = ""] + pub const GPU_TEX_CUBE_MAP: GPU_TEXTURE_MODE_PARAM = 1; #[doc = "2D Shadow texture"] +#[doc = ""] + pub const GPU_TEX_SHADOW_2D: GPU_TEXTURE_MODE_PARAM = 2; #[doc = "Projection texture"] +#[doc = ""] + pub const GPU_TEX_PROJECTION: GPU_TEXTURE_MODE_PARAM = 3; #[doc = "Shadow cube map"] +#[doc = ""] + pub const GPU_TEX_SHADOW_CUBE: GPU_TEXTURE_MODE_PARAM = 4; #[doc = "Disabled"] +#[doc = ""] + pub const GPU_TEX_DISABLED: GPU_TEXTURE_MODE_PARAM = 5; #[doc = "Texture modes."] +#[doc = ""] + pub type GPU_TEXTURE_MODE_PARAM = ::libc::c_uint; #[doc = "Texture unit 0."] +#[doc = ""] + pub const GPU_TEXUNIT0: GPU_TEXUNIT = 1; #[doc = "Texture unit 1."] +#[doc = ""] + pub const GPU_TEXUNIT1: GPU_TEXUNIT = 2; #[doc = "Texture unit 2."] +#[doc = ""] + pub const GPU_TEXUNIT2: GPU_TEXUNIT = 4; #[doc = "Supported texture units."] +#[doc = ""] + pub type GPU_TEXUNIT = ::libc::c_uint; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] +#[doc = ""] + pub const GPU_RGBA8: GPU_TEXCOLOR = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] +#[doc = ""] + pub const GPU_RGB8: GPU_TEXCOLOR = 1; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] +#[doc = ""] + pub const GPU_RGBA5551: GPU_TEXCOLOR = 2; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] +#[doc = ""] + pub const GPU_RGB565: GPU_TEXCOLOR = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] +#[doc = ""] + pub const GPU_RGBA4: GPU_TEXCOLOR = 4; #[doc = "8-bit Luminance + 8-bit Alpha"] +#[doc = ""] + pub const GPU_LA8: GPU_TEXCOLOR = 5; #[doc = "8-bit Hi + 8-bit Lo"] +#[doc = ""] + pub const GPU_HILO8: GPU_TEXCOLOR = 6; #[doc = "8-bit Luminance"] +#[doc = ""] + pub const GPU_L8: GPU_TEXCOLOR = 7; #[doc = "8-bit Alpha"] +#[doc = ""] + pub const GPU_A8: GPU_TEXCOLOR = 8; #[doc = "4-bit Luminance + 4-bit Alpha"] +#[doc = ""] + pub const GPU_LA4: GPU_TEXCOLOR = 9; #[doc = "4-bit Luminance"] +#[doc = ""] + pub const GPU_L4: GPU_TEXCOLOR = 10; #[doc = "4-bit Alpha"] +#[doc = ""] + pub const GPU_A4: GPU_TEXCOLOR = 11; #[doc = "ETC1 texture compression"] +#[doc = ""] + pub const GPU_ETC1: GPU_TEXCOLOR = 12; #[doc = "ETC1 texture compression + 4-bit Alpha"] +#[doc = ""] + pub const GPU_ETC1A4: GPU_TEXCOLOR = 13; #[doc = "Supported texture formats."] +#[doc = ""] + pub type GPU_TEXCOLOR = ::libc::c_uint; #[doc = "2D face"] +#[doc = ""] + pub const GPU_TEXFACE_2D: GPU_TEXFACE = 0; #[doc = "+X face"] +#[doc = ""] + pub const GPU_POSITIVE_X: GPU_TEXFACE = 0; #[doc = "-X face"] +#[doc = ""] + pub const GPU_NEGATIVE_X: GPU_TEXFACE = 1; #[doc = "+Y face"] +#[doc = ""] + pub const GPU_POSITIVE_Y: GPU_TEXFACE = 2; #[doc = "-Y face"] +#[doc = ""] + pub const GPU_NEGATIVE_Y: GPU_TEXFACE = 3; #[doc = "+Z face"] +#[doc = ""] + pub const GPU_POSITIVE_Z: GPU_TEXFACE = 4; #[doc = "-Z face"] +#[doc = ""] + pub const GPU_NEGATIVE_Z: GPU_TEXFACE = 5; #[doc = "Texture faces."] +#[doc = ""] + pub type GPU_TEXFACE = ::libc::c_uint; #[doc = "Clamp to zero."] +#[doc = ""] + pub const GPU_PT_CLAMP_TO_ZERO: GPU_PROCTEX_CLAMP = 0; #[doc = "Clamp to edge."] +#[doc = ""] + pub const GPU_PT_CLAMP_TO_EDGE: GPU_PROCTEX_CLAMP = 1; #[doc = "Symmetrical repeat."] +#[doc = ""] + pub const GPU_PT_REPEAT: GPU_PROCTEX_CLAMP = 2; #[doc = "Mirrored repeat."] +#[doc = ""] + pub const GPU_PT_MIRRORED_REPEAT: GPU_PROCTEX_CLAMP = 3; #[doc = "Pulse."] +#[doc = ""] + pub const GPU_PT_PULSE: GPU_PROCTEX_CLAMP = 4; #[doc = "Procedural texture clamp modes."] +#[doc = ""] + pub type GPU_PROCTEX_CLAMP = ::libc::c_uint; #[doc = "U"] +#[doc = ""] + pub const GPU_PT_U: GPU_PROCTEX_MAPFUNC = 0; #[doc = "U2"] +#[doc = ""] + pub const GPU_PT_U2: GPU_PROCTEX_MAPFUNC = 1; #[doc = "V"] +#[doc = ""] + pub const GPU_PT_V: GPU_PROCTEX_MAPFUNC = 2; #[doc = "V2"] +#[doc = ""] + pub const GPU_PT_V2: GPU_PROCTEX_MAPFUNC = 3; #[doc = "U+V"] +#[doc = ""] + pub const GPU_PT_ADD: GPU_PROCTEX_MAPFUNC = 4; #[doc = "U2+V2"] +#[doc = ""] + pub const GPU_PT_ADD2: GPU_PROCTEX_MAPFUNC = 5; #[doc = "sqrt(U2+V2)"] +#[doc = ""] + pub const GPU_PT_SQRT2: GPU_PROCTEX_MAPFUNC = 6; #[doc = "min"] +#[doc = ""] + pub const GPU_PT_MIN: GPU_PROCTEX_MAPFUNC = 7; #[doc = "max"] +#[doc = ""] + pub const GPU_PT_MAX: GPU_PROCTEX_MAPFUNC = 8; #[doc = "rmax"] +#[doc = ""] + pub const GPU_PT_RMAX: GPU_PROCTEX_MAPFUNC = 9; #[doc = "Procedural texture mapping functions."] +#[doc = ""] + pub type GPU_PROCTEX_MAPFUNC = ::libc::c_uint; #[doc = "No shift."] +#[doc = ""] + pub const GPU_PT_NONE: GPU_PROCTEX_SHIFT = 0; #[doc = "Odd shift."] +#[doc = ""] + pub const GPU_PT_ODD: GPU_PROCTEX_SHIFT = 1; #[doc = "Even shift."] +#[doc = ""] + pub const GPU_PT_EVEN: GPU_PROCTEX_SHIFT = 2; #[doc = "Procedural texture shift values."] +#[doc = ""] + pub type GPU_PROCTEX_SHIFT = ::libc::c_uint; #[doc = "Nearest-neighbor"] +#[doc = ""] + pub const GPU_PT_NEAREST: GPU_PROCTEX_FILTER = 0; #[doc = "Linear interpolation"] +#[doc = ""] + pub const GPU_PT_LINEAR: GPU_PROCTEX_FILTER = 1; #[doc = "Nearest-neighbor with mipmap using nearest-neighbor"] +#[doc = ""] + pub const GPU_PT_NEAREST_MIP_NEAREST: GPU_PROCTEX_FILTER = 2; #[doc = "Linear interpolation with mipmap using nearest-neighbor"] +#[doc = ""] + pub const GPU_PT_LINEAR_MIP_NEAREST: GPU_PROCTEX_FILTER = 3; #[doc = "Nearest-neighbor with mipmap using linear interpolation"] +#[doc = ""] + pub const GPU_PT_NEAREST_MIP_LINEAR: GPU_PROCTEX_FILTER = 4; #[doc = "Linear interpolation with mipmap using linear interpolation"] +#[doc = ""] + pub const GPU_PT_LINEAR_MIP_LINEAR: GPU_PROCTEX_FILTER = 5; #[doc = "Procedural texture filter values."] +#[doc = ""] + pub type GPU_PROCTEX_FILTER = ::libc::c_uint; #[doc = "Noise table"] +#[doc = ""] + pub const GPU_LUT_NOISE: GPU_PROCTEX_LUTID = 0; #[doc = "RGB mapping function table"] +#[doc = ""] + pub const GPU_LUT_RGBMAP: GPU_PROCTEX_LUTID = 2; #[doc = "Alpha mapping function table"] +#[doc = ""] + pub const GPU_LUT_ALPHAMAP: GPU_PROCTEX_LUTID = 3; #[doc = "Color table"] +#[doc = ""] + pub const GPU_LUT_COLOR: GPU_PROCTEX_LUTID = 4; #[doc = "Color difference table"] +#[doc = ""] + pub const GPU_LUT_COLORDIF: GPU_PROCTEX_LUTID = 5; #[doc = "Procedural texture LUT IDs."] +#[doc = ""] + pub type GPU_PROCTEX_LUTID = ::libc::c_uint; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] +#[doc = ""] + pub const GPU_RB_RGBA8: GPU_COLORBUF = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] +#[doc = ""] + pub const GPU_RB_RGB8: GPU_COLORBUF = 1; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] +#[doc = ""] + pub const GPU_RB_RGBA5551: GPU_COLORBUF = 2; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] +#[doc = ""] + pub const GPU_RB_RGB565: GPU_COLORBUF = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] +#[doc = ""] + pub const GPU_RB_RGBA4: GPU_COLORBUF = 4; #[doc = "Supported color buffer formats."] +#[doc = ""] + pub type GPU_COLORBUF = ::libc::c_uint; #[doc = "16-bit Depth"] +#[doc = ""] + pub const GPU_RB_DEPTH16: GPU_DEPTHBUF = 0; #[doc = "24-bit Depth"] +#[doc = ""] + pub const GPU_RB_DEPTH24: GPU_DEPTHBUF = 2; #[doc = "24-bit Depth + 8-bit Stencil"] +#[doc = ""] + pub const GPU_RB_DEPTH24_STENCIL8: GPU_DEPTHBUF = 3; #[doc = "Supported depth buffer formats."] +#[doc = ""] + pub type GPU_DEPTHBUF = ::libc::c_uint; #[doc = "Never pass."] +#[doc = ""] + pub const GPU_NEVER: GPU_TESTFUNC = 0; #[doc = "Always pass."] +#[doc = ""] + pub const GPU_ALWAYS: GPU_TESTFUNC = 1; #[doc = "Pass if equal."] +#[doc = ""] + pub const GPU_EQUAL: GPU_TESTFUNC = 2; #[doc = "Pass if not equal."] +#[doc = ""] + pub const GPU_NOTEQUAL: GPU_TESTFUNC = 3; #[doc = "Pass if less than."] +#[doc = ""] + pub const GPU_LESS: GPU_TESTFUNC = 4; #[doc = "Pass if less than or equal."] +#[doc = ""] + pub const GPU_LEQUAL: GPU_TESTFUNC = 5; #[doc = "Pass if greater than."] +#[doc = ""] + pub const GPU_GREATER: GPU_TESTFUNC = 6; #[doc = "Pass if greater than or equal."] +#[doc = ""] + pub const GPU_GEQUAL: GPU_TESTFUNC = 7; #[doc = "Test functions."] +#[doc = ""] + pub type GPU_TESTFUNC = ::libc::c_uint; #[doc = "Pass if greater than or equal."] +#[doc = ""] + pub const GPU_EARLYDEPTH_GEQUAL: GPU_EARLYDEPTHFUNC = 0; #[doc = "Pass if greater than."] +#[doc = ""] + pub const GPU_EARLYDEPTH_GREATER: GPU_EARLYDEPTHFUNC = 1; #[doc = "Pass if less than or equal."] +#[doc = ""] + pub const GPU_EARLYDEPTH_LEQUAL: GPU_EARLYDEPTHFUNC = 2; #[doc = "Pass if less than."] +#[doc = ""] + pub const GPU_EARLYDEPTH_LESS: GPU_EARLYDEPTHFUNC = 3; #[doc = "Early depth test functions."] +#[doc = ""] + pub type GPU_EARLYDEPTHFUNC = ::libc::c_uint; #[doc = "Never pass (0)."] +#[doc = ""] + pub const GPU_GAS_NEVER: GPU_GASDEPTHFUNC = 0; #[doc = "Always pass (1)."] +#[doc = ""] + pub const GPU_GAS_ALWAYS: GPU_GASDEPTHFUNC = 1; #[doc = "Pass if greater than (1-X)."] +#[doc = ""] + pub const GPU_GAS_GREATER: GPU_GASDEPTHFUNC = 2; #[doc = "Pass if less than (X)."] +#[doc = ""] + pub const GPU_GAS_LESS: GPU_GASDEPTHFUNC = 3; #[doc = "Gas depth functions."] +#[doc = ""] + pub type GPU_GASDEPTHFUNC = ::libc::c_uint; #[doc = "Disable."] +#[doc = ""] + pub const GPU_SCISSOR_DISABLE: GPU_SCISSORMODE = 0; #[doc = "Exclude pixels inside the scissor box."] +#[doc = ""] + pub const GPU_SCISSOR_INVERT: GPU_SCISSORMODE = 1; #[doc = "Exclude pixels outside of the scissor box."] +#[doc = ""] + pub const GPU_SCISSOR_NORMAL: GPU_SCISSORMODE = 3; #[doc = "Scissor test modes."] +#[doc = ""] + pub type GPU_SCISSORMODE = ::libc::c_uint; #[doc = "Keep old value. (old_stencil)"] +#[doc = ""] + pub const GPU_STENCIL_KEEP: GPU_STENCILOP = 0; #[doc = "Zero. (0)"] +#[doc = ""] + pub const GPU_STENCIL_ZERO: GPU_STENCILOP = 1; #[doc = "Replace value. (ref)"] +#[doc = ""] + pub const GPU_STENCIL_REPLACE: GPU_STENCILOP = 2; #[doc = "Increment value. (old_stencil + 1 saturated to [0, 255])"] +#[doc = ""] + pub const GPU_STENCIL_INCR: GPU_STENCILOP = 3; #[doc = "Decrement value. (old_stencil - 1 saturated to [0, 255])"] +#[doc = ""] + pub const GPU_STENCIL_DECR: GPU_STENCILOP = 4; #[doc = "Invert value. (~old_stencil)"] +#[doc = ""] + pub const GPU_STENCIL_INVERT: GPU_STENCILOP = 5; #[doc = "Increment value. (old_stencil + 1)"] +#[doc = ""] + pub const GPU_STENCIL_INCR_WRAP: GPU_STENCILOP = 6; #[doc = "Decrement value. (old_stencil - 1)"] +#[doc = ""] + pub const GPU_STENCIL_DECR_WRAP: GPU_STENCILOP = 7; #[doc = "Stencil operations."] +#[doc = ""] + pub type GPU_STENCILOP = ::libc::c_uint; #[doc = "Write red."] +#[doc = ""] + pub const GPU_WRITE_RED: GPU_WRITEMASK = 1; #[doc = "Write green."] +#[doc = ""] + pub const GPU_WRITE_GREEN: GPU_WRITEMASK = 2; #[doc = "Write blue."] +#[doc = ""] + pub const GPU_WRITE_BLUE: GPU_WRITEMASK = 4; #[doc = "Write alpha."] +#[doc = ""] + pub const GPU_WRITE_ALPHA: GPU_WRITEMASK = 8; #[doc = "Write depth."] +#[doc = ""] + pub const GPU_WRITE_DEPTH: GPU_WRITEMASK = 16; #[doc = "Write all color components."] +#[doc = ""] + pub const GPU_WRITE_COLOR: GPU_WRITEMASK = 15; #[doc = "Write all components."] +#[doc = ""] + pub const GPU_WRITE_ALL: GPU_WRITEMASK = 31; #[doc = "Pixel write mask."] +#[doc = ""] + pub type GPU_WRITEMASK = ::libc::c_uint; #[doc = "Add colors."] +#[doc = ""] + pub const GPU_BLEND_ADD: GPU_BLENDEQUATION = 0; #[doc = "Subtract colors."] +#[doc = ""] + pub const GPU_BLEND_SUBTRACT: GPU_BLENDEQUATION = 1; #[doc = "Reverse-subtract colors."] +#[doc = ""] + pub const GPU_BLEND_REVERSE_SUBTRACT: GPU_BLENDEQUATION = 2; #[doc = "Use the minimum color."] +#[doc = ""] + pub const GPU_BLEND_MIN: GPU_BLENDEQUATION = 3; #[doc = "Use the maximum color."] +#[doc = ""] + pub const GPU_BLEND_MAX: GPU_BLENDEQUATION = 4; #[doc = "Blend modes."] +#[doc = ""] + pub type GPU_BLENDEQUATION = ::libc::c_uint; #[doc = "Zero."] +#[doc = ""] + pub const GPU_ZERO: GPU_BLENDFACTOR = 0; #[doc = "One."] +#[doc = ""] + pub const GPU_ONE: GPU_BLENDFACTOR = 1; #[doc = "Source color."] +#[doc = ""] + pub const GPU_SRC_COLOR: GPU_BLENDFACTOR = 2; #[doc = "Source color - 1."] +#[doc = ""] + pub const GPU_ONE_MINUS_SRC_COLOR: GPU_BLENDFACTOR = 3; #[doc = "Destination color."] +#[doc = ""] + pub const GPU_DST_COLOR: GPU_BLENDFACTOR = 4; #[doc = "Destination color - 1."] +#[doc = ""] + pub const GPU_ONE_MINUS_DST_COLOR: GPU_BLENDFACTOR = 5; #[doc = "Source alpha."] +#[doc = ""] + pub const GPU_SRC_ALPHA: GPU_BLENDFACTOR = 6; #[doc = "Source alpha - 1."] +#[doc = ""] + pub const GPU_ONE_MINUS_SRC_ALPHA: GPU_BLENDFACTOR = 7; #[doc = "Destination alpha."] +#[doc = ""] + pub const GPU_DST_ALPHA: GPU_BLENDFACTOR = 8; #[doc = "Destination alpha - 1."] +#[doc = ""] + pub const GPU_ONE_MINUS_DST_ALPHA: GPU_BLENDFACTOR = 9; #[doc = "Constant color."] +#[doc = ""] + pub const GPU_CONSTANT_COLOR: GPU_BLENDFACTOR = 10; #[doc = "Constant color - 1."] +#[doc = ""] + pub const GPU_ONE_MINUS_CONSTANT_COLOR: GPU_BLENDFACTOR = 11; #[doc = "Constant alpha."] +#[doc = ""] + pub const GPU_CONSTANT_ALPHA: GPU_BLENDFACTOR = 12; #[doc = "Constant alpha - 1."] +#[doc = ""] + pub const GPU_ONE_MINUS_CONSTANT_ALPHA: GPU_BLENDFACTOR = 13; #[doc = "Saturated alpha."] +#[doc = ""] + pub const GPU_SRC_ALPHA_SATURATE: GPU_BLENDFACTOR = 14; #[doc = "Blend factors."] +#[doc = ""] + pub type GPU_BLENDFACTOR = ::libc::c_uint; #[doc = "Clear."] +#[doc = ""] + pub const GPU_LOGICOP_CLEAR: GPU_LOGICOP = 0; #[doc = "Bitwise AND."] +#[doc = ""] + pub const GPU_LOGICOP_AND: GPU_LOGICOP = 1; #[doc = "Reverse bitwise AND."] +#[doc = ""] + pub const GPU_LOGICOP_AND_REVERSE: GPU_LOGICOP = 2; #[doc = "Copy."] +#[doc = ""] + pub const GPU_LOGICOP_COPY: GPU_LOGICOP = 3; #[doc = "Set."] +#[doc = ""] + pub const GPU_LOGICOP_SET: GPU_LOGICOP = 4; #[doc = "Inverted copy."] +#[doc = ""] + pub const GPU_LOGICOP_COPY_INVERTED: GPU_LOGICOP = 5; #[doc = "No operation."] +#[doc = ""] + pub const GPU_LOGICOP_NOOP: GPU_LOGICOP = 6; #[doc = "Invert."] +#[doc = ""] + pub const GPU_LOGICOP_INVERT: GPU_LOGICOP = 7; #[doc = "Bitwise NAND."] +#[doc = ""] + pub const GPU_LOGICOP_NAND: GPU_LOGICOP = 8; #[doc = "Bitwise OR."] +#[doc = ""] + pub const GPU_LOGICOP_OR: GPU_LOGICOP = 9; #[doc = "Bitwise NOR."] +#[doc = ""] + pub const GPU_LOGICOP_NOR: GPU_LOGICOP = 10; #[doc = "Bitwise XOR."] +#[doc = ""] + pub const GPU_LOGICOP_XOR: GPU_LOGICOP = 11; #[doc = "Equivalent."] +#[doc = ""] + pub const GPU_LOGICOP_EQUIV: GPU_LOGICOP = 12; #[doc = "Inverted bitwise AND."] +#[doc = ""] + pub const GPU_LOGICOP_AND_INVERTED: GPU_LOGICOP = 13; #[doc = "Reverse bitwise OR."] +#[doc = ""] + pub const GPU_LOGICOP_OR_REVERSE: GPU_LOGICOP = 14; #[doc = "Inverted bitwize OR."] +#[doc = ""] + pub const GPU_LOGICOP_OR_INVERTED: GPU_LOGICOP = 15; #[doc = "Logical operations."] +#[doc = ""] + pub type GPU_LOGICOP = ::libc::c_uint; #[doc = "OpenGL mode."] +#[doc = ""] + pub const GPU_FRAGOPMODE_GL: GPU_FRAGOPMODE = 0; #[doc = "Gas mode (?)."] +#[doc = ""] + pub const GPU_FRAGOPMODE_GAS_ACC: GPU_FRAGOPMODE = 1; #[doc = "Shadow mode (?)."] +#[doc = ""] + pub const GPU_FRAGOPMODE_SHADOW: GPU_FRAGOPMODE = 3; #[doc = "Fragment operation modes."] +#[doc = ""] + pub type GPU_FRAGOPMODE = ::libc::c_uint; #[doc = "8-bit byte."] +#[doc = ""] + pub const GPU_BYTE: GPU_FORMATS = 0; #[doc = "8-bit unsigned byte."] +#[doc = ""] + pub const GPU_UNSIGNED_BYTE: GPU_FORMATS = 1; #[doc = "16-bit short."] +#[doc = ""] + pub const GPU_SHORT: GPU_FORMATS = 2; #[doc = "32-bit float."] +#[doc = ""] + pub const GPU_FLOAT: GPU_FORMATS = 3; #[doc = "Supported component formats."] +#[doc = ""] + pub type GPU_FORMATS = ::libc::c_uint; #[doc = "Disabled."] +#[doc = ""] + pub const GPU_CULL_NONE: GPU_CULLMODE = 0; #[doc = "Front, counter-clockwise."] +#[doc = ""] + pub const GPU_CULL_FRONT_CCW: GPU_CULLMODE = 1; #[doc = "Back, counter-clockwise."] +#[doc = ""] + pub const GPU_CULL_BACK_CCW: GPU_CULLMODE = 2; #[doc = "Cull modes."] +#[doc = ""] + pub type GPU_CULLMODE = ::libc::c_uint; #[doc = "Primary color."] +#[doc = ""] + pub const GPU_PRIMARY_COLOR: GPU_TEVSRC = 0; #[doc = "Primary fragment color."] +#[doc = ""] + pub const GPU_FRAGMENT_PRIMARY_COLOR: GPU_TEVSRC = 1; #[doc = "Secondary fragment color."] +#[doc = ""] + pub const GPU_FRAGMENT_SECONDARY_COLOR: GPU_TEVSRC = 2; #[doc = "Texture unit 0."] +#[doc = ""] + pub const GPU_TEXTURE0: GPU_TEVSRC = 3; #[doc = "Texture unit 1."] +#[doc = ""] + pub const GPU_TEXTURE1: GPU_TEVSRC = 4; #[doc = "Texture unit 2."] +#[doc = ""] + pub const GPU_TEXTURE2: GPU_TEVSRC = 5; #[doc = "Texture unit 3."] +#[doc = ""] + pub const GPU_TEXTURE3: GPU_TEVSRC = 6; #[doc = "Previous buffer."] +#[doc = ""] + pub const GPU_PREVIOUS_BUFFER: GPU_TEVSRC = 13; #[doc = "Constant value."] +#[doc = ""] + pub const GPU_CONSTANT: GPU_TEVSRC = 14; #[doc = "Previous value."] +#[doc = ""] + pub const GPU_PREVIOUS: GPU_TEVSRC = 15; #[doc = "Texture combiner sources."] +#[doc = ""] + pub type GPU_TEVSRC = ::libc::c_uint; #[doc = "Source color."] +#[doc = ""] + pub const GPU_TEVOP_RGB_SRC_COLOR: GPU_TEVOP_RGB = 0; #[doc = "Source color - 1."] +#[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR: GPU_TEVOP_RGB = 1; #[doc = "Source alpha."] +#[doc = ""] + pub const GPU_TEVOP_RGB_SRC_ALPHA: GPU_TEVOP_RGB = 2; #[doc = "Source alpha - 1."] +#[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_RGB = 3; #[doc = "Source red."] +#[doc = ""] + pub const GPU_TEVOP_RGB_SRC_R: GPU_TEVOP_RGB = 4; #[doc = "Source red - 1."] +#[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_R: GPU_TEVOP_RGB = 5; #[doc = "Unknown."] +#[doc = ""] + pub const GPU_TEVOP_RGB_0x06: GPU_TEVOP_RGB = 6; #[doc = "Unknown."] +#[doc = ""] + pub const GPU_TEVOP_RGB_0x07: GPU_TEVOP_RGB = 7; #[doc = "Source green."] +#[doc = ""] + pub const GPU_TEVOP_RGB_SRC_G: GPU_TEVOP_RGB = 8; #[doc = "Source green - 1."] +#[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_G: GPU_TEVOP_RGB = 9; #[doc = "Unknown."] +#[doc = ""] + pub const GPU_TEVOP_RGB_0x0A: GPU_TEVOP_RGB = 10; #[doc = "Unknown."] +#[doc = ""] + pub const GPU_TEVOP_RGB_0x0B: GPU_TEVOP_RGB = 11; #[doc = "Source blue."] +#[doc = ""] + pub const GPU_TEVOP_RGB_SRC_B: GPU_TEVOP_RGB = 12; #[doc = "Source blue - 1."] +#[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_B: GPU_TEVOP_RGB = 13; #[doc = "Unknown."] +#[doc = ""] + pub const GPU_TEVOP_RGB_0x0E: GPU_TEVOP_RGB = 14; #[doc = "Unknown."] +#[doc = ""] + pub const GPU_TEVOP_RGB_0x0F: GPU_TEVOP_RGB = 15; #[doc = "Texture RGB combiner operands."] +#[doc = ""] + pub type GPU_TEVOP_RGB = ::libc::c_uint; #[doc = "Source alpha."] +#[doc = ""] + pub const GPU_TEVOP_A_SRC_ALPHA: GPU_TEVOP_A = 0; #[doc = "Source alpha - 1."] +#[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_A = 1; #[doc = "Source red."] +#[doc = ""] + pub const GPU_TEVOP_A_SRC_R: GPU_TEVOP_A = 2; #[doc = "Source red - 1."] +#[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_R: GPU_TEVOP_A = 3; #[doc = "Source green."] +#[doc = ""] + pub const GPU_TEVOP_A_SRC_G: GPU_TEVOP_A = 4; #[doc = "Source green - 1."] +#[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_G: GPU_TEVOP_A = 5; #[doc = "Source blue."] +#[doc = ""] + pub const GPU_TEVOP_A_SRC_B: GPU_TEVOP_A = 6; #[doc = "Source blue - 1."] +#[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_B: GPU_TEVOP_A = 7; #[doc = "Texture Alpha combiner operands."] +#[doc = ""] + pub type GPU_TEVOP_A = ::libc::c_uint; #[doc = "Replace."] +#[doc = ""] + pub const GPU_REPLACE: GPU_COMBINEFUNC = 0; #[doc = "Modulate."] +#[doc = ""] + pub const GPU_MODULATE: GPU_COMBINEFUNC = 1; #[doc = "Add."] +#[doc = ""] + pub const GPU_ADD: GPU_COMBINEFUNC = 2; #[doc = "Signed add."] +#[doc = ""] + pub const GPU_ADD_SIGNED: GPU_COMBINEFUNC = 3; #[doc = "Interpolate."] +#[doc = ""] + pub const GPU_INTERPOLATE: GPU_COMBINEFUNC = 4; #[doc = "Subtract."] +#[doc = ""] + pub const GPU_SUBTRACT: GPU_COMBINEFUNC = 5; #[doc = "Dot3. RGB only."] +#[doc = ""] + pub const GPU_DOT3_RGB: GPU_COMBINEFUNC = 6; #[doc = "Multiply then add."] +#[doc = ""] + pub const GPU_MULTIPLY_ADD: GPU_COMBINEFUNC = 8; #[doc = "Add then multiply."] +#[doc = ""] + pub const GPU_ADD_MULTIPLY: GPU_COMBINEFUNC = 9; #[doc = "Texture combiner functions."] +#[doc = ""] + pub type GPU_COMBINEFUNC = ::libc::c_uint; #[doc = "1x"] +#[doc = ""] + pub const GPU_TEVSCALE_1: GPU_TEVSCALE = 0; #[doc = "2x"] +#[doc = ""] + pub const GPU_TEVSCALE_2: GPU_TEVSCALE = 1; #[doc = "4x"] +#[doc = ""] + pub const GPU_TEVSCALE_4: GPU_TEVSCALE = 2; #[doc = "Texture scale factors."] +#[doc = ""] + pub type GPU_TEVSCALE = ::libc::c_uint; #[doc = "None."] +#[doc = ""] + pub const GPU_NO_FRESNEL: GPU_FRESNELSEL = 0; #[doc = "Primary alpha."] +#[doc = ""] + pub const GPU_PRI_ALPHA_FRESNEL: GPU_FRESNELSEL = 1; #[doc = "Secondary alpha."] +#[doc = ""] + pub const GPU_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 2; #[doc = "Primary and secondary alpha."] +#[doc = ""] + pub const GPU_PRI_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 3; #[doc = "Fresnel options."] +#[doc = ""] + pub type GPU_FRESNELSEL = ::libc::c_uint; #[doc = "Disabled."] +#[doc = ""] + pub const GPU_BUMP_NOT_USED: GPU_BUMPMODE = 0; #[doc = "Bump as bump mapping."] +#[doc = ""] + pub const GPU_BUMP_AS_BUMP: GPU_BUMPMODE = 1; #[doc = "Bump as tangent/normal mapping."] +#[doc = ""] + pub const GPU_BUMP_AS_TANG: GPU_BUMPMODE = 2; #[doc = "Bump map modes."] +#[doc = ""] + pub type GPU_BUMPMODE = ::libc::c_uint; #[doc = "D0 LUT."] +#[doc = ""] + pub const GPU_LUT_D0: GPU_LIGHTLUTID = 0; #[doc = "D1 LUT."] +#[doc = ""] + pub const GPU_LUT_D1: GPU_LIGHTLUTID = 1; #[doc = "Spotlight LUT."] +#[doc = ""] + pub const GPU_LUT_SP: GPU_LIGHTLUTID = 2; #[doc = "Fresnel LUT."] +#[doc = ""] + pub const GPU_LUT_FR: GPU_LIGHTLUTID = 3; #[doc = "Reflection-Blue LUT."] +#[doc = ""] + pub const GPU_LUT_RB: GPU_LIGHTLUTID = 4; #[doc = "Reflection-Green LUT."] +#[doc = ""] + pub const GPU_LUT_RG: GPU_LIGHTLUTID = 5; #[doc = "Reflection-Red LUT."] +#[doc = ""] + pub const GPU_LUT_RR: GPU_LIGHTLUTID = 6; #[doc = "Distance attenuation LUT."] +#[doc = ""] + pub const GPU_LUT_DA: GPU_LIGHTLUTID = 7; #[doc = "LUT IDs."] +#[doc = ""] + pub type GPU_LIGHTLUTID = ::libc::c_uint; #[doc = "Normal*HalfVector"] +#[doc = ""] + pub const GPU_LUTINPUT_NH: GPU_LIGHTLUTINPUT = 0; #[doc = "View*HalfVector"] +#[doc = ""] + pub const GPU_LUTINPUT_VH: GPU_LIGHTLUTINPUT = 1; #[doc = "Normal*View"] +#[doc = ""] + pub const GPU_LUTINPUT_NV: GPU_LIGHTLUTINPUT = 2; #[doc = "LightVector*Normal"] +#[doc = ""] + pub const GPU_LUTINPUT_LN: GPU_LIGHTLUTINPUT = 3; #[doc = "-LightVector*SpotlightVector"] +#[doc = ""] + pub const GPU_LUTINPUT_SP: GPU_LIGHTLUTINPUT = 4; #[doc = "cosine of phi"] +#[doc = ""] + pub const GPU_LUTINPUT_CP: GPU_LIGHTLUTINPUT = 5; #[doc = "LUT inputs."] +#[doc = ""] + pub type GPU_LIGHTLUTINPUT = ::libc::c_uint; #[doc = "1x scale."] +#[doc = ""] + pub const GPU_LUTSCALER_1x: GPU_LIGHTLUTSCALER = 0; #[doc = "2x scale."] +#[doc = ""] + pub const GPU_LUTSCALER_2x: GPU_LIGHTLUTSCALER = 1; #[doc = "4x scale."] +#[doc = ""] + pub const GPU_LUTSCALER_4x: GPU_LIGHTLUTSCALER = 2; #[doc = "8x scale."] +#[doc = ""] + pub const GPU_LUTSCALER_8x: GPU_LIGHTLUTSCALER = 3; #[doc = "0.25x scale."] +#[doc = ""] + pub const GPU_LUTSCALER_0_25x: GPU_LIGHTLUTSCALER = 6; #[doc = "0.5x scale."] +#[doc = ""] + pub const GPU_LUTSCALER_0_5x: GPU_LIGHTLUTSCALER = 7; #[doc = "LUT scalers."] +#[doc = ""] + pub type GPU_LIGHTLUTSCALER = ::libc::c_uint; #[doc = "LUTs that are common to all lights."] +#[doc = ""] + pub const GPU_LUTSELECT_COMMON: GPU_LIGHTLUTSELECT = 0; #[doc = "Spotlight LUT."] +#[doc = ""] + pub const GPU_LUTSELECT_SP: GPU_LIGHTLUTSELECT = 1; #[doc = "Distance attenuation LUT."] +#[doc = ""] + pub const GPU_LUTSELECT_DA: GPU_LIGHTLUTSELECT = 2; #[doc = "LUT selection."] +#[doc = ""] + pub type GPU_LIGHTLUTSELECT = ::libc::c_uint; #[doc = "Fog/Gas unit disabled."] +#[doc = ""] + pub const GPU_NO_FOG: GPU_FOGMODE = 0; #[doc = "Fog/Gas unit configured in Fog mode."] +#[doc = ""] + pub const GPU_FOG: GPU_FOGMODE = 5; #[doc = "Fog/Gas unit configured in Gas mode."] +#[doc = ""] + pub const GPU_GAS: GPU_FOGMODE = 7; #[doc = "Fog modes."] +#[doc = ""] + pub type GPU_FOGMODE = ::libc::c_uint; #[doc = "Plain density."] +#[doc = ""] + pub const GPU_PLAIN_DENSITY: GPU_GASMODE = 0; #[doc = "Depth density."] +#[doc = ""] + pub const GPU_DEPTH_DENSITY: GPU_GASMODE = 1; #[doc = "Gas shading density source values."] +#[doc = ""] + pub type GPU_GASMODE = ::libc::c_uint; #[doc = "Gas density used as input."] +#[doc = ""] + pub const GPU_GAS_DENSITY: GPU_GASLUTINPUT = 0; #[doc = "Light factor used as input."] +#[doc = ""] + pub const GPU_GAS_LIGHT_FACTOR: GPU_GASLUTINPUT = 1; #[doc = "Gas color LUT inputs."] +#[doc = ""] + pub type GPU_GASLUTINPUT = ::libc::c_uint; #[doc = "Triangles."] +#[doc = ""] + pub const GPU_TRIANGLES: GPU_Primitive_t = 0; #[doc = "Triangle strip."] +#[doc = ""] + pub const GPU_TRIANGLE_STRIP: GPU_Primitive_t = 256; #[doc = "Triangle fan."] +#[doc = ""] + pub const GPU_TRIANGLE_FAN: GPU_Primitive_t = 512; #[doc = "Geometry shader primitive."] +#[doc = ""] + pub const GPU_GEOMETRY_PRIM: GPU_Primitive_t = 768; #[doc = "Supported primitives."] +#[doc = ""] + pub type GPU_Primitive_t = ::libc::c_uint; #[doc = "Vertex shader."] +#[doc = ""] + pub const GPU_VERTEX_SHADER: GPU_SHADER_TYPE = 0; #[doc = "Geometry shader."] +#[doc = ""] + pub const GPU_GEOMETRY_SHADER: GPU_SHADER_TYPE = 1; #[doc = "Shader types."] +#[doc = ""] + pub type GPU_SHADER_TYPE = ::libc::c_uint; extern "C" { - #[doc = "GPU command buffer."] +#[doc = "GPU command buffer."] +#[doc = ""] + pub static mut gpuCmdBuf: *mut u32_; } extern "C" { - #[doc = "GPU command buffer size."] +#[doc = "GPU command buffer size."] +#[doc = ""] + pub static mut gpuCmdBufSize: u32_; } extern "C" { - #[doc = "GPU command buffer offset."] +#[doc = "GPU command buffer offset."] +#[doc = ""] + pub static mut gpuCmdBufOffset: u32_; } extern "C" { - #[doc = "Adds raw GPU commands to the current command buffer."] - #[doc = "* cmd Buffer containing commands to add."] - #[doc = "* size Size of the buffer."] +#[doc = "Adds raw GPU commands to the current command buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `cmd` - Buffer containing commands to add."] +#[doc = "* `size` - Size of the buffer."] + pub fn GPUCMD_AddRawCommands(cmd: *const u32_, size: u32_); } extern "C" { - #[doc = "Adds a GPU command to the current command buffer."] - #[doc = "* header Header of the command."] - #[doc = "* param Parameters of the command."] - #[doc = "* paramlength Size of the parameter buffer."] +#[doc = "Adds a GPU command to the current command buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `header` - Header of the command."] +#[doc = "* `param` - Parameters of the command."] +#[doc = "* `paramlength` - Size of the parameter buffer."] + pub fn GPUCMD_Add(header: u32_, param: *const u32_, paramlength: u32_); } extern "C" { - #[doc = "Splits the current GPU command buffer."] - #[doc = "* addr Pointer to output the command buffer to."] - #[doc = "* size Pointer to output the size (in words) of the command buffer to."] +#[doc = "Splits the current GPU command buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `addr` - Pointer to output the command buffer to."] +#[doc = "* `size` - Pointer to output the size (in words) of the command buffer to."] + pub fn GPUCMD_Split(addr: *mut *mut u32_, size: *mut u32_); } extern "C" { - #[doc = "Converts a 32-bit float to a 16-bit float."] - #[doc = "* f Float to convert."] - #[doc = "The converted float."] +#[doc = "Converts a 32-bit float to a 16-bit float."] +#[doc = ""] +#[doc = "Returns: The converted float."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `f` - Float to convert."] + pub fn f32tof16(f: f32) -> u32_; } extern "C" { - #[doc = "Converts a 32-bit float to a 20-bit float."] - #[doc = "* f Float to convert."] - #[doc = "The converted float."] +#[doc = "Converts a 32-bit float to a 20-bit float."] +#[doc = ""] +#[doc = "Returns: The converted float."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `f` - Float to convert."] + pub fn f32tof20(f: f32) -> u32_; } extern "C" { - #[doc = "Converts a 32-bit float to a 24-bit float."] - #[doc = "* f Float to convert."] - #[doc = "The converted float."] +#[doc = "Converts a 32-bit float to a 24-bit float."] +#[doc = ""] +#[doc = "Returns: The converted float."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `f` - Float to convert."] + pub fn f32tof24(f: f32) -> u32_; } extern "C" { - #[doc = "Converts a 32-bit float to a 31-bit float."] - #[doc = "* f Float to convert."] - #[doc = "The converted float."] +#[doc = "Converts a 32-bit float to a 31-bit float."] +#[doc = ""] +#[doc = "Returns: The converted float."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `f` - Float to convert."] + pub fn f32tof31(f: f32) -> u32_; } #[doc = "Vertex shader."] +#[doc = ""] + pub const VERTEX_SHDR: DVLE_type = 0; #[doc = "Geometry shader."] +#[doc = ""] + pub const GEOMETRY_SHDR: DVLE_type = 1; #[doc = "DVLE type."] +#[doc = ""] + pub type DVLE_type = ::libc::c_uint; #[doc = "Bool."] +#[doc = ""] + pub const DVLE_CONST_BOOL: DVLE_constantType = 0; #[doc = "Unsigned 8-bit integer."] +#[doc = ""] + pub const DVLE_CONST_u8: DVLE_constantType = 1; #[doc = "24-bit float."] +#[doc = ""] + pub const DVLE_CONST_FLOAT24: DVLE_constantType = 2; #[doc = "Constant type."] +#[doc = ""] + pub type DVLE_constantType = ::libc::c_uint; #[doc = "Position."] +#[doc = ""] + pub const RESULT_POSITION: DVLE_outputAttribute_t = 0; #[doc = "Normal Quaternion."] +#[doc = ""] + pub const RESULT_NORMALQUAT: DVLE_outputAttribute_t = 1; #[doc = "Color."] +#[doc = ""] + pub const RESULT_COLOR: DVLE_outputAttribute_t = 2; #[doc = "Texture coordinate 0."] +#[doc = ""] + pub const RESULT_TEXCOORD0: DVLE_outputAttribute_t = 3; #[doc = "Texture coordinate 0 W."] +#[doc = ""] + pub const RESULT_TEXCOORD0W: DVLE_outputAttribute_t = 4; #[doc = "Texture coordinate 1."] +#[doc = ""] + pub const RESULT_TEXCOORD1: DVLE_outputAttribute_t = 5; #[doc = "Texture coordinate 2."] +#[doc = ""] + pub const RESULT_TEXCOORD2: DVLE_outputAttribute_t = 6; #[doc = "View."] +#[doc = ""] + pub const RESULT_VIEW: DVLE_outputAttribute_t = 8; #[doc = "Dummy attribute (used as passthrough for geometry shader input)."] +#[doc = ""] + pub const RESULT_DUMMY: DVLE_outputAttribute_t = 9; #[doc = "Output attribute."] +#[doc = ""] + pub type DVLE_outputAttribute_t = ::libc::c_uint; #[doc = "Point processing mode."] +#[doc = ""] + pub const GSH_POINT: DVLE_geoShaderMode = 0; #[doc = "Variable-size primitive processing mode."] +#[doc = ""] + pub const GSH_VARIABLE_PRIM: DVLE_geoShaderMode = 1; #[doc = "Fixed-size primitive processing mode."] +#[doc = ""] + pub const GSH_FIXED_PRIM: DVLE_geoShaderMode = 2; #[doc = "Geometry shader operation modes."] +#[doc = ""] + pub type DVLE_geoShaderMode = ::libc::c_uint; #[doc = "DVLP data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLP_s { - #[doc = "Code size."] +#[doc = "Code size."] +#[doc = ""] + pub codeSize: u32_, - #[doc = "Code data."] +#[doc = "Code data."] +#[doc = ""] + pub codeData: *mut u32_, - #[doc = "Operand description size."] +#[doc = "Operand description size."] +#[doc = ""] + pub opdescSize: u32_, - #[doc = "Operand description data."] +#[doc = "Operand description data."] +#[doc = ""] + pub opcdescData: *mut u32_, } impl Default for DVLP_s { @@ -19355,83 +27379,151 @@ impl Default for DVLP_s { } } #[doc = "DVLE constant entry data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_constEntry_s { - #[doc = "Constant type. See DVLE_constantType"] +#[doc = "Constant type. See @ref DVLE_constantType"] +#[doc = ""] + pub type_: u16_, - #[doc = "Constant ID."] +#[doc = "Constant ID."] +#[doc = ""] + pub id: u16_, - #[doc = "Constant data."] +#[doc = "Constant data."] +#[doc = ""] + pub data: [u32_; 4usize], } #[doc = "DVLE output entry data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_outEntry_s { - #[doc = "Output type. See DVLE_outputAttribute_t"] +#[doc = "Output type. See @ref DVLE_outputAttribute_t"] +#[doc = ""] + pub type_: u16_, - #[doc = "Output register ID."] +#[doc = "Output register ID."] +#[doc = ""] + pub regID: u16_, - #[doc = "Output mask."] +#[doc = "Output mask."] +#[doc = ""] + pub mask: u8_, - #[doc = "Unknown."] +#[doc = "Unknown."] +#[doc = ""] + pub unk: [u8_; 3usize], } #[doc = "DVLE uniform entry data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_uniformEntry_s { - #[doc = "Symbol offset."] +#[doc = "Symbol offset."] +#[doc = ""] + pub symbolOffset: u32_, - #[doc = "Start register."] +#[doc = "Start register."] +#[doc = ""] + pub startReg: u16_, - #[doc = "End register."] +#[doc = "End register."] +#[doc = ""] + pub endReg: u16_, } #[doc = "DVLE data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLE_s { - #[doc = "DVLE type."] +#[doc = "DVLE type."] +#[doc = ""] + pub type_: DVLE_type, - #[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] +#[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] +#[doc = ""] + pub mergeOutmaps: bool, - #[doc = "Geometry shader operation mode."] +#[doc = "Geometry shader operation mode."] +#[doc = ""] + pub gshMode: DVLE_geoShaderMode, - #[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] +#[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] +#[doc = ""] + pub gshFixedVtxStart: u8_, - #[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] +#[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] +#[doc = ""] + pub gshVariableVtxNum: u8_, - #[doc = "Number of vertices in the fixed-size primitive vertex array."] +#[doc = "Number of vertices in the fixed-size primitive vertex array."] +#[doc = ""] + pub gshFixedVtxNum: u8_, - #[doc = "Contained DVLPs."] +#[doc = "Contained DVLPs."] +#[doc = ""] + pub dvlp: *mut DVLP_s, - #[doc = "Offset of the start of the main function."] +#[doc = "Offset of the start of the main function."] +#[doc = ""] + pub mainOffset: u32_, - #[doc = "Offset of the end of the main function."] +#[doc = "Offset of the end of the main function."] +#[doc = ""] + pub endmainOffset: u32_, - #[doc = "Constant table size."] +#[doc = "Constant table size."] +#[doc = ""] + pub constTableSize: u32_, - #[doc = "Constant table data."] +#[doc = "Constant table data."] +#[doc = ""] + pub constTableData: *mut DVLE_constEntry_s, - #[doc = "Output table size."] +#[doc = "Output table size."] +#[doc = ""] + pub outTableSize: u32_, - #[doc = "Output table data."] +#[doc = "Output table data."] +#[doc = ""] + pub outTableData: *mut DVLE_outEntry_s, - #[doc = "Uniform table size."] +#[doc = "Uniform table size."] +#[doc = ""] + pub uniformTableSize: u32_, - #[doc = "Uniform table data."] +#[doc = "Uniform table data."] +#[doc = ""] + pub uniformTableData: *mut DVLE_uniformEntry_s, - #[doc = "Symbol table data."] +#[doc = "Symbol table data."] +#[doc = ""] + pub symbolTableData: *mut ::libc::c_char, - #[doc = "Output map mask."] +#[doc = "Output map mask."] +#[doc = ""] + pub outmapMask: u8_, - #[doc = "Output map data."] +#[doc = "Output map data."] +#[doc = ""] + pub outmapData: [u32_; 8usize], - #[doc = "Output map mode."] +#[doc = "Output map mode."] +#[doc = ""] + pub outmapMode: u32_, - #[doc = "Output map attribute clock."] +#[doc = "Output map attribute clock."] +#[doc = ""] + pub outmapClock: u32_, } impl Default for DVLE_s { @@ -19444,14 +27536,22 @@ impl Default for DVLE_s { } } #[doc = "DVLB data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLB_s { - #[doc = "DVLE count."] +#[doc = "DVLE count."] +#[doc = ""] + pub numDVLE: u32_, - #[doc = "Primary DVLP."] +#[doc = "Primary DVLP."] +#[doc = ""] + pub DVLP: DVLP_s, - #[doc = "Contained DVLE."] +#[doc = "Contained DVLE."] +#[doc = ""] + pub DVLE: *mut DVLE_s, } impl Default for DVLB_s { @@ -19464,55 +27564,95 @@ impl Default for DVLB_s { } } extern "C" { - #[doc = "Parses a shader binary."] - #[doc = "* shbinData Shader binary data."] - #[doc = "* shbinSize Shader binary size."] - #[doc = "The parsed shader binary."] +#[doc = "Parses a shader binary."] +#[doc = ""] +#[doc = "Returns: The parsed shader binary."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `shbinData` - Shader binary data."] +#[doc = "* `shbinSize` - Shader binary size."] + pub fn DVLB_ParseFile(shbinData: *mut u32_, shbinSize: u32_) -> *mut DVLB_s; } extern "C" { - #[doc = "Frees shader binary data."] - #[doc = "* dvlb DVLB to free."] +#[doc = "Frees shader binary data."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dvlb` - DVLB to free."] + pub fn DVLB_Free(dvlb: *mut DVLB_s); } extern "C" { - #[doc = "Gets a uniform register index from a shader."] - #[doc = "* dvle Shader to get the register from."] - #[doc = "* name Name of the register."] - #[doc = "The uniform register index."] +#[doc = "Gets a uniform register index from a shader."] +#[doc = ""] +#[doc = "Returns: The uniform register index."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dvle` - Shader to get the register from."] +#[doc = "* `name` - Name of the register."] + pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const ::libc::c_char) -> s8; } extern "C" { - #[doc = "Generates a shader output map."] - #[doc = "* dvle Shader to generate an output map for."] +#[doc = "Generates a shader output map."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `dvle` - Shader to generate an output map for."] + pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s); } #[doc = "24-bit float uniforms."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct float24Uniform_s { - #[doc = "Uniform ID."] +#[doc = "Uniform ID."] +#[doc = ""] + pub id: u32_, - #[doc = "Uniform data."] +#[doc = "Uniform data."] +#[doc = ""] + pub data: [u32_; 3usize], } #[doc = "Describes an instance of either a vertex or geometry shader."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderInstance_s { - #[doc = "Shader DVLE."] +#[doc = "Shader DVLE."] +#[doc = ""] + pub dvle: *mut DVLE_s, - #[doc = "Boolean uniforms."] +#[doc = "Boolean uniforms."] +#[doc = ""] + pub boolUniforms: u16_, - #[doc = "Used boolean uniform mask."] +#[doc = "Used boolean uniform mask."] +#[doc = ""] + pub boolUniformMask: u16_, - #[doc = "Integer uniforms."] +#[doc = "Integer uniforms."] +#[doc = ""] + pub intUniforms: [u32_; 4usize], - #[doc = "24-bit float uniforms."] +#[doc = "24-bit float uniforms."] +#[doc = ""] + pub float24Uniforms: *mut float24Uniform_s, - #[doc = "Used integer uniform mask."] +#[doc = "Used integer uniform mask."] +#[doc = ""] + pub intUniformMask: u8_, - #[doc = "Float uniform count."] +#[doc = "Float uniform count."] +#[doc = ""] + pub numFloat24Uniforms: u8_, } impl Default for shaderInstance_s { @@ -19525,16 +27665,26 @@ impl Default for shaderInstance_s { } } #[doc = "Describes an instance of a full shader program."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderProgram_s { - #[doc = "Vertex shader."] +#[doc = "Vertex shader."] +#[doc = ""] + pub vertexShader: *mut shaderInstance_s, - #[doc = "Geometry shader."] +#[doc = "Geometry shader."] +#[doc = ""] + pub geometryShader: *mut shaderInstance_s, - #[doc = "Geometry shader input permutation."] +#[doc = "Geometry shader input permutation."] +#[doc = ""] + pub geoShaderInputPermutation: [u32_; 2usize], - #[doc = "Geometry shader input stride."] +#[doc = "Geometry shader input stride."] +#[doc = ""] + pub geoShaderInputStride: u8_, } impl Default for shaderProgram_s { @@ -19548,23 +27698,35 @@ impl Default for shaderProgram_s { } extern "C" { #[must_use] - #[doc = "Initializes a shader instance."] - #[doc = "* si Shader instance to initialize."] - #[doc = "* dvle DVLE to initialize the shader instance with."] +#[doc = "Initializes a shader instance."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `si` - Shader instance to initialize."] +#[doc = "* `dvle` - DVLE to initialize the shader instance with."] + pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] - #[doc = "Frees a shader instance."] - #[doc = "* si Shader instance to free."] +#[doc = "Frees a shader instance."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `si` - Shader instance to free."] + pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a bool uniform of a shader."] - #[doc = "* si Shader instance to use."] - #[doc = "* id ID of the bool uniform."] - #[doc = "* value Value to set."] +#[doc = "Sets a bool uniform of a shader."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `si` - Shader instance to use."] +#[doc = "* `id` - ID of the bool uniform."] +#[doc = "* `value` - Value to set."] + pub fn shaderInstanceSetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -19573,10 +27735,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a bool uniform of a shader."] - #[doc = "* si Shader instance to use."] - #[doc = "* id ID of the bool uniform."] - #[doc = "* value Pointer to output the value to."] +#[doc = "Gets a bool uniform of a shader."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `si` - Shader instance to use."] +#[doc = "* `id` - ID of the bool uniform."] +#[doc = "* `value` - Pointer to output the value to."] + pub fn shaderInstanceGetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -19584,9 +27750,13 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Gets the location of a shader's uniform."] - #[doc = "* si Shader instance to use."] - #[doc = "* name Name of the uniform."] +#[doc = "Gets the location of a shader's uniform."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `si` - Shader instance to use."] +#[doc = "* `name` - Name of the uniform."] + pub fn shaderInstanceGetUniformLocation( si: *mut shaderInstance_s, name: *const ::libc::c_char, @@ -19594,36 +27764,56 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes a shader program."] - #[doc = "* sp Shader program to initialize."] +#[doc = "Initializes a shader program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sp` - Shader program to initialize."] + pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] - #[doc = "Frees a shader program."] - #[doc = "* sp Shader program to free."] +#[doc = "Frees a shader program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sp` - Shader program to free."] + pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the vertex shader of a shader program."] - #[doc = "* sp Shader program to use."] - #[doc = "* dvle Vertex shader to set."] +#[doc = "Sets the vertex shader of a shader program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sp` - Shader program to use."] +#[doc = "* `dvle` - Vertex shader to set."] + pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the geometry shader of a shader program."] - #[doc = "* sp Shader program to use."] - #[doc = "* dvle Geometry shader to set."] - #[doc = "* stride Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] +#[doc = "Sets the geometry shader of a shader program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sp` - Shader program to use."] +#[doc = "* `dvle` - Geometry shader to set."] +#[doc = "* `stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] + pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] - #[doc = "* sp Shader program to use."] - #[doc = "* permutation Attribute permutation to use."] +#[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sp` - Shader program to use."] +#[doc = "* `permutation` - Attribute permutation to use."] + pub fn shaderProgramSetGshInputPermutation( sp: *mut shaderProgram_s, permutation: u64_, @@ -19631,10 +27821,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the shader units to use the specified shader program."] - #[doc = "* sp Shader program to use."] - #[doc = "* sendVshCode When true, the vertex shader's code and operand descriptors are uploaded."] - #[doc = "* sendGshCode When true, the geometry shader's code and operand descriptors are uploaded."] +#[doc = "Configures the shader units to use the specified shader program."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sp` - Shader program to use."] +#[doc = "* `sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] +#[doc = "* `sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] + pub fn shaderProgramConfigure( sp: *mut shaderProgram_s, sendVshCode: bool, @@ -19643,85 +27837,149 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] - #[doc = "* sp Shader program to use."] +#[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `sp` - Shader program to use."] + pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result; } #[doc = "Mono sound"] +#[doc = ""] + pub const NDSP_OUTPUT_MONO: ndspOutputMode = 0; #[doc = "Stereo sound"] +#[doc = ""] + pub const NDSP_OUTPUT_STEREO: ndspOutputMode = 1; #[doc = "3D Surround sound"] +#[doc = ""] + pub const NDSP_OUTPUT_SURROUND: ndspOutputMode = 2; -#[doc = "@name Data types"] -#[doc = "@{"] #[doc = "Sound output modes."] +#[doc = ""] + pub type ndspOutputMode = ::libc::c_uint; #[doc = "\"Normal\" clipping mode (?)"] +#[doc = ""] + pub const NDSP_CLIP_NORMAL: ndspClippingMode = 0; #[doc = "\"Soft\" clipping mode (?)"] +#[doc = ""] + pub const NDSP_CLIP_SOFT: ndspClippingMode = 1; pub type ndspClippingMode = ::libc::c_uint; #[doc = "; #[doc = "Auxiliary output callback function. (data = User provided data, nsamples = Number of samples, samples = Sample data)"] +#[doc = ""] + pub type ndspAuxCallback = ::core::option::Option< unsafe extern "C" fn( data: *mut ::libc::c_void, @@ -19753,15 +28015,15 @@ pub type ndspAuxCallback = ::core::option::Option< ), >; extern "C" { - #[doc = "@name Initialization and basic operations"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Sets up the DSP component."] - #[doc = "* * binary DSP binary to load."] - #[doc = "* * size Size of the DSP binary."] - #[doc = "* * progMask Program RAM block mask to load the binary to."] - #[doc = "* * dataMask Data RAM block mask to load the binary to."] - #[doc = "*/"] +#[doc = "Sets up the DSP component."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `binary` - DSP binary to load."] +#[doc = "* `size` - Size of the DSP binary."] +#[doc = "* `progMask` - Program RAM block mask to load the binary to."] +#[doc = "* `dataMask` - Data RAM block mask to load the binary to."] + pub fn ndspUseComponent( binary: *const ::libc::c_void, size: u32_, @@ -19771,104 +28033,154 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes NDSP."] +#[doc = "Initializes NDSP."] +#[doc = ""] + pub fn ndspInit() -> Result; } extern "C" { - #[doc = "Exits NDSP."] +#[doc = "Exits NDSP."] +#[doc = ""] + pub fn ndspExit(); } extern "C" { - #[doc = "Gets the number of dropped sound frames."] - #[doc = "The number of dropped sound frames."] +#[doc = "Gets the number of dropped sound frames."] +#[doc = ""] +#[doc = "Returns: The number of dropped sound frames."] +#[doc = ""] + pub fn ndspGetDroppedFrames() -> u32_; } extern "C" { - #[doc = "Gets the total sound frame count."] - #[doc = "The total sound frame count."] +#[doc = "Gets the total sound frame count."] +#[doc = ""] +#[doc = "Returns: The total sound frame count."] +#[doc = ""] + pub fn ndspGetFrameCount() -> u32_; } extern "C" { - #[doc = "@name General parameters"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Sets the master volume."] - #[doc = "* * volume Volume to set. Defaults to 1.0f."] - #[doc = "*/"] +#[doc = "Sets the master volume."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `volume` - Volume to set. Defaults to 1.0f."] + pub fn ndspSetMasterVol(volume: f32); } extern "C" { - #[doc = "Sets the output mode."] - #[doc = "* mode Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] +#[doc = "Sets the output mode."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] + pub fn ndspSetOutputMode(mode: ndspOutputMode); } extern "C" { - #[doc = "Sets the clipping mode."] - #[doc = "* mode Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] +#[doc = "Sets the clipping mode."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] + pub fn ndspSetClippingMode(mode: ndspClippingMode); } extern "C" { - #[doc = "Sets the output count."] - #[doc = "* count Output count to set. Defaults to 2."] +#[doc = "Sets the output count."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `count` - Output count to set. Defaults to 2."] + pub fn ndspSetOutputCount(count: ::libc::c_int); } extern "C" { - #[doc = "Sets the wave buffer to capture audio to."] - #[doc = "* capture Wave buffer to capture to."] +#[doc = "Sets the wave buffer to capture audio to."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `capture` - Wave buffer to capture to."] + pub fn ndspSetCapture(capture: *mut ndspWaveBuf); } extern "C" { - #[doc = "Sets the sound frame callback."] - #[doc = "* callback Callback to set."] - #[doc = "* data User-defined data to pass to the callback."] +#[doc = "Sets the sound frame callback."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `callback` - Callback to set."] +#[doc = "* `data` - User-defined data to pass to the callback."] + pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void); } extern "C" { - #[doc = "@name Surround"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Sets the surround sound depth."] - #[doc = "* * depth Depth to set. Defaults to 0x7FFF."] - #[doc = "*/"] +#[doc = "Sets the surround sound depth."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `depth` - Depth to set. Defaults to 0x7FFF."] + pub fn ndspSurroundSetDepth(depth: u16_); } extern "C" { - #[doc = "Sets the surround sound position."] - #[doc = "* pos Position to set. Defaults to NDSP_SPKPOS_SQUARE."] +#[doc = "Sets the surround sound position."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] + pub fn ndspSurroundSetPos(pos: ndspSpeakerPos); } extern "C" { - #[doc = "Sets the surround sound rear ratio."] - #[doc = "* ratio Rear ratio to set. Defaults to 0x8000."] +#[doc = "Sets the surround sound rear ratio."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `ratio` - Rear ratio to set. Defaults to 0x8000."] + pub fn ndspSurroundSetRearRatio(ratio: u16_); } extern "C" { - #[doc = "@name Auxiliary output"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Configures whether an auxiliary output is enabled."] - #[doc = "* * id ID of the auxiliary output."] - #[doc = "* * enable Whether to enable the auxiliary output."] - #[doc = "*/"] +#[doc = "Configures whether an auxiliary output is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the auxiliary output."] +#[doc = "* `enable` - Whether to enable the auxiliary output."] + pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - #[doc = "Configures whether an auxiliary output should use front bypass."] - #[doc = "* id ID of the auxiliary output."] - #[doc = "* bypass Whether to use front bypass."] +#[doc = "Configures whether an auxiliary output should use front bypass."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the auxiliary output."] +#[doc = "* `bypass` - Whether to use front bypass."] + pub fn ndspAuxSetFrontBypass(id: ::libc::c_int, bypass: bool); } extern "C" { - #[doc = "Sets the volume of an auxiliary output."] - #[doc = "* id ID of the auxiliary output."] - #[doc = "* volume Volume to set."] +#[doc = "Sets the volume of an auxiliary output."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the auxiliary output."] +#[doc = "* `volume` - Volume to set."] + pub fn ndspAuxSetVolume(id: ::libc::c_int, volume: f32); } extern "C" { - #[doc = "Sets the callback of an auxiliary output."] - #[doc = "* id ID of the auxiliary output."] - #[doc = "* callback Callback to set."] - #[doc = "* data User-defined data to pass to the callback."] +#[doc = "Sets the callback of an auxiliary output."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the auxiliary output."] +#[doc = "* `callback` - Callback to set."] +#[doc = "* `data` - User-defined data to pass to the callback."] + pub fn ndspAuxSetCallback( id: ::libc::c_int, callback: ndspAuxCallback, @@ -19876,159 +28188,247 @@ extern "C" { ); } #[doc = "PCM8"] +#[doc = ""] + pub const NDSP_ENCODING_PCM8: _bindgen_ty_30 = 0; #[doc = "PCM16"] +#[doc = ""] + pub const NDSP_ENCODING_PCM16: _bindgen_ty_30 = 1; #[doc = "DSPADPCM (GameCube format)"] +#[doc = ""] + pub const NDSP_ENCODING_ADPCM: _bindgen_ty_30 = 2; -#[doc = "@name Data types"] -#[doc = "@{"] #[doc = "Supported sample encodings."] +#[doc = ""] + pub type _bindgen_ty_30 = ::libc::c_uint; #[doc = "Buffer contains Mono PCM8."] +#[doc = ""] + pub const NDSP_FORMAT_MONO_PCM8: _bindgen_ty_31 = 1; #[doc = "Buffer contains Mono PCM16."] +#[doc = ""] + pub const NDSP_FORMAT_MONO_PCM16: _bindgen_ty_31 = 5; #[doc = "Buffer contains Mono ADPCM."] +#[doc = ""] + pub const NDSP_FORMAT_MONO_ADPCM: _bindgen_ty_31 = 9; #[doc = "Buffer contains Stereo PCM8."] +#[doc = ""] + pub const NDSP_FORMAT_STEREO_PCM8: _bindgen_ty_31 = 2; #[doc = "Buffer contains Stereo PCM16."] +#[doc = ""] + pub const NDSP_FORMAT_STEREO_PCM16: _bindgen_ty_31 = 6; #[doc = "(Alias) Buffer contains Mono PCM8."] +#[doc = ""] + pub const NDSP_FORMAT_PCM8: _bindgen_ty_31 = 1; #[doc = "(Alias) Buffer contains Mono PCM16."] +#[doc = ""] + pub const NDSP_FORMAT_PCM16: _bindgen_ty_31 = 5; #[doc = "(Alias) Buffer contains Mono ADPCM."] +#[doc = ""] + pub const NDSP_FORMAT_ADPCM: _bindgen_ty_31 = 9; #[doc = "Front bypass."] +#[doc = ""] + pub const NDSP_FRONT_BYPASS: _bindgen_ty_31 = 16; #[doc = "(?) Unknown, under research"] +#[doc = ""] + pub const NDSP_3D_SURROUND_PREPROCESSED: _bindgen_ty_31 = 64; #[doc = "Channel format flags for use with ndspChnSetFormat."] +#[doc = ""] + pub type _bindgen_ty_31 = ::libc::c_uint; #[doc = "Polyphase interpolation"] +#[doc = ""] + pub const NDSP_INTERP_POLYPHASE: ndspInterpType = 0; #[doc = "Linear interpolation"] +#[doc = ""] + pub const NDSP_INTERP_LINEAR: ndspInterpType = 1; #[doc = "No interpolation"] +#[doc = ""] + pub const NDSP_INTERP_NONE: ndspInterpType = 2; #[doc = "Interpolation types."] +#[doc = ""] + pub type ndspInterpType = ::libc::c_uint; extern "C" { - #[doc = "@name Basic channel operation"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Resets a channel."] - #[doc = "* * id ID of the channel (0..23)."] - #[doc = "*/"] +#[doc = "Resets a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnReset(id: ::libc::c_int); } extern "C" { - #[doc = "Initializes the parameters of a channel."] - #[doc = "* id ID of the channel (0..23)."] +#[doc = "Initializes the parameters of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnInitParams(id: ::libc::c_int); } extern "C" { - #[doc = "Checks whether a channel is currently playing."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "Whether the channel is currently playing."] +#[doc = "Checks whether a channel is currently playing."] +#[doc = ""] +#[doc = "Returns: Whether the channel is currently playing."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool; } extern "C" { - #[doc = "Gets the current sample position of a channel."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "The channel's sample position."] +#[doc = "Gets the current sample position of a channel."] +#[doc = ""] +#[doc = "Returns: The channel's sample position."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32_; } extern "C" { - #[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "The sequence ID of the wave buffer."] +#[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] +#[doc = ""] +#[doc = "Returns: The sequence ID of the wave buffer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16_; } extern "C" { - #[doc = "Checks whether a channel is currently paused."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "Whether the channel is currently paused."] +#[doc = "Checks whether a channel is currently paused."] +#[doc = ""] +#[doc = "Returns: Whether the channel is currently paused."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool; } extern "C" { - #[doc = "Sets the pause status of a channel."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* paused Whether the channel is to be paused (true) or unpaused (false)."] +#[doc = "Sets the pause status of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `paused` - Whether the channel is to be paused (true) or unpaused (false)."] + pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool); } extern "C" { - #[doc = "@name Configuration"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Sets the format of a channel."] - #[doc = "* * id ID of the channel (0..23)."] - #[doc = "* * format Format to use."] - #[doc = "*/"] +#[doc = "Sets the format of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `format` - Format to use."] + pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16_); } extern "C" { - #[doc = "Sets the interpolation type of a channel."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* type Interpolation type to use."] +#[doc = "Sets the interpolation type of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `type` - Interpolation type to use."] + pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType); } extern "C" { - #[doc = "Sets the sample rate of a channel."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* rate Sample rate to use."] +#[doc = "Sets the sample rate of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `rate` - Sample rate to use."] + pub fn ndspChnSetRate(id: ::libc::c_int, rate: f32); } extern "C" { - #[doc = "Sets the mix parameters (volumes) of a channel."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* mix Mix parameters to use. Working hypothesis:"] - #[doc = " - 0: Front left volume."] - #[doc = " - 1: Front right volume."] - #[doc = " - 2: Back left volume:"] - #[doc = " - 3: Back right volume:"] - #[doc = " - 4..7: Same as 0..3, but for auxiliary output 0."] - #[doc = " - 8..11: Same as 0..3, but for auxiliary output 1."] +#[doc = "Sets the mix parameters (volumes) of a channel."] +#[doc = ""] +#[doc = "- 0: Front left volume."] +#[doc = "- 1: Front right volume."] +#[doc = "- 2: Back left volume:"] +#[doc = "- 3: Back right volume:"] +#[doc = "- 4..7: Same as 0..3, but for auxiliary output 0."] +#[doc = "- 8..11: Same as 0..3, but for auxiliary output 1."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `mix` - Mix parameters to use. Working hypothesis:"] + pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32); } extern "C" { - #[doc = "Sets the DSPADPCM coefficients of a channel."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* coefs DSPADPCM coefficients to use."] +#[doc = "Sets the DSPADPCM coefficients of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `coefs` - DSPADPCM coefficients to use."] + pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16_); } extern "C" { - #[doc = "@name Wave buffers"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Clears the wave buffer queue of a channel and stops playback."] - #[doc = "* * id ID of the channel (0..23)."] - #[doc = "*/"] +#[doc = "Clears the wave buffer queue of a channel and stops playback."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnWaveBufClear(id: ::libc::c_int); } extern "C" { - #[doc = "Adds a wave buffer to the wave buffer queue of a channel."] - #[doc = "@remark If the channel's wave buffer queue was empty before the use of this function, playback is started."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* buf Wave buffer to add."] +#[doc = "Adds a wave buffer to the wave buffer queue of a channel."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `buf` - Wave buffer to add."] + pub fn ndspChnWaveBufAdd(id: ::libc::c_int, buf: *mut ndspWaveBuf); } extern "C" { - #[doc = "@name IIR filters"] - #[doc = "@{"] - #[doc = "**"] - #[doc = "* Configures whether the IIR monopole filter of a channel is enabled."] - #[doc = "* * id ID of the channel (0..23)."] - #[doc = "* * enable Whether to enable the IIR monopole filter."] - #[doc = "*/"] +#[doc = "Configures whether the IIR monopole filter of a channel is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `enable` - Whether to enable the IIR monopole filter."] + pub fn ndspChnIirMonoSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - #[doc = "Manually sets up the parameters on monopole filter"] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* enable Whether to enable the IIR monopole filter."] +#[doc = "Manually sets up the parameters on monopole filter"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `enable` - Whether to enable the IIR monopole filter."] + pub fn ndspChnIirMonoSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -20037,26 +28437,42 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* f0 Low pass cut-off frequency."] +#[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `f0` - Low pass cut-off frequency."] + pub fn ndspChnIirMonoSetParamsLowPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { - #[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* f0 High pass cut-off frequency."] +#[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `f0` - High pass cut-off frequency."] + pub fn ndspChnIirMonoSetParamsHighPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { - #[doc = "Configures whether the IIR biquad filter of a channel is enabled."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* enable Whether to enable the IIR biquad filter."] +#[doc = "Configures whether the IIR biquad filter of a channel is enabled."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `enable` - Whether to enable the IIR biquad filter."] + pub fn ndspChnIirBiquadSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - #[doc = "Manually sets up the parameters of the biquad filter"] - #[doc = "* id ID of the channel (0..23)."] +#[doc = "Manually sets up the parameters of the biquad filter"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] + pub fn ndspChnIirBiquadSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -20068,39 +28484,59 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a low pass filter."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* f0 Low pass cut-off frequency."] - #[doc = "* Q \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = "Sets the biquad to be a low pass filter."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `f0` - Low pass cut-off frequency."] +#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a high pass filter."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* f0 High pass cut-off frequency."] - #[doc = "* Q \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = "Sets the biquad to be a high pass filter."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `f0` - High pass cut-off frequency."] +#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a band pass filter."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* f0 Mid-frequency."] - #[doc = "* Q \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = "Sets the biquad to be a band pass filter."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `f0` - Mid-frequency."] +#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a notch filter."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* f0 Notch frequency."] - #[doc = "* Q \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = "Sets the biquad to be a notch filter."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `f0` - Notch frequency."] +#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + pub fn ndspChnIirBiquadSetParamsNotchFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a peaking equalizer."] - #[doc = "* id ID of the channel (0..23)."] - #[doc = "* f0 Central frequency."] - #[doc = "* Q \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - #[doc = "* gain Amount of gain (raw value = 10 ^ dB/40)"] +#[doc = "Sets the biquad to be a peaking equalizer."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `id` - ID of the channel (0..23)."] +#[doc = "* `f0` - Central frequency."] +#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = "* `gain` - Amount of gain (raw value = 10 ^ dB/40)"] + pub fn ndspChnIirBiquadSetParamsPeakingEqualizer( id: ::libc::c_int, f0: f32, @@ -20109,132 +28545,256 @@ extern "C" { ) -> bool; } #[doc = "Normal keyboard with several pages (QWERTY/accents/symbol/mobile)"] +#[doc = ""] + pub const SWKBD_TYPE_NORMAL: SwkbdType = 0; #[doc = "QWERTY keyboard only."] +#[doc = ""] + pub const SWKBD_TYPE_QWERTY: SwkbdType = 1; #[doc = "Number pad."] +#[doc = ""] + pub const SWKBD_TYPE_NUMPAD: SwkbdType = 2; #[doc = "On JPN systems, a text keyboard without Japanese input capabilities, otherwise same as SWKBD_TYPE_NORMAL."] +#[doc = ""] + pub const SWKBD_TYPE_WESTERN: SwkbdType = 3; #[doc = "Keyboard types."] +#[doc = ""] + pub type SwkbdType = ::libc::c_uint; #[doc = "All inputs are accepted."] +#[doc = ""] + pub const SWKBD_ANYTHING: SwkbdValidInput = 0; #[doc = "Empty inputs are not accepted."] +#[doc = ""] + pub const SWKBD_NOTEMPTY: SwkbdValidInput = 1; #[doc = "Empty or blank inputs (consisting solely of whitespace) are not accepted."] +#[doc = ""] + pub const SWKBD_NOTEMPTY_NOTBLANK: SwkbdValidInput = 2; pub const SWKBD_NOTBLANK_NOTEMPTY: SwkbdValidInput = 2; #[doc = "Blank inputs (consisting solely of whitespace) are not accepted, but empty inputs are."] +#[doc = ""] + pub const SWKBD_NOTBLANK: SwkbdValidInput = 3; #[doc = "The input must have a fixed length (specified by maxTextLength in swkbdInit)."] +#[doc = ""] + pub const SWKBD_FIXEDLEN: SwkbdValidInput = 4; #[doc = "Accepted input types."] +#[doc = ""] + pub type SwkbdValidInput = ::libc::c_uint; #[doc = "Left button (usually Cancel)"] +#[doc = ""] + pub const SWKBD_BUTTON_LEFT: SwkbdButton = 0; #[doc = "Middle button (usually I Forgot)"] +#[doc = ""] + pub const SWKBD_BUTTON_MIDDLE: SwkbdButton = 1; #[doc = "Right button (usually OK)"] +#[doc = ""] + pub const SWKBD_BUTTON_RIGHT: SwkbdButton = 2; pub const SWKBD_BUTTON_CONFIRM: SwkbdButton = 2; #[doc = "No button (returned by swkbdInputText in special cases)"] +#[doc = ""] + pub const SWKBD_BUTTON_NONE: SwkbdButton = 3; #[doc = "Keyboard dialog buttons."] +#[doc = ""] + pub type SwkbdButton = ::libc::c_uint; #[doc = "Characters are not concealed."] +#[doc = ""] + pub const SWKBD_PASSWORD_NONE: SwkbdPasswordMode = 0; #[doc = "Characters are concealed immediately."] +#[doc = ""] + pub const SWKBD_PASSWORD_HIDE: SwkbdPasswordMode = 1; #[doc = "Characters are concealed a second after they've been typed."] +#[doc = ""] + pub const SWKBD_PASSWORD_HIDE_DELAY: SwkbdPasswordMode = 2; #[doc = "Keyboard password modes."] +#[doc = ""] + pub type SwkbdPasswordMode = ::libc::c_uint; #[doc = "Disallow the use of more than a certain number of digits (0 or more)"] +#[doc = ""] + pub const SWKBD_FILTER_DIGITS: _bindgen_ty_32 = 1; #[doc = "Disallow the use of the @ sign."] +#[doc = ""] + pub const SWKBD_FILTER_AT: _bindgen_ty_32 = 2; #[doc = "Disallow the use of the % sign."] +#[doc = ""] + pub const SWKBD_FILTER_PERCENT: _bindgen_ty_32 = 4; #[doc = "Disallow the use of the \\ sign."] +#[doc = ""] + pub const SWKBD_FILTER_BACKSLASH: _bindgen_ty_32 = 8; #[doc = "Disallow profanity using Nintendo's profanity filter."] +#[doc = ""] + pub const SWKBD_FILTER_PROFANITY: _bindgen_ty_32 = 16; #[doc = "Use a callback in order to check the input."] +#[doc = ""] + pub const SWKBD_FILTER_CALLBACK: _bindgen_ty_32 = 32; #[doc = "Keyboard input filtering flags."] +#[doc = ""] + pub type _bindgen_ty_32 = ::libc::c_uint; #[doc = "Parental PIN mode."] +#[doc = ""] + pub const SWKBD_PARENTAL: _bindgen_ty_33 = 1; #[doc = "Darken the top screen when the keyboard is shown."] +#[doc = ""] + pub const SWKBD_DARKEN_TOP_SCREEN: _bindgen_ty_33 = 2; #[doc = "Enable predictive input (necessary for Kanji input in JPN systems)."] +#[doc = ""] + pub const SWKBD_PREDICTIVE_INPUT: _bindgen_ty_33 = 4; #[doc = "Enable multiline input."] +#[doc = ""] + pub const SWKBD_MULTILINE: _bindgen_ty_33 = 8; #[doc = "Enable fixed-width mode."] +#[doc = ""] + pub const SWKBD_FIXED_WIDTH: _bindgen_ty_33 = 16; #[doc = "Allow the usage of the HOME button."] +#[doc = ""] + pub const SWKBD_ALLOW_HOME: _bindgen_ty_33 = 32; #[doc = "Allow the usage of a software-reset combination."] +#[doc = ""] + pub const SWKBD_ALLOW_RESET: _bindgen_ty_33 = 64; #[doc = "Allow the usage of the POWER button."] +#[doc = ""] + pub const SWKBD_ALLOW_POWER: _bindgen_ty_33 = 128; #[doc = "Default to the QWERTY page when the keyboard is shown."] +#[doc = ""] + pub const SWKBD_DEFAULT_QWERTY: _bindgen_ty_33 = 512; #[doc = "Keyboard features."] +#[doc = ""] + pub type _bindgen_ty_33 = ::libc::c_uint; #[doc = "Specifies that the input is valid."] +#[doc = ""] + pub const SWKBD_CALLBACK_OK: SwkbdCallbackResult = 0; #[doc = "Displays an error message, then closes the keyboard."] +#[doc = ""] + pub const SWKBD_CALLBACK_CLOSE: SwkbdCallbackResult = 1; #[doc = "Displays an error message and continues displaying the keyboard."] +#[doc = ""] + pub const SWKBD_CALLBACK_CONTINUE: SwkbdCallbackResult = 2; #[doc = "Keyboard filter callback return values."] +#[doc = ""] + pub type SwkbdCallbackResult = ::libc::c_uint; #[doc = "Dummy/unused."] +#[doc = ""] + pub const SWKBD_NONE: SwkbdResult = -1; #[doc = "Invalid parameters to swkbd."] +#[doc = ""] + pub const SWKBD_INVALID_INPUT: SwkbdResult = -2; #[doc = "Out of memory."] +#[doc = ""] + pub const SWKBD_OUTOFMEM: SwkbdResult = -3; #[doc = "The button was clicked in 1-button dialogs."] +#[doc = ""] + pub const SWKBD_D0_CLICK: SwkbdResult = 0; #[doc = "The left button was clicked in 2-button dialogs."] +#[doc = ""] + pub const SWKBD_D1_CLICK0: SwkbdResult = 1; #[doc = "The right button was clicked in 2-button dialogs."] +#[doc = ""] + pub const SWKBD_D1_CLICK1: SwkbdResult = 2; #[doc = "The left button was clicked in 3-button dialogs."] +#[doc = ""] + pub const SWKBD_D2_CLICK0: SwkbdResult = 3; #[doc = "The middle button was clicked in 3-button dialogs."] +#[doc = ""] + pub const SWKBD_D2_CLICK1: SwkbdResult = 4; #[doc = "The right button was clicked in 3-button dialogs."] +#[doc = ""] + pub const SWKBD_D2_CLICK2: SwkbdResult = 5; #[doc = "The HOME button was pressed."] +#[doc = ""] + pub const SWKBD_HOMEPRESSED: SwkbdResult = 10; #[doc = "The soft-reset key combination was pressed."] +#[doc = ""] + pub const SWKBD_RESETPRESSED: SwkbdResult = 11; #[doc = "The POWER button was pressed."] +#[doc = ""] + pub const SWKBD_POWERPRESSED: SwkbdResult = 12; #[doc = "The parental PIN was verified successfully."] +#[doc = ""] + pub const SWKBD_PARENTAL_OK: SwkbdResult = 20; #[doc = "The parental PIN was incorrect."] +#[doc = ""] + pub const SWKBD_PARENTAL_FAIL: SwkbdResult = 21; #[doc = "The filter callback returned SWKBD_CALLBACK_CLOSE."] +#[doc = ""] + pub const SWKBD_BANNED_INPUT: SwkbdResult = 30; #[doc = "Keyboard return values."] +#[doc = ""] + pub type SwkbdResult = ::libc::c_int; #[doc = "Keyboard dictionary word for predictive input."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdDictWord { - #[doc = "Reading of the word (that is, the string that needs to be typed)."] +#[doc = "Reading of the word (that is, the string that needs to be typed)."] +#[doc = ""] + pub reading: [u16_; 41usize], - #[doc = "Spelling of the word."] +#[doc = "Spelling of the word."] +#[doc = ""] + pub word: [u16_; 41usize], - #[doc = "Language the word applies to."] +#[doc = "Language the word applies to."] +#[doc = ""] + pub language: u8_, - #[doc = "Specifies if the word applies to all languages."] +#[doc = "Specifies if the word applies to all languages."] +#[doc = ""] + pub all_languages: bool, } impl Default for SwkbdDictWord { @@ -20247,6 +28807,8 @@ impl Default for SwkbdDictWord { } } #[doc = "Keyboard filter callback function."] +#[doc = ""] + pub type SwkbdCallbackFn = ::core::option::Option< unsafe extern "C" fn( user: *mut ::libc::c_void, @@ -20256,12 +28818,16 @@ pub type SwkbdCallbackFn = ::core::option::Option< ) -> SwkbdCallbackResult, >; #[doc = "Keyboard status data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SwkbdStatusData { pub data: [u32_; 17usize], } #[doc = "Keyboard predictive input learning data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdLearningData { @@ -20277,6 +28843,8 @@ impl Default for SwkbdLearningData { } } #[doc = "Internal libctru book-keeping structure for software keyboards."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdExtra { @@ -20297,6 +28865,8 @@ impl Default for SwkbdExtra { } } #[doc = "Software keyboard parameter structure, it shouldn't be modified directly."] +#[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct SwkbdState { @@ -20365,11 +28935,15 @@ impl Default for SwkbdState { } } extern "C" { - #[doc = "Initializes software keyboard status."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* type Keyboard type."] - #[doc = "* numButtons Number of dialog buttons to display (1, 2 or 3)."] - #[doc = "* maxTextLength Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] +#[doc = "Initializes software keyboard status."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `type` - Keyboard type."] +#[doc = "* `numButtons` - Number of dialog buttons to display (1, 2 or 3)."] +#[doc = "* `maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] + pub fn swkbdInit( swkbd: *mut SwkbdState, type_: SwkbdType, @@ -20378,23 +28952,35 @@ extern "C" { ); } extern "C" { - #[doc = "Specifies which special features are enabled in a software keyboard."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* features Feature bitmask."] +#[doc = "Specifies which special features are enabled in a software keyboard."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `features` - Feature bitmask."] + pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32_); } extern "C" { - #[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* text Hint text."] +#[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `text` - Hint text."] + pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { - #[doc = "Configures a dialog button in a software keyboard."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* button Specifies which button to configure."] - #[doc = "* text Button text."] - #[doc = "* submit Specifies whether pushing the button will submit the text or discard it."] +#[doc = "Configures a dialog button in a software keyboard."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `button` - Specifies which button to configure."] +#[doc = "* `text` - Button text."] +#[doc = "* `submit` - Specifies whether pushing the button will submit the text or discard it."] + pub fn swkbdSetButton( swkbd: *mut SwkbdState, button: SwkbdButton, @@ -20403,16 +28989,24 @@ extern "C" { ); } extern "C" { - #[doc = "Sets the initial text that a software keyboard will display on launch."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* text Initial text."] +#[doc = "Sets the initial text that a software keyboard will display on launch."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `text` - Initial text."] + pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { - #[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] - #[doc = "* word Pointer to dictionary word structure."] - #[doc = "* reading Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] - #[doc = "* text Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] +#[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `word` - Pointer to dictionary word structure."] +#[doc = "* `reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] +#[doc = "* `text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] + pub fn swkbdSetDictWord( word: *mut SwkbdDictWord, reading: *const ::libc::c_char, @@ -20420,10 +29014,14 @@ extern "C" { ); } extern "C" { - #[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* dict Pointer to dictionary words."] - #[doc = "* wordCount Number of words in the dictionary."] +#[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `dict` - Pointer to dictionary words."] +#[doc = "* `wordCount` - Number of words in the dictionary."] + pub fn swkbdSetDictionary( swkbd: *mut SwkbdState, dict: *const SwkbdDictWord, @@ -20431,11 +29029,15 @@ extern "C" { ); } extern "C" { - #[doc = "Configures software keyboard internal status management."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* data Pointer to internal status structure (can be in, out or both depending on the other parameters)."] - #[doc = "* in Specifies whether the data should be read from the structure when the keyboard is launched."] - #[doc = "* out Specifies whether the data should be written to the structure when the keyboard is closed."] +#[doc = "Configures software keyboard internal status management."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] +#[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] +#[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] + pub fn swkbdSetStatusData( swkbd: *mut SwkbdState, data: *mut SwkbdStatusData, @@ -20444,11 +29046,15 @@ extern "C" { ); } extern "C" { - #[doc = "Configures software keyboard predictive input learning data management."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* data Pointer to learning data structure (can be in, out or both depending on the other parameters)."] - #[doc = "* in Specifies whether the data should be read from the structure when the keyboard is launched."] - #[doc = "* out Specifies whether the data should be written to the structure when the keyboard is closed."] +#[doc = "Configures software keyboard predictive input learning data management."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] +#[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] +#[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] + pub fn swkbdSetLearningData( swkbd: *mut SwkbdState, data: *mut SwkbdLearningData, @@ -20457,10 +29063,14 @@ extern "C" { ); } extern "C" { - #[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* callback Filter callback function."] - #[doc = "* user Custom data to be passed to the callback function."] +#[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `callback` - Filter callback function."] +#[doc = "* `user` - Custom data to be passed to the callback function."] + pub fn swkbdSetFilterCallback( swkbd: *mut SwkbdState, callback: SwkbdCallbackFn, @@ -20468,11 +29078,16 @@ extern "C" { ); } extern "C" { - #[doc = "Launches a software keyboard in order to input text."] - #[doc = "* swkbd Pointer to swkbd state."] - #[doc = "* buf Pointer to output buffer which will hold the inputted text."] - #[doc = "* bufsize Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] - #[doc = "The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] +#[doc = "Launches a software keyboard in order to input text."] +#[doc = ""] +#[doc = "Returns: The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `swkbd` - Pointer to swkbd state."] +#[doc = "* `buf` - Pointer to output buffer which will hold the inputted text."] +#[doc = "* `bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] + pub fn swkbdInputText( swkbd: *mut SwkbdState, buf: *mut ::libc::c_char, @@ -20480,31 +29095,57 @@ extern "C" { ) -> SwkbdButton; } #[doc = "checksum` is the same as the one computed from `returnbuf`"] +#[doc = "Verifies that the Mii data returned from the applet matches its"] +#[doc = ""] +#[doc = "checksum"] +#[doc = ""] +#[doc = ""] +#[doc = "Returns: `true` if `returnbuf->checksum` is the same as the one computed from `returnbuf`"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `returnbuf` - Buffer filled by Mii selector applet"] + pub fn miiSelectorChecksumIsValid(returnbuf: *const MiiSelectorReturn) -> bool; } #[doc = "Open directory struct"] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct archive_dir_t { pub magic: u32_, - #[doc = "\"arch\""] + pub fd: Handle, - #[doc = "CTRU handle"] +#[doc = "CTRU handle"] +#[doc = ""] + pub index: ssize_t, - #[doc = "Current entry index"] +#[doc = "Current entry index"] +#[doc = ""] + pub size: size_t, - #[doc = "Current batch size"] +#[doc = "Current batch size"] +#[doc = ""] + pub entry_data: [FS_DirectoryEntry; 32usize], } impl Default for archive_dir_t { @@ -20777,13 +29547,17 @@ impl Default for archive_dir_t { } extern "C" { #[must_use] - #[doc = "Mounts the SD"] +#[doc = "Mounts the SD"] +#[doc = ""] + pub fn archiveMountSdmc() -> Result; } extern "C" { #[must_use] - #[doc = "Mounts and opens an archive as deviceName"] - #[doc = "Returns either an archive open error code, or -1 for generic failure"] +#[doc = "Mounts and opens an archive as deviceName"] +#[doc = "Returns either an archive open error code, or -1 for generic failure"] +#[doc = ""] + pub fn archiveMount( archiveID: FS_ArchiveID, archivePath: FS_Path, @@ -20792,118 +29566,196 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] - #[doc = "Returns -1 if the specified device is not found"] +#[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] +#[doc = "Returns -1 if the specified device is not found"] +#[doc = ""] + pub fn archiveCommitSaveData(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Unmounts the specified device, closing its archive in the process"] - #[doc = "Returns -1 if the specified device was not found"] +#[doc = "Unmounts the specified device, closing its archive in the process"] +#[doc = "Returns -1 if the specified device was not found"] +#[doc = ""] + pub fn archiveUnmount(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Unmounts all devices and cleans up any resources used by the driver"] +#[doc = "Unmounts all devices and cleans up any resources used by the driver"] +#[doc = ""] + pub fn archiveUnmountAll() -> Result; } extern "C" { #[must_use] - #[doc = "Get a file's mtime"] +#[doc = "Get a file's mtime"] +#[doc = ""] + pub fn archive_getmtime(name: *const ::libc::c_char, mtime: *mut u64_) -> Result; } #[doc = "RomFS header."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct romfs_header { - #[doc = "Size of the header."] +#[doc = "Size of the header."] +#[doc = ""] + pub headerSize: u32_, - #[doc = "Offset of the directory hash table."] +#[doc = "Offset of the directory hash table."] +#[doc = ""] + pub dirHashTableOff: u32_, - #[doc = "Size of the directory hash table."] +#[doc = "Size of the directory hash table."] +#[doc = ""] + pub dirHashTableSize: u32_, - #[doc = "Offset of the directory table."] +#[doc = "Offset of the directory table."] +#[doc = ""] + pub dirTableOff: u32_, - #[doc = "Size of the directory table."] +#[doc = "Size of the directory table."] +#[doc = ""] + pub dirTableSize: u32_, - #[doc = "Offset of the file hash table."] +#[doc = "Offset of the file hash table."] +#[doc = ""] + pub fileHashTableOff: u32_, - #[doc = "Size of the file hash table."] +#[doc = "Size of the file hash table."] +#[doc = ""] + pub fileHashTableSize: u32_, - #[doc = "Offset of the file table."] +#[doc = "Offset of the file table."] +#[doc = ""] + pub fileTableOff: u32_, - #[doc = "Size of the file table."] +#[doc = "Size of the file table."] +#[doc = ""] + pub fileTableSize: u32_, - #[doc = "Offset of the file data."] +#[doc = "Offset of the file data."] +#[doc = ""] + pub fileDataOff: u32_, } #[doc = "RomFS directory."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default)] pub struct romfs_dir { - #[doc = "Offset of the parent directory."] +#[doc = "Offset of the parent directory."] +#[doc = ""] + pub parent: u32_, - #[doc = "Offset of the next sibling directory."] +#[doc = "Offset of the next sibling directory."] +#[doc = ""] + pub sibling: u32_, - #[doc = "Offset of the first child directory."] +#[doc = "Offset of the first child directory."] +#[doc = ""] + pub childDir: u32_, - #[doc = "Offset of the first file."] +#[doc = "Offset of the first file."] +#[doc = ""] + pub childFile: u32_, - #[doc = "Directory hash table pointer."] +#[doc = "Directory hash table pointer."] +#[doc = ""] + pub nextHash: u32_, - #[doc = "Name length."] +#[doc = "Name length."] +#[doc = ""] + pub nameLen: u32_, - #[doc = "Name. (UTF-16)"] +#[doc = "Name. (UTF-16)"] +#[doc = ""] + pub name: __IncompleteArrayField, } #[doc = "RomFS file."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default)] pub struct romfs_file { - #[doc = "Offset of the parent directory."] +#[doc = "Offset of the parent directory."] +#[doc = ""] + pub parent: u32_, - #[doc = "Offset of the next sibling file."] +#[doc = "Offset of the next sibling file."] +#[doc = ""] + pub sibling: u32_, - #[doc = "Offset of the file's data."] +#[doc = "Offset of the file's data."] +#[doc = ""] + pub dataOff: u64_, - #[doc = "Length of the file's data."] +#[doc = "Length of the file's data."] +#[doc = ""] + pub dataSize: u64_, - #[doc = "File hash table pointer."] +#[doc = "File hash table pointer."] +#[doc = ""] + pub nextHash: u32_, - #[doc = "Name length."] +#[doc = "Name length."] +#[doc = ""] + pub nameLen: u32_, - #[doc = "Name. (UTF-16)"] +#[doc = "Name. (UTF-16)"] +#[doc = ""] + pub name: __IncompleteArrayField, } extern "C" { #[must_use] - #[doc = "Mounts the Application's RomFS."] - #[doc = "* name Device mount name."] - #[doc = "@remark This function is intended to be used to access one's own RomFS."] - #[doc = " If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] - #[doc = " If on the other hand it's an NCCH, it behaves identically to \\ref romfsMountFromCurrentProcess."] +#[doc = "Mounts the Application's RomFS."] +#[doc = ""] +#[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] +#[doc = "If on the other hand it's an NCCH, it behaves identically to \\ref romfsMountFromCurrentProcess."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Device mount name."] + pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Mounts RomFS from an open file."] - #[doc = "* fd FSFILE handle of the RomFS image."] - #[doc = "* offset Offset of the RomFS within the file."] - #[doc = "* name Device mount name."] +#[doc = "Mounts RomFS from an open file."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `fd` - FSFILE handle of the RomFS image."] +#[doc = "* `offset` - Offset of the RomFS within the file."] +#[doc = "* `name` - Device mount name."] + pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Mounts RomFS using the current process host program RomFS."] - #[doc = "* name Device mount name."] +#[doc = "Mounts RomFS using the current process host program RomFS."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `name` - Device mount name."] + pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Mounts RomFS from the specified title."] - #[doc = "* tid Title ID"] - #[doc = "* mediatype Mediatype"] - #[doc = "* name Device mount name."] +#[doc = "Mounts RomFS from the specified title."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `tid` - Title ID"] +#[doc = "* `mediatype` - Mediatype"] +#[doc = "* `name` - Device mount name."] + pub fn romfsMountFromTitle( tid: u64_, mediatype: FS_MediaType, @@ -20912,47 +29764,83 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unmounts the RomFS device."] +#[doc = "Unmounts the RomFS device."] +#[doc = ""] + pub fn romfsUnmount(name: *const ::libc::c_char) -> Result; } #[doc = "Character width information structure."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct charWidthInfo_s { - #[doc = "Horizontal offset to draw the glyph with."] +#[doc = "Horizontal offset to draw the glyph with."] +#[doc = ""] + pub left: s8, - #[doc = "Width of the glyph."] +#[doc = "Width of the glyph."] +#[doc = ""] + pub glyphWidth: u8_, - #[doc = "Width of the character, that is, horizontal distance to advance."] +#[doc = "Width of the character, that is, horizontal distance to advance."] +#[doc = ""] + pub charWidth: u8_, } #[doc = "Font texture sheet information."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct TGLP_s { - #[doc = "Width of a glyph cell."] +#[doc = "Width of a glyph cell."] +#[doc = ""] + pub cellWidth: u8_, - #[doc = "Height of a glyph cell."] +#[doc = "Height of a glyph cell."] +#[doc = ""] + pub cellHeight: u8_, - #[doc = "Vertical position of the baseline."] +#[doc = "Vertical position of the baseline."] +#[doc = ""] + pub baselinePos: u8_, - #[doc = "Maximum character width."] +#[doc = "Maximum character width."] +#[doc = ""] + pub maxCharWidth: u8_, - #[doc = "Size in bytes of a texture sheet."] +#[doc = "Size in bytes of a texture sheet."] +#[doc = ""] + pub sheetSize: u32_, - #[doc = "Number of texture sheets."] +#[doc = "Number of texture sheets."] +#[doc = ""] + pub nSheets: u16_, - #[doc = "GPU texture format (GPU_TEXCOLOR)."] +#[doc = "GPU texture format (GPU_TEXCOLOR)."] +#[doc = ""] + pub sheetFmt: u16_, - #[doc = "Number of glyphs per row per sheet."] +#[doc = "Number of glyphs per row per sheet."] +#[doc = ""] + pub nRows: u16_, - #[doc = "Number of glyph rows per sheet."] +#[doc = "Number of glyph rows per sheet."] +#[doc = ""] + pub nLines: u16_, - #[doc = "Texture sheet width."] +#[doc = "Texture sheet width."] +#[doc = ""] + pub sheetWidth: u16_, - #[doc = "Texture sheet height."] +#[doc = "Texture sheet height."] +#[doc = ""] + pub sheetHeight: u16_, - #[doc = "Pointer to texture sheet data."] +#[doc = "Pointer to texture sheet data."] +#[doc = ""] + pub sheetData: *mut u8_, } impl Default for TGLP_s { @@ -20965,18 +29853,30 @@ impl Default for TGLP_s { } } #[doc = "Font character width information block structure."] +#[doc = ""] + pub type CWDH_s = tag_CWDH_s; #[doc = "Font character width information block structure."] +#[doc = ""] + #[repr(C)] #[derive(Debug)] pub struct tag_CWDH_s { - #[doc = "First Unicode codepoint the block applies to."] +#[doc = "First Unicode codepoint the block applies to."] +#[doc = ""] + pub startIndex: u16_, - #[doc = "Last Unicode codepoint the block applies to."] +#[doc = "Last Unicode codepoint the block applies to."] +#[doc = ""] + pub endIndex: u16_, - #[doc = "Pointer to the next block."] +#[doc = "Pointer to the next block."] +#[doc = ""] + pub next: *mut CWDH_s, - #[doc = "Table of character width information structures."] +#[doc = "Table of character width information structures."] +#[doc = ""] + pub widths: __IncompleteArrayField, } impl Default for tag_CWDH_s { @@ -20989,53 +29889,87 @@ impl Default for tag_CWDH_s { } } #[doc = "Identity mapping."] +#[doc = ""] + pub const CMAP_TYPE_DIRECT: _bindgen_ty_36 = 0; #[doc = "Mapping using a table."] +#[doc = ""] + pub const CMAP_TYPE_TABLE: _bindgen_ty_36 = 1; #[doc = "Mapping using a list of mapped characters."] +#[doc = ""] + pub const CMAP_TYPE_SCAN: _bindgen_ty_36 = 2; #[doc = "Font character map methods."] +#[doc = ""] + pub type _bindgen_ty_36 = ::libc::c_uint; #[doc = "Font character map structure."] +#[doc = ""] + pub type CMAP_s = tag_CMAP_s; #[doc = "Font character map structure."] +#[doc = ""] + #[repr(C)] pub struct tag_CMAP_s { - #[doc = "First Unicode codepoint the block applies to."] +#[doc = "First Unicode codepoint the block applies to."] +#[doc = ""] + pub codeBegin: u16_, - #[doc = "Last Unicode codepoint the block applies to."] +#[doc = "Last Unicode codepoint the block applies to."] +#[doc = ""] + pub codeEnd: u16_, - #[doc = "Mapping method."] +#[doc = "Mapping method."] +#[doc = ""] + pub mappingMethod: u16_, pub reserved: u16_, - #[doc = "Pointer to the next map."] +#[doc = "Pointer to the next map."] +#[doc = ""] + 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 { - #[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] +#[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] +#[doc = ""] + pub indexOffset: __BindgenUnionField, - #[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] +#[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] +#[doc = ""] + pub indexTable: __BindgenUnionField<[u16_; 0usize]>, pub __bindgen_anon_1: __BindgenUnionField, pub bindgen_union_field: u16, } #[doc = "For CMAP_TYPE_SCAN: Mapping data."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1 { - #[doc = "Number of pairs."] +#[doc = "Number of pairs."] +#[doc = ""] + pub nScanEntries: u16_, pub scanEntries: __IncompleteArrayField, } #[doc = "Mapping pairs."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - #[doc = "Unicode codepoint."] +#[doc = "Unicode codepoint."] +#[doc = ""] + pub code: u16_, - #[doc = "Mapped glyph index."] +#[doc = "Mapped glyph index."] +#[doc = ""] + pub glyphIndex: u16_, } impl Default for tag_CMAP_s__bindgen_ty_1 { @@ -21057,34 +29991,62 @@ impl Default for tag_CMAP_s { } } #[doc = "Font information structure."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FINF_s { - #[doc = "Signature (FINF)."] +#[doc = "Signature (FINF)."] +#[doc = ""] + pub signature: u32_, - #[doc = "Section size."] +#[doc = "Section size."] +#[doc = ""] + pub sectionSize: u32_, - #[doc = "Font type"] +#[doc = "Font type"] +#[doc = ""] + pub fontType: u8_, - #[doc = "Line feed vertical distance."] +#[doc = "Line feed vertical distance."] +#[doc = ""] + pub lineFeed: u8_, - #[doc = "Glyph index of the replacement character."] +#[doc = "Glyph index of the replacement character."] +#[doc = ""] + pub alterCharIndex: u16_, - #[doc = "Default character width information."] +#[doc = "Default character width information."] +#[doc = ""] + pub defaultWidth: charWidthInfo_s, - #[doc = "Font encoding (?)"] +#[doc = "Font encoding (?)"] +#[doc = ""] + pub encoding: u8_, - #[doc = "Pointer to texture sheet information."] +#[doc = "Pointer to texture sheet information."] +#[doc = ""] + pub tglp: *mut TGLP_s, - #[doc = "Pointer to the first character width information block."] +#[doc = "Pointer to the first character width information block."] +#[doc = ""] + pub cwdh: *mut CWDH_s, - #[doc = "Pointer to the first character map."] +#[doc = "Pointer to the first character map."] +#[doc = ""] + pub cmap: *mut CMAP_s, - #[doc = "Font height."] +#[doc = "Font height."] +#[doc = ""] + pub height: u8_, - #[doc = "Font width."] +#[doc = "Font width."] +#[doc = ""] + pub width: u8_, - #[doc = "Font ascent."] +#[doc = "Font ascent."] +#[doc = ""] + pub ascent: u8_, pub padding: u8_, } @@ -21098,22 +30060,38 @@ impl Default for FINF_s { } } #[doc = "Font structure."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CFNT_s { - #[doc = "Signature (CFNU)."] +#[doc = "Signature (CFNU)."] +#[doc = ""] + pub signature: u32_, - #[doc = "Endianness constant (0xFEFF)."] +#[doc = "Endianness constant (0xFEFF)."] +#[doc = ""] + pub endianness: u16_, - #[doc = "Header size."] +#[doc = "Header size."] +#[doc = ""] + pub headerSize: u16_, - #[doc = "Format version."] +#[doc = "Format version."] +#[doc = ""] + pub version: u32_, - #[doc = "File size."] +#[doc = "File size."] +#[doc = ""] + pub fileSize: u32_, - #[doc = "Number of blocks."] +#[doc = "Number of blocks."] +#[doc = ""] + pub nBlocks: u32_, - #[doc = "Font information."] +#[doc = "Font information."] +#[doc = ""] + pub finf: FINF_s, } impl Default for CFNT_s { @@ -21126,21 +30104,33 @@ impl Default for CFNT_s { } } #[doc = "Font glyph position structure."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s { - #[doc = "Texture sheet index to use to render the glyph."] +#[doc = "Texture sheet index to use to render the glyph."] +#[doc = ""] + pub sheetIndex: ::libc::c_int, - #[doc = "Horizontal offset to draw the glyph width."] +#[doc = "Horizontal offset to draw the glyph width."] +#[doc = ""] + pub xOffset: f32, - #[doc = "Horizontal distance to advance after drawing the glyph."] +#[doc = "Horizontal distance to advance after drawing the glyph."] +#[doc = ""] + pub xAdvance: f32, - #[doc = "Glyph width."] +#[doc = "Glyph width."] +#[doc = ""] + pub width: f32, pub texcoord: fontGlyphPos_s__bindgen_ty_1, pub vtxcoord: fontGlyphPos_s__bindgen_ty_2, } #[doc = "Texture coordinates to use to render the glyph."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_1 { @@ -21150,6 +30140,8 @@ pub struct fontGlyphPos_s__bindgen_ty_1 { pub bottom: f32, } #[doc = "Vertex coordinates to use to render the glyph."] +#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_2 { @@ -21159,47 +30151,72 @@ pub struct fontGlyphPos_s__bindgen_ty_2 { pub bottom: f32, } #[doc = "Calculates vertex coordinates in addition to texture coordinates."] +#[doc = ""] + pub const GLYPH_POS_CALC_VTXCOORD: _bindgen_ty_37 = 1; #[doc = "Position the glyph at the baseline instead of at the top-left corner."] +#[doc = ""] + pub const GLYPH_POS_AT_BASELINE: _bindgen_ty_37 = 2; #[doc = "Indicates that the Y axis points up instead of down."] +#[doc = ""] + pub const GLYPH_POS_Y_POINTS_UP: _bindgen_ty_37 = 4; #[doc = "Flags for use with fontCalcGlyphPos."] +#[doc = ""] + pub type _bindgen_ty_37 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Ensures the shared system font is mapped."] +#[doc = "Ensures the shared system font is mapped."] +#[doc = ""] + pub fn fontEnsureMapped() -> Result; } extern "C" { - #[doc = "Fixes the pointers internal to a just-loaded font"] - #[doc = "* font Font to fix"] - #[doc = "@remark Should never be run on the system font, and only once on any other font."] +#[doc = "Fixes the pointers internal to a just-loaded font"] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `font` - Font to fix"] + pub fn fontFixPointers(font: *mut CFNT_s); } extern "C" { - #[doc = "Retrieves the glyph index of the specified Unicode codepoint."] - #[doc = "* font Pointer to font structure. If NULL, the shared system font is used."] - #[doc = "* codePoint Unicode codepoint."] +#[doc = "Retrieves the glyph index of the specified Unicode codepoint."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] +#[doc = "* `codePoint` - Unicode codepoint."] + pub fn fontGlyphIndexFromCodePoint(font: *mut CFNT_s, codePoint: u32_) -> ::libc::c_int; } extern "C" { - #[doc = "Retrieves character width information of the specified glyph."] - #[doc = "* font Pointer to font structure. If NULL, the shared system font is used."] - #[doc = "* glyphIndex Index of the glyph."] +#[doc = "Retrieves character width information of the specified glyph."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] +#[doc = "* `glyphIndex` - Index of the glyph."] + pub fn fontGetCharWidthInfo( font: *mut CFNT_s, glyphIndex: ::libc::c_int, ) -> *mut charWidthInfo_s; } extern "C" { - #[doc = "Calculates position information for the specified glyph."] - #[doc = "* out Output structure in which to write the information."] - #[doc = "* font Pointer to font structure. If NULL, the shared system font is used."] - #[doc = "* glyphIndex Index of the glyph."] - #[doc = "* flags Calculation flags (see GLYPH_POS_* flags)."] - #[doc = "* scaleX Scale factor to apply horizontally."] - #[doc = "* scaleY Scale factor to apply vertically."] +#[doc = "Calculates position information for the specified glyph."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `out` - Output structure in which to write the information."] +#[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] +#[doc = "* `glyphIndex` - Index of the glyph."] +#[doc = "* `flags` - Calculation flags (see GLYPH_POS_* flags)."] +#[doc = "* `scaleX` - Scale factor to apply horizontally."] +#[doc = "* `scaleY` - Scale factor to apply vertically."] + pub fn fontCalcGlyphPos( out: *mut fontGlyphPos_s, font: *mut CFNT_s, @@ -21237,14 +30254,20 @@ extern "C" { pub fn gdbHioDevSystem(command: *const ::libc::c_char) -> ::libc::c_int; } extern "C" { - #[doc = "Address of the host connected through 3dslink"] +#[doc = "Address of the host connected through 3dslink"] +#[doc = ""] + pub static mut __3dslink_host: in_addr; } extern "C" { - #[doc = "Connects to the 3dslink host, setting up an output stream."] - #[doc = "* redirStdout Whether to redirect stdout to nxlink output."] - #[doc = "* redirStderr Whether to redirect stderr to nxlink output."] - #[doc = "Socket fd on success, negative number on failure."] - #[doc = "The socket should be closed with close() during application cleanup."] +#[doc = "Connects to the 3dslink host, setting up an output stream."] +#[doc = ""] +#[doc = "Returns: Socket fd on success, negative number on failure."] +#[doc = ""] +#[doc = "# Arguments"] +#[doc = ""] +#[doc = "* `redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] +#[doc = "* `redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] + pub fn link3dsConnectToHost(redirStdout: bool, redirStderr: bool) -> ::libc::c_int; } From 1dfe050fd4e35d2d7a857553e8ef80c6fff48a70 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 14:56:17 +0200 Subject: [PATCH 11/57] Add formatting step in ``bindgen.sh`` and fix formatting --- ctru-sys/bindgen.sh | 2 + ctru-sys/src/bindings.rs | 20750 +++++++++++++++++-------------------- 2 files changed, 9303 insertions(+), 11449 deletions(-) diff --git a/ctru-sys/bindgen.sh b/ctru-sys/bindgen.sh index eab2db2..d6c8556 100755 --- a/ctru-sys/bindgen.sh +++ b/ctru-sys/bindgen.sh @@ -30,3 +30,5 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \ > src/bindings.rs cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs + +cargo fmt --all diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs index fbf1333..613ced4 100644 --- a/ctru-sys/src/bindings.rs +++ b/ctru-sys/src/bindings.rs @@ -1292,62 +1292,51 @@ pub type ThreadFunc = ::core::option::Option; #[doc = "Structure representing CPU registers"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CpuRegisters { -#[doc = "r0-r12."] -#[doc = ""] - + #[doc = "r0-r12."] + #[doc = ""] pub r: [u32_; 13usize], -#[doc = "sp."] -#[doc = ""] - + #[doc = "sp."] + #[doc = ""] pub sp: u32_, -#[doc = "lr."] -#[doc = ""] - + #[doc = "lr."] + #[doc = ""] pub lr: u32_, -#[doc = "pc. May need to be adjusted."] -#[doc = ""] - + #[doc = "pc. May need to be adjusted."] + #[doc = ""] pub pc: u32_, -#[doc = "cpsr."] -#[doc = ""] - + #[doc = "cpsr."] + #[doc = ""] pub cpsr: u32_, } #[doc = "Structure representing FPU registers"] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct FpuRegisters { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1, -#[doc = "fpscr."] -#[doc = ""] - + #[doc = "fpscr."] + #[doc = ""] pub fpscr: u32_, -#[doc = "fpexc."] -#[doc = ""] - + #[doc = "fpexc."] + #[doc = ""] pub fpexc: u32_, } #[repr(C)] #[derive(Copy, Clone)] pub union FpuRegisters__bindgen_ty_1 { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1__bindgen_ty_1, -#[doc = "s0-s31."] -#[doc = ""] - + #[doc = "s0-s31."] + #[doc = ""] pub s: [f32; 32usize], } #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FpuRegisters__bindgen_ty_1__bindgen_ty_1 { -#[doc = "d0-d15."] -#[doc = ""] - + #[doc = "d0-d15."] + #[doc = ""] pub d: [f64; 16usize], } impl Default for FpuRegisters__bindgen_ty_1 { @@ -1706,36 +1695,29 @@ pub const MEMREGION_BASE: MemRegion = 3; pub type MemRegion = ::libc::c_uint; #[doc = "Memory information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MemInfo { -#[doc = "Base address."] -#[doc = ""] - + #[doc = "Base address."] + #[doc = ""] pub base_addr: u32_, -#[doc = "Size."] -#[doc = ""] - + #[doc = "Size."] + #[doc = ""] pub size: u32_, -#[doc = "Memory permissions. See @ref MemPerm"] -#[doc = ""] - + #[doc = "Memory permissions. See @ref MemPerm"] + #[doc = ""] pub perm: u32_, -#[doc = "Memory state. See @ref MemState"] -#[doc = ""] - + #[doc = "Memory state. See @ref MemState"] + #[doc = ""] pub state: u32_, } #[doc = "Memory page information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PageInfo { -#[doc = "Page flags."] -#[doc = ""] - + #[doc = "Page flags."] + #[doc = ""] pub flags: u32_, } #[doc = "Signal #value threads for wake-up."] @@ -1905,61 +1887,48 @@ pub type _bindgen_ty_6 = ::libc::c_uint; #[doc = "this forces all loops to be unrolled -- you need to keep that in mind when using negative increments, as the kernel"] #[doc = "uses a limit of 100 DMA instruction bytes per channel."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaDeviceConfig { -#[doc = "DMA device ID."] -#[doc = ""] - + #[doc = "DMA device ID."] + #[doc = ""] pub deviceId: s8, -#[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] -#[doc = ""] - + #[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] + #[doc = ""] pub allowedAlignments: s8, -#[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] -#[doc = ""] - + #[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] + #[doc = ""] pub burstSize: s16, -#[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] -#[doc = ""] - + #[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] + #[doc = ""] pub transferSize: s16, -#[doc = "Burst loop stride, can be <= 0."] -#[doc = ""] - + #[doc = "Burst loop stride, can be <= 0."] + #[doc = ""] pub burstStride: s16, -#[doc = "\"Transfer\" loop stride, can be <= 0."] -#[doc = ""] - + #[doc = "\"Transfer\" loop stride, can be <= 0."] + #[doc = ""] pub transferStride: s16, } #[doc = "Configuration stucture for \\ref svcStartInterProcessDma."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaConfig { -#[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] -#[doc = ""] - + #[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] + #[doc = ""] pub channelId: s8, -#[doc = "Endian swap size (can be 0)."] -#[doc = ""] - + #[doc = "Endian swap size (can be 0)."] + #[doc = ""] pub endianSwapSize: s8, -#[doc = "DMACFG_* flags."] -#[doc = ""] - + #[doc = "DMACFG_* flags."] + #[doc = ""] pub flags: u8_, pub _padding: u8_, -#[doc = "Source device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] -#[doc = ""] - + #[doc = "Source device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] + #[doc = ""] pub srcCfg: DmaDeviceConfig, -#[doc = "Destination device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] -#[doc = ""] - + #[doc = "Destination device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] + #[doc = ""] pub dstCfg: DmaDeviceConfig, } #[doc = "Enable and lock perfmon. functionality."] @@ -2114,25 +2083,20 @@ pub const PERFCOUNTEREVT_SCU_CYCLE_COUNT: PerfCounterEvent = 4127; pub type PerfCounterEvent = ::libc::c_uint; #[doc = "Event relating to the attachment of a process."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachProcessEvent { -#[doc = "ID of the program."] -#[doc = ""] - + #[doc = "ID of the program."] + #[doc = ""] pub program_id: u64_, -#[doc = "Name of the process."] -#[doc = ""] - + #[doc = "Name of the process."] + #[doc = ""] pub process_name: [::libc::c_char; 8usize], -#[doc = "ID of the process."] -#[doc = ""] - + #[doc = "ID of the process."] + #[doc = ""] pub process_id: u32_, -#[doc = "Always 0"] -#[doc = ""] - + #[doc = "Always 0"] + #[doc = ""] pub other_flags: u32_, } #[doc = "Process exited either normally or due to an uncaught exception."] @@ -2153,13 +2117,11 @@ pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2; pub type ExitProcessEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a process."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitProcessEvent { -#[doc = "Reason for exiting. See @ref ExitProcessEventReason"] -#[doc = ""] - + #[doc = "Reason for exiting. See @ref ExitProcessEventReason"] + #[doc = ""] pub reason: ExitProcessEventReason, } impl Default for ExitProcessEvent { @@ -2173,21 +2135,17 @@ impl Default for ExitProcessEvent { } #[doc = "Event relating to the attachment of a thread."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachThreadEvent { -#[doc = "ID of the creating thread."] -#[doc = ""] - + #[doc = "ID of the creating thread."] + #[doc = ""] pub creator_thread_id: u32_, -#[doc = "Thread local storage."] -#[doc = ""] - + #[doc = "Thread local storage."] + #[doc = ""] pub thread_local_storage: u32_, -#[doc = "Entry point of the thread."] -#[doc = ""] - + #[doc = "Entry point of the thread."] + #[doc = ""] pub entry_point: u32_, } #[doc = "Thread exited."] @@ -2212,13 +2170,11 @@ pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3; pub type ExitThreadEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a thread."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitThreadEvent { -#[doc = "Reason for exiting. See @ref ExitThreadEventReason"] -#[doc = ""] - + #[doc = "Reason for exiting. See @ref ExitThreadEventReason"] + #[doc = ""] pub reason: ExitThreadEventReason, } impl Default for ExitThreadEvent { @@ -2296,13 +2252,11 @@ pub const EXCEVENT_UNDEFINED_SYSCALL: ExceptionEventType = 8; pub type ExceptionEventType = ::libc::c_uint; #[doc = "Event relating to fault exceptions (CPU exceptions other than stop points and undefined syscalls)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FaultExceptionEvent { -#[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] -#[doc = ""] - + #[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] + #[doc = ""] pub fault_information: u32_, } #[doc = "See @ref SVC_STOP_POINT."] @@ -2323,17 +2277,14 @@ pub const STOPPOINT_WATCHPOINT: StopPointType = 2; pub type StopPointType = ::libc::c_uint; #[doc = "Event relating to stop points"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StopPointExceptionEvent { -#[doc = "Stop point type, see @ref StopPointType."] -#[doc = ""] - + #[doc = "Stop point type, see @ref StopPointType."] + #[doc = ""] pub type_: StopPointType, -#[doc = "FAR for Watchpoints, otherwise 0."] -#[doc = ""] - + #[doc = "FAR for Watchpoints, otherwise 0."] + #[doc = ""] pub fault_information: u32_, } impl Default for StopPointExceptionEvent { @@ -2347,21 +2298,17 @@ impl Default for StopPointExceptionEvent { } #[doc = "Event relating to @ref svcBreak"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UserBreakExceptionEvent { -#[doc = "User break type, see @ref UserBreakType."] -#[doc = ""] - + #[doc = "User break type, see @ref UserBreakType."] + #[doc = ""] pub type_: UserBreakType, -#[doc = "For LOAD_RO and UNLOAD_RO."] -#[doc = ""] - + #[doc = "For LOAD_RO and UNLOAD_RO."] + #[doc = ""] pub croInfo: u32_, -#[doc = "For LOAD_RO and UNLOAD_RO."] -#[doc = ""] - + #[doc = "For LOAD_RO and UNLOAD_RO."] + #[doc = ""] pub croInfoSize: u32_, } impl Default for UserBreakExceptionEvent { @@ -2375,49 +2322,40 @@ impl Default for UserBreakExceptionEvent { } #[doc = "Event relating to @ref svcBreakDebugProcess"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DebuggerBreakExceptionEvent { -#[doc = "IDs of the attached process's threads that were running on each core at the time of the @ref svcBreakDebugProcess call, or -1 (only the first 2 values are meaningful on O3DS)."] -#[doc = ""] - + #[doc = "IDs of the attached process's threads that were running on each core at the time of the @ref svcBreakDebugProcess call, or -1 (only the first 2 values are meaningful on O3DS)."] + #[doc = ""] pub thread_ids: [s32; 4usize], } #[doc = "Event relating to exceptions."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct ExceptionEvent { -#[doc = "Type of event. See @ref ExceptionEventType."] -#[doc = ""] - + #[doc = "Type of event. See @ref ExceptionEventType."] + #[doc = ""] pub type_: ExceptionEventType, -#[doc = "Address of the exception."] -#[doc = ""] - + #[doc = "Address of the exception."] + #[doc = ""] pub address: u32_, pub __bindgen_anon_1: ExceptionEvent__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ExceptionEvent__bindgen_ty_1 { -#[doc = "Fault exception event data."] -#[doc = ""] - + #[doc = "Fault exception event data."] + #[doc = ""] pub fault: FaultExceptionEvent, -#[doc = "Stop point exception event data."] -#[doc = ""] - + #[doc = "Stop point exception event data."] + #[doc = ""] pub stop_point: StopPointExceptionEvent, -#[doc = "User break exception event data."] -#[doc = ""] - + #[doc = "User break exception event data."] + #[doc = ""] pub user_break: UserBreakExceptionEvent, -#[doc = "Debugger break exception event data"] -#[doc = ""] - + #[doc = "Debugger break exception event data"] + #[doc = ""] pub debugger_break: DebuggerBreakExceptionEvent, } impl Default for ExceptionEvent__bindgen_ty_1 { @@ -2440,66 +2378,53 @@ impl Default for ExceptionEvent { } #[doc = "Event relating to the scheduler."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ScheduleInOutEvent { -#[doc = "Clock tick that the event occurred."] -#[doc = ""] - + #[doc = "Clock tick that the event occurred."] + #[doc = ""] pub clock_tick: u64_, } #[doc = "Event relating to syscalls."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SyscallInOutEvent { -#[doc = "Clock tick that the event occurred."] -#[doc = ""] - + #[doc = "Clock tick that the event occurred."] + #[doc = ""] pub clock_tick: u64_, -#[doc = "Syscall sent/received."] -#[doc = ""] - + #[doc = "Syscall sent/received."] + #[doc = ""] pub syscall: u32_, } #[doc = "Event relating to debug output."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OutputStringEvent { -#[doc = "Address of the outputted string."] -#[doc = ""] - + #[doc = "Address of the outputted string."] + #[doc = ""] pub string_addr: u32_, -#[doc = "Size of the outputted string."] -#[doc = ""] - + #[doc = "Size of the outputted string."] + #[doc = ""] pub string_size: u32_, } #[doc = "Event relating to the mapping of memory."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MapEvent { -#[doc = "Mapped address."] -#[doc = ""] - + #[doc = "Mapped address."] + #[doc = ""] pub mapped_addr: u32_, -#[doc = "Mapped size."] -#[doc = ""] - + #[doc = "Mapped size."] + #[doc = ""] pub mapped_size: u32_, -#[doc = "Memory permissions. See @ref MemPerm."] -#[doc = ""] - + #[doc = "Memory permissions. See @ref MemPerm."] + #[doc = ""] pub memperm: MemPerm, -#[doc = "Memory state. See @ref MemState."] -#[doc = ""] - + #[doc = "Memory state. See @ref MemState."] + #[doc = ""] pub memstate: MemState, } impl Default for MapEvent { @@ -2569,66 +2494,52 @@ pub const DBGEVENT_MAP: DebugEventType = 12; pub type DebugEventType = ::libc::c_uint; #[doc = "Information about a debug event."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct DebugEventInfo { -#[doc = "Type of event. See @ref DebugEventType"] -#[doc = ""] - + #[doc = "Type of event. See @ref DebugEventType"] + #[doc = ""] pub type_: DebugEventType, -#[doc = "ID of the thread."] -#[doc = ""] - + #[doc = "ID of the thread."] + #[doc = ""] pub thread_id: u32_, -#[doc = "Flags. Bit0 means that @ref svcContinueDebugEvent needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] -#[doc = ""] - + #[doc = "Flags. Bit0 means that @ref svcContinueDebugEvent needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] + #[doc = ""] pub flags: u32_, -#[doc = "Always 0."] -#[doc = ""] - + #[doc = "Always 0."] + #[doc = ""] pub remnants: [u8_; 4usize], pub __bindgen_anon_1: DebugEventInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union DebugEventInfo__bindgen_ty_1 { -#[doc = "Process attachment event data."] -#[doc = ""] - + #[doc = "Process attachment event data."] + #[doc = ""] pub attach_process: AttachProcessEvent, -#[doc = "Thread attachment event data."] -#[doc = ""] - + #[doc = "Thread attachment event data."] + #[doc = ""] pub attach_thread: AttachThreadEvent, -#[doc = "Thread exit event data."] -#[doc = ""] - + #[doc = "Thread exit event data."] + #[doc = ""] pub exit_thread: ExitThreadEvent, -#[doc = "Process exit event data."] -#[doc = ""] - + #[doc = "Process exit event data."] + #[doc = ""] pub exit_process: ExitProcessEvent, -#[doc = "Exception event data."] -#[doc = ""] - + #[doc = "Exception event data."] + #[doc = ""] pub exception: ExceptionEvent, -#[doc = "Schedule in/out event data."] -#[doc = ""] - + #[doc = "Schedule in/out event data."] + #[doc = ""] pub scheduler: ScheduleInOutEvent, -#[doc = "Syscall in/out event data."] -#[doc = ""] - + #[doc = "Syscall in/out event data."] + #[doc = ""] pub syscall: SyscallInOutEvent, -#[doc = "Output string event data."] -#[doc = ""] - + #[doc = "Output string event data."] + #[doc = ""] pub output_string: OutputStringEvent, -#[doc = "Map event data."] -#[doc = ""] - + #[doc = "Map event data."] + #[doc = ""] pub map: MapEvent, } impl Default for DebugEventInfo__bindgen_ty_1 { @@ -2676,13 +2587,11 @@ pub type DebugFlags = ::libc::c_uint; #[repr(C)] #[derive(Copy, Clone)] pub struct ThreadContext { -#[doc = "CPU registers."] -#[doc = ""] - + #[doc = "CPU registers."] + #[doc = ""] pub cpu_registers: CpuRegisters, -#[doc = "FPU registers."] -#[doc = ""] - + #[doc = "FPU registers."] + #[doc = ""] pub fpu_registers: FpuRegisters, } impl Default for ThreadContext { @@ -2748,84 +2657,66 @@ pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3; pub type DebugThreadParameter = ::libc::c_uint; #[doc = "Information on address space for process. All sizes are in pages (0x1000 bytes)"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CodeSetInfo { -#[doc = "ASCII name of codeset"] -#[doc = ""] - + #[doc = "ASCII name of codeset"] + #[doc = ""] pub name: [u8_; 8usize], pub unk1: u16_, pub unk2: u16_, pub unk3: u32_, -#[doc = ".text start address"] -#[doc = ""] - + #[doc = ".text start address"] + #[doc = ""] pub text_addr: u32_, -#[doc = ".text number of pages"] -#[doc = ""] - + #[doc = ".text number of pages"] + #[doc = ""] pub text_size: u32_, -#[doc = ".rodata start address"] -#[doc = ""] - + #[doc = ".rodata start address"] + #[doc = ""] pub ro_addr: u32_, -#[doc = ".rodata number of pages"] -#[doc = ""] - + #[doc = ".rodata number of pages"] + #[doc = ""] pub ro_size: u32_, -#[doc = ".data, .bss start address"] -#[doc = ""] - + #[doc = ".data, .bss start address"] + #[doc = ""] pub rw_addr: u32_, -#[doc = ".data number of pages"] -#[doc = ""] - + #[doc = ".data number of pages"] + #[doc = ""] pub rw_size: u32_, -#[doc = "total pages for .text (aligned)"] -#[doc = ""] - + #[doc = "total pages for .text (aligned)"] + #[doc = ""] pub text_size_total: u32_, -#[doc = "total pages for .rodata (aligned)"] -#[doc = ""] - + #[doc = "total pages for .rodata (aligned)"] + #[doc = ""] pub ro_size_total: u32_, -#[doc = "total pages for .data, .bss (aligned)"] -#[doc = ""] - + #[doc = "total pages for .data, .bss (aligned)"] + #[doc = ""] pub rw_size_total: u32_, pub unk4: u32_, -#[doc = "Program ID"] -#[doc = ""] - + #[doc = "Program ID"] + #[doc = ""] pub program_id: u64_, } #[doc = "Information for the main thread of a process."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StartupInfo { -#[doc = "Priority of the main thread."] -#[doc = ""] - + #[doc = "Priority of the main thread."] + #[doc = ""] pub priority: ::libc::c_int, -#[doc = "Size of the stack of the main thread."] -#[doc = ""] - + #[doc = "Size of the stack of the main thread."] + #[doc = ""] pub stack_size: u32_, -#[doc = "Unused on retail kernel."] -#[doc = ""] - + #[doc = "Unused on retail kernel."] + #[doc = ""] pub argc: ::libc::c_int, -#[doc = "Unused on retail kernel."] -#[doc = ""] - + #[doc = "Unused on retail kernel."] + #[doc = ""] pub argv: *mut u16_, -#[doc = "Unused on retail kernel."] -#[doc = ""] - + #[doc = "Unused on retail kernel."] + #[doc = ""] pub envp: *mut u16_, } impl Default for StartupInfo { @@ -2839,24 +2730,23 @@ impl Default for StartupInfo { } extern "C" { #[must_use] -#[doc = "Controls memory mapping"] -#[doc = ""] -#[doc = "It has to be pointing to a RW memory."] -#[doc = "Use NULL if the operation is @ref MEMOP_FREE or @ref MEMOP_ALLOC."] -#[doc = "Value 0 is used when unmapping memory."] -#[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] -#[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] -#[doc = "More information is available at http://3dbrew.org/wiki/SVC#Memory_Mapping."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] -#[doc = "* `addr0` - The virtual address to be used for the operation."] -#[doc = "* `addr1` - The virtual address to be (un)mirrored by @p addr0 when using @ref MEMOP_MAP or @ref MEMOP_UNMAP."] -#[doc = "* `size` - The requested size for @ref MEMOP_ALLOC and @ref MEMOP_ALLOC_LINEAR."] -#[doc = "* `op` - Operation flags. See @ref MemOp."] -#[doc = "* `perm` - A combination of @ref MEMPERM_READ and @ref MEMPERM_WRITE. Using MEMPERM_EXECUTE will return an error."] - + #[doc = "Controls memory mapping"] + #[doc = ""] + #[doc = "It has to be pointing to a RW memory."] + #[doc = "Use NULL if the operation is @ref MEMOP_FREE or @ref MEMOP_ALLOC."] + #[doc = "Value 0 is used when unmapping memory."] + #[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] + #[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] + #[doc = "More information is available at http://3dbrew.org/wiki/SVC#Memory_Mapping."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] + #[doc = "* `addr0` - The virtual address to be used for the operation."] + #[doc = "* `addr1` - The virtual address to be (un)mirrored by @p addr0 when using @ref MEMOP_MAP or @ref MEMOP_UNMAP."] + #[doc = "* `size` - The requested size for @ref MEMOP_ALLOC and @ref MEMOP_ALLOC_LINEAR."] + #[doc = "* `op` - Operation flags. See @ref MemOp."] + #[doc = "* `perm` - A combination of @ref MEMPERM_READ and @ref MEMPERM_WRITE. Using MEMPERM_EXECUTE will return an error."] pub fn svcControlMemory( addr_out: *mut u32_, addr0: u32_, @@ -2868,19 +2758,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Controls the memory mapping of a process"] -#[doc = ""] -#[doc = ""] -#[doc = "This is the only SVC which allows mapping executable memory."] -#[doc = "Using @ref MEMOP_PROT will change the memory permissions of an already mapped memory."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `addr0` - The virtual address to map"] -#[doc = "* `addr1` - The virtual address to be mapped by @p addr0"] -#[doc = "* `type` - Only operations @ref MEMOP_MAP, @ref MEMOP_UNMAP and @ref MEMOP_PROT are allowed."] - + #[doc = "Controls the memory mapping of a process"] + #[doc = ""] + #[doc = ""] + #[doc = "This is the only SVC which allows mapping executable memory."] + #[doc = "Using @ref MEMOP_PROT will change the memory permissions of an already mapped memory."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr0` - The virtual address to map"] + #[doc = "* `addr1` - The virtual address to be mapped by @p addr0"] + #[doc = "* `type` - Only operations @ref MEMOP_MAP, @ref MEMOP_UNMAP and @ref MEMOP_PROT are allowed."] pub fn svcControlProcessMemory( process: Handle, addr0: u32_, @@ -2892,18 +2781,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a block of shared memory"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `memblock` - Pointer to store the handle of the block [Direction: In, Out]"] -#[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] -#[doc = "* `size` - Size of the memory to map, a multiple of 0x1000."] -#[doc = "* `my_perm` - Memory permissions for the current process"] -#[doc = "* `other_perm` - Memory permissions for the other processes"] - + #[doc = "Creates a block of shared memory"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `memblock` - Pointer to store the handle of the block [Direction: In, Out]"] + #[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] + #[doc = "* `size` - Size of the memory to map, a multiple of 0x1000."] + #[doc = "* `my_perm` - Memory permissions for the current process"] + #[doc = "* `other_perm` - Memory permissions for the other processes"] pub fn svcCreateMemoryBlock( memblock: *mut Handle, addr: u32_, @@ -2914,17 +2802,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Maps a block of shared memory"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `memblock` - Handle of the block"] -#[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] -#[doc = "* `my_perm` - Memory permissions for the current process"] -#[doc = "* `other_perm` - Memory permissions for the other processes"] - + #[doc = "Maps a block of shared memory"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `memblock` - Handle of the block"] + #[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] + #[doc = "* `my_perm` - Memory permissions for the current process"] + #[doc = "* `other_perm` - Memory permissions for the other processes"] pub fn svcMapMemoryBlock( memblock: Handle, addr: u32_, @@ -2934,62 +2821,57 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Maps a block of process memory, starting from address 0x00100000."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `destAddress` - Address of the block of memory to map, in the current (destination) process."] -#[doc = "* `size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] - + #[doc = "Maps a block of process memory, starting from address 0x00100000."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `destAddress` - Address of the block of memory to map, in the current (destination) process."] + #[doc = "* `size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Unmaps a block of process memory, starting from address 0x00100000."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `destAddress` - Address of the block of memory to unmap, in the current (destination) process."] -#[doc = "* `size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] - + #[doc = "Unmaps a block of process memory, starting from address 0x00100000."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `destAddress` - Address of the block of memory to unmap, in the current (destination) process."] + #[doc = "* `size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Unmaps a block of shared memory"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `memblock` - Handle of the block"] -#[doc = "* `addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] - + #[doc = "Unmaps a block of shared memory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `memblock` - Handle of the block"] + #[doc = "* `addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Queries memory information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] -#[doc = "* `out` - Pointer to output page info to."] -#[doc = "* `addr` - Virtual memory address to query."] - + #[doc = "Queries memory information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] + #[doc = "* `out` - Pointer to output page info to."] + #[doc = "* `addr` - Virtual memory address to query."] pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Queries process memory information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] -#[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] -#[doc = "* `process` - Process to query memory from."] -#[doc = "* `addr` - Virtual memory address to query."] - + #[doc = "Queries process memory information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] + #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] + #[doc = "* `process` - Process to query memory from."] + #[doc = "* `addr` - Virtual memory address to query."] pub fn svcQueryProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -2999,64 +2881,58 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the handle of a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - The handle of the process [Direction: In, Out]"] -#[doc = "* `processId` - The ID of the process to open"] - + #[doc = "Gets the handle of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - The handle of the process [Direction: In, Out]"] + #[doc = "* `processId` - The ID of the process to open"] pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result; } extern "C" { -#[doc = "Exits the current process."] -#[doc = ""] - + #[doc = "Exits the current process."] + #[doc = ""] pub fn svcExitProcess(); } extern "C" { #[must_use] -#[doc = "Terminates a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process to terminate."] - + #[doc = "Terminates a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process to terminate."] pub fn svcTerminateProcess(process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets information about a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output process info to. [Direction: In, Out]"] -#[doc = "* `process` - Handle of the process to get information about."] -#[doc = "* `type` - Type of information to retreieve."] - + #[doc = "Gets information about a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output process info to. [Direction: In, Out]"] + #[doc = "* `process` - Handle of the process to get information about."] + #[doc = "* `type` - Type of information to retreieve."] pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the ID of a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the process ID to. [Direction: In, Out]"] -#[doc = "* `handle` - Handle of the process to get the ID of."] - + #[doc = "Gets the ID of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the process ID to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle of the process to get the ID of."] pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a list of running processes."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `processCount` - Pointer to output the process count to. [Direction: In, Out]"] -#[doc = "* `processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] -#[doc = "* `processIdMaxCount` - Maximum number of process IDs."] - + #[doc = "Gets a list of running processes."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processCount` - Pointer to output the process count to. [Direction: In, Out]"] + #[doc = "* `processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] + #[doc = "* `processIdMaxCount` - Maximum number of process IDs."] pub fn svcGetProcessList( processCount: *mut s32, processIds: *mut u32_, @@ -3065,15 +2941,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a list of the threads of a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `threadCount` - Pointer to output the thread count to. [Direction: In, Out]"] -#[doc = "* `threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] -#[doc = "* `threadIdMaxCount` - Maximum number of thread IDs."] -#[doc = "* `process` - Process handle to list the threads of."] - + #[doc = "Gets a list of the threads of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `threadCount` - Pointer to output the thread count to. [Direction: In, Out]"] + #[doc = "* `threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] + #[doc = "* `threadIdMaxCount` - Maximum number of thread IDs."] + #[doc = "* `process` - Process handle to list the threads of."] pub fn svcGetThreadList( threadCount: *mut s32, threadIds: *mut u32_, @@ -3083,15 +2958,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `portServer` - Pointer to output the port server handle to. [Direction: In, Out]"] -#[doc = "* `portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] -#[doc = "* `name` - Name of the port."] -#[doc = "* `maxSessions` - Maximum number of sessions that can connect to the port."] - + #[doc = "Creates a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `portServer` - Pointer to output the port server handle to. [Direction: In, Out]"] + #[doc = "* `portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] + #[doc = "* `name` - Name of the port."] + #[doc = "* `maxSessions` - Maximum number of sessions that can connect to the port."] pub fn svcCreatePort( portServer: *mut Handle, portClient: *mut Handle, @@ -3101,27 +2975,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Connects to a port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the port handle to. [Direction: In, Out]"] -#[doc = "* `portName` - Name of the port."] - + #[doc = "Connects to a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the port handle to. [Direction: In, Out]"] + #[doc = "* `portName` - Name of the port."] pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Sets up virtual address space for a new process"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the code set handle to. [Direction: In, Out]"] -#[doc = "* `info` - Description for setting up the addresses"] -#[doc = "* `code_ptr` - Pointer to .text in shared memory"] -#[doc = "* `ro_ptr` - Pointer to .rodata in shared memory"] -#[doc = "* `data_ptr` - Pointer to .data in shared memory"] - + #[doc = "Sets up virtual address space for a new process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the code set handle to. [Direction: In, Out]"] + #[doc = "* `info` - Description for setting up the addresses"] + #[doc = "* `code_ptr` - Pointer to .text in shared memory"] + #[doc = "* `ro_ptr` - Pointer to .rodata in shared memory"] + #[doc = "* `data_ptr` - Pointer to .data in shared memory"] pub fn svcCreateCodeSet( out: *mut Handle, info: *const CodeSetInfo, @@ -3132,15 +3004,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets up virtual address space for a new process"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the process handle to. [Direction: In, Out]"] -#[doc = "* `codeset` - Codeset created for this process"] -#[doc = "* `arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] -#[doc = "* `arm11kernelcaps_num` - Number of kernel capabilities"] - + #[doc = "Sets up virtual address space for a new process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the process handle to. [Direction: In, Out]"] + #[doc = "* `codeset` - Codeset created for this process"] + #[doc = "* `arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] + #[doc = "* `arm11kernelcaps_num` - Number of kernel capabilities"] pub fn svcCreateProcess( out: *mut Handle, codeset: Handle, @@ -3150,14 +3021,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a process's affinity mask."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `processorcount` - Number of processors."] - + #[doc = "Gets a process's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `processorcount` - Number of processors."] pub fn svcGetProcessAffinityMask( affinitymask: *mut u8_, process: Handle, @@ -3166,14 +3036,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets a process's affinity mask."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] -#[doc = "* `processorcount` - Number of processors."] - + #[doc = "Sets a process's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] + #[doc = "* `processorcount` - Number of processors."] pub fn svcSetProcessAffinityMask( process: Handle, affinitymask: *const u8_, @@ -3182,58 +3051,54 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a process's ideal processor."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] -#[doc = "* `process` - Handle of the process."] - + #[doc = "Gets a process's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] + #[doc = "* `process` - Handle of the process."] pub fn svcGetProcessIdealProcessor(processorid: *mut s32, process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a process's ideal processor."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `processorid` - ID of the process's ideal processor."] - + #[doc = "Sets a process's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `processorid` - ID of the process's ideal processor."] pub fn svcSetProcessIdealProcessor(process: Handle, processorid: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Launches the main thread of the process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `info` - Pointer to a StartupInfo structure describing information for the main thread."] - + #[doc = "Launches the main thread of the process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `info` - Pointer to a StartupInfo structure describing information for the main thread."] pub fn svcRun(process: Handle, info: *const StartupInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a new thread."] -#[doc = ""] -#[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] -#[doc = "For old 3ds it has to be <2, and for new 3DS <4."] -#[doc = "Value -1 means all CPUs and -2 read from the Exheader."] -#[doc = "The processor with ID 1 is the system processor."] -#[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] -#[doc = "Since a thread is considered as a waitable object, you can use @ref svcWaitSynchronization"] -#[doc = "and @ref svcWaitSynchronizationN to join with it."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - The thread handle [Direction: In, Out]"] -#[doc = "* `entrypoint` - The function that will be called first upon thread creation"] -#[doc = "* `arg` - The argument passed to @p entrypoint"] -#[doc = "* `stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] -#[doc = "* `thread_priority` - Low values gives the thread higher priority."] -#[doc = "* `processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] - + #[doc = "Creates a new thread."] + #[doc = ""] + #[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] + #[doc = "For old 3ds it has to be <2, and for new 3DS <4."] + #[doc = "Value -1 means all CPUs and -2 read from the Exheader."] + #[doc = "The processor with ID 1 is the system processor."] + #[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] + #[doc = "Since a thread is considered as a waitable object, you can use @ref svcWaitSynchronization"] + #[doc = "and @ref svcWaitSynchronizationN to join with it."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - The thread handle [Direction: In, Out]"] + #[doc = "* `entrypoint` - The function that will be called first upon thread creation"] + #[doc = "* `arg` - The argument passed to @p entrypoint"] + #[doc = "* `stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] + #[doc = "* `thread_priority` - Low values gives the thread higher priority."] + #[doc = "* `processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] pub fn svcCreateThread( thread: *mut Handle, entrypoint: ThreadFunc, @@ -3245,64 +3110,58 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the handle of a thread."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - The handle of the thread [Direction: In, Out]"] -#[doc = "* `process` - The ID of the process linked to the thread"] - + #[doc = "Gets the handle of a thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - The handle of the thread [Direction: In, Out]"] + #[doc = "* `process` - The ID of the process linked to the thread"] pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result; } extern "C" { -#[doc = "Exits the current thread."] -#[doc = ""] -#[doc = ""] -#[doc = "This will trigger a state change and hence release all @ref svcWaitSynchronization operations."] -#[doc = "It means that you can join a thread by calling @code svcWaitSynchronization(threadHandle,yourtimeout); @endcode"] -#[doc = ""] - + #[doc = "Exits the current thread."] + #[doc = ""] + #[doc = ""] + #[doc = "This will trigger a state change and hence release all @ref svcWaitSynchronization operations."] + #[doc = "It means that you can join a thread by calling @code svcWaitSynchronization(threadHandle,yourtimeout); @endcode"] + #[doc = ""] pub fn svcExitThread(); } extern "C" { -#[doc = "Puts the current thread to sleep."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ns` - The minimum number of nanoseconds to sleep for."] - + #[doc = "Puts the current thread to sleep."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ns` - The minimum number of nanoseconds to sleep for."] pub fn svcSleepThread(ns: s64); } extern "C" { #[must_use] -#[doc = "Retrieves the priority of a thread."] -#[doc = ""] - + #[doc = "Retrieves the priority of a thread."] + #[doc = ""] pub fn svcGetThreadPriority(out: *mut s32, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Changes the priority of a thread"] -#[doc = ""] -#[doc = ""] -#[doc = "Low values gives the thread higher priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `prio` - For userland apps, this has to be within the range [0x18;0x3F]"] - + #[doc = "Changes the priority of a thread"] + #[doc = ""] + #[doc = ""] + #[doc = "Low values gives the thread higher priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `prio` - For userland apps, this has to be within the range [0x18;0x3F]"] pub fn svcSetThreadPriority(thread: Handle, prio: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a thread's affinity mask."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] -#[doc = "* `thread` - Handle of the thread."] -#[doc = "* `processorcount` - Number of processors."] - + #[doc = "Gets a thread's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] + #[doc = "* `thread` - Handle of the thread."] + #[doc = "* `processorcount` - Number of processors."] pub fn svcGetThreadAffinityMask( affinitymask: *mut u8_, thread: Handle, @@ -3311,14 +3170,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets a thread's affinity mask."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - Handle of the thread."] -#[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] -#[doc = "* `processorcount` - Number of processors."] - + #[doc = "Sets a thread's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - Handle of the thread."] + #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] + #[doc = "* `processorcount` - Number of processors."] pub fn svcSetThreadAffinityMask( thread: Handle, affinitymask: *const u8_, @@ -3327,65 +3185,59 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a thread's ideal processor."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] -#[doc = "* `thread` - Handle of the thread."] - + #[doc = "Gets a thread's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] + #[doc = "* `thread` - Handle of the thread."] pub fn svcGetThreadIdealProcessor(processorid: *mut s32, thread: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a thread's ideal processor."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - Handle of the thread."] -#[doc = "* `processorid` - ID of the thread's ideal processor."] - + #[doc = "Sets a thread's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - Handle of the thread."] + #[doc = "* `processorid` - ID of the thread's ideal processor."] pub fn svcSetThreadIdealProcessor(thread: Handle, processorid: s32) -> Result; } extern "C" { -#[doc = "Returns the ID of the processor the current thread is running on."] -#[doc = ""] - + #[doc = "Returns the ID of the processor the current thread is running on."] + #[doc = ""] pub fn svcGetProcessorID() -> s32; } extern "C" { #[must_use] -#[doc = "Gets the ID of a thread."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] -#[doc = "* `handle` - Handle of the thread."] - + #[doc = "Gets the ID of a thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle of the thread."] pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the resource limit set of a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] -#[doc = "* `process` - Process to get the resource limits of."] - + #[doc = "Gets the resource limit set of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] + #[doc = "* `process` - Process to get the resource limits of."] pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the value limits of a resource limit set."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `values` - Pointer to output the value limits to. [Direction: In, Out]"] -#[doc = "* `resourceLimit` - Resource limit set to use."] -#[doc = "* `names` - Resource limit names to get the limits of."] -#[doc = "* `nameCount` - Number of resource limit names."] - + #[doc = "Gets the value limits of a resource limit set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `values` - Pointer to output the value limits to. [Direction: In, Out]"] + #[doc = "* `resourceLimit` - Resource limit set to use."] + #[doc = "* `names` - Resource limit names to get the limits of."] + #[doc = "* `nameCount` - Number of resource limit names."] pub fn svcGetResourceLimitLimitValues( values: *mut s64, resourceLimit: Handle, @@ -3395,15 +3247,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the values of a resource limit set."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `values` - Pointer to output the values to. [Direction: In, Out]"] -#[doc = "* `resourceLimit` - Resource limit set to use."] -#[doc = "* `names` - Resource limit names to get the values of."] -#[doc = "* `nameCount` - Number of resource limit names."] - + #[doc = "Gets the values of a resource limit set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `values` - Pointer to output the values to. [Direction: In, Out]"] + #[doc = "* `resourceLimit` - Resource limit set to use."] + #[doc = "* `names` - Resource limit names to get the values of."] + #[doc = "* `nameCount` - Number of resource limit names."] pub fn svcGetResourceLimitCurrentValues( values: *mut s64, resourceLimit: Handle, @@ -3413,38 +3264,35 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the resource limit set of a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Process to set the resource limit set to."] -#[doc = "* `resourceLimit` - Resource limit set handle."] - + #[doc = "Sets the resource limit set of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Process to set the resource limit set to."] + #[doc = "* `resourceLimit` - Resource limit set handle."] pub fn svcSetProcessResourceLimits(process: Handle, resourceLimit: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a resource limit set."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] - + #[doc = "Creates a resource limit set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] pub fn svcCreateResourceLimit(resourceLimit: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the value limits of a resource limit set."] -#[doc = ""] -#[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `resourceLimit` - Resource limit set to use."] -#[doc = "* `names` - Resource limit names to set the limits of."] -#[doc = "* `values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] -#[doc = "* `nameCount` - Number of resource limit names."] - + #[doc = "Sets the value limits of a resource limit set."] + #[doc = ""] + #[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `resourceLimit` - Resource limit set to use."] + #[doc = "* `names` - Resource limit names to set the limits of."] + #[doc = "* `values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] + #[doc = "* `nameCount` - Number of resource limit names."] pub fn svcSetResourceLimitValues( resourceLimit: Handle, names: *const ResourceLimitType, @@ -3454,126 +3302,115 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the process ID of a thread."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] -#[doc = "* `handle` - Handle of the thread."] - + #[doc = "Gets the process ID of a thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle of the thread."] pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if a thread handle is valid."] -#[doc = ""] -#[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] -#[doc = ""] -#[doc = "Returns: 0xD8E007F7 (BAD_HANDLE) if it isn't."] -#[doc = ""] - + #[doc = "Checks if a thread handle is valid."] + #[doc = ""] + #[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] + #[doc = ""] + #[doc = "Returns: 0xD8E007F7 (BAD_HANDLE) if it isn't."] + #[doc = ""] pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a mutex."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] -#[doc = "* `initially_locked` - Whether the mutex should be initially locked."] - + #[doc = "Creates a mutex."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] + #[doc = "* `initially_locked` - Whether the mutex should be initially locked."] pub fn svcCreateMutex(mutex: *mut Handle, initially_locked: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Releases a mutex."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the mutex."] - + #[doc = "Releases a mutex."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the mutex."] pub fn svcReleaseMutex(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a semaphore."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] -#[doc = "* `initial_count` - Initial count of the semaphore."] -#[doc = "* `max_count` - Maximum count of the semaphore."] - + #[doc = "Creates a semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] + #[doc = "* `initial_count` - Initial count of the semaphore."] + #[doc = "* `max_count` - Maximum count of the semaphore."] pub fn svcCreateSemaphore(semaphore: *mut Handle, initial_count: s32, max_count: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Releases a semaphore."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] -#[doc = "* `semaphore` - Handle of the semaphore."] -#[doc = "* `release_count` - Number to increase the semaphore count by."] - + #[doc = "Releases a semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] + #[doc = "* `semaphore` - Handle of the semaphore."] + #[doc = "* `release_count` - Number to increase the semaphore count by."] pub fn svcReleaseSemaphore(count: *mut s32, semaphore: Handle, release_count: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Creates an event handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to output the created event handle to. [Direction: In, Out]"] -#[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] - + #[doc = "Creates an event handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the created event handle to. [Direction: In, Out]"] + #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] pub fn svcCreateEvent(event: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] -#[doc = "Signals an event."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the event to signal."] - + #[doc = "Signals an event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the event to signal."] pub fn svcSignalEvent(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Clears an event."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the event to clear."] - + #[doc = "Clears an event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the event to clear."] pub fn svcClearEvent(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for synchronization on a handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle to wait on."] -#[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] - + #[doc = "Waits for synchronization on a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle to wait on."] + #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] pub fn svcWaitSynchronization(handle: Handle, nanoseconds: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for synchronization on multiple handles."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the index of the synchronized handle to. [Direction: In, Out]"] -#[doc = "* `handles` - Handles to wait on."] -#[doc = "* `handles_num` - Number of handles."] -#[doc = "* `wait_all` - Whether to wait for synchronization on all handles."] -#[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] - + #[doc = "Waits for synchronization on multiple handles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the index of the synchronized handle to. [Direction: In, Out]"] + #[doc = "* `handles` - Handles to wait on."] + #[doc = "* `handles_num` - Number of handles."] + #[doc = "* `wait_all` - Whether to wait for synchronization on all handles."] + #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] pub fn svcWaitSynchronizationN( out: *mut s32, handles: *const Handle, @@ -3584,26 +3421,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates an address arbiter"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] - + #[doc = "Creates an address arbiter"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] pub fn svcCreateAddressArbiter(arbiter: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Arbitrate an address, can be used for synchronization"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `arbiter` - Handle of the arbiter"] -#[doc = "* `addr` - A pointer to a s32 value."] -#[doc = "* `type` - Type of action to be performed by the arbiter"] -#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] -#[doc = "* `timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use \\ref svcArbitrateAddressNoTimeout instead."] - + #[doc = "Arbitrate an address, can be used for synchronization"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `arbiter` - Handle of the arbiter"] + #[doc = "* `addr` - A pointer to a s32 value."] + #[doc = "* `type` - Type of action to be performed by the arbiter"] + #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] + #[doc = "* `timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use \\ref svcArbitrateAddressNoTimeout instead."] pub fn svcArbitrateAddress( arbiter: Handle, addr: u32_, @@ -3614,15 +3449,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Same as \\ref svcArbitrateAddress but with the timeout_ns parameter undefined."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `arbiter` - Handle of the arbiter"] -#[doc = "* `addr` - A pointer to a s32 value."] -#[doc = "* `type` - Type of action to be performed by the arbiter"] -#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] - + #[doc = "Same as \\ref svcArbitrateAddress but with the timeout_ns parameter undefined."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `arbiter` - Handle of the arbiter"] + #[doc = "* `addr` - A pointer to a s32 value."] + #[doc = "* `type` - Type of action to be performed by the arbiter"] + #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] pub fn svcArbitrateAddressNoTimeout( arbiter: Handle, addr: u32_, @@ -3632,58 +3466,53 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends a synchronized request to a session handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `session` - Handle of the session."] - + #[doc = "Sends a synchronized request to a session handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - Handle of the session."] pub fn svcSendSyncRequest(session: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Connects to a port via a handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] -#[doc = "* `clientPort` - Port client endpoint to connect to."] - + #[doc = "Connects to a port via a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] + #[doc = "* `clientPort` - Port client endpoint to connect to."] pub fn svcCreateSessionToPort(clientSession: *mut Handle, clientPort: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a linked pair of session endpoints."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] -#[doc = "* `clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] - + #[doc = "Creates a linked pair of session endpoints."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] + #[doc = "* `clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] pub fn svcCreateSession(serverSession: *mut Handle, clientSession: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Accepts a session."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `session` - Pointer to output the created session handle to. [Direction: In, Out]"] -#[doc = "* `port` - Handle of the port to accept a session from."] - + #[doc = "Accepts a session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - Pointer to output the created session handle to. [Direction: In, Out]"] + #[doc = "* `port` - Handle of the port to accept a session from."] pub fn svcAcceptSession(session: *mut Handle, port: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Replies to and receives a new request."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `index` - Pointer to the index of the request."] -#[doc = "* `handles` - Session handles to receive requests from."] -#[doc = "* `handleCount` - Number of handles."] -#[doc = "* `replyTarget` - Handle of the session to reply to."] - + #[doc = "Replies to and receives a new request."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `index` - Pointer to the index of the request."] + #[doc = "* `handles` - Session handles to receive requests from."] + #[doc = "* `handleCount` - Number of handles."] + #[doc = "* `replyTarget` - Handle of the session to reply to."] pub fn svcReplyAndReceive( index: *mut s32, handles: *const Handle, @@ -3693,121 +3522,110 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a timer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] -#[doc = "* `reset_type` - Type of reset to perform on the timer."] - + #[doc = "Creates a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] + #[doc = "* `reset_type` - Type of reset to perform on the timer."] pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a timer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timer` - Handle of the timer to set."] -#[doc = "* `initial` - Initial value of the timer."] -#[doc = "* `interval` - Interval of the timer."] - + #[doc = "Sets a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Handle of the timer to set."] + #[doc = "* `initial` - Initial value of the timer."] + #[doc = "* `interval` - Interval of the timer."] pub fn svcSetTimer(timer: Handle, initial: s64, interval: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels a timer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timer` - Handle of the timer to cancel."] - + #[doc = "Cancels a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Handle of the timer to cancel."] pub fn svcCancelTimer(timer: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Clears a timer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timer` - Handle of the timer to clear."] - + #[doc = "Clears a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Handle of the timer to clear."] pub fn svcClearTimer(timer: Handle) -> Result; } extern "C" { -#[doc = "Gets the current system tick."] -#[doc = ""] -#[doc = "Returns: The current system tick."] -#[doc = ""] - + #[doc = "Gets the current system tick."] + #[doc = ""] + #[doc = "Returns: The current system tick."] + #[doc = ""] pub fn svcGetSystemTick() -> u64_; } extern "C" { #[must_use] -#[doc = "Closes a handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle to close."] - + #[doc = "Closes a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle to close."] pub fn svcCloseHandle(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Duplicates a handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] -#[doc = "* `original` - Handle to duplicate."] - + #[doc = "Duplicates a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] + #[doc = "* `original` - Handle to duplicate."] pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a handle info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the handle info to. [Direction: In, Out]"] -#[doc = "* `handle` - Handle to get the info for."] -#[doc = "* `param` - Parameter clarifying the handle info type."] - + #[doc = "Gets a handle info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the handle info to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle to get the info for."] + #[doc = "* `param` - Parameter clarifying the handle info type."] pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the system info to. [Direction: In, Out]"] -#[doc = "* `type` - Type of system info to retrieve."] -#[doc = "* `param` - Parameter clarifying the system info type."] - + #[doc = "Gets the system info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the system info to. [Direction: In, Out]"] + #[doc = "* `type` - Type of system info to retrieve."] + #[doc = "* `param` - Parameter clarifying the system info type."] pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current kernel state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `type` - Type of state to set (the other parameters depend on it)."] - + #[doc = "Sets the current kernel state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Type of state to set (the other parameters depend on it)."] pub fn svcKernelSetState(type_: u32_, ...) -> Result; } extern "C" { #[must_use] -#[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `interruptId` - Interrupt identfier (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] -#[doc = "* `eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] -#[doc = "* `priority` - Priority of the interrupt for the current process."] -#[doc = "* `isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] - + #[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interruptId` - Interrupt identfier (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] + #[doc = "* `eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] + #[doc = "* `priority` - Priority of the interrupt for the current process."] + #[doc = "* `isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] pub fn svcBindInterrupt( interruptId: u32_, eventOrSemaphore: Handle, @@ -3817,65 +3635,60 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `interruptId` - Interrupt identfier, see (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] -#[doc = "* `eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] - + #[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interruptId` - Interrupt identfier, see (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] + #[doc = "* `eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates a process's data cache."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `addr` - Address to invalidate."] -#[doc = "* `size` - Size of the memory to invalidate."] - + #[doc = "Invalidates a process's data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `addr` - Address to invalidate."] + #[doc = "* `size` - Size of the memory to invalidate."] pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Cleans a process's data cache."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `addr` - Address to clean."] -#[doc = "* `size` - Size of the memory to clean."] - + #[doc = "Cleans a process's data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `addr` - Address to clean."] + #[doc = "* `size` - Size of the memory to clean."] pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes (cleans and invalidates) a process's data cache."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Handle of the process."] -#[doc = "* `addr` - Address to flush."] -#[doc = "* `size` - Size of the memory to flush."] - + #[doc = "Flushes (cleans and invalidates) a process's data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `addr` - Address to flush."] + #[doc = "* `size` - Size of the memory to flush."] pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Begins an inter-process DMA transfer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dma` - Pointer to output the handle of the DMA channel object to. [Direction: In, Out]"] -#[doc = "* `dstProcess` - Destination process handle."] -#[doc = "* `dstAddr` - Address in the destination process to write data to."] -#[doc = "* `srcProcess` - Source process handle."] -#[doc = "* `srcAddr` - Address in the source to read data from."] -#[doc = "* `size` - Size of the data to transfer."] -#[doc = "* `cfg` - Configuration structure."] - + #[doc = "Begins an inter-process DMA transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dma` - Pointer to output the handle of the DMA channel object to. [Direction: In, Out]"] + #[doc = "* `dstProcess` - Destination process handle."] + #[doc = "* `dstAddr` - Address in the destination process to write data to."] + #[doc = "* `srcProcess` - Source process handle."] + #[doc = "* `srcAddr` - Address in the source to read data from."] + #[doc = "* `size` - Size of the data to transfer."] + #[doc = "* `cfg` - Configuration structure."] pub fn svcStartInterProcessDma( dma: *mut Handle, dstProcess: Handle, @@ -3888,38 +3701,35 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Stops an inter-process DMA transfer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dma` - Handle of the DMA channel object."] - + #[doc = "Stops an inter-process DMA transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dma` - Handle of the DMA channel object."] pub fn svcStopDma(dma: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the state of an inter-process DMA transfer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] -#[doc = "* `dma` - Handle of the DMA channel object."] - + #[doc = "Gets the state of an inter-process DMA transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] + #[doc = "* `dma` - Handle of the DMA channel object."] pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Restarts a DMA transfer, using the same configuration as before."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] -#[doc = "* `dma` - Handle of the DMA channel object."] -#[doc = "* `dstAddr` - Address in the destination process to write data to."] -#[doc = "* `srcAddr` - Address in the source to read data from."] -#[doc = "* `size` - Size of the data to transfer."] -#[doc = "* `flags` - Restart flags, \\ref DMARST_UNLOCK and/or \\ref DMARST_RESUME_DEVICE."] - + #[doc = "Restarts a DMA transfer, using the same configuration as before."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] + #[doc = "* `dma` - Handle of the DMA channel object."] + #[doc = "* `dstAddr` - Address in the destination process to write data to."] + #[doc = "* `srcAddr` - Address in the source to read data from."] + #[doc = "* `size` - Size of the data to transfer."] + #[doc = "* `flags` - Restart flags, \\ref DMARST_UNLOCK and/or \\ref DMARST_RESUME_DEVICE."] pub fn svcRestartDma( dma: Handle, dstAddr: u32_, @@ -3930,42 +3740,38 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] - + #[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Enables or disables Wi-Fi. 11.4+ only."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enabled` - Whether to enable or disable Wi-Fi."] - + #[doc = "Enables or disables Wi-Fi. 11.4+ only."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enabled` - Whether to enable or disable Wi-Fi."] pub fn svcSetWifiEnabled(enabled: bool) -> Result; } extern "C" { -#[doc = "Breaks execution."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `breakReason` - Reason for breaking."] - + #[doc = "Breaks execution."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `breakReason` - Reason for breaking."] pub fn svcBreak(breakReason: UserBreakType); } extern "C" { -#[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `breakReason` - Debug reason for breaking."] -#[doc = "* `croInfo` - Library information."] -#[doc = "* `croInfoSize` - Size of the above structure."] - + #[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `breakReason` - Debug reason for breaking."] + #[doc = "* `croInfo` - Library information."] + #[doc = "* `croInfoSize` - Size of the above structure."] pub fn svcBreakRO( breakReason: UserBreakType, croInfo: *const ::libc::c_void, @@ -3974,44 +3780,42 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Outputs a debug string."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `str` - String to output."] -#[doc = "* `length` - Length of the string to output, needs to be positive."] - + #[doc = "Outputs a debug string."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `str` - String to output."] + #[doc = "* `length` - Length of the string to output, needs to be positive."] pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Controls performance monitoring on the CP15 interface and the SCU."] -#[doc = ""] -#[doc = "The meaning of the parameters depend on the operation."] -#[doc = "The operations are the following:"] -#[doc = "- \\ref PERFCOUNTEROP_ENABLE (void) -> void, tries to enable and lock perfmon. functionality."] -#[doc = "- \\ref PERFCOUNTEROP_DISABLE (void) -> void, disable and forcibly unlocks perfmon. functionality."] -#[doc = "- \\ref PERFCOUNTEROP_GET_VALUE (\\ref PerfCounterRegister reg) -> u64, gets the value of a particular counter register."] -#[doc = "- \\ref PERFCOUNTEROP_SET_VALUE (\\ref PerfCounterRegister reg, u64 value) -> void, sets the value of a particular counter register."] -#[doc = "- \\ref PERFCOUNTEROP_GET_OVERFLOW_FLAGS (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] -#[doc = "- Format is a bitfield of \\ref PerfCounterRegister."] -#[doc = "- \\ref PERFCOUNTEROP_RESET (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] -#[doc = "overflow flags of selected registers."] -#[doc = "- Format is two bitfields of \\ref PerfCounterRegister."] -#[doc = "- \\ref PERFCOUNTEROP_GET_EVENT (\\ref PerfCounterRegister reg) -> \\ref PerfCounterEvent, gets the event associated"] -#[doc = "to a particular counter register."] -#[doc = "- \\ref PERFCOUNTEROP_SET_EVENT (\\ref PerfCounterRegister reg, \\ref PerfCounterEvent) -> void, sets the event associated"] -#[doc = "to a particular counter register."] -#[doc = "- \\ref PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] -#[doc = "and to use 64-bit counter values."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output. [Direction: In, Out]"] -#[doc = "* `op` - Operation, see details."] -#[doc = "* `param1` - First parameter."] -#[doc = "* `param2` - Second parameter."] - + #[doc = "Controls performance monitoring on the CP15 interface and the SCU."] + #[doc = ""] + #[doc = "The meaning of the parameters depend on the operation."] + #[doc = "The operations are the following:"] + #[doc = "- \\ref PERFCOUNTEROP_ENABLE (void) -> void, tries to enable and lock perfmon. functionality."] + #[doc = "- \\ref PERFCOUNTEROP_DISABLE (void) -> void, disable and forcibly unlocks perfmon. functionality."] + #[doc = "- \\ref PERFCOUNTEROP_GET_VALUE (\\ref PerfCounterRegister reg) -> u64, gets the value of a particular counter register."] + #[doc = "- \\ref PERFCOUNTEROP_SET_VALUE (\\ref PerfCounterRegister reg, u64 value) -> void, sets the value of a particular counter register."] + #[doc = "- \\ref PERFCOUNTEROP_GET_OVERFLOW_FLAGS (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] + #[doc = "- Format is a bitfield of \\ref PerfCounterRegister."] + #[doc = "- \\ref PERFCOUNTEROP_RESET (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] + #[doc = "overflow flags of selected registers."] + #[doc = "- Format is two bitfields of \\ref PerfCounterRegister."] + #[doc = "- \\ref PERFCOUNTEROP_GET_EVENT (\\ref PerfCounterRegister reg) -> \\ref PerfCounterEvent, gets the event associated"] + #[doc = "to a particular counter register."] + #[doc = "- \\ref PERFCOUNTEROP_SET_EVENT (\\ref PerfCounterRegister reg, \\ref PerfCounterEvent) -> void, sets the event associated"] + #[doc = "to a particular counter register."] + #[doc = "- \\ref PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] + #[doc = "and to use 64-bit counter values."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output. [Direction: In, Out]"] + #[doc = "* `op` - Operation, see details."] + #[doc = "* `param1` - First parameter."] + #[doc = "* `param2` - Second parameter."] pub fn svcControlPerformanceCounter( out: *mut u64_, op: PerfCounterOperation, @@ -4021,68 +3825,62 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a debug handle for an active process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] -#[doc = "* `processId` - ID of the process to debug."] - + #[doc = "Creates a debug handle for an active process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] + #[doc = "* `processId` - ID of the process to debug."] pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Breaks a debugged process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `debug` - Debug handle of the process."] - + #[doc = "Breaks a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] pub fn svcBreakDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates a debugged process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `debug` - Debug handle of the process."] - + #[doc = "Terminates a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] pub fn svcTerminateDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current debug event of a debugged process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output the debug event information to. [Direction: In, Out]"] -#[doc = "* `debug` - Debug handle of the process."] - + #[doc = "Gets the current debug event of a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the debug event information to. [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the process."] pub fn svcGetProcessDebugEvent(info: *mut DebugEventInfo, debug: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Continues the current debug event of a debugged process (not necessarily the same as @ref svcGetProcessDebugEvent)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `debug` - Debug handle of the process."] -#[doc = "* `flags` - Flags to continue with, see @ref DebugFlags."] - + #[doc = "Continues the current debug event of a debugged process (not necessarily the same as @ref svcGetProcessDebugEvent)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `flags` - Flags to continue with, see @ref DebugFlags."] pub fn svcContinueDebugEvent(debug: Handle, flags: DebugFlags) -> Result; } extern "C" { #[must_use] -#[doc = "Fetches the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Values of the registers to fetch, see @ref ThreadContext. [Direction: In, Out]"] -#[doc = "* `debug` - Debug handle of the parent process."] -#[doc = "* `threadId` - ID of the thread to fetch the saved registers of."] -#[doc = "* `controlFlags` - Which registers to fetch, see @ref ThreadContextControlFlags."] - + #[doc = "Fetches the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Values of the registers to fetch, see @ref ThreadContext. [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the parent process."] + #[doc = "* `threadId` - ID of the thread to fetch the saved registers of."] + #[doc = "* `controlFlags` - Which registers to fetch, see @ref ThreadContextControlFlags."] pub fn svcGetDebugThreadContext( context: *mut ThreadContext, debug: Handle, @@ -4092,15 +3890,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Updates the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `debug` - Debug handle of the parent process."] -#[doc = "* `threadId` - ID of the thread to update the saved registers of."] -#[doc = "* `context` - Values of the registers to update, see @ref ThreadContext."] -#[doc = "* `controlFlags` - Which registers to update, see @ref ThreadContextControlFlags."] - + #[doc = "Updates the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the parent process."] + #[doc = "* `threadId` - ID of the thread to update the saved registers of."] + #[doc = "* `context` - Values of the registers to update, see @ref ThreadContext."] + #[doc = "* `controlFlags` - Which registers to update, see @ref ThreadContextControlFlags."] pub fn svcSetDebugThreadContext( debug: Handle, threadId: u32_, @@ -4110,15 +3907,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Queries memory information of a debugged process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] -#[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] -#[doc = "* `debug` - Debug handle of the process to query memory from."] -#[doc = "* `addr` - Virtual memory address to query."] - + #[doc = "Queries memory information of a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] + #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the process to query memory from."] + #[doc = "* `addr` - Virtual memory address to query."] pub fn svcQueryDebugProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -4128,15 +3924,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a debugged process's memory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buffer` - Buffer to read data to."] -#[doc = "* `debug` - Debug handle of the process."] -#[doc = "* `addr` - Address to read from."] -#[doc = "* `size` - Size of the memory to read."] - + #[doc = "Reads from a debugged process's memory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buffer` - Buffer to read data to."] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `addr` - Address to read from."] + #[doc = "* `size` - Size of the memory to read."] pub fn svcReadProcessMemory( buffer: *mut ::libc::c_void, debug: Handle, @@ -4146,15 +3941,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a debugged process's memory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `debug` - Debug handle of the process."] -#[doc = "* `buffer` - Buffer to write data from."] -#[doc = "* `addr` - Address to write to."] -#[doc = "* `size` - Size of the memory to write."] - + #[doc = "Writes to a debugged process's memory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `buffer` - Buffer to write data from."] + #[doc = "* `addr` - Address to write to."] + #[doc = "* `size` - Size of the memory to write."] pub fn svcWriteProcessMemory( debug: Handle, buffer: *const ::libc::c_void, @@ -4164,28 +3958,26 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see http://infocenter.arm.com/help/topic/com.arm.doc.ddi0360f/CEGEBGFC.html ."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] -#[doc = "* `control` - Value of the control regiser."] -#[doc = "* `value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] - + #[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see http://infocenter.arm.com/help/topic/com.arm.doc.ddi0360f/CEGEBGFC.html ."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] + #[doc = "* `control` - Value of the control regiser."] + #[doc = "* `value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a debugged thread's parameter."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `unused` - Unused. [Direction: In, Out]"] -#[doc = "* `out` - Output value. [Direction: In, Out]"] -#[doc = "* `debug` - Debug handle of the process."] -#[doc = "* `threadId` - ID of the thread"] -#[doc = "* `parameter` - Parameter to fetch, see @ref DebugThreadParameter."] - + #[doc = "Gets a debugged thread's parameter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unused` - Unused. [Direction: In, Out]"] + #[doc = "* `out` - Output value. [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `threadId` - ID of the thread"] + #[doc = "* `parameter` - Parameter to fetch, see @ref DebugThreadParameter."] pub fn svcGetDebugThreadParam( unused: *mut s64, out: *mut u32_, @@ -4196,12 +3988,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a function in supervisor mode."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `callback` - Function to execute."] - + #[doc = "Executes a function in supervisor mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `callback` - Function to execute."] pub fn svcBackdoor(callback: ::core::option::Option s32>) -> Result; } #[doc = "Mount \"nand:/\""] @@ -4390,19 +4181,16 @@ pub const SYSMODE_DEV4: SystemMode = 5; pub type SystemMode = ::libc::c_uint; #[doc = "The system info flags and remaster version of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_SystemInfoFlags { -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 5usize], pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Remaster version"] -#[doc = ""] - + #[doc = "Remaster version"] + #[doc = ""] pub remaster_version: u16_, } impl ExHeader_SystemInfoFlags { @@ -4447,79 +4235,62 @@ impl ExHeader_SystemInfoFlags { } #[doc = "Information about a title's section"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSectionInfo { -#[doc = "The address of the section"] -#[doc = ""] - + #[doc = "The address of the section"] + #[doc = ""] pub address: u32_, -#[doc = "The number of pages the section occupies"] -#[doc = ""] - + #[doc = "The number of pages the section occupies"] + #[doc = ""] pub num_pages: u32_, -#[doc = "The size of the section"] -#[doc = ""] - + #[doc = "The size of the section"] + #[doc = ""] pub size: u32_, } #[doc = "The name of a title and infomation about its section"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSetInfo { -#[doc = "Title name"] -#[doc = ""] - + #[doc = "Title name"] + #[doc = ""] pub name: [::libc::c_char; 8usize], -#[doc = "System info flags, see @ref ExHeader_SystemInfoFlags"] -#[doc = ""] - + #[doc = "System info flags, see @ref ExHeader_SystemInfoFlags"] + #[doc = ""] pub flags: ExHeader_SystemInfoFlags, -#[doc = ".text section info, see @ref ExHeader_CodeSectionInfo"] -#[doc = ""] - + #[doc = ".text section info, see @ref ExHeader_CodeSectionInfo"] + #[doc = ""] pub text: ExHeader_CodeSectionInfo, -#[doc = "Stack size"] -#[doc = ""] - + #[doc = "Stack size"] + #[doc = ""] pub stack_size: u32_, -#[doc = ".rodata section info, see @ref ExHeader_CodeSectionInfo"] -#[doc = ""] - + #[doc = ".rodata section info, see @ref ExHeader_CodeSectionInfo"] + #[doc = ""] pub rodata: ExHeader_CodeSectionInfo, -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: u32_, -#[doc = ".data section info, see @ref ExHeader_CodeSectionInfo"] -#[doc = ""] - + #[doc = ".data section info, see @ref ExHeader_CodeSectionInfo"] + #[doc = ""] pub data: ExHeader_CodeSectionInfo, -#[doc = ".bss section size"] -#[doc = ""] - + #[doc = ".bss section size"] + #[doc = ""] pub bss_size: u32_, } #[doc = "The savedata size and jump ID of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemInfo { -#[doc = "Savedata size"] -#[doc = ""] - + #[doc = "Savedata size"] + #[doc = ""] pub savedata_size: u64_, -#[doc = "Jump ID"] -#[doc = ""] - + #[doc = "Jump ID"] + #[doc = ""] pub jump_id: u64_, -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 48usize], } impl Default for ExHeader_SystemInfo { @@ -4533,21 +4304,17 @@ impl Default for ExHeader_SystemInfo { } #[doc = "The code set info, dependencies and system info of a title (SCI)"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemControlInfo { -#[doc = "Code set info, see @ref ExHeader_CodeSetInfo"] -#[doc = ""] - + #[doc = "Code set info, see @ref ExHeader_CodeSetInfo"] + #[doc = ""] pub codeset_info: ExHeader_CodeSetInfo, -#[doc = "Title IDs of the titles that this program depends on"] -#[doc = ""] - + #[doc = "Title IDs of the titles that this program depends on"] + #[doc = ""] pub dependencies: [u64_; 48usize], -#[doc = "System info, see @ref ExHeader_SystemInfo"] -#[doc = ""] - + #[doc = "System info, see @ref ExHeader_SystemInfo"] + #[doc = ""] pub system_info: ExHeader_SystemInfo, } impl Default for ExHeader_SystemControlInfo { @@ -4561,25 +4328,20 @@ impl Default for ExHeader_SystemControlInfo { } #[doc = "The ARM11 filesystem info of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11StorageInfo { -#[doc = "Extdata ID"] -#[doc = ""] - + #[doc = "Extdata ID"] + #[doc = ""] pub extdata_id: u64_, -#[doc = "IDs of the system savedata accessible by the title"] -#[doc = ""] - + #[doc = "IDs of the system savedata accessible by the title"] + #[doc = ""] pub system_savedata_ids: [u32_; 2usize], -#[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] -#[doc = ""] - + #[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] + #[doc = ""] pub accessible_savedata_ids: u64_, -#[doc = "FS access flags"] -#[doc = ""] - + #[doc = "FS access flags"] + #[doc = ""] pub fs_access_info: u32_, pub _bitfield_align_1: [u32; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, @@ -4643,19 +4405,16 @@ impl ExHeader_Arm11StorageInfo { } #[doc = "The CPU-related and memory-layout-related info of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11CoreInfo { -#[doc = "The low title ID of the target firmware"] -#[doc = ""] - + #[doc = "The low title ID of the target firmware"] + #[doc = ""] pub core_version: u32_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, -#[doc = "The priority of the title's main thread"] -#[doc = ""] - + #[doc = "The priority of the title's main thread"] + #[doc = ""] pub priority: u8_, } impl Default for ExHeader_Arm11CoreInfo { @@ -4806,37 +4565,29 @@ impl ExHeader_Arm11CoreInfo { } #[doc = "The ARM11 system-local capabilities of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11SystemLocalCapabilities { -#[doc = "Title ID"] -#[doc = ""] - + #[doc = "Title ID"] + #[doc = ""] pub title_id: u64_, -#[doc = "Core info, see @ref ExHeader_Arm11CoreInfo"] -#[doc = ""] - + #[doc = "Core info, see @ref ExHeader_Arm11CoreInfo"] + #[doc = ""] pub core_info: ExHeader_Arm11CoreInfo, -#[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] -#[doc = ""] - + #[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] + #[doc = ""] pub reslimits: [u16_; 16usize], -#[doc = "Storage info, see @ref ExHeader_Arm11StorageInfo"] -#[doc = ""] - + #[doc = "Storage info, see @ref ExHeader_Arm11StorageInfo"] + #[doc = ""] pub storage_info: ExHeader_Arm11StorageInfo, -#[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] -#[doc = ""] - + #[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] + #[doc = ""] pub service_access: [[::libc::c_char; 8usize]; 34usize], -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 15usize], -#[doc = "Resource limit category, see @ref ExHeader_Arm11SystemLocalCapabilities"] -#[doc = ""] - + #[doc = "Resource limit category, see @ref ExHeader_Arm11SystemLocalCapabilities"] + #[doc = ""] pub reslimit_category: ResourceLimitCategory, } impl Default for ExHeader_Arm11SystemLocalCapabilities { @@ -4850,51 +4601,41 @@ impl Default for ExHeader_Arm11SystemLocalCapabilities { } #[doc = "The ARM11 kernel capabilities of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11KernelCapabilities { -#[doc = "ARM11 kernel descriptors, see 3dbrew"] -#[doc = ""] - + #[doc = "ARM11 kernel descriptors, see 3dbrew"] + #[doc = ""] pub descriptors: [u32_; 28usize], -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 16usize], } #[doc = "The ARM9 access control of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm9AccessControl { -#[doc = "Process9 FS descriptors, see 3dbrew"] -#[doc = ""] - + #[doc = "Process9 FS descriptors, see 3dbrew"] + #[doc = ""] pub descriptors: [u8_; 15usize], -#[doc = "Descriptor version"] -#[doc = ""] - + #[doc = "Descriptor version"] + #[doc = ""] pub descriptor_version: u8_, } #[doc = "The access control information of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessControlInfo { -#[doc = "ARM11 system-local capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] -#[doc = ""] - + #[doc = "ARM11 system-local capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] + #[doc = ""] pub local_caps: ExHeader_Arm11SystemLocalCapabilities, -#[doc = "ARM11 kernel capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] -#[doc = ""] - + #[doc = "ARM11 kernel capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] + #[doc = ""] pub kernel_caps: ExHeader_Arm11KernelCapabilities, -#[doc = "ARM9 access control, see @ref ExHeader_Arm9AccessControl"] -#[doc = ""] - + #[doc = "ARM9 access control, see @ref ExHeader_Arm9AccessControl"] + #[doc = ""] pub access_control: ExHeader_Arm9AccessControl, } impl Default for ExHeader_AccessControlInfo { @@ -4908,17 +4649,14 @@ impl Default for ExHeader_AccessControlInfo { } #[doc = "Main extended header data, as returned by PXIPM, Loader and FSREG service commands"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Info { -#[doc = "System control info, see @ref ExHeader_SystemControlInfo"] -#[doc = ""] - + #[doc = "System control info, see @ref ExHeader_SystemControlInfo"] + #[doc = ""] pub sci: ExHeader_SystemControlInfo, -#[doc = "Access control info, see @ref ExHeader_AccessControlInfo"] -#[doc = ""] - + #[doc = "Access control info, see @ref ExHeader_AccessControlInfo"] + #[doc = ""] pub aci: ExHeader_AccessControlInfo, } impl Default for ExHeader_Info { @@ -4932,21 +4670,17 @@ impl Default for ExHeader_Info { } #[doc = "Extended header access descriptor"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessDescriptor { -#[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] -#[doc = ""] - + #[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] + #[doc = ""] pub signature: [u8_; 256usize], -#[doc = "The modulus used for the above signature, with 65537 as public exponent"] -#[doc = ""] - + #[doc = "The modulus used for the above signature, with 65537 as public exponent"] + #[doc = ""] pub ncchModulus: [u8_; 256usize], -#[doc = "This is compared for equality with the first ACI by Process9, see @ref ExHeader_AccessControlInfo"] -#[doc = ""] - + #[doc = "This is compared for equality with the first ACI by Process9, see @ref ExHeader_AccessControlInfo"] + #[doc = ""] pub acli: ExHeader_AccessControlInfo, } impl Default for ExHeader_AccessDescriptor { @@ -4960,17 +4694,14 @@ impl Default for ExHeader_AccessDescriptor { } #[doc = "The NCCH Extended Header of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader { -#[doc = "Main extended header data, see @ref ExHeader_Info"] -#[doc = ""] - + #[doc = "Main extended header data, see @ref ExHeader_Info"] + #[doc = ""] pub info: ExHeader_Info, -#[doc = "Access descriptor, see @ref ExHeader_AccessDescriptor"] -#[doc = ""] - + #[doc = "Access descriptor, see @ref ExHeader_AccessDescriptor"] + #[doc = ""] pub access_descriptor: ExHeader_AccessDescriptor, } impl Default for ExHeader { @@ -4984,80 +4715,72 @@ impl Default for ExHeader { } extern "C" { #[must_use] -#[doc = "Initializes the service API."] -#[doc = ""] - + #[doc = "Initializes the service API."] + #[doc = ""] pub fn srvInit() -> Result; } extern "C" { -#[doc = "Exits the service API."] -#[doc = ""] - + #[doc = "Exits the service API."] + #[doc = ""] pub fn srvExit(); } extern "C" { -#[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] -#[doc = ""] -#[doc = "srvGetServiceHandle will always block if the service hasn't been registered yet,"] -#[doc = "use srvIsServiceRegistered to check whether that is the case or not."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `blocking` - Whether srvGetServiceHandle should be non-blocking."] - + #[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] + #[doc = ""] + #[doc = "srvGetServiceHandle will always block if the service hasn't been registered yet,"] + #[doc = "use srvIsServiceRegistered to check whether that is the case or not."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `blocking` - Whether srvGetServiceHandle should be non-blocking."] pub fn srvSetBlockingPolicy(nonBlocking: bool); } extern "C" { -#[doc = "Gets the current service API session handle."] -#[doc = ""] -#[doc = "Returns: The current service API session handle."] -#[doc = ""] - + #[doc = "Gets the current service API session handle."] + #[doc = ""] + #[doc = "Returns: The current service API session handle."] + #[doc = ""] pub fn srvGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] -#[doc = ""] -#[doc = "0xD8E06406 if the caller has no right to access the service,"] -#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] -#[doc = ""] -#[doc = "Returns: 0 if no error occured,"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the handle to."] -#[doc = "* `name` - Name of the service."] - + #[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] + #[doc = ""] + #[doc = "0xD8E06406 if the caller has no right to access the service,"] + #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] + #[doc = ""] + #[doc = "Returns: 0 if no error occured,"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the handle to."] + #[doc = "* `name` - Name of the service."] pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Registers the current process as a client to the service API."] -#[doc = ""] - + #[doc = "Registers the current process as a client to the service API."] + #[doc = ""] pub fn srvRegisterClient() -> Result; } extern "C" { #[must_use] -#[doc = "Enables service notificatios, returning a notification semaphore."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `semaphoreOut` - Pointer to output the notification semaphore to."] - + #[doc = "Enables service notificatios, returning a notification semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphoreOut` - Pointer to output the notification semaphore to."] pub fn srvEnableNotification(semaphoreOut: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Registers the current process as a service."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the service handle to."] -#[doc = "* `name` - Name of the service."] -#[doc = "* `maxSessions` - Maximum number of sessions the service can handle."] - + #[doc = "Registers the current process as a service."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the service handle to."] + #[doc = "* `name` - Name of the service."] + #[doc = "* `maxSessions` - Maximum number of sessions the service can handle."] pub fn srvRegisterService( out: *mut Handle, name: *const ::libc::c_char, @@ -5066,123 +4789,112 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters the current process as a service."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Name of the service."] - + #[doc = "Unregisters the current process as a service."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the service."] pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves a service handle."] -#[doc = ""] -#[doc = "0xD8E06406 if the caller has no right to access the service,"] -#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] -#[doc = ""] -#[doc = "Returns: 0 if no error occured,"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the handle to."] -#[doc = "* `name` - Name of the service."] - + #[doc = "Retrieves a service handle."] + #[doc = ""] + #[doc = "0xD8E06406 if the caller has no right to access the service,"] + #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] + #[doc = ""] + #[doc = "Returns: 0 if no error occured,"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the handle to."] + #[doc = "* `name` - Name of the service."] pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Registers a port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Name of the port."] -#[doc = "* `clientHandle` - Client handle of the port."] - + #[doc = "Registers a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the port."] + #[doc = "* `clientHandle` - Client handle of the port."] pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Unregisters a port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Name of the port."] - + #[doc = "Unregisters a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the port."] pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves a port handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the handle to."] -#[doc = "* `name` - Name of the port."] - + #[doc = "Retrieves a port handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the handle to."] + #[doc = "* `name` - Name of the port."] pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for a port to be registered."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Name of the port to wait for registration."] - + #[doc = "Waits for a port to be registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the port to wait for registration."] pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Subscribes to a notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `notificationId` - ID of the notification."] - + #[doc = "Subscribes to a notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] pub fn srvSubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Unsubscribes from a notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `notificationId` - ID of the notification."] - + #[doc = "Unsubscribes from a notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] pub fn srvUnsubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Receives a notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `notificationIdOut` - Pointer to output the ID of the received notification to."] - + #[doc = "Receives a notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationIdOut` - Pointer to output the ID of the received notification to."] pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Publishes a notification to subscribers."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `notificationId` - ID of the notification."] -#[doc = "* `flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] - + #[doc = "Publishes a notification to subscribers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = "* `flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `processIdCountOut` - Pointer to output the number of process IDs to."] -#[doc = "* `processIdsOut` - Pointer to output the process IDs to. Should have size \"60 * sizeof(u32)\"."] -#[doc = "* `notificationId` - ID of the notification."] - + #[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processIdCountOut` - Pointer to output the number of process IDs to."] + #[doc = "* `processIdsOut` - Pointer to output the process IDs to. Should have size \"60 * sizeof(u32)\"."] + #[doc = "* `notificationId` - ID of the notification."] pub fn srvPublishAndGetSubscriber( processIdCountOut: *mut u32_, processIdsOut: *mut u32_, @@ -5191,24 +4903,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks whether a service is registered."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `registeredOut` - Pointer to output the registration status to."] -#[doc = "* `name` - Name of the service to check."] - + #[doc = "Checks whether a service is registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `registeredOut` - Pointer to output the registration status to."] + #[doc = "* `name` - Name of the service to check."] pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Checks whether a port is registered."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `registeredOut` - Pointer to output the registration status to."] -#[doc = "* `name` - Name of the port to check."] - + #[doc = "Checks whether a port is registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `registeredOut` - Pointer to output the registration status to."] + #[doc = "* `name` - Name of the port to check."] pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } #[doc = "For generic errors. Shows miscellaneous info."] @@ -5262,18 +4972,15 @@ pub type ERRF_ExceptionType = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionInfo { -#[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] -#[doc = ""] - + #[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] + #[doc = ""] pub type_: ERRF_ExceptionType, pub reserved: [u8_; 3usize], -#[doc = "ifsr (prefetch abort) / dfsr (data abort)"] -#[doc = ""] - + #[doc = "ifsr (prefetch abort) / dfsr (data abort)"] + #[doc = ""] pub fsr: u32_, -#[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] -#[doc = ""] - + #[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] + #[doc = ""] pub far: u32_, pub fpexc: u32_, pub fpinst: u32_, @@ -5291,13 +4998,11 @@ impl Default for ERRF_ExceptionInfo { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionData { -#[doc = "Exception info struct"] -#[doc = ""] - + #[doc = "Exception info struct"] + #[doc = ""] pub excep: ERRF_ExceptionInfo, -#[doc = "CPU register dump."] -#[doc = ""] - + #[doc = "CPU register dump."] + #[doc = ""] pub regs: CpuRegisters, } impl Default for ERRF_ExceptionData { @@ -5312,53 +5017,42 @@ impl Default for ERRF_ExceptionData { #[repr(C)] #[derive(Copy, Clone)] pub struct ERRF_FatalErrInfo { -#[doc = "Type, one of the ERRF_ERRTYPE_* enum"] -#[doc = ""] - + #[doc = "Type, one of the ERRF_ERRTYPE_* enum"] + #[doc = ""] pub type_: ERRF_ErrType, -#[doc = "High revison ID"] -#[doc = ""] - + #[doc = "High revison ID"] + #[doc = ""] pub revHigh: u8_, -#[doc = "Low revision ID"] -#[doc = ""] - + #[doc = "Low revision ID"] + #[doc = ""] pub revLow: u16_, -#[doc = "Result code"] -#[doc = ""] - + #[doc = "Result code"] + #[doc = ""] pub resCode: u32_, -#[doc = "PC address at exception"] -#[doc = ""] - + #[doc = "PC address at exception"] + #[doc = ""] pub pcAddr: u32_, -#[doc = "Process ID."] -#[doc = ""] - + #[doc = "Process ID."] + #[doc = ""] pub procId: u32_, -#[doc = "Title ID."] -#[doc = ""] - + #[doc = "Title ID."] + #[doc = ""] pub titleId: u64_, -#[doc = "Application Title ID."] -#[doc = ""] - + #[doc = "Application Title ID."] + #[doc = ""] pub appTitleId: u64_, -#[doc = "The different types of data for errors."] -#[doc = ""] - + #[doc = "The different types of data for errors."] + #[doc = ""] pub data: ERRF_FatalErrInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ERRF_FatalErrInfo__bindgen_ty_1 { -#[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] -#[doc = ""] - + #[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] + #[doc = ""] pub exception_data: ERRF_ExceptionData, -#[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] -#[doc = ""] - + #[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] + #[doc = ""] pub failure_mesg: [::libc::c_char; 96usize], } impl Default for ERRF_FatalErrInfo__bindgen_ty_1 { @@ -5381,100 +5075,92 @@ impl Default for ERRF_FatalErrInfo { } extern "C" { #[must_use] -#[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] -#[doc = ""] - + #[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] + #[doc = ""] pub fn errfInit() -> Result; } extern "C" { -#[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] -#[doc = ""] - + #[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] + #[doc = ""] pub fn errfExit(); } extern "C" { -#[doc = "Gets the current err:f API session handle."] -#[doc = ""] -#[doc = "Returns: The current err:f API session handle."] -#[doc = ""] - + #[doc = "Gets the current err:f API session handle."] + #[doc = ""] + #[doc = "Returns: The current err:f API session handle."] + #[doc = ""] pub fn errfGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Throws a system error and possibly results in ErrDisp triggering."] -#[doc = ""] -#[doc = ""] -#[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] -#[doc = "top screen with a developer console or the proper patches in a CFW applied."] -#[doc = ""] -#[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] -#[doc = ""] -#[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] -#[doc = "constructing the ERRF_FatalErrInfo struct yourself."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `error` - Error to throw. [Direction: In]"] - + #[doc = "Throws a system error and possibly results in ErrDisp triggering."] + #[doc = ""] + #[doc = ""] + #[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] + #[doc = "top screen with a developer console or the proper patches in a CFW applied."] + #[doc = ""] + #[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] + #[doc = ""] + #[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] + #[doc = "constructing the ERRF_FatalErrInfo struct yourself."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `error` - Error to throw. [Direction: In]"] pub fn ERRF_Throw(error: *const ERRF_FatalErrInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Throws a system error with the given Result code."] -#[doc = ""] -#[doc = ""] -#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] -#[doc = ""] -#[doc = "This function \\em does fill in the address where this function was called from."] -#[doc = ""] -#[doc = "See https://3dbrew.org/wiki/ERR:Throw#Generic for expected top screen output"] -#[doc = "on development units/patched ErrDisp."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `failure` - Result code to throw. [Direction: In]"] - + #[doc = "Throws a system error with the given Result code."] + #[doc = ""] + #[doc = ""] + #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] + #[doc = ""] + #[doc = "This function \\em does fill in the address where this function was called from."] + #[doc = ""] + #[doc = "See https://3dbrew.org/wiki/ERR:Throw#Generic for expected top screen output"] + #[doc = "on development units/patched ErrDisp."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `failure` - Result code to throw. [Direction: In]"] pub fn ERRF_ThrowResult(failure: Result) -> Result; } extern "C" { #[must_use] -#[doc = "Throws a system error with the given Result code and message."] -#[doc = ""] -#[doc = ""] -#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] -#[doc = ""] -#[doc = "This function does \\em not fill in the address where this function was called from because it"] -#[doc = "would not be displayed."] -#[doc = ""] -#[doc = "The message is only displayed on development units/patched ErrDisp."] -#[doc = ""] -#[doc = "See https://3dbrew.org/wiki/ERR:Throw#Result_Failure for expected top screen output"] -#[doc = "on development units/patched ErrDisp."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `failure` - Result code to throw. [Direction: In]"] -#[doc = "* `message` - The message to display. [Direction: In]"] - + #[doc = "Throws a system error with the given Result code and message."] + #[doc = ""] + #[doc = ""] + #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] + #[doc = ""] + #[doc = "This function does \\em not fill in the address where this function was called from because it"] + #[doc = "would not be displayed."] + #[doc = ""] + #[doc = "The message is only displayed on development units/patched ErrDisp."] + #[doc = ""] + #[doc = "See https://3dbrew.org/wiki/ERR:Throw#Result_Failure for expected top screen output"] + #[doc = "on development units/patched ErrDisp."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `failure` - Result code to throw. [Direction: In]"] + #[doc = "* `message` - The message to display. [Direction: In]"] pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result; } extern "C" { -#[doc = "Handles an exception using ErrDisp."] -#[doc = ""] -#[doc = ""] -#[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `excep` - Exception information"] -#[doc = "* `regs` - CPU registers"] - + #[doc = "Handles an exception using ErrDisp."] + #[doc = ""] + #[doc = ""] + #[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `excep` - Exception information"] + #[doc = "* `regs` - CPU registers"] pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters); } #[doc = "Kernel configuration page (read-only)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osKernelConfig_s { @@ -5500,30 +5186,24 @@ pub struct osKernelConfig_s { } #[doc = "Time reference information struct (filled in by PTM)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osTimeRef_s { -#[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] -#[doc = ""] - + #[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] + #[doc = ""] pub value_ms: u64_, -#[doc = "System ticks elapsed since boot when this structure was last updated"] -#[doc = ""] - + #[doc = "System ticks elapsed since boot when this structure was last updated"] + #[doc = ""] pub value_tick: u64_, -#[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around \\ref SYSCLOCK_ARM11)"] -#[doc = ""] - + #[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around \\ref SYSCLOCK_ARM11)"] + #[doc = ""] pub sysclock_hz: s64, -#[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] -#[doc = ""] - + #[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] + #[doc = ""] pub drift_ms: s64, } #[doc = "Shared system configuration page structure (read-only or read-write depending on exheader)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osSharedConfig_s { @@ -5549,22 +5229,18 @@ pub struct osSharedConfig_s { } #[doc = "Tick counter."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct TickCounter { -#[doc = "Elapsed CPU ticks between measurements."] -#[doc = ""] - + #[doc = "Elapsed CPU ticks between measurements."] + #[doc = ""] pub elapsed: u64_, -#[doc = "Point in time used as reference."] -#[doc = ""] - + #[doc = "Point in time used as reference."] + #[doc = ""] pub reference: u64_, } #[doc = "OS_VersionBin. Format of the system version: \"..-\""] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OS_VersionBin { @@ -5576,90 +5252,82 @@ pub struct OS_VersionBin { pub reserved_x5: [u8_; 3usize], } extern "C" { -#[doc = "Converts an address from virtual (process) memory to physical memory."] -#[doc = ""] -#[doc = "It is sometimes required by services or when using the GPU command buffer."] -#[doc = ""] -#[doc = "Returns: The corresponding physical address."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `vaddr` - Input virtual address."] - + #[doc = "Converts an address from virtual (process) memory to physical memory."] + #[doc = ""] + #[doc = "It is sometimes required by services or when using the GPU command buffer."] + #[doc = ""] + #[doc = "Returns: The corresponding physical address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vaddr` - Input virtual address."] pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32_; } extern "C" { -#[doc = "Converts 0x14* vmem to 0x30*."] -#[doc = ""] -#[doc = "Returns: The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `vaddr` - Input virtual address."] - + #[doc = "Converts 0x14* vmem to 0x30*."] + #[doc = ""] + #[doc = "Returns: The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vaddr` - Input virtual address."] pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Retrieves basic information about a service error."] -#[doc = ""] -#[doc = ""] -#[doc = "This can be used to get some details about an error returned by a service call."] -#[doc = ""] -#[doc = "Returns: A string containing a summary of an error."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `error` - Error to retrieve information about."] - + #[doc = "Retrieves basic information about a service error."] + #[doc = ""] + #[doc = ""] + #[doc = "This can be used to get some details about an error returned by a service call."] + #[doc = ""] + #[doc = "Returns: A string containing a summary of an error."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `error` - Error to retrieve information about."] pub fn osStrError(error: Result) -> *const ::libc::c_char; } extern "C" { -#[doc = "Reads the latest reference timepoint published by PTM."] -#[doc = ""] -#[doc = "Returns: Structure (see \\ref osTimeRef_s)."] -#[doc = ""] - + #[doc = "Reads the latest reference timepoint published by PTM."] + #[doc = ""] + #[doc = "Returns: Structure (see \\ref osTimeRef_s)."] + #[doc = ""] pub fn osGetTimeRef() -> osTimeRef_s; } extern "C" { -#[doc = "Gets the current time."] -#[doc = ""] -#[doc = "Returns: The number of milliseconds since 1st Jan 1900 00:00."] -#[doc = ""] - + #[doc = "Gets the current time."] + #[doc = ""] + #[doc = "Returns: The number of milliseconds since 1st Jan 1900 00:00."] + #[doc = ""] pub fn osGetTime() -> u64_; } extern "C" { -#[doc = "Reads the elapsed time in a tick counter."] -#[doc = ""] -#[doc = "Returns: The number of milliseconds elapsed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cnt` - The tick counter."] - + #[doc = "Reads the elapsed time in a tick counter."] + #[doc = ""] + #[doc = "Returns: The number of milliseconds elapsed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cnt` - The tick counter."] pub fn osTickCounterRead(cnt: *const TickCounter) -> f64; } extern "C" { -#[doc = "Configures the New 3DS speedup."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Specifies whether to enable or disable the speedup."] - + #[doc = "Configures the New 3DS speedup."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Specifies whether to enable or disable the speedup."] pub fn osSetSpeedupEnable(enable: bool); } extern "C" { #[must_use] -#[doc = "Gets the NAND system-version stored in NVer/CVer."] -#[doc = ""] -#[doc = "Returns: The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] -#[doc = "* `cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] - + #[doc = "Gets the NAND system-version stored in NVer/CVer."] + #[doc = ""] + #[doc = "Returns: The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] + #[doc = "* `cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] pub fn osGetSystemVersionData( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5667,17 +5335,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This is a wrapper for osGetSystemVersionData."] -#[doc = ""] -#[doc = "Returns: See osGetSystemVersionData."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nver_versionbin` - Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] -#[doc = "* `cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] -#[doc = "* `sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] -#[doc = "* `sysverstr_maxsize` - Max size of the above string buffer, *including* NULL-terminator."] - + #[doc = "This is a wrapper for osGetSystemVersionData."] + #[doc = ""] + #[doc = "Returns: See osGetSystemVersionData."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nver_versionbin` - Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] + #[doc = "* `cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] + #[doc = "* `sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] + #[doc = "* `sysverstr_maxsize` - Max size of the above string buffer, *including* NULL-terminator."] pub fn osGetSystemVersionDataString( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5738,76 +5405,67 @@ pub type RecursiveLock = _LOCK_RECURSIVE_T; pub type CondVar = s32; #[doc = "A light event."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightEvent { -#[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] -#[doc = ""] - + #[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] + #[doc = ""] pub state: s32, -#[doc = "Lock used for sticky timer operation"] -#[doc = ""] - + #[doc = "Lock used for sticky timer operation"] + #[doc = ""] pub lock: LightLock, } #[doc = "A light semaphore."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightSemaphore { -#[doc = "The current release count of the semaphore"] -#[doc = ""] - + #[doc = "The current release count of the semaphore"] + #[doc = ""] pub current_count: s32, -#[doc = "Number of threads concurrently acquiring the semaphore"] -#[doc = ""] - + #[doc = "Number of threads concurrently acquiring the semaphore"] + #[doc = ""] pub num_threads_acq: s16, -#[doc = "The maximum release count of the semaphore"] -#[doc = ""] - + #[doc = "The maximum release count of the semaphore"] + #[doc = ""] pub max_count: s16, } extern "C" { #[must_use] -#[doc = "Function used to implement user-mode synchronization primitives."] -#[doc = ""] -#[doc = ""] -#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] -#[doc = ""] -#[doc = "s32 val=0;"] -#[doc = "// Does *nothing* since val >= 0"] -#[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] -#[doc = "* `type` - Type of action to be performed by the arbiter"] -#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] - + #[doc = "Function used to implement user-mode synchronization primitives."] + #[doc = ""] + #[doc = ""] + #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] + #[doc = ""] + #[doc = "s32 val=0;"] + #[doc = "// Does *nothing* since val >= 0"] + #[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] + #[doc = "* `type` - Type of action to be performed by the arbiter"] + #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] -#[doc = ""] -#[doc = ""] -#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] -#[doc = ""] -#[doc = "s32 val=0;"] -#[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] -#[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] -#[doc = "* `type` - Type of action to be performed by the arbiter (must use \\ref ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT or \\ref ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)"] -#[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] - + #[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] + #[doc = ""] + #[doc = ""] + #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] + #[doc = ""] + #[doc = "s32 val=0;"] + #[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] + #[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] + #[doc = "* `type` - Type of action to be performed by the arbiter (must use \\ref ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT or \\ref ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)"] + #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] pub fn syncArbitrateAddressWithTimeout( addr: *mut s32, type_: ArbitrationType, @@ -5816,111 +5474,100 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Initializes a light lock."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Initializes a light lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn LightLock_Init(lock: *mut LightLock); } extern "C" { -#[doc = "Locks a light lock."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Locks a light lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn LightLock_Lock(lock: *mut LightLock); } extern "C" { -#[doc = "Attempts to lock a light lock."] -#[doc = ""] -#[doc = "Returns: Zero on success, non-zero on failure."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Attempts to lock a light lock."] + #[doc = ""] + #[doc = "Returns: Zero on success, non-zero on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn LightLock_TryLock(lock: *mut LightLock) -> ::libc::c_int; } extern "C" { -#[doc = "Unlocks a light lock."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Unlocks a light lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn LightLock_Unlock(lock: *mut LightLock); } extern "C" { -#[doc = "Initializes a recursive lock."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Initializes a recursive lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn RecursiveLock_Init(lock: *mut RecursiveLock); } extern "C" { -#[doc = "Locks a recursive lock."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Locks a recursive lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn RecursiveLock_Lock(lock: *mut RecursiveLock); } extern "C" { -#[doc = "Attempts to lock a recursive lock."] -#[doc = ""] -#[doc = "Returns: Zero on success, non-zero on failure."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Attempts to lock a recursive lock."] + #[doc = ""] + #[doc = "Returns: Zero on success, non-zero on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> ::libc::c_int; } extern "C" { -#[doc = "Unlocks a recursive lock."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `lock` - Pointer to the lock."] - + #[doc = "Unlocks a recursive lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock); } extern "C" { -#[doc = "Initializes a condition variable."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cv` - Pointer to the condition variable."] - + #[doc = "Initializes a condition variable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] pub fn CondVar_Init(cv: *mut CondVar); } extern "C" { -#[doc = "Waits on a condition variable."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cv` - Pointer to the condition variable."] -#[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] - + #[doc = "Waits on a condition variable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] pub fn CondVar_Wait(cv: *mut CondVar, lock: *mut LightLock); } extern "C" { -#[doc = "Waits on a condition variable with a timeout."] -#[doc = ""] -#[doc = "Returns: Zero on success, non-zero on failure."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cv` - Pointer to the condition variable."] -#[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] -#[doc = "* `timeout_ns` - Timeout in nanoseconds."] - + #[doc = "Waits on a condition variable with a timeout."] + #[doc = ""] + #[doc = "Returns: Zero on success, non-zero on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] + #[doc = "* `timeout_ns` - Timeout in nanoseconds."] pub fn CondVar_WaitTimeout( cv: *mut CondVar, lock: *mut LightLock, @@ -5928,125 +5575,113 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { -#[doc = "Wakes up threads waiting on a condition variable."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cv` - Pointer to the condition variable."] -#[doc = "* `num_threads` - Maximum number of threads to wake up (or \\ref ARBITRATION_SIGNAL_ALL to wake them all)."] - + #[doc = "Wakes up threads waiting on a condition variable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = "* `num_threads` - Maximum number of threads to wake up (or \\ref ARBITRATION_SIGNAL_ALL to wake them all)."] pub fn CondVar_WakeUp(cv: *mut CondVar, num_threads: s32); } extern "C" { -#[doc = "Initializes a light event."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the event."] -#[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] - + #[doc = "Initializes a light event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] pub fn LightEvent_Init(event: *mut LightEvent, reset_type: ResetType); } extern "C" { -#[doc = "Clears a light event."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the event."] - + #[doc = "Clears a light event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] pub fn LightEvent_Clear(event: *mut LightEvent); } extern "C" { -#[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the event."] - + #[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] pub fn LightEvent_Pulse(event: *mut LightEvent); } extern "C" { -#[doc = "Signals a light event, waking up threads waiting on it."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the event."] - + #[doc = "Signals a light event, waking up threads waiting on it."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] pub fn LightEvent_Signal(event: *mut LightEvent); } extern "C" { -#[doc = "Attempts to wait on a light event."] -#[doc = ""] -#[doc = "Returns: Non-zero if the event was signaled, zero otherwise."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the event."] - + #[doc = "Attempts to wait on a light event."] + #[doc = ""] + #[doc = "Returns: Non-zero if the event was signaled, zero otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] pub fn LightEvent_TryWait(event: *mut LightEvent) -> ::libc::c_int; } extern "C" { -#[doc = "Waits on a light event."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the event."] - + #[doc = "Waits on a light event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] pub fn LightEvent_Wait(event: *mut LightEvent); } extern "C" { -#[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] -#[doc = ""] -#[doc = "Returns: Non-zero on timeout, zero otherwise."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the event."] -#[doc = "* `timeout_ns` - Timeout in nanoseconds."] - + #[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] + #[doc = ""] + #[doc = "Returns: Non-zero on timeout, zero otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = "* `timeout_ns` - Timeout in nanoseconds."] pub fn LightEvent_WaitTimeout(event: *mut LightEvent, timeout_ns: s64) -> ::libc::c_int; } extern "C" { -#[doc = "Initializes a light semaphore."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to the semaphore."] -#[doc = "* `max_count` - Initial count of the semaphore."] -#[doc = "* `max_count` - Maximum count of the semaphore."] - + #[doc = "Initializes a light semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the semaphore."] + #[doc = "* `max_count` - Initial count of the semaphore."] + #[doc = "* `max_count` - Maximum count of the semaphore."] pub fn LightSemaphore_Init(semaphore: *mut LightSemaphore, initial_count: s16, max_count: s16); } extern "C" { -#[doc = "Acquires a light semaphore."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `semaphore` - Pointer to the semaphore."] -#[doc = "* `count` - Acquire count"] - + #[doc = "Acquires a light semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to the semaphore."] + #[doc = "* `count` - Acquire count"] pub fn LightSemaphore_Acquire(semaphore: *mut LightSemaphore, count: s32); } extern "C" { -#[doc = "Attempts to acquire a light semaphore."] -#[doc = ""] -#[doc = "Returns: Zero on success, non-zero on failure"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `semaphore` - Pointer to the semaphore."] -#[doc = "* `count` - Acquire count"] - + #[doc = "Attempts to acquire a light semaphore."] + #[doc = ""] + #[doc = "Returns: Zero on success, non-zero on failure"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to the semaphore."] + #[doc = "* `count` - Acquire count"] pub fn LightSemaphore_TryAcquire(semaphore: *mut LightSemaphore, count: s32) -> ::libc::c_int; } extern "C" { -#[doc = "Releases a light semaphore."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `semaphore` - Pointer to the semaphore."] -#[doc = "* `count` - Release count"] - + #[doc = "Releases a light semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to the semaphore."] + #[doc = "* `count` - Release count"] pub fn LightSemaphore_Release(semaphore: *mut LightSemaphore, count: s32); } #[repr(C)] @@ -6065,32 +5700,31 @@ pub type ExceptionHandler = ::core::option::Option< unsafe extern "C" fn(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters), >; extern "C" { -#[doc = "Creates a new libctru thread."] -#[doc = ""] -#[doc = "For userland apps, this has to be within the range [0x18;0x3F]."] -#[doc = "The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] -#[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] -#[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] -#[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] -#[doc = ""] -#[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] -#[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] -#[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] -#[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] -#[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: The libctru thread handle on success, NULL on failure."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `entrypoint` - The function that will be called first upon thread creation"] -#[doc = "* `arg` - The argument passed to @p entrypoint"] -#[doc = "* `stack_size` - The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] -#[doc = "* `prio` - Low values gives the thread higher priority."] -#[doc = "* `core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] -#[doc = "* `detached` - When set to true, the thread is automatically freed when it finishes."] - + #[doc = "Creates a new libctru thread."] + #[doc = ""] + #[doc = "For userland apps, this has to be within the range [0x18;0x3F]."] + #[doc = "The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] + #[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] + #[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] + #[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] + #[doc = ""] + #[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] + #[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] + #[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] + #[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] + #[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: The libctru thread handle on success, NULL on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `entrypoint` - The function that will be called first upon thread creation"] + #[doc = "* `arg` - The argument passed to @p entrypoint"] + #[doc = "* `stack_size` - The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] + #[doc = "* `prio` - Low values gives the thread higher priority."] + #[doc = "* `core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] + #[doc = "* `detached` - When set to true, the thread is automatically freed when it finishes."] pub fn threadCreate( entrypoint: ThreadFunc, arg: *mut ::libc::c_void, @@ -6101,106 +5735,91 @@ extern "C" { ) -> Thread; } extern "C" { -#[doc = "Retrieves the OS thread handle of a libctru thread."] -#[doc = ""] -#[doc = "Returns: OS thread handle"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - libctru thread handle"] - + #[doc = "Retrieves the OS thread handle of a libctru thread."] + #[doc = ""] + #[doc = "Returns: OS thread handle"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] pub fn threadGetHandle(thread: Thread) -> Handle; } extern "C" { -#[doc = "Retrieves the exit code of a finished libctru thread."] -#[doc = ""] -#[doc = "Returns: Exit code"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - libctru thread handle"] - + #[doc = "Retrieves the exit code of a finished libctru thread."] + #[doc = ""] + #[doc = "Returns: Exit code"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] pub fn threadGetExitCode(thread: Thread) -> ::libc::c_int; } extern "C" { -#[doc = "Frees a finished libctru thread."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - libctru thread handle"] - + #[doc = "Frees a finished libctru thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] pub fn threadFree(thread: Thread); } extern "C" { #[must_use] -#[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - libctru thread handle"] -#[doc = "* `timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] - + #[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] + #[doc = "* `timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result; } extern "C" { -#[doc = "Changes a thread's status from attached to detached."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `thread` - libctru thread handle"] - + #[doc = "Changes a thread's status from attached to detached."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] pub fn threadDetach(thread: Thread); } extern "C" { -#[doc = "Retrieves the libctru thread handle of the current thread."] -#[doc = ""] -#[doc = "Returns: Libctru thread handle of the current thread, or NULL for the main thread"] -#[doc = ""] - + #[doc = "Retrieves the libctru thread handle of the current thread."] + #[doc = ""] + #[doc = "Returns: Libctru thread handle of the current thread, or NULL for the main thread"] + #[doc = ""] pub fn threadGetCurrent() -> Thread; } extern "C" { -#[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `rc` - Exit code"] - + #[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rc` - Exit code"] pub fn threadExit(rc: ::libc::c_int); } #[doc = "Framebuffer information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_FramebufferInfo { -#[doc = "Active framebuffer. (0 = first, 1 = second)"] -#[doc = ""] - + #[doc = "Active framebuffer. (0 = first, 1 = second)"] + #[doc = ""] pub active_framebuf: u32_, -#[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] -#[doc = ""] - + #[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] + #[doc = ""] pub framebuf0_vaddr: *mut u32_, -#[doc = "For the main screen: 3D right framebuffer address."] -#[doc = ""] - + #[doc = "For the main screen: 3D right framebuffer address."] + #[doc = ""] pub framebuf1_vaddr: *mut u32_, -#[doc = "Value for 0x1EF00X90, controls framebuffer width."] -#[doc = ""] - + #[doc = "Value for 0x1EF00X90, controls framebuffer width."] + #[doc = ""] pub framebuf_widthbytesize: u32_, -#[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] -#[doc = ""] - + #[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] + #[doc = ""] pub format: u32_, -#[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] -#[doc = ""] - + #[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] + #[doc = ""] pub framebuf_dispselect: u32_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk: u32_, } impl Default for GSPGPU_FramebufferInfo { @@ -6238,25 +5857,20 @@ pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormat = 4; pub type GSPGPU_FramebufferFormat = ::libc::c_uint; #[doc = "Capture info entry."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfoEntry { -#[doc = "Left framebuffer."] -#[doc = ""] - + #[doc = "Left framebuffer."] + #[doc = ""] pub framebuf0_vaddr: *mut u32_, -#[doc = "Right framebuffer."] -#[doc = ""] - + #[doc = "Right framebuffer."] + #[doc = ""] pub framebuf1_vaddr: *mut u32_, -#[doc = "Framebuffer format."] -#[doc = ""] - + #[doc = "Framebuffer format."] + #[doc = ""] pub format: u32_, -#[doc = "Framebuffer pitch."] -#[doc = ""] - + #[doc = "Framebuffer pitch."] + #[doc = ""] pub framebuf_widthbytesize: u32_, } impl Default for GSPGPU_CaptureInfoEntry { @@ -6270,13 +5884,11 @@ impl Default for GSPGPU_CaptureInfoEntry { } #[doc = "Capture info."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfo { -#[doc = "Capture info entries, one for each screen."] -#[doc = ""] - + #[doc = "Capture info entries, one for each screen."] + #[doc = ""] pub screencapture: [GSPGPU_CaptureInfoEntry; 2usize], } impl Default for GSPGPU_CaptureInfo { @@ -6326,45 +5938,40 @@ pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7; pub type GSPGPU_Event = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes GSPGPU."] -#[doc = ""] - + #[doc = "Initializes GSPGPU."] + #[doc = ""] pub fn gspInit() -> Result; } extern "C" { -#[doc = "Exits GSPGPU."] -#[doc = ""] - + #[doc = "Exits GSPGPU."] + #[doc = ""] pub fn gspExit(); } extern "C" { -#[doc = "Gets a pointer to the current gsp::Gpu session handle."] -#[doc = ""] -#[doc = "Returns: A pointer to the current gsp::Gpu session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current gsp::Gpu session handle."] + #[doc = ""] + #[doc = "Returns: A pointer to the current gsp::Gpu session handle."] + #[doc = ""] pub fn gspGetSessionHandle() -> *mut Handle; } extern "C" { -#[doc = "Returns true if the application currently has GPU rights."] -#[doc = ""] - + #[doc = "Returns true if the application currently has GPU rights."] + #[doc = ""] pub fn gspHasGpuRight() -> bool; } extern "C" { -#[doc = "Presents a buffer to the specified screen."] -#[doc = ""] -#[doc = "Returns: True if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] -#[doc = "* `swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] -#[doc = "* `fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] -#[doc = "* `fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] -#[doc = "* `stride` - Stride in bytes between scanlines"] -#[doc = "* `mode` - Mode configuration to be written to LCD register"] - + #[doc = "Presents a buffer to the specified screen."] + #[doc = ""] + #[doc = "Returns: True if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] + #[doc = "* `swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] + #[doc = "* `fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] + #[doc = "* `fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] + #[doc = "* `stride` - Stride in bytes between scanlines"] + #[doc = "* `mode` - Mode configuration to be written to LCD register"] pub fn gspPresentBuffer( screen: ::libc::c_uint, swap: ::libc::c_uint, @@ -6375,24 +5982,22 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Returns true if a prior \\ref gspPresentBuffer command is still pending to be processed by GSP."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] - + #[doc = "Returns true if a prior \\ref gspPresentBuffer command is still pending to be processed by GSP."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] pub fn gspIsPresentPending(screen: ::libc::c_uint) -> bool; } extern "C" { -#[doc = "Configures a callback to run when a GSPGPU event occurs."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the event."] -#[doc = "* `cb` - Callback to run."] -#[doc = "* `data` - Data to be passed to the callback."] -#[doc = "* `oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] - + #[doc = "Configures a callback to run when a GSPGPU event occurs."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the event."] + #[doc = "* `cb` - Callback to run."] + #[doc = "* `data` - Data to be passed to the callback."] + #[doc = "* `oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] pub fn gspSetEventCallback( id: GSPGPU_Event, cb: ThreadFunc, @@ -6401,103 +6006,92 @@ extern "C" { ); } extern "C" { -#[doc = "Waits for a GSPGPU event to occur."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the event."] -#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] - + #[doc = "Waits for a GSPGPU event to occur."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the event."] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] pub fn gspWaitForEvent(id: GSPGPU_Event, nextEvent: bool); } extern "C" { -#[doc = "Waits for any GSPGPU event to occur."] -#[doc = ""] -#[doc = ""] -#[doc = "The function returns immediately if there are unprocessed events at the time of call."] -#[doc = ""] -#[doc = "Returns: The ID of the event that occurred."] -#[doc = ""] - + #[doc = "Waits for any GSPGPU event to occur."] + #[doc = ""] + #[doc = ""] + #[doc = "The function returns immediately if there are unprocessed events at the time of call."] + #[doc = ""] + #[doc = "Returns: The ID of the event that occurred."] + #[doc = ""] pub fn gspWaitForAnyEvent() -> GSPGPU_Event; } extern "C" { #[must_use] -#[doc = "Submits a GX command."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `gxCommand` - GX command to execute."] - + #[doc = "Submits a GX command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `gxCommand` - GX command to execute."] pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Acquires GPU rights."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flags` - Flags to acquire with."] - + #[doc = "Acquires GPU rights."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to acquire with."] pub fn GSPGPU_AcquireRight(flags: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Releases GPU rights."] -#[doc = ""] - + #[doc = "Releases GPU rights."] + #[doc = ""] pub fn GSPGPU_ReleaseRight() -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves display capture info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `captureinfo` - Pointer to output capture info to."] - + #[doc = "Retrieves display capture info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `captureinfo` - Pointer to output capture info to."] pub fn GSPGPU_ImportDisplayCaptureInfo(captureinfo: *mut GSPGPU_CaptureInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Saves the VRAM sys area."] -#[doc = ""] - + #[doc = "Saves the VRAM sys area."] + #[doc = ""] pub fn GSPGPU_SaveVramSysArea() -> Result; } extern "C" { #[must_use] -#[doc = "Resets the GPU"] -#[doc = ""] - + #[doc = "Resets the GPU"] + #[doc = ""] pub fn GSPGPU_ResetGpuCore() -> Result; } extern "C" { #[must_use] -#[doc = "Restores the VRAM sys area."] -#[doc = ""] - + #[doc = "Restores the VRAM sys area."] + #[doc = ""] pub fn GSPGPU_RestoreVramSysArea() -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to force the LCD to black."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] - + #[doc = "Sets whether to force the LCD to black."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Updates a screen's framebuffer state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screenid` - ID of the screen to update."] -#[doc = "* `framebufinfo` - Framebuffer information to update with."] - + #[doc = "Updates a screen's framebuffer state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screenid` - ID of the screen to update."] + #[doc = "* `framebufinfo` - Framebuffer information to update with."] pub fn GSPGPU_SetBufferSwap( screenid: u32_, framebufinfo: *const GSPGPU_FramebufferInfo, @@ -6505,50 +6099,46 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Flushes memory from the data cache."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `adr` - Address to flush."] -#[doc = "* `size` - Size of the memory to flush."] - + #[doc = "Flushes memory from the data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address to flush."] + #[doc = "* `size` - Size of the memory to flush."] pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates memory in the data cache."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `adr` - Address to invalidate."] -#[doc = "* `size` - Size of the memory to invalidate."] - + #[doc = "Invalidates memory in the data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address to invalidate."] + #[doc = "* `size` - Size of the memory to invalidate."] pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to GPU hardware registers."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `regAddr` - Register address to write to."] -#[doc = "* `data` - Data to write."] -#[doc = "* `size` - Size of the data to write."] - + #[doc = "Writes to GPU hardware registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regAddr` - Register address to write to."] + #[doc = "* `data` - Data to write."] + #[doc = "* `size` - Size of the data to write."] pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to GPU hardware registers with a mask."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `regAddr` - Register address to write to."] -#[doc = "* `data` - Data to write."] -#[doc = "* `datasize` - Size of the data to write."] -#[doc = "* `maskdata` - Data of the mask."] -#[doc = "* `masksize` - Size of the mask."] - + #[doc = "Writes to GPU hardware registers with a mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regAddr` - Register address to write to."] + #[doc = "* `data` - Data to write."] + #[doc = "* `datasize` - Size of the data to write."] + #[doc = "* `maskdata` - Data of the mask."] + #[doc = "* `masksize` - Size of the mask."] pub fn GSPGPU_WriteHWRegsWithMask( regAddr: u32_, data: *const u32_, @@ -6559,27 +6149,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from GPU hardware registers."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `regAddr` - Register address to read from."] -#[doc = "* `data` - Buffer to read data to."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Reads from GPU hardware registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regAddr` - Register address to read from."] + #[doc = "* `data` - Buffer to read data to."] + #[doc = "* `size` - Size of the buffer."] pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Registers the interrupt relay queue."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `eventHandle` - Handle of the GX command event."] -#[doc = "* `flags` - Flags to register with."] -#[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] -#[doc = "* `threadID` - Pointer to output the GSP thread ID to."] - + #[doc = "Registers the interrupt relay queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `eventHandle` - Handle of the GX command event."] + #[doc = "* `flags` - Flags to register with."] + #[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] + #[doc = "* `threadID` - Pointer to output the GSP thread ID to."] pub fn GSPGPU_RegisterInterruptRelayQueue( eventHandle: Handle, flags: u32_, @@ -6589,26 +6177,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters the interrupt relay queue."] -#[doc = ""] - + #[doc = "Unregisters the interrupt relay queue."] + #[doc = ""] pub fn GSPGPU_UnregisterInterruptRelayQueue() -> Result; } extern "C" { #[must_use] -#[doc = "Triggers a handling of commands written to shared memory."] -#[doc = ""] - + #[doc = "Triggers a handling of commands written to shared memory."] + #[doc = ""] pub fn GSPGPU_TriggerCmdReqQueue() -> Result; } extern "C" { #[must_use] -#[doc = "Sets 3D_LEDSTATE to the input state value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] - + #[doc = "Sets 3D_LEDSTATE to the input state value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] pub fn GSPGPU_SetLedForceOff(disable: bool) -> Result; } #[doc = "Top screen"] @@ -6640,27 +6225,25 @@ pub const GFX_RIGHT: gfx3dSide_t = 1; pub type gfx3dSide_t = ::libc::c_uint; extern "C" { -#[doc = "Initializes the LCD framebuffers with default parameters"] -#[doc = ""] -#[doc = "This is equivalent to calling: @code gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); @endcode"] -#[doc = ""] - + #[doc = "Initializes the LCD framebuffers with default parameters"] + #[doc = ""] + #[doc = "This is equivalent to calling: @code gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); @endcode"] + #[doc = ""] pub fn gfxInitDefault(); } extern "C" { -#[doc = "Initializes the LCD framebuffers."] -#[doc = ""] -#[doc = ""] -#[doc = "This function allocates memory for the framebuffers in the specified memory region."] -#[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `topFormat` - The format of the top screen framebuffers."] -#[doc = "* `bottomFormat` - The format of the bottom screen framebuffers."] -#[doc = "* `vramBuffers` - Whether to allocate the framebuffers in VRAM."] - + #[doc = "Initializes the LCD framebuffers."] + #[doc = ""] + #[doc = ""] + #[doc = "This function allocates memory for the framebuffers in the specified memory region."] + #[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `topFormat` - The format of the top screen framebuffers."] + #[doc = "* `bottomFormat` - The format of the bottom screen framebuffers."] + #[doc = "* `vramBuffers` - Whether to allocate the framebuffers in VRAM."] pub fn gfxInit( topFormat: GSPGPU_FramebufferFormat, bottomFormat: GSPGPU_FramebufferFormat, @@ -6668,93 +6251,84 @@ extern "C" { ); } extern "C" { -#[doc = "Deinitializes and frees the LCD framebuffers."] -#[doc = ""] - + #[doc = "Deinitializes and frees the LCD framebuffers."] + #[doc = ""] pub fn gfxExit(); } extern "C" { -#[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Pass true to enable, false to disable."] - + #[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pass true to enable, false to disable."] pub fn gfxSet3D(enable: bool); } extern "C" { -#[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] -#[doc = ""] -#[doc = "Returns: True if 3D enabled, false otherwise."] -#[doc = ""] - + #[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] + #[doc = ""] + #[doc = "Returns: True if 3D enabled, false otherwise."] + #[doc = ""] pub fn gfxIs3D() -> bool; } extern "C" { -#[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] -#[doc = ""] -#[doc = "Returns: True if wide mode enabled, false otherwise."] -#[doc = ""] - + #[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] + #[doc = ""] + #[doc = "Returns: True if wide mode enabled, false otherwise."] + #[doc = ""] pub fn gfxIsWide() -> bool; } extern "C" { -#[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Pass true to enable, false to disable."] - + #[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pass true to enable, false to disable."] pub fn gfxSetWide(enable: bool); } extern "C" { -#[doc = "Changes the pixel format of a screen."] -#[doc = ""] -#[doc = "they are freed and new ones are reallocated."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] -#[doc = "* `format` - Pixel format (see \\ref GSPGPU_FramebufferFormat)"] - + #[doc = "Changes the pixel format of a screen."] + #[doc = ""] + #[doc = "they are freed and new ones are reallocated."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `format` - Pixel format (see \\ref GSPGPU_FramebufferFormat)"] pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormat); } extern "C" { -#[doc = "Retrieves the current pixel format of a screen."] -#[doc = ""] -#[doc = "Returns: Pixel format (see \\ref GSPGPU_FramebufferFormat)"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] - + #[doc = "Retrieves the current pixel format of a screen."] + #[doc = ""] + #[doc = "Returns: Pixel format (see \\ref GSPGPU_FramebufferFormat)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormat; } extern "C" { -#[doc = "Enables or disables double buffering on a screen."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] -#[doc = "* `enable` - Pass true to enable, false to disable."] - + #[doc = "Enables or disables double buffering on a screen."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `enable` - Pass true to enable, false to disable."] pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, enable: bool); } extern "C" { -#[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] -#[doc = ""] -#[doc = ""] -#[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] -#[doc = ""] -#[doc = "Returns: A pointer to the current framebuffer of the chosen screen."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] -#[doc = "* `side` - Framebuffer side (see \\ref gfx3dSide_t) (pass \\ref GFX_LEFT if not using stereoscopic 3D)"] -#[doc = "* `width` - Pointer that will hold the width of the framebuffer in pixels."] -#[doc = "* `height` - Pointer that will hold the height of the framebuffer in pixels."] - + #[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] + #[doc = ""] + #[doc = ""] + #[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] + #[doc = ""] + #[doc = "Returns: A pointer to the current framebuffer of the chosen screen."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `side` - Framebuffer side (see \\ref gfx3dSide_t) (pass \\ref GFX_LEFT if not using stereoscopic 3D)"] + #[doc = "* `width` - Pointer that will hold the width of the framebuffer in pixels."] + #[doc = "* `height` - Pointer that will hold the height of the framebuffer in pixels."] pub fn gfxGetFramebuffer( screen: gfxScreen_t, side: gfx3dSide_t, @@ -6763,48 +6337,43 @@ extern "C" { ) -> *mut u8_; } extern "C" { -#[doc = "Flushes the data cache for the current framebuffers."] -#[doc = ""] -#[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] -#[doc = ""] - + #[doc = "Flushes the data cache for the current framebuffers."] + #[doc = ""] + #[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] + #[doc = ""] pub fn gfxFlushBuffers(); } extern "C" { -#[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] -#[doc = ""] -#[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] -#[doc = "since this API does not implement triple buffering."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] -#[doc = "* `hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] - + #[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] + #[doc = ""] + #[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] + #[doc = "since this API does not implement triple buffering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] pub fn gfxScreenSwapBuffers(scr: gfxScreen_t, hasStereo: bool); } extern "C" { -#[doc = "**Warning!** This is deprecated! - This function has been superseded by \\ref gfxScreenSwapBuffers, please use that instead."] -#[doc = ""] -#[doc = "Same as \\ref gfxScreenSwapBuffers, but with hasStereo set to true."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] -#[doc = "* `immediate` - This parameter no longer has any effect and is thus ignored."] - + #[doc = "**Warning!** This is deprecated! - This function has been superseded by \\ref gfxScreenSwapBuffers, please use that instead."] + #[doc = ""] + #[doc = "Same as \\ref gfxScreenSwapBuffers, but with hasStereo set to true."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `immediate` - This parameter no longer has any effect and is thus ignored."] pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool); } extern "C" { -#[doc = "Updates the configuration of both screens."] -#[doc = ""] - + #[doc = "Updates the configuration of both screens."] + #[doc = ""] pub fn gfxSwapBuffers(); } extern "C" { -#[doc = "Same as \\ref gfxSwapBuffers (formerly different)."] -#[doc = ""] - + #[doc = "Same as \\ref gfxSwapBuffers (formerly different)."] + #[doc = ""] pub fn gfxSwapBuffersGpu(); } #[doc = "A callback for printing a character."] @@ -6815,21 +6384,17 @@ pub type ConsolePrint = ::core::option::Option< >; #[doc = "A font struct for the console."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ConsoleFont { -#[doc = "A pointer to the font graphics"] -#[doc = ""] - + #[doc = "A pointer to the font graphics"] + #[doc = ""] pub gfx: *mut u8_, -#[doc = "Offset to the first valid character in the font table"] -#[doc = ""] - + #[doc = "Offset to the first valid character in the font table"] + #[doc = ""] pub asciiOffset: u16_, -#[doc = "Number of characters in the font graphics"] -#[doc = ""] - + #[doc = "Number of characters in the font graphics"] + #[doc = ""] pub numChars: u16_, } impl Default for ConsoleFont { @@ -6849,81 +6414,62 @@ impl Default for ConsoleFont { #[doc = "{"] #[doc = "};"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PrintConsole { -#[doc = "Font of the console"] -#[doc = ""] - + #[doc = "Font of the console"] + #[doc = ""] pub font: ConsoleFont, -#[doc = "Framebuffer address"] -#[doc = ""] - + #[doc = "Framebuffer address"] + #[doc = ""] pub frameBuffer: *mut u16_, -#[doc = "Current X location of the cursor (as a tile offset by default)"] -#[doc = ""] - + #[doc = "Current X location of the cursor (as a tile offset by default)"] + #[doc = ""] pub cursorX: ::libc::c_int, -#[doc = "Current Y location of the cursor (as a tile offset by default)"] -#[doc = ""] - + #[doc = "Current Y location of the cursor (as a tile offset by default)"] + #[doc = ""] pub cursorY: ::libc::c_int, -#[doc = "Internal state"] -#[doc = ""] - + #[doc = "Internal state"] + #[doc = ""] pub prevCursorX: ::libc::c_int, -#[doc = "Internal state"] -#[doc = ""] - + #[doc = "Internal state"] + #[doc = ""] pub prevCursorY: ::libc::c_int, -#[doc = "Width of the console hardware layer in characters"] -#[doc = ""] - + #[doc = "Width of the console hardware layer in characters"] + #[doc = ""] pub consoleWidth: ::libc::c_int, -#[doc = "Height of the console hardware layer in characters"] -#[doc = ""] - + #[doc = "Height of the console hardware layer in characters"] + #[doc = ""] pub consoleHeight: ::libc::c_int, -#[doc = "Window X location in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window X location in characters (not implemented)"] + #[doc = ""] pub windowX: ::libc::c_int, -#[doc = "Window Y location in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window Y location in characters (not implemented)"] + #[doc = ""] pub windowY: ::libc::c_int, -#[doc = "Window width in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window width in characters (not implemented)"] + #[doc = ""] pub windowWidth: ::libc::c_int, -#[doc = "Window height in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window height in characters (not implemented)"] + #[doc = ""] pub windowHeight: ::libc::c_int, -#[doc = "Size of a tab"] -#[doc = ""] - + #[doc = "Size of a tab"] + #[doc = ""] pub tabSize: ::libc::c_int, -#[doc = "Foreground color"] -#[doc = ""] - + #[doc = "Foreground color"] + #[doc = ""] pub fg: u16_, -#[doc = "Background color"] -#[doc = ""] - + #[doc = "Background color"] + #[doc = ""] pub bg: u16_, -#[doc = "Reverse/bright flags"] -#[doc = ""] - + #[doc = "Reverse/bright flags"] + #[doc = ""] pub flags: ::libc::c_int, -#[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] -#[doc = ""] - + #[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] + #[doc = ""] pub PrintChar: ConsolePrint, -#[doc = "True if the console is initialized"] -#[doc = ""] - + #[doc = "True if the console is initialized"] + #[doc = ""] pub consoleInitialised: bool, } impl Default for PrintConsole { @@ -6953,26 +6499,24 @@ pub const debugDevice_3DMOO: debugDevice = 1; pub type debugDevice = ::libc::c_uint; extern "C" { -#[doc = "Loads the font into the console."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `console` - Pointer to the console to update, if NULL it will update the current console."] -#[doc = "* `font` - The font to load."] - + #[doc = "Loads the font into the console."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `console` - Pointer to the console to update, if NULL it will update the current console."] + #[doc = "* `font` - The font to load."] pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont); } extern "C" { -#[doc = "Sets the print window."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `console` - Console to set, if NULL it will set the current console window."] -#[doc = "* `x` - X location of the window."] -#[doc = "* `y` - Y location of the window."] -#[doc = "* `width` - Width of the window."] -#[doc = "* `height` - Height of the window."] - + #[doc = "Sets the print window."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `console` - Console to set, if NULL it will set the current console window."] + #[doc = "* `x` - X location of the window."] + #[doc = "* `y` - Y location of the window."] + #[doc = "* `width` - Width of the window."] + #[doc = "* `height` - Height of the window."] pub fn consoleSetWindow( console: *mut PrintConsole, x: ::libc::c_int, @@ -6982,51 +6526,46 @@ extern "C" { ); } extern "C" { -#[doc = "Gets a pointer to the console with the default values."] -#[doc = ""] -#[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] -#[doc = ""] -#[doc = "Returns: A pointer to the console with the default values."] -#[doc = ""] - + #[doc = "Gets a pointer to the console with the default values."] + #[doc = ""] + #[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] + #[doc = ""] + #[doc = "Returns: A pointer to the console with the default values."] + #[doc = ""] pub fn consoleGetDefault() -> *mut PrintConsole; } extern "C" { -#[doc = "Make the specified console the render target."] -#[doc = ""] -#[doc = "Returns: A pointer to the previous console."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console))."] - + #[doc = "Make the specified console the render target."] + #[doc = ""] + #[doc = "Returns: A pointer to the previous console."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console))."] pub fn consoleSelect(console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { -#[doc = "Initialise the console."] -#[doc = ""] -#[doc = "Returns: A pointer to the current console."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - The screen to use for the console."] -#[doc = "* `console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] - + #[doc = "Initialise the console."] + #[doc = ""] + #[doc = "Returns: A pointer to the current console."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - The screen to use for the console."] + #[doc = "* `console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] pub fn consoleInit(screen: gfxScreen_t, console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { -#[doc = "Initializes debug console output on stderr to the specified device."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `device` - The debug device (or devices) to output debug print statements to."] - + #[doc = "Initializes debug console output on stderr to the specified device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `device` - The debug device (or devices) to output debug print statements to."] pub fn consoleDebugInit(device: debugDevice); } extern "C" { -#[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] -#[doc = ""] - + #[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] + #[doc = ""] pub fn consoleClear(); } #[doc = "Use APT workaround."] @@ -7046,14 +6585,13 @@ pub const RUNFLAG_APTCHAINLOAD: _bindgen_ty_9 = 4; pub type _bindgen_ty_9 = ::libc::c_uint; extern "C" { -#[doc = "Retrieves a handle from the environment handle list."] -#[doc = ""] -#[doc = "Returns: The retrieved handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Name of the handle."] - + #[doc = "Retrieves a handle from the environment handle list."] + #[doc = ""] + #[doc = "Returns: The retrieved handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the handle."] pub fn envGetHandle(name: *const ::libc::c_char) -> Handle; } pub type _off_t = __int64_t; @@ -7313,17 +6851,14 @@ pub const DECOMPRESS_RLE: decompressType = 48; pub type decompressType = ::libc::c_uint; #[doc = "I/O vector"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct decompressIOVec { -#[doc = "I/O buffer"] -#[doc = ""] - + #[doc = "I/O buffer"] + #[doc = ""] pub data: *mut ::libc::c_void, -#[doc = "Buffer size"] -#[doc = ""] - + #[doc = "Buffer size"] + #[doc = ""] pub size: size_t, } impl Default for decompressIOVec { @@ -7346,16 +6881,15 @@ pub type decompressCallback = ::core::option::Option< ) -> ssize_t, >; extern "C" { -#[doc = "Decompression callback for file descriptors"] -#[doc = ""] -#[doc = "Returns: Number of bytes read"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `userdata` - Address of file descriptor [Direction: In]"] -#[doc = "* `buffer` - Buffer to write into [Direction: In]"] -#[doc = "* `size` - Size to read from file descriptor [Direction: In]"] - + #[doc = "Decompression callback for file descriptors"] + #[doc = ""] + #[doc = "Returns: Number of bytes read"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `userdata` - Address of file descriptor [Direction: In]"] + #[doc = "* `buffer` - Buffer to write into [Direction: In]"] + #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] pub fn decompressCallback_FD( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -7363,16 +6897,15 @@ extern "C" { ) -> ssize_t; } extern "C" { -#[doc = "Decompression callback for stdio FILE*"] -#[doc = ""] -#[doc = "Returns: Number of bytes read"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `userdata` - FILE* [Direction: In]"] -#[doc = "* `buffer` - Buffer to write into [Direction: In]"] -#[doc = "* `size` - Size to read from file descriptor [Direction: In]"] - + #[doc = "Decompression callback for stdio FILE*"] + #[doc = ""] + #[doc = "Returns: Number of bytes read"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `userdata` - FILE* [Direction: In]"] + #[doc = "* `buffer` - Buffer to write into [Direction: In]"] + #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] pub fn decompressCallback_Stdio( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -7380,18 +6913,17 @@ extern "C" { ) -> ssize_t; } extern "C" { -#[doc = "Decode decompression header"] -#[doc = ""] -#[doc = "Returns: Bytes consumed"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `type` - Decompression type [Direction: In, Out]"] -#[doc = "* `size` - Decompressed size [Direction: In, Out]"] -#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - + #[doc = "Decode decompression header"] + #[doc = ""] + #[doc = "Returns: Bytes consumed"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Decompression type [Direction: In, Out]"] + #[doc = "* `size` - Decompressed size [Direction: In, Out]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] pub fn decompressHeader( type_: *mut decompressType, size: *mut size_t, @@ -7401,23 +6933,22 @@ extern "C" { ) -> ssize_t; } extern "C" { -#[doc = "Decompress data"] -#[doc = ""] -#[doc = ""] -#[doc = "and insize is the size of that data. If callback is not null,"] -#[doc = "userdata is passed to callback to fetch more data, and insize is"] -#[doc = "unused."] -#[doc = ""] -#[doc = "Returns: Whether succeeded"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `iov` - Output vector [Direction: In]"] -#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] -#[doc = "* `callback` - Data callback (see note) [Direction: In]"] -#[doc = "* `userdata` - User data passed to callback (see note) [Direction: In]"] -#[doc = "* `insize` - Size of userdata (see note) [Direction: In]"] - + #[doc = "Decompress data"] + #[doc = ""] + #[doc = ""] + #[doc = "and insize is the size of that data. If callback is not null,"] + #[doc = "userdata is passed to callback to fetch more data, and insize is"] + #[doc = "unused."] + #[doc = ""] + #[doc = "Returns: Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see note) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see note) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see note) [Direction: In]"] pub fn decompressV( iov: *const decompressIOVec, iovcnt: size_t, @@ -7427,18 +6958,17 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress LZSS/LZ10"] -#[doc = ""] -#[doc = "Returns: Whether succeeded"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `iov` - Output vector [Direction: In]"] -#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] -#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - + #[doc = "Decompress LZSS/LZ10"] + #[doc = ""] + #[doc = "Returns: Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] pub fn decompressV_LZSS( iov: *const decompressIOVec, iovcnt: size_t, @@ -7448,18 +6978,17 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress LZ11"] -#[doc = ""] -#[doc = "Returns: Whether succeeded"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `iov` - Output vector [Direction: In]"] -#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] -#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - + #[doc = "Decompress LZ11"] + #[doc = ""] + #[doc = "Returns: Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] pub fn decompressV_LZ11( iov: *const decompressIOVec, iovcnt: size_t, @@ -7469,19 +6998,18 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress Huffman"] -#[doc = ""] -#[doc = "Returns: Whether succeeded"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bits` - Data size in bits (usually 4 or 8) [Direction: In]"] -#[doc = "* `iov` - Output vector [Direction: In]"] -#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] -#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - + #[doc = "Decompress Huffman"] + #[doc = ""] + #[doc = "Returns: Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bits` - Data size in bits (usually 4 or 8) [Direction: In]"] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] pub fn decompressV_Huff( bits: size_t, iov: *const decompressIOVec, @@ -7492,18 +7020,17 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress run-length encoding"] -#[doc = ""] -#[doc = "Returns: Whether succeeded"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `iov` - Output vector [Direction: In]"] -#[doc = "* `iovcnt` - Number of buffers [Direction: In]"] -#[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - + #[doc = "Decompress run-length encoding"] + #[doc = ""] + #[doc = "Returns: Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] pub fn decompressV_RLE( iov: *const decompressIOVec, iovcnt: size_t, @@ -7513,274 +7040,255 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output codepoint [Direction: In, Out]"] -#[doc = "* `in` - Input sequence [Direction: In]"] - + #[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output codepoint [Direction: In, Out]"] + #[doc = "* `in` - Input sequence [Direction: In]"] pub fn decode_utf8(out: *mut u32, in_: *const u8) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output codepoint [Direction: In, Out]"] -#[doc = "* `in` - Input sequence [Direction: In]"] - + #[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output codepoint [Direction: In, Out]"] + #[doc = "* `in` - Input sequence [Direction: In]"] pub fn decode_utf16(out: *mut u32, in_: *const u16) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input codepoint [Direction: In]"] - + #[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input codepoint [Direction: In]"] pub fn encode_utf8(out: *mut u8, in_: u32) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input codepoint [Direction: In]"] - + #[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input codepoint [Direction: In]"] pub fn encode_utf16(out: *mut u16, in_: u32) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] -#[doc = ""] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "* `len` - Output length [Direction: In]"] - + #[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] + #[doc = ""] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] -#[doc = ""] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "* `len` - Output length [Direction: In]"] - + #[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] + #[doc = ""] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] -#[doc = ""] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "* `len` - Output length [Direction: In]"] - + #[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] + #[doc = ""] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] -#[doc = ""] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "* `len` - Output length [Direction: In]"] - + #[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] + #[doc = ""] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] -#[doc = ""] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "* `len` - Output length [Direction: In]"] - + #[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] + #[doc = ""] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: -1 for error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output sequence [Direction: In, Out]"] -#[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "* `len` - Output length [Direction: In]"] - + #[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Allocates a 0x80-byte aligned buffer."] -#[doc = ""] -#[doc = "Returns: The allocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the buffer to allocate."] - + #[doc = "Allocates a 0x80-byte aligned buffer."] + #[doc = ""] + #[doc = "Returns: The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] pub fn linearAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a buffer aligned to the given size."] -#[doc = ""] -#[doc = "Returns: The allocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the buffer to allocate."] -#[doc = "* `alignment` - Alignment to use."] - + #[doc = "Allocates a buffer aligned to the given size."] + #[doc = ""] + #[doc = "Returns: The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `alignment` - Alignment to use."] pub fn linearMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Reallocates a buffer."] -#[doc = ""] -#[doc = "Note: Not implemented yet."] -#[doc = ""] -#[doc = "Returns: The reallocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mem` - Buffer to reallocate."] -#[doc = "* `size` - Size of the buffer to allocate."] - + #[doc = "Reallocates a buffer."] + #[doc = ""] + #[doc = "Note: Not implemented yet."] + #[doc = ""] + #[doc = "Returns: The reallocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to reallocate."] + #[doc = "* `size` - Size of the buffer to allocate."] pub fn linearRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Retrieves the allocated size of a buffer."] -#[doc = ""] -#[doc = "Returns: The size of the buffer."] -#[doc = ""] - + #[doc = "Retrieves the allocated size of a buffer."] + #[doc = ""] + #[doc = "Returns: The size of the buffer."] + #[doc = ""] pub fn linearGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { -#[doc = "Frees a buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mem` - Buffer to free."] - + #[doc = "Frees a buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to free."] pub fn linearFree(mem: *mut ::libc::c_void); } extern "C" { -#[doc = "Gets the current linear free space."] -#[doc = ""] -#[doc = "Returns: The current linear free space."] -#[doc = ""] - + #[doc = "Gets the current linear free space."] + #[doc = ""] + #[doc = "Returns: The current linear free space."] + #[doc = ""] pub fn linearSpaceFree() -> u32_; } extern "C" { -#[doc = "Initializes the mappable allocator."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `addrMin` - Minimum address."] -#[doc = "* `addrMax` - Maxium address."] - + #[doc = "Initializes the mappable allocator."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addrMin` - Minimum address."] + #[doc = "* `addrMax` - Maxium address."] pub fn mappableInit(addrMin: u32_, addrMax: u32_); } extern "C" { -#[doc = "Finds a mappable memory area."] -#[doc = ""] -#[doc = "Returns: The mappable area."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the area to find."] - + #[doc = "Finds a mappable memory area."] + #[doc = ""] + #[doc = "Returns: The mappable area."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the area to find."] pub fn mappableAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Frees a mappable area (stubbed)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mem` - Mappable area to free."] - + #[doc = "Frees a mappable area (stubbed)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Mappable area to free."] pub fn mappableFree(mem: *mut ::libc::c_void); } pub const VRAM_ALLOC_A: vramAllocPos = 1; @@ -7788,51 +7296,47 @@ pub const VRAM_ALLOC_B: vramAllocPos = 2; pub const VRAM_ALLOC_ANY: vramAllocPos = 3; pub type vramAllocPos = ::libc::c_uint; extern "C" { -#[doc = "Allocates a 0x80-byte aligned buffer."] -#[doc = ""] -#[doc = "Returns: The allocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the buffer to allocate."] - + #[doc = "Allocates a 0x80-byte aligned buffer."] + #[doc = ""] + #[doc = "Returns: The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] pub fn vramAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] -#[doc = ""] -#[doc = "Returns: The allocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the buffer to allocate."] -#[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] - + #[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] + #[doc = ""] + #[doc = "Returns: The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] pub fn vramAllocAt(size: size_t, pos: vramAllocPos) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a buffer aligned to the given size."] -#[doc = ""] -#[doc = "Returns: The allocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the buffer to allocate."] -#[doc = "* `alignment` - Alignment to use."] - + #[doc = "Allocates a buffer aligned to the given size."] + #[doc = ""] + #[doc = "Returns: The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `alignment` - Alignment to use."] pub fn vramMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] -#[doc = ""] -#[doc = "Returns: The allocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the buffer to allocate."] -#[doc = "* `alignment` - Alignment to use."] -#[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] - + #[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] + #[doc = ""] + #[doc = "Returns: The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `alignment` - Alignment to use."] + #[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] pub fn vramMemAlignAt( size: size_t, alignment: size_t, @@ -7840,42 +7344,38 @@ extern "C" { ) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Reallocates a buffer."] -#[doc = ""] -#[doc = "Note: Not implemented yet."] -#[doc = ""] -#[doc = "Returns: The reallocated buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mem` - Buffer to reallocate."] -#[doc = "* `size` - Size of the buffer to allocate."] - + #[doc = "Reallocates a buffer."] + #[doc = ""] + #[doc = "Note: Not implemented yet."] + #[doc = ""] + #[doc = "Returns: The reallocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to reallocate."] + #[doc = "* `size` - Size of the buffer to allocate."] pub fn vramRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Retrieves the allocated size of a buffer."] -#[doc = ""] -#[doc = "Returns: The size of the buffer."] -#[doc = ""] - + #[doc = "Retrieves the allocated size of a buffer."] + #[doc = ""] + #[doc = "Returns: The size of the buffer."] + #[doc = ""] pub fn vramGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { -#[doc = "Frees a buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mem` - Buffer to free."] - + #[doc = "Frees a buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to free."] pub fn vramFree(mem: *mut ::libc::c_void); } extern "C" { -#[doc = "Gets the current VRAM free space."] -#[doc = ""] -#[doc = "Returns: The current VRAM free space."] -#[doc = ""] - + #[doc = "Gets the current VRAM free space."] + #[doc = ""] + #[doc = "Returns: The current VRAM free space."] + #[doc = ""] pub fn vramSpaceFree() -> u32_; } #[doc = "Open authentication."] @@ -7916,7 +7416,6 @@ pub const AC_WPA2_AES: acSecurityMode = 7; pub type acSecurityMode = ::libc::c_uint; #[doc = "Struct to contain the data for connecting to a Wifi network from a stored slot."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct acuConfig { @@ -7933,185 +7432,166 @@ impl Default for acuConfig { } extern "C" { #[must_use] -#[doc = "Initializes AC."] -#[doc = ""] - + #[doc = "Initializes AC."] + #[doc = ""] pub fn acInit() -> Result; } extern "C" { -#[doc = "Exits AC."] -#[doc = ""] - + #[doc = "Exits AC."] + #[doc = ""] pub fn acExit(); } extern "C" { #[must_use] -#[doc = "Waits for the system to connect to the internet."] -#[doc = ""] - + #[doc = "Waits for the system to connect to the internet."] + #[doc = ""] pub fn acWaitInternetConnection() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi status."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] - + #[doc = "Gets the connected Wifi status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi status."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] - + #[doc = "Gets the connected Wifi status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] pub fn ACU_GetStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi security mode."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] - + #[doc = "Gets the connected Wifi security mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi SSID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `SSID` - Pointer to output the connected Wifi SSID to."] - + #[doc = "Gets the connected Wifi SSID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `SSID` - Pointer to output the connected Wifi SSID to."] pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi SSID length."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the connected Wifi SSID length to."] - + #[doc = "Gets the connected Wifi SSID length."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the connected Wifi SSID length to."] pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Determines whether proxy is enabled for the connected network."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Pointer to output the proxy status to."] - + #[doc = "Determines whether proxy is enabled for the connected network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pointer to output the proxy status to."] pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected network's proxy port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the proxy port to."] - + #[doc = "Gets the connected network's proxy port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the proxy port to."] pub fn ACU_GetProxyPort(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected network's proxy username."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] - + #[doc = "Gets the connected network's proxy username."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected network's proxy password."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] - + #[doc = "Gets the connected network's proxy password."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the last error to occur during a connection."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `errorCode` - Pointer to output the error code to."] - + #[doc = "Gets the last error to occur during a connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `errorCode` - Pointer to output the error code to."] pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the last detailed error to occur during a connection."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `errorCode` - Pointer to output the error code to."] - + #[doc = "Gets the last detailed error to occur during a connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `errorCode` - Pointer to output the error code to."] pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares a buffer to hold the configuration data to start a connection."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to an acuConfig struct to contain the data."] - + #[doc = "Prepares a buffer to hold the configuration data to start a connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct to contain the data."] pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Sets something that makes the connection reliable."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] -#[doc = "* `area` - Always 2 ?"] - + #[doc = "Sets something that makes the connection reliable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = "* `area` - Always 2 ?"] pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the slot to use when connecting."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] -#[doc = "* `type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] - + #[doc = "Sets the slot to use when connecting."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = "* `type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets something that makes the connection reliable."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - + #[doc = "Sets something that makes the connection reliable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Starts the connection procedure."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] -#[doc = "* `connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] - + #[doc = "Starts the connection procedure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = "* `connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] pub fn ACU_ConnectAsync(config: *const acuConfig, connectionHandle: Handle) -> Result; } #[doc = "Open for reading."] @@ -8437,37 +7917,29 @@ pub const DIRECTORY_ACTION_UNKNOWN: FS_DirectoryAction = 0; pub type FS_DirectoryAction = ::libc::c_uint; #[doc = "Directory entry."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_DirectoryEntry { -#[doc = "UTF-16 directory name."] -#[doc = ""] - + #[doc = "UTF-16 directory name."] + #[doc = ""] pub name: [u16_; 262usize], -#[doc = "File name."] -#[doc = ""] - + #[doc = "File name."] + #[doc = ""] pub shortName: [::libc::c_char; 10usize], -#[doc = "File extension."] -#[doc = ""] - + #[doc = "File extension."] + #[doc = ""] pub shortExt: [::libc::c_char; 4usize], -#[doc = "Valid flag. (Always 1)"] -#[doc = ""] - + #[doc = "Valid flag. (Always 1)"] + #[doc = ""] pub valid: u8_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved: u8_, -#[doc = "Attributes."] -#[doc = ""] - + #[doc = "Attributes."] + #[doc = ""] pub attributes: u32_, -#[doc = "File size."] -#[doc = ""] - + #[doc = "File size."] + #[doc = ""] pub fileSize: u64_, } impl Default for FS_DirectoryEntry { @@ -8481,42 +7953,34 @@ impl Default for FS_DirectoryEntry { } #[doc = "Archive resource information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ArchiveResource { -#[doc = "Size of each sector, in bytes."] -#[doc = ""] - + #[doc = "Size of each sector, in bytes."] + #[doc = ""] pub sectorSize: u32_, -#[doc = "Size of each cluster, in bytes."] -#[doc = ""] - + #[doc = "Size of each cluster, in bytes."] + #[doc = ""] pub clusterSize: u32_, -#[doc = "Total number of clusters."] -#[doc = ""] - + #[doc = "Total number of clusters."] + #[doc = ""] pub totalClusters: u32_, -#[doc = "Number of free clusters."] -#[doc = ""] - + #[doc = "Number of free clusters."] + #[doc = ""] pub freeClusters: u32_, } #[doc = "Program information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_ProgramInfo { -#[doc = "Program ID."] -#[doc = ""] - + #[doc = "Program ID."] + #[doc = ""] pub programId: u64_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub padding: [u8_; 7usize], } impl Default for FS_ProgramInfo { @@ -8552,36 +8016,29 @@ impl FS_ProgramInfo { } #[doc = "Product information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ProductInfo { -#[doc = "Product code."] -#[doc = ""] - + #[doc = "Product code."] + #[doc = ""] pub productCode: [::libc::c_char; 16usize], -#[doc = "Company code."] -#[doc = ""] - + #[doc = "Company code."] + #[doc = ""] pub companyCode: [::libc::c_char; 2usize], -#[doc = "Remaster version."] -#[doc = ""] - + #[doc = "Remaster version."] + #[doc = ""] pub remasterVersion: u16_, } #[doc = "Integrity verification seed."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_IntegrityVerificationSeed { -#[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] -#[doc = ""] - + #[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] + #[doc = ""] pub aesCbcMac: [u8_; 16usize], -#[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] -#[doc = ""] - + #[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] + #[doc = ""] pub movableSed: [u8_; 288usize], } impl Default for FS_IntegrityVerificationSeed { @@ -8595,27 +8052,22 @@ impl Default for FS_IntegrityVerificationSeed { } #[doc = "Ext save data information."] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct FS_ExtSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknown: u8_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved1: u16_, -#[doc = "Save ID."] -#[doc = ""] - + #[doc = "Save ID."] + #[doc = ""] pub saveId: u64_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved2: u32_, } impl Default for FS_ExtSaveDataInfo { @@ -8651,23 +8103,19 @@ impl FS_ExtSaveDataInfo { } #[doc = "System save data information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_SystemSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknown: u8_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved: u16_, -#[doc = "Save ID."] -#[doc = ""] - + #[doc = "Save ID."] + #[doc = ""] pub saveId: u32_, } impl Default for FS_SystemSaveDataInfo { @@ -8703,36 +8151,29 @@ impl FS_SystemSaveDataInfo { } #[doc = "Device move context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_DeviceMoveContext { -#[doc = "IVs."] -#[doc = ""] - + #[doc = "IVs."] + #[doc = ""] pub ivs: [u8_; 16usize], -#[doc = "Encrypt parameter."] -#[doc = ""] - + #[doc = "Encrypt parameter."] + #[doc = ""] pub encryptParameter: [u8_; 16usize], } #[doc = "Filesystem path data, detailing the specific target of an operation."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_Path { -#[doc = "FS path type."] -#[doc = ""] - + #[doc = "FS path type."] + #[doc = ""] pub type_: FS_PathType, -#[doc = "FS path size."] -#[doc = ""] - + #[doc = "FS path size."] + #[doc = ""] pub size: u32_, -#[doc = "Pointer to FS path data."] -#[doc = ""] - + #[doc = "Pointer to FS path data."] + #[doc = ""] pub data: *const ::libc::c_void, } impl Default for FS_Path { @@ -8746,21 +8187,17 @@ impl Default for FS_Path { } #[doc = "SDMC/NAND speed information"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_SdMmcSpeedInfo { -#[doc = "Whether or not High Speed Mode is enabled."] -#[doc = ""] - + #[doc = "Whether or not High Speed Mode is enabled."] + #[doc = ""] pub highSpeedModeEnabled: bool, -#[doc = "Whether or not a clock divider of 2 is being used."] -#[doc = ""] - + #[doc = "Whether or not a clock divider of 2 is being used."] + #[doc = ""] pub usesHighestClockRate: bool, -#[doc = "The value of the SD_CLK_CTRL register."] -#[doc = ""] - + #[doc = "The value of the SD_CLK_CTRL register."] + #[doc = ""] pub sdClkCtrl: u16_, } #[doc = "Filesystem archive handle, providing access to a filesystem's contents."] @@ -8769,84 +8206,75 @@ pub struct FS_SdMmcSpeedInfo { pub type FS_Archive = u64_; extern "C" { #[must_use] -#[doc = "Initializes FS."] -#[doc = ""] - + #[doc = "Initializes FS."] + #[doc = ""] pub fn fsInit() -> Result; } extern "C" { -#[doc = "Exits FS."] -#[doc = ""] - + #[doc = "Exits FS."] + #[doc = ""] pub fn fsExit(); } extern "C" { -#[doc = "Sets the FSUSER session to use in the current thread."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `session` - The handle of the FSUSER session to use."] - + #[doc = "Sets the FSUSER session to use in the current thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - The handle of the FSUSER session to use."] pub fn fsUseSession(session: Handle); } extern "C" { -#[doc = "Disables the FSUSER session override in the current thread."] -#[doc = ""] - + #[doc = "Disables the FSUSER session override in the current thread."] + #[doc = ""] pub fn fsEndUseSession(); } extern "C" { -#[doc = "Exempts an archive from using alternate FS session handles provided with @ref fsUseSession"] -#[doc = ""] -#[doc = "Instead, the archive will use the default FS session handle, opened with @ref srvGetSessionHandle"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to exempt."] - + #[doc = "Exempts an archive from using alternate FS session handles provided with @ref fsUseSession"] + #[doc = ""] + #[doc = "Instead, the archive will use the default FS session handle, opened with @ref srvGetSessionHandle"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to exempt."] pub fn fsExemptFromSession(archive: FS_Archive); } extern "C" { -#[doc = "Unexempts an archive from using alternate FS session handles provided with @ref fsUseSession"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to remove from the exemption list."] - + #[doc = "Unexempts an archive from using alternate FS session handles provided with @ref fsUseSession"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to remove from the exemption list."] pub fn fsUnexemptFromSession(archive: FS_Archive); } extern "C" { -#[doc = "Creates an FS_Path instance."] -#[doc = ""] -#[doc = "Returns: The created FS_Path instance."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `type` - Type of path."] -#[doc = "* `path` - Path to use."] - + #[doc = "Creates an FS_Path instance."] + #[doc = ""] + #[doc = "Returns: The created FS_Path instance."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Type of path."] + #[doc = "* `path` - Path to use."] pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void) -> FS_Path; } extern "C" { -#[doc = "Gets the current FS session handle."] -#[doc = ""] -#[doc = "Returns: The current FS session handle."] -#[doc = ""] - + #[doc = "Gets the current FS session handle."] + #[doc = ""] + #[doc = "Returns: The current FS session handle."] + #[doc = ""] pub fn fsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Performs a control operation on the filesystem."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `action` - Action to perform."] -#[doc = "* `input` - Buffer to read input from."] -#[doc = "* `inputSize` - Size of the input."] -#[doc = "* `output` - Buffer to write output to."] -#[doc = "* `outputSize` - Size of the output."] - + #[doc = "Performs a control operation on the filesystem."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] pub fn FSUSER_Control( action: FS_Action, input: *mut ::libc::c_void, @@ -8857,26 +8285,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes a FSUSER session."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `session` - The handle of the FSUSER session to initialize."] - + #[doc = "Initializes a FSUSER session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - The handle of the FSUSER session to initialize."] pub fn FSUSER_Initialize(session: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Opens a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the file handle to."] -#[doc = "* `archive` - Archive containing the file."] -#[doc = "* `path` - Path of the file."] -#[doc = "* `openFlags` - Flags to open the file with."] -#[doc = "* `attributes` - Attributes of the file."] - + #[doc = "Opens a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the file handle to."] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `openFlags` - Flags to open the file with."] + #[doc = "* `attributes` - Attributes of the file."] pub fn FSUSER_OpenFile( out: *mut Handle, archive: FS_Archive, @@ -8887,17 +8313,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the file handle to."] -#[doc = "* `archiveId` - ID of the archive containing the file."] -#[doc = "* `archivePath` - Path of the archive containing the file."] -#[doc = "* `filePath` - Path of the file."] -#[doc = "* `openFlags` - Flags to open the file with."] -#[doc = "* `attributes` - Attributes of the file."] - + #[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the file handle to."] + #[doc = "* `archiveId` - ID of the archive containing the file."] + #[doc = "* `archivePath` - Path of the archive containing the file."] + #[doc = "* `filePath` - Path of the file."] + #[doc = "* `openFlags` - Flags to open the file with."] + #[doc = "* `attributes` - Attributes of the file."] pub fn FSUSER_OpenFileDirectly( out: *mut Handle, archiveId: FS_ArchiveID, @@ -8909,26 +8334,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive containing the file."] -#[doc = "* `path` - Path of the file."] - + #[doc = "Deletes a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Renames a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `srcArchive` - Archive containing the source file."] -#[doc = "* `srcPath` - Path of the source file."] -#[doc = "* `dstArchive` - Archive containing the destination file."] -#[doc = "* `dstPath` - Path of the destination file."] - + #[doc = "Renames a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source file."] + #[doc = "* `srcPath` - Path of the source file."] + #[doc = "* `dstArchive` - Archive containing the destination file."] + #[doc = "* `dstPath` - Path of the destination file."] pub fn FSUSER_RenameFile( srcArchive: FS_Archive, srcPath: FS_Path, @@ -8938,37 +8361,34 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a directory, failing if it is not empty."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive containing the directory."] -#[doc = "* `path` - Path of the directory."] - + #[doc = "Deletes a directory, failing if it is not empty."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] pub fn FSUSER_DeleteDirectory(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a directory, also deleting its contents."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive containing the directory."] -#[doc = "* `path` - Path of the directory."] - + #[doc = "Deletes a directory, also deleting its contents."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] pub fn FSUSER_DeleteDirectoryRecursively(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to create the file in."] -#[doc = "* `path` - Path of the file."] -#[doc = "* `attributes` - Attributes of the file."] -#[doc = "* `fileSize` - Size of the file."] - + #[doc = "Creates a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the file in."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `attributes` - Attributes of the file."] + #[doc = "* `fileSize` - Size of the file."] pub fn FSUSER_CreateFile( archive: FS_Archive, path: FS_Path, @@ -8978,27 +8398,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a directory"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to create the directory in."] -#[doc = "* `path` - Path of the directory."] -#[doc = "* `attributes` - Attributes of the directory."] - + #[doc = "Creates a directory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the directory in."] + #[doc = "* `path` - Path of the directory."] + #[doc = "* `attributes` - Attributes of the directory."] pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Renames a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `srcArchive` - Archive containing the source directory."] -#[doc = "* `srcPath` - Path of the source directory."] -#[doc = "* `dstArchive` - Archive containing the destination directory."] -#[doc = "* `dstPath` - Path of the destination directory."] - + #[doc = "Renames a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source directory."] + #[doc = "* `srcPath` - Path of the source directory."] + #[doc = "* `dstArchive` - Archive containing the destination directory."] + #[doc = "* `dstPath` - Path of the destination directory."] pub fn FSUSER_RenameDirectory( srcArchive: FS_Archive, srcPath: FS_Path, @@ -9008,41 +8426,38 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the directory handle to."] -#[doc = "* `archive` - Archive containing the directory."] -#[doc = "* `path` - Path of the directory."] - + #[doc = "Opens a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the directory handle to."] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Opens an archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Pointer to output the opened archive to."] -#[doc = "* `id` - ID of the archive."] -#[doc = "* `path` - Path of the archive."] - + #[doc = "Opens an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Pointer to output the opened archive to."] + #[doc = "* `id` - ID of the archive."] + #[doc = "* `path` - Path of the archive."] pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Performs a control operation on an archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to control."] -#[doc = "* `action` - Action to perform."] -#[doc = "* `input` - Buffer to read input from."] -#[doc = "* `inputSize` - Size of the input."] -#[doc = "* `output` - Buffer to write output to."] -#[doc = "* `outputSize` - Size of the output."] - + #[doc = "Performs a control operation on an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to control."] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] pub fn FSUSER_ControlArchive( archive: FS_Archive, action: FS_ArchiveAction, @@ -9054,234 +8469,211 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes an archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to close."] - + #[doc = "Closes an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to close."] pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the number of free bytes within an archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `freeBytes` - Pointer to output the free bytes to."] -#[doc = "* `archive` - Archive to check."] - + #[doc = "Gets the number of free bytes within an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `freeBytes` - Pointer to output the free bytes to."] + #[doc = "* `archive` - Archive to check."] pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the inserted card type."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `type` - Pointer to output the card type to."] - + #[doc = "Gets the inserted card type."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Pointer to output the card type to."] pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC archive resource information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] - + #[doc = "Gets the SDMC archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] pub fn FSUSER_GetSdmcArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND archive resource information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] - + #[doc = "Gets the NAND archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the last SDMC fatfs error."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `error` - Pointer to output the error to."] - + #[doc = "Gets the last SDMC fatfs error."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `error` - Pointer to output the error to."] pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether an SD card is detected."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `detected` - Pointer to output the detection status to."] - + #[doc = "Gets whether an SD card is detected."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `detected` - Pointer to output the detection status to."] pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the SD card is writable."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `writable` - Pointer to output the writable status to."] - + #[doc = "Gets whether the SD card is writable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `writable` - Pointer to output the writable status to."] pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC CID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the CID to."] -#[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] - + #[doc = "Gets the SDMC CID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the CID to."] + #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND CID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the CID to."] -#[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] - + #[doc = "Gets the NAND CID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the CID to."] + #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC speed info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `speedInfo` - Pointer to output the speed info to."] - + #[doc = "Gets the SDMC speed info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `speedInfo` - Pointer to output the speed info to."] pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND speed info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `speedInfo` - Pointer to output the speed info to."] - + #[doc = "Gets the NAND speed info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `speedInfo` - Pointer to output the speed info to."] pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC log."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the log to."] -#[doc = "* `length` - Length of the log buffer."] - + #[doc = "Gets the SDMC log."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the log to."] + #[doc = "* `length` - Length of the log buffer."] pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND log."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the log to."] -#[doc = "* `length` - Length of the log buffer."] - + #[doc = "Gets the NAND log."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the log to."] + #[doc = "* `length` - Length of the log buffer."] pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the SDMC log."] -#[doc = ""] - + #[doc = "Clears the SDMC log."] + #[doc = ""] pub fn FSUSER_ClearSdmcLog() -> Result; } extern "C" { #[must_use] -#[doc = "Clears the NAND log."] -#[doc = ""] - + #[doc = "Clears the NAND log."] + #[doc = ""] pub fn FSUSER_ClearNandLog() -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether a card is inserted."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inserted` - Pointer to output the insertion status to."] - + #[doc = "Gets whether a card is inserted."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inserted` - Pointer to output the insertion status to."] pub fn FSUSER_CardSlotIsInserted(inserted: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers on the card slot."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `status` - Pointer to output the power status to."] - + #[doc = "Powers on the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] pub fn FSUSER_CardSlotPowerOn(status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers off the card slot."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `status` - Pointer to output the power status to."] - + #[doc = "Powers off the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] pub fn FSUSER_CardSlotPowerOff(status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the card's power status."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `status` - Pointer to output the power status to."] - + #[doc = "Gets the card's power status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] - + #[doc = "Executes a CARDNOR direct command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command with an address."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] - + #[doc = "Executes a CARDNOR direct command with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `size` - Size of the output buffer."] -#[doc = "* `output` - Output buffer."] - + #[doc = "Executes a CARDNOR direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] pub fn FSUSER_CardNorDirectRead( commandId: u8_, size: u32_, @@ -9290,15 +8682,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read with an address."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the output buffer."] -#[doc = "* `output` - Output buffer."] - + #[doc = "Executes a CARDNOR direct read with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] pub fn FSUSER_CardNorDirectReadWithAddress( commandId: u8_, address: u32_, @@ -9308,14 +8699,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `size` - Size of the input buffer."] -#[doc = "* `output` - Input buffer."] - + #[doc = "Executes a CARDNOR direct write."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] pub fn FSUSER_CardNorDirectWrite( commandId: u8_, size: u32_, @@ -9324,15 +8714,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write with an address."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the input buffer."] -#[doc = "* `input` - Input buffer."] - + #[doc = "Executes a CARDNOR direct write with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `input` - Input buffer."] pub fn FSUSER_CardNorDirectWriteWithAddress( commandId: u8_, address: u32_, @@ -9342,15 +8731,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR 4xIO direct read."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the output buffer."] -#[doc = "* `output` - Output buffer."] - + #[doc = "Executes a CARDNOR 4xIO direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] pub fn FSUSER_CardNorDirectRead_4xIO( commandId: u8_, address: u32_, @@ -9360,14 +8748,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct CPU write without verify."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the input buffer."] -#[doc = "* `output` - Input buffer."] - + #[doc = "Executes a CARDNOR direct CPU write without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify( address: u32_, size: u32_, @@ -9376,74 +8763,67 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct sector erase without verify."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `address` - Address to provide."] - + #[doc = "Executes a CARDNOR direct sector erase without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a process's product info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output the product info to."] -#[doc = "* `processId` - ID of the process."] - + #[doc = "Gets a process's product info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the product info to."] + #[doc = "* `processId` - ID of the process."] pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a process's program launch info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output the program launch info to."] -#[doc = "* `processId` - ID of the process."] - + #[doc = "Gets a process's program launch info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the program launch info to."] + #[doc = "* `processId` - ID of the process."] pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI baud rate."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `baudRate` - Baud rate to set."] - + #[doc = "Sets the CARDSPI baud rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `baudRate` - Baud rate to set."] pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI bus mode."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `busMode` - Bus mode to set."] - + #[doc = "Sets the CARDSPI bus mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `busMode` - Bus mode to set."] pub fn FSUSER_SetCardSpiBusMode(busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] -#[doc = "Sends initialization info to ARM9."] -#[doc = ""] - + #[doc = "Sends initialization info to ARM9."] + #[doc = ""] pub fn FSUSER_SendInitializeInfoTo9() -> Result; } extern "C" { #[must_use] -#[doc = "Gets a special content's index."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `index` - Pointer to output the index to."] -#[doc = "* `mediaType` - Media type of the special content."] -#[doc = "* `programId` - Program ID owning the special content."] -#[doc = "* `type` - Type of special content."] - + #[doc = "Gets a special content's index."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `index` - Pointer to output the index to."] + #[doc = "* `mediaType` - Media type of the special content."] + #[doc = "* `programId` - Program ID owning the special content."] + #[doc = "* `type` - Type of special content."] pub fn FSUSER_GetSpecialContentIndex( index: *mut u16_, mediaType: FS_MediaType, @@ -9453,14 +8833,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy ROM header of a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Media type of the program."] -#[doc = "* `programId` - ID of the program."] -#[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] - + #[doc = "Gets the legacy ROM header of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] pub fn FSUSER_GetLegacyRomHeader( mediaType: FS_MediaType, programId: u64_, @@ -9469,14 +8848,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy banner data of a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Media type of the program."] -#[doc = "* `programId` - ID of the program."] -#[doc = "* `header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] - + #[doc = "Gets the legacy banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] pub fn FSUSER_GetLegacyBannerData( mediaType: FS_MediaType, programId: u64_, @@ -9485,15 +8863,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks a process's authority to access a save data archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `access` - Pointer to output the access status to."] -#[doc = "* `mediaType` - Media type of the save data."] -#[doc = "* `saveId` - ID of the save data."] -#[doc = "* `processId` - ID of the process to check."] - + #[doc = "Checks a process's authority to access a save data archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `access` - Pointer to output the access status to."] + #[doc = "* `mediaType` - Media type of the save data."] + #[doc = "* `saveId` - ID of the save data."] + #[doc = "* `processId` - ID of the process to check."] pub fn FSUSER_CheckAuthorityToAccessExtSaveData( access: *mut bool, mediaType: FS_MediaType, @@ -9503,16 +8880,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Queries the total quota size of a save data archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `quotaSize` - Pointer to output the quota size to."] -#[doc = "* `directories` - Number of directories."] -#[doc = "* `files` - Number of files."] -#[doc = "* `fileSizeCount` - Number of file sizes to provide."] -#[doc = "* `fileSizes` - File sizes to provide."] - + #[doc = "Queries the total quota size of a save data archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `quotaSize` - Pointer to output the quota size to."] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `fileSizeCount` - Number of file sizes to provide."] + #[doc = "* `fileSizes` - File sizes to provide."] pub fn FSUSER_QueryTotalQuotaSize( quotaSize: *mut u64_, directories: u32_, @@ -9523,55 +8899,49 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Abnegates an access right."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `accessRight` - Access right to abnegate."] - + #[doc = "Abnegates an access right."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `accessRight` - Access right to abnegate."] pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the 3DS SDMC root."] -#[doc = ""] - + #[doc = "Deletes the 3DS SDMC root."] + #[doc = ""] pub fn FSUSER_DeleteSdmcRoot() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all ext save data on the NAND."] -#[doc = ""] - + #[doc = "Deletes all ext save data on the NAND."] + #[doc = ""] pub fn FSUSER_DeleteAllExtSaveDataOnNand() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CTR file system."] -#[doc = ""] - + #[doc = "Initializes the CTR file system."] + #[doc = ""] pub fn FSUSER_InitializeCtrFileSystem() -> Result; } extern "C" { #[must_use] -#[doc = "Creates the FS seed."] -#[doc = ""] - + #[doc = "Creates the FS seed."] + #[doc = ""] pub fn FSUSER_CreateSeed() -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves archive format info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `totalSize` - Pointer to output the total size to."] -#[doc = "* `directories` - Pointer to output the number of directories to."] -#[doc = "* `files` - Pointer to output the number of files to."] -#[doc = "* `duplicateData` - Pointer to output whether to duplicate data to."] -#[doc = "* `archiveId` - ID of the archive."] -#[doc = "* `path` - Path of the archive."] - + #[doc = "Retrieves archive format info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `totalSize` - Pointer to output the total size to."] + #[doc = "* `directories` - Pointer to output the number of directories to."] + #[doc = "* `files` - Pointer to output the number of files to."] + #[doc = "* `duplicateData` - Pointer to output whether to duplicate data to."] + #[doc = "* `archiveId` - ID of the archive."] + #[doc = "* `path` - Path of the archive."] pub fn FSUSER_GetFormatInfo( totalSize: *mut u32_, directories: *mut u32_, @@ -9583,15 +8953,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy ROM header of a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `headerSize` - Size of the ROM header."] -#[doc = "* `mediaType` - Media type of the program."] -#[doc = "* `programId` - ID of the program."] -#[doc = "* `header` - Pointer to output the legacy ROM header to."] - + #[doc = "Gets the legacy ROM header of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `headerSize` - Size of the ROM header."] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy ROM header to."] pub fn FSUSER_GetLegacyRomHeader2( headerSize: u32_, mediaType: FS_MediaType, @@ -9601,24 +8970,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the CTR SDMC root path."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the root path to."] -#[doc = "* `length` - Length of the output buffer."] - + #[doc = "Gets the CTR SDMC root path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the root path to."] + #[doc = "* `length` - Length of the output buffer."] pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an archive's resource information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] -#[doc = "* `mediaType` - System media type to check."] - + #[doc = "Gets an archive's resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = "* `mediaType` - System media type to check."] pub fn FSUSER_GetArchiveResource( archiveResource: *mut FS_ArchiveResource, mediaType: FS_SystemMediaType, @@ -9626,43 +8993,40 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Exports the integrity verification seed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `seed` - Pointer to output the seed to."] - + #[doc = "Exports the integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to output the seed to."] pub fn FSUSER_ExportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] -#[doc = "Imports an integrity verification seed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `seed` - Seed to import."] - + #[doc = "Imports an integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Seed to import."] pub fn FSUSER_ImportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] -#[doc = "Formats save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archiveId` - ID of the save data archive."] -#[doc = "* `path` - Path of the save data."] -#[doc = "* `blocks` - Size of the save data in blocks. (512 bytes)"] -#[doc = "* `directories` - Number of directories."] -#[doc = "* `files` - Number of files."] -#[doc = "* `directoryBuckets` - Directory hash tree bucket count."] -#[doc = "* `fileBuckets` - File hash tree bucket count."] -#[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] - + #[doc = "Formats save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveId` - ID of the save data archive."] + #[doc = "* `path` - Path of the save data."] + #[doc = "* `blocks` - Size of the save data in blocks. (512 bytes)"] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] + #[doc = "* `fileBuckets` - File hash tree bucket count."] + #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] pub fn FSUSER_FormatSaveData( archiveId: FS_ArchiveID, path: FS_Path, @@ -9676,15 +9040,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy sub banner data of a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bannerSize` - Size of the banner."] -#[doc = "* `mediaType` - Media type of the program."] -#[doc = "* `programId` - ID of the program."] -#[doc = "* `header` - Pointer to output the legacy sub banner data to."] - + #[doc = "Gets the legacy sub banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bannerSize` - Size of the banner."] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy sub banner data to."] pub fn FSUSER_GetLegacySubBannerData( bannerSize: u32_, mediaType: FS_MediaType, @@ -9694,14 +9057,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Hashes the given data and outputs a SHA256 hash."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to the data to be hashed."] -#[doc = "* `inputSize` - The size of the data."] -#[doc = "* `hash` - Hash output pointer."] - + #[doc = "Hashes the given data and outputs a SHA256 hash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to the data to be hashed."] + #[doc = "* `inputSize` - The size of the data."] + #[doc = "* `hash` - Hash output pointer."] pub fn FSUSER_UpdateSha256Context( data: *const ::libc::c_void, inputSize: u32_, @@ -9710,15 +9072,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a special file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "* `fileOffset` - Offset of the file."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `data` - Buffer to read to."] - + #[doc = "Reads from a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `fileOffset` - Offset of the file."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `data` - Buffer to read to."] pub fn FSUSER_ReadSpecialFile( bytesRead: *mut u32_, fileOffset: u64_, @@ -9728,27 +9089,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the size of a special file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `fileSize` - Pointer to output the size to."] - + #[doc = "Gets the size of a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `fileSize` - Pointer to output the size to."] pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates ext save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Info of the save data."] -#[doc = "* `directories` - Number of directories."] -#[doc = "* `files` - Number of files."] -#[doc = "* `sizeLimit` - Size limit of the save data."] -#[doc = "* `smdhSize` - Size of the save data's SMDH data."] -#[doc = "* `smdh` - SMDH data."] - + #[doc = "Creates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `sizeLimit` - Size limit of the save data."] + #[doc = "* `smdhSize` - Size of the save data's SMDH data."] + #[doc = "* `smdh` - SMDH data."] pub fn FSUSER_CreateExtSaveData( info: FS_ExtSaveDataInfo, directories: u32_, @@ -9760,25 +9119,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes ext save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Info of the save data."] - + #[doc = "Deletes ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] pub fn FSUSER_DeleteExtSaveData(info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Reads the SMDH icon of ext save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "* `info` - Info of the save data."] -#[doc = "* `smdhSize` - Size of the save data SMDH."] -#[doc = "* `smdh` - Pointer to output SMDH data to."] - + #[doc = "Reads the SMDH icon of ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `info` - Info of the save data."] + #[doc = "* `smdhSize` - Size of the save data SMDH."] + #[doc = "* `smdh` - Pointer to output SMDH data to."] pub fn FSUSER_ReadExtSaveDataIcon( bytesRead: *mut u32_, info: FS_ExtSaveDataInfo, @@ -9788,15 +9145,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an ext data archive's block information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `totalBlocks` - Pointer to output the total blocks to."] -#[doc = "* `freeBlocks` - Pointer to output the free blocks to."] -#[doc = "* `blockSize` - Pointer to output the block size to."] -#[doc = "* `info` - Info of the save data."] - + #[doc = "Gets an ext data archive's block information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `totalBlocks` - Pointer to output the total blocks to."] + #[doc = "* `freeBlocks` - Pointer to output the free blocks to."] + #[doc = "* `blockSize` - Pointer to output the block size to."] + #[doc = "* `info` - Info of the save data."] pub fn FSUSER_GetExtDataBlockSize( totalBlocks: *mut u64_, freeBlocks: *mut u64_, @@ -9806,17 +9162,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Enumerates ext save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "* `idsSize` - Size of the IDs buffer."] -#[doc = "* `mediaType` - Media type to enumerate over."] -#[doc = "* `idSize` - Size of each ID element."] -#[doc = "* `shared` - Whether to enumerate shared ext save data."] -#[doc = "* `ids` - Pointer to output IDs to."] - + #[doc = "Enumerates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `mediaType` - Media type to enumerate over."] + #[doc = "* `idSize` - Size of each ID element."] + #[doc = "* `shared` - Whether to enumerate shared ext save data."] + #[doc = "* `ids` - Pointer to output IDs to."] pub fn FSUSER_EnumerateExtSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9828,19 +9183,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates system save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Info of the save data."] -#[doc = "* `totalSize` - Total size of the save data."] -#[doc = "* `blockSize` - Block size of the save data. (usually 0x1000)"] -#[doc = "* `directories` - Number of directories."] -#[doc = "* `files` - Number of files."] -#[doc = "* `directoryBuckets` - Directory hash tree bucket count."] -#[doc = "* `fileBuckets` - File hash tree bucket count."] -#[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] - + #[doc = "Creates system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = "* `totalSize` - Total size of the save data."] + #[doc = "* `blockSize` - Block size of the save data. (usually 0x1000)"] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] + #[doc = "* `fileBuckets` - File hash tree bucket count."] + #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] pub fn FSUSER_CreateSystemSaveData( info: FS_SystemSaveDataInfo, totalSize: u32_, @@ -9854,33 +9208,30 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes system save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Info of the save data."] - + #[doc = "Deletes system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] pub fn FSUSER_DeleteSystemSaveData(info: FS_SystemSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates a device move as the source device."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Pointer to output the context to."] - + #[doc = "Initiates a device move as the source device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Pointer to output the context to."] pub fn FSUSER_StartDeviceMoveAsSource(context: *mut FS_DeviceMoveContext) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates a device move as the destination device."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `clear` - Whether to clear the device's data first."] - + #[doc = "Initiates a device move as the destination device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `clear` - Whether to clear the device's data first."] pub fn FSUSER_StartDeviceMoveAsDestination( context: FS_DeviceMoveContext, clear: bool, @@ -9888,57 +9239,52 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets an archive's priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to use."] -#[doc = "* `priority` - Priority to set."] - + #[doc = "Sets an archive's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to use."] + #[doc = "* `priority` - Priority to set."] pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an archive's priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `priority` - Pointer to output the priority to."] -#[doc = "* `archive` - Archive to use."] - + #[doc = "Gets an archive's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = "* `archive` - Archive to use."] pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Configures CTRCARD latency emulation."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `latency` - Latency to apply, in milliseconds."] -#[doc = "* `emulateEndurance` - Whether to emulate card endurance."] - + #[doc = "Configures CTRCARD latency emulation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `latency` - Latency to apply, in milliseconds."] + #[doc = "* `emulateEndurance` - Whether to emulate card endurance."] pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Toggles cleaning up invalid save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Whether to enable cleaning up invalid save data."] - + #[doc = "Toggles cleaning up invalid save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Enumerates system save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "* `idsSize` - Size of the IDs buffer."] -#[doc = "* `ids` - Pointer to output IDs to."] - + #[doc = "Enumerates system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `ids` - Pointer to output IDs to."] pub fn FSUSER_EnumerateSystemSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9947,46 +9293,42 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes a FSUSER session with an SDK version."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `session` - The handle of the FSUSER session to initialize."] -#[doc = "* `version` - SDK version to initialize with."] - + #[doc = "Initializes a FSUSER session with an SDK version."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - The handle of the FSUSER session to initialize."] + #[doc = "* `version` - SDK version to initialize with."] pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the file system priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `priority` - Priority to set."] - + #[doc = "Sets the file system priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Priority to set."] pub fn FSUSER_SetPriority(priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the file system priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `priority` - Pointer to output the priority to."] - + #[doc = "Gets the file system priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Pointer to output the priority to."] pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the save data secure value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Secure value to set."] -#[doc = "* `slot` - Slot of the secure value."] -#[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] -#[doc = "* `titleVariation` - Variation of the title. (default = 0)"] - + #[doc = "Sets the save data secure value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Secure value to set."] + #[doc = "* `slot` - Slot of the secure value."] + #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] + #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] pub fn FSUSER_SetSaveDataSecureValue( value: u64_, slot: FS_SecureValueSlot, @@ -9996,16 +9338,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the save data secure value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `exists` - Pointer to output whether the secure value exists to."] -#[doc = "* `value` - Pointer to output the secure value to."] -#[doc = "* `slot` - Slot of the secure value."] -#[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] -#[doc = "* `titleVariation` - Variation of the title. (default = 0)"] - + #[doc = "Gets the save data secure value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exists` - Pointer to output whether the secure value exists to."] + #[doc = "* `value` - Pointer to output the secure value to."] + #[doc = "* `slot` - Slot of the secure value."] + #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] + #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] pub fn FSUSER_GetSaveDataSecureValue( exists: *mut bool, value: *mut u64_, @@ -10016,16 +9357,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Performs a control operation on a secure save."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `action` - Action to perform."] -#[doc = "* `input` - Buffer to read input from."] -#[doc = "* `inputSize` - Size of the input."] -#[doc = "* `output` - Buffer to write output to."] -#[doc = "* `outputSize` - Size of the output."] - + #[doc = "Performs a control operation on a secure save."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] pub fn FSUSER_ControlSecureSave( action: FS_SecureSaveAction, input: *mut ::libc::c_void, @@ -10036,27 +9376,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the media type of the current application."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Pointer to output the media type to."] - + #[doc = "Gets the media type of the current application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Pointer to output the media type to."] pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result; } extern "C" { #[must_use] -#[doc = "Performs a control operation on a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `action` - Action to perform."] -#[doc = "* `input` - Buffer to read input from."] -#[doc = "* `inputSize` - Size of the input."] -#[doc = "* `output` - Buffer to write output to."] -#[doc = "* `outputSize` - Size of the output."] - + #[doc = "Performs a control operation on a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] pub fn FSFILE_Control( handle: Handle, action: FS_FileAction, @@ -10068,15 +9406,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a handle to a sub-section of a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `subFile` - Pointer to output the sub-file to."] -#[doc = "* `offset` - Offset of the sub-section."] -#[doc = "* `size` - Size of the sub-section."] - + #[doc = "Opens a handle to a sub-section of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `subFile` - Pointer to output the sub-file to."] + #[doc = "* `offset` - Offset of the sub-section."] + #[doc = "* `size` - Size of the sub-section."] pub fn FSFILE_OpenSubFile( handle: Handle, subFile: *mut Handle, @@ -10086,16 +9423,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "* `offset` - Offset to read from."] -#[doc = "* `buffer` - Buffer to read to."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Reads from a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `buffer` - Buffer to read to."] + #[doc = "* `size` - Size of the buffer."] pub fn FSFILE_Read( handle: Handle, bytesRead: *mut u32_, @@ -10106,17 +9442,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] -#[doc = "* `offset` - Offset to write to."] -#[doc = "* `buffer` - Buffer to write from."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `flags` - Flags to use when writing."] - + #[doc = "Writes to a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `buffer` - Buffer to write from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `flags` - Flags to use when writing."] pub fn FSFILE_Write( handle: Handle, bytesWritten: *mut u32_, @@ -10128,114 +9463,104 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the size of a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `size` - Pointer to output the size to."] - + #[doc = "Gets the size of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `size` - Pointer to output the size to."] pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the size of a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `size` - Size to set."] - + #[doc = "Sets the size of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `size` - Size to set."] pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the attributes of a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `attributes` - Pointer to output the attributes to."] - + #[doc = "Gets the attributes of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `attributes` - Pointer to output the attributes to."] pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the attributes of a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `attributes` - Attributes to set."] - + #[doc = "Sets the attributes of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `attributes` - Attributes to set."] pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Closes a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] - + #[doc = "Closes a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] pub fn FSFILE_Close(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes a file's contents."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] - + #[doc = "Flushes a file's contents."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] pub fn FSFILE_Flush(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a file's priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `priority` - Priority to set."] - + #[doc = "Sets a file's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `priority` - Priority to set."] pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a file's priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `priority` - Pointer to output the priority to."] - + #[doc = "Gets a file's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `priority` - Pointer to output the priority to."] pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Opens a duplicate handle to a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the file."] -#[doc = "* `linkFile` - Pointer to output the link handle to."] - + #[doc = "Opens a duplicate handle to a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `linkFile` - Pointer to output the link handle to."] pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Performs a control operation on a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the directory."] -#[doc = "* `action` - Action to perform."] -#[doc = "* `input` - Buffer to read input from."] -#[doc = "* `inputSize` - Size of the input."] -#[doc = "* `output` - Buffer to write output to."] -#[doc = "* `outputSize` - Size of the output."] - + #[doc = "Performs a control operation on a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] pub fn FSDIR_Control( handle: Handle, action: FS_DirectoryAction, @@ -10247,15 +9572,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads one or more directory entries."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the directory."] -#[doc = "* `entriesRead` - Pointer to output the number of entries read to."] -#[doc = "* `entryCount` - Number of entries to read."] -#[doc = "* `entryOut` - Pointer to output directory entries to."] - + #[doc = "Reads one or more directory entries."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] + #[doc = "* `entryCount` - Number of entries to read."] + #[doc = "* `entryOut` - Pointer to output directory entries to."] pub fn FSDIR_Read( handle: Handle, entriesRead: *mut u32_, @@ -10265,57 +9589,49 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the directory."] - + #[doc = "Closes a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] pub fn FSDIR_Close(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a directory's priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the directory."] -#[doc = "* `priority` - Priority to set."] - + #[doc = "Sets a directory's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `priority` - Priority to set."] pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a directory's priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Handle of the directory."] -#[doc = "* `priority` - Pointer to output the priority to."] - + #[doc = "Gets a directory's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `priority` - Pointer to output the priority to."] pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } #[doc = "Contains basic information about a title."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TitleEntry { -#[doc = "The title's ID."] -#[doc = ""] - + #[doc = "The title's ID."] + #[doc = ""] pub titleID: u64_, -#[doc = "The title's installed size."] -#[doc = ""] - + #[doc = "The title's installed size."] + #[doc = ""] pub size: u64_, -#[doc = "The title's version."] -#[doc = ""] - + #[doc = "The title's version."] + #[doc = ""] pub version: u16_, -#[doc = "Unknown title data."] -#[doc = ""] - + #[doc = "Unknown title data."] + #[doc = ""] pub unk: [u8_; 6usize], } #[doc = "Titles currently installing."] @@ -10353,25 +9669,20 @@ pub type AM_InstallStatus = ::libc::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_PendingTitleEntry { -#[doc = "Title ID"] -#[doc = ""] - + #[doc = "Title ID"] + #[doc = ""] pub titleId: u64_, -#[doc = "Version"] -#[doc = ""] - + #[doc = "Version"] + #[doc = ""] pub version: u16_, -#[doc = "@ref AM_InstallStatus"] -#[doc = ""] - + #[doc = "@ref AM_InstallStatus"] + #[doc = ""] pub status: u16_, -#[doc = "Title Type"] -#[doc = ""] - + #[doc = "Title Type"] + #[doc = ""] pub titleType: u32_, -#[doc = "Unknown"] -#[doc = ""] - + #[doc = "Unknown"] + #[doc = ""] pub unk: [u8_; 8usize], } #[doc = "Non-system titles."] @@ -10388,56 +9699,44 @@ pub const AM_DELETE_PENDING_SYSTEM: _bindgen_ty_14 = 2; pub type _bindgen_ty_14 = ::libc::c_uint; #[doc = "Information about the TWL NAND partition."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TWLPartitionInfo { -#[doc = "Total capacity."] -#[doc = ""] - + #[doc = "Total capacity."] + #[doc = ""] pub capacity: u64_, -#[doc = "Total free space."] -#[doc = ""] - + #[doc = "Total free space."] + #[doc = ""] pub freeSpace: u64_, -#[doc = "Capacity for titles."] -#[doc = ""] - + #[doc = "Capacity for titles."] + #[doc = ""] pub titlesCapacity: u64_, -#[doc = "Free space for titles."] -#[doc = ""] - + #[doc = "Free space for titles."] + #[doc = ""] pub titlesFreeSpace: u64_, } #[doc = "Contains information about a title's content."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_ContentInfo { -#[doc = "Index of the content in the title."] -#[doc = ""] - + #[doc = "Index of the content in the title."] + #[doc = ""] pub index: u16_, -#[doc = "?"] -#[doc = ""] - + #[doc = "?"] + #[doc = ""] pub type_: u16_, -#[doc = "ID of the content in the title."] -#[doc = ""] - + #[doc = "ID of the content in the title."] + #[doc = ""] pub contentId: u32_, -#[doc = "Size of the content in the title."] -#[doc = ""] - + #[doc = "Size of the content in the title."] + #[doc = ""] pub size: u64_, -#[doc = "@ref AM_ContentInfoFlags"] -#[doc = ""] - + #[doc = "@ref AM_ContentInfoFlags"] + #[doc = ""] pub flags: u8_, -#[doc = "Padding"] -#[doc = ""] - + #[doc = "Padding"] + #[doc = ""] pub padding: [u8_; 7usize], } #[doc = "?"] @@ -10454,52 +9753,46 @@ pub const AM_CONTENT_OWNED: AM_ContentInfoFlags = 2; pub type AM_ContentInfoFlags = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] -#[doc = ""] - + #[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] + #[doc = ""] pub fn amInit() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] -#[doc = ""] - + #[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] + #[doc = ""] pub fn amAppInit() -> Result; } extern "C" { -#[doc = "Exits AM."] -#[doc = ""] - + #[doc = "Exits AM."] + #[doc = ""] pub fn amExit(); } extern "C" { -#[doc = "Gets the current AM session handle."] -#[doc = ""] - + #[doc = "Gets the current AM session handle."] + #[doc = ""] pub fn amGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the number of titles for a given media type."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to get titles from."] -#[doc = "* `count` - Pointer to write the title count to. [Direction: In, Out]"] - + #[doc = "Gets the number of titles for a given media type."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to get titles from."] + #[doc = "* `count` - Pointer to write the title count to. [Direction: In, Out]"] pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a list of title IDs present in a mediatype."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titlesRead` - Pointer to output the number of read titles to. [Direction: In, Out]"] -#[doc = "* `mediatype` - Media type to get titles from."] -#[doc = "* `titleCount` - Number of title IDs to get."] -#[doc = "* `titleIds` - Buffer to output the retrieved title IDs to."] - + #[doc = "Gets a list of title IDs present in a mediatype."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titlesRead` - Pointer to output the number of read titles to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type to get titles from."] + #[doc = "* `titleCount` - Number of title IDs to get."] + #[doc = "* `titleIds` - Buffer to output the retrieved title IDs to."] pub fn AM_GetTitleList( titlesRead: *mut u32_, mediatype: FS_MediaType, @@ -10509,15 +9802,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a list of details about installed titles."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to get titles from."] -#[doc = "* `titleCount` - Number of titles to list."] -#[doc = "* `titleIds` - List of title IDs to retrieve details for."] -#[doc = "* `titleInfo` - Buffer to write AM_TitleEntry's to."] - + #[doc = "Gets a list of details about installed titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to get titles from."] + #[doc = "* `titleCount` - Number of titles to list."] + #[doc = "* `titleIds` - List of title IDs to retrieve details for."] + #[doc = "* `titleInfo` - Buffer to write AM_TitleEntry's to."] pub fn AM_GetTitleInfo( mediatype: FS_MediaType, titleCount: u32_, @@ -10527,25 +9819,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the number of tickets installed on the system."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `count` - Pointer to output the ticket count to. [Direction: In, Out]"] - + #[doc = "Gets the number of tickets installed on the system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the ticket count to. [Direction: In, Out]"] pub fn AM_GetTicketCount(count: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a list of tickets installed on the system."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ticketsRead` - Pointer to output the number of read tickets to. [Direction: In, Out]"] -#[doc = "* `ticketCount` - Number of tickets to read."] -#[doc = "* `skip` - Number of tickets to skip."] -#[doc = "* `ticketIds` - Buffer to output the retrieved ticket IDs to."] - + #[doc = "Gets a list of tickets installed on the system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketsRead` - Pointer to output the number of read tickets to. [Direction: In, Out]"] + #[doc = "* `ticketCount` - Number of tickets to read."] + #[doc = "* `skip` - Number of tickets to skip."] + #[doc = "* `ticketIds` - Buffer to output the retrieved ticket IDs to."] pub fn AM_GetTicketList( ticketsRead: *mut u32_, ticketCount: u32_, @@ -10555,14 +9845,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the number of pending titles on this system."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `count` - Pointer to output the pending title count to. [Direction: In, Out]"] -#[doc = "* `mediatype` - Media type of pending titles to count."] -#[doc = "* `statusMask` - Bit mask of status values to include."] - + #[doc = "Gets the number of pending titles on this system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the pending title count to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of pending titles to count."] + #[doc = "* `statusMask` - Bit mask of status values to include."] pub fn AM_GetPendingTitleCount( count: *mut u32_, mediatype: FS_MediaType, @@ -10571,16 +9860,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a list of pending titles on this system."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titlesRead` - Pointer to output the number of read pending titles to. [Direction: In, Out]"] -#[doc = "* `titleCount` - Number of pending titles to read."] -#[doc = "* `mediatype` - Media type of pending titles to list."] -#[doc = "* `statusMask` - Bit mask of status values to include."] -#[doc = "* `titleIds` - Buffer to output the retrieved pending title IDs to."] - + #[doc = "Gets a list of pending titles on this system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titlesRead` - Pointer to output the number of read pending titles to. [Direction: In, Out]"] + #[doc = "* `titleCount` - Number of pending titles to read."] + #[doc = "* `mediatype` - Media type of pending titles to list."] + #[doc = "* `statusMask` - Bit mask of status values to include."] + #[doc = "* `titleIds` - Buffer to output the retrieved pending title IDs to."] pub fn AM_GetPendingTitleList( titlesRead: *mut u32_, titleCount: u32_, @@ -10591,15 +9879,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets information about pending titles on this system."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleCount` - Number of pending titles to read."] -#[doc = "* `mediatype` - Media type of pending titles to get information on."] -#[doc = "* `titleIds` - IDs of the titles to get information about."] -#[doc = "* `titleInfo` - Buffer to output the retrieved pending title info to."] - + #[doc = "Gets information about pending titles on this system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleCount` - Number of pending titles to read."] + #[doc = "* `mediatype` - Media type of pending titles to get information on."] + #[doc = "* `titleIds` - IDs of the titles to get information about."] + #[doc = "* `titleInfo` - Buffer to output the retrieved pending title info to."] pub fn AM_GetPendingTitleInfo( titleCount: u32_, mediatype: FS_MediaType, @@ -10609,26 +9896,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a 32-bit device-specific ID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `deviceID` - Pointer to write the device ID to."] - + #[doc = "Gets a 32-bit device-specific ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `deviceID` - Pointer to write the device ID to."] pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Exports DSiWare to the specified filepath."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleID` - TWL titleID."] -#[doc = "* `operation` - DSiWare operation type."] -#[doc = "* `workbuf` - Work buffer."] -#[doc = "* `workbuf_size` - Work buffer size, must be >=0x20000."] -#[doc = "* `filepath` - UTF-8 filepath(converted to UTF-16 internally)."] - + #[doc = "Exports DSiWare to the specified filepath."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleID` - TWL titleID."] + #[doc = "* `operation` - DSiWare operation type."] + #[doc = "* `workbuf` - Work buffer."] + #[doc = "* `workbuf_size` - Work buffer size, must be >=0x20000."] + #[doc = "* `filepath` - UTF-8 filepath(converted to UTF-16 internally)."] pub fn AM_ExportTwlBackup( titleID: u64_, operation: u8_, @@ -10639,15 +9924,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Imports DSiWare from the specified file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `filehandle` - FSUSER file handle."] -#[doc = "* `operation` - DSiWare operation type."] -#[doc = "* `buffer` - Work buffer."] -#[doc = "* `size` - Buffer size, must be >=0x20000."] - + #[doc = "Imports DSiWare from the specified file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `filehandle` - FSUSER file handle."] + #[doc = "* `operation` - DSiWare operation type."] + #[doc = "* `buffer` - Work buffer."] + #[doc = "* `size` - Buffer size, must be >=0x20000."] pub fn AM_ImportTwlBackup( filehandle: Handle, operation: u8_, @@ -10657,18 +9941,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `filehandle` - FSUSER file handle."] -#[doc = "* `outinfo` - Output info buffer."] -#[doc = "* `outinfo_size` - Output info buffer size."] -#[doc = "* `workbuf` - Work buffer."] -#[doc = "* `workbuf_size` - Work buffer size."] -#[doc = "* `banner` - Output banner buffer."] -#[doc = "* `banner_size` - Output banner buffer size."] - + #[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `filehandle` - FSUSER file handle."] + #[doc = "* `outinfo` - Output info buffer."] + #[doc = "* `outinfo_size` - Output info buffer size."] + #[doc = "* `workbuf` - Work buffer."] + #[doc = "* `workbuf_size` - Work buffer size."] + #[doc = "* `banner` - Output banner buffer."] + #[doc = "* `banner_size` - Output banner buffer size."] pub fn AM_ReadTwlBackupInfo( filehandle: Handle, outinfo: *mut ::libc::c_void, @@ -10681,76 +9964,69 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Retrieves information about the NAND TWL partition."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] - + #[doc = "Retrieves information about the NAND TWL partition."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] pub fn AM_GetTWLPartitionInfo(info: *mut AM_TWLPartitionInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to install the CIA to."] -#[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] - + #[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to install the CIA to."] + #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] pub fn AM_StartCiaInstall(mediatype: FS_MediaType, ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] - + #[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] pub fn AM_StartDlpChildCiaInstall(ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts the CIA install process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ciaHandle` - CIA handle to cancel."] - + #[doc = "Aborts the CIA install process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - CIA handle to cancel."] pub fn AM_CancelCIAInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finalizes the CIA install process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ciaHandle` - CIA handle to finalize."] - + #[doc = "Finalizes the CIA install process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - CIA handle to finalize."] pub fn AM_FinishCiaInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ciaHandle` - CIA handle to finalize."] - + #[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - CIA handle to finalize."] pub fn AM_FinishCiaInstallWithoutCommit(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Commits installed CIAs."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Location of the titles to finalize."] -#[doc = "* `titleCount` - Number of titles to finalize."] -#[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] -#[doc = "* `titleIds` - Title IDs to finalize."] - + #[doc = "Commits installed CIAs."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Location of the titles to finalize."] + #[doc = "* `titleCount` - Number of titles to finalize."] + #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] + #[doc = "* `titleIds` - Title IDs to finalize."] pub fn AM_CommitImportPrograms( mediaType: FS_MediaType, titleCount: u32_, @@ -10760,95 +10036,86 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to delete from."] -#[doc = "* `titleID` - ID of the title to delete."] - + #[doc = "Deletes a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `titleID` - ID of the title to delete."] pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a title, provided that it is not a system title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to delete from."] -#[doc = "* `titleID` - ID of the title to delete."] - + #[doc = "Deletes a title, provided that it is not a system title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `titleID` - ID of the title to delete."] pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a ticket."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleID` - ID of the ticket to delete."] - + #[doc = "Deletes a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleID` - ID of the ticket to delete."] pub fn AM_DeleteTicket(ticketId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a pending title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to delete from."] -#[doc = "* `titleId` - ID of the pending title to delete."] - + #[doc = "Deletes a pending title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `titleId` - ID of the pending title to delete."] pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes pending titles."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to delete from."] -#[doc = "* `flags` - Flags used to select pending titles."] - + #[doc = "Deletes pending titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `flags` - Flags used to select pending titles."] pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all pending titles."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to delete from."] - + #[doc = "Deletes all pending titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] -#[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] -#[doc = ""] - + #[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] + #[doc = ""] pub fn AM_InstallNativeFirm() -> Result; } extern "C" { #[must_use] -#[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleID` - Title ID of the NATIVE_FIRM to install."] - + #[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleID` - Title ID of the NATIVE_FIRM to install."] pub fn AM_InstallFirm(titleID: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the product code of a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type of the title."] -#[doc = "* `titleID` - ID of the title."] -#[doc = "* `productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] - + #[doc = "Gets the product code of a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - ID of the title."] + #[doc = "* `productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] pub fn AM_GetTitleProductCode( mediatype: FS_MediaType, titleId: u64_, @@ -10857,14 +10124,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the ext data ID of a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] -#[doc = "* `mediatype` - Media type of the title."] -#[doc = "* `titleID` - ID of the title."] - + #[doc = "Gets the ext data ID of a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - ID of the title."] pub fn AM_GetTitleExtDataId( extDataId: *mut u64_, mediatype: FS_MediaType, @@ -10873,14 +10139,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an AM_TitleEntry instance for a CIA file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type that this CIA would be installed to."] -#[doc = "* `titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] -#[doc = "* `fileHandle` - Handle of the CIA file."] - + #[doc = "Gets an AM_TitleEntry instance for a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type that this CIA would be installed to."] + #[doc = "* `titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] + #[doc = "* `fileHandle` - Handle of the CIA file."] pub fn AM_GetCiaFileInfo( mediatype: FS_MediaType, titleEntry: *mut AM_TitleEntry, @@ -10889,58 +10154,53 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the SMDH icon data of a CIA file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] -#[doc = "* `fileHandle` - Handle of the CIA file."] - + #[doc = "Gets the SMDH icon data of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] + #[doc = "* `fileHandle` - Handle of the CIA file."] pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the title ID dependency list of a CIA file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] -#[doc = "* `fileHandle` - Handle of the CIA file."] - + #[doc = "Gets the title ID dependency list of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] + #[doc = "* `fileHandle` - Handle of the CIA file."] pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the meta section offset of a CIA file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] -#[doc = "* `fileHandle` - Handle of the CIA file."] - + #[doc = "Gets the meta section offset of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] + #[doc = "* `fileHandle` - Handle of the CIA file."] pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the core version of a CIA file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] -#[doc = "* `fileHandle` - Handle of the CIA file."] - + #[doc = "Gets the core version of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] + #[doc = "* `fileHandle` - Handle of the CIA file."] pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the free space, in bytes, required to install a CIA file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] -#[doc = "* `mediaType` - Media type to check free space needed to install to."] -#[doc = "* `fileHandle` - Handle of the CIA file."] - + #[doc = "Gets the free space, in bytes, required to install a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] + #[doc = "* `mediaType` - Media type to check free space needed to install to."] + #[doc = "* `fileHandle` - Handle of the CIA file."] pub fn AM_GetCiaRequiredSpace( requiredSpace: *mut u64_, mediaType: FS_MediaType, @@ -10949,14 +10209,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the full meta section of a CIA file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `meta` - Buffer to store the meta section in."] -#[doc = "* `size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] -#[doc = "* `fileHandle` - Handle of the CIA file."] - + #[doc = "Gets the full meta section of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `meta` - Buffer to store the meta section in."] + #[doc = "* `size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] + #[doc = "* `fileHandle` - Handle of the CIA file."] pub fn AM_GetCiaMetaSection( meta: *mut ::libc::c_void, size: u32_, @@ -10965,109 +10224,98 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes the external (SD) title database."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `overwrite` - Overwrites the database if it already exists."] - + #[doc = "Initializes the external (SD) title database."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `overwrite` - Overwrites the database if it already exists."] pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Queries whether the external title database is available."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `available` - Pointer to output the availability status to. [Direction: In, Out]"] - + #[doc = "Queries whether the external title database is available."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `available` - Pointer to output the availability status to. [Direction: In, Out]"] pub fn AM_QueryAvailableExternalTitleDatabase(available: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Begins installing a ticket."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] - + #[doc = "Begins installing a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] pub fn AM_InstallTicketBegin(ticketHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts installing a ticket."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ticketHandle` - Handle of the installation to abort."] - + #[doc = "Aborts installing a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketHandle` - Handle of the installation to abort."] pub fn AM_InstallTicketAbort(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing a ticket."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ticketHandle` - Handle of the installation to finalize."] - + #[doc = "Finishes installing a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketHandle` - Handle of the installation to finalize."] pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Begins installing a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Destination to install to."] -#[doc = "* `titleId` - ID of the title to install."] -#[doc = "* `unk` - Unknown. (usually false)"] - + #[doc = "Begins installing a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Destination to install to."] + #[doc = "* `titleId` - ID of the title to install."] + #[doc = "* `unk` - Unknown. (usually false)"] pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Stops installing a title, generally to be resumed later."] -#[doc = ""] - + #[doc = "Stops installing a title, generally to be resumed later."] + #[doc = ""] pub fn AM_InstallTitleStop() -> Result; } extern "C" { #[must_use] -#[doc = "Resumes installing a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Destination to install to."] -#[doc = "* `titleId` - ID of the title to install."] - + #[doc = "Resumes installing a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Destination to install to."] + #[doc = "* `titleId` - ID of the title to install."] pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts installing a title."] -#[doc = ""] - + #[doc = "Aborts installing a title."] + #[doc = ""] pub fn AM_InstallTitleAbort() -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing a title."] -#[doc = ""] - + #[doc = "Finishes installing a title."] + #[doc = ""] pub fn AM_InstallTitleFinish() -> Result; } extern "C" { #[must_use] -#[doc = "Commits installed titles."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Location of the titles to finalize."] -#[doc = "* `titleCount` - Number of titles to finalize."] -#[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] -#[doc = "* `titleIds` - Title IDs to finalize."] - + #[doc = "Commits installed titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Location of the titles to finalize."] + #[doc = "* `titleCount` - Number of titles to finalize."] + #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] + #[doc = "* `titleIds` - Title IDs to finalize."] pub fn AM_CommitImportTitles( mediaType: FS_MediaType, titleCount: u32_, @@ -11077,77 +10325,70 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Begins installing a TMD."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] - + #[doc = "Begins installing a TMD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] pub fn AM_InstallTmdBegin(tmdHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts installing a TMD."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `tmdHandle` - Handle of the installation to abort."] - + #[doc = "Aborts installing a TMD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tmdHandle` - Handle of the installation to abort."] pub fn AM_InstallTmdAbort(tmdHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing a TMD."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `tmdHandle` - Handle of the installation to finalize."] -#[doc = "* `unk` - Unknown. (usually true)"] - + #[doc = "Finishes installing a TMD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tmdHandle` - Handle of the installation to finalize."] + #[doc = "* `unk` - Unknown. (usually true)"] pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares to import title contents."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `contentCount` - Number of contents to be imported."] -#[doc = "* `contentIndices` - Indices of the contents to be imported."] - + #[doc = "Prepares to import title contents."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentCount` - Number of contents to be imported."] + #[doc = "* `contentIndices` - Indices of the contents to be imported."] pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Begins installing title content."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] -#[doc = "* `index` - Index of the content to install."] - + #[doc = "Begins installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] + #[doc = "* `index` - Index of the content to install."] pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Stops installing title content, generally to be resumed later."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `contentHandle` - Handle of the installation to abort."] - + #[doc = "Stops installing title content, generally to be resumed later."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Handle of the installation to abort."] pub fn AM_InstallContentStop(contentHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Resumes installing title content."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] -#[doc = "* `resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] -#[doc = "* `index` - Index of the content to install."] - + #[doc = "Resumes installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] + #[doc = "* `resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] + #[doc = "* `index` - Index of the content to install."] pub fn AM_InstallContentResume( contentHandle: *mut Handle, resumeOffset: *mut u64_, @@ -11156,39 +10397,36 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Cancels installing title content."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `contentHandle` - Handle of the installation to finalize."] - + #[doc = "Cancels installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Handle of the installation to finalize."] pub fn AM_InstallContentCancel(contentHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing title content."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `contentHandle` - Handle of the installation to finalize."] - + #[doc = "Finishes installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Handle of the installation to finalize."] pub fn AM_InstallContentFinish(contentHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Imports up to four certificates into the ticket certificate chain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cert1Size` - Size of the first certificate."] -#[doc = "* `cert1` - Data of the first certificate."] -#[doc = "* `cert2Size` - Size of the second certificate."] -#[doc = "* `cert2` - Data of the second certificate."] -#[doc = "* `cert3Size` - Size of the third certificate."] -#[doc = "* `cert3` - Data of the third certificate."] -#[doc = "* `cert4Size` - Size of the fourth certificate."] -#[doc = "* `cert4` - Data of the fourth certificate."] - + #[doc = "Imports up to four certificates into the ticket certificate chain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cert1Size` - Size of the first certificate."] + #[doc = "* `cert1` - Data of the first certificate."] + #[doc = "* `cert2Size` - Size of the second certificate."] + #[doc = "* `cert2` - Data of the second certificate."] + #[doc = "* `cert3Size` - Size of the third certificate."] + #[doc = "* `cert3` - Data of the third certificate."] + #[doc = "* `cert4Size` - Size of the fourth certificate."] + #[doc = "* `cert4` - Data of the fourth certificate."] pub fn AM_ImportCertificates( cert1Size: u32_, cert1: *mut ::libc::c_void, @@ -11202,26 +10440,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Imports a certificate into the ticket certificate chain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `certSize` - Size of the certificate."] -#[doc = "* `cert` - Data of the certificate."] - + #[doc = "Imports a certificate into the ticket certificate chain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `certSize` - Size of the certificate."] + #[doc = "* `cert` - Data of the certificate."] pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Commits installed titles, and updates FIRM if necessary."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Location of the titles to finalize."] -#[doc = "* `titleCount` - Number of titles to finalize."] -#[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] -#[doc = "* `titleIds` - Title IDs to finalize."] - + #[doc = "Commits installed titles, and updates FIRM if necessary."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Location of the titles to finalize."] + #[doc = "* `titleCount` - Number of titles to finalize."] + #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] + #[doc = "* `titleIds` - Title IDs to finalize."] pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto( mediaType: FS_MediaType, titleCount: u32_, @@ -11231,45 +10467,40 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Resets play count of all installed demos by deleting their launch info."] -#[doc = ""] - + #[doc = "Resets play count of all installed demos by deleting their launch info."] + #[doc = ""] pub fn AM_DeleteAllDemoLaunchInfos() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes temporary titles."] -#[doc = ""] - + #[doc = "Deletes temporary titles."] + #[doc = ""] pub fn AM_DeleteAllTemporaryTitles() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all expired titles."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Media type to delete from."] - + #[doc = "Deletes all expired titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] pub fn AM_DeleteAllExpiredTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all TWL titles."] -#[doc = ""] - + #[doc = "Deletes all TWL titles."] + #[doc = ""] pub fn AM_DeleteAllTwlTitles() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the number of content index installed under the specified DLC title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `count` - Pointer to output the number of content indices to. [Direction: In, Out]"] -#[doc = "* `mediatype` - Media type of the title."] -#[doc = "* `titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] - + #[doc = "Gets the number of content index installed under the specified DLC title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the number of content indices to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] pub fn AMAPP_GetDLCContentInfoCount( count: *mut u32_, mediatype: FS_MediaType, @@ -11278,17 +10509,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets content infos installed under the specified DLC title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `contentInfoRead` - Pointer to output the number of content infos read to. [Direction: In, Out]"] -#[doc = "* `mediatype` - Media type of the title."] -#[doc = "* `titleID` - Title ID to retrieve the content infos for (high-id is 0x0004008C)."] -#[doc = "* `contentInfoCount` - Number of content infos to retrieve."] -#[doc = "* `offset` - Offset from the first content index the count starts at."] -#[doc = "* `contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] - + #[doc = "Gets content infos installed under the specified DLC title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentInfoRead` - Pointer to output the number of content infos read to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - Title ID to retrieve the content infos for (high-id is 0x0004008C)."] + #[doc = "* `contentInfoCount` - Number of content infos to retrieve."] + #[doc = "* `offset` - Offset from the first content index the count starts at."] + #[doc = "* `contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] pub fn AMAPP_ListDLCContentInfos( contentInfoRead: *mut u32_, mediatype: FS_MediaType, @@ -11300,33 +10530,30 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes AMPXI."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] - + #[doc = "Initializes AMPXI."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] pub fn ampxiInit(servhandle: Handle) -> Result; } extern "C" { -#[doc = "Exits AMPXI."] -#[doc = ""] - + #[doc = "Exits AMPXI."] + #[doc = ""] pub fn ampxiExit(); } extern "C" { #[must_use] -#[doc = "Writes a TWL save-file to NAND. https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleid` - ID of the TWL title."] -#[doc = "* `buffer` - Savedata buffer ptr."] -#[doc = "* `size` - Size of the savedata buffer."] -#[doc = "* `image_filepos` - Filepos to use for writing the data to the NAND savedata file."] -#[doc = "* `section_type` - https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] -#[doc = "* `operation` - https://3dbrew.org/wiki/AM:ImportDSiWare"] - + #[doc = "Writes a TWL save-file to NAND. https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the TWL title."] + #[doc = "* `buffer` - Savedata buffer ptr."] + #[doc = "* `size` - Size of the savedata buffer."] + #[doc = "* `image_filepos` - Filepos to use for writing the data to the NAND savedata file."] + #[doc = "* `section_type` - https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] + #[doc = "* `operation` - https://3dbrew.org/wiki/AM:ImportDSiWare"] pub fn AMPXI_WriteTWLSavedata( titleid: u64_, buffer: *mut u8_, @@ -11338,16 +10565,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Finalizes title installation. https://3dbrew.org/wiki/AMPXI:InstallTitlesFinish"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Mediatype of the titles to finalize."] -#[doc = "* `db` - Which title database to use."] -#[doc = "* `size` - Size of the savedata buffer."] -#[doc = "* `titlecount` - Total titles."] -#[doc = "* `tidlist` - List of titleIDs."] - + #[doc = "Finalizes title installation. https://3dbrew.org/wiki/AMPXI:InstallTitlesFinish"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Mediatype of the titles to finalize."] + #[doc = "* `db` - Which title database to use."] + #[doc = "* `size` - Size of the savedata buffer."] + #[doc = "* `titlecount` - Total titles."] + #[doc = "* `tidlist` - List of titleIDs."] pub fn AMPXI_InstallTitlesFinish( mediaType: FS_MediaType, db: u8_, @@ -11609,7 +10835,6 @@ pub const APTCMD_WAKEUP_LAUNCHAPP: APT_Command = 17; pub type APT_Command = ::libc::c_uint; #[doc = "APT capture buffer information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct aptCaptureBufInfo { @@ -11660,21 +10885,17 @@ pub type aptHookFn = ::core::option::Option; #[doc = "APT hook cookie."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_aptHookCookie { -#[doc = "Next cookie."] -#[doc = ""] - + #[doc = "Next cookie."] + #[doc = ""] pub next: *mut tag_aptHookCookie, -#[doc = "Hook callback."] -#[doc = ""] - + #[doc = "Hook callback."] + #[doc = ""] pub callback: aptHookFn, -#[doc = "Callback parameter."] -#[doc = ""] - + #[doc = "Callback parameter."] + #[doc = ""] pub param: *mut ::libc::c_void, } impl Default for tag_aptHookCookie { @@ -11703,135 +10924,117 @@ pub type aptMessageCb = ::core::option::Option< >; extern "C" { #[must_use] -#[doc = "Initializes APT."] -#[doc = ""] - + #[doc = "Initializes APT."] + #[doc = ""] pub fn aptInit() -> Result; } extern "C" { -#[doc = "Exits APT."] -#[doc = ""] - + #[doc = "Exits APT."] + #[doc = ""] pub fn aptExit(); } extern "C" { #[must_use] -#[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] - + #[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result; } extern "C" { -#[doc = "Returns true if the application is currently in the foreground."] -#[doc = ""] - + #[doc = "Returns true if the application is currently in the foreground."] + #[doc = ""] pub fn aptIsActive() -> bool; } extern "C" { -#[doc = "Returns true if the system has told the application to close."] -#[doc = ""] - + #[doc = "Returns true if the system has told the application to close."] + #[doc = ""] pub fn aptShouldClose() -> bool; } extern "C" { -#[doc = "Returns true if the system can enter sleep mode while the application is active."] -#[doc = ""] - + #[doc = "Returns true if the system can enter sleep mode while the application is active."] + #[doc = ""] pub fn aptIsSleepAllowed() -> bool; } extern "C" { -#[doc = "Configures whether the system can enter sleep mode while the application is active."] -#[doc = ""] - + #[doc = "Configures whether the system can enter sleep mode while the application is active."] + #[doc = ""] pub fn aptSetSleepAllowed(allowed: bool); } extern "C" { -#[doc = "Handles incoming sleep mode requests."] -#[doc = ""] - + #[doc = "Handles incoming sleep mode requests."] + #[doc = ""] pub fn aptHandleSleep(); } extern "C" { -#[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] -#[doc = ""] - + #[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] + #[doc = ""] pub fn aptIsHomeAllowed() -> bool; } extern "C" { -#[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] -#[doc = ""] - + #[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] + #[doc = ""] pub fn aptSetHomeAllowed(allowed: bool); } extern "C" { -#[doc = "Returns true if the system requires the application to jump back to the HOME menu."] -#[doc = ""] - + #[doc = "Returns true if the system requires the application to jump back to the HOME menu."] + #[doc = ""] pub fn aptShouldJumpToHome() -> bool; } extern "C" { -#[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by \\ref aptSetHomeAllowed (use this to show a \"no HOME allowed\" icon)."] -#[doc = ""] - + #[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by \\ref aptSetHomeAllowed (use this to show a \"no HOME allowed\" icon)."] + #[doc = ""] pub fn aptCheckHomePressRejected() -> bool; } extern "C" { -#[doc = "Jumps back to the HOME menu."] -#[doc = ""] - + #[doc = "Jumps back to the HOME menu."] + #[doc = ""] pub fn aptJumpToHomeMenu(); } extern "C" { -#[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] -#[doc = ""] -#[doc = "Returns: True if the application should keep running, false otherwise (see \\ref aptShouldClose)."] -#[doc = ""] - + #[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] + #[doc = ""] + #[doc = "Returns: True if the application should keep running, false otherwise (see \\ref aptShouldClose)."] + #[doc = ""] pub fn aptMainLoop() -> bool; } extern "C" { -#[doc = "Sets up an APT status hook."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cookie` - Hook cookie to use."] -#[doc = "* `callback` - Function to call when APT's status changes."] -#[doc = "* `param` - User-defined parameter to pass to the callback."] - + #[doc = "Sets up an APT status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to use."] + #[doc = "* `callback` - Function to call when APT's status changes."] + #[doc = "* `param` - User-defined parameter to pass to the callback."] pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut ::libc::c_void); } extern "C" { -#[doc = "Removes an APT status hook."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cookie` - Hook cookie to remove."] - + #[doc = "Removes an APT status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to remove."] pub fn aptUnhook(cookie: *mut aptHookCookie); } extern "C" { -#[doc = "Sets the function to be called when an APT message from another applet is received."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `callback` - Callback function."] -#[doc = "* `user` - User-defined data to be passed to the callback."] - + #[doc = "Sets the function to be called when an APT message from another applet is received."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `callback` - Callback function."] + #[doc = "* `user` - User-defined data to be passed to the callback."] pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut ::libc::c_void); } extern "C" { -#[doc = "Launches a library applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appId` - ID of the applet to launch."] -#[doc = "* `buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] -#[doc = "* `bufsize` - Size of the buffer."] -#[doc = "* `handle` - Handle to pass to the library applet."] - + #[doc = "Launches a library applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appId` - ID of the applet to launch."] + #[doc = "* `buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] + #[doc = "* `bufsize` - Size of the buffer."] + #[doc = "* `handle` - Handle to pass to the library applet."] pub fn aptLaunchLibraryApplet( appId: NS_APPID, buf: *mut ::libc::c_void, @@ -11840,49 +11043,44 @@ extern "C" { ); } extern "C" { -#[doc = "Clears the chainloader state."] -#[doc = ""] - + #[doc = "Clears the chainloader state."] + #[doc = ""] pub fn aptClearChainloader(); } extern "C" { -#[doc = "Configures the chainloader to launch a specific application."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programID` - ID of the program to chainload to."] -#[doc = "* `mediatype` - Media type of the program to chainload to."] - + #[doc = "Configures the chainloader to launch a specific application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programID` - ID of the program to chainload to."] + #[doc = "* `mediatype` - Media type of the program to chainload to."] pub fn aptSetChainloader(programID: u64_, mediatype: u8_); } extern "C" { -#[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] -#[doc = ""] - + #[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] + #[doc = ""] pub fn aptSetChainloaderToSelf(); } extern "C" { #[must_use] -#[doc = "Gets an APT lock handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flags` - Flags to use."] -#[doc = "* `lockHandle` - Pointer to output the lock handle to."] - + #[doc = "Gets an APT lock handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to use."] + #[doc = "* `lockHandle` - Pointer to output the lock handle to."] pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes an application's registration with APT."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appId` - ID of the application."] -#[doc = "* `attr` - Attributes of the application."] -#[doc = "* `signalEvent` - Pointer to output the signal event handle to."] -#[doc = "* `resumeEvent` - Pointer to output the resume event handle to."] - + #[doc = "Initializes an application's registration with APT."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appId` - ID of the application."] + #[doc = "* `attr` - Attributes of the application."] + #[doc = "* `signalEvent` - Pointer to output the signal event handle to."] + #[doc = "* `resumeEvent` - Pointer to output the resume event handle to."] pub fn APT_Initialize( appId: NS_APPID, attr: APT_AppletAttr, @@ -11892,43 +11090,39 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Terminates an application's registration with APT."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - ID of the application."] - + #[doc = "Terminates an application's registration with APT."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] pub fn APT_Finalize(appId: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Asynchronously resets the hardware."] -#[doc = ""] - + #[doc = "Asynchronously resets the hardware."] + #[doc = ""] pub fn APT_HardwareResetAsync() -> Result; } extern "C" { #[must_use] -#[doc = "Enables APT."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `attr` - Attributes of the application."] - + #[doc = "Enables APT."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `attr` - Attributes of the application."] pub fn APT_Enable(attr: APT_AppletAttr) -> Result; } extern "C" { #[must_use] -#[doc = "Gets applet management info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inpos` - Requested applet position."] -#[doc = "* `outpos` - Pointer to output the position of the current applet to."] -#[doc = "* `req_appid` - Pointer to output the AppID of the applet at the requested position to."] -#[doc = "* `menu_appid` - Pointer to output the HOME menu AppID to."] -#[doc = "* `active_appid` - Pointer to output the AppID of the currently active applet to."] - + #[doc = "Gets applet management info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inpos` - Requested applet position."] + #[doc = "* `outpos` - Pointer to output the position of the current applet to."] + #[doc = "* `req_appid` - Pointer to output the AppID of the applet at the requested position to."] + #[doc = "* `menu_appid` - Pointer to output the HOME menu AppID to."] + #[doc = "* `active_appid` - Pointer to output the AppID of the currently active applet to."] pub fn APT_GetAppletManInfo( inpos: APT_AppletPos, outpos: *mut APT_AppletPos, @@ -11939,17 +11133,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an applet's information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - AppID of the applet."] -#[doc = "* `pProgramID` - Pointer to output the program ID to."] -#[doc = "* `pMediaType` - Pointer to output the media type to."] -#[doc = "* `pRegistered` - Pointer to output the registration status to."] -#[doc = "* `pLoadState` - Pointer to output the load state to."] -#[doc = "* `pAttributes` - Pointer to output the applet atrributes to."] - + #[doc = "Gets an applet's information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet."] + #[doc = "* `pProgramID` - Pointer to output the program ID to."] + #[doc = "* `pMediaType` - Pointer to output the media type to."] + #[doc = "* `pRegistered` - Pointer to output the registration status to."] + #[doc = "* `pLoadState` - Pointer to output the load state to."] + #[doc = "* `pAttributes` - Pointer to output the applet atrributes to."] pub fn APT_GetAppletInfo( appID: NS_APPID, pProgramID: *mut u64_, @@ -11961,52 +11154,48 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an applet's program information."] -#[doc = ""] -#[doc = ""] -#[doc = "Flags:"] -#[doc = "- 0x01: Use AM_ListTitles with NAND media type."] -#[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] -#[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] -#[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] -#[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] -#[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the applet."] -#[doc = "* `flags` - Flags to use when retreiving the information."] -#[doc = "* `titleversion` - Pointer to output the applet's title version to."] - + #[doc = "Gets an applet's program information."] + #[doc = ""] + #[doc = ""] + #[doc = "Flags:"] + #[doc = "- 0x01: Use AM_ListTitles with NAND media type."] + #[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] + #[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] + #[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] + #[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] + #[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the applet."] + #[doc = "* `flags` - Flags to use when retreiving the information."] + #[doc = "* `titleversion` - Pointer to output the applet's title version to."] pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current application's program ID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pProgramID` - Pointer to output the program ID to."] - + #[doc = "Gets the current application's program ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pProgramID` - Pointer to output the program ID to."] pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares to jump to the home menu."] -#[doc = ""] - + #[doc = "Prepares to jump to the home menu."] + #[doc = ""] pub fn APT_PrepareToJumpToHomeMenu() -> Result; } extern "C" { #[must_use] -#[doc = "Jumps to the home menu."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `param` - Parameters to jump with."] -#[doc = "* `Size` - of the parameter buffer."] -#[doc = "* `handle` - Handle to pass."] - + #[doc = "Jumps to the home menu."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameters to jump with."] + #[doc = "* `Size` - of the parameter buffer."] + #[doc = "* `handle` - Handle to pass."] pub fn APT_JumpToHomeMenu( param: *const ::libc::c_void, paramSize: size_t, @@ -12015,24 +11204,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Prepares to jump to an application."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `exiting` - Specifies whether the applet is exiting."] - + #[doc = "Prepares to jump to an application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exiting` - Specifies whether the applet is exiting."] pub fn APT_PrepareToJumpToApplication(exiting: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Jumps to an application."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `param` - Parameters to jump with."] -#[doc = "* `Size` - of the parameter buffer."] -#[doc = "* `handle` - Handle to pass."] - + #[doc = "Jumps to an application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameters to jump with."] + #[doc = "* `Size` - of the parameter buffer."] + #[doc = "* `handle` - Handle to pass."] pub fn APT_JumpToApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -12041,60 +11228,55 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets whether an application is registered."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - ID of the application."] -#[doc = "* `out` - Pointer to output the registration state to."] - + #[doc = "Gets whether an application is registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = "* `out` - Pointer to output the registration state to."] pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Inquires as to whether a signal has been received."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - ID of the application."] -#[doc = "* `signalType` - Pointer to output the signal type to."] - + #[doc = "Inquires as to whether a signal has been received."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = "* `signalType` - Pointer to output the signal type to."] pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result; } extern "C" { #[must_use] -#[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] -#[doc = ""] -#[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] - + #[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] + #[doc = ""] + #[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result; } extern "C" { #[must_use] -#[doc = "Notifies an application to wait."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - ID of the application."] - + #[doc = "Notifies an application to wait."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] pub fn APT_NotifyToWait(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Calls an applet utility function."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - Utility function to call."] -#[doc = "* `out` - Pointer to write output data to."] -#[doc = "* `outSize` - Size of the output buffer."] -#[doc = "* `in` - Pointer to the input data."] -#[doc = "* `inSize` - Size of the input buffer."] - + #[doc = "Calls an applet utility function."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - Utility function to call."] + #[doc = "* `out` - Pointer to write output data to."] + #[doc = "* `outSize` - Size of the output buffer."] + #[doc = "* `in` - Pointer to the input data."] + #[doc = "* `inSize` - Size of the input buffer."] pub fn APT_AppletUtility( id: ::libc::c_int, out: *mut ::libc::c_void, @@ -12105,57 +11287,52 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sleeps if shell is closed (?)."] -#[doc = ""] - + #[doc = "Sleeps if shell is closed (?)."] + #[doc = ""] pub fn APT_SleepIfShellClosed() -> Result; } extern "C" { #[must_use] -#[doc = "Locks a transition (?)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `transition` - Transition ID."] -#[doc = "* `flag` - Flag (?)"] - + #[doc = "Locks a transition (?)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transition` - Transition ID."] + #[doc = "* `flag` - Flag (?)"] pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Tries to lock a transition (?)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `transition` - Transition ID."] -#[doc = "* `succeeded` - Pointer to output whether the lock was successfully applied."] - + #[doc = "Tries to lock a transition (?)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transition` - Transition ID."] + #[doc = "* `succeeded` - Pointer to output whether the lock was successfully applied."] pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Unlocks a transition (?)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `transition` - Transition ID."] - + #[doc = "Unlocks a transition (?)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transition` - Transition ID."] pub fn APT_UnlockTransition(transition: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Glances at a receieved parameter without removing it from the queue."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - AppID of the application."] -#[doc = "* `buffer` - Buffer to receive to."] -#[doc = "* `bufferSize` - Size of the buffer."] -#[doc = "* `sender` - Pointer to output the sender's AppID to."] -#[doc = "* `command` - Pointer to output the command ID to."] -#[doc = "* `actualSize` - Pointer to output the actual received data size to."] -#[doc = "* `parameter` - Pointer to output the parameter handle to."] - + #[doc = "Glances at a receieved parameter without removing it from the queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the application."] + #[doc = "* `buffer` - Buffer to receive to."] + #[doc = "* `bufferSize` - Size of the buffer."] + #[doc = "* `sender` - Pointer to output the sender's AppID to."] + #[doc = "* `command` - Pointer to output the command ID to."] + #[doc = "* `actualSize` - Pointer to output the actual received data size to."] + #[doc = "* `parameter` - Pointer to output the parameter handle to."] pub fn APT_GlanceParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -12168,18 +11345,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Receives a parameter."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - AppID of the application."] -#[doc = "* `buffer` - Buffer to receive to."] -#[doc = "* `bufferSize` - Size of the buffer."] -#[doc = "* `sender` - Pointer to output the sender's AppID to."] -#[doc = "* `command` - Pointer to output the command ID to."] -#[doc = "* `actualSize` - Pointer to output the actual received data size to."] -#[doc = "* `parameter` - Pointer to output the parameter handle to."] - + #[doc = "Receives a parameter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the application."] + #[doc = "* `buffer` - Buffer to receive to."] + #[doc = "* `bufferSize` - Size of the buffer."] + #[doc = "* `sender` - Pointer to output the sender's AppID to."] + #[doc = "* `command` - Pointer to output the command ID to."] + #[doc = "* `actualSize` - Pointer to output the actual received data size to."] + #[doc = "* `parameter` - Pointer to output the parameter handle to."] pub fn APT_ReceiveParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -12192,17 +11368,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends a parameter."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `source` - AppID of the source application."] -#[doc = "* `dest` - AppID of the destination application."] -#[doc = "* `command` - Command to send."] -#[doc = "* `buffer` - Buffer to send."] -#[doc = "* `bufferSize` - Size of the buffer."] -#[doc = "* `parameter` - Parameter handle to pass."] - + #[doc = "Sends a parameter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `source` - AppID of the source application."] + #[doc = "* `dest` - AppID of the destination application."] + #[doc = "* `command` - Command to send."] + #[doc = "* `buffer` - Buffer to send."] + #[doc = "* `bufferSize` - Size of the buffer."] + #[doc = "* `parameter` - Parameter handle to pass."] pub fn APT_SendParameter( source: NS_APPID, dest: NS_APPID, @@ -12214,67 +11389,61 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `source` - AppID of the source application (use APPID_NONE to disable the check)."] -#[doc = "* `dest` - AppID of the destination application (use APPID_NONE to disable the check)."] -#[doc = "* `success` - Pointer to output true if a parameter was cancelled, or false otherwise."] - + #[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `source` - AppID of the source application (use APPID_NONE to disable the check)."] + #[doc = "* `dest` - AppID of the destination application (use APPID_NONE to disable the check)."] + #[doc = "* `success` - Pointer to output true if a parameter was cancelled, or false otherwise."] pub fn APT_CancelParameter(source: NS_APPID, dest: NS_APPID, success: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sends capture buffer information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `captureBuf` - Capture buffer information to send."] - + #[doc = "Sends capture buffer information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `captureBuf` - Capture buffer information to send."] pub fn APT_SendCaptureBufferInfo(captureBuf: *const aptCaptureBufInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Replies to a sleep query."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - ID of the application."] -#[doc = "* `reply` - Query reply value."] - + #[doc = "Replies to a sleep query."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = "* `reply` - Query reply value."] pub fn APT_ReplySleepQuery(appID: NS_APPID, reply: APT_QueryReply) -> Result; } extern "C" { #[must_use] -#[doc = "Replies that a sleep notification has been completed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - ID of the application."] - + #[doc = "Replies that a sleep notification has been completed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] pub fn APT_ReplySleepNotificationComplete(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares to close the application."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cancelPreload` - Whether applet preloads should be cancelled."] - + #[doc = "Prepares to close the application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cancelPreload` - Whether applet preloads should be cancelled."] pub fn APT_PrepareToCloseApplication(cancelPreload: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Closes the application."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `param` - Parameters to close with."] -#[doc = "* `paramSize` - Size of param."] -#[doc = "* `handle` - Handle to pass."] - + #[doc = "Closes the application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameters to close with."] + #[doc = "* `paramSize` - Size of param."] + #[doc = "* `handle` - Handle to pass."] pub fn APT_CloseApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -12283,56 +11452,51 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the application's CPU time limit."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `percent` - CPU time limit percentage to set."] - + #[doc = "Sets the application's CPU time limit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `percent` - CPU time limit percentage to set."] pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the application's CPU time limit."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `percent` - Pointer to output the CPU time limit percentage to."] - + #[doc = "Gets the application's CPU time limit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `percent` - Pointer to output the CPU time limit percentage to."] pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks whether the system is a New 3DS."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the New 3DS flag to."] - + #[doc = "Checks whether the system is a New 3DS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the New 3DS flag to."] pub fn APT_CheckNew3DS(out: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares for an applicaton jump."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flags` - Flags to use."] -#[doc = "* `programID` - ID of the program to jump to."] -#[doc = "* `mediatype` - Media type of the program to jump to."] - + #[doc = "Prepares for an applicaton jump."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to use."] + #[doc = "* `programID` - ID of the program to jump to."] + #[doc = "* `mediatype` - Media type of the program to jump to."] pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Performs an application jump."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `param` - Parameter buffer."] -#[doc = "* `paramSize` - Size of parameter buffer."] -#[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] - + #[doc = "Performs an application jump."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameter buffer."] + #[doc = "* `paramSize` - Size of parameter buffer."] + #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] pub fn APT_DoApplicationJump( param: *const ::libc::c_void, paramSize: size_t, @@ -12341,25 +11505,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Prepares to start a library applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - AppID of the applet to start."] - + #[doc = "Prepares to start a library applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to start."] pub fn APT_PrepareToStartLibraryApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Starts a library applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - AppID of the applet to launch."] -#[doc = "* `param` - Buffer containing applet parameters."] -#[doc = "* `paramsize` - Size of the buffer."] -#[doc = "* `handle` - Handle to pass to the applet."] - + #[doc = "Starts a library applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to launch."] + #[doc = "* `param` - Buffer containing applet parameters."] + #[doc = "* `paramsize` - Size of the buffer."] + #[doc = "* `handle` - Handle to pass to the applet."] pub fn APT_StartLibraryApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -12369,25 +11531,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Prepares to start a system applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - AppID of the applet to start."] - + #[doc = "Prepares to start a system applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to start."] pub fn APT_PrepareToStartSystemApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Starts a system applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appID` - AppID of the applet to launch."] -#[doc = "* `param` - Buffer containing applet parameters."] -#[doc = "* `paramSize` - Size of the parameter buffer."] -#[doc = "* `handle` - Handle to pass to the applet."] - + #[doc = "Starts a system applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to launch."] + #[doc = "* `param` - Buffer containing applet parameters."] + #[doc = "* `paramSize` - Size of the parameter buffer."] + #[doc = "* `handle` - Handle to pass to the applet."] pub fn APT_StartSystemApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -12397,23 +11557,21 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] -#[doc = ""] - + #[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] + #[doc = ""] pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Receives the deliver (launch) argument"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `param` - Parameter buffer."] -#[doc = "* `paramSize` - Size of parameter buffer."] -#[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] -#[doc = "* `sender` - Pointer to output the sender's AppID to."] -#[doc = "* `received` - Pointer to output whether an argument was received to."] - + #[doc = "Receives the deliver (launch) argument"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameter buffer."] + #[doc = "* `paramSize` - Size of parameter buffer."] + #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] + #[doc = "* `sender` - Pointer to output the sender's AppID to."] + #[doc = "* `received` - Pointer to output whether an argument was received to."] pub fn APT_ReceiveDeliverArg( param: *const ::libc::c_void, paramSize: size_t, @@ -12424,7 +11582,6 @@ extern "C" { } #[doc = "BOSS context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bossContext { @@ -12474,101 +11631,91 @@ pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSize pub type bossNsDataHeaderInfoTypeSizes = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes BOSS."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] -#[doc = "* `force_user` - When true, just use bossU instead of trying to initialize with bossP first."] - + #[doc = "Initializes BOSS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] + #[doc = "* `force_user` - When true, just use bossU instead of trying to initialize with bossP first."] pub fn bossInit(programID: u64_, force_user: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programID` - programID to use, 0 for the current process."] - + #[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programID` - programID to use, 0 for the current process."] pub fn bossReinit(programID: u64_) -> Result; } extern "C" { -#[doc = "Exits BOSS."] -#[doc = ""] - + #[doc = "Exits BOSS."] + #[doc = ""] pub fn bossExit(); } extern "C" { -#[doc = "Returns the BOSS session handle."] -#[doc = ""] - + #[doc = "Returns the BOSS session handle."] + #[doc = ""] pub fn bossGetSessionHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Set the content data storage location."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] -#[doc = "* `boss_size` - Probably the max size in the extdata which BOSS can use."] -#[doc = "* `mediaType` - Roughly the same as FS mediatype."] - + #[doc = "Set the content data storage location."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] + #[doc = "* `boss_size` - Probably the max size in the extdata which BOSS can use."] + #[doc = "* `mediaType` - Roughly the same as FS mediatype."] pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] -#[doc = ""] - + #[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] + #[doc = ""] pub fn bossUnregisterStorage() -> Result; } extern "C" { #[must_use] -#[doc = "Register a task."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `taskID` - BOSS taskID."] -#[doc = "* `unk0` - Unknown, usually zero."] -#[doc = "* `unk1` - Unknown, usually zero."] - + #[doc = "Register a task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = "* `unk0` - Unknown, usually zero."] + #[doc = "* `unk1` - Unknown, usually zero."] pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Send a property."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `PropertyID` - PropertyID"] -#[doc = "* `buf` - Input buffer data."] -#[doc = "* `size` - Buffer size."] - + #[doc = "Send a property."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `PropertyID` - PropertyID"] + #[doc = "* `buf` - Input buffer data."] + #[doc = "* `size` - Buffer size."] pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the content file for the specified NsDataId."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `NsDataId` - NsDataId"] - + #[doc = "Deletes the content file for the specified NsDataId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NsDataId` - NsDataId"] pub fn bossDeleteNsData(NsDataId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets header info for the specified NsDataId."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `NsDataId` - NsDataId"] -#[doc = "* `type` - Type of data to load."] -#[doc = "* `buffer` - Output buffer."] -#[doc = "* `size` - Output buffer size."] - + #[doc = "Gets header info for the specified NsDataId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NsDataId` - NsDataId"] + #[doc = "* `type` - Type of data to load."] + #[doc = "* `buffer` - Output buffer."] + #[doc = "* `size` - Output buffer size."] pub fn bossGetNsDataHeaderInfo( NsDataId: u32_, type_: u8_, @@ -12578,17 +11725,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads data from the content for the specified NsDataId."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `NsDataId` - NsDataId"] -#[doc = "* `offset` - Offset in the content."] -#[doc = "* `buffer` - Output buffer."] -#[doc = "* `size` - Output buffer size."] -#[doc = "* `transfer_total` - Optional output actual read size, can be NULL."] -#[doc = "* `unk_out` - Optional unknown output, can be NULL."] - + #[doc = "Reads data from the content for the specified NsDataId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NsDataId` - NsDataId"] + #[doc = "* `offset` - Offset in the content."] + #[doc = "* `buffer` - Output buffer."] + #[doc = "* `size` - Output buffer size."] + #[doc = "* `transfer_total` - Optional output actual read size, can be NULL."] + #[doc = "* `unk_out` - Optional unknown output, can be NULL."] pub fn bossReadNsData( NsDataId: u32_, offset: u64_, @@ -12600,47 +11746,43 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Starts a task soon after running this command."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `taskID` - BOSS taskID."] - + #[doc = "Starts a task soon after running this command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Similar to bossStartTaskImmediate?"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `taskID` - BOSS taskID."] - + #[doc = "Similar to bossStartTaskImmediate?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `taskID` - BOSS taskID."] -#[doc = "* `unk` - Unknown, usually zero?"] - + #[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = "* `unk` - Unknown, usually zero?"] pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns task state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `taskID` - BOSS taskID."] -#[doc = "* `inval` - Unknown, normally 0?"] -#[doc = "* `status` - Output status, see bossTaskStatus."] -#[doc = "* `out1` - Output field."] -#[doc = "* `out2` - Output field."] - + #[doc = "Returns task state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = "* `inval` - Unknown, normally 0?"] + #[doc = "* `status` - Output status, see bossTaskStatus."] + #[doc = "* `out1` - Output field."] + #[doc = "* `out2` - Output field."] pub fn bossGetTaskState( taskID: *const ::libc::c_char, inval: s8, @@ -12651,23 +11793,21 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This loads the current state of PropertyID 0x0 for the specified task."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `taskID` - BOSS taskID."] - + #[doc = "This loads the current state of PropertyID 0x0 for the specified task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result; } extern "C" { -#[doc = "Setup a BOSS context with the default config."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bossContext` - BOSS context."] -#[doc = "* `seconds_interval` - Interval in seconds for running the task automatically."] -#[doc = "* `url` - Task URL."] - + #[doc = "Setup a BOSS context with the default config."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bossContext` - BOSS context."] + #[doc = "* `seconds_interval` - Interval in seconds for running the task automatically."] + #[doc = "* `url` - Task URL."] pub fn bossSetupContextDefault( ctx: *mut bossContext, seconds_interval: u32_, @@ -12676,12 +11816,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends the config stored in the context. Used before registering a task."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bossContext` - BOSS context."] - + #[doc = "Sends the config stored in the context. Used before registering a task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bossContext` - BOSS context."] pub fn bossSendContextConfig(ctx: *mut bossContext) -> Result; } #[doc = "8-bit per component, planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P."] @@ -12781,41 +11920,32 @@ pub type Y2RU_BlockAlignment = ::libc::c_uint; #[doc = "G = trunc((rgb_Y * Y - g_U * U - g_V * V) + 0.75 + g_offset)"] #[doc = "B = trunc((rgb_Y * Y + b_U * U ) + 0.75 + b_offset)"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_ColorCoefficients { -#[doc = "RGB per unit Y."] -#[doc = ""] - + #[doc = "RGB per unit Y."] + #[doc = ""] pub rgb_Y: u16_, -#[doc = "Red per unit V."] -#[doc = ""] - + #[doc = "Red per unit V."] + #[doc = ""] pub r_V: u16_, -#[doc = "Green per unit V."] -#[doc = ""] - + #[doc = "Green per unit V."] + #[doc = ""] pub g_V: u16_, -#[doc = "Green per unit U."] -#[doc = ""] - + #[doc = "Green per unit U."] + #[doc = ""] pub g_U: u16_, -#[doc = "Blue per unit U."] -#[doc = ""] - + #[doc = "Blue per unit U."] + #[doc = ""] pub b_U: u16_, -#[doc = "Red offset."] -#[doc = ""] - + #[doc = "Red offset."] + #[doc = ""] pub r_offset: u16_, -#[doc = "Green offset."] -#[doc = ""] - + #[doc = "Green offset."] + #[doc = ""] pub g_offset: u16_, -#[doc = "Blue offset."] -#[doc = ""] - + #[doc = "Blue offset."] + #[doc = ""] pub b_offset: u16_, } #[doc = "Coefficients from the ITU-R BT.601 standard with PC ranges."] @@ -12846,30 +11976,25 @@ pub type Y2RU_StandardCoefficient = ::libc::c_uint; #[doc = ""] #[doc = "You can send a batch of configuration parameters using this structure and @ref Y2RU_SetConversionParams."] #[doc = ""] - #[repr(C)] #[repr(align(4))] #[derive(Debug, Copy, Clone)] pub struct Y2RU_ConversionParams { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -#[doc = "Value passed to @ref Y2RU_SetInputLineWidth"] -#[doc = ""] - + #[doc = "Value passed to @ref Y2RU_SetInputLineWidth"] + #[doc = ""] pub input_line_width: s16, -#[doc = "Value passed to @ref Y2RU_SetInputLines"] -#[doc = ""] - + #[doc = "Value passed to @ref Y2RU_SetInputLines"] + #[doc = ""] pub input_lines: s16, pub _bitfield_align_2: [u8; 0], pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Unused."] -#[doc = ""] - + #[doc = "Unused."] + #[doc = ""] pub unused: u8_, -#[doc = "Value passed to @ref Y2RU_SetAlpha"] -#[doc = ""] - + #[doc = "Value passed to @ref Y2RU_SetAlpha"] + #[doc = ""] pub alpha: u16_, } impl Default for Y2RU_ConversionParams { @@ -12977,318 +12102,279 @@ impl Y2RU_ConversionParams { } #[doc = "Dithering weights."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_DitheringWeightParams { -#[doc = "Weight 0 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 0 for even X, even Y."] + #[doc = ""] pub w0_xEven_yEven: u16_, -#[doc = "Weight 0 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 0 for odd X, even Y."] + #[doc = ""] pub w0_xOdd_yEven: u16_, -#[doc = "Weight 0 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 0 for even X, odd Y."] + #[doc = ""] pub w0_xEven_yOdd: u16_, -#[doc = "Weight 0 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 0 for odd X, odd Y."] + #[doc = ""] pub w0_xOdd_yOdd: u16_, -#[doc = "Weight 1 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 1 for even X, even Y."] + #[doc = ""] pub w1_xEven_yEven: u16_, -#[doc = "Weight 1 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 1 for odd X, even Y."] + #[doc = ""] pub w1_xOdd_yEven: u16_, -#[doc = "Weight 1 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 1 for even X, odd Y."] + #[doc = ""] pub w1_xEven_yOdd: u16_, -#[doc = "Weight 1 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 1 for odd X, odd Y."] + #[doc = ""] pub w1_xOdd_yOdd: u16_, -#[doc = "Weight 2 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 2 for even X, even Y."] + #[doc = ""] pub w2_xEven_yEven: u16_, -#[doc = "Weight 2 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 2 for odd X, even Y."] + #[doc = ""] pub w2_xOdd_yEven: u16_, -#[doc = "Weight 2 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 2 for even X, odd Y."] + #[doc = ""] pub w2_xEven_yOdd: u16_, -#[doc = "Weight 2 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 2 for odd X, odd Y."] + #[doc = ""] pub w2_xOdd_yOdd: u16_, -#[doc = "Weight 3 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 3 for even X, even Y."] + #[doc = ""] pub w3_xEven_yEven: u16_, -#[doc = "Weight 3 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 3 for odd X, even Y."] + #[doc = ""] pub w3_xOdd_yEven: u16_, -#[doc = "Weight 3 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 3 for even X, odd Y."] + #[doc = ""] pub w3_xEven_yOdd: u16_, -#[doc = "Weight 3 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 3 for odd X, odd Y."] + #[doc = ""] pub w3_xOdd_yOdd: u16_, } extern "C" { #[must_use] -#[doc = "Initializes the y2r service."] -#[doc = ""] -#[doc = ""] -#[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] -#[doc = ""] - + #[doc = "Initializes the y2r service."] + #[doc = ""] + #[doc = ""] + #[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] + #[doc = ""] pub fn y2rInit() -> Result; } extern "C" { -#[doc = "Closes the y2r service."] -#[doc = ""] -#[doc = ""] -#[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] -#[doc = ""] - + #[doc = "Closes the y2r service."] + #[doc = ""] + #[doc = ""] + #[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] + #[doc = ""] pub fn y2rExit(); } extern "C" { #[must_use] -#[doc = "Used to configure the input format."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `format` - Input format to use."] - + #[doc = "Used to configure the input format."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Input format to use."] pub fn Y2RU_SetInputFormat(format: Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured input format."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `format` - Pointer to output the input format to."] - + #[doc = "Gets the configured input format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Pointer to output the input format to."] pub fn Y2RU_GetInputFormat(format: *mut Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the output format."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `format` - Output format to use."] - + #[doc = "Used to configure the output format."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Output format to use."] pub fn Y2RU_SetOutputFormat(format: Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured output format."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `format` - Pointer to output the output format to."] - + #[doc = "Gets the configured output format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Pointer to output the output format to."] pub fn Y2RU_GetOutputFormat(format: *mut Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the rotation of the output."] -#[doc = ""] -#[doc = ""] -#[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `rotation` - Rotation to use."] - + #[doc = "Used to configure the rotation of the output."] + #[doc = ""] + #[doc = ""] + #[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rotation` - Rotation to use."] pub fn Y2RU_SetRotation(rotation: Y2RU_Rotation) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured rotation."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `rotation` - Pointer to output the rotation to."] - + #[doc = "Gets the configured rotation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rotation` - Pointer to output the rotation to."] pub fn Y2RU_GetRotation(rotation: *mut Y2RU_Rotation) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the alignment of the output buffer."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `alignment` - Alignment to use."] - + #[doc = "Used to configure the alignment of the output buffer."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alignment` - Alignment to use."] pub fn Y2RU_SetBlockAlignment(alignment: Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured alignment."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `alignment` - Pointer to output the alignment to."] - + #[doc = "Gets the configured alignment."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alignment` - Pointer to output the alignment to."] pub fn Y2RU_GetBlockAlignment(alignment: *mut Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to use spacial dithering."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Whether to use spacial dithering."] - + #[doc = "Sets whether to use spacial dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to use spacial dithering."] pub fn Y2RU_SetSpacialDithering(enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether to use spacial dithering."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Pointer to output the spacial dithering state to."] - + #[doc = "Gets whether to use spacial dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pointer to output the spacial dithering state to."] pub fn Y2RU_GetSpacialDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to use temporal dithering."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Whether to use temporal dithering."] - + #[doc = "Sets whether to use temporal dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to use temporal dithering."] pub fn Y2RU_SetTemporalDithering(enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether to use temporal dithering."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Pointer to output the temporal dithering state to."] - + #[doc = "Gets whether to use temporal dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pointer to output the temporal dithering state to."] pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the width of the image."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] - + #[doc = "Used to configure the width of the image."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured input line width."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `line_width` - Pointer to output the line width to."] - + #[doc = "Gets the configured input line width."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `line_width` - Pointer to output the line width to."] pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the height of the image."] -#[doc = ""] -#[doc = ""] -#[doc = "A multiple of 8 seems to be preferred."] -#[doc = "If using the @ref BLOCK_8_BY_8 mode, it must be a multiple of 8."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `num_lines` - Number of lines to be converted."] - + #[doc = "Used to configure the height of the image."] + #[doc = ""] + #[doc = ""] + #[doc = "A multiple of 8 seems to be preferred."] + #[doc = "If using the @ref BLOCK_8_BY_8 mode, it must be a multiple of 8."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num_lines` - Number of lines to be converted."] pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured number of input lines."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `num_lines` - Pointer to output the input lines to."] - + #[doc = "Gets the configured number of input lines."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num_lines` - Pointer to output the input lines to."] pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the color conversion formula."] -#[doc = ""] -#[doc = ""] -#[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `coefficients` - Coefficients to use."] - + #[doc = "Used to configure the color conversion formula."] + #[doc = ""] + #[doc = ""] + #[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficients` - Coefficients to use."] pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured color coefficients."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `num_lines` - Pointer to output the coefficients to."] - + #[doc = "Gets the configured color coefficients."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num_lines` - Pointer to output the coefficients to."] pub fn Y2RU_GetCoefficients(coefficients: *mut Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] -#[doc = ""] -#[doc = ""] -#[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `coefficient` - Standard coefficient to use."] - + #[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] + #[doc = ""] + #[doc = ""] + #[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficient` - Standard coefficient to use."] pub fn Y2RU_SetStandardCoefficient(coefficient: Y2RU_StandardCoefficient) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the color coefficient parameters of a standard coefficient."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `coefficients` - Pointer to output the coefficients to."] -#[doc = "* `standardCoeff` - Standard coefficient to check."] - + #[doc = "Gets the color coefficient parameters of a standard coefficient."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficients` - Pointer to output the coefficients to."] + #[doc = "* `standardCoeff` - Standard coefficient to check."] pub fn Y2RU_GetStandardCoefficient( coefficients: *mut Y2RU_ColorCoefficients, standardCoeff: Y2RU_StandardCoefficient, @@ -13296,83 +12382,77 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Used to configure the alpha value of the output."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `alpha` - 8-bit value to be used for the output when the format requires it."] - + #[doc = "Used to configure the alpha value of the output."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alpha` - 8-bit value to be used for the output when the format requires it."] pub fn Y2RU_SetAlpha(alpha: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured output alpha value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `alpha` - Pointer to output the alpha value to."] - + #[doc = "Gets the configured output alpha value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alpha` - Pointer to output the alpha value to."] pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Used to enable the end of conversion interrupt."] -#[doc = ""] -#[doc = ""] -#[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] -#[doc = "This interrupt will then be used to fire an event. See @ref Y2RU_GetTransferEndEvent."] -#[doc = "By default the interrupt is enabled."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `should_interrupt` - Enables the interrupt if true, disable it if false."] - + #[doc = "Used to enable the end of conversion interrupt."] + #[doc = ""] + #[doc = ""] + #[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] + #[doc = "This interrupt will then be used to fire an event. See @ref Y2RU_GetTransferEndEvent."] + #[doc = "By default the interrupt is enabled."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `should_interrupt` - Enables the interrupt if true, disable it if false."] pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the transfer end interrupt is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `should_interrupt` - Pointer to output the interrupt state to."] - + #[doc = "Gets whether the transfer end interrupt is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `should_interrupt` - Pointer to output the interrupt state to."] pub fn Y2RU_GetTransferEndInterrupt(should_interrupt: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an handle to the end of conversion event."] -#[doc = ""] -#[doc = ""] -#[doc = "To enable this event you have to use @code{C} Y2RU_SetTransferEndInterrupt(true);@endcode"] -#[doc = "The event will be triggered when the corresponding interrupt is fired."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] - + #[doc = "Gets an handle to the end of conversion event."] + #[doc = ""] + #[doc = ""] + #[doc = "To enable this event you have to use @code{C} Y2RU_SetTransferEndInterrupt(true);@endcode"] + #[doc = "The event will be triggered when the corresponding interrupt is fired."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Configures the Y plane buffer."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] -#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "* `image_size` - The total size of the data buffer."] -#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - + #[doc = "Configures the Y plane buffer."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] pub fn Y2RU_SetSendingY( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13382,20 +12462,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the U plane buffer."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] -#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "* `image_size` - The total size of the data buffer."] -#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - + #[doc = "Configures the U plane buffer."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] pub fn Y2RU_SetSendingU( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13405,20 +12484,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the V plane buffer."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] -#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "* `image_size` - The total size of the data buffer."] -#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - + #[doc = "Configures the V plane buffer."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] pub fn Y2RU_SetSendingV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13428,20 +12506,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the YUYV source buffer."] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "This specifies the YUYV data buffer for the packed input format @ref INPUT_YUV422_BATCH."] -#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "* `image_size` - The total size of the data buffer."] -#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - + #[doc = "Configures the YUYV source buffer."] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "This specifies the YUYV data buffer for the packed input format @ref INPUT_YUV422_BATCH."] + #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] pub fn Y2RU_SetSendingYUYV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13451,26 +12528,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the destination buffer."] -#[doc = ""] -#[doc = ""] -#[doc = "This specifies the destination buffer of the conversion."] -#[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] -#[doc = "The buffer does NOT need to be allocated in the linear heap."] -#[doc = ""] -#[doc = ""] -#[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] -#[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] -#[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `src_buf` - A pointer to the beginning of your destination buffer in FCRAM"] -#[doc = "* `image_size` - The total size of the data buffer."] -#[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - + #[doc = "Configures the destination buffer."] + #[doc = ""] + #[doc = ""] + #[doc = "This specifies the destination buffer of the conversion."] + #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = "The buffer does NOT need to be allocated in the linear heap."] + #[doc = ""] + #[doc = ""] + #[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] + #[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] + #[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your destination buffer in FCRAM"] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] pub fn Y2RU_SetReceiving( dst_buf: *mut ::libc::c_void, image_size: u32_, @@ -13480,151 +12556,137 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the Y buffer."] -#[doc = ""] -#[doc = ""] -#[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with @ref Y2RU_SetSendingY."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - + #[doc = "Checks if the DMA has finished sending the Y buffer."] + #[doc = ""] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with @ref Y2RU_SetSendingY."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] pub fn Y2RU_IsDoneSendingY(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the U buffer."] -#[doc = ""] -#[doc = ""] -#[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with @ref Y2RU_SetSendingU."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - + #[doc = "Checks if the DMA has finished sending the U buffer."] + #[doc = ""] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with @ref Y2RU_SetSendingU."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] pub fn Y2RU_IsDoneSendingU(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the V buffer."] -#[doc = ""] -#[doc = ""] -#[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with @ref Y2RU_SetSendingV."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - + #[doc = "Checks if the DMA has finished sending the V buffer."] + #[doc = ""] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with @ref Y2RU_SetSendingV."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] pub fn Y2RU_IsDoneSendingV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the YUYV buffer."] -#[doc = ""] -#[doc = ""] -#[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with @ref Y2RU_SetSendingYUYV."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - + #[doc = "Checks if the DMA has finished sending the YUYV buffer."] + #[doc = ""] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with @ref Y2RU_SetSendingYUYV."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] pub fn Y2RU_IsDoneSendingYUYV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the converted result."] -#[doc = ""] -#[doc = ""] -#[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - + #[doc = "Checks if the DMA has finished sending the converted result."] + #[doc = ""] + #[doc = ""] + #[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Configures the dithering weight parameters."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `params` - Dithering weight parameters to use."] - + #[doc = "Configures the dithering weight parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `params` - Dithering weight parameters to use."] pub fn Y2RU_SetDitheringWeightParams(params: *const Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured dithering weight parameters."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `params` - Pointer to output the dithering weight parameters to."] - + #[doc = "Gets the configured dithering weight parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `params` - Pointer to output the dithering weight parameters to."] pub fn Y2RU_GetDitheringWeightParams(params: *mut Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] -#[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] -#[doc = ""] -#[doc = ""] -#[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `params` - Conversion parameters to set."] - + #[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] + #[doc = ""] + #[doc = ""] + #[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `params` - Conversion parameters to set."] pub fn Y2RU_SetConversionParams(params: *const Y2RU_ConversionParams) -> Result; } extern "C" { #[must_use] -#[doc = "Starts the conversion process"] -#[doc = ""] - + #[doc = "Starts the conversion process"] + #[doc = ""] pub fn Y2RU_StartConversion() -> Result; } extern "C" { #[must_use] -#[doc = "Cancels the conversion"] -#[doc = ""] - + #[doc = "Cancels the conversion"] + #[doc = ""] pub fn Y2RU_StopConversion() -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the conversion and DMA transfer are finished."] -#[doc = ""] -#[doc = ""] -#[doc = "This can have the same problems as the event and interrupt. See @ref Y2RU_SetTransferEndInterrupt."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `is_busy` - Pointer to output the busy state to."] - + #[doc = "Checks if the conversion and DMA transfer are finished."] + #[doc = ""] + #[doc = ""] + #[doc = "This can have the same problems as the event and interrupt. See @ref Y2RU_SetTransferEndInterrupt."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_busy` - Pointer to output the busy state to."] pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks whether Y2R is ready to be used."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ping` - Pointer to output the ready status to."] - + #[doc = "Checks whether Y2R is ready to be used."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ping` - Pointer to output the ready status to."] pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the Y2R driver."] -#[doc = ""] - + #[doc = "Initializes the Y2R driver."] + #[doc = ""] pub fn Y2RU_DriverInitialize() -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the Y2R driver."] -#[doc = ""] - + #[doc = "Terminates the Y2R driver."] + #[doc = ""] pub fn Y2RU_DriverFinalize() -> Result; } #[doc = "No port."] @@ -14024,377 +13086,302 @@ pub const SHUTTER_SOUND_TYPE_MOVIE_END: CAMU_ShutterSoundType = 2; pub type CAMU_ShutterSoundType = ::libc::c_uint; #[doc = "Image quality calibration data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_ImageQualityCalibrationData { -#[doc = "Auto exposure base target brightness."] -#[doc = ""] - + #[doc = "Auto exposure base target brightness."] + #[doc = ""] pub aeBaseTarget: s16, -#[doc = "Left color correction matrix red normalization coefficient."] -#[doc = ""] - + #[doc = "Left color correction matrix red normalization coefficient."] + #[doc = ""] pub kRL: s16, -#[doc = "Left color correction matrix green normalization coefficient."] -#[doc = ""] - + #[doc = "Left color correction matrix green normalization coefficient."] + #[doc = ""] pub kGL: s16, -#[doc = "Left color correction matrix blue normalization coefficient."] -#[doc = ""] - + #[doc = "Left color correction matrix blue normalization coefficient."] + #[doc = ""] pub kBL: s16, -#[doc = "Color correction matrix position."] -#[doc = ""] - + #[doc = "Color correction matrix position."] + #[doc = ""] pub ccmPosition: s16, -#[doc = "Right camera, left color correction matrix red/green gain."] -#[doc = ""] - + #[doc = "Right camera, left color correction matrix red/green gain."] + #[doc = ""] pub awbCcmL9Right: u16_, -#[doc = "Left camera, left color correction matrix red/green gain."] -#[doc = ""] - + #[doc = "Left camera, left color correction matrix red/green gain."] + #[doc = ""] pub awbCcmL9Left: u16_, -#[doc = "Right camera, left color correction matrix blue/green gain."] -#[doc = ""] - + #[doc = "Right camera, left color correction matrix blue/green gain."] + #[doc = ""] pub awbCcmL10Right: u16_, -#[doc = "Left camera, left color correction matrix blue/green gain."] -#[doc = ""] - + #[doc = "Left camera, left color correction matrix blue/green gain."] + #[doc = ""] pub awbCcmL10Left: u16_, -#[doc = "Right camera, color correction matrix position threshold."] -#[doc = ""] - + #[doc = "Right camera, color correction matrix position threshold."] + #[doc = ""] pub awbX0Right: u16_, -#[doc = "Left camera, color correction matrix position threshold."] -#[doc = ""] - + #[doc = "Left camera, color correction matrix position threshold."] + #[doc = ""] pub awbX0Left: u16_, } #[doc = "Stereo camera calibration data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_StereoCameraCalibrationData { -#[doc = "#bool Whether the X and Y rotation data is valid."] -#[doc = ""] - + #[doc = "#bool Whether the X and Y rotation data is valid."] + #[doc = ""] pub isValidRotationXY: u8_, -#[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] -#[doc = ""] - + #[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] + #[doc = ""] pub padding: [u8_; 3usize], -#[doc = "Scale to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Scale to match the left camera image with the right."] + #[doc = ""] pub scale: f32, -#[doc = "Z axis rotation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Z axis rotation to match the left camera image with the right."] + #[doc = ""] pub rotationZ: f32, -#[doc = "X axis translation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "X axis translation to match the left camera image with the right."] + #[doc = ""] pub translationX: f32, -#[doc = "Y axis translation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Y axis translation to match the left camera image with the right."] + #[doc = ""] pub translationY: f32, -#[doc = "X axis rotation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "X axis rotation to match the left camera image with the right."] + #[doc = ""] pub rotationX: f32, -#[doc = "Y axis rotation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Y axis rotation to match the left camera image with the right."] + #[doc = ""] pub rotationY: f32, -#[doc = "Right camera angle of view."] -#[doc = ""] - + #[doc = "Right camera angle of view."] + #[doc = ""] pub angleOfViewRight: f32, -#[doc = "Left camera angle of view."] -#[doc = ""] - + #[doc = "Left camera angle of view."] + #[doc = ""] pub angleOfViewLeft: f32, -#[doc = "Distance between cameras and measurement chart."] -#[doc = ""] - + #[doc = "Distance between cameras and measurement chart."] + #[doc = ""] pub distanceToChart: f32, -#[doc = "Distance between left and right cameras."] -#[doc = ""] - + #[doc = "Distance between left and right cameras."] + #[doc = ""] pub distanceCameras: f32, -#[doc = "Image width."] -#[doc = ""] - + #[doc = "Image width."] + #[doc = ""] pub imageWidth: s16, -#[doc = "Image height."] -#[doc = ""] - + #[doc = "Image height."] + #[doc = ""] pub imageHeight: s16, -#[doc = "Reserved for future use. (unused)"] -#[doc = ""] - + #[doc = "Reserved for future use. (unused)"] + #[doc = ""] pub reserved: [u8_; 16usize], } #[doc = "Batch camera configuration for use without a context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterCameraSelect { -#[doc = "Selected camera."] -#[doc = ""] - + #[doc = "Selected camera."] + #[doc = ""] pub camera: u8_, -#[doc = "Camera exposure."] -#[doc = ""] - + #[doc = "Camera exposure."] + #[doc = ""] pub exposure: s8, -#[doc = "#CAMU_WhiteBalance Camera white balance."] -#[doc = ""] - + #[doc = "#CAMU_WhiteBalance Camera white balance."] + #[doc = ""] pub whiteBalance: u8_, -#[doc = "Camera sharpness."] -#[doc = ""] - + #[doc = "Camera sharpness."] + #[doc = ""] pub sharpness: s8, -#[doc = "#bool Whether to automatically determine the proper exposure."] -#[doc = ""] - + #[doc = "#bool Whether to automatically determine the proper exposure."] + #[doc = ""] pub autoExposureOn: u8_, -#[doc = "#bool Whether to automatically determine the white balance mode."] -#[doc = ""] - + #[doc = "#bool Whether to automatically determine the white balance mode."] + #[doc = ""] pub autoWhiteBalanceOn: u8_, -#[doc = "#CAMU_FrameRate Camera frame rate."] -#[doc = ""] - + #[doc = "#CAMU_FrameRate Camera frame rate."] + #[doc = ""] pub frameRate: u8_, -#[doc = "#CAMU_PhotoMode Camera photo mode."] -#[doc = ""] - + #[doc = "#CAMU_PhotoMode Camera photo mode."] + #[doc = ""] pub photoMode: u8_, -#[doc = "#CAMU_Contrast Camera contrast."] -#[doc = ""] - + #[doc = "#CAMU_Contrast Camera contrast."] + #[doc = ""] pub contrast: u8_, -#[doc = "#CAMU_LensCorrection Camera lens correction."] -#[doc = ""] - + #[doc = "#CAMU_LensCorrection Camera lens correction."] + #[doc = ""] pub lensCorrection: u8_, -#[doc = "#bool Whether to enable the camera's noise filter."] -#[doc = ""] - + #[doc = "#bool Whether to enable the camera's noise filter."] + #[doc = ""] pub noiseFilterOn: u8_, -#[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] -#[doc = ""] - + #[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] + #[doc = ""] pub padding: u8_, -#[doc = "X of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "X of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowX: s16, -#[doc = "Y of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "Y of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowY: s16, -#[doc = "Width of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "Width of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowWidth: s16, -#[doc = "Height of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "Height of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowHeight: s16, -#[doc = "X of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "X of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowX: s16, -#[doc = "Y of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "Y of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowY: s16, -#[doc = "Width of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "Width of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowWidth: s16, -#[doc = "Height of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "Height of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowHeight: s16, } #[doc = "Batch camera configuration for use with a context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContext { -#[doc = "Selected camera."] -#[doc = ""] - + #[doc = "Selected camera."] + #[doc = ""] pub camera: u8_, -#[doc = "#CAMU_Context Selected context."] -#[doc = ""] - + #[doc = "#CAMU_Context Selected context."] + #[doc = ""] pub context: u8_, -#[doc = "#CAMU_Flip Camera image flip mode."] -#[doc = ""] - + #[doc = "#CAMU_Flip Camera image flip mode."] + #[doc = ""] pub flip: u8_, -#[doc = "#CAMU_Effect Camera image special effects."] -#[doc = ""] - + #[doc = "#CAMU_Effect Camera image special effects."] + #[doc = ""] pub effect: u8_, -#[doc = "#CAMU_Size Camera image resolution."] -#[doc = ""] - + #[doc = "#CAMU_Size Camera image resolution."] + #[doc = ""] pub size: u8_, } #[doc = "Batch camera configuration for use with a context and with detailed size information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContextDetail { -#[doc = "Selected camera."] -#[doc = ""] - + #[doc = "Selected camera."] + #[doc = ""] pub camera: u8_, -#[doc = "#CAMU_Context Selected context."] -#[doc = ""] - + #[doc = "#CAMU_Context Selected context."] + #[doc = ""] pub context: u8_, -#[doc = "#CAMU_Flip Camera image flip mode."] -#[doc = ""] - + #[doc = "#CAMU_Flip Camera image flip mode."] + #[doc = ""] pub flip: u8_, -#[doc = "#CAMU_Effect Camera image special effects."] -#[doc = ""] - + #[doc = "#CAMU_Effect Camera image special effects."] + #[doc = ""] pub effect: u8_, -#[doc = "Image width."] -#[doc = ""] - + #[doc = "Image width."] + #[doc = ""] pub width: s16, -#[doc = "Image height."] -#[doc = ""] - + #[doc = "Image height."] + #[doc = ""] pub height: s16, -#[doc = "First crop point X."] -#[doc = ""] - + #[doc = "First crop point X."] + #[doc = ""] pub cropX0: s16, -#[doc = "First crop point Y."] -#[doc = ""] - + #[doc = "First crop point Y."] + #[doc = ""] pub cropY0: s16, -#[doc = "Second crop point X."] -#[doc = ""] - + #[doc = "Second crop point X."] + #[doc = ""] pub cropX1: s16, -#[doc = "Second crop point Y."] -#[doc = ""] - + #[doc = "Second crop point Y."] + #[doc = ""] pub cropY1: s16, } extern "C" { #[must_use] -#[doc = "Initializes the cam service."] -#[doc = ""] -#[doc = ""] -#[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] -#[doc = ""] - + #[doc = "Initializes the cam service."] + #[doc = ""] + #[doc = ""] + #[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] + #[doc = ""] pub fn camInit() -> Result; } extern "C" { -#[doc = "Closes the cam service."] -#[doc = ""] -#[doc = ""] -#[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] -#[doc = ""] - + #[doc = "Closes the cam service."] + #[doc = ""] + #[doc = ""] + #[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] + #[doc = ""] pub fn camExit(); } extern "C" { #[must_use] -#[doc = "Begins capture on the specified camera port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to begin capture on."] - + #[doc = "Begins capture on the specified camera port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to begin capture on."] pub fn CAMU_StartCapture(port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates capture on the specified camera port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to terminate capture on."] - + #[doc = "Terminates capture on the specified camera port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to terminate capture on."] pub fn CAMU_StopCapture(port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the specified camera port is busy."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `busy` - Pointer to output the busy state to."] -#[doc = "* `port` - Port to check."] - + #[doc = "Gets whether the specified camera port is busy."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `busy` - Pointer to output the busy state to."] + #[doc = "* `port` - Port to check."] pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the buffer and error flags of the specified camera port."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to clear."] - + #[doc = "Clears the buffer and error flags of the specified camera port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to clear."] pub fn CAMU_ClearBuffer(port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a handle to the event signaled on vsync interrupts."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to output the event handle to."] -#[doc = "* `port` - Port to use."] - + #[doc = "Gets a handle to the event signaled on vsync interrupts."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the event handle to."] + #[doc = "* `port` - Port to use."] pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a handle to the event signaled on camera buffer errors."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to output the event handle to."] -#[doc = "* `port` - Port to use."] - + #[doc = "Gets a handle to the event signaled on camera buffer errors."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the event handle to."] + #[doc = "* `port` - Port to use."] pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates the process of receiving a camera frame."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to output the completion event handle to."] -#[doc = "* `dst` - Buffer to write data to."] -#[doc = "* `port` - Port to receive from."] -#[doc = "* `imageSize` - Size of the image to receive."] -#[doc = "* `transferUnit` - Transfer unit to use when receiving."] - + #[doc = "Initiates the process of receiving a camera frame."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the completion event handle to."] + #[doc = "* `dst` - Buffer to write data to."] + #[doc = "* `port` - Port to receive from."] + #[doc = "* `imageSize` - Size of the image to receive."] + #[doc = "* `transferUnit` - Transfer unit to use when receiving."] pub fn CAMU_SetReceiving( event: *mut Handle, dst: *mut ::libc::c_void, @@ -14405,110 +13392,101 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets whether the specified camera port has finished receiving image data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `finishedReceiving` - Pointer to output the receiving status to."] -#[doc = "* `port` - Port to check."] - + #[doc = "Gets whether the specified camera port has finished receiving image data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `finishedReceiving` - Pointer to output the receiving status to."] + #[doc = "* `port` - Port to check."] pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the number of lines to transfer into an image buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to use."] -#[doc = "* `lines` - Lines to transfer."] -#[doc = "* `width` - Width of the image."] -#[doc = "* `height` - Height of the image."] - + #[doc = "Sets the number of lines to transfer into an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `lines` - Lines to transfer."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the maximum number of lines that can be saved to an image buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `maxLines` - Pointer to write the maximum number of lines to."] -#[doc = "* `width` - Width of the image."] -#[doc = "* `height` - Height of the image."] - + #[doc = "Gets the maximum number of lines that can be saved to an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `maxLines` - Pointer to write the maximum number of lines to."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the number of bytes to transfer into an image buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to use."] -#[doc = "* `bytes` - Bytes to transfer."] -#[doc = "* `width` - Width of the image."] -#[doc = "* `height` - Height of the image."] - + #[doc = "Sets the number of bytes to transfer into an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `bytes` - Bytes to transfer."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the number of bytes to transfer into an image buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `transferBytes` - Pointer to write the number of bytes to."] -#[doc = "* `port` - Port to use."] - + #[doc = "Gets the number of bytes to transfer into an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transferBytes` - Pointer to write the number of bytes to."] + #[doc = "* `port` - Port to use."] pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `maxBytes` - Pointer to write the maximum number of bytes to."] -#[doc = "* `width` - Width of the image."] -#[doc = "* `height` - Height of the image."] - + #[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `maxBytes` - Pointer to write the maximum number of bytes to."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether image trimming is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to use."] -#[doc = "* `trimming` - Whether image trimming is enabled."] - + #[doc = "Sets whether image trimming is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `trimming` - Whether image trimming is enabled."] pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether image trimming is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `trimming` - Pointer to output the trim state to."] -#[doc = "* `port` - Port to use."] - + #[doc = "Gets whether image trimming is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `trimming` - Pointer to output the trim state to."] + #[doc = "* `port` - Port to use."] pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the parameters used for trimming images."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to use."] -#[doc = "* `xStart` - Start X coordinate."] -#[doc = "* `yStart` - Start Y coordinate."] -#[doc = "* `xEnd` - End X coordinate."] -#[doc = "* `yEnd` - End Y coordinate."] - + #[doc = "Sets the parameters used for trimming images."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `xStart` - Start X coordinate."] + #[doc = "* `yStart` - Start Y coordinate."] + #[doc = "* `xEnd` - End X coordinate."] + #[doc = "* `yEnd` - End Y coordinate."] pub fn CAMU_SetTrimmingParams( port: u32_, xStart: s16, @@ -14519,16 +13497,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the parameters used for trimming images."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `xStart` - Pointer to write the start X coordinate to."] -#[doc = "* `yStart` - Pointer to write the start Y coordinate to."] -#[doc = "* `xEnd` - Pointer to write the end X coordinate to."] -#[doc = "* `yEnd` - Pointer to write the end Y coordinate to."] -#[doc = "* `port` - Port to use."] - + #[doc = "Gets the parameters used for trimming images."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `xStart` - Pointer to write the start X coordinate to."] + #[doc = "* `yStart` - Pointer to write the start Y coordinate to."] + #[doc = "* `xEnd` - Pointer to write the end X coordinate to."] + #[doc = "* `yEnd` - Pointer to write the end Y coordinate to."] + #[doc = "* `port` - Port to use."] pub fn CAMU_GetTrimmingParams( xStart: *mut s16, yStart: *mut s16, @@ -14539,16 +13516,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the parameters used for trimming images, relative to the center of the image."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `port` - Port to use."] -#[doc = "* `trimWidth` - Trim width."] -#[doc = "* `trimHeight` - Trim height."] -#[doc = "* `camWidth` - Camera width."] -#[doc = "* `camHeight` - Camera height."] - + #[doc = "Sets the parameters used for trimming images, relative to the center of the image."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `trimWidth` - Trim width."] + #[doc = "* `trimHeight` - Trim height."] + #[doc = "* `camWidth` - Camera width."] + #[doc = "* `camHeight` - Camera height."] pub fn CAMU_SetTrimmingParamsCenter( port: u32_, trimWidth: s16, @@ -14559,58 +13535,53 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Activates the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] - + #[doc = "Activates the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] pub fn CAMU_Activate(select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Switches the specified camera's active context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `context` - Context to use."] - + #[doc = "Switches the specified camera's active context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `context` - Context to use."] pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the exposure value of the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `exposure` - Exposure value to use."] - + #[doc = "Sets the exposure value of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `exposure` - Exposure value to use."] pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the white balance mode of the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `whiteBalance` - White balance mode to use."] - + #[doc = "Sets the white balance mode of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `whiteBalance` - White balance mode to use."] pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the white balance mode of the specified camera."] -#[doc = ""] -#[doc = "TODO: Explain \"without base up\"?"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `whiteBalance` - White balance mode to use."] - + #[doc = "Sets the white balance mode of the specified camera."] + #[doc = ""] + #[doc = "TODO: Explain \"without base up\"?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `whiteBalance` - White balance mode to use."] pub fn CAMU_SetWhiteBalanceWithoutBaseUp( select: u32_, whiteBalance: CAMU_WhiteBalance, @@ -14618,86 +13589,79 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the sharpness of the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `sharpness` - Sharpness to use."] - + #[doc = "Sets the sharpness of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `sharpness` - Sharpness to use."] pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether auto exposure is enabled on the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `autoWhiteBalance` - Whether auto exposure is enabled."] - + #[doc = "Sets whether auto exposure is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `autoWhiteBalance` - Whether auto exposure is enabled."] pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether auto exposure is enabled on the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `autoExposure` - Pointer to output the auto exposure state to."] -#[doc = "* `select` - Camera to use."] - + #[doc = "Gets whether auto exposure is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `autoExposure` - Pointer to output the auto exposure state to."] + #[doc = "* `select` - Camera to use."] pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether auto white balance is enabled on the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `autoWhiteBalance` - Whether auto white balance is enabled."] - + #[doc = "Sets whether auto white balance is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `autoWhiteBalance` - Whether auto white balance is enabled."] pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether auto white balance is enabled on the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `autoWhiteBalance` - Pointer to output the auto white balance state to."] -#[doc = "* `select` - Camera to use."] - + #[doc = "Gets whether auto white balance is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `autoWhiteBalance` - Pointer to output the auto white balance state to."] + #[doc = "* `select` - Camera to use."] pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Flips the image of the specified camera in the specified context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `flip` - Flip mode to use."] -#[doc = "* `context` - Context to use."] - + #[doc = "Flips the image of the specified camera in the specified context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `flip` - Flip mode to use."] + #[doc = "* `context` - Context to use."] pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the image resolution of the given camera in the given context, in detail."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `width` - Width to use."] -#[doc = "* `height` - Height to use."] -#[doc = "* `cropX0` - First crop point X."] -#[doc = "* `cropY0` - First crop point Y."] -#[doc = "* `cropX1` - Second crop point X."] -#[doc = "* `cropY1` - Second crop point Y."] -#[doc = "* `context` - Context to use."] - + #[doc = "Sets the image resolution of the given camera in the given context, in detail."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `width` - Width to use."] + #[doc = "* `height` - Height to use."] + #[doc = "* `cropX0` - First crop point X."] + #[doc = "* `cropY0` - First crop point Y."] + #[doc = "* `cropX1` - Second crop point X."] + #[doc = "* `cropY1` - Second crop point Y."] + #[doc = "* `context` - Context to use."] pub fn CAMU_SetDetailSize( select: u32_, width: s16, @@ -14711,82 +13675,75 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the image resolution of the given camera in the given context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `size` - Size to use."] -#[doc = "* `context` - Context to use."] - + #[doc = "Sets the image resolution of the given camera in the given context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `size` - Size to use."] + #[doc = "* `context` - Context to use."] pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the frame rate of the given camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `frameRate` - Frame rate to use."] - + #[doc = "Sets the frame rate of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `frameRate` - Frame rate to use."] pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the photo mode of the given camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `photoMode` - Photo mode to use."] - + #[doc = "Sets the photo mode of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `photoMode` - Photo mode to use."] pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the special effects of the given camera in the given context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `effect` - Effect to use."] -#[doc = "* `context` - Context to use."] - + #[doc = "Sets the special effects of the given camera in the given context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `effect` - Effect to use."] + #[doc = "* `context` - Context to use."] pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the contrast mode of the given camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `contrast` - Contrast mode to use."] - + #[doc = "Sets the contrast mode of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `contrast` - Contrast mode to use."] pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the lens correction mode of the given camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `lensCorrection` - Lens correction mode to use."] - + #[doc = "Sets the lens correction mode of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `lensCorrection` - Lens correction mode to use."] pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the output format of the given camera in the given context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `format` - Format to output."] -#[doc = "* `context` - Context to use."] - + #[doc = "Sets the output format of the given camera in the given context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `format` - Format to output."] + #[doc = "* `context` - Context to use."] pub fn CAMU_SetOutputFormat( select: u32_, format: CAMU_OutputFormat, @@ -14795,16 +13752,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the region to base auto exposure off of for the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `x` - X of the region."] -#[doc = "* `y` - Y of the region."] -#[doc = "* `width` - Width of the region."] -#[doc = "* `height` - Height of the region."] - + #[doc = "Sets the region to base auto exposure off of for the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `x` - X of the region."] + #[doc = "* `y` - Y of the region."] + #[doc = "* `width` - Width of the region."] + #[doc = "* `height` - Height of the region."] pub fn CAMU_SetAutoExposureWindow( select: u32_, x: s16, @@ -14815,16 +13771,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the region to base auto white balance off of for the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `x` - X of the region."] -#[doc = "* `y` - Y of the region."] -#[doc = "* `width` - Width of the region."] -#[doc = "* `height` - Height of the region."] - + #[doc = "Sets the region to base auto white balance off of for the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `x` - X of the region."] + #[doc = "* `y` - Y of the region."] + #[doc = "* `width` - Width of the region."] + #[doc = "* `height` - Height of the region."] pub fn CAMU_SetAutoWhiteBalanceWindow( select: u32_, x: s16, @@ -14835,317 +13790,287 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets whether the specified camera's noise filter is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to use."] -#[doc = "* `noiseFilter` - Whether the noise filter is enabled."] - + #[doc = "Sets whether the specified camera's noise filter is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `noiseFilter` - Whether the noise filter is enabled."] pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Synchronizes the specified cameras' vsync timing."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select1` - First camera."] -#[doc = "* `select2` - Second camera."] - + #[doc = "Synchronizes the specified cameras' vsync timing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select1` - First camera."] + #[doc = "* `select2` - Second camera."] pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timing` - Pointer to write timing data to. (size \"past * sizeof(s64)\")"] -#[doc = "* `port` - Port to use."] -#[doc = "* `past` - Number of past timings to retrieve."] - + #[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timing` - Pointer to write timing data to. (size \"past * sizeof(s64)\")"] + #[doc = "* `port` - Port to use."] + #[doc = "* `past` - Number of past timings to retrieve."] pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the specified camera's stereo camera calibration data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to output the stereo camera data to."] - + #[doc = "Gets the specified camera's stereo camera calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the stereo camera data to."] pub fn CAMU_GetStereoCameraCalibrationData( data: *mut CAMU_StereoCameraCalibrationData, ) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the specified camera's stereo camera calibration data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Data to set."] - + #[doc = "Sets the specified camera's stereo camera calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Data to set."] pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to the specified I2C register of the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to write to."] -#[doc = "* `addr` - Address to write to."] -#[doc = "* `data` - Data to write."] - + #[doc = "Writes to the specified I2C register of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to write to."] + #[doc = "* `addr` - Address to write to."] + #[doc = "* `data` - Data to write."] pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to the specified MCU variable of the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to write to."] -#[doc = "* `addr` - Address to write to."] -#[doc = "* `data` - Data to write."] - + #[doc = "Writes to the specified MCU variable of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to write to."] + #[doc = "* `addr` - Address to write to."] + #[doc = "* `data` - Data to write."] pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Reads the specified I2C register of the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to read data to."] -#[doc = "* `select` - Camera to read from."] -#[doc = "* `addr` - Address to read."] - + #[doc = "Reads the specified I2C register of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to read data to."] + #[doc = "* `select` - Camera to read from."] + #[doc = "* `addr` - Address to read."] pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Reads the specified MCU variable of the specified camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to read data to."] -#[doc = "* `select` - Camera to read from."] -#[doc = "* `addr` - Address to read."] - + #[doc = "Reads the specified MCU variable of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to read data to."] + #[doc = "* `select` - Camera to read from."] + #[doc = "* `addr` - Address to read."] pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the specified camera's image quality calibration data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Data to set."] - + #[doc = "Sets the specified camera's image quality calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Data to set."] pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the specified camera's image quality calibration data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to write the quality data to."] - + #[doc = "Gets the specified camera's image quality calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to write the quality data to."] pub fn CAMU_GetImageQualityCalibrationData( data: *mut CAMU_ImageQualityCalibrationData, ) -> Result; } extern "C" { #[must_use] -#[doc = "Configures a camera with pre-packaged configuration data without a context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `Parameter` - to use."] - + #[doc = "Configures a camera with pre-packaged configuration data without a context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Parameter` - to use."] pub fn CAMU_SetPackageParameterWithoutContext( param: CAMU_PackageParameterCameraSelect, ) -> Result; } extern "C" { #[must_use] -#[doc = "Configures a camera with pre-packaged configuration data with a context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `Parameter` - to use."] - + #[doc = "Configures a camera with pre-packaged configuration data with a context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Parameter` - to use."] pub fn CAMU_SetPackageParameterWithContext(param: CAMU_PackageParameterContext) -> Result; } extern "C" { #[must_use] -#[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `Parameter` - to use."] - + #[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Parameter` - to use."] pub fn CAMU_SetPackageParameterWithContextDetail( param: CAMU_PackageParameterContextDetail, ) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the Y2R coefficient applied to image data by the camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `coefficient` - Pointer to output the Y2R coefficient to."] - + #[doc = "Gets the Y2R coefficient applied to image data by the camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficient` - Pointer to output the Y2R coefficient to."] pub fn CAMU_GetSuitableY2rStandardCoefficient( coefficient: *mut Y2RU_StandardCoefficient, ) -> Result; } extern "C" { #[must_use] -#[doc = "Plays the specified shutter sound."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sound` - Shutter sound to play."] - + #[doc = "Plays the specified shutter sound."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sound` - Shutter sound to play."] pub fn CAMU_PlayShutterSound(sound: CAMU_ShutterSoundType) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the camera driver."] -#[doc = ""] - + #[doc = "Initializes the camera driver."] + #[doc = ""] pub fn CAMU_DriverInitialize() -> Result; } extern "C" { #[must_use] -#[doc = "Finalizes the camera driver."] -#[doc = ""] - + #[doc = "Finalizes the camera driver."] + #[doc = ""] pub fn CAMU_DriverFinalize() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current activated camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Pointer to output the current activated camera to."] - + #[doc = "Gets the current activated camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Pointer to output the current activated camera to."] pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current sleep camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Pointer to output the current sleep camera to."] - + #[doc = "Gets the current sleep camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Pointer to output the current sleep camera to."] pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current sleep camera."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `select` - Camera to set."] - + #[doc = "Sets the current sleep camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to set."] pub fn CAMU_SetSleepCamera(select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `brightnessSynchronization` - Whether to enable brightness synchronization."] - + #[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `brightnessSynchronization` - Whether to enable brightness synchronization."] pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes CFGNOR."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Unknown, usually 1."] - + #[doc = "Initializes CFGNOR."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Unknown, usually 1."] pub fn cfgnorInit(value: u8_) -> Result; } extern "C" { -#[doc = "Exits CFGNOR"] -#[doc = ""] - + #[doc = "Exits CFGNOR"] + #[doc = ""] pub fn cfgnorExit(); } extern "C" { #[must_use] -#[doc = "Dumps the NOR flash."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Buffer to dump to."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Dumps the NOR flash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to dump to."] + #[doc = "* `size` - Size of the buffer."] pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the NOR flash."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Buffer to write from."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Writes the NOR flash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to write from."] + #[doc = "* `size` - Size of the buffer."] pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CFGNOR session."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Unknown, usually 1."] - + #[doc = "Initializes the CFGNOR session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Unknown, usually 1."] pub fn CFGNOR_Initialize(value: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Shuts down the CFGNOR session."] -#[doc = ""] - + #[doc = "Shuts down the CFGNOR session."] + #[doc = ""] pub fn CFGNOR_Shutdown() -> Result; } extern "C" { #[must_use] -#[doc = "Reads data from NOR."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `offset` - Offset to read from."] -#[doc = "* `buf` - Buffer to read data to."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Reads data from NOR."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `buf` - Buffer to read data to."] + #[doc = "* `size` - Size of the buffer."] pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes data to NOR."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `offset` - Offset to write to."] -#[doc = "* `buf` - Buffer to write data from."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Writes data to NOR."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `buf` - Buffer to write data from."] + #[doc = "* `size` - Size of the buffer."] pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } #[doc = "Japan"] @@ -15259,274 +14184,245 @@ pub const CFG_MODEL_N2DSXL: CFG_SystemModel = 5; pub type CFG_SystemModel = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes CFGU."] -#[doc = ""] - + #[doc = "Initializes CFGU."] + #[doc = ""] pub fn cfguInit() -> Result; } extern "C" { -#[doc = "Exits CFGU."] -#[doc = ""] - + #[doc = "Exits CFGU."] + #[doc = ""] pub fn cfguExit(); } extern "C" { #[must_use] -#[doc = "Gets the system's region from secure info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `region` - Pointer to output the region to. (see @ref CFG_Region)"] - + #[doc = "Gets the system's region from secure info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `region` - Pointer to output the region to. (see @ref CFG_Region)"] pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Generates a console-unique hash."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `appIDSalt` - Salt to use."] -#[doc = "* `hash` - Pointer to output the hash to."] - + #[doc = "Generates a console-unique hash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appIDSalt` - Salt to use."] + #[doc = "* `hash` - Pointer to output the hash to."] pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the system's region is Canada or USA."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Pointer to output the result to. (0 = no, 1 = yes)"] - + #[doc = "Gets whether the system's region is Canada or USA."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Pointer to output the result to. (0 = no, 1 = yes)"] pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's model."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `model` - Pointer to output the model to. (see @ref CFG_SystemModel)"] - + #[doc = "Gets the system's model."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `model` - Pointer to output the model to. (see @ref CFG_SystemModel)"] pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the system is a 2DS."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Pointer to output the result to. (0 = yes, 1 = no)"] - + #[doc = "Gets whether the system is a 2DS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Pointer to output the result to. (0 = yes, 1 = no)"] pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a string representing a country code."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `code` - Country code to use."] -#[doc = "* `string` - Pointer to output the string to."] - + #[doc = "Gets a string representing a country code."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `code` - Country code to use."] + #[doc = "* `string` - Pointer to output the string to."] pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a country code ID from its string."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `string` - String to use."] -#[doc = "* `code` - Pointer to output the country code to."] - + #[doc = "Gets a country code ID from its string."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `string` - String to use."] + #[doc = "* `code` - Pointer to output the country code to."] pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if NFC (code name: fangate) is supported."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `isSupported` - pointer to the output the result to."] - + #[doc = "Checks if NFC (code name: fangate) is supported."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `isSupported` - pointer to the output the result to."] pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a config info block with flags = 2."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the data to retrieve."] -#[doc = "* `blkID` - ID of the block to retrieve."] -#[doc = "* `outData` - Pointer to write the block data to."] - + #[doc = "Gets a config info block with flags = 2."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `outData` - Pointer to write the block data to."] pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a config info block with flags = 4."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the data to retrieve."] -#[doc = "* `blkID` - ID of the block to retrieve."] -#[doc = "* `outData` - Pointer to write the block data to."] - + #[doc = "Gets a config info block with flags = 4."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `outData` - Pointer to write the block data to."] pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a config info block with flags = 8."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the data to retrieve."] -#[doc = "* `blkID` - ID of the block to retrieve."] -#[doc = "* `outData` - Pointer to write the block data to."] - + #[doc = "Gets a config info block with flags = 8."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `outData` - Pointer to write the block data to."] pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a config info block with flags = 4."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the data to retrieve."] -#[doc = "* `blkID` - ID of the block to retrieve."] -#[doc = "* `inData` - Pointer to block data to write."] - + #[doc = "Sets a config info block with flags = 4."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `inData` - Pointer to block data to write."] pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a config info block with flags = 8."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the data to retrieve."] -#[doc = "* `blkID` - ID of the block to retrieve."] -#[doc = "* `inData` - Pointer to block data to write."] - + #[doc = "Sets a config info block with flags = 8."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `inData` - Pointer to block data to write."] pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the CFG buffer in memory to the savegame in NAND."] -#[doc = ""] - + #[doc = "Writes the CFG buffer in memory to the savegame in NAND."] + #[doc = ""] pub fn CFG_UpdateConfigSavegame() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's language."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `language` - Pointer to write the language to. (see @ref CFG_Language)"] - + #[doc = "Gets the system's language."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `language` - Pointer to write the language to. (see @ref CFG_Language)"] pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] -#[doc = ""] - + #[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] + #[doc = ""] pub fn CFGI_RestoreLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] -#[doc = ""] - + #[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] + #[doc = ""] pub fn CFGI_RestoreSecureInfo() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] -#[doc = ""] - + #[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] + #[doc = ""] pub fn CFGI_DeleteConfigSavefile() -> Result; } extern "C" { #[must_use] -#[doc = "Formats Config_Savegame."] -#[doc = ""] - + #[doc = "Formats Config_Savegame."] + #[doc = ""] pub fn CFGI_FormatConfig() -> Result; } extern "C" { #[must_use] -#[doc = "Clears parental controls"] -#[doc = ""] - + #[doc = "Clears parental controls"] + #[doc = ""] pub fn CFGI_ClearParentalControls() -> Result; } extern "C" { #[must_use] -#[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] -#[doc = ""] - + #[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] + #[doc = ""] pub fn CFGI_VerifySigLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] -#[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] -#[doc = ""] - + #[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] + #[doc = ""] pub fn CFGI_VerifySigSecureInfo() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's serial number."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `serial` - Pointer to output the serial to. (This is normally 0xF)"] - + #[doc = "Gets the system's serial number."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `serial` - Pointer to output the serial to. (This is normally 0xF)"] pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] - + #[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 64-bit local friend code seed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `seed` - Pointer to write the friend code seed to."] - + #[doc = "Gets the 64-bit local friend code seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to write the friend code seed to."] pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 0x11-byte data following the SecureInfo signature."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] - + #[doc = "Gets the 0x11-byte data following the SecureInfo signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] - + #[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result; } #[doc = "PCM8"] @@ -15667,46 +14563,37 @@ pub const DutyCycle_87: CSND_DutyCycle = 6; pub type CSND_DutyCycle = ::libc::c_uint; #[doc = "Channel info."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub union CSND_ChnInfo { -#[doc = "Raw values."] -#[doc = ""] - + #[doc = "Raw values."] + #[doc = ""] pub value: [u32_; 3usize], pub __bindgen_anon_1: CSND_ChnInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_ChnInfo__bindgen_ty_1 { -#[doc = "Channel active."] -#[doc = ""] - + #[doc = "Channel active."] + #[doc = ""] pub active: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad1: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad2: u16_, -#[doc = "Current ADPCM sample."] -#[doc = ""] - + #[doc = "Current ADPCM sample."] + #[doc = ""] pub adpcmSample: s16, -#[doc = "Current ADPCM index."] -#[doc = ""] - + #[doc = "Current ADPCM index."] + #[doc = ""] pub adpcmIndex: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad3: u8_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknownZero: u32_, } impl Default for CSND_ChnInfo { @@ -15720,34 +14607,28 @@ impl Default for CSND_ChnInfo { } #[doc = "Capture info."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub union CSND_CapInfo { -#[doc = "Raw values."] -#[doc = ""] - + #[doc = "Raw values."] + #[doc = ""] pub value: [u32_; 2usize], pub __bindgen_anon_1: CSND_CapInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_CapInfo__bindgen_ty_1 { -#[doc = "Capture active."] -#[doc = ""] - + #[doc = "Capture active."] + #[doc = ""] pub active: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad1: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad2: u16_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknownZero: u32_, } impl Default for CSND_CapInfo { @@ -15760,242 +14641,217 @@ impl Default for CSND_CapInfo { } } extern "C" { -#[doc = "CSND shared memory."] -#[doc = ""] - + #[doc = "CSND shared memory."] + #[doc = ""] pub static mut csndSharedMem: *mut vu32; } extern "C" { -#[doc = "CSND shared memory size."] -#[doc = ""] - + #[doc = "CSND shared memory size."] + #[doc = ""] pub static mut csndSharedMemSize: u32_; } extern "C" { -#[doc = "Bitmask of channels that are allowed for usage."] -#[doc = ""] - + #[doc = "Bitmask of channels that are allowed for usage."] + #[doc = ""] pub static mut csndChannels: u32_; } extern "C" { #[must_use] -#[doc = "Acquires a capture unit."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Pointer to output the capture unit to."] - + #[doc = "Acquires a capture unit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Pointer to output the capture unit to."] pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Releases a capture unit."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to release."] - + #[doc = "Releases a capture unit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to release."] pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes the data cache of a memory region."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `adr` - Address of the memory region."] -#[doc = "* `size` - Size of the memory region."] - + #[doc = "Flushes the data cache of a memory region."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address of the memory region."] + #[doc = "* `size` - Size of the memory region."] pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Stores the data cache of a memory region."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `adr` - Address of the memory region."] -#[doc = "* `size` - Size of the memory region."] - + #[doc = "Stores the data cache of a memory region."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address of the memory region."] + #[doc = "* `size` - Size of the memory region."] pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates the data cache of a memory region."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `adr` - Address of the memory region."] -#[doc = "* `size` - Size of the memory region."] - + #[doc = "Invalidates the data cache of a memory region."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address of the memory region."] + #[doc = "* `size` - Size of the memory region."] pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Resets CSND."] -#[doc = ""] -#[doc = "Note: Currently breaks sound, don't use for now!"] -#[doc = ""] - + #[doc = "Resets CSND."] + #[doc = ""] + #[doc = "Note: Currently breaks sound, don't use for now!"] + #[doc = ""] pub fn CSND_Reset() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes CSND."] -#[doc = ""] - + #[doc = "Initializes CSND."] + #[doc = ""] pub fn csndInit() -> Result; } extern "C" { -#[doc = "Exits CSND."] -#[doc = ""] - + #[doc = "Exits CSND."] + #[doc = ""] pub fn csndExit(); } extern "C" { -#[doc = "Adds a command to the list, returning a buffer to write arguments to."] -#[doc = ""] -#[doc = "Returns: A buffer to write command arguments to."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cmdid` - ID of the command to add."] - + #[doc = "Adds a command to the list, returning a buffer to write arguments to."] + #[doc = ""] + #[doc = "Returns: A buffer to write command arguments to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cmdid` - ID of the command to add."] pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32_; } extern "C" { -#[doc = "Adds a command to the list, copying its arguments from a buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cmdid` - ID of the command to add."] -#[doc = "* `cmdparams` - Buffer containing the command's parameters."] - + #[doc = "Adds a command to the list, copying its arguments from a buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cmdid` - ID of the command to add."] + #[doc = "* `cmdparams` - Buffer containing the command's parameters."] pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_); } extern "C" { #[must_use] -#[doc = "Executes pending CSND commands."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `waitDone` - Whether to wait until the commands have finished executing."] - + #[doc = "Executes pending CSND commands."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `waitDone` - Whether to wait until the commands have finished executing."] pub fn csndExecCmds(waitDone: bool) -> Result; } extern "C" { -#[doc = "Sets a channel's play state, resetting registers on stop."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `value` - Play state to set."] - + #[doc = "Sets a channel's play state, resetting registers on stop."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Play state to set."] pub fn CSND_SetPlayStateR(channel: u32_, value: u32_); } extern "C" { -#[doc = "Sets a channel's play state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `value` - Play state to set."] - + #[doc = "Sets a channel's play state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Play state to set."] pub fn CSND_SetPlayState(channel: u32_, value: u32_); } -extern "C" { -#[doc = "Sets a channel's encoding."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `value` - Encoding to set."] - +extern "C" { + #[doc = "Sets a channel's encoding."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Encoding to set."] pub fn CSND_SetEncoding(channel: u32_, value: u32_); } extern "C" { -#[doc = "Sets the data of a channel's block."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `block` - Block to set."] -#[doc = "* `physaddr` - Physical address to set the block to."] -#[doc = "* `size` - Size of the block."] - + #[doc = "Sets the data of a channel's block."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `block` - Block to set."] + #[doc = "* `physaddr` - Physical address to set the block to."] + #[doc = "* `size` - Size of the block."] pub fn CSND_SetBlock(channel: u32_, block: ::libc::c_int, physaddr: u32_, size: u32_); } extern "C" { -#[doc = "Sets whether to loop a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `value` - Whether to loop the channel."] - + #[doc = "Sets whether to loop a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Whether to loop the channel."] pub fn CSND_SetLooping(channel: u32_, value: u32_); } extern "C" { -#[doc = "Sets bit 7 of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `set` - Value to set."] - + #[doc = "Sets bit 7 of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `set` - Value to set."] pub fn CSND_SetBit7(channel: u32_, set: bool); } extern "C" { -#[doc = "Sets whether a channel should use interpolation."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `interp` - Whether to use interpolation."] - + #[doc = "Sets whether a channel should use interpolation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `interp` - Whether to use interpolation."] pub fn CSND_SetInterp(channel: u32_, interp: bool); } extern "C" { -#[doc = "Sets a channel's duty."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `duty` - Duty to set."] - + #[doc = "Sets a channel's duty."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `duty` - Duty to set."] pub fn CSND_SetDuty(channel: u32_, duty: CSND_DutyCycle); } extern "C" { -#[doc = "Sets a channel's timer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `timer` - Timer to set."] - + #[doc = "Sets a channel's timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `timer` - Timer to set."] pub fn CSND_SetTimer(channel: u32_, timer: u32_); } extern "C" { -#[doc = "Sets a channel's volume."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `chnVolumes` - Channel volume data to set."] -#[doc = "* `capVolumes` - Capture volume data to set."] - + #[doc = "Sets a channel's volume."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `chnVolumes` - Channel volume data to set."] + #[doc = "* `capVolumes` - Capture volume data to set."] pub fn CSND_SetVol(channel: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { -#[doc = "Sets a channel's ADPCM state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `block` - Current block."] -#[doc = "* `sample` - Current sample."] -#[doc = "* `index` - Current index."] - + #[doc = "Sets a channel's ADPCM state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `block` - Current block."] + #[doc = "* `sample` - Current sample."] + #[doc = "* `index` - Current index."] pub fn CSND_SetAdpcmState( channel: u32_, block: ::libc::c_int, @@ -16004,27 +14860,25 @@ extern "C" { ); } extern "C" { -#[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to use."] -#[doc = "* `reload` - Whether to reload ADPCM data."] - + #[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `reload` - Whether to reload ADPCM data."] pub fn CSND_SetAdpcmReload(channel: u32_, reload: bool); } extern "C" { -#[doc = "Sets CSND's channel registers."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flags` - Flags to set."] -#[doc = "* `physaddr0` - Physical address of the first buffer to play."] -#[doc = "* `physaddr1` - Physical address of the second buffer to play."] -#[doc = "* `totalbytesize` - Total size of the data to play."] -#[doc = "* `chnVolumes` - Channel volume data."] -#[doc = "* `capVolumes` - Capture volume data."] - + #[doc = "Sets CSND's channel registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to set."] + #[doc = "* `physaddr0` - Physical address of the first buffer to play."] + #[doc = "* `physaddr1` - Physical address of the second buffer to play."] + #[doc = "* `totalbytesize` - Total size of the data to play."] + #[doc = "* `chnVolumes` - Channel volume data."] + #[doc = "* `capVolumes` - Capture volume data."] pub fn CSND_SetChnRegs( flags: u32_, physaddr0: u32_, @@ -16035,15 +14889,14 @@ extern "C" { ); } extern "C" { -#[doc = "Sets CSND's PSG channel registers."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flags` - Flags to set."] -#[doc = "* `chnVolumes` - Channel volume data."] -#[doc = "* `capVolumes` - Capture volume data."] -#[doc = "* `duty` - Duty value to set."] - + #[doc = "Sets CSND's PSG channel registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to set."] + #[doc = "* `chnVolumes` - Channel volume data."] + #[doc = "* `capVolumes` - Capture volume data."] + #[doc = "* `duty` - Duty value to set."] pub fn CSND_SetChnRegsPSG( flags: u32_, chnVolumes: u32_, @@ -16052,127 +14905,116 @@ extern "C" { ); } extern "C" { -#[doc = "Sets CSND's noise channel registers."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flags` - Flags to set."] -#[doc = "* `chnVolumes` - Channel volume data."] -#[doc = "* `capVolumes` - Capture volume data."] - + #[doc = "Sets CSND's noise channel registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to set."] + #[doc = "* `chnVolumes` - Channel volume data."] + #[doc = "* `capVolumes` - Capture volume data."] pub fn CSND_SetChnRegsNoise(flags: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { -#[doc = "Sets whether a capture unit is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to use."] -#[doc = "* `enable` - Whether to enable the capture unit."] - + #[doc = "Sets whether a capture unit is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `enable` - Whether to enable the capture unit."] pub fn CSND_CapEnable(capUnit: u32_, enable: bool); } extern "C" { -#[doc = "Sets whether a capture unit should repeat."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to use."] -#[doc = "* `repeat` - Whether the capture unit should repeat."] - + #[doc = "Sets whether a capture unit should repeat."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `repeat` - Whether the capture unit should repeat."] pub fn CSND_CapSetRepeat(capUnit: u32_, repeat: bool); } extern "C" { -#[doc = "Sets a capture unit's format."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to use."] -#[doc = "* `eightbit` - Format to use."] - + #[doc = "Sets a capture unit's format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `eightbit` - Format to use."] pub fn CSND_CapSetFormat(capUnit: u32_, eightbit: bool); } extern "C" { -#[doc = "Sets a capture unit's second bit."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to use."] -#[doc = "* `set` - Value to set."] - + #[doc = "Sets a capture unit's second bit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `set` - Value to set."] pub fn CSND_CapSetBit2(capUnit: u32_, set: bool); } extern "C" { -#[doc = "Sets a capture unit's timer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to use."] -#[doc = "* `timer` - Timer to set."] - + #[doc = "Sets a capture unit's timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `timer` - Timer to set."] pub fn CSND_CapSetTimer(capUnit: u32_, timer: u32_); } extern "C" { -#[doc = "Sets a capture unit's buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to use."] -#[doc = "* `addr` - Buffer address to use."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Sets a capture unit's buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `addr` - Buffer address to use."] + #[doc = "* `size` - Size of the buffer."] pub fn CSND_CapSetBuffer(capUnit: u32_, addr: u32_, size: u32_); } extern "C" { -#[doc = "Sets a capture unit's capture registers."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to use."] -#[doc = "* `flags` - Capture unit flags."] -#[doc = "* `addr` - Capture unit buffer address."] -#[doc = "* `size` - Buffer size."] - + #[doc = "Sets a capture unit's capture registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `flags` - Capture unit flags."] + #[doc = "* `addr` - Capture unit buffer address."] + #[doc = "* `size` - Buffer size."] pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_); } extern "C" { #[must_use] -#[doc = "Sets up DSP flags."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `waitDone` - Whether to wait for completion."] - + #[doc = "Sets up DSP flags."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `waitDone` - Whether to wait for completion."] pub fn CSND_SetDspFlags(waitDone: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Updates CSND information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `waitDone` - Whether to wait for completion."] - + #[doc = "Updates CSND information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `waitDone` - Whether to wait for completion."] pub fn CSND_UpdateInfo(waitDone: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Plays a sound."] -#[doc = ""] -#[doc = ""] -#[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `chn` - Channel to play the sound on."] -#[doc = "* `flags` - Flags containing information about the sound."] -#[doc = "* `sampleRate` - Sample rate of the sound."] -#[doc = "* `vol` - The volume, ranges from 0.0 to 1.0 included."] -#[doc = "* `pan` - The pan, ranges from -1.0 to 1.0 included."] -#[doc = "* `data0` - First block of sound data."] -#[doc = "* `data1` - Second block of sound data. This is the block that will be looped over."] -#[doc = "* `size` - Size of the sound data."] - + #[doc = "Plays a sound."] + #[doc = ""] + #[doc = ""] + #[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `chn` - Channel to play the sound on."] + #[doc = "* `flags` - Flags containing information about the sound."] + #[doc = "* `sampleRate` - Sample rate of the sound."] + #[doc = "* `vol` - The volume, ranges from 0.0 to 1.0 included."] + #[doc = "* `pan` - The pan, ranges from -1.0 to 1.0 included."] + #[doc = "* `data0` - First block of sound data."] + #[doc = "* `data1` - Second block of sound data. This is the block that will be looped over."] + #[doc = "* `size` - Size of the sound data."] pub fn csndPlaySound( chn: ::libc::c_int, flags: u32_, @@ -16185,63 +15027,58 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Gets CSND's DSP flags."] -#[doc = ""] -#[doc = "Note: Requires previous CSND_UpdateInfo()"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `outSemFlags` - Pointer to write semaphore flags to."] -#[doc = "* `outIrqFlags` - Pointer to write interrupt flags to."] - + #[doc = "Gets CSND's DSP flags."] + #[doc = ""] + #[doc = "Note: Requires previous CSND_UpdateInfo()"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outSemFlags` - Pointer to write semaphore flags to."] + #[doc = "* `outIrqFlags` - Pointer to write interrupt flags to."] pub fn csndGetDspFlags(outSemFlags: *mut u32_, outIrqFlags: *mut u32_); } extern "C" { -#[doc = "Gets a channel's information."] -#[doc = ""] -#[doc = "Note: Requires previous CSND_UpdateInfo()"] -#[doc = ""] -#[doc = "Returns: The channel's information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to get information for."] - + #[doc = "Gets a channel's information."] + #[doc = ""] + #[doc = "Note: Requires previous CSND_UpdateInfo()"] + #[doc = ""] + #[doc = "Returns: The channel's information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to get information for."] pub fn csndGetChnInfo(channel: u32_) -> *mut CSND_ChnInfo; } extern "C" { -#[doc = "Gets a capture unit's information."] -#[doc = ""] -#[doc = "Note: Requires previous CSND_UpdateInfo()"] -#[doc = ""] -#[doc = "Returns: The capture unit's information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capUnit` - Capture unit to get information for."] - + #[doc = "Gets a capture unit's information."] + #[doc = ""] + #[doc = "Note: Requires previous CSND_UpdateInfo()"] + #[doc = ""] + #[doc = "Returns: The capture unit's information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to get information for."] pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo; } extern "C" { #[must_use] -#[doc = "Gets a channel's state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to get the state of."] -#[doc = "* `out` - Pointer to output channel information to."] - + #[doc = "Gets a channel's state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to get the state of."] + #[doc = "* `out` - Pointer to output channel information to."] pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether a channel is playing."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Channel to check."] -#[doc = "* `status` - Pointer to output the channel status to."] - + #[doc = "Gets whether a channel is playing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to check."] + #[doc = "* `status` - Pointer to output the channel status to."] pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result; } #[doc = "Pipe interrupt."] @@ -16274,17 +15111,14 @@ pub type DSP_HookType = ::libc::c_uint; pub type dspHookFn = ::core::option::Option; #[doc = "DSP hook cookie."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_dspHookCookie { -#[doc = "Next cookie."] -#[doc = ""] - + #[doc = "Next cookie."] + #[doc = ""] pub next: *mut tag_dspHookCookie, -#[doc = "Hook callback."] -#[doc = ""] - + #[doc = "Hook callback."] + #[doc = ""] pub callback: dspHookFn, } impl Default for tag_dspHookCookie { @@ -16302,128 +15136,116 @@ impl Default for tag_dspHookCookie { pub type dspHookCookie = tag_dspHookCookie; extern "C" { #[must_use] -#[doc = "Initializes the dsp service."] -#[doc = ""] -#[doc = ""] -#[doc = "Call this before calling any DSP_* function."] -#[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] -#[doc = ""] - + #[doc = "Initializes the dsp service."] + #[doc = ""] + #[doc = ""] + #[doc = "Call this before calling any DSP_* function."] + #[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] + #[doc = ""] pub fn dspInit() -> Result; } extern "C" { -#[doc = "Closes the dsp service."] -#[doc = ""] - + #[doc = "Closes the dsp service."] + #[doc = ""] pub fn dspExit(); } extern "C" { -#[doc = "Returns true if a component is loaded, false otherwise."] -#[doc = ""] - + #[doc = "Returns true if a component is loaded, false otherwise."] + #[doc = ""] pub fn dspIsComponentLoaded() -> bool; } extern "C" { -#[doc = "Sets up a DSP status hook."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cookie` - Hook cookie to use."] -#[doc = "* `callback` - Function to call when DSP's status changes."] - + #[doc = "Sets up a DSP status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to use."] + #[doc = "* `callback` - Function to call when DSP's status changes."] pub fn dspHook(cookie: *mut dspHookCookie, callback: dspHookFn); } extern "C" { -#[doc = "Removes a DSP status hook."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cookie` - Hook cookie to remove."] - + #[doc = "Removes a DSP status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to remove."] pub fn dspUnhook(cookie: *mut dspHookCookie); } extern "C" { #[must_use] -#[doc = "Checks if a headphone is inserted."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `is_inserted` - Pointer to output the insertion status to."] - + #[doc = "Checks if a headphone is inserted."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_inserted` - Pointer to output the insertion status to."] pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes the cache"] -#[doc = ""] -#[doc = ""] -#[doc = "Flushes the cache for the specified memory range and invalidates the cache"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] -#[doc = "* `size` - Size of the memory range to flush"] - + #[doc = "Flushes the cache"] + #[doc = ""] + #[doc = ""] + #[doc = "Flushes the cache for the specified memory range and invalidates the cache"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] + #[doc = "* `size` - Size of the memory range to flush"] pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates the cache"] -#[doc = ""] -#[doc = ""] -#[doc = "Invalidates the cache for the specified memory range"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] -#[doc = "* `size` - Size of the memory range to flush"] - + #[doc = "Invalidates the cache"] + #[doc = ""] + #[doc = ""] + #[doc = "Invalidates the cache for the specified memory range"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] + #[doc = "* `size` - Size of the memory range to flush"] pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves the handle of the DSP semaphore."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `semaphore` - Pointer to output the semaphore to."] - + #[doc = "Retrieves the handle of the DSP semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to output the semaphore to."] pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the DSP hardware semaphore value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Value to set."] - + #[doc = "Sets the DSP hardware semaphore value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Value to set."] pub fn DSP_SetSemaphore(value: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Masks the DSP hardware semaphore value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mask` - Mask to apply."] - + #[doc = "Masks the DSP hardware semaphore value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mask` - Mask to apply."] pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Loads a DSP binary and starts the DSP"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `component` - The program file address in memory"] -#[doc = "* `size` - The size of the program"] -#[doc = "* `prog_mask` - DSP memory block related ? Default is 0xff."] -#[doc = "* `data_mask` - DSP memory block related ? Default is 0xff."] -#[doc = "* `is_loaded` - Indicates if the DSP was succesfully loaded."] - + #[doc = "Loads a DSP binary and starts the DSP"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `component` - The program file address in memory"] + #[doc = "* `size` - The size of the program"] + #[doc = "* `prog_mask` - DSP memory block related ? Default is 0xff."] + #[doc = "* `data_mask` - DSP memory block related ? Default is 0xff."] + #[doc = "* `is_loaded` - Indicates if the DSP was succesfully loaded."] pub fn DSP_LoadComponent( component: *const ::libc::c_void, size: u32_, @@ -16434,37 +15256,34 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Stops the DSP by unloading the binary."] -#[doc = ""] - + #[doc = "Stops the DSP by unloading the binary."] + #[doc = ""] pub fn DSP_UnloadComponent() -> Result; } extern "C" { #[must_use] -#[doc = "Registers an event handle with the DSP through IPC"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Event handle to register."] -#[doc = "* `interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] -#[doc = "* `channel` - The pipe channel. Usual value is 2"] - + #[doc = "Registers an event handle with the DSP through IPC"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Event handle to register."] + #[doc = "* `interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] + #[doc = "* `channel` - The pipe channel. Usual value is 2"] pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Reads a pipe if possible."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - unknown. Usually 2"] -#[doc = "* `peer` - unknown. Usually 0"] -#[doc = "* `buffer` - The buffer that will store the values read from the pipe"] -#[doc = "* `length` - Length of the buffer"] -#[doc = "* `length_read` - Number of bytes read by the command"] - + #[doc = "Reads a pipe if possible."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - unknown. Usually 2"] + #[doc = "* `peer` - unknown. Usually 0"] + #[doc = "* `buffer` - The buffer that will store the values read from the pipe"] + #[doc = "* `length` - Length of the buffer"] + #[doc = "* `length_read` - Number of bytes read by the command"] pub fn DSP_ReadPipeIfPossible( channel: u32_, peer: u32_, @@ -16475,14 +15294,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a pipe."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - unknown. Usually 2"] -#[doc = "* `buffer` - The message to send to the DSP process"] -#[doc = "* `length` - Length of the message"] - + #[doc = "Writes to a pipe."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - unknown. Usually 2"] + #[doc = "* `buffer` - The message to send to the DSP process"] + #[doc = "* `length` - Length of the message"] pub fn DSP_WriteProcessPipe( channel: u32_, buffer: *const ::libc::c_void, @@ -16491,13 +15309,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Converts a DSP memory address to a virtual address usable by the process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dsp_address` - Address to convert."] -#[doc = "* `arm_address` - Pointer to output the converted address to."] - + #[doc = "Converts a DSP memory address to a virtual address usable by the process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dsp_address` - Address to convert."] + #[doc = "* `arm_address` - Pointer to output the converted address to."] pub fn DSP_ConvertProcessAddressFromDspDram( dsp_address: u32_, arm_address: *mut u32_, @@ -16505,50 +15322,46 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads a DSP register"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "* `value` - Pointer to read the register value to."] - + #[doc = "Reads a DSP register"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `value` - Pointer to read the register value to."] pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if you can read a DSP register"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "* `is_ready` - Pointer to write the ready status to."] - + #[doc = "Checks if you can read a DSP register"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `is_ready` - Pointer to write the ready status to."] pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to a DSP register"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "* `value` - Value to write."] - + #[doc = "Writes to a DSP register"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `value` - Value to write."] pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if you can write to a DSP register ?"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "* `is_empty` - Pointer to write the empty status to."] - + #[doc = "Checks if you can write to a DSP register ?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `is_empty` - Pointer to write the empty status to."] pub fn DSP_SendDataIsEmpty(regNo: u16_, is_empty: *mut bool) -> Result; } pub type FSPXI_Archive = u64_; @@ -16556,16 +15369,15 @@ pub type FSPXI_File = u64_; pub type FSPXI_Directory = u64_; extern "C" { #[must_use] -#[doc = "Opens a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the file handle to."] -#[doc = "* `archive` - Archive containing the file."] -#[doc = "* `path` - Path of the file."] -#[doc = "* `flags` - Flags to open the file with."] -#[doc = "* `attributes` - Attributes of the file."] - + #[doc = "Opens a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the file handle to."] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `flags` - Flags to open the file with."] + #[doc = "* `attributes` - Attributes of the file."] pub fn FSPXI_OpenFile( serviceHandle: Handle, out: *mut FSPXI_File, @@ -16577,27 +15389,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive containing the file."] -#[doc = "* `path` - Path of the file."] - + #[doc = "Deletes a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Renames a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `srcArchive` - Archive containing the source file."] -#[doc = "* `srcPath` - Path of the source file."] -#[doc = "* `dstArchive` - Archive containing the destination file."] -#[doc = "* `dstPath` - Path of the destination file."] - + #[doc = "Renames a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source file."] + #[doc = "* `srcPath` - Path of the source file."] + #[doc = "* `dstArchive` - Archive containing the destination file."] + #[doc = "* `dstPath` - Path of the destination file."] pub fn FSPXI_RenameFile( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -16608,13 +15418,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive containing the directory."] -#[doc = "* `path` - Path of the directory."] - + #[doc = "Deletes a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] pub fn FSPXI_DeleteDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16623,15 +15432,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to create the file in."] -#[doc = "* `path` - Path of the file."] -#[doc = "* `attributes` - Attributes of the file."] -#[doc = "* `size` - Size of the file."] - + #[doc = "Creates a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the file in."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `attributes` - Attributes of the file."] + #[doc = "* `size` - Size of the file."] pub fn FSPXI_CreateFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16642,14 +15450,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to create the directory in."] -#[doc = "* `path` - Path of the directory."] -#[doc = "* `attributes` - Attributes of the directory."] - + #[doc = "Creates a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the directory in."] + #[doc = "* `path` - Path of the directory."] + #[doc = "* `attributes` - Attributes of the directory."] pub fn FSPXI_CreateDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16659,15 +15466,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Renames a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `srcArchive` - Archive containing the source directory."] -#[doc = "* `srcPath` - Path of the source directory."] -#[doc = "* `dstArchive` - Archive containing the destination directory."] -#[doc = "* `dstPath` - Path of the destination directory."] - + #[doc = "Renames a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source directory."] + #[doc = "* `srcPath` - Path of the source directory."] + #[doc = "* `dstArchive` - Archive containing the destination directory."] + #[doc = "* `dstPath` - Path of the destination directory."] pub fn FSPXI_RenameDirectory( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -16678,14 +15484,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a directory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the directory handle to."] -#[doc = "* `archive` - Archive containing the directory."] -#[doc = "* `path` - Path of the directory."] - + #[doc = "Opens a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the directory handle to."] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] pub fn FSPXI_OpenDirectory( serviceHandle: Handle, out: *mut FSPXI_Directory, @@ -16695,16 +15500,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to read from."] -#[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] -#[doc = "* `offset` - Offset to read from."] -#[doc = "* `buffer` - Buffer to read to."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Reads from a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to read from."] + #[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `buffer` - Buffer to read to."] + #[doc = "* `size` - Size of the buffer."] pub fn FSPXI_ReadFile( serviceHandle: Handle, file: FSPXI_File, @@ -16716,14 +15520,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Calculate SHA256 of a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to calculate the hash of."] -#[doc = "* `buffer` - Buffer to output the hash to."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Calculate SHA256 of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to calculate the hash of."] + #[doc = "* `buffer` - Buffer to output the hash to."] + #[doc = "* `size` - Size of the buffer."] pub fn FSPXI_CalculateFileHashSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -16733,17 +15536,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to write to."] -#[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] -#[doc = "* `offset` - Offset to write to."] -#[doc = "* `buffer` - Buffer to write from."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `flags` - Flags to use when writing."] - + #[doc = "Writes to a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to write to."] + #[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `buffer` - Buffer to write from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `flags` - Flags to use when writing."] pub fn FSPXI_WriteFile( serviceHandle: Handle, file: FSPXI_File, @@ -16756,16 +15558,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Calculates the MAC used in a DISA/DIFF header?"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - Unsure"] -#[doc = "* `inBuffer` - 0x100-byte DISA/DIFF input buffer."] -#[doc = "* `inSize` - Size of inBuffer."] -#[doc = "* `outBuffer` - Buffer to write MAC to."] -#[doc = "* `outSize` - Size of outBuffer."] - + #[doc = "Calculates the MAC used in a DISA/DIFF header?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - Unsure"] + #[doc = "* `inBuffer` - 0x100-byte DISA/DIFF input buffer."] + #[doc = "* `inSize` - Size of inBuffer."] + #[doc = "* `outBuffer` - Buffer to write MAC to."] + #[doc = "* `outSize` - Size of outBuffer."] pub fn FSPXI_CalcSavegameMAC( serviceHandle: Handle, file: FSPXI_File, @@ -16777,47 +15578,43 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get size of a file"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to get the size of."] -#[doc = "* `size` - Pointer to output size to."] - + #[doc = "Get size of a file"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to get the size of."] + #[doc = "* `size` - Pointer to output size to."] pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Set size of a file"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to set the size of"] -#[doc = "* `size` - Size to set the file to"] - + #[doc = "Set size of a file"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to set the size of"] + #[doc = "* `size` - Size to set the file to"] pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Close a file"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to close"] - + #[doc = "Close a file"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to close"] pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result; } extern "C" { #[must_use] -#[doc = "Reads one or more directory entries."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `directory` - Directory to read from."] -#[doc = "* `entriesRead` - Pointer to output the number of entries read to."] -#[doc = "* `entryCount` - Number of entries to read."] -#[doc = "* `entryOut` - Pointer to output directory entries to."] - + #[doc = "Reads one or more directory entries."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `directory` - Directory to read from."] + #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] + #[doc = "* `entryCount` - Number of entries to read."] + #[doc = "* `entryOut` - Pointer to output directory entries to."] pub fn FSPXI_ReadDirectory( serviceHandle: Handle, directory: FSPXI_Directory, @@ -16828,24 +15625,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Close a directory"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `directory` - Directory to close."] - + #[doc = "Close a directory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `directory` - Directory to close."] pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result; } extern "C" { #[must_use] -#[doc = "Opens an archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Pointer to output the opened archive to."] -#[doc = "* `id` - ID of the archive."] -#[doc = "* `path` - Path of the archive."] - + #[doc = "Opens an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Pointer to output the opened archive to."] + #[doc = "* `id` - ID of the archive."] + #[doc = "* `path` - Path of the archive."] pub fn FSPXI_OpenArchive( serviceHandle: Handle, archive: *mut FSPXI_Archive, @@ -16855,14 +15650,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks if the archive contains a file at path."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to check."] -#[doc = "* `out` - Pointer to output existence to."] -#[doc = "* `path` - Path to check for file"] - + #[doc = "Checks if the archive contains a file at path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to check."] + #[doc = "* `out` - Pointer to output existence to."] + #[doc = "* `path` - Path to check for file"] pub fn FSPXI_HasFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16872,14 +15666,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks if the archive contains a directory at path."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to check."] -#[doc = "* `out` - Pointer to output existence to."] -#[doc = "* `path` - Path to check for directory"] - + #[doc = "Checks if the archive contains a directory at path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to check."] + #[doc = "* `out` - Pointer to output existence to."] + #[doc = "* `path` - Path to check for directory"] pub fn FSPXI_HasDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16889,34 +15682,31 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Commits an archive's save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to commit."] -#[doc = "* `id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] - + #[doc = "Commits an archive's save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to commit."] + #[doc = "* `id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Close an archive"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive to close."] - + #[doc = "Close an archive"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to close."] pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - Archive handle to check validity of."] -#[doc = "* `out` - Pointer to output validity to."] - + #[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive handle to check validity of."] + #[doc = "* `out` - Pointer to output validity to."] pub fn FSPXI_Unknown0x17( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16925,22 +15715,20 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the inserted card type."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the card type to."] - + #[doc = "Gets the inserted card type."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the card type to."] pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC archive resource information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the archive resource information to."] - + #[doc = "Gets the SDMC archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the archive resource information to."] pub fn FSPXI_GetSdmcArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -16948,12 +15736,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the NAND archive resource information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the archive resource information to."] - + #[doc = "Gets the NAND archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the archive resource information to."] pub fn FSPXI_GetNandArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -16961,171 +15748,154 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the error code from the SDMC FatFS driver"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the error code to"] - + #[doc = "Gets the error code from the SDMC FatFS driver"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the error code to"] pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether PXIFS0 detects the SD"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the detection status to"] - + #[doc = "Gets whether PXIFS0 detects the SD"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the detection status to"] pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result; } -extern "C" { - #[must_use] -#[doc = "Gets whether PXIFS0 can write to the SD"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the writable status to"] - +extern "C" { + #[must_use] + #[doc = "Gets whether PXIFS0 can write to the SD"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the writable status to"] pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC CID"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Buffer to output the CID to."] -#[doc = "* `size` - Size of buffer."] - + #[doc = "Gets the SDMC CID"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the CID to."] + #[doc = "* `size` - Size of buffer."] pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND CID"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Buffer to output the CID to."] -#[doc = "* `size` - Size of buffer."] - + #[doc = "Gets the NAND CID"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the CID to."] + #[doc = "* `size` - Size of buffer."] pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC speed info"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Buffer to output the speed info to."] - + #[doc = "Gets the SDMC speed info"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the speed info to."] pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND speed info"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Buffer to output the speed info to."] - + #[doc = "Gets the NAND speed info"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the speed info to."] pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC log"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Buffer to output the log to."] -#[doc = "* `size` - Size of buffer."] - + #[doc = "Gets the SDMC log"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the log to."] + #[doc = "* `size` - Size of buffer."] pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND log"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Buffer to output the log to."] -#[doc = "* `size` - Size of buffer."] - + #[doc = "Gets the NAND log"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the log to."] + #[doc = "* `size` - Size of buffer."] pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the SDMC log"] -#[doc = ""] - + #[doc = "Clears the SDMC log"] + #[doc = ""] pub fn FSPXI_ClearSdmcLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the NAND log"] -#[doc = ""] - + #[doc = "Clears the NAND log"] + #[doc = ""] pub fn FSPXI_ClearNandLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether a card is inserted."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inserted` - Pointer to output the insertion status to."] - + #[doc = "Gets whether a card is inserted."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inserted` - Pointer to output the insertion status to."] pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers on the card slot."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `status` - Pointer to output the power status to."] - + #[doc = "Powers on the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers off the card slot."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `status` - Pointer to output the power status to."] - + #[doc = "Powers off the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the card's power status."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `status` - Pointer to output the power status to."] - + #[doc = "Gets the card's power status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] - + #[doc = "Executes a CARDNOR direct command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command with an address."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] - + #[doc = "Executes a CARDNOR direct command with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] pub fn FSPXI_CardNorDirectCommandWithAddress( serviceHandle: Handle, commandId: u8_, @@ -17134,14 +15904,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `size` - Size of the output buffer."] -#[doc = "* `output` - Output buffer."] - + #[doc = "Executes a CARDNOR direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] pub fn FSPXI_CardNorDirectRead( serviceHandle: Handle, commandId: u8_, @@ -17151,15 +15920,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read with an address."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the output buffer."] -#[doc = "* `output` - Output buffer."] - + #[doc = "Executes a CARDNOR direct read with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] pub fn FSPXI_CardNorDirectReadWithAddress( serviceHandle: Handle, commandId: u8_, @@ -17170,14 +15938,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `size` - Size of the input buffer."] -#[doc = "* `output` - Input buffer."] - + #[doc = "Executes a CARDNOR direct write."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] pub fn FSPXI_CardNorDirectWrite( serviceHandle: Handle, commandId: u8_, @@ -17187,15 +15954,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write with an address."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the input buffer."] -#[doc = "* `input` - Input buffer."] - + #[doc = "Executes a CARDNOR direct write with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `input` - Input buffer."] pub fn FSPXI_CardNorDirectWriteWithAddress( serviceHandle: Handle, commandId: u8_, @@ -17206,15 +15972,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR 4xIO direct read."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `commandId` - ID of the command."] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the output buffer."] -#[doc = "* `output` - Output buffer."] - + #[doc = "Executes a CARDNOR 4xIO direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] pub fn FSPXI_CardNorDirectRead_4xIO( serviceHandle: Handle, commandId: u8_, @@ -17225,14 +15990,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct CPU write without verify."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `address` - Address to provide."] -#[doc = "* `size` - Size of the input buffer."] -#[doc = "* `output` - Input buffer."] - + #[doc = "Executes a CARDNOR direct CPU write without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify( serviceHandle: Handle, address: u32_, @@ -17242,12 +16006,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct sector erase without verify."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `address` - Address to provide."] - + #[doc = "Executes a CARDNOR direct sector erase without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify( serviceHandle: Handle, address: u32_, @@ -17255,13 +16018,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an NCCH's product info"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Pointer to output the product info to."] -#[doc = "* `archive` - Open NCCH content archive"] - + #[doc = "Gets an NCCH's product info"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the product info to."] + #[doc = "* `archive` - Open NCCH content archive"] pub fn FSPXI_GetProductInfo( serviceHandle: Handle, info: *mut FS_ProductInfo, @@ -17270,67 +16032,61 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI baud rate."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `baudRate` - Baud rate to set."] - + #[doc = "Sets the CARDSPI baud rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `baudRate` - Baud rate to set."] pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI bus mode."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `busMode` - Bus mode to set."] - + #[doc = "Sets the CARDSPI bus mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `busMode` - Bus mode to set."] pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] -#[doc = "Sends initialization info to ARM9"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `unk` - FS sends *(0x1FF81086)"] - + #[doc = "Sends initialization info to ARM9"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk` - FS sends *(0x1FF81086)"] pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates ext save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Info of the save data."] - + #[doc = "Creates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes ext save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Info of the save data."] - + #[doc = "Deletes ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Enumerates ext save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "* `idsSize` - Size of the IDs buffer."] -#[doc = "* `mediaType` - Media type to enumerate over."] -#[doc = "* `idSize` - Size of each ID element."] -#[doc = "* `shared` - Whether to enumerate shared ext save data."] -#[doc = "* `ids` - Pointer to output IDs to."] - + #[doc = "Enumerates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `mediaType` - Media type to enumerate over."] + #[doc = "* `idSize` - Size of each ID element."] + #[doc = "* `shared` - Whether to enumerate shared ext save data."] + #[doc = "* `ids` - Pointer to output IDs to."] pub fn FSPXI_EnumerateExtSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -17343,15 +16099,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a special content's index."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `index` - Pointer to output the index to."] -#[doc = "* `mediaType` - Media type of the special content."] -#[doc = "* `programId` - Program ID owning the special content."] -#[doc = "* `type` - Type of special content."] - + #[doc = "Gets a special content's index."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `index` - Pointer to output the index to."] + #[doc = "* `mediaType` - Media type of the special content."] + #[doc = "* `programId` - Program ID owning the special content."] + #[doc = "* `type` - Type of special content."] pub fn FSPXI_GetSpecialContentIndex( serviceHandle: Handle, index: *mut u16_, @@ -17362,14 +16117,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy ROM header of a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Media type of the program."] -#[doc = "* `programId` - ID of the program."] -#[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] - + #[doc = "Gets the legacy ROM header of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] pub fn FSPXI_GetLegacyRomHeader( serviceHandle: Handle, mediaType: FS_MediaType, @@ -17379,15 +16133,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy banner data of a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediaType` - Media type of the program."] -#[doc = "* `programId` - ID of the program."] -#[doc = "* `banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] -#[doc = "* `unk` - Unknown. Always 1?"] - + #[doc = "Gets the legacy banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] + #[doc = "* `unk` - Unknown. Always 1?"] pub fn FSPXI_GetLegacyBannerData( serviceHandle: Handle, mediaType: FS_MediaType, @@ -17398,62 +16151,55 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Formats the CARDNOR device."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `unk` - Unknown. Transaction?"] - + #[doc = "Formats the CARDNOR device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk` - Unknown. Transaction?"] pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the 3DS SDMC root."] -#[doc = ""] - + #[doc = "Deletes the 3DS SDMC root."] + #[doc = ""] pub fn FSPXI_DeleteSdmcRoot(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all ext save data on the NAND."] -#[doc = ""] - + #[doc = "Deletes all ext save data on the NAND."] + #[doc = ""] pub fn FSPXI_DeleteAllExtSaveDataOnNand(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CTR file system."] -#[doc = ""] - + #[doc = "Initializes the CTR file system."] + #[doc = ""] pub fn FSPXI_InitializeCtrFilesystem(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates the FS seed."] -#[doc = ""] - + #[doc = "Creates the FS seed."] + #[doc = ""] pub fn FSPXI_CreateSeed(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the CTR SDMC root path."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to output the root path to."] -#[doc = "* `length` - Length of the output buffer in bytes."] - + #[doc = "Gets the CTR SDMC root path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the root path to."] + #[doc = "* `length` - Length of the output buffer in bytes."] pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an archive's resource information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archiveResource` - Pointer to output the archive resource information to."] -#[doc = "* `mediaType` - System media type to check."] - + #[doc = "Gets an archive's resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = "* `mediaType` - System media type to check."] pub fn FSPXI_GetArchiveResource( serviceHandle: Handle, archiveResource: *mut FS_ArchiveResource, @@ -17462,12 +16208,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Exports the integrity verification seed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `seed` - Pointer to output the seed to."] - + #[doc = "Exports the integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to output the seed to."] pub fn FSPXI_ExportIntegrityVerificationSeed( serviceHandle: Handle, seed: *mut FS_IntegrityVerificationSeed, @@ -17475,12 +16220,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Imports an integrity verification seed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `seed` - Seed to import."] - + #[doc = "Imports an integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Seed to import."] pub fn FSPXI_ImportIntegrityVerificationSeed( serviceHandle: Handle, seed: *const FS_IntegrityVerificationSeed, @@ -17488,15 +16232,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy sub banner data of a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bannerSize` - Size of the banner."] -#[doc = "* `mediaType` - Media type of the program."] -#[doc = "* `programId` - ID of the program."] -#[doc = "* `header` - Pointer to output the legacy sub banner data to."] - + #[doc = "Gets the legacy sub banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bannerSize` - Size of the banner."] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy sub banner data to."] pub fn FSPXI_GetLegacySubBannerData( serviceHandle: Handle, bannerSize: u32_, @@ -17507,13 +16250,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Buffer to output random bytes to."] -#[doc = "* `size` - Size of buffer."] - + #[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to output random bytes to."] + #[doc = "* `size` - Size of buffer."] pub fn FSPXI_GenerateRandomBytes( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -17522,15 +16264,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the last modified time of a file in an archive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `archive` - The archive that contains the file."] -#[doc = "* `out` - The pointer to write the timestamp to."] -#[doc = "* `path` - The UTF-16 path of the file."] -#[doc = "* `size` - The size of the path."] - + #[doc = "Gets the last modified time of a file in an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - The archive that contains the file."] + #[doc = "* `out` - The pointer to write the timestamp to."] + #[doc = "* `path` - The UTF-16 path of the file."] + #[doc = "* `size` - The size of the path."] pub fn FSPXI_GetFileLastModified( serviceHandle: Handle, archive: FSPXI_Archive, @@ -17541,15 +16282,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a special file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "* `fileOffset` - Offset of the file."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `data` - Buffer to read to."] - + #[doc = "Reads from a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `fileOffset` - Offset of the file."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `data` - Buffer to read to."] pub fn FSPXI_ReadSpecialFile( serviceHandle: Handle, bytesRead: *mut u32_, @@ -17560,22 +16300,20 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the size of a special file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `fileSize` - Pointer to output the size to."] - + #[doc = "Gets the size of a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `fileSize` - Pointer to output the size to."] pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates a device move as the source device."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Pointer to output the context to."] - + #[doc = "Initiates a device move as the source device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Pointer to output the context to."] pub fn FSPXI_StartDeviceMoveAsSource( serviceHandle: Handle, context: *mut FS_DeviceMoveContext, @@ -17583,13 +16321,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initiates a device move as the destination device."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `clear` - Whether to clear the device's data first."] - + #[doc = "Initiates a device move as the destination device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `clear` - Whether to clear the device's data first."] pub fn FSPXI_StartDeviceMoveAsDestination( serviceHandle: Handle, context: FS_DeviceMoveContext, @@ -17598,19 +16335,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads data and stores SHA256 hashes of blocks"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to read from."] -#[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] -#[doc = "* `offset` - Offset to read from."] -#[doc = "* `readBuffer` - Pointer to store read data in."] -#[doc = "* `readBufferSize` - Size of readBuffer."] -#[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] -#[doc = "* `hashtableSize` - Size of hashtable."] -#[doc = "* `unk` - Unknown. Always 0x00001000? Possibly block size?"] - + #[doc = "Reads data and stores SHA256 hashes of blocks"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to read from."] + #[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `readBuffer` - Pointer to store read data in."] + #[doc = "* `readBufferSize` - Size of readBuffer."] + #[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] + #[doc = "* `hashtableSize` - Size of hashtable."] + #[doc = "* `unk` - Unknown. Always 0x00001000? Possibly block size?"] pub fn FSPXI_ReadFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -17625,20 +16361,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `file` - File to write to."] -#[doc = "* `bytesWritten` - Pointer to output the number of written bytes to."] -#[doc = "* `offset` - Offset to write to."] -#[doc = "* `writeBuffer` - Buffer to write from."] -#[doc = "* `writeBufferSize` - Size of writeBuffer."] -#[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] -#[doc = "* `hashtableSize` - Size of hashtable"] -#[doc = "* `unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] -#[doc = "* `unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] - + #[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to write to."] + #[doc = "* `bytesWritten` - Pointer to output the number of written bytes to."] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `writeBuffer` - Buffer to write from."] + #[doc = "* `writeBufferSize` - Size of writeBuffer."] + #[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] + #[doc = "* `hashtableSize` - Size of hashtable"] + #[doc = "* `unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] + #[doc = "* `unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] pub fn FSPXI_WriteFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -17654,44 +16389,40 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures CTRCARD latency emulation."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `latency` - Latency to apply."] - + #[doc = "Configures CTRCARD latency emulation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `latency` - Latency to apply."] pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the file system priority."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `priority` - Priority to set."] - + #[doc = "Sets the file system priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Priority to set."] pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Toggles cleaning up invalid save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enable` - Whether to enable cleaning up invalid save data."] - + #[doc = "Toggles cleaning up invalid save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Enumerates system save data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "* `idsSize` - Size of the IDs buffer."] -#[doc = "* `ids` - Pointer to output IDs to."] - + #[doc = "Enumerates system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `ids` - Pointer to output IDs to."] pub fn FSPXI_EnumerateSystemSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -17701,14 +16432,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads the NAND report."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `unk` - Unknown"] -#[doc = "* `buffer` - Buffer to write the report to."] -#[doc = "* `size` - Size of buffer"] - + #[doc = "Reads the NAND report."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk` - Unknown"] + #[doc = "* `buffer` - Buffer to write the report to."] + #[doc = "* `size` - Size of buffer"] pub fn FSPXI_ReadNandReport( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -17718,9 +16448,8 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unknown command 0x56"] -#[doc = ""] - + #[doc = "Unknown command 0x56"] + #[doc = ""] pub fn FSPXI_Unknown0x56( serviceHandle: Handle, out: *mut u32_, @@ -17730,36 +16459,32 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes fs:REG."] -#[doc = ""] - + #[doc = "Initializes fs:REG."] + #[doc = ""] pub fn fsRegInit() -> Result; } extern "C" { -#[doc = "Exits fs:REG."] -#[doc = ""] - + #[doc = "Exits fs:REG."] + #[doc = ""] pub fn fsRegExit(); } extern "C" { -#[doc = "Gets the current fs:REG session handle."] -#[doc = ""] -#[doc = "Returns: The current fs:REG session handle."] -#[doc = ""] - + #[doc = "Gets the current fs:REG session handle."] + #[doc = ""] + #[doc = "Returns: The current fs:REG session handle."] + #[doc = ""] pub fn fsRegGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Registers a program's storage information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pid` - The Process ID of the program."] -#[doc = "* `programHandle` - The program handle."] -#[doc = "* `programInfo` - Information about the program."] -#[doc = "* `storageInfo` - Storage information to register."] - + #[doc = "Registers a program's storage information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - The Process ID of the program."] + #[doc = "* `programHandle` - The program handle."] + #[doc = "* `programInfo` - Information about the program."] + #[doc = "* `storageInfo` - Storage information to register."] pub fn FSREG_Register( pid: u32_, programHandle: u64_, @@ -17769,24 +16494,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters a program's storage information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pid` - The Process ID of the program."] - + #[doc = "Unregisters a program's storage information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - The Process ID of the program."] pub fn FSREG_Unregister(pid: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set(s)."] -#[doc = "* `maxNumEntries` - The maximum number of entries."] -#[doc = "* `programHandle` - The program handle."] - + #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set(s)."] + #[doc = "* `maxNumEntries` - The maximum number of entries."] + #[doc = "* `programHandle` - The program handle."] pub fn FSREG_GetProgramInfo( exheaderInfos: *mut ExHeader_Info, maxNumEntries: u32_, @@ -17795,13 +16518,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Loads a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] -#[doc = "* `programInfo` - Information about the program to load."] - + #[doc = "Loads a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] + #[doc = "* `programInfo` - Information about the program to load."] pub fn FSREG_LoadProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -17809,27 +16531,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unloads a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programHandle` - The program handle."] - + #[doc = "Unloads a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The program handle."] pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if a program has been loaded by fs:REG."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programHandle` - The program handle."] - + #[doc = "Checks if a program has been loaded by fs:REG."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The program handle."] pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result; } #[doc = "Shared Mii struct"] #[doc = ""] - #[repr(C)] #[repr(align(1))] pub struct MiiData { @@ -17837,7 +16556,6 @@ pub struct MiiData { } #[doc = "Mii options"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_1 { @@ -17918,7 +16636,6 @@ impl MiiData__bindgen_ty_1 { } #[doc = "Mii position in Mii selector or Mii maker"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_2 { @@ -17964,7 +16681,6 @@ impl MiiData__bindgen_ty_2 { } #[doc = "Console Identity"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_3 { @@ -18013,7 +16729,6 @@ impl MiiData__bindgen_ty_3 { } #[doc = "Mii details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18111,7 +16826,6 @@ impl MiiData__bindgen_ty_4 { } #[doc = "Face style"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_5 { @@ -18176,7 +16890,6 @@ impl MiiData__bindgen_ty_5 { } #[doc = "Face details"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_6 { @@ -18222,7 +16935,6 @@ impl MiiData__bindgen_ty_6 { } #[doc = "Hair details"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_7 { @@ -18268,7 +16980,6 @@ impl MiiData__bindgen_ty_7 { } #[doc = "Eye details"] #[doc = ""] - #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -18398,7 +17109,6 @@ impl MiiData__bindgen_ty_8 { } #[doc = "Eyebrow details"] #[doc = ""] - #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -18544,7 +17254,6 @@ impl MiiData__bindgen_ty_9 { } #[doc = "Nose details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18610,7 +17319,6 @@ impl MiiData__bindgen_ty_10 { } #[doc = "Mouth details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18692,7 +17400,6 @@ impl MiiData__bindgen_ty_11 { } #[doc = "Mustache details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18758,7 +17465,6 @@ impl MiiData__bindgen_ty_12 { } #[doc = "Beard details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18840,7 +17546,6 @@ impl MiiData__bindgen_ty_13 { } #[doc = "Glasses details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18922,7 +17627,6 @@ impl MiiData__bindgen_ty_14 { } #[doc = "Mole details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -19013,7 +17717,6 @@ impl Default for MiiData { } #[doc = "Friend key data"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendKey { @@ -19023,7 +17726,6 @@ pub struct FriendKey { } #[doc = "Friend Title data"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct TitleData { @@ -19033,35 +17735,28 @@ pub struct TitleData { } #[doc = "Friend profile data"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendProfile { -#[doc = "The region code for the hardware."] -#[doc = ""] - + #[doc = "The region code for the hardware."] + #[doc = ""] pub region: u8_, -#[doc = "Country code."] -#[doc = ""] - + #[doc = "Country code."] + #[doc = ""] pub country: u8_, -#[doc = "Area code."] -#[doc = ""] - + #[doc = "Area code."] + #[doc = ""] pub area: u8_, -#[doc = "Language code."] -#[doc = ""] - + #[doc = "Language code."] + #[doc = ""] pub language: u8_, -#[doc = "Platform code."] -#[doc = ""] - + #[doc = "Platform code."] + #[doc = ""] pub platform: u8_, pub padding: u32_, } #[doc = "Game Description structure"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct GameDescription { @@ -19079,7 +17774,6 @@ impl Default for GameDescription { } #[doc = "Friend Notification Event structure"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationEvent { @@ -19130,80 +17824,71 @@ pub const FRIEND_SENT_INVITATION: NotificationTypes = 9; pub type NotificationTypes = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes FRD service."] -#[doc = ""] - + #[doc = "Initializes FRD service."] + #[doc = ""] pub fn frdInit() -> Result; } extern "C" { -#[doc = "Exists FRD."] -#[doc = ""] - + #[doc = "Exists FRD."] + #[doc = ""] pub fn frdExit(); } extern "C" { -#[doc = "Get FRD handle."] -#[doc = ""] - + #[doc = "Get FRD handle."] + #[doc = ""] pub fn frdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the login status of the current user."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to write the current user's login status to."] - + #[doc = "Gets the login status of the current user."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the current user's login status to."] pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the online status of the current user."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to write the current user's online status to."] - + #[doc = "Gets the online status of the current user."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the current user's online status to."] pub fn FRDU_IsOnline(state: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Logs out of Nintendo's friend server."] -#[doc = ""] - + #[doc = "Logs out of Nintendo's friend server."] + #[doc = ""] pub fn FRD_Logout() -> Result; } extern "C" { #[must_use] -#[doc = "Log in to Nintendo's friend server."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Event to signal when Login is done."] - + #[doc = "Log in to Nintendo's friend server."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Event to signal when Login is done."] pub fn FRD_Login(event: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's friend key."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `key` - Pointer to write the current user's friend key to."] - + #[doc = "Gets the current user's friend key."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `key` - Pointer to write the current user's friend key to."] pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's privacy information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `isPublicMode` - Determines whether friends are notified of the current user's online status."] -#[doc = "* `isShowGameName` - Determines whether friends are notified of the application that the current user is running."] -#[doc = "* `isShowPlayedGame` - Determiens whether to display the current user's game history."] - + #[doc = "Gets the current user's privacy information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `isPublicMode` - Determines whether friends are notified of the current user's online status."] + #[doc = "* `isShowGameName` - Determines whether friends are notified of the application that the current user is running."] + #[doc = "* `isShowPlayedGame` - Determiens whether to display the current user's game history."] pub fn FRD_GetMyPreference( isPublicMode: *mut bool, isShowGameName: *mut bool, @@ -19212,77 +17897,70 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the current user's profile information."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `profile` - Pointer to write the current user's profile information to."] - + #[doc = "Gets the current user's profile information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `profile` - Pointer to write the current user's profile information to."] pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's screen name."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Pointer to write the current user's screen name to."] -#[doc = "* `max_size` - Max size of the screen name."] - + #[doc = "Gets the current user's screen name."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Pointer to write the current user's screen name to."] + #[doc = "* `max_size` - Max size of the screen name."] pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's Mii data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mii` - Pointer to write the current user's mii data to."] - + #[doc = "Gets the current user's Mii data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mii` - Pointer to write the current user's mii data to."] pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's playing game."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleId` - Pointer to write the current user's playing game to."] - + #[doc = "Gets the current user's playing game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Pointer to write the current user's playing game to."] pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result; } -extern "C" { - #[must_use] -#[doc = "Gets the current user's favourite game."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleId` - Pointer to write the title ID of current user's favourite game to."] - +extern "C" { + #[must_use] + #[doc = "Gets the current user's favourite game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Pointer to write the title ID of current user's favourite game to."] pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's comment on their friend profile."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `comment` - Pointer to write the current user's comment to."] -#[doc = "* `max_size` - Max size of the comment."] - + #[doc = "Gets the current user's comment on their friend profile."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `comment` - Pointer to write the current user's comment to."] + #[doc = "* `max_size` - Max size of the comment."] pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's friend key list."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `friendKeyList` - Pointer to write the friend key list to."] -#[doc = "* `num` - Stores the number of friend keys obtained."] -#[doc = "* `offset` - The index of the friend key to start with."] -#[doc = "* `size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] - + #[doc = "Gets the current user's friend key list."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendKeyList` - Pointer to write the friend key list to."] + #[doc = "* `num` - Stores the number of friend keys obtained."] + #[doc = "* `offset` - The index of the friend key to start with."] + #[doc = "* `size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] pub fn FRD_GetFriendKeyList( friendKeyList: *mut FriendKey, num: *mut u32_, @@ -19292,14 +17970,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the current user's friends' Mii data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `miiDataList` - Pointer to write Mii data to."] -#[doc = "* `friendKeyList` - Pointer to FriendKeys."] -#[doc = "* `size` - Number of Friendkeys."] - + #[doc = "Gets the current user's friends' Mii data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `miiDataList` - Pointer to write Mii data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys."] + #[doc = "* `size` - Number of Friendkeys."] pub fn FRD_GetFriendMii( miiDataList: *mut MiiData, friendKeyList: *const FriendKey, @@ -19308,14 +17985,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get the current user's friends' profile data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `profile` - Pointer to write profile data to."] -#[doc = "* `friendKeyList` - Pointer to FriendKeys."] -#[doc = "* `size` - Number of FriendKeys."] - + #[doc = "Get the current user's friends' profile data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `profile` - Pointer to write profile data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys."] + #[doc = "* `size` - Number of FriendKeys."] pub fn FRD_GetFriendProfile( profile: *mut FriendProfile, friendKeyList: *const FriendKey, @@ -19324,14 +18000,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get the current user's friends' playing game."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `desc` - Pointer to write Game Description data to."] -#[doc = "* `friendKeyList` - Pointer to FriendKeys,"] -#[doc = "* `size` - Number Of FriendKeys."] - + #[doc = "Get the current user's friends' playing game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `desc` - Pointer to write Game Description data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] + #[doc = "* `size` - Number Of FriendKeys."] pub fn FRD_GetFriendPlayingGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -19340,14 +18015,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get the current user's friends' favourite game."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `desc` - Pointer to write Game Description data to."] -#[doc = "* `friendKeyList` - Pointer to FriendKeys,"] -#[doc = "* `count` - Number Of FriendKeys."] - + #[doc = "Get the current user's friends' favourite game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `desc` - Pointer to write Game Description data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] + #[doc = "* `count` - Number Of FriendKeys."] pub fn FRD_GetFriendFavouriteGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -19356,45 +18030,41 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets whether a friend key is included in the current user's friend list."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `friendKeyList` - Pointer to a list of friend keys."] -#[doc = "* `isFromList` - Pointer to a write the friendship status to."] - + #[doc = "Gets whether a friend key is included in the current user's friend list."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendKeyList` - Pointer to a list of friend keys."] + #[doc = "* `isFromList` - Pointer to a write the friendship status to."] pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Updates the game mode description string."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `desc` - Pointer to write the game mode description to."] - + #[doc = "Updates the game mode description string."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `desc` - Pointer to write the game mode description to."] pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Event which is signaled when friend login states change."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - event which will be signaled."] - + #[doc = "Event which is signaled when friend login states change."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - event which will be signaled."] pub fn FRD_AttachToEventNotification(event: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Get Latest Event Notification"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Pointer to write recieved notification event struct to."] -#[doc = "* `count` - Number of events"] -#[doc = "* `recievedNotifCount` - Number of notification reccieved."] - + #[doc = "Get Latest Event Notification"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to write recieved notification event struct to."] + #[doc = "* `count` - Number of events"] + #[doc = "* `recievedNotifCount` - Number of notification reccieved."] pub fn FRD_GetEventNotification( event: *mut NotificationEvent, count: u32_, @@ -19403,67 +18073,61 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Returns the friend code using the given principal ID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `principalId` - The principal ID being used."] -#[doc = "* `friendCode` - Pointer to write the friend code to."] - + #[doc = "Returns the friend code using the given principal ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `principalId` - The principal ID being used."] + #[doc = "* `friendCode` - Pointer to write the friend code to."] pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the principal ID using the given friend code."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `friendCode` - The friend code being used."] -#[doc = "* `principalId` - Pointer to write the principal ID to."] - + #[doc = "Returns the principal ID using the given friend code."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendCode` - The friend code being used."] + #[doc = "* `principalId` - Pointer to write the principal ID to."] pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the friend code is valid."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `friendCode` - The friend code being used."] -#[doc = "* `isValid` - Pointer to write the validity of the friend code to."] - + #[doc = "Checks if the friend code is valid."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendCode` - The friend code being used."] + #[doc = "* `isValid` - Pointer to write the validity of the friend code to."] pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the Friend API to use a specific SDK version."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sdkVer` - The SDK version needed to be used."] - + #[doc = "Sets the Friend API to use a specific SDK version."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sdkVer` - The SDK version needed to be used."] pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Add a Friend online."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `event` - Event signaled when friend is registered."] -#[doc = "* `principalId` - PrincipalId of the friend to add."] - + #[doc = "Add a Friend online."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Event signaled when friend is registered."] + #[doc = "* `principalId` - PrincipalId of the friend to add."] pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Remove a Friend."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `principalId` - PrinipalId of the friend code to remove."] -#[doc = "* `localFriendCode` - LocalFriendCode of the friend code to remove."] - + #[doc = "Remove a Friend."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `principalId` - PrinipalId of the friend code to remove."] + #[doc = "* `localFriendCode` - LocalFriendCode of the friend code to remove."] pub fn FRD_RemoveFriend(principalId: u32_, localFriendCode: u64_) -> Result; } #[doc = "Top screen."] @@ -19484,110 +18148,98 @@ pub const GSPLCD_SCREEN_BOTH: _bindgen_ty_21 = 3; pub type _bindgen_ty_21 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes GSPLCD."] -#[doc = ""] - + #[doc = "Initializes GSPLCD."] + #[doc = ""] pub fn gspLcdInit() -> Result; } extern "C" { -#[doc = "Exits GSPLCD."] -#[doc = ""] - + #[doc = "Exits GSPLCD."] + #[doc = ""] pub fn gspLcdExit(); } extern "C" { -#[doc = "Gets a pointer to the current gsp::Lcd session handle."] -#[doc = ""] -#[doc = "Returns: A pointer to the current gsp::Lcd session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current gsp::Lcd session handle."] + #[doc = ""] + #[doc = "Returns: A pointer to the current gsp::Lcd session handle."] + #[doc = ""] pub fn gspLcdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Powers on both backlights."] -#[doc = ""] - + #[doc = "Powers on both backlights."] + #[doc = ""] pub fn GSPLCD_PowerOnAllBacklights() -> Result; } extern "C" { #[must_use] -#[doc = "Powers off both backlights."] -#[doc = ""] - + #[doc = "Powers off both backlights."] + #[doc = ""] pub fn GSPLCD_PowerOffAllBacklights() -> Result; } extern "C" { #[must_use] -#[doc = "Powers on the backlight."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen to power on."] - + #[doc = "Powers on the backlight."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to power on."] pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Powers off the backlight."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen to power off."] - + #[doc = "Powers off the backlight."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to power off."] pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets 3D_LEDSTATE to the input state value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] - + #[doc = "Sets 3D_LEDSTATE to the input state value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `vendor` - Pointer to output the screen vendors to."] - + #[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vendor` - Pointer to output the screen vendors to."] pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen to get the brightness value of."] -#[doc = "* `brightness` - Brightness value returned."] - + #[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to get the brightness value of."] + #[doc = "* `brightness` - Brightness value returned."] pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the LCD screens' brightness."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen to set the brightness value of."] -#[doc = "* `brightness` - Brightness value set."] - + #[doc = "Sets the LCD screens' brightness."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to set the brightness value of."] + #[doc = "* `brightness` - Brightness value set."] pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the LCD screens' raw brightness."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `screen` - Screen to set the brightness value of."] -#[doc = "* `brightness` - Brightness value set."] - + #[doc = "Sets the LCD screens' raw brightness."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to set the brightness value of."] + #[doc = "* `brightness` - Brightness value set."] pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result; } #[doc = "A"] @@ -19704,70 +18356,56 @@ pub const KEY_RIGHT: _bindgen_ty_22 = 268435472; pub type _bindgen_ty_22 = ::libc::c_uint; #[doc = "Touch position."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct touchPosition { -#[doc = "Touch X"] -#[doc = ""] - + #[doc = "Touch X"] + #[doc = ""] pub px: u16_, -#[doc = "Touch Y"] -#[doc = ""] - + #[doc = "Touch Y"] + #[doc = ""] pub py: u16_, } #[doc = "Circle Pad position."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct circlePosition { -#[doc = "Pad X"] -#[doc = ""] - + #[doc = "Pad X"] + #[doc = ""] pub dx: s16, -#[doc = "Pad Y"] -#[doc = ""] - + #[doc = "Pad Y"] + #[doc = ""] pub dy: s16, } #[doc = "Accelerometer vector."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct accelVector { -#[doc = "Accelerometer X"] -#[doc = ""] - + #[doc = "Accelerometer X"] + #[doc = ""] pub x: s16, -#[doc = "Accelerometer Y"] -#[doc = ""] - + #[doc = "Accelerometer Y"] + #[doc = ""] pub y: s16, -#[doc = "Accelerometer Z"] -#[doc = ""] - + #[doc = "Accelerometer Z"] + #[doc = ""] pub z: s16, } #[doc = "Gyroscope angular rate."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct angularRate { -#[doc = "Roll"] -#[doc = ""] - + #[doc = "Roll"] + #[doc = ""] pub x: s16, -#[doc = "Yaw"] -#[doc = ""] - + #[doc = "Yaw"] + #[doc = ""] pub z: s16, -#[doc = "Pitch"] -#[doc = ""] - + #[doc = "Pitch"] + #[doc = ""] pub y: s16, } #[doc = "Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was updated."] @@ -19799,157 +18437,140 @@ pub const HIDEVENT_MAX: HID_Event = 5; pub type HID_Event = ::libc::c_uint; extern "C" { -#[doc = "HID shared memory handle."] -#[doc = ""] - + #[doc = "HID shared memory handle."] + #[doc = ""] pub static mut hidMemHandle: Handle; } extern "C" { -#[doc = "HID shared memory."] -#[doc = ""] - + #[doc = "HID shared memory."] + #[doc = ""] pub static mut hidSharedMem: *mut vu32; } extern "C" { #[must_use] -#[doc = "Initializes HID."] -#[doc = ""] - + #[doc = "Initializes HID."] + #[doc = ""] pub fn hidInit() -> Result; } extern "C" { -#[doc = "Exits HID."] -#[doc = ""] - + #[doc = "Exits HID."] + #[doc = ""] pub fn hidExit(); } extern "C" { -#[doc = "Sets the key repeat parameters for @ref hidKeysRepeat."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `delay` - Initial delay."] -#[doc = "* `interval` - Repeat interval."] - + #[doc = "Sets the key repeat parameters for @ref hidKeysRepeat."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `delay` - Initial delay."] + #[doc = "* `interval` - Repeat interval."] pub fn hidSetRepeatParameters(delay: u32_, interval: u32_); } extern "C" { -#[doc = "Scans HID for input data."] -#[doc = ""] - + #[doc = "Scans HID for input data."] + #[doc = ""] pub fn hidScanInput(); } extern "C" { -#[doc = "Returns a bitmask of held buttons."] -#[doc = ""] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = ""] -#[doc = "Returns: 32-bit bitmask of held buttons (1+ frames)."] -#[doc = ""] - + #[doc = "Returns a bitmask of held buttons."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns: 32-bit bitmask of held buttons (1+ frames)."] + #[doc = ""] pub fn hidKeysHeld() -> u32_; } extern "C" { -#[doc = "Returns a bitmask of newly pressed buttons, this frame."] -#[doc = ""] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = ""] -#[doc = "Returns: 32-bit bitmask of newly pressed buttons."] -#[doc = ""] - + #[doc = "Returns a bitmask of newly pressed buttons, this frame."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns: 32-bit bitmask of newly pressed buttons."] + #[doc = ""] pub fn hidKeysDown() -> u32_; } extern "C" { -#[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] -#[doc = ""] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = ""] -#[doc = "Returns: 32-bit bitmask of newly pressed or repeated buttons."] -#[doc = ""] - + #[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns: 32-bit bitmask of newly pressed or repeated buttons."] + #[doc = ""] pub fn hidKeysDownRepeat() -> u32_; } extern "C" { -#[doc = "Returns a bitmask of newly released buttons, this frame."] -#[doc = ""] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = ""] -#[doc = "Returns: 32-bit bitmask of newly released buttons."] -#[doc = ""] - + #[doc = "Returns a bitmask of newly released buttons, this frame."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns: 32-bit bitmask of newly released buttons."] + #[doc = ""] pub fn hidKeysUp() -> u32_; } extern "C" { -#[doc = "Reads the current touch position."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pos` - Pointer to output the touch position to."] - + #[doc = "Reads the current touch position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Pointer to output the touch position to."] pub fn hidTouchRead(pos: *mut touchPosition); } extern "C" { -#[doc = "Reads the current circle pad position."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pos` - Pointer to output the circle pad position to."] - + #[doc = "Reads the current circle pad position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Pointer to output the circle pad position to."] pub fn hidCircleRead(pos: *mut circlePosition); } extern "C" { -#[doc = "Reads the current accelerometer data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `vector` - Pointer to output the accelerometer data to."] - + #[doc = "Reads the current accelerometer data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vector` - Pointer to output the accelerometer data to."] pub fn hidAccelRead(vector: *mut accelVector); } extern "C" { -#[doc = "Reads the current gyroscope data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `rate` - Pointer to output the gyroscope data to."] - + #[doc = "Reads the current gyroscope data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rate` - Pointer to output the gyroscope data to."] pub fn hidGyroRead(rate: *mut angularRate); } extern "C" { -#[doc = "Waits for an HID event."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the event."] -#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] - + #[doc = "Waits for an HID event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the event."] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool); } extern "C" { #[must_use] -#[doc = "Waits for any HID or IRRST event."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nextEvents` - Whether to discard the current events and wait for the next events."] -#[doc = "* `cancelEvent` - Optional additional handle to wait on, otherwise 0."] -#[doc = "* `timeout` - Timeout."] - + #[doc = "Waits for any HID or IRRST event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nextEvents` - Whether to discard the current events and wait for the next events."] + #[doc = "* `cancelEvent` - Optional additional handle to wait on, otherwise 0."] + #[doc = "* `timeout` - Timeout."] pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the handles for HID operation."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] -#[doc = "* `eventpad0` - Pointer to output the pad 0 event handle to."] -#[doc = "* `eventpad1` - Pointer to output the pad 1 event handle to."] -#[doc = "* `eventaccel` - Pointer to output the accelerometer event handle to."] -#[doc = "* `eventgyro` - Pointer to output the gyroscope event handle to."] -#[doc = "* `eventdebugpad` - Pointer to output the debug pad event handle to."] - + #[doc = "Gets the handles for HID operation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] + #[doc = "* `eventpad0` - Pointer to output the pad 0 event handle to."] + #[doc = "* `eventpad1` - Pointer to output the pad 1 event handle to."] + #[doc = "* `eventaccel` - Pointer to output the accelerometer event handle to."] + #[doc = "* `eventgyro` - Pointer to output the gyroscope event handle to."] + #[doc = "* `eventdebugpad` - Pointer to output the debug pad event handle to."] pub fn HIDUSER_GetHandles( outMemHandle: *mut Handle, eventpad0: *mut Handle, @@ -19961,157 +18582,136 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Enables the accelerometer."] -#[doc = ""] - + #[doc = "Enables the accelerometer."] + #[doc = ""] pub fn HIDUSER_EnableAccelerometer() -> Result; } extern "C" { #[must_use] -#[doc = "Disables the accelerometer."] -#[doc = ""] - + #[doc = "Disables the accelerometer."] + #[doc = ""] pub fn HIDUSER_DisableAccelerometer() -> Result; } extern "C" { #[must_use] -#[doc = "Enables the gyroscope."] -#[doc = ""] - + #[doc = "Enables the gyroscope."] + #[doc = ""] pub fn HIDUSER_EnableGyroscope() -> Result; } extern "C" { #[must_use] -#[doc = "Disables the gyroscope."] -#[doc = ""] - + #[doc = "Disables the gyroscope."] + #[doc = ""] pub fn HIDUSER_DisableGyroscope() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the gyroscope raw to dps coefficient."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `coeff` - Pointer to output the coefficient to."] - + #[doc = "Gets the gyroscope raw to dps coefficient."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coeff` - Pointer to output the coefficient to."] pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current volume slider value. (0-63)"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `volume` - Pointer to write the volume slider value to."] - + #[doc = "Gets the current volume slider value. (0-63)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `volume` - Pointer to write the volume slider value to."] pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result; } extern "C" { -#[doc = "IRRST's shared memory handle."] -#[doc = ""] - + #[doc = "IRRST's shared memory handle."] + #[doc = ""] pub static mut irrstMemHandle: Handle; } extern "C" { -#[doc = "IRRST's shared memory."] -#[doc = ""] - + #[doc = "IRRST's shared memory."] + #[doc = ""] pub static mut irrstSharedMem: *mut vu32; } extern "C" { -#[doc = "IRRST's state update event"] -#[doc = ""] - + #[doc = "IRRST's state update event"] + #[doc = ""] pub static mut irrstEvent: Handle; } extern "C" { #[must_use] -#[doc = "Initializes IRRST."] -#[doc = ""] - + #[doc = "Initializes IRRST."] + #[doc = ""] pub fn irrstInit() -> Result; } extern "C" { -#[doc = "Exits IRRST."] -#[doc = ""] - + #[doc = "Exits IRRST."] + #[doc = ""] pub fn irrstExit(); } extern "C" { -#[doc = "Scans IRRST for input."] -#[doc = ""] - + #[doc = "Scans IRRST for input."] + #[doc = ""] pub fn irrstScanInput(); } extern "C" { -#[doc = "Gets IRRST's held keys."] -#[doc = ""] -#[doc = "Returns: IRRST's held keys."] -#[doc = ""] - + #[doc = "Gets IRRST's held keys."] + #[doc = ""] + #[doc = "Returns: IRRST's held keys."] + #[doc = ""] pub fn irrstKeysHeld() -> u32_; } extern "C" { -#[doc = "Reads the current c-stick position."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pos` - Pointer to output the current c-stick position to."] - + #[doc = "Reads the current c-stick position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Pointer to output the current c-stick position to."] pub fn irrstCstickRead(pos: *mut circlePosition); } extern "C" { -#[doc = "Waits for the IRRST input event to trigger."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nextEvent` - Whether to discard the current event and wait until the next event."] - + #[doc = "Waits for the IRRST input event to trigger."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nextEvent` - Whether to discard the current event and wait until the next event."] pub fn irrstWaitForEvent(nextEvent: bool); } extern "C" { #[must_use] -#[doc = "Gets the shared memory and event handles for IRRST."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `outMemHandle` - Pointer to write the shared memory handle to."] -#[doc = "* `outEventHandle` - Pointer to write the event handle to."] - + #[doc = "Gets the shared memory and event handles for IRRST."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMemHandle` - Pointer to write the shared memory handle to."] + #[doc = "* `outEventHandle` - Pointer to write the event handle to."] pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes IRRST."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `unk1` - Unknown."] -#[doc = "* `unk2` - Unknown."] - + #[doc = "Initializes IRRST."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk1` - Unknown."] + #[doc = "* `unk2` - Unknown."] pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Shuts down IRRST."] -#[doc = ""] - + #[doc = "Shuts down IRRST."] + #[doc = ""] pub fn IRRST_Shutdown() -> Result; } #[doc = "sslc context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct sslcContext { -#[doc = "Service handle."] -#[doc = ""] - + #[doc = "Service handle."] + #[doc = ""] pub servhandle: Handle, -#[doc = "SSLC handle."] -#[doc = ""] - + #[doc = "SSLC handle."] + #[doc = ""] pub sslchandle: u32_, pub sharedmem_handle: Handle, } @@ -20138,47 +18738,42 @@ pub const SSLCOPT_TLSv10: _bindgen_ty_23 = 2048; pub type _bindgen_ty_23 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] -#[doc = ""] - + #[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] + #[doc = ""] pub fn sslcInit(session_handle: Handle) -> Result; } extern "C" { -#[doc = "Exits SSLC."] -#[doc = ""] - + #[doc = "Exits SSLC."] + #[doc = ""] pub fn sslcExit(); } extern "C" { #[must_use] -#[doc = "Creates a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - Output contexthandle."] - + #[doc = "Creates a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - Output contexthandle."] pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Destroys a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain contexthandle."] - + #[doc = "Destroys a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain contexthandle."] pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a trusted RootCA cert to a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "* `cert` - Pointer to the DER cert."] -#[doc = "* `certsize` - Size of the DER cert."] - + #[doc = "Adds a trusted RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert` - Pointer to the DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] pub fn sslcAddTrustedRootCA( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -20188,14 +18783,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default RootCA cert to a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "* `certID` - ID of the cert to add."] -#[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] - + #[doc = "Adds a default RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `certID` - ID of the cert to add."] + #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] pub fn sslcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -20204,13 +18798,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Removes the specified cert from the RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] - + #[doc = "Removes the specified cert from the RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] pub fn sslcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -20218,34 +18811,31 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates an unknown CertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `CertChain_contexthandle` - Output contexthandle."] - + #[doc = "Creates an unknown CertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - Output contexthandle."] pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Destroys a CertChain from sslcCreate8CertChain()."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `CertChain_contexthandle` - CertChain contexthandle."] - + #[doc = "Destroys a CertChain from sslcCreate8CertChain()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain contexthandle."] pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `CertChain_contexthandle` - CertChain to use."] -#[doc = "* `cert` - Pointer to the cert."] -#[doc = "* `certsize` - Size of the cert."] - + #[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain to use."] + #[doc = "* `cert` - Pointer to the cert."] + #[doc = "* `certsize` - Size of the cert."] pub fn sslc8CertChainAddCert( CertChain_contexthandle: u32_, cert: *const u8_, @@ -20255,14 +18845,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `CertChain_contexthandle` - CertChain to use."] -#[doc = "* `certID` - ID of the cert to add."] -#[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] - + #[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain to use."] + #[doc = "* `certID` - ID of the cert to add."] + #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] pub fn sslc8CertChainAddDefaultCert( CertChain_contexthandle: u32_, certID: u8_, @@ -20271,13 +18860,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `CertChain_contexthandle` - CertChain to use."] -#[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the CertChain."] - + #[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain to use."] + #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the CertChain."] pub fn sslc8CertChainRemoveCert( CertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -20285,16 +18873,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a new ClientCert-context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cert` - Pointer to the DER cert."] -#[doc = "* `certsize` - Size of the DER cert."] -#[doc = "* `key` - Pointer to the DER key."] -#[doc = "* `keysize` - Size of the DER key."] -#[doc = "* `ClientCert_contexthandle` - Output contexthandle."] - + #[doc = "Opens a new ClientCert-context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cert` - Pointer to the DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `key` - Pointer to the DER key."] + #[doc = "* `keysize` - Size of the DER key."] + #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] pub fn sslcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -20305,13 +18892,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a ClientCert-context with a default certID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `certID` - ID of the ClientCert to use."] -#[doc = "* `ClientCert_contexthandle` - Output contexthandle."] - + #[doc = "Opens a ClientCert-context with a default certID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `certID` - ID of the ClientCert to use."] + #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] pub fn sslcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -20319,43 +18905,39 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes the specified ClientCert-context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ClientCert_contexthandle` - ClientCert-context to use."] - + #[doc = "Closes the specified ClientCert-context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ClientCert_contexthandle` - ClientCert-context to use."] pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "This uses ps:ps SeedRNG internally."] -#[doc = ""] - + #[doc = "This uses ps:ps SeedRNG internally."] + #[doc = ""] pub fn sslcSeedRNG() -> Result; } extern "C" { #[must_use] -#[doc = "This uses ps:ps GenerateRandomData internally."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Output buffer."] -#[doc = "* `size` - Output size."] - + #[doc = "This uses ps:ps GenerateRandomData internally."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Output buffer."] + #[doc = "* `size` - Output size."] pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a sslc context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - sslc context."] -#[doc = "* `sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] -#[doc = "* `input_opt` - Input sslc options bitmask."] -#[doc = "* `hostname` - Server hostname."] - + #[doc = "Creates a sslc context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - sslc context."] + #[doc = "* `sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] + #[doc = "* `input_opt` - Input sslc options bitmask."] + #[doc = "* `hostname` - Server hostname."] pub fn sslcCreateContext( context: *mut sslcContext, sockfd: ::libc::c_int, @@ -20429,17 +19011,14 @@ extern "C" { } #[doc = "HTTP context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct httpcContext { -#[doc = "Service handle."] -#[doc = ""] - + #[doc = "Service handle."] + #[doc = ""] pub servhandle: Handle, -#[doc = "HTTP handle."] -#[doc = ""] - + #[doc = "HTTP handle."] + #[doc = ""] pub httphandle: u32_, } pub const HTTPC_METHOD_GET: HTTPC_RequestMethod = 1; @@ -20471,27 +19050,24 @@ pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1; pub type HTTPC_KeepAlive = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] -#[doc = ""] - + #[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] + #[doc = ""] pub fn httpcInit(sharedmem_size: u32_) -> Result; } extern "C" { -#[doc = "Exits HTTPC."] -#[doc = ""] - + #[doc = "Exits HTTPC."] + #[doc = ""] pub fn httpcExit(); } extern "C" { #[must_use] -#[doc = "Opens a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to open."] -#[doc = "* `url` - URL to connect to."] -#[doc = "* `use_defaultproxy` - Whether the default proxy should be used (0 for default)"] - + #[doc = "Opens a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to open."] + #[doc = "* `url` - URL to connect to."] + #[doc = "* `use_defaultproxy` - Whether the default proxy should be used (0 for default)"] pub fn httpcOpenContext( context: *mut httpcContext, method: HTTPC_RequestMethod, @@ -20501,34 +19077,31 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to close."] - + #[doc = "Closes a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to close."] pub fn httpcCloseContext(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels a HTTP connection."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to close."] - + #[doc = "Cancels a HTTP connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to close."] pub fn httpcCancelConnection(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a request header field to a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `name` - Name of the field."] -#[doc = "* `value` - Value of the field."] - + #[doc = "Adds a request header field to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - Value of the field."] pub fn httpcAddRequestHeaderField( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20537,14 +19110,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a POST form field to a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `name` - Name of the field."] -#[doc = "* `value` - Value of the field."] - + #[doc = "Adds a POST form field to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - Value of the field."] pub fn httpcAddPostDataAscii( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20553,15 +19125,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a POST form field with binary data to a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `name` - Name of the field."] -#[doc = "* `value` - The binary data to pass as a value."] -#[doc = "* `len` - Length of the binary data which has been passed."] - + #[doc = "Adds a POST form field with binary data to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - The binary data to pass as a value."] + #[doc = "* `len` - Length of the binary data which has been passed."] pub fn httpcAddPostDataBinary( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20571,49 +19142,45 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a POST body to a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `data` - The data to be passed as raw into the body of the post request."] -#[doc = "* `len` - Length of data passed by data param."] - + #[doc = "Adds a POST body to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `data` - The data to be passed as raw into the body of the post request."] + #[doc = "* `len` - Length of data passed by data param."] pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Begins a HTTP request."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] - + #[doc = "Begins a HTTP request."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] pub fn httpcBeginRequest(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] -#[doc = "Receives data from a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `buffer` - Buffer to receive data to."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Receives data from a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `buffer` - Buffer to receive data to."] + #[doc = "* `size` - Size of the buffer."] pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Receives data from a HTTP context with a timeout value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `buffer` - Buffer to receive data to."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] - + #[doc = "Receives data from a HTTP context with a timeout value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `buffer` - Buffer to receive data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] pub fn httpcReceiveDataTimeout( context: *mut httpcContext, buffer: *mut u8_, @@ -20623,13 +19190,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the request state of a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `out` - Pointer to output the HTTP request state to."] - + #[doc = "Gets the request state of a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `out` - Pointer to output the HTTP request state to."] pub fn httpcGetRequestState( context: *mut httpcContext, out: *mut HTTPC_RequestStatus, @@ -20637,14 +19203,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the download size state of a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `downloadedsize` - Pointer to output the downloaded size to."] -#[doc = "* `contentsize` - Pointer to output the total content size to."] - + #[doc = "Gets the download size state of a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `downloadedsize` - Pointer to output the downloaded size to."] + #[doc = "* `contentsize` - Pointer to output the total content size to."] pub fn httpcGetDownloadSizeState( context: *mut httpcContext, downloadedsize: *mut u32_, @@ -20653,25 +19218,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the response code of the HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to get the response code of."] -#[doc = "* `out` - Pointer to write the response code to."] - + #[doc = "Gets the response code of the HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to get the response code of."] + #[doc = "* `out` - Pointer to write the response code to."] pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the response code of the HTTP context with a timeout value."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to get the response code of."] -#[doc = "* `out` - Pointer to write the response code to."] -#[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] - + #[doc = "Gets the response code of the HTTP context with a timeout value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to get the response code of."] + #[doc = "* `out` - Pointer to write the response code to."] + #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] pub fn httpcGetResponseStatusCodeTimeout( context: *mut httpcContext, out: *mut u32_, @@ -20680,15 +19243,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a response header field from a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `name` - Name of the field."] -#[doc = "* `value` - Pointer to output the value of the field to."] -#[doc = "* `valuebuf_maxsize` - Maximum size of the value buffer."] - + #[doc = "Gets a response header field from a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - Pointer to output the value of the field to."] + #[doc = "* `valuebuf_maxsize` - Maximum size of the value buffer."] pub fn httpcGetResponseHeader( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20698,14 +19260,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a trusted RootCA cert to a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `cert` - Pointer to DER cert."] -#[doc = "* `certsize` - Size of the DER cert."] - + #[doc = "Adds a trusted RootCA cert to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] pub fn httpcAddTrustedRootCA( context: *mut httpcContext, cert: *const u8_, @@ -20714,24 +19275,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default RootCA cert to a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `certID` - ID of the cert to add, see sslc.h."] - + #[doc = "Adds a default RootCA cert to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] pub fn httpcAddDefaultCert(context: *mut httpcContext, certID: SSLC_DefaultRootCert) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the RootCertChain for a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] - + #[doc = "Sets the RootCertChain for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] pub fn httpcSelectRootCertChain( context: *mut httpcContext, RootCertChain_contexthandle: u32_, @@ -20739,16 +19298,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the ClientCert for a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `cert` - Pointer to DER cert."] -#[doc = "* `certsize` - Size of the DER cert."] -#[doc = "* `privk` - Pointer to the DER private key."] -#[doc = "* `privk_size` - Size of the privk."] - + #[doc = "Sets the ClientCert for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `privk` - Pointer to the DER private key."] + #[doc = "* `privk_size` - Size of the privk."] pub fn httpcSetClientCert( context: *mut httpcContext, cert: *const u8_, @@ -20759,13 +19317,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the default clientcert for a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `certID` - ID of the cert to add, see sslc.h."] - + #[doc = "Sets the default clientcert for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] pub fn httpcSetClientCertDefault( context: *mut httpcContext, certID: SSLC_DefaultClientCert, @@ -20773,13 +19330,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the ClientCert contexthandle for a HTTP context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to use."] -#[doc = "* `ClientCert_contexthandle` - Contexthandle for the ClientCert."] - + #[doc = "Sets the ClientCert contexthandle for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `ClientCert_contexthandle` - Contexthandle for the ClientCert."] pub fn httpcSetClientCertContext( context: *mut httpcContext, ClientCert_contexthandle: u32_, @@ -20787,61 +19343,56 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets SSL options for the context."] -#[doc = ""] -#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to set flags on."] -#[doc = "* `options` - SSL option flags."] - + #[doc = "Sets SSL options for the context."] + #[doc = ""] + #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to set flags on."] + #[doc = "* `options` - SSL option flags."] pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the SSL options which will be cleared for the context."] -#[doc = ""] -#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to clear flags on."] -#[doc = "* `options` - SSL option flags."] - + #[doc = "Sets the SSL options which will be cleared for the context."] + #[doc = ""] + #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to clear flags on."] + #[doc = "* `options` - SSL option flags."] pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - Output RootCertChain contexthandle."] - + #[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - Output RootCertChain contexthandle."] pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Destroy a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - + #[doc = "Destroy a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a RootCA cert to a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "* `cert` - Pointer to DER cert."] -#[doc = "* `certsize` - Size of the DER cert."] -#[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] - + #[doc = "Adds a RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] pub fn httpcRootCertChainAddCert( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -20851,14 +19402,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default RootCA cert to a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "* `certID` - ID of the cert to add, see sslc.h."] -#[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] - + #[doc = "Adds a default RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] pub fn httpcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -20867,13 +19417,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Removes a cert from a RootCertChain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "* `cert_contexthandle` - Contexthandle of the cert to remove."] - + #[doc = "Removes a cert from a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert_contexthandle` - Contexthandle of the cert to remove."] pub fn httpcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -20881,16 +19430,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cert` - Pointer to DER cert."] -#[doc = "* `certsize` - Size of the DER cert."] -#[doc = "* `privk` - Pointer to the DER private key."] -#[doc = "* `privk_size` - Size of the privk."] -#[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] - + #[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `privk` - Pointer to the DER private key."] + #[doc = "* `privk_size` - Size of the privk."] + #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] pub fn httpcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -20901,13 +19449,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `certID` - ID of the cert to add, see sslc.h."] -#[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] - + #[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] pub fn httpcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -20915,27 +19462,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes a ClientCert context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ClientCert_contexthandle` - ClientCert context to use."] - + #[doc = "Closes a ClientCert context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ClientCert_contexthandle` - ClientCert context to use."] pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Downloads data from the HTTP context into a buffer."] -#[doc = ""] -#[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to download data from."] -#[doc = "* `buffer` - Buffer to write data to."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `downloadedsize` - Pointer to write the size of the downloaded data to."] - + #[doc = "Downloads data from the HTTP context into a buffer."] + #[doc = ""] + #[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to download data from."] + #[doc = "* `buffer` - Buffer to write data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `downloadedsize` - Pointer to write the size of the downloaded data to."] pub fn httpcDownloadData( context: *mut httpcContext, buffer: *mut u8_, @@ -20945,18 +19490,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets Keep-Alive for the context."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context` - Context to set the KeepAlive flag on."] -#[doc = "* `option` - HTTPC_KeepAlive option."] - + #[doc = "Sets Keep-Alive for the context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to set the KeepAlive flag on."] + #[doc = "* `option` - HTTPC_KeepAlive option."] pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result; } #[doc = "Node info struct."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct udsNodeInfo { @@ -21000,7 +19543,6 @@ impl Default for udsNodeInfo { } #[doc = "Connection status struct."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct udsConnectionStatus { @@ -21015,7 +19557,6 @@ pub struct udsConnectionStatus { } #[doc = "Network struct stored as big-endian."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct udsNetworkStruct { @@ -21057,7 +19598,6 @@ pub struct udsBindContext { } #[doc = "General NWM input structure used for AP scanning."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nwmScanInputStruct { @@ -21079,7 +19619,6 @@ impl Default for nwmScanInputStruct { } #[doc = "General NWM output structure from AP scanning."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyHeader { @@ -21089,7 +19628,6 @@ pub struct nwmBeaconDataReplyHeader { } #[doc = "General NWM output structure from AP scanning, for each entry."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyEntry { @@ -21105,7 +19643,6 @@ pub struct nwmBeaconDataReplyEntry { } #[doc = "Output structure generated from host scanning output."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct udsNetworkScanInfo { @@ -21135,30 +19672,27 @@ pub const UDSCONTYPE_Spectator: udsConnectionType = 2; pub type udsConnectionType = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes UDS."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sharedmem_size` - This must be 0x1000-byte aligned."] -#[doc = "* `username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] - + #[doc = "Initializes UDS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sharedmem_size` - This must be 0x1000-byte aligned."] + #[doc = "* `username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result; } extern "C" { -#[doc = "Exits UDS."] -#[doc = ""] - + #[doc = "Exits UDS."] + #[doc = ""] pub fn udsExit(); } extern "C" { #[must_use] -#[doc = "Generates a NodeInfo struct with data loaded from system-config."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nodeinfo` - Output NodeInfo struct."] -#[doc = "* `username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] - + #[doc = "Generates a NodeInfo struct with data loaded from system-config."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nodeinfo` - Output NodeInfo struct."] + #[doc = "* `username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] pub fn udsGenerateNodeInfo( nodeinfo: *mut udsNodeInfo, username: *const ::libc::c_char, @@ -21166,37 +19700,34 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nodeinfo` - Input NodeInfo struct."] -#[doc = "* `username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] - + #[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nodeinfo` - Input NodeInfo struct."] + #[doc = "* `username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] pub fn udsGetNodeInfoUsername( nodeinfo: *const udsNodeInfo, username: *mut ::libc::c_char, ) -> Result; } extern "C" { -#[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nodeinfo` - Input NodeInfo struct."] - + #[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nodeinfo` - Input NodeInfo struct."] pub fn udsCheckNodeInfoInitialized(nodeinfo: *const udsNodeInfo) -> bool; } extern "C" { -#[doc = "Generates a default NetworkStruct for creating networks."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `network` - The output struct."] -#[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] -#[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] -#[doc = "* `max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] - + #[doc = "Generates a default NetworkStruct for creating networks."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `network` - The output struct."] + #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] + #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] + #[doc = "* `max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] pub fn udsGenerateDefaultNetworkStruct( network: *mut udsNetworkStruct, wlancommID: u32_, @@ -21206,16 +19737,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Scans for networks via beacon-scanning."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `outbuf` - Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] -#[doc = "* `maxsize` - Max size of the buffer."] -#[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] -#[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] -#[doc = "* `host_macaddress` - When set, this code will only return network info from the specified host MAC address."] - + #[doc = "Scans for networks via beacon-scanning."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outbuf` - Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] + #[doc = "* `maxsize` - Max size of the buffer."] + #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] + #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] + #[doc = "* `host_macaddress` - When set, this code will only return network info from the specified host MAC address."] pub fn udsScanBeacons( outbuf: *mut ::libc::c_void, maxsize: size_t, @@ -21229,25 +19759,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Appdata buffer."] -#[doc = "* `size` - Size of the input appdata."] - + #[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Appdata buffer."] + #[doc = "* `size` - Size of the input appdata."] pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Appdata buffer."] -#[doc = "* `size` - Max size of the output buffer."] -#[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] - + #[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Appdata buffer."] + #[doc = "* `size` - Max size of the output buffer."] + #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] pub fn udsGetApplicationData( buf: *mut ::libc::c_void, size: size_t, @@ -21256,14 +19784,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Appdata buffer."] -#[doc = "* `size` - Max size of the output buffer."] -#[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] - + #[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Appdata buffer."] + #[doc = "* `size` - Max size of the output buffer."] + #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] pub fn udsGetNetworkStructApplicationData( network: *const udsNetworkStruct, buf: *mut ::libc::c_void, @@ -21273,16 +19800,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Create a bind."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bindcontext` - The output bind context."] -#[doc = "* `NetworkNodeID` - This is the NetworkNodeID which this bind can receive data from."] -#[doc = "* `spectator` - False for a regular bind, true for a spectator."] -#[doc = "* `data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] -#[doc = "* `recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] - + #[doc = "Create a bind."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - The output bind context."] + #[doc = "* `NetworkNodeID` - This is the NetworkNodeID which this bind can receive data from."] + #[doc = "* `spectator` - False for a regular bind, true for a spectator."] + #[doc = "* `data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] + #[doc = "* `recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] pub fn udsBind( bindcontext: *mut udsBindContext, NetworkNodeID: u16_, @@ -21293,25 +19819,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Remove a bind."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bindcontext` - The bind context."] - + #[doc = "Remove a bind."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - The bind context."] pub fn udsUnbind(bindcontext: *mut udsBindContext) -> Result; } extern "C" { -#[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] -#[doc = ""] -#[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bindcontext` - The bind context."] -#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] -#[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] - + #[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] + #[doc = ""] + #[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - The bind context."] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] pub fn udsWaitDataAvailable( bindcontext: *const udsBindContext, nextEvent: bool, @@ -21320,16 +19844,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bindcontext` - Bind context."] -#[doc = "* `buf` - Output receive buffer."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] -#[doc = "* `src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] - + #[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - Bind context."] + #[doc = "* `buf` - Output receive buffer."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] + #[doc = "* `src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] pub fn udsPullPacket( bindcontext: *const udsBindContext, buf: *mut ::libc::c_void, @@ -21340,16 +19863,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends data over the network."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dst_NetworkNodeID` - Destination NetworkNodeID."] -#[doc = "* `data_channel` - See udsBind()."] -#[doc = "* `flags` - Send flags, see the UDS_SENDFLAG enum values."] -#[doc = "* `buf` - Input send buffer."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Sends data over the network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dst_NetworkNodeID` - Destination NetworkNodeID."] + #[doc = "* `data_channel` - See udsBind()."] + #[doc = "* `flags` - Send flags, see the UDS_SENDFLAG enum values."] + #[doc = "* `buf` - Input send buffer."] + #[doc = "* `size` - Size of the buffer."] pub fn udsSendTo( dst_NetworkNodeID: u16_, data_channel: u8_, @@ -21360,27 +19882,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the wifi channel currently being used."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `channel` - Output channel."] - + #[doc = "Gets the wifi channel currently being used."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Output channel."] pub fn udsGetChannel(channel: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Starts hosting a new network."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `network` - The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] -#[doc = "* `passphrase` - Raw input passphrase buffer."] -#[doc = "* `passphrase_size` - Size of the passphrase buffer."] -#[doc = "* `context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] -#[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] -#[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] - + #[doc = "Starts hosting a new network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `network` - The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] + #[doc = "* `passphrase` - Raw input passphrase buffer."] + #[doc = "* `passphrase_size` - Size of the passphrase buffer."] + #[doc = "* `context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] + #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] + #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] pub fn udsCreateNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -21392,19 +19912,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Connect to a network."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `network` - The NetworkStruct, you can use udsScanBeacons() for this."] -#[doc = "* `passphrase` - Raw input passphrase buffer."] -#[doc = "* `passphrase_size` - Size of the passphrase buffer."] -#[doc = "* `context` - Optional output bind context which will be created for this host."] -#[doc = "* `recv_NetworkNodeID` - This is the NetworkNodeID passed to udsBind() internally."] -#[doc = "* `connection_type` - Type of connection, see the udsConnectionType enum values."] -#[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] -#[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] - + #[doc = "Connect to a network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `network` - The NetworkStruct, you can use udsScanBeacons() for this."] + #[doc = "* `passphrase` - Raw input passphrase buffer."] + #[doc = "* `passphrase_size` - Size of the passphrase buffer."] + #[doc = "* `context` - Optional output bind context which will be created for this host."] + #[doc = "* `recv_NetworkNodeID` - This is the NetworkNodeID passed to udsBind() internally."] + #[doc = "* `connection_type` - Type of connection, see the udsConnectionType enum values."] + #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] + #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] pub fn udsConnectNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -21418,96 +19937,86 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Stop hosting the network."] -#[doc = ""] - + #[doc = "Stop hosting the network."] + #[doc = ""] pub fn udsDestroyNetwork() -> Result; } extern "C" { #[must_use] -#[doc = "Disconnect this client device from the network."] -#[doc = ""] - + #[doc = "Disconnect this client device from the network."] + #[doc = ""] pub fn udsDisconnectNetwork() -> Result; } extern "C" { #[must_use] -#[doc = "This can be used by the host to force-disconnect client(s)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] - + #[doc = "This can be used by the host to force-disconnect client(s)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] pub fn udsEjectClient(NetworkNodeID: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] -#[doc = ""] - + #[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] + #[doc = ""] pub fn udsEjectSpectator() -> Result; } extern "C" { #[must_use] -#[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] -#[doc = "* `flag` - When false, bit-clear, otherwise bit-set."] - + #[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] + #[doc = "* `flag` - When false, bit-clear, otherwise bit-set."] pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result; } extern "C" { #[must_use] -#[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] -#[doc = "* `clients` - When true, (un)block regular clients."] -#[doc = "* `flag` - When true, update UDSNETATTR_x4. Normally this should be false."] - + #[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] + #[doc = "* `clients` - When true, (un)block regular clients."] + #[doc = "* `flag` - When true, update UDSNETATTR_x4. Normally this should be false."] pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result; } extern "C" { #[must_use] -#[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] -#[doc = ""] - + #[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] + #[doc = ""] pub fn udsAllowSpectators() -> Result; } extern "C" { #[must_use] -#[doc = "This loads the current ConnectionStatus struct."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `output` - Output ConnectionStatus struct."] - + #[doc = "This loads the current ConnectionStatus struct."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `output` - Output ConnectionStatus struct."] pub fn udsGetConnectionStatus(output: *mut udsConnectionStatus) -> Result; } extern "C" { -#[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] -#[doc = ""] -#[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] -#[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] - + #[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] + #[doc = ""] + #[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool; } extern "C" { #[must_use] -#[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `NetworkNodeID` - Target NetworkNodeID."] -#[doc = "* `output` - Output NodeInfo struct."] - + #[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NetworkNodeID` - Target NetworkNodeID."] + #[doc = "* `output` - Output NodeInfo struct."] pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result; } pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0; @@ -21558,167 +20067,148 @@ pub const NDM_DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3; pub type ndmDaemonStatus = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes ndmu."] -#[doc = ""] - + #[doc = "Initializes ndmu."] + #[doc = ""] pub fn ndmuInit() -> Result; } extern "C" { -#[doc = "Exits ndmu."] -#[doc = ""] - + #[doc = "Exits ndmu."] + #[doc = ""] pub fn ndmuExit(); } extern "C" { #[must_use] -#[doc = "Sets the network daemon to an exclusive state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - State specified in the ndmExclusiveState enumerator."] - + #[doc = "Sets the network daemon to an exclusive state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - State specified in the ndmExclusiveState enumerator."] pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels an exclusive state for the network daemon."] -#[doc = ""] - + #[doc = "Cancels an exclusive state for the network daemon."] + #[doc = ""] pub fn NDMU_LeaveExclusiveState() -> Result; } extern "C" { #[must_use] -#[doc = "Returns the exclusive state for the network daemon."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to write the exclsuive state to."] - + #[doc = "Returns the exclusive state for the network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the exclsuive state to."] pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result; } extern "C" { #[must_use] -#[doc = "Locks the exclusive state."] -#[doc = ""] - + #[doc = "Locks the exclusive state."] + #[doc = ""] pub fn NDMU_LockState() -> Result; } extern "C" { #[must_use] -#[doc = "Unlocks the exclusive state."] -#[doc = ""] - + #[doc = "Unlocks the exclusive state."] + #[doc = ""] pub fn NDMU_UnlockState() -> Result; } extern "C" { #[must_use] -#[doc = "Suspends network daemon."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mask` - The specified daemon."] - + #[doc = "Suspends network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mask` - The specified daemon."] pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] -#[doc = "Resumes network daemon."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mask` - The specified daemon."] - + #[doc = "Resumes network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mask` - The specified daemon."] pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] -#[doc = "Suspends scheduling for all network daemons."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `flag` - 0 = Wait for completion, 1 = Perform in background."] - + #[doc = "Suspends scheduling for all network daemons."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flag` - 0 = Wait for completion, 1 = Perform in background."] pub fn NDMU_SuspendScheduler(flag: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Resumes daemon scheduling."] -#[doc = ""] - + #[doc = "Resumes daemon scheduling."] + #[doc = ""] pub fn NDMU_ResumeScheduler() -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current state for the network daemon."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to write the current state to."] - + #[doc = "Returns the current state for the network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the current state to."] pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the daemon state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to write the daemons state to."] - + #[doc = "Returns the daemon state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the daemons state to."] pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the scan interval."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `interval` - Value to set the scan interval to."] - + #[doc = "Sets the scan interval."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Value to set the scan interval to."] pub fn NDMU_SetScanInterval(interval: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the scan interval."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `interval` - Pointer to write the interval value to."] - + #[doc = "Returns the scan interval."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Pointer to write the interval value to."] pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the retry interval."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `interval` - Pointer to write the interval value to."] - + #[doc = "Returns the retry interval."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Pointer to write the interval value to."] pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Reverts network daemon to defaults."] -#[doc = ""] - + #[doc = "Reverts network daemon to defaults."] + #[doc = ""] pub fn NDMU_ResetDaemons() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current default daemon bit mask."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] - + #[doc = "Gets the current default daemon bit mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result; } extern "C" { #[must_use] -#[doc = "Clears half awake mac filter."] -#[doc = ""] - + #[doc = "Clears half awake mac filter."] + #[doc = ""] pub fn NDMU_ClearMacFilter() -> Result; } #[doc = "Initial installation"] @@ -21795,83 +20285,68 @@ pub const DS_INVALID: NIM_DownloadState = 11; pub type NIM_DownloadState = ::libc::c_uint; #[doc = "Input configuration for NIM download/installation tasks."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleConfig { -#[doc = "Title ID"] -#[doc = ""] - + #[doc = "Title ID"] + #[doc = ""] pub titleId: u64_, -#[doc = "Title version"] -#[doc = ""] - + #[doc = "Title version"] + #[doc = ""] pub version: u32_, -#[doc = "Always 0"] -#[doc = ""] - + #[doc = "Always 0"] + #[doc = ""] pub unknown_0: u32_, -#[doc = "Age for the HOME Menu parental controls"] -#[doc = ""] - + #[doc = "Age for the HOME Menu parental controls"] + #[doc = ""] pub ratingAge: u8_, -#[doc = "Media type, see @ref FS_MediaType enum"] -#[doc = ""] - + #[doc = "Media type, see @ref FS_MediaType enum"] + #[doc = ""] pub mediaType: u8_, -#[doc = "Padding"] -#[doc = ""] - + #[doc = "Padding"] + #[doc = ""] pub padding: [u8_; 2usize], -#[doc = "Unknown input, seems to be always 0"] -#[doc = ""] - + #[doc = "Unknown input, seems to be always 0"] + #[doc = ""] pub unknown_1: u32_, } #[doc = "Output struct for NIM downloads/installations in progress."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleProgress { -#[doc = "State, see NIM_DownloadState enum"] -#[doc = ""] - + #[doc = "State, see NIM_DownloadState enum"] + #[doc = ""] pub state: u32_, -#[doc = "Last result code in NIM"] -#[doc = ""] - + #[doc = "Last result code in NIM"] + #[doc = ""] pub lastResult: Result, -#[doc = "Amount of bytes that have been downloaded"] -#[doc = ""] - + #[doc = "Amount of bytes that have been downloaded"] + #[doc = ""] pub downloadedSize: u64_, -#[doc = "Amount of bytes that need to be downloaded in total"] -#[doc = ""] - + #[doc = "Amount of bytes that need to be downloaded in total"] + #[doc = ""] pub totalSize: u64_, } extern "C" { #[must_use] -#[doc = "Initializes nim:s. This uses networking and is blocking."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] -#[doc = "* `buffer_len` - Length of the passed buffer."] - + #[doc = "Initializes nim:s. This uses networking and is blocking."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] + #[doc = "* `buffer_len` - Length of the passed buffer."] pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] -#[doc = "* `buffer_len` - Length of the passed buffer."] -#[doc = "* `TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use @ref nimsInit instead."] - + #[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] + #[doc = "* `buffer_len` - Length of the passed buffer."] + #[doc = "* `TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use @ref nimsInit instead."] pub fn nimsInitWithTIN( buffer: *mut ::libc::c_void, buffer_len: size_t, @@ -21879,49 +20354,44 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Exits nim:s."] -#[doc = ""] - + #[doc = "Exits nim:s."] + #[doc = ""] pub fn nimsExit(); } extern "C" { -#[doc = "Gets the current nim:s session handle."] -#[doc = ""] - + #[doc = "Gets the current nim:s session handle."] + #[doc = ""] pub fn nimsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Sets an attribute."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `attr` - Name of the attribute."] -#[doc = "* `val` - Value of the attribute."] - + #[doc = "Sets an attribute."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `attr` - Name of the attribute."] + #[doc = "* `val` - Value of the attribute."] pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if nim wants a system update."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `want_update` - Set to true if a system update is required. Can be NULL."] - + #[doc = "Checks if nim wants a system update."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `want_update` - Set to true if a system update is required. Can be NULL."] pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result; } extern "C" { -#[doc = "Makes a TitleConfig struct for use with @ref NIMS_RegisterTask, @ref NIMS_StartDownload or @ref NIMS_StartDownloadSimple."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cfg` - Struct to initialize."] -#[doc = "* `titleId` - Title ID to download and install."] -#[doc = "* `version` - Version of the title to download and install."] -#[doc = "* `ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] -#[doc = "* `mediaType` - Media type of the title to download and install."] - + #[doc = "Makes a TitleConfig struct for use with @ref NIMS_RegisterTask, @ref NIMS_StartDownload or @ref NIMS_StartDownloadSimple."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Struct to initialize."] + #[doc = "* `titleId` - Title ID to download and install."] + #[doc = "* `version` - Version of the title to download and install."] + #[doc = "* `ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] + #[doc = "* `mediaType` - Media type of the title to download and install."] pub fn NIMS_MakeTitleConfig( cfg: *mut NIM_TitleConfig, titleId: u64_, @@ -21932,14 +20402,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] -#[doc = "* `name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] -#[doc = "* `maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] - + #[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] + #[doc = "* `name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] + #[doc = "* `maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] pub fn NIMS_RegisterTask( cfg: *const NIM_TitleConfig, name: *const ::libc::c_char, @@ -21948,61 +20417,55 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks whether a background download task for the given title is registered with NIM."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleId` - Title ID to check for."] -#[doc = "* `registered` - Whether there is a background download task registered."] - + #[doc = "Checks whether a background download task for the given title is registered with NIM."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Title ID to check for."] + #[doc = "* `registered` - Whether there is a background download task registered."] pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Unregisters a background download task."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleId` - Title ID whose background download task to cancel."] - + #[doc = "Unregisters a background download task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Title ID whose background download task to cancel."] pub fn NIMS_UnregisterTask(titleId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Starts an active download with NIM. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] -#[doc = "* `mode` - The installation mode to use. See @ref NIM_InstallationMode."] - + #[doc = "Starts an active download with NIM. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] + #[doc = "* `mode` - The installation mode to use. See @ref NIM_InstallationMode."] pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result; } extern "C" { #[must_use] -#[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] - + #[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] pub fn NIMS_StartDownloadSimple(cfg: *const NIM_TitleConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Checks the status of the current active download."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `tp` - Title progress struct to write to. See @ref NIM_TitleProgress."] - + #[doc = "Checks the status of the current active download."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tp` - Title progress struct to write to. See @ref NIM_TitleProgress."] pub fn NIMS_GetProgress(tp: *mut NIM_TitleProgress) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels the current active download with NIM."] -#[doc = ""] - + #[doc = "Cancels the current active download with NIM."] + #[doc = ""] pub fn NIMS_CancelDownload() -> Result; } extern "C" { @@ -22014,65 +20477,59 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Turns wireless on or off."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `enableWifi` - True enables it, false disables it."] - + #[doc = "Turns wireless on or off."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enableWifi` - True enables it, false disables it."] pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes IRU."] -#[doc = ""] -#[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sharedmem_addr` - Address of the shared memory block to use."] -#[doc = "* `sharedmem_size` - Size of the shared memory block."] - + #[doc = "Initializes IRU."] + #[doc = ""] + #[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sharedmem_addr` - Address of the shared memory block to use."] + #[doc = "* `sharedmem_size` - Size of the shared memory block."] pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result; } extern "C" { -#[doc = "Shuts down IRU."] -#[doc = ""] - + #[doc = "Shuts down IRU."] + #[doc = ""] pub fn iruExit(); } extern "C" { -#[doc = "Gets the IRU service handle."] -#[doc = ""] -#[doc = "Returns: The IRU service handle."] -#[doc = ""] - + #[doc = "Gets the IRU service handle."] + #[doc = ""] + #[doc = "Returns: The IRU service handle."] + #[doc = ""] pub fn iruGetServHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Sends IR data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Buffer to send data from."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `wait` - Whether to wait for the data to be sent."] - + #[doc = "Sends IR data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to send data from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `wait` - Whether to wait for the data to be sent."] pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Receives IR data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Buffer to receive data to."] -#[doc = "* `size` - Size of the buffer."] -#[doc = "* `flag` - Flags to receive data with."] -#[doc = "* `transfercount` - Pointer to output the number of bytes read to."] -#[doc = "* `wait` - Whether to wait for the data to be received."] - + #[doc = "Receives IR data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to receive data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `flag` - Flags to receive data with."] + #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] + #[doc = "* `wait` - Whether to wait for the data to be received."] pub fn iruRecvData( buf: *mut u8_, size: u32_, @@ -22083,177 +20540,158 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes the IR session."] -#[doc = ""] - + #[doc = "Initializes the IR session."] + #[doc = ""] pub fn IRU_Initialize() -> Result; } extern "C" { #[must_use] -#[doc = "Shuts down the IR session."] -#[doc = ""] - + #[doc = "Shuts down the IR session."] + #[doc = ""] pub fn IRU_Shutdown() -> Result; } extern "C" { #[must_use] -#[doc = "Begins sending data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Buffer to send."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Begins sending data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to send."] + #[doc = "* `size` - Size of the buffer."] pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for a send operation to complete."] -#[doc = ""] - + #[doc = "Waits for a send operation to complete."] + #[doc = ""] pub fn IRU_WaitSendTransfer() -> Result; } extern "C" { #[must_use] -#[doc = "Begins receiving data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the data to receive."] -#[doc = "* `flag` - Flags to use when receiving."] - + #[doc = "Begins receiving data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to receive."] + #[doc = "* `flag` - Flags to use when receiving."] pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for a receive operation to complete."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `transfercount` - Pointer to output the number of bytes read to."] - + #[doc = "Waits for a receive operation to complete."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the IR bit rate."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Bit rate to set."] - + #[doc = "Sets the IR bit rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Bit rate to set."] pub fn IRU_SetBitRate(value: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the IR bit rate."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the bit rate to."] - + #[doc = "Gets the IR bit rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the bit rate to."] pub fn IRU_GetBitRate(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the IR LED state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - IR LED state to set."] - + #[doc = "Sets the IR LED state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - IR LED state to set."] pub fn IRU_SetIRLEDState(value: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the IR LED state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the IR LED state to."] - + #[doc = "Gets the IR LED state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the IR LED state to."] pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes NS."] -#[doc = ""] - + #[doc = "Initializes NS."] + #[doc = ""] pub fn nsInit() -> Result; } extern "C" { -#[doc = "Exits NS."] -#[doc = ""] - + #[doc = "Exits NS."] + #[doc = ""] pub fn nsExit(); } extern "C" { #[must_use] -#[doc = "Launches a title and the required firmware (only if necessary)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] - + #[doc = "Launches a title and the required firmware (only if necessary)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] pub fn NS_LaunchFIRM(titleid: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Launches a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleid` - ID of the title to launch, or 0 for gamecard."] -#[doc = "* `launch_flags` - Flags used when launching the title."] -#[doc = "* `procid` - Pointer to write the process ID of the launched title to."] - + #[doc = "Launches a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to launch, or 0 for gamecard."] + #[doc = "* `launch_flags` - Flags used when launching the title."] + #[doc = "* `procid` - Pointer to write the process ID of the launched title to."] pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the application from which this function is called"] -#[doc = ""] - + #[doc = "Terminates the application from which this function is called"] + #[doc = ""] pub fn NS_TerminateTitle() -> Result; } extern "C" { #[must_use] -#[doc = "Launches a title and the required firmware."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleid` - ID of the title to launch, 0 for gamecard."] -#[doc = "* `flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] - + #[doc = "Launches a title and the required firmware."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard."] + #[doc = "* `flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Reboots to a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mediatype` - Mediatype of the title."] -#[doc = "* `titleid` - ID of the title to launch."] - + #[doc = "Reboots to a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Mediatype of the title."] + #[doc = "* `titleid` - ID of the title to launch."] pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the process with the specified titleid."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleid` - ID of the title to terminate."] -#[doc = "* `timeout` - Timeout in nanoseconds. Pass 0 if not required."] - + #[doc = "Terminates the process with the specified titleid."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to terminate."] + #[doc = "* `timeout` - Timeout in nanoseconds. Pass 0 if not required."] pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Reboots the system"] -#[doc = ""] - + #[doc = "Reboots the system"] + #[doc = ""] pub fn NS_RebootSystem() -> Result; } pub const PMLAUNCHFLAG_NORMAL_APPLICATION: _bindgen_ty_26 = 1; @@ -22276,46 +20714,41 @@ pub const PMLAUNCHFLAG_USE_UPDATE_TITLE: _bindgen_ty_26 = 65536; pub type _bindgen_ty_26 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes pm:app."] -#[doc = ""] - + #[doc = "Initializes pm:app."] + #[doc = ""] pub fn pmAppInit() -> Result; } extern "C" { -#[doc = "Exits pm:app."] -#[doc = ""] - + #[doc = "Exits pm:app."] + #[doc = ""] pub fn pmAppExit(); } extern "C" { -#[doc = "Gets the current pm:app session handle."] -#[doc = ""] -#[doc = "Returns: The current pm:app session handle."] -#[doc = ""] - + #[doc = "Gets the current pm:app session handle."] + #[doc = ""] + #[doc = "Returns: The current pm:app session handle."] + #[doc = ""] pub fn pmAppGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Launches a title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programInfo` - Program information of the title."] -#[doc = "* `launchFlags` - Flags to launch the title with."] - + #[doc = "Launches a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Launches a title, applying patches."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programInfo` - Program information of the title."] -#[doc = "* `programInfoUpdate` - Program information of the update title."] -#[doc = "* `launchFlags` - Flags to launch the title with."] - + #[doc = "Launches a title, applying patches."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `programInfoUpdate` - Program information of the update title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] pub fn PMAPP_LaunchTitleUpdate( programInfo: *const FS_ProgramInfo, programInfoUpdate: *const FS_ProgramInfo, @@ -22324,14 +20757,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] -#[doc = "* `outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] -#[doc = "* `programInfo` - Program information of the title."] - + #[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] + #[doc = "* `outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] + #[doc = "* `programInfo` - Program information of the title."] pub fn PMAPP_GetTitleExheaderFlags( outCoreInfo: *mut ExHeader_Arm11CoreInfo, outSiFlags: *mut ExHeader_SystemInfoFlags, @@ -22340,36 +20772,33 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the current FIRM launch parameters."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the FIRM launch parameter buffer."] -#[doc = "* `in` - Buffer to retrieve the launch parameters from."] - + #[doc = "Sets the current FIRM launch parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the FIRM launch parameter buffer."] + #[doc = "* `in` - Buffer to retrieve the launch parameters from."] pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current FIRM launch parameters."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the FIRM launch parameter buffer."] -#[doc = "* `out` - Buffer to write the launch parameters to. [Direction: In, Out]"] - + #[doc = "Gets the current FIRM launch parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the FIRM launch parameter buffer."] + #[doc = "* `out` - Buffer to write the launch parameters to. [Direction: In, Out]"] pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current FIRM launch parameters."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `firmTidLow` - Low Title ID of the FIRM title to launch."] -#[doc = "* `size` - Size of the FIRM launch parameter buffer."] -#[doc = "* `in` - Buffer to retrieve the launch parameters from."] - + #[doc = "Sets the current FIRM launch parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `firmTidLow` - Low Title ID of the FIRM title to launch."] + #[doc = "* `size` - Size of the FIRM launch parameter buffer."] + #[doc = "* `in` - Buffer to retrieve the launch parameters from."] pub fn PMAPP_LaunchFIRMSetParams( firmTidLow: u32_, size: u32_, @@ -22378,109 +20807,98 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] - + #[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the current Application"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timeout` - Timeout in nanoseconds"] - + #[doc = "Terminates the current Application"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout` - Timeout in nanoseconds"] pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the processes having the specified titleId."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `titleId` - Title ID of the processes to terminate"] -#[doc = "* `timeout` - Timeout in nanoseconds"] - + #[doc = "Terminates the processes having the specified titleId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Title ID of the processes to terminate"] + #[doc = "* `timeout` - Timeout in nanoseconds"] pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the specified process"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pid` - Process-ID of the process to terminate"] -#[doc = "* `timeout` - Timeout in nanoseconds"] - + #[doc = "Terminates the specified process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - Process-ID of the process to terminate"] + #[doc = "* `timeout` - Timeout in nanoseconds"] pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Unregisters a process"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `tid` - TitleID of the process to unregister"] - + #[doc = "Unregisters a process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tid` - TitleID of the process to unregister"] pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the APPLICATION cputime reslimit."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cpuTime` - Reslimit value."] - + #[doc = "Sets the APPLICATION cputime reslimit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cpuTime` - Reslimit value."] pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the APPLICATION cputime reslimit."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] - + #[doc = "Gets the APPLICATION cputime reslimit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes pm:dbg."] -#[doc = ""] - + #[doc = "Initializes pm:dbg."] + #[doc = ""] pub fn pmDbgInit() -> Result; } extern "C" { -#[doc = "Exits pm:dbg."] -#[doc = ""] - + #[doc = "Exits pm:dbg."] + #[doc = ""] pub fn pmDbgExit(); } extern "C" { -#[doc = "Gets the current pm:dbg session handle."] -#[doc = ""] -#[doc = "Returns: The current pm:dbg session handle."] -#[doc = ""] - + #[doc = "Gets the current pm:dbg session handle."] + #[doc = ""] + #[doc = "Returns: The current pm:dbg session handle."] + #[doc = ""] pub fn pmDbgGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] -#[doc = ""] -#[doc = "If another process was enqueued, this just calls @ref RunQueuedProcess instead."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] -#[doc = "* `programInfo` - Program information of the title."] -#[doc = "* `launchFlags` - Flags to launch the title with."] - + #[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] + #[doc = ""] + #[doc = "If another process was enqueued, this just calls @ref RunQueuedProcess instead."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] pub fn PMDBG_LaunchAppDebug( outDebug: *mut Handle, programInfo: *const FS_ProgramInfo, @@ -22489,23 +20907,21 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Launches an application for debug after setting cpuTime to 0."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programInfo` - Program information of the title."] -#[doc = "* `launchFlags` - Flags to launch the title with."] - + #[doc = "Launches an application for debug after setting cpuTime to 0."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Runs the queued process and returns a debug handle to it."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] - + #[doc = "Runs the queued process and returns a debug handle to it."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result; } #[doc = "CBC encryption."] @@ -22582,7 +20998,6 @@ pub const PS_KEYSLOT_39_NFC: PS_AESKeyType = 9; pub type PS_AESKeyType = ::libc::c_uint; #[doc = "RSA context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct psRSAContext { @@ -22602,55 +21017,49 @@ impl Default for psRSAContext { } extern "C" { #[must_use] -#[doc = "Initializes PS."] -#[doc = ""] - + #[doc = "Initializes PS."] + #[doc = ""] pub fn psInit() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PS with the specified session handle."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Session handle."] - + #[doc = "Initializes PS with the specified session handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Session handle."] pub fn psInitHandle(handle: Handle) -> Result; } extern "C" { -#[doc = "Exits PS."] -#[doc = ""] - + #[doc = "Exits PS."] + #[doc = ""] pub fn psExit(); } extern "C" { -#[doc = "Returns the PS session handle."] -#[doc = ""] - + #[doc = "Returns the PS session handle."] + #[doc = ""] pub fn psGetSessionHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Signs a RSA signature."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `hash` - SHA256 hash to sign."] -#[doc = "* `ctx` - RSA context."] -#[doc = "* `signature` - RSA signature."] - + #[doc = "Signs a RSA signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `hash` - SHA256 hash to sign."] + #[doc = "* `ctx` - RSA context."] + #[doc = "* `signature` - RSA signature."] pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Verifies a RSA signature."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `hash` - SHA256 hash to compare with."] -#[doc = "* `ctx` - RSA context."] -#[doc = "* `signature` - RSA signature."] - + #[doc = "Verifies a RSA signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `hash` - SHA256 hash to compare with."] + #[doc = "* `ctx` - RSA context."] + #[doc = "* `signature` - RSA signature."] pub fn PS_VerifyRsaSha256( hash: *mut u8_, ctx: *mut psRSAContext, @@ -22659,17 +21068,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the data."] -#[doc = "* `in` - Input buffer."] -#[doc = "* `out` - Output buffer."] -#[doc = "* `aes_algo` - AES algorithm to use."] -#[doc = "* `key_type` - Key type to use."] -#[doc = "* `iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] - + #[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data."] + #[doc = "* `in` - Input buffer."] + #[doc = "* `out` - Output buffer."] + #[doc = "* `aes_algo` - AES algorithm to use."] + #[doc = "* `key_type` - Key type to use."] + #[doc = "* `iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] pub fn PS_EncryptDecryptAes( size: u32_, in_: *mut u8_, @@ -22681,23 +21089,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Encrypts/Decrypts signed AES CCM data."] -#[doc = ""] -#[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `in` - Input buffer."] -#[doc = "* `in_size` - Size of the input buffer. Must include MAC size when decrypting."] -#[doc = "* `out` - Output buffer."] -#[doc = "* `out_size` - Size of the output buffer. Must include MAC size when encrypting."] -#[doc = "* `data_len` - Length of the data to be encrypted/decrypted."] -#[doc = "* `mac_data_len` - Length of the MAC data."] -#[doc = "* `mac_len` - Length of the MAC."] -#[doc = "* `aes_algo` - AES algorithm to use."] -#[doc = "* `key_type` - Key type to use."] -#[doc = "* `nonce` - Pointer to the nonce."] - + #[doc = "Encrypts/Decrypts signed AES CCM data."] + #[doc = ""] + #[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `in` - Input buffer."] + #[doc = "* `in_size` - Size of the input buffer. Must include MAC size when decrypting."] + #[doc = "* `out` - Output buffer."] + #[doc = "* `out_size` - Size of the output buffer. Must include MAC size when encrypting."] + #[doc = "* `data_len` - Length of the data to be encrypted/decrypted."] + #[doc = "* `mac_data_len` - Length of the MAC data."] + #[doc = "* `mac_len` - Length of the MAC."] + #[doc = "* `aes_algo` - AES algorithm to use."] + #[doc = "* `key_type` - Key type to use."] + #[doc = "* `nonce` - Pointer to the nonce."] pub fn PS_EncryptSignDecryptVerifyAesCcm( in_: *mut u8_, in_size: u32_, @@ -22713,141 +21120,124 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the 64-bit console friend code seed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `seed` - Pointer to write the friend code seed to."] - + #[doc = "Gets the 64-bit console friend code seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to write the friend code seed to."] pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 32-bit device ID."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `device_id` - Pointer to write the device ID to."] - + #[doc = "Gets the 32-bit device ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `device_id` - Pointer to write the device ID to."] pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Generates cryptographically secure random bytes."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to the buffer to write the bytes to."] -#[doc = "* `len` - Number of bytes to write."] - + #[doc = "Generates cryptographically secure random bytes."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to the buffer to write the bytes to."] + #[doc = "* `len` - Number of bytes to write."] pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PTMU."] -#[doc = ""] - + #[doc = "Initializes PTMU."] + #[doc = ""] pub fn ptmuInit() -> Result; } extern "C" { -#[doc = "Exits PTMU."] -#[doc = ""] - + #[doc = "Exits PTMU."] + #[doc = ""] pub fn ptmuExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:u session handle."] -#[doc = ""] -#[doc = "Returns: A pointer to the current ptm:u session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:u session handle."] + #[doc = ""] + #[doc = "Returns: A pointer to the current ptm:u session handle."] + #[doc = ""] pub fn ptmuGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the system's current shell state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] - + #[doc = "Gets the system's current shell state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] pub fn PTMU_GetShellState(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's current battery level."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the current battery level to. (0-5)"] - + #[doc = "Gets the system's current battery level."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current battery level to. (0-5)"] pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's current battery charge state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] - + #[doc = "Gets the system's current battery charge state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's current pedometer state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] - + #[doc = "Gets the system's current pedometer state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the pedometer's total step count."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `steps` - Pointer to write the total step count to."] - + #[doc = "Gets the pedometer's total step count."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `steps` - Pointer to write the total step count to."] pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the adapter is plugged in or not"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the adapter state to."] - + #[doc = "Gets whether the adapter is plugged in or not"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the adapter state to."] pub fn PTMU_GetAdapterState(out: *mut bool) -> Result; } #[doc = "PDN wake events and MCU interrupts to select, combined with those of other processes"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmWakeEvents { -#[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] -#[doc = ""] - + #[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] + #[doc = ""] pub pdn_wake_events: u32_, -#[doc = "MCU interrupts to check when a MCU wake event happens."] -#[doc = ""] - + #[doc = "MCU interrupts to check when a MCU wake event happens."] + #[doc = ""] pub mcu_interupt_mask: u32_, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmSleepConfig { -#[doc = "Wake events for which the system should fully wake up."] -#[doc = ""] - + #[doc = "Wake events for which the system should fully wake up."] + #[doc = ""] pub exit_sleep_events: PtmWakeEvents, -#[doc = "Wake events for which the system should return to sleep."] -#[doc = ""] - + #[doc = "Wake events for which the system should return to sleep."] + #[doc = ""] pub continue_sleep_events: PtmWakeEvents, } #[doc = "@ref PTMSYSM_RequestSleep has been called (ack = 3)"] @@ -22893,213 +21283,188 @@ pub const PTMNOTIFID_BATTERY_LOW: _bindgen_ty_27 = 530; pub type _bindgen_ty_27 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes ptm:sysm."] -#[doc = ""] - + #[doc = "Initializes ptm:sysm."] + #[doc = ""] pub fn ptmSysmInit() -> Result; } -extern "C" { -#[doc = "Exits ptm:sysm."] -#[doc = ""] - +extern "C" { + #[doc = "Exits ptm:sysm."] + #[doc = ""] pub fn ptmSysmExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:sysm session handle."] -#[doc = ""] -#[doc = "Returns: A pointer to the current ptm:sysm session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:sysm session handle."] + #[doc = ""] + #[doc = "Returns: A pointer to the current ptm:sysm session handle."] + #[doc = ""] pub fn ptmSysmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Requests to enter sleep mode."] -#[doc = ""] - + #[doc = "Requests to enter sleep mode."] + #[doc = ""] pub fn PTMSYSM_RequestSleep() -> Result; } extern "C" { #[must_use] -#[doc = "Accepts or denies the incoming sleep mode request."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `deny` - Whether or not to deny the sleep request."] - + #[doc = "Accepts or denies the incoming sleep mode request."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `deny` - Whether or not to deny the sleep request."] pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ackValue` - Use @ref ptmSysmGetNotificationAckValue"] - + #[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ackValue` - Use @ref ptmSysmGetNotificationAckValue"] pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sleepConfig` - Pointer to the two sets of wake events."] - + #[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sleepConfig` - Pointer to the two sets of wake events."] pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] - + #[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] -#[doc = ""] - + #[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] + #[doc = ""] pub fn PTMSYSM_Awaken() -> Result; } extern "C" { #[must_use] -#[doc = "Sets the user time by updating the user time offset."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] - + #[doc = "Sets the user time by updating the user time offset."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] pub fn PTMSYSM_SetUserTime(msY2k: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] -#[doc = ""] - + #[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] + #[doc = ""] pub fn PTMSYSM_InvalidateSystemTime() -> Result; } extern "C" { #[must_use] -#[doc = "Reads the time and date coming from the RTC and converts the result."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] - + #[doc = "Reads the time and date coming from the RTC and converts the result."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the time and date coming to the RTC, after conversion."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] - + #[doc = "Writes the time and date coming to the RTC, after conversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Returns 1 if it's a New 3DS, otherwise 0."] -#[doc = ""] - + #[doc = "Returns 1 if it's a New 3DS, otherwise 0."] + #[doc = ""] pub fn PTMSYSM_CheckNew3DS() -> Result; } extern "C" { #[must_use] -#[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `value` - Bit0: enable higher clock, Bit1: enable L2 cache."] - + #[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Bit0: enable higher clock, Bit1: enable L2 cache."] pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Trigger a hardware system shutdown via the MCU."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] - + #[doc = "Trigger a hardware system shutdown via the MCU."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Trigger a hardware system reboot via the MCU."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] - + #[doc = "Trigger a hardware system reboot via the MCU."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PTMGETS."] -#[doc = ""] - + #[doc = "Initializes PTMGETS."] + #[doc = ""] pub fn ptmGetsInit() -> Result; } extern "C" { -#[doc = "Exits PTMGETS."] -#[doc = ""] - + #[doc = "Exits PTMGETS."] + #[doc = ""] pub fn ptmGetsExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:gets session handle."] -#[doc = ""] -#[doc = "Returns: A pointer to the current ptm:gets session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:gets session handle."] + #[doc = ""] + #[doc = "Returns: A pointer to the current ptm:gets session handle."] + #[doc = ""] pub fn ptmGetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the system time."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] - + #[doc = "Gets the system time."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] pub fn PTMGETS_GetSystemTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PTMSETS."] -#[doc = ""] - + #[doc = "Initializes PTMSETS."] + #[doc = ""] pub fn ptmSetsInit() -> Result; } extern "C" { -#[doc = "Exits PTMSETS."] -#[doc = ""] - + #[doc = "Exits PTMSETS."] + #[doc = ""] pub fn ptmSetsExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:sets session handle."] -#[doc = ""] -#[doc = "Returns: A pointer to the current ptm:sets session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:sets session handle."] + #[doc = ""] + #[doc = "Returns: A pointer to the current ptm:sets session handle."] + #[doc = ""] pub fn ptmSetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Sets the system time."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] - + #[doc = "Sets the system time."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] pub fn PTMSETS_SetSystemTime(msY2k: s64) -> Result; } #[doc = "Do not wait."] @@ -23140,25 +21505,20 @@ pub const DEASSERT_AFTER_WAIT: PXIDEV_DeassertType = 2; pub type PXIDEV_DeassertType = ::libc::c_uint; #[doc = "Card SPI transfer buffer."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PXIDEV_SPIBuffer { -#[doc = "Data pointer."] -#[doc = ""] - + #[doc = "Data pointer."] + #[doc = ""] pub ptr: *mut ::libc::c_void, -#[doc = "Data size."] -#[doc = ""] - + #[doc = "Data size."] + #[doc = ""] pub size: u32_, -#[doc = "Transfer options. See @ref pxiDevMakeTransferOption"] -#[doc = ""] - + #[doc = "Transfer options. See @ref pxiDevMakeTransferOption"] + #[doc = ""] pub transferOption: u8_, -#[doc = "Wait operation. See @ref pxiDevMakeWaitOperation"] -#[doc = ""] - + #[doc = "Wait operation. See @ref pxiDevMakeWaitOperation"] + #[doc = ""] pub waitOperation: u64_, } impl Default for PXIDEV_SPIBuffer { @@ -23172,30 +21532,27 @@ impl Default for PXIDEV_SPIBuffer { } extern "C" { #[must_use] -#[doc = "Initializes pxi:dev."] -#[doc = ""] - + #[doc = "Initializes pxi:dev."] + #[doc = ""] pub fn pxiDevInit() -> Result; } extern "C" { -#[doc = "Shuts down pxi:dev."] -#[doc = ""] - + #[doc = "Shuts down pxi:dev."] + #[doc = ""] pub fn pxiDevExit(); } extern "C" { #[must_use] -#[doc = "Performs multiple card SPI writes and reads."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `header` - Header to lead the transfers with. Must be, at most, 8 bytes in size."] -#[doc = "* `writeBuffer1` - Buffer to make first transfer from."] -#[doc = "* `readBuffer1` - Buffer to receive first response to."] -#[doc = "* `writeBuffer2` - Buffer to make second transfer from."] -#[doc = "* `readBuffer2` - Buffer to receive second response to."] -#[doc = "* `footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] - + #[doc = "Performs multiple card SPI writes and reads."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `header` - Header to lead the transfers with. Must be, at most, 8 bytes in size."] + #[doc = "* `writeBuffer1` - Buffer to make first transfer from."] + #[doc = "* `readBuffer1` - Buffer to receive first response to."] + #[doc = "* `writeBuffer2` - Buffer to make second transfer from."] + #[doc = "* `readBuffer2` - Buffer to receive second response to."] + #[doc = "* `footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] pub fn PXIDEV_SPIMultiWriteRead( header: *mut PXIDEV_SPIBuffer, writeBuffer1: *mut PXIDEV_SPIBuffer, @@ -23207,15 +21564,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Performs a single card SPI write and read."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `bytesRead` - Pointer to output the number of bytes received to."] -#[doc = "* `initialWaitOperation` - Wait operation to perform before transferring data."] -#[doc = "* `writeBuffer` - Buffer to transfer data from."] -#[doc = "* `readBuffer` - Buffer to receive data to."] - + #[doc = "Performs a single card SPI write and read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes received to."] + #[doc = "* `initialWaitOperation` - Wait operation to perform before transferring data."] + #[doc = "* `writeBuffer` - Buffer to transfer data from."] + #[doc = "* `readBuffer` - Buffer to receive data to."] pub fn PXIDEV_SPIWriteRead( bytesRead: *mut u32_, initialWaitOperation: u64_, @@ -23225,46 +21581,41 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes PxiPM."] -#[doc = ""] - + #[doc = "Initializes PxiPM."] + #[doc = ""] pub fn pxiPmInit() -> Result; } extern "C" { -#[doc = "Exits PxiPM."] -#[doc = ""] - + #[doc = "Exits PxiPM."] + #[doc = ""] pub fn pxiPmExit(); } extern "C" { -#[doc = "Gets the current PxiPM session handle."] -#[doc = ""] -#[doc = "Returns: The current PxiPM session handle."] -#[doc = ""] - + #[doc = "Gets the current PxiPM session handle."] + #[doc = ""] + #[doc = "Returns: The current PxiPM session handle."] + #[doc = ""] pub fn pxiPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set."] -#[doc = "* `programHandle` - The program handle."] - + #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set."] + #[doc = "* `programHandle` - The program handle."] pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Loads a program and registers it to Process9."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] -#[doc = "* `programInfo` - Information about the program to load."] -#[doc = "* `updateInfo` - Information about the program update to load."] - + #[doc = "Loads a program and registers it to Process9."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] + #[doc = "* `programInfo` - Information about the program to load."] + #[doc = "* `updateInfo` - Information about the program update to load."] pub fn PXIPM_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -23273,12 +21624,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unloads a program and unregisters it from Process9."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programHandle` - The program handle."] - + #[doc = "Unloads a program and unregisters it from Process9."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The program handle."] pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result; } #[repr(C)] @@ -24088,141 +22438,115 @@ pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153; pub type NetworkOpt = ::libc::c_uint; #[doc = "One entry of the ARP table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_ARP_TABLE"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_ARPTableEntry { pub unk0: u32_, -#[doc = "The IPv4 address associated to the entry"] -#[doc = ""] - + #[doc = "The IPv4 address associated to the entry"] + #[doc = ""] pub ip: in_addr, -#[doc = "The MAC address of associated to the entry"] -#[doc = ""] - + #[doc = "The MAC address of associated to the entry"] + #[doc = ""] pub mac: [u8_; 6usize], pub padding: [u8_; 2usize], } #[doc = "Structure returned by @ref SOCU_GetNetworkOpt when using @ref NETOPT_IP_INFO"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_IPInfo { -#[doc = "Current IPv4 address"] -#[doc = ""] - + #[doc = "Current IPv4 address"] + #[doc = ""] pub ip: in_addr, -#[doc = "Current network mask"] -#[doc = ""] - + #[doc = "Current network mask"] + #[doc = ""] pub netmask: in_addr, -#[doc = "Current network broadcast address"] -#[doc = ""] - + #[doc = "Current network broadcast address"] + #[doc = ""] pub broadcast: in_addr, } #[doc = "One entry of the routing table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_ROUTING_TABLE"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_RoutingTableEntry { -#[doc = "Destination IP address of the route"] -#[doc = ""] - + #[doc = "Destination IP address of the route"] + #[doc = ""] pub dest_ip: in_addr, -#[doc = "Mask used for this route"] -#[doc = ""] - + #[doc = "Mask used for this route"] + #[doc = ""] pub netmask: in_addr, -#[doc = "Gateway address to reach the network"] -#[doc = ""] - + #[doc = "Gateway address to reach the network"] + #[doc = ""] pub gateway: in_addr, -#[doc = "Linux netstat flags @see ROUTING_FLAG_G"] -#[doc = ""] - + #[doc = "Linux netstat flags @see ROUTING_FLAG_G"] + #[doc = ""] pub flags: u32_, -#[doc = "number of milliseconds since 1st Jan 1900 00:00."] -#[doc = ""] - + #[doc = "number of milliseconds since 1st Jan 1900 00:00."] + #[doc = ""] pub time: u64_, } #[doc = "One entry of the UDP sockets table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_UDP_TABLE"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_UDPTableEntry { -#[doc = "Local address information"] -#[doc = ""] - + #[doc = "Local address information"] + #[doc = ""] pub local: sockaddr_storage, -#[doc = "Remote address information"] -#[doc = ""] - + #[doc = "Remote address information"] + #[doc = ""] pub remote: sockaddr_storage, } #[doc = "One entry of the TCP sockets table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_TCP_TABLE"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_TCPTableEntry { -#[doc = "@see TCP states defines"] -#[doc = ""] - + #[doc = "@see TCP states defines"] + #[doc = ""] pub state: u32_, -#[doc = "Local address information"] -#[doc = ""] - + #[doc = "Local address information"] + #[doc = ""] pub local: sockaddr_storage, -#[doc = "Remote address information"] -#[doc = ""] - + #[doc = "Remote address information"] + #[doc = ""] pub remote: sockaddr_storage, } #[doc = "One entry of the DNS servers table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_DNS_TABLE"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_DNSTableEntry { pub family: u32_, -#[doc = "Family of the address of the DNS server"] -#[doc = ""] - + #[doc = "Family of the address of the DNS server"] + #[doc = ""] pub ip: in_addr, -#[doc = "IP of the DNS server"] -#[doc = ""] - + #[doc = "IP of the DNS server"] + #[doc = ""] pub padding: [u8_; 12usize], } extern "C" { #[must_use] -#[doc = "Initializes the SOC service."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `context_addr` - Address of a page-aligned (0x1000) buffer to be used."] -#[doc = "* `context_size` - Size of the buffer, a multiple of 0x1000."] - + #[doc = "Initializes the SOC service."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context_addr` - Address of a page-aligned (0x1000) buffer to be used."] + #[doc = "* `context_size` - Size of the buffer, a multiple of 0x1000."] pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Closes the soc service."] -#[doc = ""] - + #[doc = "Closes the soc service."] + #[doc = ""] pub fn socExit() -> Result; } extern "C" { -#[doc = "Gets the system's host ID."] -#[doc = ""] -#[doc = "Returns: The system's host ID."] -#[doc = ""] - + #[doc = "Gets the system's host ID."] + #[doc = ""] + #[doc = "Returns: The system's host ID."] + #[doc = ""] pub fn gethostid() -> ::libc::c_long; } extern "C" { @@ -24235,17 +22559,16 @@ extern "C" { pub fn SOCU_CloseSockets() -> ::libc::c_int; } extern "C" { -#[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] -#[doc = ""] -#[doc = "Returns: 0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `level` - Only value allowed seems to be @ref SOL_CONFIG"] -#[doc = "* `optname` - The option to be retrieved"] -#[doc = "* `optval` - Will contain the output of the command"] -#[doc = "* `optlen` - Size of the optval buffer, will be updated to hold the size of the output"] - + #[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] + #[doc = ""] + #[doc = "Returns: 0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Only value allowed seems to be @ref SOL_CONFIG"] + #[doc = "* `optname` - The option to be retrieved"] + #[doc = "* `optval` - Will contain the output of the command"] + #[doc = "* `optlen` - Size of the optval buffer, will be updated to hold the size of the output"] pub fn SOCU_GetNetworkOpt( level: ::libc::c_int, optname: NetworkOpt, @@ -24254,11 +22577,10 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { -#[doc = "Gets the system's IP address, netmask, and subnet broadcast"] -#[doc = ""] -#[doc = "Returns: Error"] -#[doc = ""] - + #[doc = "Gets the system's IP address, netmask, and subnet broadcast"] + #[doc = ""] + #[doc = "Returns: Error"] + #[doc = ""] pub fn SOCU_GetIPInfo( ip: *mut in_addr, netmask: *mut in_addr, @@ -24266,14 +22588,13 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { -#[doc = "Adds a global socket."] -#[doc = ""] -#[doc = "Returns: Error"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sockfd` - The socket fd."] - + #[doc = "Adds a global socket."] + #[doc = ""] + #[doc = "Returns: Error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sockfd` - The socket fd."] pub fn SOCU_AddGlobalSocket(sockfd: ::libc::c_int) -> ::libc::c_int; } #[doc = "Unsigned 8-bit PCM."] @@ -24318,67 +22639,60 @@ pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3; pub type MICU_SampleRate = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes MIC."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] -#[doc = "* `handle` - Size of the shared memory buffer."] - + #[doc = "Initializes MIC."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] + #[doc = "* `handle` - Size of the shared memory buffer."] pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result; } extern "C" { -#[doc = "Exits MIC."] -#[doc = ""] - + #[doc = "Exits MIC."] + #[doc = ""] pub fn micExit(); } extern "C" { -#[doc = "Gets the size of the sample data area within the shared memory buffer."] -#[doc = ""] -#[doc = "Returns: The sample data's size."] -#[doc = ""] - + #[doc = "Gets the size of the sample data area within the shared memory buffer."] + #[doc = ""] + #[doc = "Returns: The sample data's size."] + #[doc = ""] pub fn micGetSampleDataSize() -> u32_; } extern "C" { -#[doc = "Gets the offset within the shared memory buffer of the last sample written."] -#[doc = ""] -#[doc = "Returns: The last sample's offset."] -#[doc = ""] - + #[doc = "Gets the offset within the shared memory buffer of the last sample written."] + #[doc = ""] + #[doc = "Returns: The last sample's offset."] + #[doc = ""] pub fn micGetLastSampleOffset() -> u32_; } extern "C" { #[must_use] -#[doc = "Maps MIC shared memory."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `size` - Size of the shared memory."] -#[doc = "* `handle` - Handle of the shared memory."] - + #[doc = "Maps MIC shared memory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the shared memory."] + #[doc = "* `handle` - Handle of the shared memory."] pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Unmaps MIC shared memory."] -#[doc = ""] - + #[doc = "Unmaps MIC shared memory."] + #[doc = ""] pub fn MICU_UnmapSharedMem() -> Result; } extern "C" { #[must_use] -#[doc = "Begins sampling microphone input."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `encoding` - Encoding of outputted audio."] -#[doc = "* `sampleRate` - Sample rate of outputted audio."] -#[doc = "* `sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] -#[doc = "* `sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] -#[doc = "* `loop` - Whether to loop back to the beginning of the buffer when the end is reached."] - + #[doc = "Begins sampling microphone input."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `encoding` - Encoding of outputted audio."] + #[doc = "* `sampleRate` - Sample rate of outputted audio."] + #[doc = "* `sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] + #[doc = "* `sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] + #[doc = "* `loop` - Whether to loop back to the beginning of the buffer when the end is reached."] pub fn MICU_StartSampling( encoding: MICU_Encoding, sampleRate: MICU_SampleRate, @@ -24389,109 +22703,98 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adjusts the configuration of the current sampling session."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sampleRate` - Sample rate of outputted audio."] - + #[doc = "Adjusts the configuration of the current sampling session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sampleRate` - Sample rate of outputted audio."] pub fn MICU_AdjustSampling(sampleRate: MICU_SampleRate) -> Result; } extern "C" { #[must_use] -#[doc = "Stops sampling microphone input."] -#[doc = ""] - + #[doc = "Stops sampling microphone input."] + #[doc = ""] pub fn MICU_StopSampling() -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether microphone input is currently being sampled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sampling` - Pointer to output the sampling state to."] - + #[doc = "Gets whether microphone input is currently being sampled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sampling` - Pointer to output the sampling state to."] pub fn MICU_IsSampling(sampling: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an event handle triggered when the shared memory buffer is full."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `handle` - Pointer to output the event handle to."] - + #[doc = "Gets an event handle triggered when the shared memory buffer is full."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Pointer to output the event handle to."] pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the microphone's gain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `gain` - Gain to set."] - + #[doc = "Sets the microphone's gain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `gain` - Gain to set."] pub fn MICU_SetGain(gain: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the microphone's gain."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `gain` - Pointer to output the current gain to."] - + #[doc = "Gets the microphone's gain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `gain` - Pointer to output the current gain to."] pub fn MICU_GetGain(gain: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether the microphone is powered on."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `power` - Whether the microphone is powered on."] - + #[doc = "Sets whether the microphone is powered on."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `power` - Whether the microphone is powered on."] pub fn MICU_SetPower(power: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the microphone is powered on."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `power` - Pointer to output the power state to."] - + #[doc = "Gets whether the microphone is powered on."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `power` - Pointer to output the power state to."] pub fn MICU_GetPower(power: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to clamp microphone input."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `clamp` - Whether to clamp microphone input."] - + #[doc = "Sets whether to clamp microphone input."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `clamp` - Whether to clamp microphone input."] pub fn MICU_SetClamp(clamp: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether to clamp microphone input."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `clamp` - Pointer to output the clamp state to."] - + #[doc = "Gets whether to clamp microphone input."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `clamp` - Pointer to output the clamp state to."] pub fn MICU_GetClamp(clamp: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to allow sampling when the shell is closed."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `allowShellClosed` - Whether to allow sampling when the shell is closed."] - + #[doc = "Sets whether to allow sampling when the shell is closed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `allowShellClosed` - Whether to allow sampling when the shell is closed."] pub fn MICU_SetAllowShellClosed(allowShellClosed: bool) -> Result; } #[doc = "Converting color formats."] @@ -24536,109 +22839,84 @@ pub const MVD_OUTPUT_RGB565: MVDSTD_OutputFormat = 262148; pub type MVDSTD_OutputFormat = ::libc::c_uint; #[doc = "Processing configuration."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MVDSTD_Config { -#[doc = "Input type."] -#[doc = ""] - + #[doc = "Input type."] + #[doc = ""] pub input_type: MVDSTD_InputFormat, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x04: u32_, -#[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] -#[doc = ""] - + #[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] + #[doc = ""] pub unk_x08: u32_, -#[doc = "Input width."] -#[doc = ""] - + #[doc = "Input width."] + #[doc = ""] pub inwidth: u32_, -#[doc = "Input height."] -#[doc = ""] - + #[doc = "Input height."] + #[doc = ""] pub inheight: u32_, -#[doc = "Physical address of color conversion input data."] -#[doc = ""] - + #[doc = "Physical address of color conversion input data."] + #[doc = ""] pub physaddr_colorconv_indata: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk0: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk1: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk2: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk3: u32_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x28: [u32_; 6usize], -#[doc = "Enables cropping with the input image when non-zero via the following 4 words."] -#[doc = ""] - + #[doc = "Enables cropping with the input image when non-zero via the following 4 words."] + #[doc = ""] 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_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x54: u32_, -#[doc = "Output type."] -#[doc = ""] - + #[doc = "Output type."] + #[doc = ""] pub output_type: MVDSTD_OutputFormat, -#[doc = "Output width."] -#[doc = ""] - + #[doc = "Output width."] + #[doc = ""] pub outwidth: u32_, -#[doc = "Output height."] -#[doc = ""] - + #[doc = "Output height."] + #[doc = ""] pub outheight: u32_, -#[doc = "Physical address of output data."] -#[doc = ""] - + #[doc = "Physical address of output data."] + #[doc = ""] pub physaddr_outdata0: u32_, -#[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] -#[doc = ""] - + #[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] + #[doc = ""] pub physaddr_outdata1: u32_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x6c: [u32_; 38usize], -#[doc = "This enables using the following 4 words when non-zero."] -#[doc = ""] - + #[doc = "This enables using the following 4 words when non-zero."] + #[doc = ""] pub flag_x104: u32_, -#[doc = "Output X position in the output buffer."] -#[doc = ""] - + #[doc = "Output X position in the output buffer."] + #[doc = ""] pub output_x_pos: u32_, -#[doc = "Same as above except for the Y pos."] -#[doc = ""] - + #[doc = "Same as above except for the Y pos."] + #[doc = ""] pub output_y_pos: u32_, -#[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] -#[doc = ""] - + #[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] + #[doc = ""] pub output_width_override: u32_, -#[doc = "Same as output_width_override except for the output height."] -#[doc = ""] - + #[doc = "Same as output_width_override except for the output height."] + #[doc = ""] pub output_height_override: u32_, pub unk_x118: u32_, } @@ -24690,7 +22968,6 @@ impl Default for MVDSTD_OutputBuffersEntryList { } #[doc = "This can be used to override the default input values for MVDSTD commands during initialization with video-processing. The default for these fields are all-zero, except for cmd1b_inval which is 1. See also here: https://www.3dbrew.org/wiki/MVD_Services"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MVDSTD_InitStruct { @@ -24702,16 +22979,15 @@ pub struct MVDSTD_InitStruct { } extern "C" { #[must_use] -#[doc = "Initializes MVDSTD."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mode` - Mode to initialize MVDSTD to."] -#[doc = "* `input_type` - Type of input to process."] -#[doc = "* `output_type` - Type of output to produce."] -#[doc = "* `size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] -#[doc = "* `initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] - + #[doc = "Initializes MVDSTD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Mode to initialize MVDSTD to."] + #[doc = "* `input_type` - Type of input to process."] + #[doc = "* `output_type` - Type of output to produce."] + #[doc = "* `size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] + #[doc = "* `initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] pub fn mvdstdInit( mode: MVDSTD_Mode, input_type: MVDSTD_InputFormat, @@ -24721,25 +22997,23 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Shuts down MVDSTD."] -#[doc = ""] - + #[doc = "Shuts down MVDSTD."] + #[doc = ""] pub fn mvdstdExit(); } extern "C" { -#[doc = "Generates a default MVDSTD configuration."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to output the generated config to."] -#[doc = "* `input_width` - Input width."] -#[doc = "* `input_height` - Input height."] -#[doc = "* `output_width` - Output width."] -#[doc = "* `output_height` - Output height."] -#[doc = "* `vaddr_colorconv_indata` - Virtual address of the color conversion input data."] -#[doc = "* `vaddr_outdata0` - Virtual address of the output data."] -#[doc = "* `vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] - + #[doc = "Generates a default MVDSTD configuration."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to output the generated config to."] + #[doc = "* `input_width` - Input width."] + #[doc = "* `input_height` - Input height."] + #[doc = "* `output_width` - Output width."] + #[doc = "* `output_height` - Output height."] + #[doc = "* `vaddr_colorconv_indata` - Virtual address of the color conversion input data."] + #[doc = "* `vaddr_outdata0` - Virtual address of the output data."] + #[doc = "* `vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] pub fn mvdstdGenerateDefaultConfig( config: *mut MVDSTD_Config, input_width: u32_, @@ -24753,25 +23027,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Run color-format-conversion."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to the configuration to use."] - + #[doc = "Run color-format-conversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to the configuration to use."] pub fn mvdstdConvertImage(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] -#[doc = "Processes a video frame(specifically a NAL-unit)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] -#[doc = "* `size` - Size of the input buffer."] -#[doc = "* `flag` - See here regarding this input flag: https://www.3dbrew.org/wiki/MVDSTD:ProcessNALUnit"] -#[doc = "* `out` - Optional output MVDSTD_ProcessNALUnitOut structure."] - + #[doc = "Processes a video frame(specifically a NAL-unit)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `flag` - See here regarding this input flag: https://www.3dbrew.org/wiki/MVDSTD:ProcessNALUnit"] + #[doc = "* `out` - Optional output MVDSTD_ProcessNALUnitOut structure."] pub fn mvdstdProcessVideoFrame( inbuf_vaddr: *mut ::libc::c_void, size: size_t, @@ -24781,34 +23053,31 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Renders the video frame."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] -#[doc = "* `wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] - + #[doc = "Renders the video frame."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] + #[doc = "* `wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] pub fn mvdstdRenderVideoFrame(config: *mut MVDSTD_Config, wait: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current configuration of MVDSTD."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `config` - Pointer to the configuration to set."] - + #[doc = "Sets the current configuration of MVDSTD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to the configuration to set."] pub fn MVDSTD_SetConfig(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] -#[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: https://www.3dbrew.org/wiki/MVDSTD:SetupOutputBuffers"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `entrylist` - Input entrylist."] -#[doc = "* `bufsize` - Size of each buffer from the entrylist."] - + #[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: https://www.3dbrew.org/wiki/MVDSTD:SetupOutputBuffers"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `entrylist` - Input entrylist."] + #[doc = "* `bufsize` - Size of each buffer from the entrylist."] pub fn mvdstdSetupOutputBuffers( entrylist: *mut MVDSTD_OutputBuffersEntryList, bufsize: u32_, @@ -24816,15 +23085,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: https://www.3dbrew.org/wiki/MVDSTD:OverrideOutputBuffers"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cur_outdata0` - Linearmem vaddr. The current outdata0 for this entry must match this value."] -#[doc = "* `cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] -#[doc = "* `new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] -#[doc = "* `new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] - + #[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: https://www.3dbrew.org/wiki/MVDSTD:OverrideOutputBuffers"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cur_outdata0` - Linearmem vaddr. The current outdata0 for this entry must match this value."] + #[doc = "* `cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] + #[doc = "* `new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] + #[doc = "* `new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] pub fn mvdstdOverrideOutputBuffers( cur_outdata0: *mut ::libc::c_void, cur_outdata1: *mut ::libc::c_void, @@ -24896,7 +23164,6 @@ impl Default for NFC_TagInfo { } #[doc = "AmiiboSettings structure, see also here: https://3dbrew.org/wiki/NFC:GetAmiiboSettings"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboSettings { @@ -24924,7 +23191,6 @@ impl Default for NFC_AmiiboSettings { } #[doc = "AmiiboConfig structure, see also here: https://3dbrew.org/wiki/NFC:GetAmiiboConfig"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboConfig { @@ -24933,21 +23199,17 @@ pub struct NFC_AmiiboConfig { pub lastwritedate_day: u8_, pub write_counter: u16_, pub characterID: [u8_; 3usize], -#[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] -#[doc = ""] - + #[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] + #[doc = ""] pub series: u8_, -#[doc = "ID of the series"] -#[doc = ""] - + #[doc = "ID of the series"] + #[doc = ""] pub amiiboID: u16_, -#[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] -#[doc = ""] - + #[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] + #[doc = ""] pub type_: u8_, -#[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] -#[doc = ""] - + #[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] + #[doc = ""] pub pagex4_byte3: u8_, pub appdata_size: u16_, @@ -24964,7 +23226,6 @@ impl Default for NFC_AmiiboConfig { } #[doc = "Used by nfcInitializeWriteAppData() internally, see also here: https://3dbrew.org/wiki/NFC:GetAppDataInitStruct"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AppDataInitStruct { @@ -24982,7 +23243,6 @@ impl Default for NFC_AppDataInitStruct { } #[doc = "Used by nfcWriteAppData() internally, see also: https://3dbrew.org/wiki/NFC:WriteAppData"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NFC_AppDataWriteStruct { @@ -24992,105 +23252,93 @@ pub struct NFC_AppDataWriteStruct { } extern "C" { #[must_use] -#[doc = "Initializes NFC."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `type` - See the NFC_OpType enum."] - + #[doc = "Initializes NFC."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - See the NFC_OpType enum."] pub fn nfcInit(type_: NFC_OpType) -> Result; } extern "C" { -#[doc = "Shuts down NFC."] -#[doc = ""] - + #[doc = "Shuts down NFC."] + #[doc = ""] pub fn nfcExit(); } extern "C" { -#[doc = "Gets the NFC service handle."] -#[doc = ""] -#[doc = "Returns: The NFC service handle."] -#[doc = ""] - + #[doc = "Gets the NFC service handle."] + #[doc = ""] + #[doc = "Returns: The NFC service handle."] + #[doc = ""] pub fn nfcGetSessionHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Starts scanning for NFC tags."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] - + #[doc = "Starts scanning for NFC tags."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] pub fn nfcStartScanning(inval: u16_) -> Result; } extern "C" { -#[doc = "Stops scanning for NFC tags."] -#[doc = ""] - + #[doc = "Stops scanning for NFC tags."] + #[doc = ""] pub fn nfcStopScanning(); } extern "C" { #[must_use] -#[doc = "Read amiibo NFC data and load in memory."] -#[doc = ""] - + #[doc = "Read amiibo NFC data and load in memory."] + #[doc = ""] pub fn nfcLoadAmiiboData() -> Result; } extern "C" { #[must_use] -#[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] -#[doc = ""] - + #[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] + #[doc = ""] pub fn nfcResetTagScanState() -> Result; } extern "C" { #[must_use] -#[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] -#[doc = ""] - + #[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] + #[doc = ""] pub fn nfcUpdateStoredAmiiboData() -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current NFC tag state."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - Pointer to write NFC tag state."] - + #[doc = "Returns the current NFC tag state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write NFC tag state."] pub fn nfcGetTagState(state: *mut NFC_TagState) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current TagInfo."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the output TagInfo."] - + #[doc = "Returns the current TagInfo."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the output TagInfo."] pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: https://3dbrew.org/wiki/NFC:OpenAppData"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `amiibo_appid` - Amiibo AppID. See here: https://www.3dbrew.org/wiki/Amiibo"] - + #[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: https://3dbrew.org/wiki/NFC:OpenAppData"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amiibo_appid` - Amiibo AppID. See here: https://www.3dbrew.org/wiki/Amiibo"] pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] -#[doc = "* `buf` - Input buffer."] -#[doc = "* `size` - Buffer size."] - + #[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] + #[doc = "* `buf` - Input buffer."] + #[doc = "* `size` - Buffer size."] pub fn nfcInitializeWriteAppData( amiibo_appid: u32_, buf: *const ::libc::c_void, @@ -25099,25 +23347,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Output buffer."] -#[doc = "* `size` - Buffer size."] - + #[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Output buffer."] + #[doc = "* `size` - Buffer size."] pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: https://3dbrew.org/wiki/NFC:WriteAppData"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf` - Input buffer."] -#[doc = "* `size` - Buffer size."] -#[doc = "* `taginfo` - TagInfo from nfcGetTagInfo()."] - + #[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: https://3dbrew.org/wiki/NFC:WriteAppData"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Input buffer."] + #[doc = "* `size` - Buffer size."] + #[doc = "* `taginfo` - TagInfo from nfcGetTagInfo()."] pub fn nfcWriteAppData( buf: *const ::libc::c_void, size: size_t, @@ -25126,48 +23372,44 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Returns the current AmiiboSettings."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the output AmiiboSettings."] - + #[doc = "Returns the current AmiiboSettings."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the output AmiiboSettings."] pub fn nfcGetAmiiboSettings(out: *mut NFC_AmiiboSettings) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current AmiiboConfig."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the output AmiiboConfig."] - + #[doc = "Returns the current AmiiboConfig."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the output AmiiboConfig."] pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: https://www.3dbrew.org/wiki/NFC:StartOtherTagScanning"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `unk0` - Same as nfcStartScanning() input."] -#[doc = "* `unk1` - Unknown."] - + #[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: https://www.3dbrew.org/wiki/NFC:StartOtherTagScanning"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk0` - Same as nfcStartScanning() input."] + #[doc = "* `unk1` - Unknown."] pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: https://www.3dbrew.org/wiki/NFC:SendTagCommand"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inbuf` - Input buffer."] -#[doc = "* `insize` - Size of the input buffer."] -#[doc = "* `outbuf` - Output buffer."] -#[doc = "* `outsize` - Size of the output buffer."] -#[doc = "* `actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] -#[doc = "* `microseconds` - Timing-related field in microseconds."] - + #[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: https://www.3dbrew.org/wiki/NFC:SendTagCommand"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inbuf` - Input buffer."] + #[doc = "* `insize` - Size of the input buffer."] + #[doc = "* `outbuf` - Output buffer."] + #[doc = "* `outsize` - Size of the output buffer."] + #[doc = "* `actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] + #[doc = "* `microseconds` - Timing-related field in microseconds."] pub fn nfcSendTagCommand( inbuf: *const ::libc::c_void, insize: size_t, @@ -25179,21 +23421,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] -#[doc = ""] - + #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] + #[doc = ""] pub fn nfcCmd21() -> Result; } extern "C" { #[must_use] -#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] -#[doc = ""] - + #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] + #[doc = ""] pub fn nfcCmd22() -> Result; } #[doc = "Notification header data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationHeader { @@ -25212,31 +23451,28 @@ pub struct NotificationHeader { } extern "C" { #[must_use] -#[doc = "Initializes NEWS."] -#[doc = ""] - + #[doc = "Initializes NEWS."] + #[doc = ""] pub fn newsInit() -> Result; } extern "C" { -#[doc = "Exits NEWS."] -#[doc = ""] - + #[doc = "Exits NEWS."] + #[doc = ""] pub fn newsExit(); } extern "C" { #[must_use] -#[doc = "Adds a notification to the home menu Notifications applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `title` - UTF-16 title of the notification."] -#[doc = "* `titleLength` - Number of characters in the title, not including the null-terminator."] -#[doc = "* `message` - UTF-16 message of the notification, or NULL for no message."] -#[doc = "* `messageLength` - Number of characters in the message, not including the null-terminator."] -#[doc = "* `image` - Data of the image to show in the notification, or NULL for no image."] -#[doc = "* `imageSize` - Size of the image data in bytes."] -#[doc = "* `jpeg` - Whether the image is a JPEG or not."] - + #[doc = "Adds a notification to the home menu Notifications applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `title` - UTF-16 title of the notification."] + #[doc = "* `titleLength` - Number of characters in the title, not including the null-terminator."] + #[doc = "* `message` - UTF-16 message of the notification, or NULL for no message."] + #[doc = "* `messageLength` - Number of characters in the message, not including the null-terminator."] + #[doc = "* `image` - Data of the image to show in the notification, or NULL for no image."] + #[doc = "* `imageSize` - Size of the image data in bytes."] + #[doc = "* `jpeg` - Whether the image is a JPEG or not."] pub fn NEWS_AddNotification( title: *const u16_, titleLength: u32_, @@ -25249,58 +23485,53 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets current total notifications number."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `num` - Pointer where total number will be saved."] - + #[doc = "Gets current total notifications number."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num` - Pointer where total number will be saved."] pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a custom header for a specific notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `news_id` - Identification number of the notification."] -#[doc = "* `header` - Pointer to notification header to set."] - + #[doc = "Sets a custom header for a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `header` - Pointer to notification header to set."] pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the header of a specific notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `news_id` - Identification number of the notification."] -#[doc = "* `header` - Pointer where header of the notification will be saved."] - + #[doc = "Gets the header of a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `header` - Pointer where header of the notification will be saved."] pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a custom message for a specific notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `news_id` - Identification number of the notification."] -#[doc = "* `message` - Pointer to UTF-16 message to set."] -#[doc = "* `size` - Size of message to set."] - + #[doc = "Sets a custom message for a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `message` - Pointer to UTF-16 message to set."] + #[doc = "* `size` - Size of message to set."] pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the message of a specific notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `news_id` - Identification number of the notification."] -#[doc = "* `message` - Pointer where UTF-16 message of the notification will be saved."] -#[doc = "* `size` - Pointer where size of the message data will be saved in bytes."] - + #[doc = "Gets the message of a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `message` - Pointer where UTF-16 message of the notification will be saved."] + #[doc = "* `size` - Pointer where size of the message data will be saved in bytes."] pub fn NEWS_GetNotificationMessage( news_id: u32_, message: *mut u16_, @@ -25309,14 +23540,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets a custom image for a specific notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `news_id` - Identification number of the notification."] -#[doc = "* `buffer` - Pointer to MPO image to set."] -#[doc = "* `size` - Size of the MPO image to set."] - + #[doc = "Sets a custom image for a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `buffer` - Pointer to MPO image to set."] + #[doc = "* `size` - Size of the MPO image to set."] pub fn NEWS_SetNotificationImage( news_id: u32_, buffer: *const ::libc::c_void, @@ -25325,14 +23555,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the image of a specific notification."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `news_id` - Identification number of the notification."] -#[doc = "* `buffer` - Pointer where MPO image of the notification will be saved."] -#[doc = "* `size` - Pointer where size of the image data will be saved in bytes."] - + #[doc = "Gets the image of a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `buffer` - Pointer where MPO image of the notification will be saved."] + #[doc = "* `size` - Pointer where size of the image data will be saved in bytes."] pub fn NEWS_GetNotificationImage( news_id: u32_, buffer: *mut ::libc::c_void, @@ -25341,88 +23570,74 @@ extern "C" { } #[doc = "Head tracking coordinate pair."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfoCoord { -#[doc = "X coordinate."] -#[doc = ""] - + #[doc = "X coordinate."] + #[doc = ""] pub x: f32, -#[doc = "Y coordinate."] -#[doc = ""] - + #[doc = "Y coordinate."] + #[doc = ""] pub y: f32, } #[doc = "Head tracking info."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfo { -#[doc = "Flags."] -#[doc = ""] - + #[doc = "Flags."] + #[doc = ""] pub flags: [u8_; 5usize], -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub padding: [u8_; 3usize], -#[doc = "Unknown. Not used by System_Settings."] -#[doc = ""] - + #[doc = "Unknown. Not used by System_Settings."] + #[doc = ""] pub floatdata_x08: f32, -#[doc = "Head coordinates."] -#[doc = ""] - + #[doc = "Head coordinates."] + #[doc = ""] pub coords0: [QTM_HeadTrackingInfoCoord; 4usize], -#[doc = "Unknown. Not used by System_Settings."] -#[doc = ""] - + #[doc = "Unknown. Not used by System_Settings."] + #[doc = ""] pub unk_x2c: [u32_; 5usize], } extern "C" { #[must_use] -#[doc = "Initializes QTM."] -#[doc = ""] - + #[doc = "Initializes QTM."] + #[doc = ""] pub fn qtmInit() -> Result; } extern "C" { -#[doc = "Exits QTM."] -#[doc = ""] - + #[doc = "Exits QTM."] + #[doc = ""] pub fn qtmExit(); } extern "C" { -#[doc = "Checks whether QTM is initialized."] -#[doc = ""] -#[doc = "Returns: Whether QTM is initialized."] -#[doc = ""] - + #[doc = "Checks whether QTM is initialized."] + #[doc = ""] + #[doc = "Returns: Whether QTM is initialized."] + #[doc = ""] pub fn qtmCheckInitialized() -> bool; } extern "C" { -#[doc = "Checks whether a head is fully detected."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `info` - Tracking info to check."] - + #[doc = "Checks whether a head is fully detected."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Tracking info to check."] pub fn qtmCheckHeadFullyDetected(info: *mut QTM_HeadTrackingInfo) -> bool; } extern "C" { #[must_use] -#[doc = "Converts QTM coordinates to screen coordinates."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `coord` - Coordinates to convert."] -#[doc = "* `screen_width` - Width of the screen. Can be NULL to use the default value for the top screen."] -#[doc = "* `screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] -#[doc = "* `x` - Pointer to output the screen X coordinate to."] -#[doc = "* `y` - Pointer to output the screen Y coordinate to."] - + #[doc = "Converts QTM coordinates to screen coordinates."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coord` - Coordinates to convert."] + #[doc = "* `screen_width` - Width of the screen. Can be NULL to use the default value for the top screen."] + #[doc = "* `screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] + #[doc = "* `x` - Pointer to output the screen X coordinate to."] + #[doc = "* `y` - Pointer to output the screen Y coordinate to."] pub fn qtmConvertCoordToScreen( coord: *mut QTM_HeadTrackingInfoCoord, screen_width: *mut f32, @@ -25433,67 +23648,60 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the current head tracking info."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `val` - Normally 0."] -#[doc = "* `out` - Pointer to write head tracking info to."] - + #[doc = "Gets the current head tracking info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `val` - Normally 0."] + #[doc = "* `out` - Pointer to write head tracking info to."] pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes srv:pm and the service API."] -#[doc = ""] - + #[doc = "Initializes srv:pm and the service API."] + #[doc = ""] pub fn srvPmInit() -> Result; } extern "C" { -#[doc = "Exits srv:pm and the service API."] -#[doc = ""] - + #[doc = "Exits srv:pm and the service API."] + #[doc = ""] pub fn srvPmExit(); } extern "C" { -#[doc = "Gets the current srv:pm session handle."] -#[doc = ""] -#[doc = "Returns: The current srv:pm session handle."] -#[doc = ""] - + #[doc = "Gets the current srv:pm session handle."] + #[doc = ""] + #[doc = "Returns: The current srv:pm session handle."] + #[doc = ""] pub fn srvPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Publishes a notification to a process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `notificationId` - ID of the notification."] -#[doc = "* `process` - Process to publish to."] - + #[doc = "Publishes a notification to a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = "* `process` - Process to publish to."] pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Publishes a notification to all processes."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `notificationId` - ID of the notification."] - + #[doc = "Publishes a notification to all processes."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Registers a process with SRV."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pid` - ID of the process."] -#[doc = "* `count` - Number of services within the service access control data."] -#[doc = "* `serviceAccessControlList` - Service Access Control list."] - + #[doc = "Registers a process with SRV."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - ID of the process."] + #[doc = "* `count` - Number of services within the service access control data."] + #[doc = "* `serviceAccessControlList` - Service Access Control list."] pub fn SRVPM_RegisterProcess( pid: u32_, count: u32_, @@ -25502,48 +23710,43 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters a process with SRV."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pid` - ID of the process."] - + #[doc = "Unregisters a process with SRV."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - ID of the process."] pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes LOADER."] -#[doc = ""] - + #[doc = "Initializes LOADER."] + #[doc = ""] pub fn loaderInit() -> Result; } extern "C" { -#[doc = "Exits LOADER."] -#[doc = ""] - + #[doc = "Exits LOADER."] + #[doc = ""] pub fn loaderExit(); } extern "C" { #[must_use] -#[doc = "Loads a program and returns a process handle to the newly created process."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `process` - Pointer to output the process handle to. [Direction: In, Out]"] -#[doc = "* `programHandle` - The handle of the program to load."] - + #[doc = "Loads a program and returns a process handle to the newly created process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Pointer to output the process handle to. [Direction: In, Out]"] + #[doc = "* `programHandle` - The handle of the program to load."] pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Registers a program (along with its update)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] -#[doc = "* `programInfo` - The program info."] -#[doc = "* `programInfo` - The program update info."] - + #[doc = "Registers a program (along with its update)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] + #[doc = "* `programInfo` - The program info."] + #[doc = "* `programInfo` - The program update info."] pub fn LOADER_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -25552,23 +23755,21 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters a program (along with its update)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `programHandle` - The handle of the program to unregister."] - + #[doc = "Unregisters a program (along with its update)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The handle of the program to unregister."] pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see @ref ExHeader_Info)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] -#[doc = "* `programHandle` - The handle of the program to unregister"] - + #[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see @ref ExHeader_Info)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] + #[doc = "* `programHandle` - The handle of the program to unregister"] pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } #[doc = "The normal mode of the led"] @@ -25598,119 +23799,107 @@ pub const LED_BLINK_RED: powerLedState = 6; pub type powerLedState = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes mcuHwc."] -#[doc = ""] - + #[doc = "Initializes mcuHwc."] + #[doc = ""] pub fn mcuHwcInit() -> Result; } extern "C" { -#[doc = "Exits mcuHwc."] -#[doc = ""] - + #[doc = "Exits mcuHwc."] + #[doc = ""] pub fn mcuHwcExit(); } extern "C" { #[must_use] -#[doc = "Reads data from an i2c device3 register"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] -#[doc = "* `data` - Pointer to write the data to."] -#[doc = "* `size` - Size of data to be read"] - + #[doc = "Reads data from an i2c device3 register"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] + #[doc = "* `data` - Pointer to write the data to."] + #[doc = "* `size` - Size of data to be read"] pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes data to a i2c device3 register"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] -#[doc = "* `data` - Pointer to write the data to."] -#[doc = "* `size` - Size of data to be written"] - + #[doc = "Writes data to a i2c device3 register"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] + #[doc = "* `data` - Pointer to write the data to."] + #[doc = "* `size` - Size of data to be written"] pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the battery voltage"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `voltage` - Pointer to write the battery voltage to."] - + #[doc = "Gets the battery voltage"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `voltage` - Pointer to write the battery voltage to."] pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the battery level"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `level` - Pointer to write the current battery level to."] - + #[doc = "Gets the battery level"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Pointer to write the current battery level to."] pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the sound slider level"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `level` - Pointer to write the slider level to."] - + #[doc = "Gets the sound slider level"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Pointer to write the slider level to."] pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets Wifi LED state"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - State of Wifi LED. (True/False)"] - + #[doc = "Sets Wifi LED state"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - State of Wifi LED. (True/False)"] pub fn MCUHWC_SetWifiLedState(state: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets Power LED state"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `state` - powerLedState State of power LED."] - + #[doc = "Sets Power LED state"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - powerLedState State of power LED."] pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result; } extern "C" { #[must_use] -#[doc = "Gets 3d slider level"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `level` - Pointer to write 3D slider level to."] - + #[doc = "Gets 3d slider level"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Pointer to write 3D slider level to."] pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the major MCU firmware version"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the major firmware version to."] - + #[doc = "Gets the major MCU firmware version"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the major firmware version to."] pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the minor MCU firmware version"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Pointer to write the minor firmware version to."] - + #[doc = "Gets the minor MCU firmware version"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the minor firmware version to."] pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result; } #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] @@ -25783,29 +23972,25 @@ pub const GX_FILL_32BIT_DEPTH: GX_FILL_CONTROL = 512; pub type GX_FILL_CONTROL = ::libc::c_uint; #[doc = "GX command entry"] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub union gxCmdEntry_s { -#[doc = "Raw command data"] -#[doc = ""] - + #[doc = "Raw command data"] + #[doc = ""] pub data: [u32_; 8usize], pub __bindgen_anon_1: gxCmdEntry_s__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct gxCmdEntry_s__bindgen_ty_1 { -#[doc = "Command type"] -#[doc = ""] - + #[doc = "Command type"] + #[doc = ""] pub type_: u8_, pub unk1: u8_, pub unk2: u8_, pub unk3: u8_, -#[doc = "Command arguments"] -#[doc = ""] - + #[doc = "Command arguments"] + #[doc = ""] pub args: [u32_; 7usize], } impl Default for gxCmdEntry_s { @@ -25819,37 +24004,29 @@ impl Default for gxCmdEntry_s { } #[doc = "GX command queue structure"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_gxCmdQueue_s { -#[doc = "Pointer to array of GX command entries"] -#[doc = ""] - + #[doc = "Pointer to array of GX command entries"] + #[doc = ""] pub entries: *mut gxCmdEntry_s, -#[doc = "Capacity of the command array"] -#[doc = ""] - + #[doc = "Capacity of the command array"] + #[doc = ""] pub maxEntries: u16_, -#[doc = "Number of commands in the queue"] -#[doc = ""] - + #[doc = "Number of commands in the queue"] + #[doc = ""] pub numEntries: u16_, -#[doc = "Index of the first pending command to be submitted to GX"] -#[doc = ""] - + #[doc = "Index of the first pending command to be submitted to GX"] + #[doc = ""] pub curEntry: u16_, -#[doc = "Number of commands completed by GX"] -#[doc = ""] - + #[doc = "Number of commands completed by GX"] + #[doc = ""] pub lastEntry: u16_, -#[doc = "User callback"] -#[doc = ""] - + #[doc = "User callback"] + #[doc = ""] pub callback: ::core::option::Option, -#[doc = "Data for user callback"] -#[doc = ""] - + #[doc = "Data for user callback"] + #[doc = ""] pub user: *mut ::libc::c_void, } impl Default for tag_gxCmdQueue_s { @@ -25866,102 +24043,93 @@ impl Default for tag_gxCmdQueue_s { pub type gxCmdQueue_s = tag_gxCmdQueue_s; extern "C" { -#[doc = "Clears a GX command queue."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `queue` - The GX command queue."] - + #[doc = "Clears a GX command queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] pub fn gxCmdQueueClear(queue: *mut gxCmdQueue_s); -} -extern "C" { -#[doc = "Adds a command to a GX command queue."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `queue` - The GX command queue."] -#[doc = "* `entry` - The GX command to add."] - +} +extern "C" { + #[doc = "Adds a command to a GX command queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] + #[doc = "* `entry` - The GX command to add."] pub fn gxCmdQueueAdd(queue: *mut gxCmdQueue_s, entry: *const gxCmdEntry_s); } extern "C" { -#[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `queue` - The GX command queue."] - + #[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] pub fn gxCmdQueueRun(queue: *mut gxCmdQueue_s); } extern "C" { -#[doc = "Stops a GX command queue from processing incoming commands."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `queue` - The GX command queue."] - + #[doc = "Stops a GX command queue from processing incoming commands."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] pub fn gxCmdQueueStop(queue: *mut gxCmdQueue_s); } extern "C" { -#[doc = "Waits for a GX command queue to finish executing pending commands."] -#[doc = ""] -#[doc = "Returns: False if timeout expired, true otherwise."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `queue` - The GX command queue."] -#[doc = "* `timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] - + #[doc = "Waits for a GX command queue to finish executing pending commands."] + #[doc = ""] + #[doc = "Returns: False if timeout expired, true otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] + #[doc = "* `timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] pub fn gxCmdQueueWait(queue: *mut gxCmdQueue_s, timeout: s64) -> bool; } extern "C" { -#[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] - + #[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] pub fn GX_BindQueue(queue: *mut gxCmdQueue_s); } extern "C" { #[must_use] -#[doc = "Requests a DMA."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `src` - Source to DMA from."] -#[doc = "* `dst` - Destination to DMA to."] -#[doc = "* `length` - Length of data to transfer."] - + #[doc = "Requests a DMA."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src` - Source to DMA from."] + #[doc = "* `dst` - Destination to DMA to."] + #[doc = "* `length` - Length of data to transfer."] pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Processes a GPU command list."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf0a` - Command list address."] -#[doc = "* `buf0s` - Command list size."] -#[doc = "* `flags` - Flags to process with."] - + #[doc = "Processes a GPU command list."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf0a` - Command list address."] + #[doc = "* `buf0s` - Command list size."] + #[doc = "* `flags` - Flags to process with."] pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Fills the memory of two buffers with the given values."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf0a` - Start address of the first buffer."] -#[doc = "* `buf0v` - Dimensions of the first buffer."] -#[doc = "* `buf0e` - End address of the first buffer."] -#[doc = "* `control0` - Value to fill the first buffer with."] -#[doc = "* `buf1a` - Start address of the second buffer."] -#[doc = "* `buf1v` - Dimensions of the second buffer."] -#[doc = "* `buf1e` - End address of the second buffer."] -#[doc = "* `control1` - Value to fill the second buffer with."] - + #[doc = "Fills the memory of two buffers with the given values."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf0a` - Start address of the first buffer."] + #[doc = "* `buf0v` - Dimensions of the first buffer."] + #[doc = "* `buf0e` - End address of the first buffer."] + #[doc = "* `control0` - Value to fill the first buffer with."] + #[doc = "* `buf1a` - Start address of the second buffer."] + #[doc = "* `buf1v` - Dimensions of the second buffer."] + #[doc = "* `buf1e` - End address of the second buffer."] + #[doc = "* `control1` - Value to fill the second buffer with."] pub fn GX_MemoryFill( buf0a: *mut u32_, buf0v: u32_, @@ -25975,16 +24143,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initiates a display transfer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inadr` - Address of the input."] -#[doc = "* `indim` - Dimensions of the input."] -#[doc = "* `outadr` - Address of the output."] -#[doc = "* `outdim` - Dimensions of the output."] -#[doc = "* `flags` - Flags to transfer with."] - + #[doc = "Initiates a display transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inadr` - Address of the input."] + #[doc = "* `indim` - Dimensions of the input."] + #[doc = "* `outadr` - Address of the output."] + #[doc = "* `outdim` - Dimensions of the output."] + #[doc = "* `flags` - Flags to transfer with."] pub fn GX_DisplayTransfer( inadr: *mut u32_, indim: u32_, @@ -25995,17 +24162,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initiates a texture copy."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `inadr` - Address of the input."] -#[doc = "* `indim` - Dimensions of the input."] -#[doc = "* `outadr` - Address of the output."] -#[doc = "* `outdim` - Dimensions of the output."] -#[doc = "* `size` - Size of the data to transfer."] -#[doc = "* `flags` - Flags to transfer with."] - + #[doc = "Initiates a texture copy."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inadr` - Address of the input."] + #[doc = "* `indim` - Dimensions of the input."] + #[doc = "* `outadr` - Address of the output."] + #[doc = "* `outdim` - Dimensions of the output."] + #[doc = "* `size` - Size of the data to transfer."] + #[doc = "* `flags` - Flags to transfer with."] pub fn GX_TextureCopy( inadr: *mut u32_, indim: u32_, @@ -26017,17 +24183,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `buf0a` - Address of the first buffer."] -#[doc = "* `buf0s` - Size of the first buffer."] -#[doc = "* `buf1a` - Address of the second buffer."] -#[doc = "* `buf1s` - Size of the second buffer."] -#[doc = "* `buf2a` - Address of the third buffer."] -#[doc = "* `buf2s` - Size of the third buffer."] - + #[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf0a` - Address of the first buffer."] + #[doc = "* `buf0s` - Size of the first buffer."] + #[doc = "* `buf1a` - Address of the second buffer."] + #[doc = "* `buf1s` - Size of the second buffer."] + #[doc = "* `buf2a` - Address of the third buffer."] + #[doc = "* `buf2s` - Size of the third buffer."] pub fn GX_FlushCacheRegions( buf0a: *mut u32_, buf0s: u32_, @@ -27170,96 +25335,86 @@ pub const GPU_GEOMETRY_SHADER: GPU_SHADER_TYPE = 1; pub type GPU_SHADER_TYPE = ::libc::c_uint; extern "C" { -#[doc = "GPU command buffer."] -#[doc = ""] - + #[doc = "GPU command buffer."] + #[doc = ""] pub static mut gpuCmdBuf: *mut u32_; } extern "C" { -#[doc = "GPU command buffer size."] -#[doc = ""] - + #[doc = "GPU command buffer size."] + #[doc = ""] pub static mut gpuCmdBufSize: u32_; } extern "C" { -#[doc = "GPU command buffer offset."] -#[doc = ""] - + #[doc = "GPU command buffer offset."] + #[doc = ""] pub static mut gpuCmdBufOffset: u32_; } extern "C" { -#[doc = "Adds raw GPU commands to the current command buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `cmd` - Buffer containing commands to add."] -#[doc = "* `size` - Size of the buffer."] - + #[doc = "Adds raw GPU commands to the current command buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cmd` - Buffer containing commands to add."] + #[doc = "* `size` - Size of the buffer."] pub fn GPUCMD_AddRawCommands(cmd: *const u32_, size: u32_); } extern "C" { -#[doc = "Adds a GPU command to the current command buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `header` - Header of the command."] -#[doc = "* `param` - Parameters of the command."] -#[doc = "* `paramlength` - Size of the parameter buffer."] - + #[doc = "Adds a GPU command to the current command buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `header` - Header of the command."] + #[doc = "* `param` - Parameters of the command."] + #[doc = "* `paramlength` - Size of the parameter buffer."] pub fn GPUCMD_Add(header: u32_, param: *const u32_, paramlength: u32_); } extern "C" { -#[doc = "Splits the current GPU command buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `addr` - Pointer to output the command buffer to."] -#[doc = "* `size` - Pointer to output the size (in words) of the command buffer to."] - + #[doc = "Splits the current GPU command buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr` - Pointer to output the command buffer to."] + #[doc = "* `size` - Pointer to output the size (in words) of the command buffer to."] pub fn GPUCMD_Split(addr: *mut *mut u32_, size: *mut u32_); } extern "C" { -#[doc = "Converts a 32-bit float to a 16-bit float."] -#[doc = ""] -#[doc = "Returns: The converted float."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `f` - Float to convert."] - + #[doc = "Converts a 32-bit float to a 16-bit float."] + #[doc = ""] + #[doc = "Returns: The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] pub fn f32tof16(f: f32) -> u32_; } extern "C" { -#[doc = "Converts a 32-bit float to a 20-bit float."] -#[doc = ""] -#[doc = "Returns: The converted float."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `f` - Float to convert."] - + #[doc = "Converts a 32-bit float to a 20-bit float."] + #[doc = ""] + #[doc = "Returns: The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] pub fn f32tof20(f: f32) -> u32_; } extern "C" { -#[doc = "Converts a 32-bit float to a 24-bit float."] -#[doc = ""] -#[doc = "Returns: The converted float."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `f` - Float to convert."] - + #[doc = "Converts a 32-bit float to a 24-bit float."] + #[doc = ""] + #[doc = "Returns: The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] pub fn f32tof24(f: f32) -> u32_; } extern "C" { -#[doc = "Converts a 32-bit float to a 31-bit float."] -#[doc = ""] -#[doc = "Returns: The converted float."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `f` - Float to convert."] - + #[doc = "Converts a 32-bit float to a 31-bit float."] + #[doc = ""] + #[doc = "Returns: The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] pub fn f32tof31(f: f32) -> u32_; } #[doc = "Vertex shader."] @@ -27348,25 +25503,20 @@ pub const GSH_FIXED_PRIM: DVLE_geoShaderMode = 2; pub type DVLE_geoShaderMode = ::libc::c_uint; #[doc = "DVLP data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLP_s { -#[doc = "Code size."] -#[doc = ""] - + #[doc = "Code size."] + #[doc = ""] pub codeSize: u32_, -#[doc = "Code data."] -#[doc = ""] - + #[doc = "Code data."] + #[doc = ""] pub codeData: *mut u32_, -#[doc = "Operand description size."] -#[doc = ""] - + #[doc = "Operand description size."] + #[doc = ""] pub opdescSize: u32_, -#[doc = "Operand description data."] -#[doc = ""] - + #[doc = "Operand description data."] + #[doc = ""] pub opcdescData: *mut u32_, } impl Default for DVLP_s { @@ -27380,150 +25530,116 @@ impl Default for DVLP_s { } #[doc = "DVLE constant entry data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_constEntry_s { -#[doc = "Constant type. See @ref DVLE_constantType"] -#[doc = ""] - + #[doc = "Constant type. See @ref DVLE_constantType"] + #[doc = ""] pub type_: u16_, -#[doc = "Constant ID."] -#[doc = ""] - + #[doc = "Constant ID."] + #[doc = ""] pub id: u16_, -#[doc = "Constant data."] -#[doc = ""] - + #[doc = "Constant data."] + #[doc = ""] pub data: [u32_; 4usize], } #[doc = "DVLE output entry data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_outEntry_s { -#[doc = "Output type. See @ref DVLE_outputAttribute_t"] -#[doc = ""] - + #[doc = "Output type. See @ref DVLE_outputAttribute_t"] + #[doc = ""] pub type_: u16_, -#[doc = "Output register ID."] -#[doc = ""] - + #[doc = "Output register ID."] + #[doc = ""] pub regID: u16_, -#[doc = "Output mask."] -#[doc = ""] - + #[doc = "Output mask."] + #[doc = ""] pub mask: u8_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk: [u8_; 3usize], } #[doc = "DVLE uniform entry data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_uniformEntry_s { -#[doc = "Symbol offset."] -#[doc = ""] - + #[doc = "Symbol offset."] + #[doc = ""] pub symbolOffset: u32_, -#[doc = "Start register."] -#[doc = ""] - + #[doc = "Start register."] + #[doc = ""] pub startReg: u16_, -#[doc = "End register."] -#[doc = ""] - + #[doc = "End register."] + #[doc = ""] pub endReg: u16_, } #[doc = "DVLE data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLE_s { -#[doc = "DVLE type."] -#[doc = ""] - + #[doc = "DVLE type."] + #[doc = ""] pub type_: DVLE_type, -#[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] -#[doc = ""] - + #[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] + #[doc = ""] pub mergeOutmaps: bool, -#[doc = "Geometry shader operation mode."] -#[doc = ""] - + #[doc = "Geometry shader operation mode."] + #[doc = ""] pub gshMode: DVLE_geoShaderMode, -#[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] -#[doc = ""] - + #[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] + #[doc = ""] pub gshFixedVtxStart: u8_, -#[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] -#[doc = ""] - + #[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] + #[doc = ""] pub gshVariableVtxNum: u8_, -#[doc = "Number of vertices in the fixed-size primitive vertex array."] -#[doc = ""] - + #[doc = "Number of vertices in the fixed-size primitive vertex array."] + #[doc = ""] pub gshFixedVtxNum: u8_, -#[doc = "Contained DVLPs."] -#[doc = ""] - + #[doc = "Contained DVLPs."] + #[doc = ""] pub dvlp: *mut DVLP_s, -#[doc = "Offset of the start of the main function."] -#[doc = ""] - + #[doc = "Offset of the start of the main function."] + #[doc = ""] pub mainOffset: u32_, -#[doc = "Offset of the end of the main function."] -#[doc = ""] - + #[doc = "Offset of the end of the main function."] + #[doc = ""] pub endmainOffset: u32_, -#[doc = "Constant table size."] -#[doc = ""] - + #[doc = "Constant table size."] + #[doc = ""] pub constTableSize: u32_, -#[doc = "Constant table data."] -#[doc = ""] - + #[doc = "Constant table data."] + #[doc = ""] pub constTableData: *mut DVLE_constEntry_s, -#[doc = "Output table size."] -#[doc = ""] - + #[doc = "Output table size."] + #[doc = ""] pub outTableSize: u32_, -#[doc = "Output table data."] -#[doc = ""] - + #[doc = "Output table data."] + #[doc = ""] pub outTableData: *mut DVLE_outEntry_s, -#[doc = "Uniform table size."] -#[doc = ""] - + #[doc = "Uniform table size."] + #[doc = ""] pub uniformTableSize: u32_, -#[doc = "Uniform table data."] -#[doc = ""] - + #[doc = "Uniform table data."] + #[doc = ""] pub uniformTableData: *mut DVLE_uniformEntry_s, -#[doc = "Symbol table data."] -#[doc = ""] - + #[doc = "Symbol table data."] + #[doc = ""] pub symbolTableData: *mut ::libc::c_char, -#[doc = "Output map mask."] -#[doc = ""] - + #[doc = "Output map mask."] + #[doc = ""] pub outmapMask: u8_, -#[doc = "Output map data."] -#[doc = ""] - + #[doc = "Output map data."] + #[doc = ""] pub outmapData: [u32_; 8usize], -#[doc = "Output map mode."] -#[doc = ""] - + #[doc = "Output map mode."] + #[doc = ""] pub outmapMode: u32_, -#[doc = "Output map attribute clock."] -#[doc = ""] - + #[doc = "Output map attribute clock."] + #[doc = ""] pub outmapClock: u32_, } impl Default for DVLE_s { @@ -27537,21 +25653,17 @@ impl Default for DVLE_s { } #[doc = "DVLB data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLB_s { -#[doc = "DVLE count."] -#[doc = ""] - + #[doc = "DVLE count."] + #[doc = ""] pub numDVLE: u32_, -#[doc = "Primary DVLP."] -#[doc = ""] - + #[doc = "Primary DVLP."] + #[doc = ""] pub DVLP: DVLP_s, -#[doc = "Contained DVLE."] -#[doc = ""] - + #[doc = "Contained DVLE."] + #[doc = ""] pub DVLE: *mut DVLE_s, } impl Default for DVLB_s { @@ -27564,95 +25676,80 @@ impl Default for DVLB_s { } } extern "C" { -#[doc = "Parses a shader binary."] -#[doc = ""] -#[doc = "Returns: The parsed shader binary."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `shbinData` - Shader binary data."] -#[doc = "* `shbinSize` - Shader binary size."] - + #[doc = "Parses a shader binary."] + #[doc = ""] + #[doc = "Returns: The parsed shader binary."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `shbinData` - Shader binary data."] + #[doc = "* `shbinSize` - Shader binary size."] pub fn DVLB_ParseFile(shbinData: *mut u32_, shbinSize: u32_) -> *mut DVLB_s; } extern "C" { -#[doc = "Frees shader binary data."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dvlb` - DVLB to free."] - + #[doc = "Frees shader binary data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dvlb` - DVLB to free."] pub fn DVLB_Free(dvlb: *mut DVLB_s); } extern "C" { -#[doc = "Gets a uniform register index from a shader."] -#[doc = ""] -#[doc = "Returns: The uniform register index."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dvle` - Shader to get the register from."] -#[doc = "* `name` - Name of the register."] - + #[doc = "Gets a uniform register index from a shader."] + #[doc = ""] + #[doc = "Returns: The uniform register index."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dvle` - Shader to get the register from."] + #[doc = "* `name` - Name of the register."] pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const ::libc::c_char) -> s8; } extern "C" { -#[doc = "Generates a shader output map."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `dvle` - Shader to generate an output map for."] - + #[doc = "Generates a shader output map."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dvle` - Shader to generate an output map for."] pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s); } #[doc = "24-bit float uniforms."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct float24Uniform_s { -#[doc = "Uniform ID."] -#[doc = ""] - + #[doc = "Uniform ID."] + #[doc = ""] pub id: u32_, -#[doc = "Uniform data."] -#[doc = ""] - + #[doc = "Uniform data."] + #[doc = ""] pub data: [u32_; 3usize], } #[doc = "Describes an instance of either a vertex or geometry shader."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderInstance_s { -#[doc = "Shader DVLE."] -#[doc = ""] - + #[doc = "Shader DVLE."] + #[doc = ""] pub dvle: *mut DVLE_s, -#[doc = "Boolean uniforms."] -#[doc = ""] - + #[doc = "Boolean uniforms."] + #[doc = ""] pub boolUniforms: u16_, -#[doc = "Used boolean uniform mask."] -#[doc = ""] - + #[doc = "Used boolean uniform mask."] + #[doc = ""] pub boolUniformMask: u16_, -#[doc = "Integer uniforms."] -#[doc = ""] - + #[doc = "Integer uniforms."] + #[doc = ""] pub intUniforms: [u32_; 4usize], -#[doc = "24-bit float uniforms."] -#[doc = ""] - + #[doc = "24-bit float uniforms."] + #[doc = ""] pub float24Uniforms: *mut float24Uniform_s, -#[doc = "Used integer uniform mask."] -#[doc = ""] - + #[doc = "Used integer uniform mask."] + #[doc = ""] pub intUniformMask: u8_, -#[doc = "Float uniform count."] -#[doc = ""] - + #[doc = "Float uniform count."] + #[doc = ""] pub numFloat24Uniforms: u8_, } impl Default for shaderInstance_s { @@ -27666,25 +25763,20 @@ impl Default for shaderInstance_s { } #[doc = "Describes an instance of a full shader program."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderProgram_s { -#[doc = "Vertex shader."] -#[doc = ""] - + #[doc = "Vertex shader."] + #[doc = ""] pub vertexShader: *mut shaderInstance_s, -#[doc = "Geometry shader."] -#[doc = ""] - + #[doc = "Geometry shader."] + #[doc = ""] pub geometryShader: *mut shaderInstance_s, -#[doc = "Geometry shader input permutation."] -#[doc = ""] - + #[doc = "Geometry shader input permutation."] + #[doc = ""] pub geoShaderInputPermutation: [u32_; 2usize], -#[doc = "Geometry shader input stride."] -#[doc = ""] - + #[doc = "Geometry shader input stride."] + #[doc = ""] pub geoShaderInputStride: u8_, } impl Default for shaderProgram_s { @@ -27698,35 +25790,32 @@ impl Default for shaderProgram_s { } extern "C" { #[must_use] -#[doc = "Initializes a shader instance."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `si` - Shader instance to initialize."] -#[doc = "* `dvle` - DVLE to initialize the shader instance with."] - + #[doc = "Initializes a shader instance."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to initialize."] + #[doc = "* `dvle` - DVLE to initialize the shader instance with."] pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] -#[doc = "Frees a shader instance."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `si` - Shader instance to free."] - + #[doc = "Frees a shader instance."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to free."] pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a bool uniform of a shader."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `si` - Shader instance to use."] -#[doc = "* `id` - ID of the bool uniform."] -#[doc = "* `value` - Value to set."] - + #[doc = "Sets a bool uniform of a shader."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to use."] + #[doc = "* `id` - ID of the bool uniform."] + #[doc = "* `value` - Value to set."] pub fn shaderInstanceSetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -27735,14 +25824,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a bool uniform of a shader."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `si` - Shader instance to use."] -#[doc = "* `id` - ID of the bool uniform."] -#[doc = "* `value` - Pointer to output the value to."] - + #[doc = "Gets a bool uniform of a shader."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to use."] + #[doc = "* `id` - ID of the bool uniform."] + #[doc = "* `value` - Pointer to output the value to."] pub fn shaderInstanceGetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -27750,13 +25838,12 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Gets the location of a shader's uniform."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `si` - Shader instance to use."] -#[doc = "* `name` - Name of the uniform."] - + #[doc = "Gets the location of a shader's uniform."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to use."] + #[doc = "* `name` - Name of the uniform."] pub fn shaderInstanceGetUniformLocation( si: *mut shaderInstance_s, name: *const ::libc::c_char, @@ -27764,56 +25851,51 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes a shader program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sp` - Shader program to initialize."] - + #[doc = "Initializes a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to initialize."] pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] -#[doc = "Frees a shader program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sp` - Shader program to free."] - + #[doc = "Frees a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to free."] pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the vertex shader of a shader program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sp` - Shader program to use."] -#[doc = "* `dvle` - Vertex shader to set."] - + #[doc = "Sets the vertex shader of a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `dvle` - Vertex shader to set."] pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the geometry shader of a shader program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sp` - Shader program to use."] -#[doc = "* `dvle` - Geometry shader to set."] -#[doc = "* `stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] - + #[doc = "Sets the geometry shader of a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `dvle` - Geometry shader to set."] + #[doc = "* `stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sp` - Shader program to use."] -#[doc = "* `permutation` - Attribute permutation to use."] - + #[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `permutation` - Attribute permutation to use."] pub fn shaderProgramSetGshInputPermutation( sp: *mut shaderProgram_s, permutation: u64_, @@ -27821,14 +25903,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the shader units to use the specified shader program."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sp` - Shader program to use."] -#[doc = "* `sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] -#[doc = "* `sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] - + #[doc = "Configures the shader units to use the specified shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] + #[doc = "* `sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] pub fn shaderProgramConfigure( sp: *mut shaderProgram_s, sendVshCode: bool, @@ -27837,12 +25918,11 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `sp` - Shader program to use."] - + #[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result; } #[doc = "Mono sound"] @@ -27885,21 +25965,17 @@ pub const NDSP_SPKPOS_NUM: ndspSpeakerPos = 2; pub type ndspSpeakerPos = ::libc::c_uint; #[doc = "ADPCM data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ndspAdpcmData { -#[doc = "Current predictor index"] -#[doc = ""] - + #[doc = "Current predictor index"] + #[doc = ""] pub index: u16_, -#[doc = "Last outputted PCM16 sample."] -#[doc = ""] - + #[doc = "Last outputted PCM16 sample."] + #[doc = ""] pub history0: s16, -#[doc = "Second to last outputted PCM16 sample."] -#[doc = ""] - + #[doc = "Second to last outputted PCM16 sample."] + #[doc = ""] pub history1: s16, } #[doc = "Wave buffer struct."] @@ -27928,58 +26004,46 @@ pub const NDSP_WBUF_DONE: _bindgen_ty_29 = 3; pub type _bindgen_ty_29 = ::libc::c_uint; #[doc = "Wave buffer struct."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct tag_ndspWaveBuf { pub __bindgen_anon_1: tag_ndspWaveBuf__bindgen_ty_1, -#[doc = "Total number of samples (PCM8=bytes, PCM16=halfwords, DSPADPCM=nibbles without frame headers)"] -#[doc = ""] - + #[doc = "Total number of samples (PCM8=bytes, PCM16=halfwords, DSPADPCM=nibbles without frame headers)"] + #[doc = ""] pub nsamples: u32_, -#[doc = "ADPCM data."] -#[doc = ""] - + #[doc = "ADPCM data."] + #[doc = ""] pub adpcm_data: *mut ndspAdpcmData, -#[doc = "Buffer offset. Only used for capture."] -#[doc = ""] - + #[doc = "Buffer offset. Only used for capture."] + #[doc = ""] pub offset: u32_, -#[doc = "Whether to loop the buffer."] -#[doc = ""] - + #[doc = "Whether to loop the buffer."] + #[doc = ""] pub looping: bool, -#[doc = "Queuing/playback status."] -#[doc = ""] - + #[doc = "Queuing/playback status."] + #[doc = ""] pub status: u8_, -#[doc = "Sequence ID. Assigned automatically by ndspChnWaveBufAdd."] -#[doc = ""] - + #[doc = "Sequence ID. Assigned automatically by ndspChnWaveBufAdd."] + #[doc = ""] pub sequence_id: u16_, -#[doc = "Next buffer to play. Used internally, do not modify."] -#[doc = ""] - + #[doc = "Next buffer to play. Used internally, do not modify."] + #[doc = ""] pub next: *mut ndspWaveBuf, } #[repr(C)] #[derive(Copy, Clone)] pub union tag_ndspWaveBuf__bindgen_ty_1 { -#[doc = "Pointer to PCM8 sample data."] -#[doc = ""] - - pub data_pcm8: *mut s8, -#[doc = "Pointer to PCM16 sample data."] -#[doc = ""] - + #[doc = "Pointer to PCM8 sample data."] + #[doc = ""] + pub data_pcm8: *mut s8, + #[doc = "Pointer to PCM16 sample data."] + #[doc = ""] pub data_pcm16: *mut s16, -#[doc = "Pointer to DSPADPCM sample data."] -#[doc = ""] - + #[doc = "Pointer to DSPADPCM sample data."] + #[doc = ""] pub data_adpcm: *mut u8_, -#[doc = "Data virtual address."] -#[doc = ""] - + #[doc = "Data virtual address."] + #[doc = ""] pub data_vaddr: *const ::libc::c_void, } impl Default for tag_ndspWaveBuf__bindgen_ty_1 { @@ -28015,15 +26079,14 @@ pub type ndspAuxCallback = ::core::option::Option< ), >; extern "C" { -#[doc = "Sets up the DSP component."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `binary` - DSP binary to load."] -#[doc = "* `size` - Size of the DSP binary."] -#[doc = "* `progMask` - Program RAM block mask to load the binary to."] -#[doc = "* `dataMask` - Data RAM block mask to load the binary to."] - + #[doc = "Sets up the DSP component."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `binary` - DSP binary to load."] + #[doc = "* `size` - Size of the DSP binary."] + #[doc = "* `progMask` - Program RAM block mask to load the binary to."] + #[doc = "* `dataMask` - Data RAM block mask to load the binary to."] pub fn ndspUseComponent( binary: *const ::libc::c_void, size: u32_, @@ -28033,154 +26096,137 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes NDSP."] -#[doc = ""] - + #[doc = "Initializes NDSP."] + #[doc = ""] pub fn ndspInit() -> Result; } extern "C" { -#[doc = "Exits NDSP."] -#[doc = ""] - + #[doc = "Exits NDSP."] + #[doc = ""] pub fn ndspExit(); } extern "C" { -#[doc = "Gets the number of dropped sound frames."] -#[doc = ""] -#[doc = "Returns: The number of dropped sound frames."] -#[doc = ""] - + #[doc = "Gets the number of dropped sound frames."] + #[doc = ""] + #[doc = "Returns: The number of dropped sound frames."] + #[doc = ""] pub fn ndspGetDroppedFrames() -> u32_; } extern "C" { -#[doc = "Gets the total sound frame count."] -#[doc = ""] -#[doc = "Returns: The total sound frame count."] -#[doc = ""] - + #[doc = "Gets the total sound frame count."] + #[doc = ""] + #[doc = "Returns: The total sound frame count."] + #[doc = ""] pub fn ndspGetFrameCount() -> u32_; } extern "C" { -#[doc = "Sets the master volume."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `volume` - Volume to set. Defaults to 1.0f."] - + #[doc = "Sets the master volume."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `volume` - Volume to set. Defaults to 1.0f."] pub fn ndspSetMasterVol(volume: f32); } extern "C" { -#[doc = "Sets the output mode."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] - + #[doc = "Sets the output mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] pub fn ndspSetOutputMode(mode: ndspOutputMode); } extern "C" { -#[doc = "Sets the clipping mode."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] - + #[doc = "Sets the clipping mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] pub fn ndspSetClippingMode(mode: ndspClippingMode); } extern "C" { -#[doc = "Sets the output count."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `count` - Output count to set. Defaults to 2."] - + #[doc = "Sets the output count."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Output count to set. Defaults to 2."] pub fn ndspSetOutputCount(count: ::libc::c_int); } extern "C" { -#[doc = "Sets the wave buffer to capture audio to."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `capture` - Wave buffer to capture to."] - + #[doc = "Sets the wave buffer to capture audio to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capture` - Wave buffer to capture to."] pub fn ndspSetCapture(capture: *mut ndspWaveBuf); } extern "C" { -#[doc = "Sets the sound frame callback."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `callback` - Callback to set."] -#[doc = "* `data` - User-defined data to pass to the callback."] - + #[doc = "Sets the sound frame callback."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `callback` - Callback to set."] + #[doc = "* `data` - User-defined data to pass to the callback."] pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void); } extern "C" { -#[doc = "Sets the surround sound depth."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `depth` - Depth to set. Defaults to 0x7FFF."] - + #[doc = "Sets the surround sound depth."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `depth` - Depth to set. Defaults to 0x7FFF."] pub fn ndspSurroundSetDepth(depth: u16_); } extern "C" { -#[doc = "Sets the surround sound position."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] - + #[doc = "Sets the surround sound position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] pub fn ndspSurroundSetPos(pos: ndspSpeakerPos); } extern "C" { -#[doc = "Sets the surround sound rear ratio."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `ratio` - Rear ratio to set. Defaults to 0x8000."] - + #[doc = "Sets the surround sound rear ratio."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ratio` - Rear ratio to set. Defaults to 0x8000."] pub fn ndspSurroundSetRearRatio(ratio: u16_); } extern "C" { -#[doc = "Configures whether an auxiliary output is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the auxiliary output."] -#[doc = "* `enable` - Whether to enable the auxiliary output."] - + #[doc = "Configures whether an auxiliary output is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `enable` - Whether to enable the auxiliary output."] pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { -#[doc = "Configures whether an auxiliary output should use front bypass."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the auxiliary output."] -#[doc = "* `bypass` - Whether to use front bypass."] - + #[doc = "Configures whether an auxiliary output should use front bypass."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `bypass` - Whether to use front bypass."] pub fn ndspAuxSetFrontBypass(id: ::libc::c_int, bypass: bool); } extern "C" { -#[doc = "Sets the volume of an auxiliary output."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the auxiliary output."] -#[doc = "* `volume` - Volume to set."] - + #[doc = "Sets the volume of an auxiliary output."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `volume` - Volume to set."] pub fn ndspAuxSetVolume(id: ::libc::c_int, volume: f32); } extern "C" { -#[doc = "Sets the callback of an auxiliary output."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the auxiliary output."] -#[doc = "* `callback` - Callback to set."] -#[doc = "* `data` - User-defined data to pass to the callback."] - + #[doc = "Sets the callback of an auxiliary output."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `callback` - Callback to set."] + #[doc = "* `data` - User-defined data to pass to the callback."] pub fn ndspAuxSetCallback( id: ::libc::c_int, callback: ndspAuxCallback, @@ -28264,171 +26310,155 @@ pub const NDSP_INTERP_NONE: ndspInterpType = 2; pub type ndspInterpType = ::libc::c_uint; extern "C" { -#[doc = "Resets a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Resets a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnReset(id: ::libc::c_int); } extern "C" { -#[doc = "Initializes the parameters of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Initializes the parameters of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnInitParams(id: ::libc::c_int); } extern "C" { -#[doc = "Checks whether a channel is currently playing."] -#[doc = ""] -#[doc = "Returns: Whether the channel is currently playing."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Checks whether a channel is currently playing."] + #[doc = ""] + #[doc = "Returns: Whether the channel is currently playing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool; } extern "C" { -#[doc = "Gets the current sample position of a channel."] -#[doc = ""] -#[doc = "Returns: The channel's sample position."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Gets the current sample position of a channel."] + #[doc = ""] + #[doc = "Returns: The channel's sample position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32_; } extern "C" { -#[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] -#[doc = ""] -#[doc = "Returns: The sequence ID of the wave buffer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] + #[doc = ""] + #[doc = "Returns: The sequence ID of the wave buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16_; } extern "C" { -#[doc = "Checks whether a channel is currently paused."] -#[doc = ""] -#[doc = "Returns: Whether the channel is currently paused."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Checks whether a channel is currently paused."] + #[doc = ""] + #[doc = "Returns: Whether the channel is currently paused."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool; } extern "C" { -#[doc = "Sets the pause status of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `paused` - Whether the channel is to be paused (true) or unpaused (false)."] - + #[doc = "Sets the pause status of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `paused` - Whether the channel is to be paused (true) or unpaused (false)."] pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool); } extern "C" { -#[doc = "Sets the format of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `format` - Format to use."] - + #[doc = "Sets the format of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `format` - Format to use."] pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16_); } extern "C" { -#[doc = "Sets the interpolation type of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `type` - Interpolation type to use."] - + #[doc = "Sets the interpolation type of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `type` - Interpolation type to use."] pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType); } extern "C" { -#[doc = "Sets the sample rate of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `rate` - Sample rate to use."] - + #[doc = "Sets the sample rate of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `rate` - Sample rate to use."] pub fn ndspChnSetRate(id: ::libc::c_int, rate: f32); } extern "C" { -#[doc = "Sets the mix parameters (volumes) of a channel."] -#[doc = ""] -#[doc = "- 0: Front left volume."] -#[doc = "- 1: Front right volume."] -#[doc = "- 2: Back left volume:"] -#[doc = "- 3: Back right volume:"] -#[doc = "- 4..7: Same as 0..3, but for auxiliary output 0."] -#[doc = "- 8..11: Same as 0..3, but for auxiliary output 1."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `mix` - Mix parameters to use. Working hypothesis:"] - + #[doc = "Sets the mix parameters (volumes) of a channel."] + #[doc = ""] + #[doc = "- 0: Front left volume."] + #[doc = "- 1: Front right volume."] + #[doc = "- 2: Back left volume:"] + #[doc = "- 3: Back right volume:"] + #[doc = "- 4..7: Same as 0..3, but for auxiliary output 0."] + #[doc = "- 8..11: Same as 0..3, but for auxiliary output 1."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `mix` - Mix parameters to use. Working hypothesis:"] pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32); } extern "C" { -#[doc = "Sets the DSPADPCM coefficients of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `coefs` - DSPADPCM coefficients to use."] - + #[doc = "Sets the DSPADPCM coefficients of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `coefs` - DSPADPCM coefficients to use."] pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16_); } extern "C" { -#[doc = "Clears the wave buffer queue of a channel and stops playback."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Clears the wave buffer queue of a channel and stops playback."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnWaveBufClear(id: ::libc::c_int); } extern "C" { -#[doc = "Adds a wave buffer to the wave buffer queue of a channel."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `buf` - Wave buffer to add."] - + #[doc = "Adds a wave buffer to the wave buffer queue of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `buf` - Wave buffer to add."] pub fn ndspChnWaveBufAdd(id: ::libc::c_int, buf: *mut ndspWaveBuf); } extern "C" { -#[doc = "Configures whether the IIR monopole filter of a channel is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `enable` - Whether to enable the IIR monopole filter."] - + #[doc = "Configures whether the IIR monopole filter of a channel is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `enable` - Whether to enable the IIR monopole filter."] pub fn ndspChnIirMonoSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { -#[doc = "Manually sets up the parameters on monopole filter"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `enable` - Whether to enable the IIR monopole filter."] - + #[doc = "Manually sets up the parameters on monopole filter"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `enable` - Whether to enable the IIR monopole filter."] pub fn ndspChnIirMonoSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -28437,42 +26467,38 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `f0` - Low pass cut-off frequency."] - + #[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Low pass cut-off frequency."] pub fn ndspChnIirMonoSetParamsLowPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { -#[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `f0` - High pass cut-off frequency."] - + #[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - High pass cut-off frequency."] pub fn ndspChnIirMonoSetParamsHighPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { -#[doc = "Configures whether the IIR biquad filter of a channel is enabled."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `enable` - Whether to enable the IIR biquad filter."] - + #[doc = "Configures whether the IIR biquad filter of a channel is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `enable` - Whether to enable the IIR biquad filter."] pub fn ndspChnIirBiquadSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { -#[doc = "Manually sets up the parameters of the biquad filter"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] - + #[doc = "Manually sets up the parameters of the biquad filter"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] pub fn ndspChnIirBiquadSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -28484,59 +26510,54 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a low pass filter."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `f0` - Low pass cut-off frequency."] -#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - + #[doc = "Sets the biquad to be a low pass filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Low pass cut-off frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a high pass filter."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `f0` - High pass cut-off frequency."] -#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - + #[doc = "Sets the biquad to be a high pass filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - High pass cut-off frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a band pass filter."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `f0` - Mid-frequency."] -#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - + #[doc = "Sets the biquad to be a band pass filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Mid-frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a notch filter."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `f0` - Notch frequency."] -#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - + #[doc = "Sets the biquad to be a notch filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Notch frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] pub fn ndspChnIirBiquadSetParamsNotchFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a peaking equalizer."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `id` - ID of the channel (0..23)."] -#[doc = "* `f0` - Central frequency."] -#[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] -#[doc = "* `gain` - Amount of gain (raw value = 10 ^ dB/40)"] - + #[doc = "Sets the biquad to be a peaking equalizer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Central frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = "* `gain` - Amount of gain (raw value = 10 ^ dB/40)"] pub fn ndspChnIirBiquadSetParamsPeakingEqualizer( id: ::libc::c_int, f0: f32, @@ -28776,25 +26797,20 @@ pub const SWKBD_BANNED_INPUT: SwkbdResult = 30; pub type SwkbdResult = ::libc::c_int; #[doc = "Keyboard dictionary word for predictive input."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdDictWord { -#[doc = "Reading of the word (that is, the string that needs to be typed)."] -#[doc = ""] - + #[doc = "Reading of the word (that is, the string that needs to be typed)."] + #[doc = ""] pub reading: [u16_; 41usize], -#[doc = "Spelling of the word."] -#[doc = ""] - + #[doc = "Spelling of the word."] + #[doc = ""] pub word: [u16_; 41usize], -#[doc = "Language the word applies to."] -#[doc = ""] - + #[doc = "Language the word applies to."] + #[doc = ""] pub language: u8_, -#[doc = "Specifies if the word applies to all languages."] -#[doc = ""] - + #[doc = "Specifies if the word applies to all languages."] + #[doc = ""] pub all_languages: bool, } impl Default for SwkbdDictWord { @@ -28819,7 +26835,6 @@ pub type SwkbdCallbackFn = ::core::option::Option< >; #[doc = "Keyboard status data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SwkbdStatusData { @@ -28827,7 +26842,6 @@ pub struct SwkbdStatusData { } #[doc = "Keyboard predictive input learning data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdLearningData { @@ -28844,7 +26858,6 @@ impl Default for SwkbdLearningData { } #[doc = "Internal libctru book-keeping structure for software keyboards."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdExtra { @@ -28866,7 +26879,6 @@ impl Default for SwkbdExtra { } #[doc = "Software keyboard parameter structure, it shouldn't be modified directly."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct SwkbdState { @@ -28935,15 +26947,14 @@ impl Default for SwkbdState { } } extern "C" { -#[doc = "Initializes software keyboard status."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `type` - Keyboard type."] -#[doc = "* `numButtons` - Number of dialog buttons to display (1, 2 or 3)."] -#[doc = "* `maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] - + #[doc = "Initializes software keyboard status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `type` - Keyboard type."] + #[doc = "* `numButtons` - Number of dialog buttons to display (1, 2 or 3)."] + #[doc = "* `maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] pub fn swkbdInit( swkbd: *mut SwkbdState, type_: SwkbdType, @@ -28952,35 +26963,32 @@ extern "C" { ); } extern "C" { -#[doc = "Specifies which special features are enabled in a software keyboard."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `features` - Feature bitmask."] - + #[doc = "Specifies which special features are enabled in a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `features` - Feature bitmask."] pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32_); } extern "C" { -#[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `text` - Hint text."] - + #[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `text` - Hint text."] pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { -#[doc = "Configures a dialog button in a software keyboard."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `button` - Specifies which button to configure."] -#[doc = "* `text` - Button text."] -#[doc = "* `submit` - Specifies whether pushing the button will submit the text or discard it."] - + #[doc = "Configures a dialog button in a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `button` - Specifies which button to configure."] + #[doc = "* `text` - Button text."] + #[doc = "* `submit` - Specifies whether pushing the button will submit the text or discard it."] pub fn swkbdSetButton( swkbd: *mut SwkbdState, button: SwkbdButton, @@ -28989,24 +26997,22 @@ extern "C" { ); } extern "C" { -#[doc = "Sets the initial text that a software keyboard will display on launch."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `text` - Initial text."] - + #[doc = "Sets the initial text that a software keyboard will display on launch."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `text` - Initial text."] pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { -#[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `word` - Pointer to dictionary word structure."] -#[doc = "* `reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] -#[doc = "* `text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] - + #[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `word` - Pointer to dictionary word structure."] + #[doc = "* `reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] + #[doc = "* `text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] pub fn swkbdSetDictWord( word: *mut SwkbdDictWord, reading: *const ::libc::c_char, @@ -29014,14 +27020,13 @@ extern "C" { ); } extern "C" { -#[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `dict` - Pointer to dictionary words."] -#[doc = "* `wordCount` - Number of words in the dictionary."] - + #[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `dict` - Pointer to dictionary words."] + #[doc = "* `wordCount` - Number of words in the dictionary."] pub fn swkbdSetDictionary( swkbd: *mut SwkbdState, dict: *const SwkbdDictWord, @@ -29029,15 +27034,14 @@ extern "C" { ); } extern "C" { -#[doc = "Configures software keyboard internal status management."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] -#[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] -#[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] - + #[doc = "Configures software keyboard internal status management."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] + #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] + #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] pub fn swkbdSetStatusData( swkbd: *mut SwkbdState, data: *mut SwkbdStatusData, @@ -29046,15 +27050,14 @@ extern "C" { ); } extern "C" { -#[doc = "Configures software keyboard predictive input learning data management."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] -#[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] -#[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] - + #[doc = "Configures software keyboard predictive input learning data management."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] + #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] + #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] pub fn swkbdSetLearningData( swkbd: *mut SwkbdState, data: *mut SwkbdLearningData, @@ -29063,14 +27066,13 @@ extern "C" { ); } extern "C" { -#[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `callback` - Filter callback function."] -#[doc = "* `user` - Custom data to be passed to the callback function."] - + #[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `callback` - Filter callback function."] + #[doc = "* `user` - Custom data to be passed to the callback function."] pub fn swkbdSetFilterCallback( swkbd: *mut SwkbdState, callback: SwkbdCallbackFn, @@ -29078,16 +27080,15 @@ extern "C" { ); } extern "C" { -#[doc = "Launches a software keyboard in order to input text."] -#[doc = ""] -#[doc = "Returns: The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `swkbd` - Pointer to swkbd state."] -#[doc = "* `buf` - Pointer to output buffer which will hold the inputted text."] -#[doc = "* `bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] - + #[doc = "Launches a software keyboard in order to input text."] + #[doc = ""] + #[doc = "Returns: The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `buf` - Pointer to output buffer which will hold the inputted text."] + #[doc = "* `bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] pub fn swkbdInputText( swkbd: *mut SwkbdState, buf: *mut ::libc::c_char, @@ -29183,113 +27184,95 @@ impl Default for errorConf { } } extern "C" { -#[doc = "Init the error applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `err` - Pointer to errorConf."] -#[doc = "* `type` - errorType Type of error."] -#[doc = "* `lang` - CFG_Language Lang of error."] - + #[doc = "Init the error applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `err` - Pointer to errorConf."] + #[doc = "* `type` - errorType Type of error."] + #[doc = "* `lang` - CFG_Language Lang of error."] pub fn errorInit(err: *mut errorConf, type_: errorType, lang: CFG_Language); } extern "C" { -#[doc = "Sets error code to display."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `err` - Pointer to errorConf."] -#[doc = "* `error` - Error-code to display."] - + #[doc = "Sets error code to display."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `err` - Pointer to errorConf."] + #[doc = "* `error` - Error-code to display."] pub fn errorCode(err: *mut errorConf, error: ::libc::c_int); } extern "C" { -#[doc = "Sets error text to display."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `err` - Pointer to errorConf."] -#[doc = "* `text` - Error-text to display."] - + #[doc = "Sets error text to display."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `err` - Pointer to errorConf."] + #[doc = "* `text` - Error-text to display."] pub fn errorText(err: *mut errorConf, text: *const ::libc::c_char); } extern "C" { -#[doc = "Displays the error applet."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `err` - Pointer to errorConf."] - + #[doc = "Displays the error applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `err` - Pointer to errorConf."] pub fn errorDisp(err: *mut errorConf); } #[doc = "Parameter structure passed to AppletEd"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MiiSelectorConf { -#[doc = "Enables canceling of selection if nonzero."] -#[doc = ""] - + #[doc = "Enables canceling of selection if nonzero."] + #[doc = ""] pub enable_cancel_button: u8_, -#[doc = "Makes Guets Miis selectable if nonzero."] -#[doc = ""] - + #[doc = "Makes Guets Miis selectable if nonzero."] + #[doc = ""] pub enable_selecting_guests: u8_, -#[doc = "Shows applet on top screen if nonzero,"] -#[doc = "otherwise show it on the bottom screen."] -#[doc = ""] - + #[doc = "Shows applet on top screen if nonzero,"] + #[doc = "otherwise show it on the bottom screen."] + #[doc = ""] pub show_on_top_screen: u8_, -#[doc = "@private"] -#[doc = ""] - + #[doc = "@private"] + #[doc = ""] pub _unk0x3: [u8_; 5usize], -#[doc = "UTF16-LE string displayed at the top of the applet. If"] -#[doc = "set to the empty string, a default title is displayed."] -#[doc = ""] - + #[doc = "UTF16-LE string displayed at the top of the applet. If"] + #[doc = "set to the empty string, a default title is displayed."] + #[doc = ""] pub title: [u16_; 64usize], -#[doc = "@private"] -#[doc = ""] - + #[doc = "@private"] + #[doc = ""] pub _unk0x88: [u8_; 4usize], -#[doc = "If nonzero, the applet shows a page with Guest"] -#[doc = "Miis on launch."] -#[doc = ""] - + #[doc = "If nonzero, the applet shows a page with Guest"] + #[doc = "Miis on launch."] + #[doc = ""] pub show_guest_page: u8_, -#[doc = "@private"] -#[doc = ""] - + #[doc = "@private"] + #[doc = ""] pub _unk0x8D: [u8_; 3usize], -#[doc = "Index of the initially selected Mii. If"] -#[doc = "@ref MiiSelectorConf.show_guest_page is"] -#[doc = "set, this is the index of a Guest Mii,"] -#[doc = "otherwise that of a user Mii."] -#[doc = ""] - + #[doc = "Index of the initially selected Mii. If"] + #[doc = "@ref MiiSelectorConf.show_guest_page is"] + #[doc = "set, this is the index of a Guest Mii,"] + #[doc = "otherwise that of a user Mii."] + #[doc = ""] pub initial_index: u32_, -#[doc = "Each byte set to a nonzero value"] -#[doc = "enables its corresponding Guest"] -#[doc = "Mii to be enabled for selection."] -#[doc = ""] - + #[doc = "Each byte set to a nonzero value"] + #[doc = "enables its corresponding Guest"] + #[doc = "Mii to be enabled for selection."] + #[doc = ""] pub mii_guest_whitelist: [u8_; 6usize], -#[doc = "Each byte set to a nonzero value enables"] -#[doc = "its corresponding user Mii to be enabled"] -#[doc = "for selection."] -#[doc = ""] - + #[doc = "Each byte set to a nonzero value enables"] + #[doc = "its corresponding user Mii to be enabled"] + #[doc = "for selection."] + #[doc = ""] pub mii_whitelist: [u8_; 100usize], -#[doc = "@private"] -#[doc = ""] - + #[doc = "@private"] + #[doc = ""] pub _unk0xFE: u16_, -#[doc = "Will be set to @ref MIISELECTOR_MAGIC before launching the"] -#[doc = "applet."] -#[doc = ""] - + #[doc = "Will be set to @ref MIISELECTOR_MAGIC before launching the"] + #[doc = "applet."] + #[doc = ""] pub magic: u32_, } impl Default for MiiSelectorConf { @@ -29303,43 +27286,35 @@ impl Default for MiiSelectorConf { } #[doc = "Structure written by AppletEd"] #[doc = ""] - #[repr(C)] pub struct MiiSelectorReturn { -#[doc = "0 if a Mii was selected, 1 if the selection was"] -#[doc = "canceled."] -#[doc = ""] - + #[doc = "0 if a Mii was selected, 1 if the selection was"] + #[doc = "canceled."] + #[doc = ""] pub no_mii_selected: u32_, -#[doc = "1 if a Guest Mii was selected, 0 otherwise."] -#[doc = ""] - + #[doc = "1 if a Guest Mii was selected, 0 otherwise."] + #[doc = ""] pub guest_mii_was_selected: u32_, -#[doc = "Index of the selected Guest Mii,"] -#[doc = "0xFFFFFFFF if no guest was selected."] -#[doc = ""] - + #[doc = "Index of the selected Guest Mii,"] + #[doc = "0xFFFFFFFF if no guest was selected."] + #[doc = ""] pub guest_mii_index: u32_, -#[doc = "Data of selected Mii."] -#[doc = ""] - + #[doc = "Data of selected Mii."] + #[doc = ""] pub mii: MiiData, -#[doc = "@private"] -#[doc = ""] - + #[doc = "@private"] + #[doc = ""] pub _pad0x68: u16_, -#[doc = "Checksum of the returned Mii data."] -#[doc = "Stored as a big-endian value; use"] -#[doc = "@ref miiSelectorChecksumIsValid to"] -#[doc = "verify."] -#[doc = ""] - + #[doc = "Checksum of the returned Mii data."] + #[doc = "Stored as a big-endian value; use"] + #[doc = "@ref miiSelectorChecksumIsValid to"] + #[doc = "verify."] + #[doc = ""] pub checksum: u16_, -#[doc = "Localized name of a Guest Mii,"] -#[doc = "if one was selected (UTF16-LE"] -#[doc = "string). Zeroed otherwise."] -#[doc = ""] - + #[doc = "Localized name of a Guest Mii,"] + #[doc = "if one was selected (UTF16-LE"] + #[doc = "string). Zeroed otherwise."] + #[doc = ""] pub guest_mii_name: [u16_; 12usize], } impl Default for MiiSelectorReturn { @@ -29372,110 +27347,101 @@ pub const MIISELECTOR_GUESTSTART: _bindgen_ty_35 = 8; pub type _bindgen_ty_35 = ::libc::c_uint; extern "C" { -#[doc = "Initialize Mii selector config"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Pointer to Miiselector config."] - + #[doc = "Initialize Mii selector config"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Pointer to Miiselector config."] pub fn miiSelectorInit(conf: *mut MiiSelectorConf); } extern "C" { -#[doc = "Launch the Mii selector library applet"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Configuration determining how the applet should behave"] - + #[doc = "Launch the Mii selector library applet"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Configuration determining how the applet should behave"] pub fn miiSelectorLaunch(conf: *const MiiSelectorConf, returnbuf: *mut MiiSelectorReturn); } extern "C" { -#[doc = "Sets title of the Mii selector library applet"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Pointer to miiSelector configuration"] -#[doc = "* `text` - Title text of Mii selector"] - + #[doc = "Sets title of the Mii selector library applet"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Pointer to miiSelector configuration"] + #[doc = "* `text` - Title text of Mii selector"] pub fn miiSelectorSetTitle(conf: *mut MiiSelectorConf, text: *const ::libc::c_char); } extern "C" { -#[doc = "Specifies which special options are enabled in the Mii selector"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Pointer to miiSelector configuration"] -#[doc = "* `options` - Options bitmask"] - + #[doc = "Specifies which special options are enabled in the Mii selector"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Pointer to miiSelector configuration"] + #[doc = "* `options` - Options bitmask"] pub fn miiSelectorSetOptions(conf: *mut MiiSelectorConf, options: u32_); } extern "C" { -#[doc = "Specifies which guest Miis will be selectable"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Pointer to miiSelector configuration"] -#[doc = "* `index` - Index of the guest Miis that will be whitelisted."] - + #[doc = "Specifies which guest Miis will be selectable"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Pointer to miiSelector configuration"] + #[doc = "* `index` - Index of the guest Miis that will be whitelisted."] pub fn miiSelectorWhitelistGuestMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { -#[doc = "Specifies which guest Miis will be unselectable"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Pointer to miiSelector configuration"] -#[doc = "* `index` - Index of the guest Miis that will be blacklisted."] - + #[doc = "Specifies which guest Miis will be unselectable"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Pointer to miiSelector configuration"] + #[doc = "* `index` - Index of the guest Miis that will be blacklisted."] pub fn miiSelectorBlacklistGuestMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { -#[doc = "Specifies which user Miis will be selectable"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Pointer to miiSelector configuration"] -#[doc = "* `index` - Index of the user Miis that will be whitelisted."] - + #[doc = "Specifies which user Miis will be selectable"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Pointer to miiSelector configuration"] + #[doc = "* `index` - Index of the user Miis that will be whitelisted."] pub fn miiSelectorWhitelistUserMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { -#[doc = "Specifies which user Miis will be selectable"] -#[doc = ""] -#[doc = ""] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `conf` - Pointer to miiSelector configuration"] -#[doc = "* `index` - Index of the user Miis that will be blacklisted."] - + #[doc = "Specifies which user Miis will be selectable"] + #[doc = ""] + #[doc = ""] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `conf` - Pointer to miiSelector configuration"] + #[doc = "* `index` - Index of the user Miis that will be blacklisted."] pub fn miiSelectorBlacklistUserMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { -#[doc = "Get Mii name"] -#[doc = ""] -#[doc = ""] -#[doc = "(assuming that no non-BMP characters are used), this value should be 36 (or 30 if you are not"] -#[doc = "dealing with guest miis)."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `returnbuf` - Pointer to miiSelector return"] -#[doc = "* `out` - String containing a Mii's name"] -#[doc = "* `max_size` - Size of string. Since UTF8 characters range in size from 1-3 bytes"] - + #[doc = "Get Mii name"] + #[doc = ""] + #[doc = ""] + #[doc = "(assuming that no non-BMP characters are used), this value should be 36 (or 30 if you are not"] + #[doc = "dealing with guest miis)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `returnbuf` - Pointer to miiSelector return"] + #[doc = "* `out` - String containing a Mii's name"] + #[doc = "* `max_size` - Size of string. Since UTF8 characters range in size from 1-3 bytes"] pub fn miiSelectorReturnGetName( returnbuf: *const MiiSelectorReturn, out: *mut ::libc::c_char, @@ -29483,17 +27449,16 @@ extern "C" { ); } extern "C" { -#[doc = "Get Mii Author"] -#[doc = ""] -#[doc = ""] -#[doc = "(assuming that no non-BMP characters are used), this value should be 30."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `returnbuf` - Pointer to miiSelector return"] -#[doc = "* `out` - String containing a Mii's author"] -#[doc = "* `max_size` - Size of string. Since UTF8 characters range in size from 1-3 bytes"] - + #[doc = "Get Mii Author"] + #[doc = ""] + #[doc = ""] + #[doc = "(assuming that no non-BMP characters are used), this value should be 30."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `returnbuf` - Pointer to miiSelector return"] + #[doc = "* `out` - String containing a Mii's author"] + #[doc = "* `max_size` - Size of string. Since UTF8 characters range in size from 1-3 bytes"] pub fn miiSelectorReturnGetAuthor( returnbuf: *const MiiSelectorReturn, out: *mut ::libc::c_char, @@ -29501,39 +27466,34 @@ extern "C" { ); } extern "C" { -#[doc = "Verifies that the Mii data returned from the applet matches its"] -#[doc = ""] -#[doc = "checksum"] -#[doc = ""] -#[doc = ""] -#[doc = "Returns: `true` if `returnbuf->checksum` is the same as the one computed from `returnbuf`"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `returnbuf` - Buffer filled by Mii selector applet"] - + #[doc = "Verifies that the Mii data returned from the applet matches its"] + #[doc = ""] + #[doc = "checksum"] + #[doc = ""] + #[doc = ""] + #[doc = "Returns: `true` if `returnbuf->checksum` is the same as the one computed from `returnbuf`"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `returnbuf` - Buffer filled by Mii selector applet"] pub fn miiSelectorChecksumIsValid(returnbuf: *const MiiSelectorReturn) -> bool; } #[doc = "Open directory struct"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct archive_dir_t { pub magic: u32_, pub fd: Handle, -#[doc = "CTRU handle"] -#[doc = ""] - + #[doc = "CTRU handle"] + #[doc = ""] pub index: ssize_t, -#[doc = "Current entry index"] -#[doc = ""] - + #[doc = "Current entry index"] + #[doc = ""] pub size: size_t, -#[doc = "Current batch size"] -#[doc = ""] - + #[doc = "Current batch size"] + #[doc = ""] pub entry_data: [FS_DirectoryEntry; 32usize], } impl Default for archive_dir_t { @@ -29547,17 +27507,15 @@ impl Default for archive_dir_t { } extern "C" { #[must_use] -#[doc = "Mounts the SD"] -#[doc = ""] - + #[doc = "Mounts the SD"] + #[doc = ""] pub fn archiveMountSdmc() -> Result; } extern "C" { #[must_use] -#[doc = "Mounts and opens an archive as deviceName"] -#[doc = "Returns either an archive open error code, or -1 for generic failure"] -#[doc = ""] - + #[doc = "Mounts and opens an archive as deviceName"] + #[doc = "Returns either an archive open error code, or -1 for generic failure"] + #[doc = ""] pub fn archiveMount( archiveID: FS_ArchiveID, archivePath: FS_Path, @@ -29566,196 +27524,161 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] -#[doc = "Returns -1 if the specified device is not found"] -#[doc = ""] - + #[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] + #[doc = "Returns -1 if the specified device is not found"] + #[doc = ""] pub fn archiveCommitSaveData(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Unmounts the specified device, closing its archive in the process"] -#[doc = "Returns -1 if the specified device was not found"] -#[doc = ""] - + #[doc = "Unmounts the specified device, closing its archive in the process"] + #[doc = "Returns -1 if the specified device was not found"] + #[doc = ""] pub fn archiveUnmount(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Unmounts all devices and cleans up any resources used by the driver"] -#[doc = ""] - + #[doc = "Unmounts all devices and cleans up any resources used by the driver"] + #[doc = ""] pub fn archiveUnmountAll() -> Result; } extern "C" { #[must_use] -#[doc = "Get a file's mtime"] -#[doc = ""] - + #[doc = "Get a file's mtime"] + #[doc = ""] pub fn archive_getmtime(name: *const ::libc::c_char, mtime: *mut u64_) -> Result; } #[doc = "RomFS header."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct romfs_header { -#[doc = "Size of the header."] -#[doc = ""] - + #[doc = "Size of the header."] + #[doc = ""] pub headerSize: u32_, -#[doc = "Offset of the directory hash table."] -#[doc = ""] - + #[doc = "Offset of the directory hash table."] + #[doc = ""] pub dirHashTableOff: u32_, -#[doc = "Size of the directory hash table."] -#[doc = ""] - + #[doc = "Size of the directory hash table."] + #[doc = ""] pub dirHashTableSize: u32_, -#[doc = "Offset of the directory table."] -#[doc = ""] - + #[doc = "Offset of the directory table."] + #[doc = ""] pub dirTableOff: u32_, -#[doc = "Size of the directory table."] -#[doc = ""] - + #[doc = "Size of the directory table."] + #[doc = ""] pub dirTableSize: u32_, -#[doc = "Offset of the file hash table."] -#[doc = ""] - + #[doc = "Offset of the file hash table."] + #[doc = ""] pub fileHashTableOff: u32_, -#[doc = "Size of the file hash table."] -#[doc = ""] - + #[doc = "Size of the file hash table."] + #[doc = ""] pub fileHashTableSize: u32_, -#[doc = "Offset of the file table."] -#[doc = ""] - + #[doc = "Offset of the file table."] + #[doc = ""] pub fileTableOff: u32_, -#[doc = "Size of the file table."] -#[doc = ""] - + #[doc = "Size of the file table."] + #[doc = ""] pub fileTableSize: u32_, -#[doc = "Offset of the file data."] -#[doc = ""] - + #[doc = "Offset of the file data."] + #[doc = ""] pub fileDataOff: u32_, } #[doc = "RomFS directory."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default)] pub struct romfs_dir { -#[doc = "Offset of the parent directory."] -#[doc = ""] - + #[doc = "Offset of the parent directory."] + #[doc = ""] pub parent: u32_, -#[doc = "Offset of the next sibling directory."] -#[doc = ""] - + #[doc = "Offset of the next sibling directory."] + #[doc = ""] pub sibling: u32_, -#[doc = "Offset of the first child directory."] -#[doc = ""] - + #[doc = "Offset of the first child directory."] + #[doc = ""] pub childDir: u32_, -#[doc = "Offset of the first file."] -#[doc = ""] - + #[doc = "Offset of the first file."] + #[doc = ""] pub childFile: u32_, -#[doc = "Directory hash table pointer."] -#[doc = ""] - + #[doc = "Directory hash table pointer."] + #[doc = ""] pub nextHash: u32_, -#[doc = "Name length."] -#[doc = ""] - + #[doc = "Name length."] + #[doc = ""] pub nameLen: u32_, -#[doc = "Name. (UTF-16)"] -#[doc = ""] - + #[doc = "Name. (UTF-16)"] + #[doc = ""] pub name: __IncompleteArrayField, } #[doc = "RomFS file."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default)] pub struct romfs_file { -#[doc = "Offset of the parent directory."] -#[doc = ""] - + #[doc = "Offset of the parent directory."] + #[doc = ""] pub parent: u32_, -#[doc = "Offset of the next sibling file."] -#[doc = ""] - + #[doc = "Offset of the next sibling file."] + #[doc = ""] pub sibling: u32_, -#[doc = "Offset of the file's data."] -#[doc = ""] - + #[doc = "Offset of the file's data."] + #[doc = ""] pub dataOff: u64_, -#[doc = "Length of the file's data."] -#[doc = ""] - + #[doc = "Length of the file's data."] + #[doc = ""] pub dataSize: u64_, -#[doc = "File hash table pointer."] -#[doc = ""] - + #[doc = "File hash table pointer."] + #[doc = ""] pub nextHash: u32_, -#[doc = "Name length."] -#[doc = ""] - + #[doc = "Name length."] + #[doc = ""] pub nameLen: u32_, -#[doc = "Name. (UTF-16)"] -#[doc = ""] - + #[doc = "Name. (UTF-16)"] + #[doc = ""] pub name: __IncompleteArrayField, } extern "C" { #[must_use] -#[doc = "Mounts the Application's RomFS."] -#[doc = ""] -#[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] -#[doc = "If on the other hand it's an NCCH, it behaves identically to \\ref romfsMountFromCurrentProcess."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Device mount name."] - + #[doc = "Mounts the Application's RomFS."] + #[doc = ""] + #[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] + #[doc = "If on the other hand it's an NCCH, it behaves identically to \\ref romfsMountFromCurrentProcess."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Device mount name."] pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Mounts RomFS from an open file."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `fd` - FSFILE handle of the RomFS image."] -#[doc = "* `offset` - Offset of the RomFS within the file."] -#[doc = "* `name` - Device mount name."] - + #[doc = "Mounts RomFS from an open file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `fd` - FSFILE handle of the RomFS image."] + #[doc = "* `offset` - Offset of the RomFS within the file."] + #[doc = "* `name` - Device mount name."] pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Mounts RomFS using the current process host program RomFS."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `name` - Device mount name."] - + #[doc = "Mounts RomFS using the current process host program RomFS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Device mount name."] pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Mounts RomFS from the specified title."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `tid` - Title ID"] -#[doc = "* `mediatype` - Mediatype"] -#[doc = "* `name` - Device mount name."] - + #[doc = "Mounts RomFS from the specified title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tid` - Title ID"] + #[doc = "* `mediatype` - Mediatype"] + #[doc = "* `name` - Device mount name."] pub fn romfsMountFromTitle( tid: u64_, mediatype: FS_MediaType, @@ -29764,83 +27687,65 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unmounts the RomFS device."] -#[doc = ""] - + #[doc = "Unmounts the RomFS device."] + #[doc = ""] pub fn romfsUnmount(name: *const ::libc::c_char) -> Result; } #[doc = "Character width information structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct charWidthInfo_s { -#[doc = "Horizontal offset to draw the glyph with."] -#[doc = ""] - + #[doc = "Horizontal offset to draw the glyph with."] + #[doc = ""] pub left: s8, -#[doc = "Width of the glyph."] -#[doc = ""] - + #[doc = "Width of the glyph."] + #[doc = ""] pub glyphWidth: u8_, -#[doc = "Width of the character, that is, horizontal distance to advance."] -#[doc = ""] - + #[doc = "Width of the character, that is, horizontal distance to advance."] + #[doc = ""] pub charWidth: u8_, } #[doc = "Font texture sheet information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct TGLP_s { -#[doc = "Width of a glyph cell."] -#[doc = ""] - + #[doc = "Width of a glyph cell."] + #[doc = ""] pub cellWidth: u8_, -#[doc = "Height of a glyph cell."] -#[doc = ""] - + #[doc = "Height of a glyph cell."] + #[doc = ""] pub cellHeight: u8_, -#[doc = "Vertical position of the baseline."] -#[doc = ""] - + #[doc = "Vertical position of the baseline."] + #[doc = ""] pub baselinePos: u8_, -#[doc = "Maximum character width."] -#[doc = ""] - + #[doc = "Maximum character width."] + #[doc = ""] pub maxCharWidth: u8_, -#[doc = "Size in bytes of a texture sheet."] -#[doc = ""] - + #[doc = "Size in bytes of a texture sheet."] + #[doc = ""] pub sheetSize: u32_, -#[doc = "Number of texture sheets."] -#[doc = ""] - + #[doc = "Number of texture sheets."] + #[doc = ""] pub nSheets: u16_, -#[doc = "GPU texture format (GPU_TEXCOLOR)."] -#[doc = ""] - + #[doc = "GPU texture format (GPU_TEXCOLOR)."] + #[doc = ""] pub sheetFmt: u16_, -#[doc = "Number of glyphs per row per sheet."] -#[doc = ""] - + #[doc = "Number of glyphs per row per sheet."] + #[doc = ""] pub nRows: u16_, -#[doc = "Number of glyph rows per sheet."] -#[doc = ""] - + #[doc = "Number of glyph rows per sheet."] + #[doc = ""] pub nLines: u16_, -#[doc = "Texture sheet width."] -#[doc = ""] - + #[doc = "Texture sheet width."] + #[doc = ""] pub sheetWidth: u16_, -#[doc = "Texture sheet height."] -#[doc = ""] - + #[doc = "Texture sheet height."] + #[doc = ""] pub sheetHeight: u16_, -#[doc = "Pointer to texture sheet data."] -#[doc = ""] - + #[doc = "Pointer to texture sheet data."] + #[doc = ""] pub sheetData: *mut u8_, } impl Default for TGLP_s { @@ -29858,25 +27763,20 @@ impl Default for TGLP_s { pub type CWDH_s = tag_CWDH_s; #[doc = "Font character width information block structure."] #[doc = ""] - #[repr(C)] #[derive(Debug)] pub struct tag_CWDH_s { -#[doc = "First Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "First Unicode codepoint the block applies to."] + #[doc = ""] pub startIndex: u16_, -#[doc = "Last Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "Last Unicode codepoint the block applies to."] + #[doc = ""] pub endIndex: u16_, -#[doc = "Pointer to the next block."] -#[doc = ""] - + #[doc = "Pointer to the next block."] + #[doc = ""] pub next: *mut CWDH_s, -#[doc = "Table of character width information structures."] -#[doc = ""] - + #[doc = "Table of character width information structures."] + #[doc = ""] pub widths: __IncompleteArrayField, } impl Default for tag_CWDH_s { @@ -29910,66 +27810,54 @@ pub type _bindgen_ty_36 = ::libc::c_uint; pub type CMAP_s = tag_CMAP_s; #[doc = "Font character map structure."] #[doc = ""] - #[repr(C)] pub struct tag_CMAP_s { -#[doc = "First Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "First Unicode codepoint the block applies to."] + #[doc = ""] pub codeBegin: u16_, -#[doc = "Last Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "Last Unicode codepoint the block applies to."] + #[doc = ""] pub codeEnd: u16_, -#[doc = "Mapping method."] -#[doc = ""] - + #[doc = "Mapping method."] + #[doc = ""] pub mappingMethod: u16_, pub reserved: u16_, -#[doc = "Pointer to the next map."] -#[doc = ""] - + #[doc = "Pointer to the next map."] + #[doc = ""] 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 { -#[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] -#[doc = ""] - + #[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] + #[doc = ""] pub indexOffset: __BindgenUnionField, -#[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] -#[doc = ""] - + #[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] + #[doc = ""] pub indexTable: __BindgenUnionField<[u16_; 0usize]>, pub __bindgen_anon_1: __BindgenUnionField, pub bindgen_union_field: u16, } #[doc = "For CMAP_TYPE_SCAN: Mapping data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1 { -#[doc = "Number of pairs."] -#[doc = ""] - + #[doc = "Number of pairs."] + #[doc = ""] pub nScanEntries: u16_, pub scanEntries: __IncompleteArrayField, } #[doc = "Mapping pairs."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { -#[doc = "Unicode codepoint."] -#[doc = ""] - + #[doc = "Unicode codepoint."] + #[doc = ""] pub code: u16_, -#[doc = "Mapped glyph index."] -#[doc = ""] - + #[doc = "Mapped glyph index."] + #[doc = ""] pub glyphIndex: u16_, } impl Default for tag_CMAP_s__bindgen_ty_1 { @@ -29992,61 +27880,47 @@ impl Default for tag_CMAP_s { } #[doc = "Font information structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FINF_s { -#[doc = "Signature (FINF)."] -#[doc = ""] - + #[doc = "Signature (FINF)."] + #[doc = ""] pub signature: u32_, -#[doc = "Section size."] -#[doc = ""] - + #[doc = "Section size."] + #[doc = ""] pub sectionSize: u32_, -#[doc = "Font type"] -#[doc = ""] - + #[doc = "Font type"] + #[doc = ""] pub fontType: u8_, -#[doc = "Line feed vertical distance."] -#[doc = ""] - + #[doc = "Line feed vertical distance."] + #[doc = ""] pub lineFeed: u8_, -#[doc = "Glyph index of the replacement character."] -#[doc = ""] - + #[doc = "Glyph index of the replacement character."] + #[doc = ""] pub alterCharIndex: u16_, -#[doc = "Default character width information."] -#[doc = ""] - + #[doc = "Default character width information."] + #[doc = ""] pub defaultWidth: charWidthInfo_s, -#[doc = "Font encoding (?)"] -#[doc = ""] - + #[doc = "Font encoding (?)"] + #[doc = ""] pub encoding: u8_, -#[doc = "Pointer to texture sheet information."] -#[doc = ""] - + #[doc = "Pointer to texture sheet information."] + #[doc = ""] pub tglp: *mut TGLP_s, -#[doc = "Pointer to the first character width information block."] -#[doc = ""] - + #[doc = "Pointer to the first character width information block."] + #[doc = ""] pub cwdh: *mut CWDH_s, -#[doc = "Pointer to the first character map."] -#[doc = ""] - + #[doc = "Pointer to the first character map."] + #[doc = ""] pub cmap: *mut CMAP_s, -#[doc = "Font height."] -#[doc = ""] - + #[doc = "Font height."] + #[doc = ""] pub height: u8_, -#[doc = "Font width."] -#[doc = ""] - + #[doc = "Font width."] + #[doc = ""] pub width: u8_, -#[doc = "Font ascent."] -#[doc = ""] - + #[doc = "Font ascent."] + #[doc = ""] pub ascent: u8_, pub padding: u8_, } @@ -30061,37 +27935,29 @@ impl Default for FINF_s { } #[doc = "Font structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CFNT_s { -#[doc = "Signature (CFNU)."] -#[doc = ""] - + #[doc = "Signature (CFNU)."] + #[doc = ""] pub signature: u32_, -#[doc = "Endianness constant (0xFEFF)."] -#[doc = ""] - + #[doc = "Endianness constant (0xFEFF)."] + #[doc = ""] pub endianness: u16_, -#[doc = "Header size."] -#[doc = ""] - + #[doc = "Header size."] + #[doc = ""] pub headerSize: u16_, -#[doc = "Format version."] -#[doc = ""] - + #[doc = "Format version."] + #[doc = ""] pub version: u32_, -#[doc = "File size."] -#[doc = ""] - + #[doc = "File size."] + #[doc = ""] pub fileSize: u32_, -#[doc = "Number of blocks."] -#[doc = ""] - + #[doc = "Number of blocks."] + #[doc = ""] pub nBlocks: u32_, -#[doc = "Font information."] -#[doc = ""] - + #[doc = "Font information."] + #[doc = ""] pub finf: FINF_s, } impl Default for CFNT_s { @@ -30105,32 +27971,26 @@ impl Default for CFNT_s { } #[doc = "Font glyph position structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s { -#[doc = "Texture sheet index to use to render the glyph."] -#[doc = ""] - + #[doc = "Texture sheet index to use to render the glyph."] + #[doc = ""] pub sheetIndex: ::libc::c_int, -#[doc = "Horizontal offset to draw the glyph width."] -#[doc = ""] - + #[doc = "Horizontal offset to draw the glyph width."] + #[doc = ""] pub xOffset: f32, -#[doc = "Horizontal distance to advance after drawing the glyph."] -#[doc = ""] - + #[doc = "Horizontal distance to advance after drawing the glyph."] + #[doc = ""] pub xAdvance: f32, -#[doc = "Glyph width."] -#[doc = ""] - + #[doc = "Glyph width."] + #[doc = ""] pub width: f32, pub texcoord: fontGlyphPos_s__bindgen_ty_1, pub vtxcoord: fontGlyphPos_s__bindgen_ty_2, } #[doc = "Texture coordinates to use to render the glyph."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_1 { @@ -30141,7 +28001,6 @@ pub struct fontGlyphPos_s__bindgen_ty_1 { } #[doc = "Vertex coordinates to use to render the glyph."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_2 { @@ -30168,55 +28027,50 @@ pub const GLYPH_POS_Y_POINTS_UP: _bindgen_ty_37 = 4; pub type _bindgen_ty_37 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Ensures the shared system font is mapped."] -#[doc = ""] - + #[doc = "Ensures the shared system font is mapped."] + #[doc = ""] pub fn fontEnsureMapped() -> Result; } extern "C" { -#[doc = "Fixes the pointers internal to a just-loaded font"] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `font` - Font to fix"] - + #[doc = "Fixes the pointers internal to a just-loaded font"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `font` - Font to fix"] pub fn fontFixPointers(font: *mut CFNT_s); } extern "C" { -#[doc = "Retrieves the glyph index of the specified Unicode codepoint."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] -#[doc = "* `codePoint` - Unicode codepoint."] - + #[doc = "Retrieves the glyph index of the specified Unicode codepoint."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] + #[doc = "* `codePoint` - Unicode codepoint."] pub fn fontGlyphIndexFromCodePoint(font: *mut CFNT_s, codePoint: u32_) -> ::libc::c_int; } extern "C" { -#[doc = "Retrieves character width information of the specified glyph."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] -#[doc = "* `glyphIndex` - Index of the glyph."] - + #[doc = "Retrieves character width information of the specified glyph."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] + #[doc = "* `glyphIndex` - Index of the glyph."] pub fn fontGetCharWidthInfo( font: *mut CFNT_s, glyphIndex: ::libc::c_int, ) -> *mut charWidthInfo_s; } extern "C" { -#[doc = "Calculates position information for the specified glyph."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `out` - Output structure in which to write the information."] -#[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] -#[doc = "* `glyphIndex` - Index of the glyph."] -#[doc = "* `flags` - Calculation flags (see GLYPH_POS_* flags)."] -#[doc = "* `scaleX` - Scale factor to apply horizontally."] -#[doc = "* `scaleY` - Scale factor to apply vertically."] - + #[doc = "Calculates position information for the specified glyph."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output structure in which to write the information."] + #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] + #[doc = "* `glyphIndex` - Index of the glyph."] + #[doc = "* `flags` - Calculation flags (see GLYPH_POS_* flags)."] + #[doc = "* `scaleX` - Scale factor to apply horizontally."] + #[doc = "* `scaleY` - Scale factor to apply vertically."] pub fn fontCalcGlyphPos( out: *mut fontGlyphPos_s, font: *mut CFNT_s, @@ -30254,20 +28108,18 @@ extern "C" { pub fn gdbHioDevSystem(command: *const ::libc::c_char) -> ::libc::c_int; } extern "C" { -#[doc = "Address of the host connected through 3dslink"] -#[doc = ""] - + #[doc = "Address of the host connected through 3dslink"] + #[doc = ""] pub static mut __3dslink_host: in_addr; } extern "C" { -#[doc = "Connects to the 3dslink host, setting up an output stream."] -#[doc = ""] -#[doc = "Returns: Socket fd on success, negative number on failure."] -#[doc = ""] -#[doc = "# Arguments"] -#[doc = ""] -#[doc = "* `redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] -#[doc = "* `redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] - + #[doc = "Connects to the 3dslink host, setting up an output stream."] + #[doc = ""] + #[doc = "Returns: Socket fd on success, negative number on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] + #[doc = "* `redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] pub fn link3dsConnectToHost(redirStdout: bool, redirStderr: bool) -> ::libc::c_int; } From 0d31a1970a2f33cd3b8d9d6df66bb5577eb1126d Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 21:10:00 +0200 Subject: [PATCH 12/57] Remove unnecesary condition and explain the ``type Residual`` --- ctru-rs/src/error.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 8d4eb1d..1acb855 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -13,6 +13,8 @@ pub(crate) struct LibCtruResult(pub i32); impl Try for LibCtruResult { type Output = (); + // This type is passed to [FromResidual::from_residual] when the LibCtruResult is an error, + // so this type implies "this is a result than CAN'T be `Ok`" (Infallible is the same as !) type Residual = crate::Result; fn from_output(_: Self::Output) -> Self { @@ -30,13 +32,9 @@ impl Try for LibCtruResult { impl FromResidual for LibCtruResult { fn from_residual(e: ::Residual) -> Self { - if let Some(e) = e.err() { - match e { - Error::Os(result) => Self(result), - _ => Self(-1), - } - } else { - Self(-1) + match e.err().unwrap() { + Error::Os(result) => Self(result), + _ => Self(-1), } } } From 103355515a0bcbadf8f12b8f66bf05d0a11f119e Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 9 Oct 2022 21:14:16 +0200 Subject: [PATCH 13/57] Improve ``type Residual`` comment --- ctru-rs/src/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 1acb855..5b0caf1 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -15,6 +15,7 @@ impl Try for LibCtruResult { type Output = (); // This type is passed to [FromResidual::from_residual] when the LibCtruResult is an error, // so this type implies "this is a result than CAN'T be `Ok`" (Infallible is the same as !) + // The purpose of this type is to _only_ bring information about the *Error* type Residual = crate::Result; fn from_output(_: Self::Output) -> Self { From 99c7a36ef056bc26fccf9f5578a402c14e88f605 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 10 Oct 2022 22:35:12 +0200 Subject: [PATCH 14/57] Update ``doxygen-rs`` --- ctru-sys/Cargo.toml | 2 +- ctru-sys/src/bin/docstring-to-rustdoc.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ctru-sys/Cargo.toml b/ctru-sys/Cargo.toml index 92a6c9e..9ae5d5b 100644 --- a/ctru-sys/Cargo.toml +++ b/ctru-sys/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] libc = { version = "0.2.121", default-features = false } -doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", rev = "ef2300a4d6e7c6dc5a6061096d69bf054a9f7896", optional = true } +doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", version = "0.2.1", rev = "b941e17672852dd555dd293a5d85e8a346c5c6a9", optional = true } [features] build-binary = ["doxygen-rs"] diff --git a/ctru-sys/src/bin/docstring-to-rustdoc.rs b/ctru-sys/src/bin/docstring-to-rustdoc.rs index a23d8cf..cc133c5 100644 --- a/ctru-sys/src/bin/docstring-to-rustdoc.rs +++ b/ctru-sys/src/bin/docstring-to-rustdoc.rs @@ -16,8 +16,9 @@ fn main() -> io::Result<()> { let args: Vec = env::args().collect(); let bindings_path = Path::new(args.get(1).expect("bindings.rs not provided in the args")); + let bindings = fs::read_to_string(bindings_path)?; - let parsed = doxygen_rs::transform_bindgen(&bindings_path)?; + let parsed = doxygen_rs::transform_bindgen(bindings.as_str()); let old_bindings_path = bindings_path.to_str().unwrap().to_owned() + ".old"; From 014332971efa3d911bb7aa93e8aea616c507912a Mon Sep 17 00:00:00 2001 From: TechiePi Date: Wed, 12 Oct 2022 23:36:14 +0200 Subject: [PATCH 15/57] Update ``doxygen-rs`` This commit adds support for translating: - ``retval`` - ``return`` - ``sa`` - ``see`` - ``code`` - ``endcode`` - ``warning`` - ``ref`` - ``note`` - ``name`` There are no remaining tags in `ctru-sys` to translate --- ctru-sys/Cargo.toml | 2 +- ctru-sys/src/bindings.rs | 2505 +++++++++++++++++++++++++++++++------- 2 files changed, 2034 insertions(+), 473 deletions(-) diff --git a/ctru-sys/Cargo.toml b/ctru-sys/Cargo.toml index 9ae5d5b..c505fae 100644 --- a/ctru-sys/Cargo.toml +++ b/ctru-sys/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] libc = { version = "0.2.121", default-features = false } -doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", version = "0.2.1", rev = "b941e17672852dd555dd293a5d85e8a346c5c6a9", optional = true } +doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", version = "0.2.2", rev = "573f483ad63ab4662650961998d3ed093a703983", optional = true } [features] build-binary = ["doxygen-rs"] diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs index 613ced4..ff6db4b 100644 --- a/ctru-sys/src/bindings.rs +++ b/ctru-sys/src/bindings.rs @@ -1586,8 +1586,7 @@ pub const MEMOP_LINEAR_FLAG: MemOp = 65536; #[doc = ""] pub const MEMOP_ALLOC_LINEAR: MemOp = 65539; -#[doc = "@ref svcControlMemory operation flags"] -#[doc = ""] +#[doc = "[`svcControlMemory`] operation flags"] #[doc = ""] #[doc = "The lowest 8 bits are the operation"] #[doc = ""] @@ -1704,10 +1703,10 @@ pub struct MemInfo { #[doc = "Size."] #[doc = ""] pub size: u32_, - #[doc = "Memory permissions. See @ref MemPerm"] + #[doc = "Memory permissions. See [`MemPerm`]"] #[doc = ""] pub perm: u32_, - #[doc = "Memory state. See @ref MemState"] + #[doc = "Memory state. See [`MemState`]"] #[doc = ""] pub state: u32_, } @@ -1796,7 +1795,7 @@ pub const RESLIMIT_SEMAPHORE: ResourceLimitType = 5; #[doc = ""] pub const RESLIMIT_TIMER: ResourceLimitType = 6; -#[doc = "Number of shared memory objects, see @ref svcCreateMemoryBlock"] +#[doc = "Number of shared memory objects, see [`svcCreateMemoryBlock`]"] #[doc = ""] pub const RESLIMIT_SHAREDMEMORY: ResourceLimitType = 7; @@ -1848,11 +1847,11 @@ pub const DMACFG_SRC_IS_DEVICE: _bindgen_ty_5 = 1; #[doc = ""] pub const DMACFG_DST_IS_DEVICE: _bindgen_ty_5 = 2; -#[doc = "Make \\ref svcStartInterProcessDma wait for the channel to be unlocked."] +#[doc = "Make [`svcStartInterProcessDma`] wait for the channel to be unlocked."] #[doc = ""] pub const DMACFG_WAIT_AVAILABLE: _bindgen_ty_5 = 4; -#[doc = "Keep the channel locked after the transfer. Required for \\ref svcRestartDma."] +#[doc = "Keep the channel locked after the transfer. Required for [`svcRestartDma`]"] #[doc = ""] pub const DMACFG_KEEP_LOCKED: _bindgen_ty_5 = 8; @@ -1864,7 +1863,7 @@ pub const DMACFG_USE_SRC_CONFIG: _bindgen_ty_5 = 64; #[doc = ""] pub const DMACFG_USE_DST_CONFIG: _bindgen_ty_5 = 128; -#[doc = "Configuration flags for \\ref DmaConfig."] +#[doc = "Configuration flags for [`DmaConfig`]"] #[doc = ""] pub type _bindgen_ty_5 = ::libc::c_uint; @@ -1876,17 +1875,21 @@ pub const DMARST_UNLOCK: _bindgen_ty_6 = 1; #[doc = ""] pub const DMARST_RESUME_DEVICE: _bindgen_ty_6 = 2; -#[doc = "Configuration flags for \\ref svcRestartDma."] +#[doc = "Configuration flags for [`svcRestartDma`]"] #[doc = ""] pub type _bindgen_ty_6 = ::libc::c_uint; -#[doc = "Device configuration structure, part of \\ref DmaConfig."] +#[doc = "Device configuration structure, part of [`DmaConfig`]"] #[doc = ""] #[doc = "- if (and only if) src/dst is a device, then src/dst won't be auto-incremented."] #[doc = "- the kernel uses DMAMOV instead of DMAADNH, when having to decrement (possibly working around an erratum);"] #[doc = "this forces all loops to be unrolled -- you need to keep that in mind when using negative increments, as the kernel"] #[doc = "uses a limit of 100 DMA instruction bytes per channel."] #[doc = ""] +#[doc = "# Notes"] +#[doc = ""] +#[doc = "*"] +#[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaDeviceConfig { @@ -1909,7 +1912,7 @@ pub struct DmaDeviceConfig { #[doc = ""] pub transferStride: s16, } -#[doc = "Configuration stucture for \\ref svcStartInterProcessDma."] +#[doc = "Configuration stucture for [`svcStartInterProcessDma`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -1924,10 +1927,10 @@ pub struct DmaConfig { #[doc = ""] pub flags: u8_, pub _padding: u8_, - #[doc = "Source device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] + #[doc = "Source device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] #[doc = ""] pub srcCfg: DmaDeviceConfig, - #[doc = "Destination device configuration, read if \\ref DMACFG_SRC_IS_DEVICE and/or \\ref DMACFG_USE_SRC_CONFIG are set."] + #[doc = "Destination device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] #[doc = ""] pub dstCfg: DmaDeviceConfig, } @@ -1967,7 +1970,7 @@ pub const PERFCOUNTEROP_SET_EVENT: PerfCounterOperation = 7; #[doc = ""] pub const PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED: PerfCounterOperation = 8; -#[doc = "Operations for \\ref svcControlPerformanceCounter"] +#[doc = "Operations for [`svcControlPerformanceCounter`]"] #[doc = ""] pub type PerfCounterOperation = ::libc::c_uint; @@ -2075,9 +2078,12 @@ pub const PERFCOUNTEREVT_SCU_EXTERNAL_WRITE: PerfCounterEvent = 4115; pub const PERFCOUNTEREVT_SCU_CYCLE_COUNT: PerfCounterEvent = 4127; #[doc = "Performance counter event IDs (CP15 or SCU)."] #[doc = ""] +#[doc = "- CP15: "] +#[doc = "- SCU: "] +#[doc = ""] +#[doc = "# Notes"] #[doc = ""] -#[doc = "- CP15: https://developer.arm.com/documentation/ddi0360/e/control-coprocessor-cp15/register-descriptions/c15--performance-monitor-control-register--pmnc-"] -#[doc = "- SCU: https://developer.arm.com/documentation/ddi0360/e/mpcore-private-memory-region/about-the-mpcore-private-memory-region/performance-monitor-event-registers"] +#[doc = "* Refer to:"] #[doc = ""] pub type PerfCounterEvent = ::libc::c_uint; @@ -2103,11 +2109,11 @@ pub struct AttachProcessEvent { #[doc = ""] pub const EXITPROCESS_EVENT_EXIT: ExitProcessEventReason = 0; -#[doc = "Process has been terminated by @ref svcTerminateProcess."] +#[doc = "Process has been terminated by [`svcTerminateProcess`]"] #[doc = ""] pub const EXITPROCESS_EVENT_TERMINATE: ExitProcessEventReason = 1; -#[doc = "Process has been terminated by @ref svcTerminateDebugProcess."] +#[doc = "Process has been terminated by [`svcTerminateDebugProcess`]"] #[doc = ""] pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2; @@ -2120,7 +2126,7 @@ pub type ExitProcessEventReason = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitProcessEvent { - #[doc = "Reason for exiting. See @ref ExitProcessEventReason"] + #[doc = "Reason for exiting. See [`ExitProcessEventReason`]"] #[doc = ""] pub reason: ExitProcessEventReason, } @@ -2160,7 +2166,7 @@ pub const EXITTHREAD_EVENT_TERMINATE: ExitThreadEventReason = 1; #[doc = ""] pub const EXITTHREAD_EVENT_EXIT_PROCESS: ExitThreadEventReason = 2; -#[doc = "Process has been terminated by @ref svcTerminateProcess."] +#[doc = "Process has been terminated by [`svcTerminateProcess`]"] #[doc = ""] pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3; @@ -2173,7 +2179,7 @@ pub type ExitThreadEventReason = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitThreadEvent { - #[doc = "Reason for exiting. See @ref ExitThreadEventReason"] + #[doc = "Reason for exiting. See [`ExitThreadEventReason`]"] #[doc = ""] pub reason: ExitThreadEventReason, } @@ -2259,7 +2265,7 @@ pub struct FaultExceptionEvent { #[doc = ""] pub fault_information: u32_, } -#[doc = "See @ref SVC_STOP_POINT."] +#[doc = "See [`SVC_STOP_POINT`]"] #[doc = ""] pub const STOPPOINT_SVC_FF: StopPointType = 0; @@ -2280,7 +2286,7 @@ pub type StopPointType = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StopPointExceptionEvent { - #[doc = "Stop point type, see @ref StopPointType."] + #[doc = "Stop point type, see [`StopPointType`]"] #[doc = ""] pub type_: StopPointType, #[doc = "FAR for Watchpoints, otherwise 0."] @@ -2296,12 +2302,12 @@ impl Default for StopPointExceptionEvent { } } } -#[doc = "Event relating to @ref svcBreak"] +#[doc = "Event relating to [`svcBreak`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UserBreakExceptionEvent { - #[doc = "User break type, see @ref UserBreakType."] + #[doc = "User break type, see [`UserBreakType`]"] #[doc = ""] pub type_: UserBreakType, #[doc = "For LOAD_RO and UNLOAD_RO."] @@ -2320,12 +2326,12 @@ impl Default for UserBreakExceptionEvent { } } } -#[doc = "Event relating to @ref svcBreakDebugProcess"] +#[doc = "Event relating to [`svcBreakDebugProcess`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DebuggerBreakExceptionEvent { - #[doc = "IDs of the attached process's threads that were running on each core at the time of the @ref svcBreakDebugProcess call, or -1 (only the first 2 values are meaningful on O3DS)."] + #[doc = "IDs of the attached process's threads that were running on each core at the time of the [`svcBreakDebugProcess`] call, or -1 (only the first 2 values are meaningful on O3DS)."] #[doc = ""] pub thread_ids: [s32; 4usize], } @@ -2334,7 +2340,7 @@ pub struct DebuggerBreakExceptionEvent { #[repr(C)] #[derive(Copy, Clone)] pub struct ExceptionEvent { - #[doc = "Type of event. See @ref ExceptionEventType."] + #[doc = "Type of event. See [`ExceptionEventType`]"] #[doc = ""] pub type_: ExceptionEventType, #[doc = "Address of the exception."] @@ -2420,10 +2426,10 @@ pub struct MapEvent { #[doc = "Mapped size."] #[doc = ""] pub mapped_size: u32_, - #[doc = "Memory permissions. See @ref MemPerm."] + #[doc = "Memory permissions. See [`MemPerm`]"] #[doc = ""] pub memperm: MemPerm, - #[doc = "Memory state. See @ref MemState."] + #[doc = "Memory state. See [`MemState`]"] #[doc = ""] pub memstate: MemState, } @@ -2497,13 +2503,13 @@ pub type DebugEventType = ::libc::c_uint; #[repr(C)] #[derive(Copy, Clone)] pub struct DebugEventInfo { - #[doc = "Type of event. See @ref DebugEventType"] + #[doc = "Type of event. See [`DebugEventType`]"] #[doc = ""] pub type_: DebugEventType, #[doc = "ID of the thread."] #[doc = ""] pub thread_id: u32_, - #[doc = "Flags. Bit0 means that @ref svcContinueDebugEvent needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] + #[doc = "Flags. Bit0 means that [`svcContinueDebugEvent`] needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] #[doc = ""] pub flags: u32_, #[doc = "Always 0."] @@ -2560,27 +2566,27 @@ impl Default for DebugEventInfo { } } } -#[doc = "Inhibit user-defined CPU exception handlers (including watchpoints and breakpoints, regardless of any @ref svcKernelSetState call)."] +#[doc = "Inhibit user-defined CPU exception handlers (including watchpoints and breakpoints, regardless of any [`svcKernelSetState`] call)."] #[doc = ""] pub const DBG_INHIBIT_USER_CPU_EXCEPTION_HANDLERS: DebugFlags = 1; -#[doc = "Signal fault exception events. See @ref FaultExceptionEvent."] +#[doc = "Signal fault exception events. See [`FaultExceptionEvent`]"] #[doc = ""] pub const DBG_SIGNAL_FAULT_EXCEPTION_EVENTS: DebugFlags = 2; -#[doc = "Signal schedule in/out events. See @ref ScheduleInOutEvent."] +#[doc = "Signal schedule in/out events. See [`ScheduleInOutEvent`]"] #[doc = ""] pub const DBG_SIGNAL_SCHEDULE_EVENTS: DebugFlags = 4; -#[doc = "Signal syscall in/out events. See @ref SyscallInOutEvent."] +#[doc = "Signal syscall in/out events. See [`SyscallInOutEvent`]"] #[doc = ""] pub const DBG_SIGNAL_SYSCALL_EVENTS: DebugFlags = 8; -#[doc = "Signal map events. See @ref MapEvent."] +#[doc = "Signal map events. See [`MapEvent`]"] #[doc = ""] pub const DBG_SIGNAL_MAP_EVENTS: DebugFlags = 16; -#[doc = "Debug flags for an attached process, set by @ref svcContinueDebugEvent"] +#[doc = "Debug flags for an attached process, set by [`svcContinueDebugEvent`]"] #[doc = ""] pub type DebugFlags = ::libc::c_uint; @@ -2631,7 +2637,7 @@ pub const THREADCONTEXT_CONTROL_FPU_REGS: ThreadContextControlFlags = 12; #[doc = ""] pub const THREADCONTEXT_CONTROL_ALL: ThreadContextControlFlags = 15; -#[doc = "Control flags for @ref svcGetDebugThreadContext and @ref svcSetDebugThreadContext"] +#[doc = "Control flags for [`svcGetDebugThreadContext`] and [`svcSetDebugThreadContext`]"] #[doc = ""] pub type ThreadContextControlFlags = ::libc::c_uint; @@ -2651,7 +2657,7 @@ pub const DBGTHREAD_PARAMETER_CPU_IDEAL: DebugThreadParameter = 2; #[doc = ""] pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3; -#[doc = "Thread parameter field for @ref svcGetDebugThreadParameter"] +#[doc = "Thread parameter field for [`svcGetDebugThreadParameter`]"] #[doc = ""] pub type DebugThreadParameter = ::libc::c_uint; @@ -2730,23 +2736,27 @@ impl Default for StartupInfo { } extern "C" { #[must_use] + #[doc = "# Memory management"] + #[doc = ""] #[doc = "Controls memory mapping"] #[doc = ""] #[doc = "It has to be pointing to a RW memory."] - #[doc = "Use NULL if the operation is @ref MEMOP_FREE or @ref MEMOP_ALLOC."] + #[doc = "Use NULL if the operation is [`MEMOP_FREE`] or [`MEMOP_ALLOC`]"] #[doc = "Value 0 is used when unmapping memory."] #[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] #[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] - #[doc = "More information is available at http://3dbrew.org/wiki/SVC#Memory_Mapping."] + #[doc = "More information is available at "] + #[doc = "[`svcControlProcessMemory`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] #[doc = "* `addr0` - The virtual address to be used for the operation."] - #[doc = "* `addr1` - The virtual address to be (un)mirrored by @p addr0 when using @ref MEMOP_MAP or @ref MEMOP_UNMAP."] - #[doc = "* `size` - The requested size for @ref MEMOP_ALLOC and @ref MEMOP_ALLOC_LINEAR."] - #[doc = "* `op` - Operation flags. See @ref MemOp."] - #[doc = "* `perm` - A combination of @ref MEMPERM_READ and @ref MEMPERM_WRITE. Using MEMPERM_EXECUTE will return an error."] + #[doc = "* `addr1` - The virtual address to be (un)mirrored by @p addr0 when using [`MEMOP_MAP`] or [`MEMOP_UNMAP`]"] + #[doc = "* `size` - The requested size for [`MEMOP_ALLOC`] and [`MEMOP_ALLOC_LINEAR`]"] + #[doc = "* `op` - Operation flags. See [`MemOp`]"] + #[doc = "* `perm` - A combination of [`MEMPERM_READ`] and [`MEMPERM_WRITE`] Using MEMPERM_EXECUTE will return an error."] + #[doc = ""] pub fn svcControlMemory( addr_out: *mut u32_, addr0: u32_, @@ -2760,16 +2770,20 @@ extern "C" { #[must_use] #[doc = "Controls the memory mapping of a process"] #[doc = ""] - #[doc = ""] #[doc = "This is the only SVC which allows mapping executable memory."] - #[doc = "Using @ref MEMOP_PROT will change the memory permissions of an already mapped memory."] - #[doc = ""] + #[doc = "Using [`MEMOP_PROT`] will change the memory permissions of an already mapped memory."] + #[doc = "[`svcControlProcess`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `addr0` - The virtual address to map"] #[doc = "* `addr1` - The virtual address to be mapped by @p addr0"] - #[doc = "* `type` - Only operations @ref MEMOP_MAP, @ref MEMOP_UNMAP and @ref MEMOP_PROT are allowed."] + #[doc = "* `type` - Only operations [`MEMOP_MAP`] [`MEMOP_UNMAP`] and [`MEMOP_PROT`] are allowed."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The pseudo handle for the current process is not supported by this service call."] + #[doc = ""] pub fn svcControlProcessMemory( process: Handle, addr0: u32_, @@ -2783,8 +2797,6 @@ extern "C" { #[must_use] #[doc = "Creates a block of shared memory"] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `memblock` - Pointer to store the handle of the block [Direction: In, Out]"] @@ -2792,6 +2804,11 @@ extern "C" { #[doc = "* `size` - Size of the memory to map, a multiple of 0x1000."] #[doc = "* `my_perm` - Memory permissions for the current process"] #[doc = "* `other_perm` - Memory permissions for the other processes"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The shared memory block, and its rights, are destroyed when the handle is closed."] + #[doc = ""] pub fn svcCreateMemoryBlock( memblock: *mut Handle, addr: u32_, @@ -2804,14 +2821,17 @@ extern "C" { #[must_use] #[doc = "Maps a block of shared memory"] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `memblock` - Handle of the block"] #[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] #[doc = "* `my_perm` - Memory permissions for the current process"] #[doc = "* `other_perm` - Memory permissions for the other processes"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The shared memory block, and its rights, are destroyed when the handle is closed."] + #[doc = ""] pub fn svcMapMemoryBlock( memblock: Handle, addr: u32_, @@ -2828,6 +2848,7 @@ extern "C" { #[doc = "* `process` - Handle of the process."] #[doc = "* `destAddress` - Address of the block of memory to map, in the current (destination) process."] #[doc = "* `size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] + #[doc = ""] pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { @@ -2839,6 +2860,7 @@ extern "C" { #[doc = "* `process` - Handle of the process."] #[doc = "* `destAddress` - Address of the block of memory to unmap, in the current (destination) process."] #[doc = "* `size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] + #[doc = ""] pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { @@ -2849,6 +2871,7 @@ extern "C" { #[doc = ""] #[doc = "* `memblock` - Handle of the block"] #[doc = "* `addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] + #[doc = ""] pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result; } extern "C" { @@ -2860,6 +2883,7 @@ extern "C" { #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] #[doc = "* `out` - Pointer to output page info to."] #[doc = "* `addr` - Virtual memory address to query."] + #[doc = ""] pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result; } extern "C" { @@ -2872,6 +2896,7 @@ extern "C" { #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] #[doc = "* `process` - Process to query memory from."] #[doc = "* `addr` - Virtual memory address to query."] + #[doc = ""] pub fn svcQueryProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -2881,12 +2906,15 @@ extern "C" { } extern "C" { #[must_use] + #[doc = "# Process management"] + #[doc = ""] #[doc = "Gets the handle of a process."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `process` - The handle of the process [Direction: In, Out]"] #[doc = "* `processId` - The ID of the process to open"] + #[doc = ""] pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result; } extern "C" { @@ -2901,6 +2929,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `process` - Handle of the process to terminate."] + #[doc = ""] pub fn svcTerminateProcess(process: Handle) -> Result; } extern "C" { @@ -2912,6 +2941,7 @@ extern "C" { #[doc = "* `out` - Pointer to output process info to. [Direction: In, Out]"] #[doc = "* `process` - Handle of the process to get information about."] #[doc = "* `type` - Type of information to retreieve."] + #[doc = ""] pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result; } extern "C" { @@ -2922,6 +2952,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the process ID to. [Direction: In, Out]"] #[doc = "* `handle` - Handle of the process to get the ID of."] + #[doc = ""] pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { @@ -2933,6 +2964,7 @@ extern "C" { #[doc = "* `processCount` - Pointer to output the process count to. [Direction: In, Out]"] #[doc = "* `processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] #[doc = "* `processIdMaxCount` - Maximum number of process IDs."] + #[doc = ""] pub fn svcGetProcessList( processCount: *mut s32, processIds: *mut u32_, @@ -2949,6 +2981,7 @@ extern "C" { #[doc = "* `threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] #[doc = "* `threadIdMaxCount` - Maximum number of thread IDs."] #[doc = "* `process` - Process handle to list the threads of."] + #[doc = ""] pub fn svcGetThreadList( threadCount: *mut s32, threadIds: *mut u32_, @@ -2966,6 +2999,7 @@ extern "C" { #[doc = "* `portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] #[doc = "* `name` - Name of the port."] #[doc = "* `maxSessions` - Maximum number of sessions that can connect to the port."] + #[doc = ""] pub fn svcCreatePort( portServer: *mut Handle, portClient: *mut Handle, @@ -2981,6 +3015,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the port handle to. [Direction: In, Out]"] #[doc = "* `portName` - Name of the port."] + #[doc = ""] pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result; } extern "C" { @@ -2994,6 +3029,7 @@ extern "C" { #[doc = "* `code_ptr` - Pointer to .text in shared memory"] #[doc = "* `ro_ptr` - Pointer to .rodata in shared memory"] #[doc = "* `data_ptr` - Pointer to .data in shared memory"] + #[doc = ""] pub fn svcCreateCodeSet( out: *mut Handle, info: *const CodeSetInfo, @@ -3012,6 +3048,7 @@ extern "C" { #[doc = "* `codeset` - Codeset created for this process"] #[doc = "* `arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] #[doc = "* `arm11kernelcaps_num` - Number of kernel capabilities"] + #[doc = ""] pub fn svcCreateProcess( out: *mut Handle, codeset: Handle, @@ -3028,6 +3065,7 @@ extern "C" { #[doc = "* `affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] #[doc = "* `process` - Handle of the process."] #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcGetProcessAffinityMask( affinitymask: *mut u8_, process: Handle, @@ -3043,6 +3081,7 @@ extern "C" { #[doc = "* `process` - Handle of the process."] #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcSetProcessAffinityMask( process: Handle, affinitymask: *const u8_, @@ -3057,6 +3096,7 @@ extern "C" { #[doc = ""] #[doc = "* `processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] #[doc = "* `process` - Handle of the process."] + #[doc = ""] pub fn svcGetProcessIdealProcessor(processorid: *mut s32, process: Handle) -> Result; } extern "C" { @@ -3067,6 +3107,7 @@ extern "C" { #[doc = ""] #[doc = "* `process` - Handle of the process."] #[doc = "* `processorid` - ID of the process's ideal processor."] + #[doc = ""] pub fn svcSetProcessIdealProcessor(process: Handle, processorid: s32) -> Result; } extern "C" { @@ -3077,10 +3118,13 @@ extern "C" { #[doc = ""] #[doc = "* `process` - Handle of the process."] #[doc = "* `info` - Pointer to a StartupInfo structure describing information for the main thread."] + #[doc = ""] pub fn svcRun(process: Handle, info: *const StartupInfo) -> Result; } extern "C" { #[must_use] + #[doc = "# Multithreading"] + #[doc = ""] #[doc = "Creates a new thread."] #[doc = ""] #[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] @@ -3088,8 +3132,8 @@ extern "C" { #[doc = "Value -1 means all CPUs and -2 read from the Exheader."] #[doc = "The processor with ID 1 is the system processor."] #[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] - #[doc = "Since a thread is considered as a waitable object, you can use @ref svcWaitSynchronization"] - #[doc = "and @ref svcWaitSynchronizationN to join with it."] + #[doc = "Since a thread is considered as a waitable object, you can use [`svcWaitSynchronization`]"] + #[doc = "and [`svcWaitSynchronizationN`] to join with it."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -3099,6 +3143,11 @@ extern "C" { #[doc = "* `stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] #[doc = "* `thread_priority` - Low values gives the thread higher priority."] #[doc = "* `processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The kernel will clear the @p stack_top's address low 3 bits to make sure it is 0x8-bytes aligned."] + #[doc = ""] pub fn svcCreateThread( thread: *mut Handle, entrypoint: ThreadFunc, @@ -3116,14 +3165,15 @@ extern "C" { #[doc = ""] #[doc = "* `thread` - The handle of the thread [Direction: In, Out]"] #[doc = "* `process` - The ID of the process linked to the thread"] + #[doc = ""] pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result; } extern "C" { #[doc = "Exits the current thread."] #[doc = ""] - #[doc = ""] - #[doc = "This will trigger a state change and hence release all @ref svcWaitSynchronization operations."] - #[doc = "It means that you can join a thread by calling @code svcWaitSynchronization(threadHandle,yourtimeout); @endcode"] + #[doc = "This will trigger a state change and hence release all [`svcWaitSynchronization`] operations."] + #[doc = "It means that you can join a thread by calling ```"] + #[doc = "svcWaitSynchronization(threadHandle,yourtimeout); ```"] #[doc = ""] pub fn svcExitThread(); } @@ -3133,6 +3183,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ns` - The minimum number of nanoseconds to sleep for."] + #[doc = ""] pub fn svcSleepThread(ns: s64); } extern "C" { @@ -3145,12 +3196,12 @@ extern "C" { #[must_use] #[doc = "Changes the priority of a thread"] #[doc = ""] - #[doc = ""] #[doc = "Low values gives the thread higher priority."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `prio` - For userland apps, this has to be within the range [0x18;0x3F]"] + #[doc = ""] pub fn svcSetThreadPriority(thread: Handle, prio: s32) -> Result; } extern "C" { @@ -3162,6 +3213,7 @@ extern "C" { #[doc = "* `affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] #[doc = "* `thread` - Handle of the thread."] #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcGetThreadAffinityMask( affinitymask: *mut u8_, thread: Handle, @@ -3177,6 +3229,7 @@ extern "C" { #[doc = "* `thread` - Handle of the thread."] #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcSetThreadAffinityMask( thread: Handle, affinitymask: *const u8_, @@ -3191,6 +3244,7 @@ extern "C" { #[doc = ""] #[doc = "* `processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] #[doc = "* `thread` - Handle of the thread."] + #[doc = ""] pub fn svcGetThreadIdealProcessor(processorid: *mut s32, thread: Handle) -> Result; } extern "C" { @@ -3201,11 +3255,14 @@ extern "C" { #[doc = ""] #[doc = "* `thread` - Handle of the thread."] #[doc = "* `processorid` - ID of the thread's ideal processor."] + #[doc = ""] pub fn svcSetThreadIdealProcessor(thread: Handle, processorid: s32) -> Result; } extern "C" { #[doc = "Returns the ID of the processor the current thread is running on."] #[doc = ""] + #[doc = "[`svcCreateThread`]"] + #[doc = ""] pub fn svcGetProcessorID() -> s32; } extern "C" { @@ -3216,6 +3273,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] #[doc = "* `handle` - Handle of the thread."] + #[doc = ""] pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { @@ -3226,6 +3284,7 @@ extern "C" { #[doc = ""] #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] #[doc = "* `process` - Process to get the resource limits of."] + #[doc = ""] pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result; } extern "C" { @@ -3238,6 +3297,7 @@ extern "C" { #[doc = "* `resourceLimit` - Resource limit set to use."] #[doc = "* `names` - Resource limit names to get the limits of."] #[doc = "* `nameCount` - Number of resource limit names."] + #[doc = ""] pub fn svcGetResourceLimitLimitValues( values: *mut s64, resourceLimit: Handle, @@ -3255,6 +3315,7 @@ extern "C" { #[doc = "* `resourceLimit` - Resource limit set to use."] #[doc = "* `names` - Resource limit names to get the values of."] #[doc = "* `nameCount` - Number of resource limit names."] + #[doc = ""] pub fn svcGetResourceLimitCurrentValues( values: *mut s64, resourceLimit: Handle, @@ -3270,6 +3331,7 @@ extern "C" { #[doc = ""] #[doc = "* `process` - Process to set the resource limit set to."] #[doc = "* `resourceLimit` - Resource limit set handle."] + #[doc = ""] pub fn svcSetProcessResourceLimits(process: Handle, resourceLimit: Handle) -> Result; } extern "C" { @@ -3279,6 +3341,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] + #[doc = ""] pub fn svcCreateResourceLimit(resourceLimit: *mut Handle) -> Result; } extern "C" { @@ -3293,6 +3356,7 @@ extern "C" { #[doc = "* `names` - Resource limit names to set the limits of."] #[doc = "* `values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] #[doc = "* `nameCount` - Number of resource limit names."] + #[doc = ""] pub fn svcSetResourceLimitValues( resourceLimit: Handle, names: *const ResourceLimitType, @@ -3304,10 +3368,13 @@ extern "C" { #[must_use] #[doc = "Gets the process ID of a thread."] #[doc = ""] + #[doc = "[`svcOpenProcess`]"] + #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] #[doc = "* `handle` - Handle of the thread."] + #[doc = ""] pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result; } extern "C" { @@ -3316,18 +3383,24 @@ extern "C" { #[doc = ""] #[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] #[doc = ""] - #[doc = "Returns: 0xD8E007F7 (BAD_HANDLE) if it isn't."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle"] + #[doc = "* 0xD8E007F7 (BAD_HANDLE) if it isn't."] #[doc = ""] pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result; } extern "C" { #[must_use] + #[doc = "# Synchronization"] + #[doc = ""] #[doc = "Creates a mutex."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] #[doc = "* `initially_locked` - Whether the mutex should be initially locked."] + #[doc = ""] pub fn svcCreateMutex(mutex: *mut Handle, initially_locked: bool) -> Result; } extern "C" { @@ -3337,6 +3410,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Handle of the mutex."] + #[doc = ""] pub fn svcReleaseMutex(handle: Handle) -> Result; } extern "C" { @@ -3348,6 +3422,7 @@ extern "C" { #[doc = "* `semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] #[doc = "* `initial_count` - Initial count of the semaphore."] #[doc = "* `max_count` - Maximum count of the semaphore."] + #[doc = ""] pub fn svcCreateSemaphore(semaphore: *mut Handle, initial_count: s32, max_count: s32) -> Result; } @@ -3360,6 +3435,7 @@ extern "C" { #[doc = "* `count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] #[doc = "* `semaphore` - Handle of the semaphore."] #[doc = "* `release_count` - Number to increase the semaphore count by."] + #[doc = ""] pub fn svcReleaseSemaphore(count: *mut s32, semaphore: Handle, release_count: s32) -> Result; } extern "C" { @@ -3370,6 +3446,7 @@ extern "C" { #[doc = ""] #[doc = "* `event` - Pointer to output the created event handle to. [Direction: In, Out]"] #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] + #[doc = ""] pub fn svcCreateEvent(event: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { @@ -3379,6 +3456,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Handle of the event to signal."] + #[doc = ""] pub fn svcSignalEvent(handle: Handle) -> Result; } extern "C" { @@ -3388,6 +3466,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Handle of the event to clear."] + #[doc = ""] pub fn svcClearEvent(handle: Handle) -> Result; } extern "C" { @@ -3398,6 +3477,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle to wait on."] #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] + #[doc = ""] pub fn svcWaitSynchronization(handle: Handle, nanoseconds: s64) -> Result; } extern "C" { @@ -3411,6 +3491,7 @@ extern "C" { #[doc = "* `handles_num` - Number of handles."] #[doc = "* `wait_all` - Whether to wait for synchronization on all handles."] #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] + #[doc = ""] pub fn svcWaitSynchronizationN( out: *mut s32, handles: *const Handle, @@ -3423,22 +3504,34 @@ extern "C" { #[must_use] #[doc = "Creates an address arbiter"] #[doc = ""] + #[doc = "[`svcArbitrateAddress`]"] + #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] + #[doc = ""] pub fn svcCreateAddressArbiter(arbiter: *mut Handle) -> Result; } extern "C" { #[must_use] #[doc = "Arbitrate an address, can be used for synchronization"] #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Please use [`syncArbitrateAddressWithTimeout`] instead."] + #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `arbiter` - Handle of the arbiter"] #[doc = "* `addr` - A pointer to a s32 value."] #[doc = "* `type` - Type of action to be performed by the arbiter"] - #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] - #[doc = "* `timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use \\ref svcArbitrateAddressNoTimeout instead."] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = "* `timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use [`svcArbitrateAddressNoTimeout`] instead."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn svcArbitrateAddress( arbiter: Handle, addr: u32_, @@ -3449,14 +3542,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Same as \\ref svcArbitrateAddress but with the timeout_ns parameter undefined."] + #[doc = "Same as [`svcArbitrateAddress`] but with the timeout_ns parameter undefined."] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Please use [`syncArbitrateAddress`] instead."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `arbiter` - Handle of the arbiter"] #[doc = "* `addr` - A pointer to a s32 value."] #[doc = "* `type` - Type of action to be performed by the arbiter"] - #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn svcArbitrateAddressNoTimeout( arbiter: Handle, addr: u32_, @@ -3471,6 +3573,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `session` - Handle of the session."] + #[doc = ""] pub fn svcSendSyncRequest(session: Handle) -> Result; } extern "C" { @@ -3481,6 +3584,7 @@ extern "C" { #[doc = ""] #[doc = "* `clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] #[doc = "* `clientPort` - Port client endpoint to connect to."] + #[doc = ""] pub fn svcCreateSessionToPort(clientSession: *mut Handle, clientPort: Handle) -> Result; } extern "C" { @@ -3491,6 +3595,7 @@ extern "C" { #[doc = ""] #[doc = "* `serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] #[doc = "* `clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] + #[doc = ""] pub fn svcCreateSession(serverSession: *mut Handle, clientSession: *mut Handle) -> Result; } extern "C" { @@ -3501,6 +3606,7 @@ extern "C" { #[doc = ""] #[doc = "* `session` - Pointer to output the created session handle to. [Direction: In, Out]"] #[doc = "* `port` - Handle of the port to accept a session from."] + #[doc = ""] pub fn svcAcceptSession(session: *mut Handle, port: Handle) -> Result; } extern "C" { @@ -3513,6 +3619,7 @@ extern "C" { #[doc = "* `handles` - Session handles to receive requests from."] #[doc = "* `handleCount` - Number of handles."] #[doc = "* `replyTarget` - Handle of the session to reply to."] + #[doc = ""] pub fn svcReplyAndReceive( index: *mut s32, handles: *const Handle, @@ -3522,12 +3629,15 @@ extern "C" { } extern "C" { #[must_use] + #[doc = "# Time"] + #[doc = ""] #[doc = "Creates a timer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] #[doc = "* `reset_type` - Type of reset to perform on the timer."] + #[doc = ""] pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { @@ -3539,6 +3649,7 @@ extern "C" { #[doc = "* `timer` - Handle of the timer to set."] #[doc = "* `initial` - Initial value of the timer."] #[doc = "* `interval` - Interval of the timer."] + #[doc = ""] pub fn svcSetTimer(timer: Handle, initial: s64, interval: s64) -> Result; } extern "C" { @@ -3548,6 +3659,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `timer` - Handle of the timer to cancel."] + #[doc = ""] pub fn svcCancelTimer(timer: Handle) -> Result; } extern "C" { @@ -3557,22 +3669,28 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `timer` - Handle of the timer to clear."] + #[doc = ""] pub fn svcClearTimer(timer: Handle) -> Result; } extern "C" { #[doc = "Gets the current system tick."] #[doc = ""] - #[doc = "Returns: The current system tick."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current system tick."] #[doc = ""] pub fn svcGetSystemTick() -> u64_; } extern "C" { #[must_use] + #[doc = "# System"] + #[doc = ""] #[doc = "Closes a handle."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Handle to close."] + #[doc = ""] pub fn svcCloseHandle(handle: Handle) -> Result; } extern "C" { @@ -3583,6 +3701,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] #[doc = "* `original` - Handle to duplicate."] + #[doc = ""] pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result; } extern "C" { @@ -3594,6 +3713,7 @@ extern "C" { #[doc = "* `out` - Pointer to output the handle info to. [Direction: In, Out]"] #[doc = "* `handle` - Handle to get the info for."] #[doc = "* `param` - Parameter clarifying the handle info type."] + #[doc = ""] pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result; } extern "C" { @@ -3605,6 +3725,7 @@ extern "C" { #[doc = "* `out` - Pointer to output the system info to. [Direction: In, Out]"] #[doc = "* `type` - Type of system info to retrieve."] #[doc = "* `param` - Parameter clarifying the system info type."] + #[doc = ""] pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result; } extern "C" { @@ -3614,6 +3735,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `type` - Type of state to set (the other parameters depend on it)."] + #[doc = ""] pub fn svcKernelSetState(type_: u32_, ...) -> Result; } extern "C" { @@ -3622,10 +3744,11 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `interruptId` - Interrupt identfier (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] + #[doc = "* `interruptId` - Interrupt identfier (see "] #[doc = "* `eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] #[doc = "* `priority` - Priority of the interrupt for the current process."] #[doc = "* `isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] + #[doc = ""] pub fn svcBindInterrupt( interruptId: u32_, eventOrSemaphore: Handle, @@ -3639,8 +3762,9 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `interruptId` - Interrupt identfier, see (see https://www.3dbrew.org/wiki/ARM11_Interrupts)."] + #[doc = "* `interruptId` - Interrupt identfier, see (see "] #[doc = "* `eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] + #[doc = ""] pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result; } extern "C" { @@ -3652,6 +3776,7 @@ extern "C" { #[doc = "* `process` - Handle of the process."] #[doc = "* `addr` - Address to invalidate."] #[doc = "* `size` - Size of the memory to invalidate."] + #[doc = ""] pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { @@ -3663,6 +3788,7 @@ extern "C" { #[doc = "* `process` - Handle of the process."] #[doc = "* `addr` - Address to clean."] #[doc = "* `size` - Size of the memory to clean."] + #[doc = ""] pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { @@ -3674,6 +3800,7 @@ extern "C" { #[doc = "* `process` - Handle of the process."] #[doc = "* `addr` - Address to flush."] #[doc = "* `size` - Size of the memory to flush."] + #[doc = ""] pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { @@ -3689,6 +3816,11 @@ extern "C" { #[doc = "* `srcAddr` - Address in the source to read data from."] #[doc = "* `size` - Size of the data to transfer."] #[doc = "* `cfg` - Configuration structure."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The handle is signaled when the transfer finishes."] + #[doc = ""] pub fn svcStartInterProcessDma( dma: *mut Handle, dstProcess: Handle, @@ -3706,6 +3838,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `dma` - Handle of the DMA channel object."] + #[doc = ""] pub fn svcStopDma(dma: Handle) -> Result; } extern "C" { @@ -3716,6 +3849,7 @@ extern "C" { #[doc = ""] #[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] #[doc = "* `dma` - Handle of the DMA channel object."] + #[doc = ""] pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result; } extern "C" { @@ -3729,7 +3863,12 @@ extern "C" { #[doc = "* `dstAddr` - Address in the destination process to write data to."] #[doc = "* `srcAddr` - Address in the source to read data from."] #[doc = "* `size` - Size of the data to transfer."] - #[doc = "* `flags` - Restart flags, \\ref DMARST_UNLOCK and/or \\ref DMARST_RESUME_DEVICE."] + #[doc = "* `flags` - Restart flags, [`DMARST_UNLOCK`] and/or [`DMARST_RESUME_DEVICE`]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The first transfer has to be configured with [`DMACFG_KEEP_LOCKED`]"] + #[doc = ""] pub fn svcRestartDma( dma: Handle, dstAddr: u32_, @@ -3745,6 +3884,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] + #[doc = ""] pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result; } extern "C" { @@ -3754,14 +3894,18 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enabled` - Whether to enable or disable Wi-Fi."] + #[doc = ""] pub fn svcSetWifiEnabled(enabled: bool) -> Result; } extern "C" { + #[doc = "# Debugging"] + #[doc = ""] #[doc = "Breaks execution."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `breakReason` - Reason for breaking."] + #[doc = ""] pub fn svcBreak(breakReason: UserBreakType); } extern "C" { @@ -3772,6 +3916,7 @@ extern "C" { #[doc = "* `breakReason` - Debug reason for breaking."] #[doc = "* `croInfo` - Library information."] #[doc = "* `croInfoSize` - Size of the above structure."] + #[doc = ""] pub fn svcBreakRO( breakReason: UserBreakType, croInfo: *const ::libc::c_void, @@ -3786,6 +3931,7 @@ extern "C" { #[doc = ""] #[doc = "* `str` - String to output."] #[doc = "* `length` - Length of the string to output, needs to be positive."] + #[doc = ""] pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result; } extern "C" { @@ -3794,20 +3940,20 @@ extern "C" { #[doc = ""] #[doc = "The meaning of the parameters depend on the operation."] #[doc = "The operations are the following:"] - #[doc = "- \\ref PERFCOUNTEROP_ENABLE (void) -> void, tries to enable and lock perfmon. functionality."] - #[doc = "- \\ref PERFCOUNTEROP_DISABLE (void) -> void, disable and forcibly unlocks perfmon. functionality."] - #[doc = "- \\ref PERFCOUNTEROP_GET_VALUE (\\ref PerfCounterRegister reg) -> u64, gets the value of a particular counter register."] - #[doc = "- \\ref PERFCOUNTEROP_SET_VALUE (\\ref PerfCounterRegister reg, u64 value) -> void, sets the value of a particular counter register."] - #[doc = "- \\ref PERFCOUNTEROP_GET_OVERFLOW_FLAGS (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] - #[doc = "- Format is a bitfield of \\ref PerfCounterRegister."] - #[doc = "- \\ref PERFCOUNTEROP_RESET (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] + #[doc = "- [`PERFCOUNTEROP_ENABLE`] (void) -> void, tries to enable and lock perfmon. functionality."] + #[doc = "- [`PERFCOUNTEROP_DISABLE`] (void) -> void, disable and forcibly unlocks perfmon. functionality."] + #[doc = "- [`PERFCOUNTEROP_GET_VALUE`] [`PerfCounterRegister`] reg) -> u64, gets the value of a particular counter register."] + #[doc = "- [`PERFCOUNTEROP_SET_VALUE`] [`PerfCounterRegister`] reg, u64 value) -> void, sets the value of a particular counter register."] + #[doc = "- [`PERFCOUNTEROP_GET_OVERFLOW_FLAGS`] (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] + #[doc = "- Format is a bitfield of [`PerfCounterRegister`]"] + #[doc = "- [`PERFCOUNTEROP_RESET`] (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] #[doc = "overflow flags of selected registers."] - #[doc = "- Format is two bitfields of \\ref PerfCounterRegister."] - #[doc = "- \\ref PERFCOUNTEROP_GET_EVENT (\\ref PerfCounterRegister reg) -> \\ref PerfCounterEvent, gets the event associated"] + #[doc = "- Format is two bitfields of [`PerfCounterRegister`]"] + #[doc = "- [`PERFCOUNTEROP_GET_EVENT`] [`PerfCounterRegister`] reg) -> [`PerfCounterEvent`] gets the event associated"] #[doc = "to a particular counter register."] - #[doc = "- \\ref PERFCOUNTEROP_SET_EVENT (\\ref PerfCounterRegister reg, \\ref PerfCounterEvent) -> void, sets the event associated"] + #[doc = "- [`PERFCOUNTEROP_SET_EVENT`] [`PerfCounterRegister`] reg, [`PerfCounterEvent)`] -> void, sets the event associated"] #[doc = "to a particular counter register."] - #[doc = "- \\ref PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] + #[doc = "- [`PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED`] (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] #[doc = "and to use 64-bit counter values."] #[doc = ""] #[doc = "# Arguments"] @@ -3816,6 +3962,7 @@ extern "C" { #[doc = "* `op` - Operation, see details."] #[doc = "* `param1` - First parameter."] #[doc = "* `param2` - Second parameter."] + #[doc = ""] pub fn svcControlPerformanceCounter( out: *mut u64_, op: PerfCounterOperation, @@ -3831,6 +3978,7 @@ extern "C" { #[doc = ""] #[doc = "* `debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] #[doc = "* `processId` - ID of the process to debug."] + #[doc = ""] pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result; } extern "C" { @@ -3840,6 +3988,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `debug` - Debug handle of the process."] + #[doc = ""] pub fn svcBreakDebugProcess(debug: Handle) -> Result; } extern "C" { @@ -3849,6 +3998,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `debug` - Debug handle of the process."] + #[doc = ""] pub fn svcTerminateDebugProcess(debug: Handle) -> Result; } extern "C" { @@ -3859,28 +4009,31 @@ extern "C" { #[doc = ""] #[doc = "* `info` - Pointer to output the debug event information to. [Direction: In, Out]"] #[doc = "* `debug` - Debug handle of the process."] + #[doc = ""] pub fn svcGetProcessDebugEvent(info: *mut DebugEventInfo, debug: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Continues the current debug event of a debugged process (not necessarily the same as @ref svcGetProcessDebugEvent)."] + #[doc = "Continues the current debug event of a debugged process (not necessarily the same as [`svcGetProcessDebugEvent)`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `debug` - Debug handle of the process."] - #[doc = "* `flags` - Flags to continue with, see @ref DebugFlags."] + #[doc = "* `flags` - Flags to continue with, see [`DebugFlags`]"] + #[doc = ""] pub fn svcContinueDebugEvent(debug: Handle, flags: DebugFlags) -> Result; } extern "C" { #[must_use] - #[doc = "Fetches the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] + #[doc = "Fetches the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `context` - Values of the registers to fetch, see @ref ThreadContext. [Direction: In, Out]"] + #[doc = "* `context` - Values of the registers to fetch, see [`ThreadContext`] [Direction: In, Out]"] #[doc = "* `debug` - Debug handle of the parent process."] #[doc = "* `threadId` - ID of the thread to fetch the saved registers of."] - #[doc = "* `controlFlags` - Which registers to fetch, see @ref ThreadContextControlFlags."] + #[doc = "* `controlFlags` - Which registers to fetch, see [`ThreadContextControlFlags`]"] + #[doc = ""] pub fn svcGetDebugThreadContext( context: *mut ThreadContext, debug: Handle, @@ -3890,14 +4043,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Updates the saved registers of a thread, either inactive or awaiting @ref svcContinueDebugEvent, belonging to a debugged process."] + #[doc = "Updates the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `debug` - Debug handle of the parent process."] #[doc = "* `threadId` - ID of the thread to update the saved registers of."] - #[doc = "* `context` - Values of the registers to update, see @ref ThreadContext."] - #[doc = "* `controlFlags` - Which registers to update, see @ref ThreadContextControlFlags."] + #[doc = "* `context` - Values of the registers to update, see [`ThreadContext`]"] + #[doc = "* `controlFlags` - Which registers to update, see [`ThreadContextControlFlags`]"] + #[doc = ""] pub fn svcSetDebugThreadContext( debug: Handle, threadId: u32_, @@ -3915,6 +4069,7 @@ extern "C" { #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] #[doc = "* `debug` - Debug handle of the process to query memory from."] #[doc = "* `addr` - Virtual memory address to query."] + #[doc = ""] pub fn svcQueryDebugProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -3932,6 +4087,7 @@ extern "C" { #[doc = "* `debug` - Debug handle of the process."] #[doc = "* `addr` - Address to read from."] #[doc = "* `size` - Size of the memory to read."] + #[doc = ""] pub fn svcReadProcessMemory( buffer: *mut ::libc::c_void, debug: Handle, @@ -3949,6 +4105,7 @@ extern "C" { #[doc = "* `buffer` - Buffer to write data from."] #[doc = "* `addr` - Address to write to."] #[doc = "* `size` - Size of the memory to write."] + #[doc = ""] pub fn svcWriteProcessMemory( debug: Handle, buffer: *const ::libc::c_void, @@ -3958,13 +4115,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see http://infocenter.arm.com/help/topic/com.arm.doc.ddi0360f/CEGEBGFC.html ."] + #[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see ."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] #[doc = "* `control` - Value of the control regiser."] #[doc = "* `value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] + #[doc = ""] pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result; } extern "C" { @@ -3977,7 +4135,8 @@ extern "C" { #[doc = "* `out` - Output value. [Direction: In, Out]"] #[doc = "* `debug` - Debug handle of the process."] #[doc = "* `threadId` - ID of the thread"] - #[doc = "* `parameter` - Parameter to fetch, see @ref DebugThreadParameter."] + #[doc = "* `parameter` - Parameter to fetch, see [`DebugThreadParameter`]"] + #[doc = ""] pub fn svcGetDebugThreadParam( unused: *mut s64, out: *mut u32_, @@ -3993,6 +4152,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `callback` - Function to execute."] + #[doc = ""] pub fn svcBackdoor(callback: ::core::option::Option s32>) -> Result; } #[doc = "Mount \"nand:/\""] @@ -4256,22 +4416,22 @@ pub struct ExHeader_CodeSetInfo { #[doc = "Title name"] #[doc = ""] pub name: [::libc::c_char; 8usize], - #[doc = "System info flags, see @ref ExHeader_SystemInfoFlags"] + #[doc = "System info flags, see [`ExHeader_SystemInfoFlags`]"] #[doc = ""] pub flags: ExHeader_SystemInfoFlags, - #[doc = ".text section info, see @ref ExHeader_CodeSectionInfo"] + #[doc = ".text section info, see [`ExHeader_CodeSectionInfo`]"] #[doc = ""] pub text: ExHeader_CodeSectionInfo, #[doc = "Stack size"] #[doc = ""] pub stack_size: u32_, - #[doc = ".rodata section info, see @ref ExHeader_CodeSectionInfo"] + #[doc = ".rodata section info, see [`ExHeader_CodeSectionInfo`]"] #[doc = ""] pub rodata: ExHeader_CodeSectionInfo, #[doc = "Reserved"] #[doc = ""] pub reserved: u32_, - #[doc = ".data section info, see @ref ExHeader_CodeSectionInfo"] + #[doc = ".data section info, see [`ExHeader_CodeSectionInfo`]"] #[doc = ""] pub data: ExHeader_CodeSectionInfo, #[doc = ".bss section size"] @@ -4307,13 +4467,13 @@ impl Default for ExHeader_SystemInfo { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemControlInfo { - #[doc = "Code set info, see @ref ExHeader_CodeSetInfo"] + #[doc = "Code set info, see [`ExHeader_CodeSetInfo`]"] #[doc = ""] pub codeset_info: ExHeader_CodeSetInfo, #[doc = "Title IDs of the titles that this program depends on"] #[doc = ""] pub dependencies: [u64_; 48usize], - #[doc = "System info, see @ref ExHeader_SystemInfo"] + #[doc = "System info, see [`ExHeader_SystemInfo`]"] #[doc = ""] pub system_info: ExHeader_SystemInfo, } @@ -4571,13 +4731,13 @@ pub struct ExHeader_Arm11SystemLocalCapabilities { #[doc = "Title ID"] #[doc = ""] pub title_id: u64_, - #[doc = "Core info, see @ref ExHeader_Arm11CoreInfo"] + #[doc = "Core info, see [`ExHeader_Arm11CoreInfo`]"] #[doc = ""] pub core_info: ExHeader_Arm11CoreInfo, #[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] #[doc = ""] pub reslimits: [u16_; 16usize], - #[doc = "Storage info, see @ref ExHeader_Arm11StorageInfo"] + #[doc = "Storage info, see [`ExHeader_Arm11StorageInfo`]"] #[doc = ""] pub storage_info: ExHeader_Arm11StorageInfo, #[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] @@ -4586,7 +4746,7 @@ pub struct ExHeader_Arm11SystemLocalCapabilities { #[doc = "Reserved"] #[doc = ""] pub reserved: [u8_; 15usize], - #[doc = "Resource limit category, see @ref ExHeader_Arm11SystemLocalCapabilities"] + #[doc = "Resource limit category, see [`ExHeader_Arm11SystemLocalCapabilities`]"] #[doc = ""] pub reslimit_category: ResourceLimitCategory, } @@ -4628,13 +4788,13 @@ pub struct ExHeader_Arm9AccessControl { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessControlInfo { - #[doc = "ARM11 system-local capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] + #[doc = "ARM11 system-local capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] #[doc = ""] pub local_caps: ExHeader_Arm11SystemLocalCapabilities, - #[doc = "ARM11 kernel capabilities, see @ref ExHeader_Arm11SystemLocalCapabilities"] + #[doc = "ARM11 kernel capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] #[doc = ""] pub kernel_caps: ExHeader_Arm11KernelCapabilities, - #[doc = "ARM9 access control, see @ref ExHeader_Arm9AccessControl"] + #[doc = "ARM9 access control, see [`ExHeader_Arm9AccessControl`]"] #[doc = ""] pub access_control: ExHeader_Arm9AccessControl, } @@ -4652,10 +4812,10 @@ impl Default for ExHeader_AccessControlInfo { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Info { - #[doc = "System control info, see @ref ExHeader_SystemControlInfo"] + #[doc = "System control info, see [`ExHeader_SystemControlInfo`]"] #[doc = ""] pub sci: ExHeader_SystemControlInfo, - #[doc = "Access control info, see @ref ExHeader_AccessControlInfo"] + #[doc = "Access control info, see [`ExHeader_AccessControlInfo`]"] #[doc = ""] pub aci: ExHeader_AccessControlInfo, } @@ -4679,7 +4839,7 @@ pub struct ExHeader_AccessDescriptor { #[doc = "The modulus used for the above signature, with 65537 as public exponent"] #[doc = ""] pub ncchModulus: [u8_; 256usize], - #[doc = "This is compared for equality with the first ACI by Process9, see @ref ExHeader_AccessControlInfo"] + #[doc = "This is compared for equality with the first ACI by Process9, see [`ExHeader_AccessControlInfo`]"] #[doc = ""] pub acli: ExHeader_AccessControlInfo, } @@ -4697,10 +4857,10 @@ impl Default for ExHeader_AccessDescriptor { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader { - #[doc = "Main extended header data, see @ref ExHeader_Info"] + #[doc = "Main extended header data, see [`ExHeader_Info`]"] #[doc = ""] pub info: ExHeader_Info, - #[doc = "Access descriptor, see @ref ExHeader_AccessDescriptor"] + #[doc = "Access descriptor, see [`ExHeader_AccessDescriptor`]"] #[doc = ""] pub access_descriptor: ExHeader_AccessDescriptor, } @@ -4733,12 +4893,15 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `blocking` - Whether srvGetServiceHandle should be non-blocking."] + #[doc = ""] pub fn srvSetBlockingPolicy(nonBlocking: bool); } extern "C" { #[doc = "Gets the current service API session handle."] #[doc = ""] - #[doc = "Returns: The current service API session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current service API session handle."] #[doc = ""] pub fn srvGetSessionHandle() -> *mut Handle; } @@ -4747,14 +4910,17 @@ extern "C" { #[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] #[doc = ""] #[doc = "0xD8E06406 if the caller has no right to access the service,"] - #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] + #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] #[doc = ""] - #[doc = "Returns: 0 if no error occured,"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 0 if no error occured,"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the handle to."] #[doc = "* `name` - Name of the service."] + #[doc = ""] pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { @@ -4770,6 +4936,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `semaphoreOut` - Pointer to output the notification semaphore to."] + #[doc = ""] pub fn srvEnableNotification(semaphoreOut: *mut Handle) -> Result; } extern "C" { @@ -4781,6 +4948,7 @@ extern "C" { #[doc = "* `out` - Pointer to write the service handle to."] #[doc = "* `name` - Name of the service."] #[doc = "* `maxSessions` - Maximum number of sessions the service can handle."] + #[doc = ""] pub fn srvRegisterService( out: *mut Handle, name: *const ::libc::c_char, @@ -4794,6 +4962,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `name` - Name of the service."] + #[doc = ""] pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result; } extern "C" { @@ -4801,14 +4970,17 @@ extern "C" { #[doc = "Retrieves a service handle."] #[doc = ""] #[doc = "0xD8E06406 if the caller has no right to access the service,"] - #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see @ref srvSetBlockingPolicy)."] + #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] + #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = "Returns: 0 if no error occured,"] + #[doc = "* 0 if no error occured,"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the handle to."] #[doc = "* `name` - Name of the service."] + #[doc = ""] pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { @@ -4819,6 +4991,7 @@ extern "C" { #[doc = ""] #[doc = "* `name` - Name of the port."] #[doc = "* `clientHandle` - Client handle of the port."] + #[doc = ""] pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result; } extern "C" { @@ -4828,6 +5001,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `name` - Name of the port."] + #[doc = ""] pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result; } extern "C" { @@ -4838,6 +5012,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the handle to."] #[doc = "* `name` - Name of the port."] + #[doc = ""] pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { @@ -4847,6 +5022,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `name` - Name of the port to wait for registration."] + #[doc = ""] pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result; } extern "C" { @@ -4856,6 +5032,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn srvSubscribe(notificationId: u32_) -> Result; } extern "C" { @@ -4865,6 +5042,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn srvUnsubscribe(notificationId: u32_) -> Result; } extern "C" { @@ -4874,6 +5052,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `notificationIdOut` - Pointer to output the ID of the received notification to."] + #[doc = ""] pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result; } extern "C" { @@ -4884,6 +5063,7 @@ extern "C" { #[doc = ""] #[doc = "* `notificationId` - ID of the notification."] #[doc = "* `flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] + #[doc = ""] pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result; } extern "C" { @@ -4895,6 +5075,7 @@ extern "C" { #[doc = "* `processIdCountOut` - Pointer to output the number of process IDs to."] #[doc = "* `processIdsOut` - Pointer to output the process IDs to. Should have size \"60 * sizeof(u32)\"."] #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn srvPublishAndGetSubscriber( processIdCountOut: *mut u32_, processIdsOut: *mut u32_, @@ -4909,6 +5090,7 @@ extern "C" { #[doc = ""] #[doc = "* `registeredOut` - Pointer to output the registration status to."] #[doc = "* `name` - Name of the service to check."] + #[doc = ""] pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } extern "C" { @@ -4919,6 +5101,7 @@ extern "C" { #[doc = ""] #[doc = "* `registeredOut` - Pointer to output the registration status to."] #[doc = "* `name` - Name of the port to check."] + #[doc = ""] pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } #[doc = "For generic errors. Shows miscellaneous info."] @@ -5087,7 +5270,9 @@ extern "C" { extern "C" { #[doc = "Gets the current err:f API session handle."] #[doc = ""] - #[doc = "Returns: The current err:f API session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current err:f API session handle."] #[doc = ""] pub fn errfGetSessionHandle() -> *mut Handle; } @@ -5095,68 +5280,62 @@ extern "C" { #[must_use] #[doc = "Throws a system error and possibly results in ErrDisp triggering."] #[doc = ""] - #[doc = ""] #[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] #[doc = "top screen with a developer console or the proper patches in a CFW applied."] - #[doc = ""] #[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] - #[doc = ""] #[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] #[doc = "constructing the ERRF_FatalErrInfo struct yourself."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `error` - Error to throw. [Direction: In]"] + #[doc = ""] pub fn ERRF_Throw(error: *const ERRF_FatalErrInfo) -> Result; } extern "C" { #[must_use] #[doc = "Throws a system error with the given Result code."] #[doc = ""] - #[doc = ""] #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] - #[doc = ""] #[doc = "This function \\em does fill in the address where this function was called from."] - #[doc = ""] - #[doc = "See https://3dbrew.org/wiki/ERR:Throw#Generic for expected top screen output"] + #[doc = "See for expected top screen output"] #[doc = "on development units/patched ErrDisp."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `failure` - Result code to throw. [Direction: In]"] + #[doc = ""] pub fn ERRF_ThrowResult(failure: Result) -> Result; } extern "C" { #[must_use] #[doc = "Throws a system error with the given Result code and message."] #[doc = ""] - #[doc = ""] #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] - #[doc = ""] #[doc = "This function does \\em not fill in the address where this function was called from because it"] #[doc = "would not be displayed."] - #[doc = ""] #[doc = "The message is only displayed on development units/patched ErrDisp."] - #[doc = ""] - #[doc = "See https://3dbrew.org/wiki/ERR:Throw#Result_Failure for expected top screen output"] + #[doc = "See for expected top screen output"] #[doc = "on development units/patched ErrDisp."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `failure` - Result code to throw. [Direction: In]"] #[doc = "* `message` - The message to display. [Direction: In]"] + #[doc = ""] pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result; } extern "C" { #[doc = "Handles an exception using ErrDisp."] #[doc = ""] - #[doc = ""] #[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] + #[doc = "[`threadOnException`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `excep` - Exception information"] #[doc = "* `regs` - CPU registers"] + #[doc = ""] pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters); } #[doc = "Kernel configuration page (read-only)."] @@ -5195,7 +5374,7 @@ pub struct osTimeRef_s { #[doc = "System ticks elapsed since boot when this structure was last updated"] #[doc = ""] pub value_tick: u64_, - #[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around \\ref SYSCLOCK_ARM11)"] + #[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around [`SYSCLOCK_ARM11)`]"] #[doc = ""] pub sysclock_hz: s64, #[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] @@ -5256,58 +5435,73 @@ extern "C" { #[doc = ""] #[doc = "It is sometimes required by services or when using the GPU command buffer."] #[doc = ""] - #[doc = "Returns: The corresponding physical address."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The corresponding physical address."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `vaddr` - Input virtual address."] + #[doc = ""] pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32_; } extern "C" { #[doc = "Converts 0x14* vmem to 0x30*."] #[doc = ""] - #[doc = "Returns: The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `vaddr` - Input virtual address."] + #[doc = ""] pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void; } extern "C" { #[doc = "Retrieves basic information about a service error."] #[doc = ""] - #[doc = ""] #[doc = "This can be used to get some details about an error returned by a service call."] #[doc = ""] - #[doc = "Returns: A string containing a summary of an error."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A string containing a summary of an error."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `error` - Error to retrieve information about."] + #[doc = ""] pub fn osStrError(error: Result) -> *const ::libc::c_char; } extern "C" { #[doc = "Reads the latest reference timepoint published by PTM."] #[doc = ""] - #[doc = "Returns: Structure (see \\ref osTimeRef_s)."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Structure (see [`osTimeRef_s)`]"] #[doc = ""] pub fn osGetTimeRef() -> osTimeRef_s; } extern "C" { #[doc = "Gets the current time."] #[doc = ""] - #[doc = "Returns: The number of milliseconds since 1st Jan 1900 00:00."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The number of milliseconds since 1st Jan 1900 00:00."] #[doc = ""] pub fn osGetTime() -> u64_; } extern "C" { #[doc = "Reads the elapsed time in a tick counter."] #[doc = ""] - #[doc = "Returns: The number of milliseconds elapsed."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The number of milliseconds elapsed."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cnt` - The tick counter."] + #[doc = ""] pub fn osTickCounterRead(cnt: *const TickCounter) -> f64; } extern "C" { @@ -5316,18 +5510,22 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Specifies whether to enable or disable the speedup."] + #[doc = ""] pub fn osSetSpeedupEnable(enable: bool); } extern "C" { #[must_use] #[doc = "Gets the NAND system-version stored in NVer/CVer."] #[doc = ""] - #[doc = "Returns: The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] #[doc = "* `cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] + #[doc = ""] pub fn osGetSystemVersionData( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5337,7 +5535,9 @@ extern "C" { #[must_use] #[doc = "This is a wrapper for osGetSystemVersionData."] #[doc = ""] - #[doc = "Returns: See osGetSystemVersionData."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* See osGetSystemVersionData."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -5345,6 +5545,7 @@ extern "C" { #[doc = "* `cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] #[doc = "* `sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] #[doc = "* `sysverstr_maxsize` - Max size of the above string buffer, *including* NULL-terminator."] + #[doc = ""] pub fn osGetSystemVersionDataString( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5434,38 +5635,48 @@ extern "C" { #[must_use] #[doc = "Function used to implement user-mode synchronization primitives."] #[doc = ""] - #[doc = ""] #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] + #[doc = "```"] #[doc = ""] #[doc = "s32 val=0;"] #[doc = "// Does *nothing* since val >= 0"] #[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] - #[doc = ""] + #[doc = "```"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] #[doc = "* `type` - Type of action to be performed by the arbiter"] - #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this function entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result; } extern "C" { #[must_use] #[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] #[doc = ""] - #[doc = ""] #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] + #[doc = "```"] #[doc = ""] #[doc = "s32 val=0;"] #[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] #[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] - #[doc = ""] + #[doc = "```"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] - #[doc = "* `type` - Type of action to be performed by the arbiter (must use \\ref ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT or \\ref ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)"] - #[doc = "* `value` - Number of threads to signal if using @ref ARBITRATION_SIGNAL, or the value used for comparison."] + #[doc = "* `type` - Type of action to be performed by the arbiter (must use [`ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT`] or [`ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)`]"] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this function entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn syncArbitrateAddressWithTimeout( addr: *mut s32, type_: ArbitrationType, @@ -5479,6 +5690,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_Init(lock: *mut LightLock); } extern "C" { @@ -5487,16 +5699,20 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_Lock(lock: *mut LightLock); } extern "C" { #[doc = "Attempts to lock a light lock."] #[doc = ""] - #[doc = "Returns: Zero on success, non-zero on failure."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_TryLock(lock: *mut LightLock) -> ::libc::c_int; } extern "C" { @@ -5505,6 +5721,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_Unlock(lock: *mut LightLock); } extern "C" { @@ -5513,6 +5730,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_Init(lock: *mut RecursiveLock); } extern "C" { @@ -5521,16 +5739,20 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_Lock(lock: *mut RecursiveLock); } extern "C" { #[doc = "Attempts to lock a recursive lock."] #[doc = ""] - #[doc = "Returns: Zero on success, non-zero on failure."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> ::libc::c_int; } extern "C" { @@ -5539,6 +5761,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock); } extern "C" { @@ -5547,6 +5770,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = ""] pub fn CondVar_Init(cv: *mut CondVar); } extern "C" { @@ -5556,18 +5780,22 @@ extern "C" { #[doc = ""] #[doc = "* `cv` - Pointer to the condition variable."] #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] + #[doc = ""] pub fn CondVar_Wait(cv: *mut CondVar, lock: *mut LightLock); } extern "C" { #[doc = "Waits on a condition variable with a timeout."] #[doc = ""] - #[doc = "Returns: Zero on success, non-zero on failure."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cv` - Pointer to the condition variable."] #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] #[doc = "* `timeout_ns` - Timeout in nanoseconds."] + #[doc = ""] pub fn CondVar_WaitTimeout( cv: *mut CondVar, lock: *mut LightLock, @@ -5580,7 +5808,8 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cv` - Pointer to the condition variable."] - #[doc = "* `num_threads` - Maximum number of threads to wake up (or \\ref ARBITRATION_SIGNAL_ALL to wake them all)."] + #[doc = "* `num_threads` - Maximum number of threads to wake up (or [`ARBITRATION_SIGNAL_ALL`] to wake them all)."] + #[doc = ""] pub fn CondVar_WakeUp(cv: *mut CondVar, num_threads: s32); } extern "C" { @@ -5590,6 +5819,7 @@ extern "C" { #[doc = ""] #[doc = "* `event` - Pointer to the event."] #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] + #[doc = ""] pub fn LightEvent_Init(event: *mut LightEvent, reset_type: ResetType); } extern "C" { @@ -5598,6 +5828,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Clear(event: *mut LightEvent); } extern "C" { @@ -5606,6 +5837,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Pulse(event: *mut LightEvent); } extern "C" { @@ -5614,16 +5846,20 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Signal(event: *mut LightEvent); } extern "C" { #[doc = "Attempts to wait on a light event."] #[doc = ""] - #[doc = "Returns: Non-zero if the event was signaled, zero otherwise."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Non-zero if the event was signaled, zero otherwise."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_TryWait(event: *mut LightEvent) -> ::libc::c_int; } extern "C" { @@ -5632,17 +5868,21 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Wait(event: *mut LightEvent); } extern "C" { #[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] #[doc = ""] - #[doc = "Returns: Non-zero on timeout, zero otherwise."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Non-zero on timeout, zero otherwise."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - Pointer to the event."] #[doc = "* `timeout_ns` - Timeout in nanoseconds."] + #[doc = ""] pub fn LightEvent_WaitTimeout(event: *mut LightEvent, timeout_ns: s64) -> ::libc::c_int; } extern "C" { @@ -5653,6 +5893,7 @@ extern "C" { #[doc = "* `event` - Pointer to the semaphore."] #[doc = "* `max_count` - Initial count of the semaphore."] #[doc = "* `max_count` - Maximum count of the semaphore."] + #[doc = ""] pub fn LightSemaphore_Init(semaphore: *mut LightSemaphore, initial_count: s16, max_count: s16); } extern "C" { @@ -5662,17 +5903,21 @@ extern "C" { #[doc = ""] #[doc = "* `semaphore` - Pointer to the semaphore."] #[doc = "* `count` - Acquire count"] + #[doc = ""] pub fn LightSemaphore_Acquire(semaphore: *mut LightSemaphore, count: s32); } extern "C" { #[doc = "Attempts to acquire a light semaphore."] #[doc = ""] - #[doc = "Returns: Zero on success, non-zero on failure"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `semaphore` - Pointer to the semaphore."] #[doc = "* `count` - Acquire count"] + #[doc = ""] pub fn LightSemaphore_TryAcquire(semaphore: *mut LightSemaphore, count: s32) -> ::libc::c_int; } extern "C" { @@ -5682,6 +5927,7 @@ extern "C" { #[doc = ""] #[doc = "* `semaphore` - Pointer to the semaphore."] #[doc = "* `count` - Release count"] + #[doc = ""] pub fn LightSemaphore_Release(semaphore: *mut LightSemaphore, count: s32); } #[repr(C)] @@ -5707,15 +5953,19 @@ extern "C" { #[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] #[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] #[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] - #[doc = ""] #[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] #[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] #[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] #[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] #[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* [`svcExitThread`] should never be called from the thread, use [`threadExit`] instead."] + #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = "Returns: The libctru thread handle on success, NULL on failure."] + #[doc = "* The libctru thread handle on success, NULL on failure."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -5725,6 +5975,11 @@ extern "C" { #[doc = "* `prio` - Low values gives the thread higher priority."] #[doc = "* `core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] #[doc = "* `detached` - When set to true, the thread is automatically freed when it finishes."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Default exit code of a thread is 0."] + #[doc = ""] pub fn threadCreate( entrypoint: ThreadFunc, arg: *mut ::libc::c_void, @@ -5737,21 +5992,27 @@ extern "C" { extern "C" { #[doc = "Retrieves the OS thread handle of a libctru thread."] #[doc = ""] - #[doc = "Returns: OS thread handle"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* OS thread handle"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] pub fn threadGetHandle(thread: Thread) -> Handle; } extern "C" { #[doc = "Retrieves the exit code of a finished libctru thread."] #[doc = ""] - #[doc = "Returns: Exit code"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Exit code"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] pub fn threadGetExitCode(thread: Thread) -> ::libc::c_int; } extern "C" { @@ -5760,6 +6021,11 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function should not be called if the thread is detached, as it is freed automatically when it finishes."] + #[doc = ""] pub fn threadFree(thread: Thread); } extern "C" { @@ -5770,6 +6036,7 @@ extern "C" { #[doc = ""] #[doc = "* `thread` - libctru thread handle"] #[doc = "* `timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] + #[doc = ""] pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result; } extern "C" { @@ -5778,12 +6045,15 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] pub fn threadDetach(thread: Thread); } extern "C" { #[doc = "Retrieves the libctru thread handle of the current thread."] #[doc = ""] - #[doc = "Returns: Libctru thread handle of the current thread, or NULL for the main thread"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* libctru thread handle of the current thread, or NULL for the main thread"] #[doc = ""] pub fn threadGetCurrent() -> Thread; } @@ -5793,6 +6063,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `rc` - Exit code"] + #[doc = ""] pub fn threadExit(rc: ::libc::c_int); } #[doc = "Framebuffer information."] @@ -5950,7 +6221,9 @@ extern "C" { extern "C" { #[doc = "Gets a pointer to the current gsp::Gpu session handle."] #[doc = ""] - #[doc = "Returns: A pointer to the current gsp::Gpu session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current gsp::Gpu session handle."] #[doc = ""] pub fn gspGetSessionHandle() -> *mut Handle; } @@ -5962,16 +6235,23 @@ extern "C" { extern "C" { #[doc = "Presents a buffer to the specified screen."] #[doc = ""] - #[doc = "Returns: True if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] + #[doc = "* `screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] #[doc = "* `swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] #[doc = "* `fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] #[doc = "* `fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] #[doc = "* `stride` - Stride in bytes between scanlines"] #[doc = "* `mode` - Mode configuration to be written to LCD register"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The most recently presented buffer is processed and configured during the specified screen's next VBlank event."] + #[doc = ""] pub fn gspPresentBuffer( screen: ::libc::c_uint, swap: ::libc::c_uint, @@ -5982,11 +6262,12 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Returns true if a prior \\ref gspPresentBuffer command is still pending to be processed by GSP."] + #[doc = "Returns true if a prior [`gspPresentBuffer`] command is still pending to be processed by GSP."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `screen` - Screen ID (see \\ref GSP_SCREEN_TOP and \\ref GSP_SCREEN_BOTTOM)"] + #[doc = "* `screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] + #[doc = ""] pub fn gspIsPresentPending(screen: ::libc::c_uint) -> bool; } extern "C" { @@ -5998,6 +6279,7 @@ extern "C" { #[doc = "* `cb` - Callback to run."] #[doc = "* `data` - Data to be passed to the callback."] #[doc = "* `oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] + #[doc = ""] pub fn gspSetEventCallback( id: GSPGPU_Event, cb: ThreadFunc, @@ -6012,15 +6294,17 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the event."] #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = ""] pub fn gspWaitForEvent(id: GSPGPU_Event, nextEvent: bool); } extern "C" { #[doc = "Waits for any GSPGPU event to occur."] #[doc = ""] - #[doc = ""] #[doc = "The function returns immediately if there are unprocessed events at the time of call."] #[doc = ""] - #[doc = "Returns: The ID of the event that occurred."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The ID of the event that occurred."] #[doc = ""] pub fn gspWaitForAnyEvent() -> GSPGPU_Event; } @@ -6031,6 +6315,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `gxCommand` - GX command to execute."] + #[doc = ""] pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result; } extern "C" { @@ -6040,6 +6325,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `flags` - Flags to acquire with."] + #[doc = ""] pub fn GSPGPU_AcquireRight(flags: u8_) -> Result; } extern "C" { @@ -6055,6 +6341,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `captureinfo` - Pointer to output capture info to."] + #[doc = ""] pub fn GSPGPU_ImportDisplayCaptureInfo(captureinfo: *mut GSPGPU_CaptureInfo) -> Result; } extern "C" { @@ -6082,6 +6369,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] + #[doc = ""] pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result; } extern "C" { @@ -6092,6 +6380,7 @@ extern "C" { #[doc = ""] #[doc = "* `screenid` - ID of the screen to update."] #[doc = "* `framebufinfo` - Framebuffer information to update with."] + #[doc = ""] pub fn GSPGPU_SetBufferSwap( screenid: u32_, framebufinfo: *const GSPGPU_FramebufferInfo, @@ -6105,6 +6394,7 @@ extern "C" { #[doc = ""] #[doc = "* `adr` - Address to flush."] #[doc = "* `size` - Size of the memory to flush."] + #[doc = ""] pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -6115,6 +6405,7 @@ extern "C" { #[doc = ""] #[doc = "* `adr` - Address to invalidate."] #[doc = "* `size` - Size of the memory to invalidate."] + #[doc = ""] pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -6126,6 +6417,7 @@ extern "C" { #[doc = "* `regAddr` - Register address to write to."] #[doc = "* `data` - Data to write."] #[doc = "* `size` - Size of the data to write."] + #[doc = ""] pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result; } extern "C" { @@ -6139,6 +6431,7 @@ extern "C" { #[doc = "* `datasize` - Size of the data to write."] #[doc = "* `maskdata` - Data of the mask."] #[doc = "* `masksize` - Size of the mask."] + #[doc = ""] pub fn GSPGPU_WriteHWRegsWithMask( regAddr: u32_, data: *const u32_, @@ -6156,6 +6449,7 @@ extern "C" { #[doc = "* `regAddr` - Register address to read from."] #[doc = "* `data` - Buffer to read data to."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result; } extern "C" { @@ -6168,6 +6462,7 @@ extern "C" { #[doc = "* `flags` - Flags to register with."] #[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] #[doc = "* `threadID` - Pointer to output the GSP thread ID to."] + #[doc = ""] pub fn GSPGPU_RegisterInterruptRelayQueue( eventHandle: Handle, flags: u32_, @@ -6194,6 +6489,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] + #[doc = ""] pub fn GSPGPU_SetLedForceOff(disable: bool) -> Result; } #[doc = "Top screen"] @@ -6218,32 +6514,35 @@ pub const GFX_LEFT: gfx3dSide_t = 0; pub const GFX_RIGHT: gfx3dSide_t = 1; #[doc = "Top screen framebuffer side."] #[doc = ""] -#[doc = ""] #[doc = "This is only meaningful when stereoscopic 3D is enabled on the top screen."] -#[doc = "In any other case, use \\ref GFX_LEFT."] +#[doc = "In any other case, use [`GFX_LEFT`]"] #[doc = ""] pub type gfx3dSide_t = ::libc::c_uint; extern "C" { #[doc = "Initializes the LCD framebuffers with default parameters"] #[doc = ""] - #[doc = "This is equivalent to calling: @code gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); @endcode"] + #[doc = "This is equivalent to calling: ```"] + #[doc = "gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); ```"] #[doc = ""] pub fn gfxInitDefault(); } extern "C" { #[doc = "Initializes the LCD framebuffers."] #[doc = ""] - #[doc = ""] #[doc = "This function allocates memory for the framebuffers in the specified memory region."] #[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `topFormat` - The format of the top screen framebuffers."] #[doc = "* `bottomFormat` - The format of the bottom screen framebuffers."] #[doc = "* `vramBuffers` - Whether to allocate the framebuffers in VRAM."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function internally calls [`gspInit`]"] + #[doc = ""] pub fn gfxInit( topFormat: GSPGPU_FramebufferFormat, bottomFormat: GSPGPU_FramebufferFormat, @@ -6253,6 +6552,10 @@ extern "C" { extern "C" { #[doc = "Deinitializes and frees the LCD framebuffers."] #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function internally calls [`gspExit`]"] + #[doc = ""] pub fn gfxExit(); } extern "C" { @@ -6261,28 +6564,48 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Pass true to enable, false to disable."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Stereoscopic 3D is disabled by default."] + #[doc = ""] pub fn gfxSet3D(enable: bool); } extern "C" { #[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] #[doc = ""] - #[doc = "Returns: True if 3D enabled, false otherwise."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if 3D enabled, false otherwise."] #[doc = ""] pub fn gfxIs3D() -> bool; } extern "C" { #[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] #[doc = ""] - #[doc = "Returns: True if wide mode enabled, false otherwise."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if wide mode enabled, false otherwise."] #[doc = ""] pub fn gfxIsWide() -> bool; } extern "C" { #[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Wide mode does not work on Old 2DS consoles (however it does work on New 2DS XL consoles)."] + #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Pass true to enable, false to disable."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Wide mode is disabled by default."] + #[doc = "* Wide and stereoscopic 3D modes are mutually exclusive."] + #[doc = "* In wide mode pixels are not square, since scanlines are half as tall as they normally are."] + #[doc = ""] pub fn gfxSetWide(enable: bool); } extern "C" { @@ -6292,18 +6615,26 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] - #[doc = "* `format` - Pixel format (see \\ref GSPGPU_FramebufferFormat)"] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = "* `format` - Pixel format (see [`GSPGPU_FramebufferFormat)`]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If the currently allocated framebuffers are too small for the specified format,"] + #[doc = ""] pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormat); } extern "C" { #[doc = "Retrieves the current pixel format of a screen."] #[doc = ""] - #[doc = "Returns: Pixel format (see \\ref GSPGPU_FramebufferFormat)"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Pixel format (see [`GSPGPU_FramebufferFormat)`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = ""] pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormat; } extern "C" { @@ -6311,24 +6642,31 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] #[doc = "* `enable` - Pass true to enable, false to disable."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Double buffering is enabled by default."] + #[doc = ""] pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, enable: bool); } extern "C" { #[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] #[doc = ""] - #[doc = ""] #[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] #[doc = ""] - #[doc = "Returns: A pointer to the current framebuffer of the chosen screen."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current framebuffer of the chosen screen."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `screen` - Screen ID (see \\ref gfxScreen_t)"] - #[doc = "* `side` - Framebuffer side (see \\ref gfx3dSide_t) (pass \\ref GFX_LEFT if not using stereoscopic 3D)"] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = "* `side` - Framebuffer side (see [`gfx3dSide_t)`] (pass [`GFX_LEFT`] if not using stereoscopic 3D)"] #[doc = "* `width` - Pointer that will hold the width of the framebuffer in pixels."] #[doc = "* `height` - Pointer that will hold the height of the framebuffer in pixels."] + #[doc = ""] pub fn gfxGetFramebuffer( screen: gfxScreen_t, side: gfx3dSide_t, @@ -6341,6 +6679,10 @@ extern "C" { #[doc = ""] #[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* This is **only used during software rendering**. Since this function has significant overhead,"] + #[doc = ""] pub fn gfxFlushBuffers(); } extern "C" { @@ -6349,30 +6691,45 @@ extern "C" { #[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] #[doc = "since this API does not implement triple buffering."] #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Only call this once per screen per frame, otherwise graphical glitches will occur"] + #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `scr` - Screen ID (see [`gfxScreen_t)`]"] #[doc = "* `hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Previously rendered content will be displayed on the screen after the next VBlank."] + #[doc = "* This function is still useful even if double buffering is disabled, as it must be used to commit configuration changes."] + #[doc = ""] pub fn gfxScreenSwapBuffers(scr: gfxScreen_t, hasStereo: bool); } extern "C" { - #[doc = "**Warning!** This is deprecated! - This function has been superseded by \\ref gfxScreenSwapBuffers, please use that instead."] + #[doc = "**Warning!** This is deprecated! - This function has been superseded by [`gfxScreenSwapBuffers`] please use that instead."] #[doc = ""] - #[doc = "Same as \\ref gfxScreenSwapBuffers, but with hasStereo set to true."] + #[doc = "Same as [`gfxScreenSwapBuffers`] but with hasStereo set to true."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `scr` - Screen ID (see \\ref gfxScreen_t)"] + #[doc = "* `scr` - Screen ID (see [`gfxScreen_t)`]"] #[doc = "* `immediate` - This parameter no longer has any effect and is thus ignored."] + #[doc = ""] pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool); } extern "C" { #[doc = "Updates the configuration of both screens."] #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function is equivalent to: ``` gfxScreenSwapBuffers(GFX_TOP,true); gfxScreenSwapBuffers(GFX_BOTTOM,true); ```"] + #[doc = ""] pub fn gfxSwapBuffers(); } extern "C" { - #[doc = "Same as \\ref gfxSwapBuffers (formerly different)."] + #[doc = "Same as [`gfxSwapBuffers`] (formerly different)."] #[doc = ""] pub fn gfxSwapBuffersGpu(); } @@ -6408,11 +6765,13 @@ impl Default for ConsoleFont { } #[doc = "Console structure used to store the state of a console render context."] #[doc = ""] -#[doc = ""] #[doc = "Default values from consoleGetDefault();"] +#[doc = "```"] +#[doc = ""] #[doc = "PrintConsole defaultConsole ="] #[doc = "{"] #[doc = "};"] +#[doc = "```"] #[doc = ""] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6505,6 +6864,7 @@ extern "C" { #[doc = ""] #[doc = "* `console` - Pointer to the console to update, if NULL it will update the current console."] #[doc = "* `font` - The font to load."] + #[doc = ""] pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont); } extern "C" { @@ -6517,6 +6877,7 @@ extern "C" { #[doc = "* `y` - Y location of the window."] #[doc = "* `width` - Width of the window."] #[doc = "* `height` - Height of the window."] + #[doc = ""] pub fn consoleSetWindow( console: *mut PrintConsole, x: ::libc::c_int, @@ -6530,29 +6891,37 @@ extern "C" { #[doc = ""] #[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] #[doc = ""] - #[doc = "Returns: A pointer to the console with the default values."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the console with the default values."] #[doc = ""] pub fn consoleGetDefault() -> *mut PrintConsole; } extern "C" { #[doc = "Make the specified console the render target."] #[doc = ""] - #[doc = "Returns: A pointer to the previous console."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the previous console."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console))."] + #[doc = ""] pub fn consoleSelect(console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { #[doc = "Initialise the console."] #[doc = ""] - #[doc = "Returns: A pointer to the current console."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current console."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `screen` - The screen to use for the console."] #[doc = "* `console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] + #[doc = ""] pub fn consoleInit(screen: gfxScreen_t, console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { @@ -6561,6 +6930,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `device` - The debug device (or devices) to output debug print statements to."] + #[doc = ""] pub fn consoleDebugInit(device: debugDevice); } extern "C" { @@ -6587,11 +6957,14 @@ pub type _bindgen_ty_9 = ::libc::c_uint; extern "C" { #[doc = "Retrieves a handle from the environment handle list."] #[doc = ""] - #[doc = "Returns: The retrieved handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The retrieved handle."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `name` - Name of the handle."] + #[doc = ""] pub fn envGetHandle(name: *const ::libc::c_char) -> Handle; } pub type _off_t = __int64_t; @@ -6883,13 +7256,16 @@ pub type decompressCallback = ::core::option::Option< extern "C" { #[doc = "Decompression callback for file descriptors"] #[doc = ""] - #[doc = "Returns: Number of bytes read"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Number of bytes read"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `userdata` - Address of file descriptor [Direction: In]"] #[doc = "* `buffer` - Buffer to write into [Direction: In]"] #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] + #[doc = ""] pub fn decompressCallback_FD( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -6899,13 +7275,16 @@ extern "C" { extern "C" { #[doc = "Decompression callback for stdio FILE*"] #[doc = ""] - #[doc = "Returns: Number of bytes read"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Number of bytes read"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `userdata` - FILE* [Direction: In]"] #[doc = "* `buffer` - Buffer to write into [Direction: In]"] #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] + #[doc = ""] pub fn decompressCallback_Stdio( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -6915,7 +7294,9 @@ extern "C" { extern "C" { #[doc = "Decode decompression header"] #[doc = ""] - #[doc = "Returns: Bytes consumed"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Bytes consumed"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -6924,6 +7305,10 @@ extern "C" { #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] + #[doc = "# Return values"] + #[doc = "* -1 error"] + #[doc = ""] pub fn decompressHeader( type_: *mut decompressType, size: *mut size_t, @@ -6935,12 +7320,13 @@ extern "C" { extern "C" { #[doc = "Decompress data"] #[doc = ""] - #[doc = ""] #[doc = "and insize is the size of that data. If callback is not null,"] #[doc = "userdata is passed to callback to fetch more data, and insize is"] #[doc = "unused."] #[doc = ""] - #[doc = "Returns: Whether succeeded"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -6949,6 +7335,11 @@ extern "C" { #[doc = "* `callback` - Data callback (see note) [Direction: In]"] #[doc = "* `userdata` - User data passed to callback (see note) [Direction: In]"] #[doc = "* `insize` - Size of userdata (see note) [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If callback is null, userdata is a pointer to memory to read from,"] + #[doc = ""] pub fn decompressV( iov: *const decompressIOVec, iovcnt: size_t, @@ -6960,7 +7351,9 @@ extern "C" { extern "C" { #[doc = "Decompress LZSS/LZ10"] #[doc = ""] - #[doc = "Returns: Whether succeeded"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -6969,6 +7362,7 @@ extern "C" { #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_LZSS( iov: *const decompressIOVec, iovcnt: size_t, @@ -6980,7 +7374,9 @@ extern "C" { extern "C" { #[doc = "Decompress LZ11"] #[doc = ""] - #[doc = "Returns: Whether succeeded"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -6989,6 +7385,7 @@ extern "C" { #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_LZ11( iov: *const decompressIOVec, iovcnt: size_t, @@ -7000,7 +7397,9 @@ extern "C" { extern "C" { #[doc = "Decompress Huffman"] #[doc = ""] - #[doc = "Returns: Whether succeeded"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -7010,6 +7409,7 @@ extern "C" { #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_Huff( bits: size_t, iov: *const decompressIOVec, @@ -7022,7 +7422,9 @@ extern "C" { extern "C" { #[doc = "Decompress run-length encoding"] #[doc = ""] - #[doc = "Returns: Whether succeeded"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -7031,6 +7433,7 @@ extern "C" { #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_RLE( iov: *const decompressIOVec, iovcnt: size_t, @@ -7042,191 +7445,236 @@ extern "C" { extern "C" { #[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of input code units consumed"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output codepoint [Direction: In, Out]"] #[doc = "* `in` - Input sequence [Direction: In]"] + #[doc = ""] pub fn decode_utf8(out: *mut u32, in_: *const u8) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of input code units consumed"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output codepoint [Direction: In, Out]"] #[doc = "* `in` - Input sequence [Direction: In]"] + #[doc = ""] pub fn decode_utf16(out: *mut u32, in_: *const u16) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input codepoint [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out must be able to store 4 code units"] + #[doc = ""] pub fn encode_utf8(out: *mut u8, in_: u32) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input codepoint [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out must be able to store 2 code units"] + #[doc = ""] pub fn encode_utf16(out: *mut u16, in_: u32) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] - #[doc = ""] #[doc = "Fills the output buffer up to \\a len code units."] #[doc = "Returns the number of code units that the input would produce;"] #[doc = "if it returns greater than \\a len, the output has been"] #[doc = "truncated."] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] - #[doc = ""] #[doc = "Fills the output buffer up to \\a len code units."] #[doc = "Returns the number of code units that the input would produce;"] #[doc = "if it returns greater than \\a len, the output has been"] #[doc = "truncated."] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] - #[doc = ""] #[doc = "Fills the output buffer up to \\a len code units."] #[doc = "Returns the number of code units that the input would produce;"] #[doc = "if it returns greater than \\a len, the output has been"] #[doc = "truncated."] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] - #[doc = ""] #[doc = "Fills the output buffer up to \\a len code units."] #[doc = "Returns the number of code units that the input would produce;"] #[doc = "if it returns greater than \\a len, the output has been"] #[doc = "truncated."] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] - #[doc = ""] #[doc = "Fills the output buffer up to \\a len code units."] #[doc = "Returns the number of code units that the input would produce;"] #[doc = "if it returns greater than \\a len, the output has been"] #[doc = "truncated."] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { #[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = ""] - #[doc = ""] - #[doc = "Returns: -1 for error"] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Output sequence [Direction: In, Out]"] #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { #[doc = "Allocates a 0x80-byte aligned buffer."] #[doc = ""] - #[doc = "Returns: The allocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn linearAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { #[doc = "Allocates a buffer aligned to the given size."] #[doc = ""] - #[doc = "Returns: The allocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `size` - Size of the buffer to allocate."] #[doc = "* `alignment` - Alignment to use."] + #[doc = ""] pub fn linearMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { @@ -7234,18 +7682,23 @@ extern "C" { #[doc = ""] #[doc = "Note: Not implemented yet."] #[doc = ""] - #[doc = "Returns: The reallocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The reallocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mem` - Buffer to reallocate."] #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn linearRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { #[doc = "Retrieves the allocated size of a buffer."] #[doc = ""] - #[doc = "Returns: The size of the buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The size of the buffer."] #[doc = ""] pub fn linearGetSize(mem: *mut ::libc::c_void) -> size_t; } @@ -7255,12 +7708,15 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mem` - Buffer to free."] + #[doc = ""] pub fn linearFree(mem: *mut ::libc::c_void); } extern "C" { #[doc = "Gets the current linear free space."] #[doc = ""] - #[doc = "Returns: The current linear free space."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current linear free space."] #[doc = ""] pub fn linearSpaceFree() -> u32_; } @@ -7271,16 +7727,20 @@ extern "C" { #[doc = ""] #[doc = "* `addrMin` - Minimum address."] #[doc = "* `addrMax` - Maxium address."] + #[doc = ""] pub fn mappableInit(addrMin: u32_, addrMax: u32_); } extern "C" { #[doc = "Finds a mappable memory area."] #[doc = ""] - #[doc = "Returns: The mappable area."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The mappable area."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `size` - Size of the area to find."] + #[doc = ""] pub fn mappableAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { @@ -7289,6 +7749,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mem` - Mappable area to free."] + #[doc = ""] pub fn mappableFree(mem: *mut ::libc::c_void); } pub const VRAM_ALLOC_A: vramAllocPos = 1; @@ -7298,45 +7759,57 @@ pub type vramAllocPos = ::libc::c_uint; extern "C" { #[doc = "Allocates a 0x80-byte aligned buffer."] #[doc = ""] - #[doc = "Returns: The allocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn vramAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { #[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] #[doc = ""] - #[doc = "Returns: The allocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] + #[doc = "* `pos` - VRAM bank to use (see [`vramAllocPos)`]"] + #[doc = ""] pub fn vramAllocAt(size: size_t, pos: vramAllocPos) -> *mut ::libc::c_void; } extern "C" { #[doc = "Allocates a buffer aligned to the given size."] #[doc = ""] - #[doc = "Returns: The allocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `size` - Size of the buffer to allocate."] #[doc = "* `alignment` - Alignment to use."] + #[doc = ""] pub fn vramMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { #[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] #[doc = ""] - #[doc = "Returns: The allocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `size` - Size of the buffer to allocate."] #[doc = "* `alignment` - Alignment to use."] - #[doc = "* `pos` - VRAM bank to use (see \\ref vramAllocPos)."] + #[doc = "* `pos` - VRAM bank to use (see [`vramAllocPos)`]"] + #[doc = ""] pub fn vramMemAlignAt( size: size_t, alignment: size_t, @@ -7348,18 +7821,23 @@ extern "C" { #[doc = ""] #[doc = "Note: Not implemented yet."] #[doc = ""] - #[doc = "Returns: The reallocated buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The reallocated buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mem` - Buffer to reallocate."] #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn vramRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { #[doc = "Retrieves the allocated size of a buffer."] #[doc = ""] - #[doc = "Returns: The size of the buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The size of the buffer."] #[doc = ""] pub fn vramGetSize(mem: *mut ::libc::c_void) -> size_t; } @@ -7369,12 +7847,15 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mem` - Buffer to free."] + #[doc = ""] pub fn vramFree(mem: *mut ::libc::c_void); } extern "C" { #[doc = "Gets the current VRAM free space."] #[doc = ""] - #[doc = "Returns: The current VRAM free space."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current VRAM free space."] #[doc = ""] pub fn vramSpaceFree() -> u32_; } @@ -7454,6 +7935,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] + #[doc = ""] pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result; } extern "C" { @@ -7463,6 +7945,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] + #[doc = ""] pub fn ACU_GetStatus(out: *mut u32_) -> Result; } extern "C" { @@ -7472,6 +7955,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] + #[doc = ""] pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result; } extern "C" { @@ -7481,6 +7965,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `SSID` - Pointer to output the connected Wifi SSID to."] + #[doc = ""] pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result; } extern "C" { @@ -7490,6 +7975,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the connected Wifi SSID length to."] + #[doc = ""] pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result; } extern "C" { @@ -7499,6 +7985,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Pointer to output the proxy status to."] + #[doc = ""] pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result; } extern "C" { @@ -7508,6 +7995,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the proxy port to."] + #[doc = ""] pub fn ACU_GetProxyPort(out: *mut u32_) -> Result; } extern "C" { @@ -7517,6 +8005,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] + #[doc = ""] pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result; } extern "C" { @@ -7526,6 +8015,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] + #[doc = ""] pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result; } extern "C" { @@ -7535,6 +8025,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `errorCode` - Pointer to output the error code to."] + #[doc = ""] pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { @@ -7544,6 +8035,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `errorCode` - Pointer to output the error code to."] + #[doc = ""] pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { @@ -7553,6 +8045,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `config` - Pointer to an acuConfig struct to contain the data."] + #[doc = ""] pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result; } extern "C" { @@ -7563,6 +8056,7 @@ extern "C" { #[doc = ""] #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] #[doc = "* `area` - Always 2 ?"] + #[doc = ""] pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result; } extern "C" { @@ -7573,6 +8067,7 @@ extern "C" { #[doc = ""] #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] #[doc = "* `type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] + #[doc = ""] pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result; } extern "C" { @@ -7582,6 +8077,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = ""] pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result; } extern "C" { @@ -7592,6 +8088,7 @@ extern "C" { #[doc = ""] #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] #[doc = "* `connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] + #[doc = ""] pub fn ACU_ConnectAsync(config: *const acuConfig, connectionHandle: Handle) -> Result; } #[doc = "Open for reading."] @@ -8221,6 +8718,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `session` - The handle of the FSUSER session to use."] + #[doc = ""] pub fn fsUseSession(session: Handle); } extern "C" { @@ -8229,38 +8727,45 @@ extern "C" { pub fn fsEndUseSession(); } extern "C" { - #[doc = "Exempts an archive from using alternate FS session handles provided with @ref fsUseSession"] + #[doc = "Exempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] #[doc = ""] - #[doc = "Instead, the archive will use the default FS session handle, opened with @ref srvGetSessionHandle"] + #[doc = "Instead, the archive will use the default FS session handle, opened with [`srvGetSessionHandle`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `archive` - Archive to exempt."] + #[doc = ""] pub fn fsExemptFromSession(archive: FS_Archive); } extern "C" { - #[doc = "Unexempts an archive from using alternate FS session handles provided with @ref fsUseSession"] + #[doc = "Unexempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `archive` - Archive to remove from the exemption list."] + #[doc = ""] pub fn fsUnexemptFromSession(archive: FS_Archive); } extern "C" { #[doc = "Creates an FS_Path instance."] #[doc = ""] - #[doc = "Returns: The created FS_Path instance."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The created FS_Path instance."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `type` - Type of path."] #[doc = "* `path` - Path to use."] + #[doc = ""] pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void) -> FS_Path; } extern "C" { #[doc = "Gets the current FS session handle."] #[doc = ""] - #[doc = "Returns: The current FS session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current FS session handle."] #[doc = ""] pub fn fsGetSessionHandle() -> *mut Handle; } @@ -8275,6 +8780,7 @@ extern "C" { #[doc = "* `inputSize` - Size of the input."] #[doc = "* `output` - Buffer to write output to."] #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSUSER_Control( action: FS_Action, input: *mut ::libc::c_void, @@ -8290,6 +8796,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `session` - The handle of the FSUSER session to initialize."] + #[doc = ""] pub fn FSUSER_Initialize(session: Handle) -> Result; } extern "C" { @@ -8303,6 +8810,7 @@ extern "C" { #[doc = "* `path` - Path of the file."] #[doc = "* `openFlags` - Flags to open the file with."] #[doc = "* `attributes` - Attributes of the file."] + #[doc = ""] pub fn FSUSER_OpenFile( out: *mut Handle, archive: FS_Archive, @@ -8323,6 +8831,7 @@ extern "C" { #[doc = "* `filePath` - Path of the file."] #[doc = "* `openFlags` - Flags to open the file with."] #[doc = "* `attributes` - Attributes of the file."] + #[doc = ""] pub fn FSUSER_OpenFileDirectly( out: *mut Handle, archiveId: FS_ArchiveID, @@ -8340,6 +8849,7 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive containing the file."] #[doc = "* `path` - Path of the file."] + #[doc = ""] pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { @@ -8352,6 +8862,7 @@ extern "C" { #[doc = "* `srcPath` - Path of the source file."] #[doc = "* `dstArchive` - Archive containing the destination file."] #[doc = "* `dstPath` - Path of the destination file."] + #[doc = ""] pub fn FSUSER_RenameFile( srcArchive: FS_Archive, srcPath: FS_Path, @@ -8367,6 +8878,7 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive containing the directory."] #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSUSER_DeleteDirectory(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { @@ -8377,6 +8889,7 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive containing the directory."] #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSUSER_DeleteDirectoryRecursively(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { @@ -8389,6 +8902,7 @@ extern "C" { #[doc = "* `path` - Path of the file."] #[doc = "* `attributes` - Attributes of the file."] #[doc = "* `fileSize` - Size of the file."] + #[doc = ""] pub fn FSUSER_CreateFile( archive: FS_Archive, path: FS_Path, @@ -8405,6 +8919,7 @@ extern "C" { #[doc = "* `archive` - Archive to create the directory in."] #[doc = "* `path` - Path of the directory."] #[doc = "* `attributes` - Attributes of the directory."] + #[doc = ""] pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result; } extern "C" { @@ -8417,6 +8932,7 @@ extern "C" { #[doc = "* `srcPath` - Path of the source directory."] #[doc = "* `dstArchive` - Archive containing the destination directory."] #[doc = "* `dstPath` - Path of the destination directory."] + #[doc = ""] pub fn FSUSER_RenameDirectory( srcArchive: FS_Archive, srcPath: FS_Path, @@ -8433,6 +8949,7 @@ extern "C" { #[doc = "* `out` - Pointer to output the directory handle to."] #[doc = "* `archive` - Archive containing the directory."] #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { @@ -8444,6 +8961,7 @@ extern "C" { #[doc = "* `archive` - Pointer to output the opened archive to."] #[doc = "* `id` - ID of the archive."] #[doc = "* `path` - Path of the archive."] + #[doc = ""] pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID, path: FS_Path) -> Result; } extern "C" { @@ -8458,6 +8976,7 @@ extern "C" { #[doc = "* `inputSize` - Size of the input."] #[doc = "* `output` - Buffer to write output to."] #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSUSER_ControlArchive( archive: FS_Archive, action: FS_ArchiveAction, @@ -8474,6 +8993,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `archive` - Archive to close."] + #[doc = ""] pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result; } extern "C" { @@ -8484,6 +9004,7 @@ extern "C" { #[doc = ""] #[doc = "* `freeBytes` - Pointer to output the free bytes to."] #[doc = "* `archive` - Archive to check."] + #[doc = ""] pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result; } extern "C" { @@ -8493,6 +9014,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `type` - Pointer to output the card type to."] + #[doc = ""] pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result; } extern "C" { @@ -8502,6 +9024,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSUSER_GetSdmcArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { @@ -8511,6 +9034,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { @@ -8520,6 +9044,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `error` - Pointer to output the error to."] + #[doc = ""] pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result; } extern "C" { @@ -8529,6 +9054,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `detected` - Pointer to output the detection status to."] + #[doc = ""] pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result; } extern "C" { @@ -8538,6 +9064,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `writable` - Pointer to output the writable status to."] + #[doc = ""] pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result; } extern "C" { @@ -8548,6 +9075,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the CID to."] #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] + #[doc = ""] pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { @@ -8558,6 +9086,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the CID to."] #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] + #[doc = ""] pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { @@ -8567,6 +9096,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `speedInfo` - Pointer to output the speed info to."] + #[doc = ""] pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { @@ -8576,6 +9106,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `speedInfo` - Pointer to output the speed info to."] + #[doc = ""] pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { @@ -8586,6 +9117,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the log to."] #[doc = "* `length` - Length of the log buffer."] + #[doc = ""] pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { @@ -8596,6 +9128,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the log to."] #[doc = "* `length` - Length of the log buffer."] + #[doc = ""] pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { @@ -8617,6 +9150,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `inserted` - Pointer to output the insertion status to."] + #[doc = ""] pub fn FSUSER_CardSlotIsInserted(inserted: *mut bool) -> Result; } extern "C" { @@ -8626,6 +9160,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSUSER_CardSlotPowerOn(status: *mut bool) -> Result; } extern "C" { @@ -8635,6 +9170,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSUSER_CardSlotPowerOff(status: *mut bool) -> Result; } extern "C" { @@ -8644,6 +9180,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result; } extern "C" { @@ -8653,6 +9190,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `commandId` - ID of the command."] + #[doc = ""] pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result; } extern "C" { @@ -8663,6 +9201,7 @@ extern "C" { #[doc = ""] #[doc = "* `commandId` - ID of the command."] #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result; } extern "C" { @@ -8674,6 +9213,7 @@ extern "C" { #[doc = "* `commandId` - ID of the command."] #[doc = "* `size` - Size of the output buffer."] #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectRead( commandId: u8_, size: u32_, @@ -8690,6 +9230,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the output buffer."] #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectReadWithAddress( commandId: u8_, address: u32_, @@ -8706,6 +9247,7 @@ extern "C" { #[doc = "* `commandId` - ID of the command."] #[doc = "* `size` - Size of the input buffer."] #[doc = "* `output` - Input buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectWrite( commandId: u8_, size: u32_, @@ -8722,6 +9264,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the input buffer."] #[doc = "* `input` - Input buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectWriteWithAddress( commandId: u8_, address: u32_, @@ -8739,6 +9282,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the output buffer."] #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectRead_4xIO( commandId: u8_, address: u32_, @@ -8755,6 +9299,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the input buffer."] #[doc = "* `output` - Input buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify( address: u32_, size: u32_, @@ -8768,6 +9313,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result; } extern "C" { @@ -8778,6 +9324,7 @@ extern "C" { #[doc = ""] #[doc = "* `info` - Pointer to output the product info to."] #[doc = "* `processId` - ID of the process."] + #[doc = ""] pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result; } extern "C" { @@ -8788,6 +9335,7 @@ extern "C" { #[doc = ""] #[doc = "* `info` - Pointer to output the program launch info to."] #[doc = "* `processId` - ID of the process."] + #[doc = ""] pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result; } extern "C" { @@ -8797,6 +9345,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `baudRate` - Baud rate to set."] + #[doc = ""] pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { @@ -8806,6 +9355,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `busMode` - Bus mode to set."] + #[doc = ""] pub fn FSUSER_SetCardSpiBusMode(busMode: FS_CardSpiBusMode) -> Result; } extern "C" { @@ -8824,6 +9374,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the special content."] #[doc = "* `programId` - Program ID owning the special content."] #[doc = "* `type` - Type of special content."] + #[doc = ""] pub fn FSUSER_GetSpecialContentIndex( index: *mut u16_, mediaType: FS_MediaType, @@ -8840,6 +9391,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the program."] #[doc = "* `programId` - ID of the program."] #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] + #[doc = ""] pub fn FSUSER_GetLegacyRomHeader( mediaType: FS_MediaType, programId: u64_, @@ -8855,6 +9407,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the program."] #[doc = "* `programId` - ID of the program."] #[doc = "* `header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] + #[doc = ""] pub fn FSUSER_GetLegacyBannerData( mediaType: FS_MediaType, programId: u64_, @@ -8871,6 +9424,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the save data."] #[doc = "* `saveId` - ID of the save data."] #[doc = "* `processId` - ID of the process to check."] + #[doc = ""] pub fn FSUSER_CheckAuthorityToAccessExtSaveData( access: *mut bool, mediaType: FS_MediaType, @@ -8889,6 +9443,7 @@ extern "C" { #[doc = "* `files` - Number of files."] #[doc = "* `fileSizeCount` - Number of file sizes to provide."] #[doc = "* `fileSizes` - File sizes to provide."] + #[doc = ""] pub fn FSUSER_QueryTotalQuotaSize( quotaSize: *mut u64_, directories: u32_, @@ -8904,6 +9459,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `accessRight` - Access right to abnegate."] + #[doc = ""] pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result; } extern "C" { @@ -8942,6 +9498,7 @@ extern "C" { #[doc = "* `duplicateData` - Pointer to output whether to duplicate data to."] #[doc = "* `archiveId` - ID of the archive."] #[doc = "* `path` - Path of the archive."] + #[doc = ""] pub fn FSUSER_GetFormatInfo( totalSize: *mut u32_, directories: *mut u32_, @@ -8961,6 +9518,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the program."] #[doc = "* `programId` - ID of the program."] #[doc = "* `header` - Pointer to output the legacy ROM header to."] + #[doc = ""] pub fn FSUSER_GetLegacyRomHeader2( headerSize: u32_, mediaType: FS_MediaType, @@ -8976,6 +9534,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the root path to."] #[doc = "* `length` - Length of the output buffer."] + #[doc = ""] pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result; } extern "C" { @@ -8986,6 +9545,7 @@ extern "C" { #[doc = ""] #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] #[doc = "* `mediaType` - System media type to check."] + #[doc = ""] pub fn FSUSER_GetArchiveResource( archiveResource: *mut FS_ArchiveResource, mediaType: FS_SystemMediaType, @@ -8998,6 +9558,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `seed` - Pointer to output the seed to."] + #[doc = ""] pub fn FSUSER_ExportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; @@ -9009,6 +9570,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `seed` - Seed to import."] + #[doc = ""] pub fn FSUSER_ImportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; @@ -9027,6 +9589,7 @@ extern "C" { #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] #[doc = "* `fileBuckets` - File hash tree bucket count."] #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] + #[doc = ""] pub fn FSUSER_FormatSaveData( archiveId: FS_ArchiveID, path: FS_Path, @@ -9048,6 +9611,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the program."] #[doc = "* `programId` - ID of the program."] #[doc = "* `header` - Pointer to output the legacy sub banner data to."] + #[doc = ""] pub fn FSUSER_GetLegacySubBannerData( bannerSize: u32_, mediaType: FS_MediaType, @@ -9064,6 +9628,7 @@ extern "C" { #[doc = "* `data` - Pointer to the data to be hashed."] #[doc = "* `inputSize` - The size of the data."] #[doc = "* `hash` - Hash output pointer."] + #[doc = ""] pub fn FSUSER_UpdateSha256Context( data: *const ::libc::c_void, inputSize: u32_, @@ -9080,6 +9645,7 @@ extern "C" { #[doc = "* `fileOffset` - Offset of the file."] #[doc = "* `size` - Size of the buffer."] #[doc = "* `data` - Buffer to read to."] + #[doc = ""] pub fn FSUSER_ReadSpecialFile( bytesRead: *mut u32_, fileOffset: u64_, @@ -9094,6 +9660,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `fileSize` - Pointer to output the size to."] + #[doc = ""] pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result; } extern "C" { @@ -9108,6 +9675,7 @@ extern "C" { #[doc = "* `sizeLimit` - Size limit of the save data."] #[doc = "* `smdhSize` - Size of the save data's SMDH data."] #[doc = "* `smdh` - SMDH data."] + #[doc = ""] pub fn FSUSER_CreateExtSaveData( info: FS_ExtSaveDataInfo, directories: u32_, @@ -9124,6 +9692,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSUSER_DeleteExtSaveData(info: FS_ExtSaveDataInfo) -> Result; } extern "C" { @@ -9136,6 +9705,7 @@ extern "C" { #[doc = "* `info` - Info of the save data."] #[doc = "* `smdhSize` - Size of the save data SMDH."] #[doc = "* `smdh` - Pointer to output SMDH data to."] + #[doc = ""] pub fn FSUSER_ReadExtSaveDataIcon( bytesRead: *mut u32_, info: FS_ExtSaveDataInfo, @@ -9153,6 +9723,7 @@ extern "C" { #[doc = "* `freeBlocks` - Pointer to output the free blocks to."] #[doc = "* `blockSize` - Pointer to output the block size to."] #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSUSER_GetExtDataBlockSize( totalBlocks: *mut u64_, freeBlocks: *mut u64_, @@ -9172,6 +9743,7 @@ extern "C" { #[doc = "* `idSize` - Size of each ID element."] #[doc = "* `shared` - Whether to enumerate shared ext save data."] #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSUSER_EnumerateExtSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9195,6 +9767,7 @@ extern "C" { #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] #[doc = "* `fileBuckets` - File hash tree bucket count."] #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] + #[doc = ""] pub fn FSUSER_CreateSystemSaveData( info: FS_SystemSaveDataInfo, totalSize: u32_, @@ -9213,6 +9786,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSUSER_DeleteSystemSaveData(info: FS_SystemSaveDataInfo) -> Result; } extern "C" { @@ -9222,6 +9796,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `context` - Pointer to output the context to."] + #[doc = ""] pub fn FSUSER_StartDeviceMoveAsSource(context: *mut FS_DeviceMoveContext) -> Result; } extern "C" { @@ -9232,6 +9807,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to use."] #[doc = "* `clear` - Whether to clear the device's data first."] + #[doc = ""] pub fn FSUSER_StartDeviceMoveAsDestination( context: FS_DeviceMoveContext, clear: bool, @@ -9245,6 +9821,7 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive to use."] #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result; } extern "C" { @@ -9255,6 +9832,7 @@ extern "C" { #[doc = ""] #[doc = "* `priority` - Pointer to output the priority to."] #[doc = "* `archive` - Archive to use."] + #[doc = ""] pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result; } extern "C" { @@ -9265,6 +9843,7 @@ extern "C" { #[doc = ""] #[doc = "* `latency` - Latency to apply, in milliseconds."] #[doc = "* `emulateEndurance` - Whether to emulate card endurance."] + #[doc = ""] pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result; } extern "C" { @@ -9274,6 +9853,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] + #[doc = ""] pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result; } extern "C" { @@ -9285,6 +9865,7 @@ extern "C" { #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] #[doc = "* `idsSize` - Size of the IDs buffer."] #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSUSER_EnumerateSystemSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9299,6 +9880,7 @@ extern "C" { #[doc = ""] #[doc = "* `session` - The handle of the FSUSER session to initialize."] #[doc = "* `version` - SDK version to initialize with."] + #[doc = ""] pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result; } extern "C" { @@ -9308,6 +9890,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSUSER_SetPriority(priority: u32_) -> Result; } extern "C" { @@ -9317,6 +9900,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = ""] pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result; } extern "C" { @@ -9329,6 +9913,7 @@ extern "C" { #[doc = "* `slot` - Slot of the secure value."] #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] + #[doc = ""] pub fn FSUSER_SetSaveDataSecureValue( value: u64_, slot: FS_SecureValueSlot, @@ -9347,6 +9932,7 @@ extern "C" { #[doc = "* `slot` - Slot of the secure value."] #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] + #[doc = ""] pub fn FSUSER_GetSaveDataSecureValue( exists: *mut bool, value: *mut u64_, @@ -9366,6 +9952,7 @@ extern "C" { #[doc = "* `inputSize` - Size of the input."] #[doc = "* `output` - Buffer to write output to."] #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSUSER_ControlSecureSave( action: FS_SecureSaveAction, input: *mut ::libc::c_void, @@ -9381,6 +9968,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mediaType` - Pointer to output the media type to."] + #[doc = ""] pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result; } extern "C" { @@ -9395,6 +9983,7 @@ extern "C" { #[doc = "* `inputSize` - Size of the input."] #[doc = "* `output` - Buffer to write output to."] #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSFILE_Control( handle: Handle, action: FS_FileAction, @@ -9414,6 +10003,7 @@ extern "C" { #[doc = "* `subFile` - Pointer to output the sub-file to."] #[doc = "* `offset` - Offset of the sub-section."] #[doc = "* `size` - Size of the sub-section."] + #[doc = ""] pub fn FSFILE_OpenSubFile( handle: Handle, subFile: *mut Handle, @@ -9432,6 +10022,7 @@ extern "C" { #[doc = "* `offset` - Offset to read from."] #[doc = "* `buffer` - Buffer to read to."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn FSFILE_Read( handle: Handle, bytesRead: *mut u32_, @@ -9452,6 +10043,7 @@ extern "C" { #[doc = "* `buffer` - Buffer to write from."] #[doc = "* `size` - Size of the buffer."] #[doc = "* `flags` - Flags to use when writing."] + #[doc = ""] pub fn FSFILE_Write( handle: Handle, bytesWritten: *mut u32_, @@ -9469,6 +10061,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the file."] #[doc = "* `size` - Pointer to output the size to."] + #[doc = ""] pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result; } extern "C" { @@ -9479,6 +10072,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the file."] #[doc = "* `size` - Size to set."] + #[doc = ""] pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result; } extern "C" { @@ -9489,6 +10083,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the file."] #[doc = "* `attributes` - Pointer to output the attributes to."] + #[doc = ""] pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result; } extern "C" { @@ -9499,6 +10094,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the file."] #[doc = "* `attributes` - Attributes to set."] + #[doc = ""] pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result; } extern "C" { @@ -9508,6 +10104,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Handle of the file."] + #[doc = ""] pub fn FSFILE_Close(handle: Handle) -> Result; } extern "C" { @@ -9517,6 +10114,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Handle of the file."] + #[doc = ""] pub fn FSFILE_Flush(handle: Handle) -> Result; } extern "C" { @@ -9527,6 +10125,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the file."] #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { @@ -9537,6 +10136,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the file."] #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = ""] pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } extern "C" { @@ -9547,6 +10147,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the file."] #[doc = "* `linkFile` - Pointer to output the link handle to."] + #[doc = ""] pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result; } extern "C" { @@ -9561,6 +10162,7 @@ extern "C" { #[doc = "* `inputSize` - Size of the input."] #[doc = "* `output` - Buffer to write output to."] #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSDIR_Control( handle: Handle, action: FS_DirectoryAction, @@ -9580,6 +10182,7 @@ extern "C" { #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] #[doc = "* `entryCount` - Number of entries to read."] #[doc = "* `entryOut` - Pointer to output directory entries to."] + #[doc = ""] pub fn FSDIR_Read( handle: Handle, entriesRead: *mut u32_, @@ -9594,6 +10197,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Handle of the directory."] + #[doc = ""] pub fn FSDIR_Close(handle: Handle) -> Result; } extern "C" { @@ -9604,6 +10208,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the directory."] #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { @@ -9614,6 +10219,7 @@ extern "C" { #[doc = ""] #[doc = "* `handle` - Handle of the directory."] #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = ""] pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } #[doc = "Contains basic information about a title."] @@ -9675,7 +10281,7 @@ pub struct AM_PendingTitleEntry { #[doc = "Version"] #[doc = ""] pub version: u16_, - #[doc = "@ref AM_InstallStatus"] + #[doc = "[`AM_InstallStatus`]"] #[doc = ""] pub status: u16_, #[doc = "Title Type"] @@ -9732,7 +10338,7 @@ pub struct AM_ContentInfo { #[doc = "Size of the content in the title."] #[doc = ""] pub size: u64_, - #[doc = "@ref AM_ContentInfoFlags"] + #[doc = "[`AM_ContentInfoFlags`]"] #[doc = ""] pub flags: u8_, #[doc = "Padding"] @@ -9781,6 +10387,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediatype` - Media type to get titles from."] #[doc = "* `count` - Pointer to write the title count to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result; } extern "C" { @@ -9793,6 +10400,7 @@ extern "C" { #[doc = "* `mediatype` - Media type to get titles from."] #[doc = "* `titleCount` - Number of title IDs to get."] #[doc = "* `titleIds` - Buffer to output the retrieved title IDs to."] + #[doc = ""] pub fn AM_GetTitleList( titlesRead: *mut u32_, mediatype: FS_MediaType, @@ -9810,6 +10418,7 @@ extern "C" { #[doc = "* `titleCount` - Number of titles to list."] #[doc = "* `titleIds` - List of title IDs to retrieve details for."] #[doc = "* `titleInfo` - Buffer to write AM_TitleEntry's to."] + #[doc = ""] pub fn AM_GetTitleInfo( mediatype: FS_MediaType, titleCount: u32_, @@ -9824,6 +10433,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `count` - Pointer to output the ticket count to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTicketCount(count: *mut u32_) -> Result; } extern "C" { @@ -9836,6 +10446,7 @@ extern "C" { #[doc = "* `ticketCount` - Number of tickets to read."] #[doc = "* `skip` - Number of tickets to skip."] #[doc = "* `ticketIds` - Buffer to output the retrieved ticket IDs to."] + #[doc = ""] pub fn AM_GetTicketList( ticketsRead: *mut u32_, ticketCount: u32_, @@ -9852,6 +10463,7 @@ extern "C" { #[doc = "* `count` - Pointer to output the pending title count to. [Direction: In, Out]"] #[doc = "* `mediatype` - Media type of pending titles to count."] #[doc = "* `statusMask` - Bit mask of status values to include."] + #[doc = ""] pub fn AM_GetPendingTitleCount( count: *mut u32_, mediatype: FS_MediaType, @@ -9869,6 +10481,7 @@ extern "C" { #[doc = "* `mediatype` - Media type of pending titles to list."] #[doc = "* `statusMask` - Bit mask of status values to include."] #[doc = "* `titleIds` - Buffer to output the retrieved pending title IDs to."] + #[doc = ""] pub fn AM_GetPendingTitleList( titlesRead: *mut u32_, titleCount: u32_, @@ -9887,6 +10500,7 @@ extern "C" { #[doc = "* `mediatype` - Media type of pending titles to get information on."] #[doc = "* `titleIds` - IDs of the titles to get information about."] #[doc = "* `titleInfo` - Buffer to output the retrieved pending title info to."] + #[doc = ""] pub fn AM_GetPendingTitleInfo( titleCount: u32_, mediatype: FS_MediaType, @@ -9901,6 +10515,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `deviceID` - Pointer to write the device ID to."] + #[doc = ""] pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result; } extern "C" { @@ -9914,6 +10529,7 @@ extern "C" { #[doc = "* `workbuf` - Work buffer."] #[doc = "* `workbuf_size` - Work buffer size, must be >=0x20000."] #[doc = "* `filepath` - UTF-8 filepath(converted to UTF-16 internally)."] + #[doc = ""] pub fn AM_ExportTwlBackup( titleID: u64_, operation: u8_, @@ -9932,6 +10548,7 @@ extern "C" { #[doc = "* `operation` - DSiWare operation type."] #[doc = "* `buffer` - Work buffer."] #[doc = "* `size` - Buffer size, must be >=0x20000."] + #[doc = ""] pub fn AM_ImportTwlBackup( filehandle: Handle, operation: u8_, @@ -9952,6 +10569,7 @@ extern "C" { #[doc = "* `workbuf_size` - Work buffer size."] #[doc = "* `banner` - Output banner buffer."] #[doc = "* `banner_size` - Output banner buffer size."] + #[doc = ""] pub fn AM_ReadTwlBackupInfo( filehandle: Handle, outinfo: *mut ::libc::c_void, @@ -9969,6 +10587,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTWLPartitionInfo(info: *mut AM_TWLPartitionInfo) -> Result; } extern "C" { @@ -9979,6 +10598,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediatype` - Media type to install the CIA to."] #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_StartCiaInstall(mediatype: FS_MediaType, ciaHandle: *mut Handle) -> Result; } extern "C" { @@ -9988,6 +10608,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_StartDlpChildCiaInstall(ciaHandle: *mut Handle) -> Result; } extern "C" { @@ -9997,6 +10618,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ciaHandle` - CIA handle to cancel."] + #[doc = ""] pub fn AM_CancelCIAInstall(ciaHandle: Handle) -> Result; } extern "C" { @@ -10006,6 +10628,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ciaHandle` - CIA handle to finalize."] + #[doc = ""] pub fn AM_FinishCiaInstall(ciaHandle: Handle) -> Result; } extern "C" { @@ -10015,6 +10638,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ciaHandle` - CIA handle to finalize."] + #[doc = ""] pub fn AM_FinishCiaInstallWithoutCommit(ciaHandle: Handle) -> Result; } extern "C" { @@ -10027,6 +10651,7 @@ extern "C" { #[doc = "* `titleCount` - Number of titles to finalize."] #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] #[doc = "* `titleIds` - Title IDs to finalize."] + #[doc = ""] pub fn AM_CommitImportPrograms( mediaType: FS_MediaType, titleCount: u32_, @@ -10042,6 +10667,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediatype` - Media type to delete from."] #[doc = "* `titleID` - ID of the title to delete."] + #[doc = ""] pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { @@ -10052,6 +10678,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediatype` - Media type to delete from."] #[doc = "* `titleID` - ID of the title to delete."] + #[doc = ""] pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { @@ -10061,6 +10688,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `titleID` - ID of the ticket to delete."] + #[doc = ""] pub fn AM_DeleteTicket(ticketId: u64_) -> Result; } extern "C" { @@ -10071,6 +10699,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediatype` - Media type to delete from."] #[doc = "* `titleId` - ID of the pending title to delete."] + #[doc = ""] pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result; } extern "C" { @@ -10081,6 +10710,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediatype` - Media type to delete from."] #[doc = "* `flags` - Flags used to select pending titles."] + #[doc = ""] pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result; } extern "C" { @@ -10090,6 +10720,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mediatype` - Media type to delete from."] + #[doc = ""] pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result; } extern "C" { @@ -10105,6 +10736,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `titleID` - Title ID of the NATIVE_FIRM to install."] + #[doc = ""] pub fn AM_InstallFirm(titleID: u64_) -> Result; } extern "C" { @@ -10116,6 +10748,7 @@ extern "C" { #[doc = "* `mediatype` - Media type of the title."] #[doc = "* `titleID` - ID of the title."] #[doc = "* `productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTitleProductCode( mediatype: FS_MediaType, titleId: u64_, @@ -10131,6 +10764,7 @@ extern "C" { #[doc = "* `extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] #[doc = "* `mediatype` - Media type of the title."] #[doc = "* `titleID` - ID of the title."] + #[doc = ""] pub fn AM_GetTitleExtDataId( extDataId: *mut u64_, mediatype: FS_MediaType, @@ -10146,6 +10780,7 @@ extern "C" { #[doc = "* `mediatype` - Media type that this CIA would be installed to."] #[doc = "* `titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaFileInfo( mediatype: FS_MediaType, titleEntry: *mut AM_TitleEntry, @@ -10160,6 +10795,7 @@ extern "C" { #[doc = ""] #[doc = "* `icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result; } extern "C" { @@ -10170,6 +10806,7 @@ extern "C" { #[doc = ""] #[doc = "* `dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { @@ -10180,6 +10817,7 @@ extern "C" { #[doc = ""] #[doc = "* `metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { @@ -10190,6 +10828,7 @@ extern "C" { #[doc = ""] #[doc = "* `coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result; } extern "C" { @@ -10201,6 +10840,7 @@ extern "C" { #[doc = "* `requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] #[doc = "* `mediaType` - Media type to check free space needed to install to."] #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaRequiredSpace( requiredSpace: *mut u64_, mediaType: FS_MediaType, @@ -10216,6 +10856,7 @@ extern "C" { #[doc = "* `meta` - Buffer to store the meta section in."] #[doc = "* `size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaMetaSection( meta: *mut ::libc::c_void, size: u32_, @@ -10229,6 +10870,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `overwrite` - Overwrites the database if it already exists."] + #[doc = ""] pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result; } extern "C" { @@ -10238,6 +10880,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `available` - Pointer to output the availability status to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_QueryAvailableExternalTitleDatabase(available: *mut bool) -> Result; } extern "C" { @@ -10247,6 +10890,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_InstallTicketBegin(ticketHandle: *mut Handle) -> Result; } extern "C" { @@ -10256,6 +10900,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ticketHandle` - Handle of the installation to abort."] + #[doc = ""] pub fn AM_InstallTicketAbort(ticketHandle: Handle) -> Result; } extern "C" { @@ -10265,6 +10910,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ticketHandle` - Handle of the installation to finalize."] + #[doc = ""] pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result; } extern "C" { @@ -10276,6 +10922,7 @@ extern "C" { #[doc = "* `mediaType` - Destination to install to."] #[doc = "* `titleId` - ID of the title to install."] #[doc = "* `unk` - Unknown. (usually false)"] + #[doc = ""] pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result; } extern "C" { @@ -10292,6 +10939,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediaType` - Destination to install to."] #[doc = "* `titleId` - ID of the title to install."] + #[doc = ""] pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result; } extern "C" { @@ -10316,6 +10964,7 @@ extern "C" { #[doc = "* `titleCount` - Number of titles to finalize."] #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] #[doc = "* `titleIds` - Title IDs to finalize."] + #[doc = ""] pub fn AM_CommitImportTitles( mediaType: FS_MediaType, titleCount: u32_, @@ -10330,6 +10979,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_InstallTmdBegin(tmdHandle: *mut Handle) -> Result; } extern "C" { @@ -10339,6 +10989,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `tmdHandle` - Handle of the installation to abort."] + #[doc = ""] pub fn AM_InstallTmdAbort(tmdHandle: Handle) -> Result; } extern "C" { @@ -10349,6 +11000,7 @@ extern "C" { #[doc = ""] #[doc = "* `tmdHandle` - Handle of the installation to finalize."] #[doc = "* `unk` - Unknown. (usually true)"] + #[doc = ""] pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result; } extern "C" { @@ -10359,6 +11011,7 @@ extern "C" { #[doc = ""] #[doc = "* `contentCount` - Number of contents to be imported."] #[doc = "* `contentIndices` - Indices of the contents to be imported."] + #[doc = ""] pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result; } extern "C" { @@ -10369,6 +11022,7 @@ extern "C" { #[doc = ""] #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] #[doc = "* `index` - Index of the content to install."] + #[doc = ""] pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result; } extern "C" { @@ -10378,6 +11032,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `contentHandle` - Handle of the installation to abort."] + #[doc = ""] pub fn AM_InstallContentStop(contentHandle: Handle) -> Result; } extern "C" { @@ -10389,6 +11044,7 @@ extern "C" { #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] #[doc = "* `resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] #[doc = "* `index` - Index of the content to install."] + #[doc = ""] pub fn AM_InstallContentResume( contentHandle: *mut Handle, resumeOffset: *mut u64_, @@ -10402,6 +11058,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `contentHandle` - Handle of the installation to finalize."] + #[doc = ""] pub fn AM_InstallContentCancel(contentHandle: Handle) -> Result; } extern "C" { @@ -10411,6 +11068,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `contentHandle` - Handle of the installation to finalize."] + #[doc = ""] pub fn AM_InstallContentFinish(contentHandle: Handle) -> Result; } extern "C" { @@ -10427,6 +11085,7 @@ extern "C" { #[doc = "* `cert3` - Data of the third certificate."] #[doc = "* `cert4Size` - Size of the fourth certificate."] #[doc = "* `cert4` - Data of the fourth certificate."] + #[doc = ""] pub fn AM_ImportCertificates( cert1Size: u32_, cert1: *mut ::libc::c_void, @@ -10446,6 +11105,7 @@ extern "C" { #[doc = ""] #[doc = "* `certSize` - Size of the certificate."] #[doc = "* `cert` - Data of the certificate."] + #[doc = ""] pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result; } extern "C" { @@ -10458,6 +11118,7 @@ extern "C" { #[doc = "* `titleCount` - Number of titles to finalize."] #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] #[doc = "* `titleIds` - Title IDs to finalize."] + #[doc = ""] pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto( mediaType: FS_MediaType, titleCount: u32_, @@ -10484,6 +11145,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mediatype` - Media type to delete from."] + #[doc = ""] pub fn AM_DeleteAllExpiredTitles(mediatype: FS_MediaType) -> Result; } extern "C" { @@ -10501,6 +11163,7 @@ extern "C" { #[doc = "* `count` - Pointer to output the number of content indices to. [Direction: In, Out]"] #[doc = "* `mediatype` - Media type of the title."] #[doc = "* `titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] + #[doc = ""] pub fn AMAPP_GetDLCContentInfoCount( count: *mut u32_, mediatype: FS_MediaType, @@ -10519,6 +11182,7 @@ extern "C" { #[doc = "* `contentInfoCount` - Number of content infos to retrieve."] #[doc = "* `offset` - Offset from the first content index the count starts at."] #[doc = "* `contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] + #[doc = ""] pub fn AMAPP_ListDLCContentInfos( contentInfoRead: *mut u32_, mediatype: FS_MediaType, @@ -10535,6 +11199,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] + #[doc = ""] pub fn ampxiInit(servhandle: Handle) -> Result; } extern "C" { @@ -10544,7 +11209,7 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes a TWL save-file to NAND. https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] + #[doc = "Writes a TWL save-file to NAND. "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -10552,8 +11217,9 @@ extern "C" { #[doc = "* `buffer` - Savedata buffer ptr."] #[doc = "* `size` - Size of the savedata buffer."] #[doc = "* `image_filepos` - Filepos to use for writing the data to the NAND savedata file."] - #[doc = "* `section_type` - https://www.3dbrew.org/wiki/AMPXI:WriteTWLSavedata"] - #[doc = "* `operation` - https://3dbrew.org/wiki/AM:ImportDSiWare"] + #[doc = "* `section_type` - "] + #[doc = "* `operation` - "] + #[doc = ""] pub fn AMPXI_WriteTWLSavedata( titleid: u64_, buffer: *mut u8_, @@ -10565,7 +11231,7 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Finalizes title installation. https://3dbrew.org/wiki/AMPXI:InstallTitlesFinish"] + #[doc = "Finalizes title installation. "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -10574,6 +11240,7 @@ extern "C" { #[doc = "* `size` - Size of the savedata buffer."] #[doc = "* `titlecount` - Total titles."] #[doc = "* `tidlist` - List of titleIDs."] + #[doc = ""] pub fn AMPXI_InstallTitlesFinish( mediaType: FS_MediaType, db: u8_, @@ -10664,8 +11331,7 @@ pub const APPID_EXTRAPAD: NS_APPID = 1032; pub const APPID_MEMOLIB: NS_APPID = 1033; #[doc = "NS Application IDs."] #[doc = ""] -#[doc = ""] -#[doc = "Retrieved from http://3dbrew.org/wiki/NS_and_APT_Services#AppIDs"] +#[doc = "Retrieved from "] #[doc = ""] pub type NS_APPID = ::libc::c_uint; @@ -10940,6 +11606,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] + #[doc = ""] pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result; } extern "C" { @@ -10983,7 +11650,7 @@ extern "C" { pub fn aptShouldJumpToHome() -> bool; } extern "C" { - #[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by \\ref aptSetHomeAllowed (use this to show a \"no HOME allowed\" icon)."] + #[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by [`aptSetHomeAllowed`] (use this to show a \"no HOME allowed\" icon)."] #[doc = ""] pub fn aptCheckHomePressRejected() -> bool; } @@ -10995,7 +11662,9 @@ extern "C" { extern "C" { #[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] #[doc = ""] - #[doc = "Returns: True if the application should keep running, false otherwise (see \\ref aptShouldClose)."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if the application should keep running, false otherwise (see [`aptShouldClose)`]"] #[doc = ""] pub fn aptMainLoop() -> bool; } @@ -11007,6 +11676,7 @@ extern "C" { #[doc = "* `cookie` - Hook cookie to use."] #[doc = "* `callback` - Function to call when APT's status changes."] #[doc = "* `param` - User-defined parameter to pass to the callback."] + #[doc = ""] pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut ::libc::c_void); } extern "C" { @@ -11015,6 +11685,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cookie` - Hook cookie to remove."] + #[doc = ""] pub fn aptUnhook(cookie: *mut aptHookCookie); } extern "C" { @@ -11024,6 +11695,7 @@ extern "C" { #[doc = ""] #[doc = "* `callback` - Callback function."] #[doc = "* `user` - User-defined data to be passed to the callback."] + #[doc = ""] pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut ::libc::c_void); } extern "C" { @@ -11035,6 +11707,7 @@ extern "C" { #[doc = "* `buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] #[doc = "* `bufsize` - Size of the buffer."] #[doc = "* `handle` - Handle to pass to the library applet."] + #[doc = ""] pub fn aptLaunchLibraryApplet( appId: NS_APPID, buf: *mut ::libc::c_void, @@ -11054,6 +11727,7 @@ extern "C" { #[doc = ""] #[doc = "* `programID` - ID of the program to chainload to."] #[doc = "* `mediatype` - Media type of the program to chainload to."] + #[doc = ""] pub fn aptSetChainloader(programID: u64_, mediatype: u8_); } extern "C" { @@ -11069,6 +11743,7 @@ extern "C" { #[doc = ""] #[doc = "* `flags` - Flags to use."] #[doc = "* `lockHandle` - Pointer to output the lock handle to."] + #[doc = ""] pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result; } extern "C" { @@ -11081,6 +11756,7 @@ extern "C" { #[doc = "* `attr` - Attributes of the application."] #[doc = "* `signalEvent` - Pointer to output the signal event handle to."] #[doc = "* `resumeEvent` - Pointer to output the resume event handle to."] + #[doc = ""] pub fn APT_Initialize( appId: NS_APPID, attr: APT_AppletAttr, @@ -11095,6 +11771,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `appID` - ID of the application."] + #[doc = ""] pub fn APT_Finalize(appId: NS_APPID) -> Result; } extern "C" { @@ -11110,6 +11787,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `attr` - Attributes of the application."] + #[doc = ""] pub fn APT_Enable(attr: APT_AppletAttr) -> Result; } extern "C" { @@ -11123,6 +11801,7 @@ extern "C" { #[doc = "* `req_appid` - Pointer to output the AppID of the applet at the requested position to."] #[doc = "* `menu_appid` - Pointer to output the HOME menu AppID to."] #[doc = "* `active_appid` - Pointer to output the AppID of the currently active applet to."] + #[doc = ""] pub fn APT_GetAppletManInfo( inpos: APT_AppletPos, outpos: *mut APT_AppletPos, @@ -11143,6 +11822,7 @@ extern "C" { #[doc = "* `pRegistered` - Pointer to output the registration status to."] #[doc = "* `pLoadState` - Pointer to output the load state to."] #[doc = "* `pAttributes` - Pointer to output the applet atrributes to."] + #[doc = ""] pub fn APT_GetAppletInfo( appID: NS_APPID, pProgramID: *mut u64_, @@ -11156,7 +11836,6 @@ extern "C" { #[must_use] #[doc = "Gets an applet's program information."] #[doc = ""] - #[doc = ""] #[doc = "Flags:"] #[doc = "- 0x01: Use AM_ListTitles with NAND media type."] #[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] @@ -11170,6 +11849,7 @@ extern "C" { #[doc = "* `id` - ID of the applet."] #[doc = "* `flags` - Flags to use when retreiving the information."] #[doc = "* `titleversion` - Pointer to output the applet's title version to."] + #[doc = ""] pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result; } extern "C" { @@ -11179,6 +11859,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `pProgramID` - Pointer to output the program ID to."] + #[doc = ""] pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result; } extern "C" { @@ -11196,6 +11877,7 @@ extern "C" { #[doc = "* `param` - Parameters to jump with."] #[doc = "* `Size` - of the parameter buffer."] #[doc = "* `handle` - Handle to pass."] + #[doc = ""] pub fn APT_JumpToHomeMenu( param: *const ::libc::c_void, paramSize: size_t, @@ -11209,6 +11891,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `exiting` - Specifies whether the applet is exiting."] + #[doc = ""] pub fn APT_PrepareToJumpToApplication(exiting: bool) -> Result; } extern "C" { @@ -11220,6 +11903,7 @@ extern "C" { #[doc = "* `param` - Parameters to jump with."] #[doc = "* `Size` - of the parameter buffer."] #[doc = "* `handle` - Handle to pass."] + #[doc = ""] pub fn APT_JumpToApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -11234,6 +11918,7 @@ extern "C" { #[doc = ""] #[doc = "* `appID` - ID of the application."] #[doc = "* `out` - Pointer to output the registration state to."] + #[doc = ""] pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result; } extern "C" { @@ -11244,6 +11929,7 @@ extern "C" { #[doc = ""] #[doc = "* `appID` - ID of the application."] #[doc = "* `signalType` - Pointer to output the signal type to."] + #[doc = ""] pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result; } extern "C" { @@ -11255,6 +11941,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] + #[doc = ""] pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result; } extern "C" { @@ -11264,6 +11951,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `appID` - ID of the application."] + #[doc = ""] pub fn APT_NotifyToWait(appID: NS_APPID) -> Result; } extern "C" { @@ -11277,6 +11965,7 @@ extern "C" { #[doc = "* `outSize` - Size of the output buffer."] #[doc = "* `in` - Pointer to the input data."] #[doc = "* `inSize` - Size of the input buffer."] + #[doc = ""] pub fn APT_AppletUtility( id: ::libc::c_int, out: *mut ::libc::c_void, @@ -11299,6 +11988,7 @@ extern "C" { #[doc = ""] #[doc = "* `transition` - Transition ID."] #[doc = "* `flag` - Flag (?)"] + #[doc = ""] pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result; } extern "C" { @@ -11309,6 +11999,7 @@ extern "C" { #[doc = ""] #[doc = "* `transition` - Transition ID."] #[doc = "* `succeeded` - Pointer to output whether the lock was successfully applied."] + #[doc = ""] pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result; } extern "C" { @@ -11318,6 +12009,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `transition` - Transition ID."] + #[doc = ""] pub fn APT_UnlockTransition(transition: u32_) -> Result; } extern "C" { @@ -11333,6 +12025,7 @@ extern "C" { #[doc = "* `command` - Pointer to output the command ID to."] #[doc = "* `actualSize` - Pointer to output the actual received data size to."] #[doc = "* `parameter` - Pointer to output the parameter handle to."] + #[doc = ""] pub fn APT_GlanceParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -11356,6 +12049,7 @@ extern "C" { #[doc = "* `command` - Pointer to output the command ID to."] #[doc = "* `actualSize` - Pointer to output the actual received data size to."] #[doc = "* `parameter` - Pointer to output the parameter handle to."] + #[doc = ""] pub fn APT_ReceiveParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -11378,6 +12072,7 @@ extern "C" { #[doc = "* `buffer` - Buffer to send."] #[doc = "* `bufferSize` - Size of the buffer."] #[doc = "* `parameter` - Parameter handle to pass."] + #[doc = ""] pub fn APT_SendParameter( source: NS_APPID, dest: NS_APPID, @@ -11396,6 +12091,7 @@ extern "C" { #[doc = "* `source` - AppID of the source application (use APPID_NONE to disable the check)."] #[doc = "* `dest` - AppID of the destination application (use APPID_NONE to disable the check)."] #[doc = "* `success` - Pointer to output true if a parameter was cancelled, or false otherwise."] + #[doc = ""] pub fn APT_CancelParameter(source: NS_APPID, dest: NS_APPID, success: *mut bool) -> Result; } extern "C" { @@ -11405,6 +12101,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `captureBuf` - Capture buffer information to send."] + #[doc = ""] pub fn APT_SendCaptureBufferInfo(captureBuf: *const aptCaptureBufInfo) -> Result; } extern "C" { @@ -11415,6 +12112,7 @@ extern "C" { #[doc = ""] #[doc = "* `appID` - ID of the application."] #[doc = "* `reply` - Query reply value."] + #[doc = ""] pub fn APT_ReplySleepQuery(appID: NS_APPID, reply: APT_QueryReply) -> Result; } extern "C" { @@ -11424,6 +12122,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `appID` - ID of the application."] + #[doc = ""] pub fn APT_ReplySleepNotificationComplete(appID: NS_APPID) -> Result; } extern "C" { @@ -11433,6 +12132,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cancelPreload` - Whether applet preloads should be cancelled."] + #[doc = ""] pub fn APT_PrepareToCloseApplication(cancelPreload: bool) -> Result; } extern "C" { @@ -11444,6 +12144,7 @@ extern "C" { #[doc = "* `param` - Parameters to close with."] #[doc = "* `paramSize` - Size of param."] #[doc = "* `handle` - Handle to pass."] + #[doc = ""] pub fn APT_CloseApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -11457,6 +12158,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `percent` - CPU time limit percentage to set."] + #[doc = ""] pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result; } extern "C" { @@ -11466,6 +12168,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `percent` - Pointer to output the CPU time limit percentage to."] + #[doc = ""] pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result; } extern "C" { @@ -11475,6 +12178,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the New 3DS flag to."] + #[doc = ""] pub fn APT_CheckNew3DS(out: *mut bool) -> Result; } extern "C" { @@ -11486,6 +12190,7 @@ extern "C" { #[doc = "* `flags` - Flags to use."] #[doc = "* `programID` - ID of the program to jump to."] #[doc = "* `mediatype` - Media type of the program to jump to."] + #[doc = ""] pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result; } extern "C" { @@ -11497,6 +12202,7 @@ extern "C" { #[doc = "* `param` - Parameter buffer."] #[doc = "* `paramSize` - Size of parameter buffer."] #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] + #[doc = ""] pub fn APT_DoApplicationJump( param: *const ::libc::c_void, paramSize: size_t, @@ -11510,6 +12216,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `appID` - AppID of the applet to start."] + #[doc = ""] pub fn APT_PrepareToStartLibraryApplet(appID: NS_APPID) -> Result; } extern "C" { @@ -11522,6 +12229,7 @@ extern "C" { #[doc = "* `param` - Buffer containing applet parameters."] #[doc = "* `paramsize` - Size of the buffer."] #[doc = "* `handle` - Handle to pass to the applet."] + #[doc = ""] pub fn APT_StartLibraryApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -11536,6 +12244,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `appID` - AppID of the applet to start."] + #[doc = ""] pub fn APT_PrepareToStartSystemApplet(appID: NS_APPID) -> Result; } extern "C" { @@ -11548,6 +12257,7 @@ extern "C" { #[doc = "* `param` - Buffer containing applet parameters."] #[doc = "* `paramSize` - Size of the parameter buffer."] #[doc = "* `handle` - Handle to pass to the applet."] + #[doc = ""] pub fn APT_StartSystemApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -11572,6 +12282,7 @@ extern "C" { #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] #[doc = "* `sender` - Pointer to output the sender's AppID to."] #[doc = "* `received` - Pointer to output whether an argument was received to."] + #[doc = ""] pub fn APT_ReceiveDeliverArg( param: *const ::libc::c_void, paramSize: size_t, @@ -11637,6 +12348,7 @@ extern "C" { #[doc = ""] #[doc = "* `programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] #[doc = "* `force_user` - When true, just use bossU instead of trying to initialize with bossP first."] + #[doc = ""] pub fn bossInit(programID: u64_, force_user: bool) -> Result; } extern "C" { @@ -11646,6 +12358,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `programID` - programID to use, 0 for the current process."] + #[doc = ""] pub fn bossReinit(programID: u64_) -> Result; } extern "C" { @@ -11667,6 +12380,7 @@ extern "C" { #[doc = "* `extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] #[doc = "* `boss_size` - Probably the max size in the extdata which BOSS can use."] #[doc = "* `mediaType` - Roughly the same as FS mediatype."] + #[doc = ""] pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result; } extern "C" { @@ -11684,6 +12398,7 @@ extern "C" { #[doc = "* `taskID` - BOSS taskID."] #[doc = "* `unk0` - Unknown, usually zero."] #[doc = "* `unk1` - Unknown, usually zero."] + #[doc = ""] pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result; } extern "C" { @@ -11695,6 +12410,7 @@ extern "C" { #[doc = "* `PropertyID` - PropertyID"] #[doc = "* `buf` - Input buffer data."] #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -11704,6 +12420,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `NsDataId` - NsDataId"] + #[doc = ""] pub fn bossDeleteNsData(NsDataId: u32_) -> Result; } extern "C" { @@ -11716,6 +12433,7 @@ extern "C" { #[doc = "* `type` - Type of data to load."] #[doc = "* `buffer` - Output buffer."] #[doc = "* `size` - Output buffer size."] + #[doc = ""] pub fn bossGetNsDataHeaderInfo( NsDataId: u32_, type_: u8_, @@ -11735,6 +12453,7 @@ extern "C" { #[doc = "* `size` - Output buffer size."] #[doc = "* `transfer_total` - Optional output actual read size, can be NULL."] #[doc = "* `unk_out` - Optional unknown output, can be NULL."] + #[doc = ""] pub fn bossReadNsData( NsDataId: u32_, offset: u64_, @@ -11751,6 +12470,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `taskID` - BOSS taskID."] + #[doc = ""] pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { @@ -11760,6 +12480,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `taskID` - BOSS taskID."] + #[doc = ""] pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { @@ -11770,6 +12491,7 @@ extern "C" { #[doc = ""] #[doc = "* `taskID` - BOSS taskID."] #[doc = "* `unk` - Unknown, usually zero?"] + #[doc = ""] pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result; } extern "C" { @@ -11783,6 +12505,7 @@ extern "C" { #[doc = "* `status` - Output status, see bossTaskStatus."] #[doc = "* `out1` - Output field."] #[doc = "* `out2` - Output field."] + #[doc = ""] pub fn bossGetTaskState( taskID: *const ::libc::c_char, inval: s8, @@ -11798,6 +12521,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `taskID` - BOSS taskID."] + #[doc = ""] pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result; } extern "C" { @@ -11808,6 +12532,7 @@ extern "C" { #[doc = "* `bossContext` - BOSS context."] #[doc = "* `seconds_interval` - Interval in seconds for running the task automatically."] #[doc = "* `url` - Task URL."] + #[doc = ""] pub fn bossSetupContextDefault( ctx: *mut bossContext, seconds_interval: u32_, @@ -11821,6 +12546,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `bossContext` - BOSS context."] + #[doc = ""] pub fn bossSendContextConfig(ctx: *mut bossContext) -> Result; } #[doc = "8-bit per component, planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P."] @@ -11845,12 +12571,11 @@ pub const INPUT_YUV420_INDIV_16: Y2RU_InputFormat = 3; pub const INPUT_YUV422_BATCH: Y2RU_InputFormat = 4; #[doc = "Input color formats"] #[doc = ""] -#[doc = ""] #[doc = "For the 16-bit per component formats, bits 15-8 are padding and 7-0 contains the value."] #[doc = ""] pub type Y2RU_InputFormat = ::libc::c_uint; -#[doc = "32-bit RGBA8888. The alpha component is the 8-bit value set by @ref Y2RU_SetAlpha"] +#[doc = "32-bit RGBA8888. The alpha component is the 8-bit value set by [`Y2RU_SetAlpha`]"] #[doc = ""] pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0; @@ -11858,7 +12583,7 @@ pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0; #[doc = ""] pub const OUTPUT_RGB_24: Y2RU_OutputFormat = 1; -#[doc = "16-bit RGBA5551. The alpha bit is the 7th bit of the alpha value set by @ref Y2RU_SetAlpha"] +#[doc = "16-bit RGBA5551. The alpha bit is the 7th bit of the alpha value set by [`Y2RU_SetAlpha`]"] #[doc = ""] pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2; @@ -11868,7 +12593,6 @@ pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2; pub const OUTPUT_RGB_16_565: Y2RU_OutputFormat = 3; #[doc = "Output color formats"] #[doc = ""] -#[doc = ""] #[doc = "Those are the same as the framebuffer and GPU texture formats."] #[doc = ""] @@ -11903,22 +12627,22 @@ pub const BLOCK_LINE: Y2RU_BlockAlignment = 0; pub const BLOCK_8_BY_8: Y2RU_BlockAlignment = 1; #[doc = "Block alignment of output"] #[doc = ""] -#[doc = ""] #[doc = "Defines the way the output will be laid out in memory."] #[doc = ""] pub type Y2RU_BlockAlignment = ::libc::c_uint; #[doc = "Coefficients of the YUV->RGB conversion formula."] #[doc = ""] -#[doc = ""] #[doc = "A set of coefficients configuring the RGB to YUV conversion. Coefficients 0-4 are unsigned 2.8"] #[doc = "fixed pointer numbers representing entries on the conversion matrix, while coefficient 5-7 are"] #[doc = "signed 11.5 fixed point numbers added as offsets to the RGB result."] -#[doc = ""] #[doc = "The overall conversion process formula is:"] -#[doc = "R = trunc((rgb_Y * Y + r_V * V) + 0.75 + r_offset)"] +#[doc = "```"] +#[doc = ""] +#[doc = "R = trunc((rgb_Y * Y + r_V * V) + 0.75 + r_offset)"] #[doc = "G = trunc((rgb_Y * Y - g_U * U - g_V * V) + 0.75 + g_offset)"] -#[doc = "B = trunc((rgb_Y * Y + b_U * U ) + 0.75 + b_offset)"] +#[doc = "B = trunc((rgb_Y * Y + b_U * U ) + 0.75 + b_offset)"] +#[doc = "```"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -11966,15 +12690,13 @@ pub const COEFFICIENT_ITU_R_BT_601_SCALING: Y2RU_StandardCoefficient = 2; pub const COEFFICIENT_ITU_R_BT_709_SCALING: Y2RU_StandardCoefficient = 3; #[doc = "Preset conversion coefficients based on ITU standards for the YUV->RGB formula."] #[doc = ""] -#[doc = ""] -#[doc = "For more details refer to @ref Y2RU_ColorCoefficients"] +#[doc = "For more details refer to [`Y2RU_ColorCoefficients`]"] #[doc = ""] pub type Y2RU_StandardCoefficient = ::libc::c_uint; #[doc = "Structure used to configure all parameters at once."] #[doc = ""] -#[doc = ""] -#[doc = "You can send a batch of configuration parameters using this structure and @ref Y2RU_SetConversionParams."] +#[doc = "You can send a batch of configuration parameters using this structure and [`Y2RU_SetConversionParams`]"] #[doc = ""] #[repr(C)] #[repr(align(4))] @@ -11982,10 +12704,10 @@ pub type Y2RU_StandardCoefficient = ::libc::c_uint; pub struct Y2RU_ConversionParams { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - #[doc = "Value passed to @ref Y2RU_SetInputLineWidth"] + #[doc = "Value passed to [`Y2RU_SetInputLineWidth`]"] #[doc = ""] pub input_line_width: s16, - #[doc = "Value passed to @ref Y2RU_SetInputLines"] + #[doc = "Value passed to [`Y2RU_SetInputLines`]"] #[doc = ""] pub input_lines: s16, pub _bitfield_align_2: [u8; 0], @@ -11993,7 +12715,7 @@ pub struct Y2RU_ConversionParams { #[doc = "Unused."] #[doc = ""] pub unused: u8_, - #[doc = "Value passed to @ref Y2RU_SetAlpha"] + #[doc = "Value passed to [`Y2RU_SetAlpha`]"] #[doc = ""] pub alpha: u16_, } @@ -12158,7 +12880,6 @@ extern "C" { #[must_use] #[doc = "Initializes the y2r service."] #[doc = ""] - #[doc = ""] #[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] #[doc = ""] pub fn y2rInit() -> Result; @@ -12166,7 +12887,6 @@ extern "C" { extern "C" { #[doc = "Closes the y2r service."] #[doc = ""] - #[doc = ""] #[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] #[doc = ""] pub fn y2rExit(); @@ -12175,11 +12895,14 @@ extern "C" { #[must_use] #[doc = "Used to configure the input format."] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `format` - Input format to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetInputFormat(format: Y2RU_InputFormat) -> Result; } extern "C" { @@ -12189,17 +12912,21 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `format` - Pointer to output the input format to."] + #[doc = ""] pub fn Y2RU_GetInputFormat(format: *mut Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] #[doc = "Used to configure the output format."] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `format` - Output format to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetOutputFormat(format: Y2RU_OutputFormat) -> Result; } extern "C" { @@ -12209,19 +12936,23 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `format` - Pointer to output the output format to."] + #[doc = ""] pub fn Y2RU_GetOutputFormat(format: *mut Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] #[doc = "Used to configure the rotation of the output."] #[doc = ""] - #[doc = ""] #[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `rotation` - Rotation to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetRotation(rotation: Y2RU_Rotation) -> Result; } extern "C" { @@ -12231,17 +12962,21 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `rotation` - Pointer to output the rotation to."] + #[doc = ""] pub fn Y2RU_GetRotation(rotation: *mut Y2RU_Rotation) -> Result; } extern "C" { #[must_use] #[doc = "Used to configure the alignment of the output buffer."] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `alignment` - Alignment to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetBlockAlignment(alignment: Y2RU_BlockAlignment) -> Result; } extern "C" { @@ -12251,6 +12986,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `alignment` - Pointer to output the alignment to."] + #[doc = ""] pub fn Y2RU_GetBlockAlignment(alignment: *mut Y2RU_BlockAlignment) -> Result; } extern "C" { @@ -12260,6 +12996,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Whether to use spacial dithering."] + #[doc = ""] pub fn Y2RU_SetSpacialDithering(enable: bool) -> Result; } extern "C" { @@ -12269,6 +13006,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Pointer to output the spacial dithering state to."] + #[doc = ""] pub fn Y2RU_GetSpacialDithering(enabled: *mut bool) -> Result; } extern "C" { @@ -12278,6 +13016,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Whether to use temporal dithering."] + #[doc = ""] pub fn Y2RU_SetTemporalDithering(enable: bool) -> Result; } extern "C" { @@ -12287,17 +13026,21 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Pointer to output the temporal dithering state to."] + #[doc = ""] pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Used to configure the width of the image."] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result; } extern "C" { @@ -12307,20 +13050,24 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `line_width` - Pointer to output the line width to."] + #[doc = ""] pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result; } extern "C" { #[must_use] #[doc = "Used to configure the height of the image."] #[doc = ""] - #[doc = ""] #[doc = "A multiple of 8 seems to be preferred."] - #[doc = "If using the @ref BLOCK_8_BY_8 mode, it must be a multiple of 8."] - #[doc = ""] + #[doc = "If using the [`BLOCK_8_BY_8`] mode, it must be a multiple of 8."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `num_lines` - Number of lines to be converted."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result; } extern "C" { @@ -12330,19 +13077,23 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `num_lines` - Pointer to output the input lines to."] + #[doc = ""] pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result; } extern "C" { #[must_use] #[doc = "Used to configure the color conversion formula."] #[doc = ""] - #[doc = ""] - #[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] - #[doc = ""] + #[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `coefficients` - Coefficients to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result; } extern "C" { @@ -12352,19 +13103,23 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `num_lines` - Pointer to output the coefficients to."] + #[doc = ""] pub fn Y2RU_GetCoefficients(coefficients: *mut Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] #[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] #[doc = ""] - #[doc = ""] - #[doc = "See @ref Y2RU_ColorCoefficients for more information about the coefficients."] - #[doc = ""] + #[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `coefficient` - Standard coefficient to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetStandardCoefficient(coefficient: Y2RU_StandardCoefficient) -> Result; } extern "C" { @@ -12375,6 +13130,7 @@ extern "C" { #[doc = ""] #[doc = "* `coefficients` - Pointer to output the coefficients to."] #[doc = "* `standardCoeff` - Standard coefficient to check."] + #[doc = ""] pub fn Y2RU_GetStandardCoefficient( coefficients: *mut Y2RU_ColorCoefficients, standardCoeff: Y2RU_StandardCoefficient, @@ -12384,11 +13140,14 @@ extern "C" { #[must_use] #[doc = "Used to configure the alpha value of the output."] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `alpha` - 8-bit value to be used for the output when the format requires it."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetAlpha(alpha: u16_) -> Result; } extern "C" { @@ -12398,21 +13157,25 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `alpha` - Pointer to output the alpha value to."] + #[doc = ""] pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result; } extern "C" { #[must_use] #[doc = "Used to enable the end of conversion interrupt."] #[doc = ""] - #[doc = ""] #[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] - #[doc = "This interrupt will then be used to fire an event. See @ref Y2RU_GetTransferEndEvent."] + #[doc = "This interrupt will then be used to fire an event. See [`Y2RU_GetTransferEndEvent`]"] #[doc = "By default the interrupt is enabled."] #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `should_interrupt` - Enables the interrupt if true, disable it if false."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* It seems that the event can be fired too soon in some cases, depending the transfer_unit size.\\n Please see the note at [`Y2RU_SetReceiving`]"] + #[doc = ""] pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result; } extern "C" { @@ -12422,30 +13185,37 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `should_interrupt` - Pointer to output the interrupt state to."] + #[doc = ""] pub fn Y2RU_GetTransferEndInterrupt(should_interrupt: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Gets an handle to the end of conversion event."] #[doc = ""] - #[doc = ""] - #[doc = "To enable this event you have to use @code{C} Y2RU_SetTransferEndInterrupt(true);@endcode"] + #[doc = "To enable this event you have to use ```"] + #[doc = "```"] #[doc = "The event will be triggered when the corresponding interrupt is fired."] #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."] + #[doc = ""] pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result; } extern "C" { #[must_use] #[doc = "Configures the Y plane buffer."] #[doc = ""] + #[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] #[doc = ""] + #[doc = "**Warning!**"] #[doc = ""] - #[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -12453,6 +13223,7 @@ extern "C" { #[doc = "* `image_size` - The total size of the data buffer."] #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingY( src_buf: *const ::libc::c_void, image_size: u32_, @@ -12464,10 +13235,12 @@ extern "C" { #[must_use] #[doc = "Configures the U plane buffer."] #[doc = ""] + #[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] #[doc = ""] + #[doc = "**Warning!**"] #[doc = ""] - #[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -12475,6 +13248,7 @@ extern "C" { #[doc = "* `image_size` - The total size of the data buffer."] #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingU( src_buf: *const ::libc::c_void, image_size: u32_, @@ -12486,10 +13260,12 @@ extern "C" { #[must_use] #[doc = "Configures the V plane buffer."] #[doc = ""] + #[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] #[doc = ""] + #[doc = "**Warning!**"] #[doc = ""] - #[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -12497,6 +13273,7 @@ extern "C" { #[doc = "* `image_size` - The total size of the data buffer."] #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -12508,10 +13285,12 @@ extern "C" { #[must_use] #[doc = "Configures the YUYV source buffer."] #[doc = ""] + #[doc = "This specifies the YUYV data buffer for the packed input format [`INPUT_YUV422_BATCH`]"] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] #[doc = ""] + #[doc = "**Warning!**"] #[doc = ""] - #[doc = "This specifies the YUYV data buffer for the packed input format @ref INPUT_YUV422_BATCH."] - #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -12519,6 +13298,7 @@ extern "C" { #[doc = "* `image_size` - The total size of the data buffer."] #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingYUYV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -12530,16 +13310,16 @@ extern "C" { #[must_use] #[doc = "Configures the destination buffer."] #[doc = ""] - #[doc = ""] #[doc = "This specifies the destination buffer of the conversion."] - #[doc = "The actual transfer will only happen after calling @ref Y2RU_StartConversion."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] #[doc = "The buffer does NOT need to be allocated in the linear heap."] - #[doc = ""] - #[doc = ""] #[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] #[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] #[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -12547,6 +13327,12 @@ extern "C" { #[doc = "* `image_size` - The total size of the data buffer."] #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "*"] + #[doc = "* Setting a transfer_unit of 4 or 8 lines seems to bring the best results in terms of speed for a 400x240 image."] + #[doc = ""] pub fn Y2RU_SetReceiving( dst_buf: *mut ::libc::c_void, image_size: u32_, @@ -12558,60 +13344,60 @@ extern "C" { #[must_use] #[doc = "Checks if the DMA has finished sending the Y buffer."] #[doc = ""] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with @ref Y2RU_SetSendingY."] + #[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with [`Y2RU_SetSendingY`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingY(is_done: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Checks if the DMA has finished sending the U buffer."] #[doc = ""] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with @ref Y2RU_SetSendingU."] + #[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with [`Y2RU_SetSendingU`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingU(is_done: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Checks if the DMA has finished sending the V buffer."] #[doc = ""] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with @ref Y2RU_SetSendingV."] + #[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with [`Y2RU_SetSendingV`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Checks if the DMA has finished sending the YUYV buffer."] #[doc = ""] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with @ref Y2RU_SetSendingYUYV."] + #[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with [`Y2RU_SetSendingYUYV`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingYUYV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Checks if the DMA has finished sending the converted result."] #[doc = ""] - #[doc = ""] #[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result; } extern "C" { @@ -12621,6 +13407,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `params` - Dithering weight parameters to use."] + #[doc = ""] pub fn Y2RU_SetDitheringWeightParams(params: *const Y2RU_DitheringWeightParams) -> Result; } extern "C" { @@ -12630,18 +13417,19 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `params` - Pointer to output the dithering weight parameters to."] + #[doc = ""] pub fn Y2RU_GetDitheringWeightParams(params: *mut Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] #[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] #[doc = ""] - #[doc = ""] #[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `params` - Conversion parameters to set."] + #[doc = ""] pub fn Y2RU_SetConversionParams(params: *const Y2RU_ConversionParams) -> Result; } extern "C" { @@ -12660,12 +13448,12 @@ extern "C" { #[must_use] #[doc = "Checks if the conversion and DMA transfer are finished."] #[doc = ""] - #[doc = ""] - #[doc = "This can have the same problems as the event and interrupt. See @ref Y2RU_SetTransferEndInterrupt."] + #[doc = "This can have the same problems as the event and interrupt. See [`Y2RU_SetTransferEndInterrupt`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `is_busy` - Pointer to output the busy state to."] + #[doc = ""] pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result; } extern "C" { @@ -12675,6 +13463,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ping` - Pointer to output the ready status to."] + #[doc = ""] pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result; } extern "C" { @@ -12785,31 +13574,31 @@ pub const FLIP_REVERSE: CAMU_Flip = 3; #[doc = ""] pub type CAMU_Flip = ::libc::c_uint; -#[doc = "VGA size. (640x480)"] +#[doc = "VGA size. (640x480)"] #[doc = ""] pub const SIZE_VGA: CAMU_Size = 0; -#[doc = "QVGA size. (320x240)"] +#[doc = "QVGA size. (320x240)"] #[doc = ""] pub const SIZE_QVGA: CAMU_Size = 1; -#[doc = "QQVGA size. (160x120)"] +#[doc = "QQVGA size. (160x120)"] #[doc = ""] pub const SIZE_QQVGA: CAMU_Size = 2; -#[doc = "CIF size. (352x288)"] +#[doc = "CIF size. (352x288)"] #[doc = ""] pub const SIZE_CIF: CAMU_Size = 3; -#[doc = "QCIF size. (176x144)"] +#[doc = "QCIF size. (176x144)"] #[doc = ""] pub const SIZE_QCIF: CAMU_Size = 4; -#[doc = "DS LCD size. (256x192)"] +#[doc = "DS LCD size. (256x192)"] #[doc = ""] pub const SIZE_DS_LCD: CAMU_Size = 5; -#[doc = "DS LCD x4 size. (512x384)"] +#[doc = "DS LCD x4 size. (512x384)"] #[doc = ""] pub const SIZE_DS_LCDx4: CAMU_Size = 6; @@ -13012,7 +13801,7 @@ pub const CONTRAST_PATTERN_10: CAMU_Contrast = 9; #[doc = ""] pub const CONTRAST_PATTERN_11: CAMU_Contrast = 10; -#[doc = "Low contrast. (5)"] +#[doc = "Low contrast. (5)"] #[doc = ""] pub const CONTRAST_LOW: CAMU_Contrast = 4; @@ -13020,7 +13809,7 @@ pub const CONTRAST_LOW: CAMU_Contrast = 4; #[doc = ""] pub const CONTRAST_NORMAL: CAMU_Contrast = 5; -#[doc = "High contrast. (7)"] +#[doc = "High contrast. (7)"] #[doc = ""] pub const CONTRAST_HIGH: CAMU_Contrast = 6; @@ -13040,7 +13829,7 @@ pub const LENS_CORRECTION_ON_70: CAMU_LensCorrection = 1; #[doc = ""] pub const LENS_CORRECTION_ON_90: CAMU_LensCorrection = 2; -#[doc = "Dark lens correction. (OFF)"] +#[doc = "Dark lens correction. (OFF)"] #[doc = ""] pub const LENS_CORRECTION_DARK: CAMU_LensCorrection = 0; @@ -13301,7 +14090,6 @@ extern "C" { #[must_use] #[doc = "Initializes the cam service."] #[doc = ""] - #[doc = ""] #[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] #[doc = ""] pub fn camInit() -> Result; @@ -13309,7 +14097,6 @@ extern "C" { extern "C" { #[doc = "Closes the cam service."] #[doc = ""] - #[doc = ""] #[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] #[doc = ""] pub fn camExit(); @@ -13321,6 +14108,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `port` - Port to begin capture on."] + #[doc = ""] pub fn CAMU_StartCapture(port: u32_) -> Result; } extern "C" { @@ -13330,6 +14118,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `port` - Port to terminate capture on."] + #[doc = ""] pub fn CAMU_StopCapture(port: u32_) -> Result; } extern "C" { @@ -13340,6 +14129,7 @@ extern "C" { #[doc = ""] #[doc = "* `busy` - Pointer to output the busy state to."] #[doc = "* `port` - Port to check."] + #[doc = ""] pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result; } extern "C" { @@ -13349,6 +14139,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `port` - Port to clear."] + #[doc = ""] pub fn CAMU_ClearBuffer(port: u32_) -> Result; } extern "C" { @@ -13359,6 +14150,7 @@ extern "C" { #[doc = ""] #[doc = "* `event` - Pointer to output the event handle to."] #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { @@ -13369,6 +14161,7 @@ extern "C" { #[doc = ""] #[doc = "* `event` - Pointer to output the event handle to."] #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { @@ -13382,6 +14175,7 @@ extern "C" { #[doc = "* `port` - Port to receive from."] #[doc = "* `imageSize` - Size of the image to receive."] #[doc = "* `transferUnit` - Transfer unit to use when receiving."] + #[doc = ""] pub fn CAMU_SetReceiving( event: *mut Handle, dst: *mut ::libc::c_void, @@ -13398,6 +14192,7 @@ extern "C" { #[doc = ""] #[doc = "* `finishedReceiving` - Pointer to output the receiving status to."] #[doc = "* `port` - Port to check."] + #[doc = ""] pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result; } extern "C" { @@ -13410,6 +14205,7 @@ extern "C" { #[doc = "* `lines` - Lines to transfer."] #[doc = "* `width` - Width of the image."] #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result; } extern "C" { @@ -13421,6 +14217,7 @@ extern "C" { #[doc = "* `maxLines` - Pointer to write the maximum number of lines to."] #[doc = "* `width` - Width of the image."] #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result; } extern "C" { @@ -13433,6 +14230,7 @@ extern "C" { #[doc = "* `bytes` - Bytes to transfer."] #[doc = "* `width` - Width of the image."] #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result; } extern "C" { @@ -13443,6 +14241,7 @@ extern "C" { #[doc = ""] #[doc = "* `transferBytes` - Pointer to write the number of bytes to."] #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result; } extern "C" { @@ -13454,6 +14253,7 @@ extern "C" { #[doc = "* `maxBytes` - Pointer to write the maximum number of bytes to."] #[doc = "* `width` - Width of the image."] #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result; } extern "C" { @@ -13464,6 +14264,7 @@ extern "C" { #[doc = ""] #[doc = "* `port` - Port to use."] #[doc = "* `trimming` - Whether image trimming is enabled."] + #[doc = ""] pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result; } extern "C" { @@ -13474,6 +14275,7 @@ extern "C" { #[doc = ""] #[doc = "* `trimming` - Pointer to output the trim state to."] #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result; } extern "C" { @@ -13487,6 +14289,7 @@ extern "C" { #[doc = "* `yStart` - Start Y coordinate."] #[doc = "* `xEnd` - End X coordinate."] #[doc = "* `yEnd` - End Y coordinate."] + #[doc = ""] pub fn CAMU_SetTrimmingParams( port: u32_, xStart: s16, @@ -13506,6 +14309,7 @@ extern "C" { #[doc = "* `xEnd` - Pointer to write the end X coordinate to."] #[doc = "* `yEnd` - Pointer to write the end Y coordinate to."] #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetTrimmingParams( xStart: *mut s16, yStart: *mut s16, @@ -13525,6 +14329,7 @@ extern "C" { #[doc = "* `trimHeight` - Trim height."] #[doc = "* `camWidth` - Camera width."] #[doc = "* `camHeight` - Camera height."] + #[doc = ""] pub fn CAMU_SetTrimmingParamsCenter( port: u32_, trimWidth: s16, @@ -13540,6 +14345,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `select` - Camera to use."] + #[doc = ""] pub fn CAMU_Activate(select: u32_) -> Result; } extern "C" { @@ -13550,6 +14356,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result; } extern "C" { @@ -13560,6 +14367,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `exposure` - Exposure value to use."] + #[doc = ""] pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result; } extern "C" { @@ -13570,6 +14378,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `whiteBalance` - White balance mode to use."] + #[doc = ""] pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result; } extern "C" { @@ -13582,6 +14391,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `whiteBalance` - White balance mode to use."] + #[doc = ""] pub fn CAMU_SetWhiteBalanceWithoutBaseUp( select: u32_, whiteBalance: CAMU_WhiteBalance, @@ -13595,6 +14405,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `sharpness` - Sharpness to use."] + #[doc = ""] pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result; } extern "C" { @@ -13605,6 +14416,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `autoWhiteBalance` - Whether auto exposure is enabled."] + #[doc = ""] pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result; } extern "C" { @@ -13615,6 +14427,7 @@ extern "C" { #[doc = ""] #[doc = "* `autoExposure` - Pointer to output the auto exposure state to."] #[doc = "* `select` - Camera to use."] + #[doc = ""] pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result; } extern "C" { @@ -13625,6 +14438,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `autoWhiteBalance` - Whether auto white balance is enabled."] + #[doc = ""] pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result; } extern "C" { @@ -13635,6 +14449,7 @@ extern "C" { #[doc = ""] #[doc = "* `autoWhiteBalance` - Pointer to output the auto white balance state to."] #[doc = "* `select` - Camera to use."] + #[doc = ""] pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result; } extern "C" { @@ -13646,6 +14461,7 @@ extern "C" { #[doc = "* `select` - Camera to use."] #[doc = "* `flip` - Flip mode to use."] #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result; } extern "C" { @@ -13662,6 +14478,7 @@ extern "C" { #[doc = "* `cropX1` - Second crop point X."] #[doc = "* `cropY1` - Second crop point Y."] #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetDetailSize( select: u32_, width: s16, @@ -13682,6 +14499,7 @@ extern "C" { #[doc = "* `select` - Camera to use."] #[doc = "* `size` - Size to use."] #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result; } extern "C" { @@ -13692,6 +14510,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `frameRate` - Frame rate to use."] + #[doc = ""] pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result; } extern "C" { @@ -13702,6 +14521,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `photoMode` - Photo mode to use."] + #[doc = ""] pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result; } extern "C" { @@ -13713,6 +14533,7 @@ extern "C" { #[doc = "* `select` - Camera to use."] #[doc = "* `effect` - Effect to use."] #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result; } extern "C" { @@ -13723,6 +14544,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `contrast` - Contrast mode to use."] + #[doc = ""] pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result; } extern "C" { @@ -13733,6 +14555,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `lensCorrection` - Lens correction mode to use."] + #[doc = ""] pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result; } extern "C" { @@ -13744,6 +14567,7 @@ extern "C" { #[doc = "* `select` - Camera to use."] #[doc = "* `format` - Format to output."] #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetOutputFormat( select: u32_, format: CAMU_OutputFormat, @@ -13761,6 +14585,7 @@ extern "C" { #[doc = "* `y` - Y of the region."] #[doc = "* `width` - Width of the region."] #[doc = "* `height` - Height of the region."] + #[doc = ""] pub fn CAMU_SetAutoExposureWindow( select: u32_, x: s16, @@ -13780,6 +14605,7 @@ extern "C" { #[doc = "* `y` - Y of the region."] #[doc = "* `width` - Width of the region."] #[doc = "* `height` - Height of the region."] + #[doc = ""] pub fn CAMU_SetAutoWhiteBalanceWindow( select: u32_, x: s16, @@ -13796,6 +14622,7 @@ extern "C" { #[doc = ""] #[doc = "* `select` - Camera to use."] #[doc = "* `noiseFilter` - Whether the noise filter is enabled."] + #[doc = ""] pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result; } extern "C" { @@ -13806,6 +14633,7 @@ extern "C" { #[doc = ""] #[doc = "* `select1` - First camera."] #[doc = "* `select2` - Second camera."] + #[doc = ""] pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result; } extern "C" { @@ -13817,6 +14645,7 @@ extern "C" { #[doc = "* `timing` - Pointer to write timing data to. (size \"past * sizeof(s64)\")"] #[doc = "* `port` - Port to use."] #[doc = "* `past` - Number of past timings to retrieve."] + #[doc = ""] pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result; } extern "C" { @@ -13826,6 +14655,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `data` - Pointer to output the stereo camera data to."] + #[doc = ""] pub fn CAMU_GetStereoCameraCalibrationData( data: *mut CAMU_StereoCameraCalibrationData, ) -> Result; @@ -13837,6 +14667,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `data` - Data to set."] + #[doc = ""] pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result; } extern "C" { @@ -13848,6 +14679,7 @@ extern "C" { #[doc = "* `select` - Camera to write to."] #[doc = "* `addr` - Address to write to."] #[doc = "* `data` - Data to write."] + #[doc = ""] pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { @@ -13859,6 +14691,7 @@ extern "C" { #[doc = "* `select` - Camera to write to."] #[doc = "* `addr` - Address to write to."] #[doc = "* `data` - Data to write."] + #[doc = ""] pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { @@ -13870,6 +14703,7 @@ extern "C" { #[doc = "* `data` - Pointer to read data to."] #[doc = "* `select` - Camera to read from."] #[doc = "* `addr` - Address to read."] + #[doc = ""] pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { @@ -13881,6 +14715,7 @@ extern "C" { #[doc = "* `data` - Pointer to read data to."] #[doc = "* `select` - Camera to read from."] #[doc = "* `addr` - Address to read."] + #[doc = ""] pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { @@ -13890,6 +14725,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `data` - Data to set."] + #[doc = ""] pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result; } extern "C" { @@ -13899,6 +14735,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `data` - Pointer to write the quality data to."] + #[doc = ""] pub fn CAMU_GetImageQualityCalibrationData( data: *mut CAMU_ImageQualityCalibrationData, ) -> Result; @@ -13910,6 +14747,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `Parameter` - to use."] + #[doc = ""] pub fn CAMU_SetPackageParameterWithoutContext( param: CAMU_PackageParameterCameraSelect, ) -> Result; @@ -13921,6 +14759,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `Parameter` - to use."] + #[doc = ""] pub fn CAMU_SetPackageParameterWithContext(param: CAMU_PackageParameterContext) -> Result; } extern "C" { @@ -13930,6 +14769,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `Parameter` - to use."] + #[doc = ""] pub fn CAMU_SetPackageParameterWithContextDetail( param: CAMU_PackageParameterContextDetail, ) -> Result; @@ -13941,6 +14781,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `coefficient` - Pointer to output the Y2R coefficient to."] + #[doc = ""] pub fn CAMU_GetSuitableY2rStandardCoefficient( coefficient: *mut Y2RU_StandardCoefficient, ) -> Result; @@ -13952,6 +14793,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sound` - Shutter sound to play."] + #[doc = ""] pub fn CAMU_PlayShutterSound(sound: CAMU_ShutterSoundType) -> Result; } extern "C" { @@ -13973,6 +14815,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `select` - Pointer to output the current activated camera to."] + #[doc = ""] pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result; } extern "C" { @@ -13982,6 +14825,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `select` - Pointer to output the current sleep camera to."] + #[doc = ""] pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result; } extern "C" { @@ -13991,6 +14835,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `select` - Camera to set."] + #[doc = ""] pub fn CAMU_SetSleepCamera(select: u32_) -> Result; } extern "C" { @@ -14000,6 +14845,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `brightnessSynchronization` - Whether to enable brightness synchronization."] + #[doc = ""] pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result; } extern "C" { @@ -14009,6 +14855,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - Unknown, usually 1."] + #[doc = ""] pub fn cfgnorInit(value: u8_) -> Result; } extern "C" { @@ -14024,6 +14871,7 @@ extern "C" { #[doc = ""] #[doc = "* `buf` - Buffer to dump to."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { @@ -14034,6 +14882,7 @@ extern "C" { #[doc = ""] #[doc = "* `buf` - Buffer to write from."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { @@ -14043,6 +14892,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - Unknown, usually 1."] + #[doc = ""] pub fn CFGNOR_Initialize(value: u8_) -> Result; } extern "C" { @@ -14060,6 +14910,7 @@ extern "C" { #[doc = "* `offset` - Offset to read from."] #[doc = "* `buf` - Buffer to read data to."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } extern "C" { @@ -14071,6 +14922,7 @@ extern "C" { #[doc = "* `offset` - Offset to write to."] #[doc = "* `buf` - Buffer to write data from."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } #[doc = "Japan"] @@ -14199,7 +15051,8 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `region` - Pointer to output the region to. (see @ref CFG_Region)"] + #[doc = "* `region` - Pointer to output the region to. (see [`CFG_Region)`]"] + #[doc = ""] pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result; } extern "C" { @@ -14210,6 +15063,7 @@ extern "C" { #[doc = ""] #[doc = "* `appIDSalt` - Salt to use."] #[doc = "* `hash` - Pointer to output the hash to."] + #[doc = ""] pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result; } extern "C" { @@ -14219,6 +15073,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - Pointer to output the result to. (0 = no, 1 = yes)"] + #[doc = ""] pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result; } extern "C" { @@ -14227,7 +15082,8 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `model` - Pointer to output the model to. (see @ref CFG_SystemModel)"] + #[doc = "* `model` - Pointer to output the model to. (see [`CFG_SystemModel)`]"] + #[doc = ""] pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result; } extern "C" { @@ -14237,6 +15093,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - Pointer to output the result to. (0 = yes, 1 = no)"] + #[doc = ""] pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result; } extern "C" { @@ -14247,6 +15104,7 @@ extern "C" { #[doc = ""] #[doc = "* `code` - Country code to use."] #[doc = "* `string` - Pointer to output the string to."] + #[doc = ""] pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result; } extern "C" { @@ -14257,6 +15115,7 @@ extern "C" { #[doc = ""] #[doc = "* `string` - String to use."] #[doc = "* `code` - Pointer to output the country code to."] + #[doc = ""] pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result; } extern "C" { @@ -14266,6 +15125,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `isSupported` - pointer to the output the result to."] + #[doc = ""] pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result; } extern "C" { @@ -14277,6 +15137,7 @@ extern "C" { #[doc = "* `size` - Size of the data to retrieve."] #[doc = "* `blkID` - ID of the block to retrieve."] #[doc = "* `outData` - Pointer to write the block data to."] + #[doc = ""] pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { @@ -14288,6 +15149,7 @@ extern "C" { #[doc = "* `size` - Size of the data to retrieve."] #[doc = "* `blkID` - ID of the block to retrieve."] #[doc = "* `outData` - Pointer to write the block data to."] + #[doc = ""] pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { @@ -14299,6 +15161,7 @@ extern "C" { #[doc = "* `size` - Size of the data to retrieve."] #[doc = "* `blkID` - ID of the block to retrieve."] #[doc = "* `outData` - Pointer to write the block data to."] + #[doc = ""] pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { @@ -14310,6 +15173,7 @@ extern "C" { #[doc = "* `size` - Size of the data to retrieve."] #[doc = "* `blkID` - ID of the block to retrieve."] #[doc = "* `inData` - Pointer to block data to write."] + #[doc = ""] pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { @@ -14321,6 +15185,7 @@ extern "C" { #[doc = "* `size` - Size of the data to retrieve."] #[doc = "* `blkID` - ID of the block to retrieve."] #[doc = "* `inData` - Pointer to block data to write."] + #[doc = ""] pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { @@ -14335,7 +15200,8 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `language` - Pointer to write the language to. (see @ref CFG_Language)"] + #[doc = "* `language` - Pointer to write the language to. (see [`CFG_Language)`]"] + #[doc = ""] pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result; } extern "C" { @@ -14387,6 +15253,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `serial` - Pointer to output the serial to. (This is normally 0xF)"] + #[doc = ""] pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result; } extern "C" { @@ -14396,6 +15263,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] + #[doc = ""] pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result; } extern "C" { @@ -14405,6 +15273,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `seed` - Pointer to write the friend code seed to."] + #[doc = ""] pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { @@ -14414,6 +15283,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] + #[doc = ""] pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result; } extern "C" { @@ -14423,6 +15293,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] + #[doc = ""] pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result; } #[doc = "PCM8"] @@ -14662,6 +15533,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `capUnit` - Pointer to output the capture unit to."] + #[doc = ""] pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result; } extern "C" { @@ -14671,6 +15543,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `capUnit` - Capture unit to release."] + #[doc = ""] pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result; } extern "C" { @@ -14681,6 +15554,7 @@ extern "C" { #[doc = ""] #[doc = "* `adr` - Address of the memory region."] #[doc = "* `size` - Size of the memory region."] + #[doc = ""] pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -14691,6 +15565,7 @@ extern "C" { #[doc = ""] #[doc = "* `adr` - Address of the memory region."] #[doc = "* `size` - Size of the memory region."] + #[doc = ""] pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -14701,6 +15576,7 @@ extern "C" { #[doc = ""] #[doc = "* `adr` - Address of the memory region."] #[doc = "* `size` - Size of the memory region."] + #[doc = ""] pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -14725,11 +15601,14 @@ extern "C" { extern "C" { #[doc = "Adds a command to the list, returning a buffer to write arguments to."] #[doc = ""] - #[doc = "Returns: A buffer to write command arguments to."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A buffer to write command arguments to."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cmdid` - ID of the command to add."] + #[doc = ""] pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32_; } extern "C" { @@ -14739,6 +15618,7 @@ extern "C" { #[doc = ""] #[doc = "* `cmdid` - ID of the command to add."] #[doc = "* `cmdparams` - Buffer containing the command's parameters."] + #[doc = ""] pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_); } extern "C" { @@ -14748,6 +15628,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `waitDone` - Whether to wait until the commands have finished executing."] + #[doc = ""] pub fn csndExecCmds(waitDone: bool) -> Result; } extern "C" { @@ -14757,6 +15638,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `value` - Play state to set."] + #[doc = ""] pub fn CSND_SetPlayStateR(channel: u32_, value: u32_); } extern "C" { @@ -14766,6 +15648,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `value` - Play state to set."] + #[doc = ""] pub fn CSND_SetPlayState(channel: u32_, value: u32_); } extern "C" { @@ -14775,6 +15658,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `value` - Encoding to set."] + #[doc = ""] pub fn CSND_SetEncoding(channel: u32_, value: u32_); } extern "C" { @@ -14786,6 +15670,7 @@ extern "C" { #[doc = "* `block` - Block to set."] #[doc = "* `physaddr` - Physical address to set the block to."] #[doc = "* `size` - Size of the block."] + #[doc = ""] pub fn CSND_SetBlock(channel: u32_, block: ::libc::c_int, physaddr: u32_, size: u32_); } extern "C" { @@ -14795,6 +15680,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `value` - Whether to loop the channel."] + #[doc = ""] pub fn CSND_SetLooping(channel: u32_, value: u32_); } extern "C" { @@ -14804,6 +15690,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `set` - Value to set."] + #[doc = ""] pub fn CSND_SetBit7(channel: u32_, set: bool); } extern "C" { @@ -14813,6 +15700,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `interp` - Whether to use interpolation."] + #[doc = ""] pub fn CSND_SetInterp(channel: u32_, interp: bool); } extern "C" { @@ -14822,6 +15710,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `duty` - Duty to set."] + #[doc = ""] pub fn CSND_SetDuty(channel: u32_, duty: CSND_DutyCycle); } extern "C" { @@ -14831,6 +15720,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `timer` - Timer to set."] + #[doc = ""] pub fn CSND_SetTimer(channel: u32_, timer: u32_); } extern "C" { @@ -14841,6 +15731,7 @@ extern "C" { #[doc = "* `channel` - Channel to use."] #[doc = "* `chnVolumes` - Channel volume data to set."] #[doc = "* `capVolumes` - Capture volume data to set."] + #[doc = ""] pub fn CSND_SetVol(channel: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { @@ -14852,6 +15743,7 @@ extern "C" { #[doc = "* `block` - Current block."] #[doc = "* `sample` - Current sample."] #[doc = "* `index` - Current index."] + #[doc = ""] pub fn CSND_SetAdpcmState( channel: u32_, block: ::libc::c_int, @@ -14866,6 +15758,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to use."] #[doc = "* `reload` - Whether to reload ADPCM data."] + #[doc = ""] pub fn CSND_SetAdpcmReload(channel: u32_, reload: bool); } extern "C" { @@ -14879,6 +15772,7 @@ extern "C" { #[doc = "* `totalbytesize` - Total size of the data to play."] #[doc = "* `chnVolumes` - Channel volume data."] #[doc = "* `capVolumes` - Capture volume data."] + #[doc = ""] pub fn CSND_SetChnRegs( flags: u32_, physaddr0: u32_, @@ -14897,6 +15791,7 @@ extern "C" { #[doc = "* `chnVolumes` - Channel volume data."] #[doc = "* `capVolumes` - Capture volume data."] #[doc = "* `duty` - Duty value to set."] + #[doc = ""] pub fn CSND_SetChnRegsPSG( flags: u32_, chnVolumes: u32_, @@ -14912,6 +15807,7 @@ extern "C" { #[doc = "* `flags` - Flags to set."] #[doc = "* `chnVolumes` - Channel volume data."] #[doc = "* `capVolumes` - Capture volume data."] + #[doc = ""] pub fn CSND_SetChnRegsNoise(flags: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { @@ -14921,6 +15817,7 @@ extern "C" { #[doc = ""] #[doc = "* `capUnit` - Capture unit to use."] #[doc = "* `enable` - Whether to enable the capture unit."] + #[doc = ""] pub fn CSND_CapEnable(capUnit: u32_, enable: bool); } extern "C" { @@ -14930,6 +15827,7 @@ extern "C" { #[doc = ""] #[doc = "* `capUnit` - Capture unit to use."] #[doc = "* `repeat` - Whether the capture unit should repeat."] + #[doc = ""] pub fn CSND_CapSetRepeat(capUnit: u32_, repeat: bool); } extern "C" { @@ -14939,6 +15837,7 @@ extern "C" { #[doc = ""] #[doc = "* `capUnit` - Capture unit to use."] #[doc = "* `eightbit` - Format to use."] + #[doc = ""] pub fn CSND_CapSetFormat(capUnit: u32_, eightbit: bool); } extern "C" { @@ -14948,6 +15847,7 @@ extern "C" { #[doc = ""] #[doc = "* `capUnit` - Capture unit to use."] #[doc = "* `set` - Value to set."] + #[doc = ""] pub fn CSND_CapSetBit2(capUnit: u32_, set: bool); } extern "C" { @@ -14957,6 +15857,7 @@ extern "C" { #[doc = ""] #[doc = "* `capUnit` - Capture unit to use."] #[doc = "* `timer` - Timer to set."] + #[doc = ""] pub fn CSND_CapSetTimer(capUnit: u32_, timer: u32_); } extern "C" { @@ -14967,6 +15868,7 @@ extern "C" { #[doc = "* `capUnit` - Capture unit to use."] #[doc = "* `addr` - Buffer address to use."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn CSND_CapSetBuffer(capUnit: u32_, addr: u32_, size: u32_); } extern "C" { @@ -14978,6 +15880,7 @@ extern "C" { #[doc = "* `flags` - Capture unit flags."] #[doc = "* `addr` - Capture unit buffer address."] #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_); } extern "C" { @@ -14987,6 +15890,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `waitDone` - Whether to wait for completion."] + #[doc = ""] pub fn CSND_SetDspFlags(waitDone: bool) -> Result; } extern "C" { @@ -14996,13 +15900,13 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `waitDone` - Whether to wait for completion."] + #[doc = ""] pub fn CSND_UpdateInfo(waitDone: bool) -> Result; } extern "C" { #[must_use] #[doc = "Plays a sound."] #[doc = ""] - #[doc = ""] #[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] #[doc = ""] #[doc = "# Arguments"] @@ -15015,6 +15919,7 @@ extern "C" { #[doc = "* `data0` - First block of sound data."] #[doc = "* `data1` - Second block of sound data. This is the block that will be looped over."] #[doc = "* `size` - Size of the sound data."] + #[doc = ""] pub fn csndPlaySound( chn: ::libc::c_int, flags: u32_, @@ -15035,6 +15940,7 @@ extern "C" { #[doc = ""] #[doc = "* `outSemFlags` - Pointer to write semaphore flags to."] #[doc = "* `outIrqFlags` - Pointer to write interrupt flags to."] + #[doc = ""] pub fn csndGetDspFlags(outSemFlags: *mut u32_, outIrqFlags: *mut u32_); } extern "C" { @@ -15042,11 +15948,14 @@ extern "C" { #[doc = ""] #[doc = "Note: Requires previous CSND_UpdateInfo()"] #[doc = ""] - #[doc = "Returns: The channel's information."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The channel's information."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `channel` - Channel to get information for."] + #[doc = ""] pub fn csndGetChnInfo(channel: u32_) -> *mut CSND_ChnInfo; } extern "C" { @@ -15054,11 +15963,14 @@ extern "C" { #[doc = ""] #[doc = "Note: Requires previous CSND_UpdateInfo()"] #[doc = ""] - #[doc = "Returns: The capture unit's information."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The capture unit's information."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `capUnit` - Capture unit to get information for."] + #[doc = ""] pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo; } extern "C" { @@ -15069,6 +15981,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to get the state of."] #[doc = "* `out` - Pointer to output channel information to."] + #[doc = ""] pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result; } extern "C" { @@ -15079,6 +15992,7 @@ extern "C" { #[doc = ""] #[doc = "* `channel` - Channel to check."] #[doc = "* `status` - Pointer to output the channel status to."] + #[doc = ""] pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result; } #[doc = "Pipe interrupt."] @@ -15138,15 +16052,22 @@ extern "C" { #[must_use] #[doc = "Initializes the dsp service."] #[doc = ""] - #[doc = ""] #[doc = "Call this before calling any DSP_* function."] #[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This will also unload any previously loaded DSP binary."] + #[doc = ""] pub fn dspInit() -> Result; } extern "C" { #[doc = "Closes the dsp service."] #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This will also unload the DSP binary."] + #[doc = ""] pub fn dspExit(); } extern "C" { @@ -15161,6 +16082,7 @@ extern "C" { #[doc = ""] #[doc = "* `cookie` - Hook cookie to use."] #[doc = "* `callback` - Function to call when DSP's status changes."] + #[doc = ""] pub fn dspHook(cookie: *mut dspHookCookie, callback: dspHookFn); } extern "C" { @@ -15169,6 +16091,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cookie` - Hook cookie to remove."] + #[doc = ""] pub fn dspUnhook(cookie: *mut dspHookCookie); } extern "C" { @@ -15178,32 +16101,33 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `is_inserted` - Pointer to output the insertion status to."] + #[doc = ""] pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Flushes the cache"] #[doc = ""] - #[doc = ""] #[doc = "Flushes the cache for the specified memory range and invalidates the cache"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] #[doc = "* `size` - Size of the memory range to flush"] + #[doc = ""] pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] #[doc = "Invalidates the cache"] #[doc = ""] - #[doc = ""] #[doc = "Invalidates the cache for the specified memory range"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] #[doc = "* `size` - Size of the memory range to flush"] + #[doc = ""] pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -15213,6 +16137,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `semaphore` - Pointer to output the semaphore to."] + #[doc = ""] pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result; } extern "C" { @@ -15222,6 +16147,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - Value to set."] + #[doc = ""] pub fn DSP_SetSemaphore(value: u16_) -> Result; } extern "C" { @@ -15231,14 +16157,13 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mask` - Mask to apply."] + #[doc = ""] pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result; } extern "C" { #[must_use] #[doc = "Loads a DSP binary and starts the DSP"] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `component` - The program file address in memory"] @@ -15246,6 +16171,12 @@ extern "C" { #[doc = "* `prog_mask` - DSP memory block related ? Default is 0xff."] #[doc = "* `data_mask` - DSP memory block related ? Default is 0xff."] #[doc = "* `is_loaded` - Indicates if the DSP was succesfully loaded."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The binary must be signed (http://3dbrew.org/wiki/DSP_Binary)"] + #[doc = "* Seems to be called when the 3ds leaves the Sleep mode"] + #[doc = ""] pub fn DSP_LoadComponent( component: *const ::libc::c_void, size: u32_, @@ -15264,13 +16195,16 @@ extern "C" { #[must_use] #[doc = "Registers an event handle with the DSP through IPC"] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Event handle to register."] #[doc = "* `interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] #[doc = "* `channel` - The pipe channel. Usual value is 2"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* It is possible that interrupt are inverted"] + #[doc = ""] pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result; } extern "C" { @@ -15284,6 +16218,7 @@ extern "C" { #[doc = "* `buffer` - The buffer that will store the values read from the pipe"] #[doc = "* `length` - Length of the buffer"] #[doc = "* `length_read` - Number of bytes read by the command"] + #[doc = ""] pub fn DSP_ReadPipeIfPossible( channel: u32_, peer: u32_, @@ -15301,6 +16236,7 @@ extern "C" { #[doc = "* `channel` - unknown. Usually 2"] #[doc = "* `buffer` - The message to send to the DSP process"] #[doc = "* `length` - Length of the message"] + #[doc = ""] pub fn DSP_WriteProcessPipe( channel: u32_, buffer: *const ::libc::c_void, @@ -15315,6 +16251,7 @@ extern "C" { #[doc = ""] #[doc = "* `dsp_address` - Address to convert."] #[doc = "* `arm_address` - Pointer to output the converted address to."] + #[doc = ""] pub fn DSP_ConvertProcessAddressFromDspDram( dsp_address: u32_, arm_address: *mut u32_, @@ -15328,30 +16265,37 @@ extern "C" { #[doc = ""] #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] #[doc = "* `value` - Pointer to read the register value to."] + #[doc = ""] pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result; } extern "C" { #[must_use] #[doc = "Checks if you can read a DSP register"] #[doc = ""] + #[doc = "**Warning!**"] #[doc = ""] + #[doc = "* This call might hang if the data is not ready. See [`DSP_SendDataIsEmpty`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] #[doc = "* `is_ready` - Pointer to write the ready status to."] + #[doc = ""] pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result; } extern "C" { #[must_use] #[doc = "Writes to a DSP register"] #[doc = ""] + #[doc = "**Warning!**"] #[doc = ""] + #[doc = "* This call might hang if the SendData is not empty. See [`DSP_SendDataIsEmpty`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] #[doc = "* `value` - Value to write."] + #[doc = ""] pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result; } extern "C" { @@ -15362,6 +16306,7 @@ extern "C" { #[doc = ""] #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] #[doc = "* `is_empty` - Pointer to write the empty status to."] + #[doc = ""] pub fn DSP_SendDataIsEmpty(regNo: u16_, is_empty: *mut bool) -> Result; } pub type FSPXI_Archive = u64_; @@ -15378,6 +16323,7 @@ extern "C" { #[doc = "* `path` - Path of the file."] #[doc = "* `flags` - Flags to open the file with."] #[doc = "* `attributes` - Attributes of the file."] + #[doc = ""] pub fn FSPXI_OpenFile( serviceHandle: Handle, out: *mut FSPXI_File, @@ -15395,6 +16341,7 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive containing the file."] #[doc = "* `path` - Path of the file."] + #[doc = ""] pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path) -> Result; } @@ -15408,6 +16355,7 @@ extern "C" { #[doc = "* `srcPath` - Path of the source file."] #[doc = "* `dstArchive` - Archive containing the destination file."] #[doc = "* `dstPath` - Path of the destination file."] + #[doc = ""] pub fn FSPXI_RenameFile( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -15424,6 +16372,7 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive containing the directory."] #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSPXI_DeleteDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -15440,6 +16389,7 @@ extern "C" { #[doc = "* `path` - Path of the file."] #[doc = "* `attributes` - Attributes of the file."] #[doc = "* `size` - Size of the file."] + #[doc = ""] pub fn FSPXI_CreateFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -15457,6 +16407,7 @@ extern "C" { #[doc = "* `archive` - Archive to create the directory in."] #[doc = "* `path` - Path of the directory."] #[doc = "* `attributes` - Attributes of the directory."] + #[doc = ""] pub fn FSPXI_CreateDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -15474,6 +16425,7 @@ extern "C" { #[doc = "* `srcPath` - Path of the source directory."] #[doc = "* `dstArchive` - Archive containing the destination directory."] #[doc = "* `dstPath` - Path of the destination directory."] + #[doc = ""] pub fn FSPXI_RenameDirectory( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -15491,6 +16443,7 @@ extern "C" { #[doc = "* `out` - Pointer to output the directory handle to."] #[doc = "* `archive` - Archive containing the directory."] #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSPXI_OpenDirectory( serviceHandle: Handle, out: *mut FSPXI_Directory, @@ -15509,6 +16462,7 @@ extern "C" { #[doc = "* `offset` - Offset to read from."] #[doc = "* `buffer` - Buffer to read to."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn FSPXI_ReadFile( serviceHandle: Handle, file: FSPXI_File, @@ -15527,6 +16481,7 @@ extern "C" { #[doc = "* `file` - File to calculate the hash of."] #[doc = "* `buffer` - Buffer to output the hash to."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn FSPXI_CalculateFileHashSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -15546,6 +16501,7 @@ extern "C" { #[doc = "* `buffer` - Buffer to write from."] #[doc = "* `size` - Size of the buffer."] #[doc = "* `flags` - Flags to use when writing."] + #[doc = ""] pub fn FSPXI_WriteFile( serviceHandle: Handle, file: FSPXI_File, @@ -15567,6 +16523,7 @@ extern "C" { #[doc = "* `inSize` - Size of inBuffer."] #[doc = "* `outBuffer` - Buffer to write MAC to."] #[doc = "* `outSize` - Size of outBuffer."] + #[doc = ""] pub fn FSPXI_CalcSavegameMAC( serviceHandle: Handle, file: FSPXI_File, @@ -15584,6 +16541,7 @@ extern "C" { #[doc = ""] #[doc = "* `file` - File to get the size of."] #[doc = "* `size` - Pointer to output size to."] + #[doc = ""] pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result; } extern "C" { @@ -15594,6 +16552,7 @@ extern "C" { #[doc = ""] #[doc = "* `file` - File to set the size of"] #[doc = "* `size` - Size to set the file to"] + #[doc = ""] pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result; } extern "C" { @@ -15603,6 +16562,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `file` - File to close"] + #[doc = ""] pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result; } extern "C" { @@ -15615,6 +16575,7 @@ extern "C" { #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] #[doc = "* `entryCount` - Number of entries to read."] #[doc = "* `entryOut` - Pointer to output directory entries to."] + #[doc = ""] pub fn FSPXI_ReadDirectory( serviceHandle: Handle, directory: FSPXI_Directory, @@ -15630,6 +16591,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `directory` - Directory to close."] + #[doc = ""] pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result; } extern "C" { @@ -15641,6 +16603,7 @@ extern "C" { #[doc = "* `archive` - Pointer to output the opened archive to."] #[doc = "* `id` - ID of the archive."] #[doc = "* `path` - Path of the archive."] + #[doc = ""] pub fn FSPXI_OpenArchive( serviceHandle: Handle, archive: *mut FSPXI_Archive, @@ -15657,6 +16620,7 @@ extern "C" { #[doc = "* `archive` - Archive to check."] #[doc = "* `out` - Pointer to output existence to."] #[doc = "* `path` - Path to check for file"] + #[doc = ""] pub fn FSPXI_HasFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -15673,6 +16637,7 @@ extern "C" { #[doc = "* `archive` - Archive to check."] #[doc = "* `out` - Pointer to output existence to."] #[doc = "* `path` - Path to check for directory"] + #[doc = ""] pub fn FSPXI_HasDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -15688,6 +16653,11 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive to commit."] #[doc = "* `id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Unsure why id is sent. This appears to be the default action for FSUSER_ControlArchive, with every action other than 0 and 0x789D being sent to this command."] + #[doc = ""] pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result; } extern "C" { @@ -15697,6 +16667,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `archive` - Archive to close."] + #[doc = ""] pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result; } extern "C" { @@ -15707,6 +16678,7 @@ extern "C" { #[doc = ""] #[doc = "* `archive` - Archive handle to check validity of."] #[doc = "* `out` - Pointer to output validity to."] + #[doc = ""] pub fn FSPXI_Unknown0x17( serviceHandle: Handle, archive: FSPXI_Archive, @@ -15720,6 +16692,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the card type to."] + #[doc = ""] pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result; } extern "C" { @@ -15729,6 +16702,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSPXI_GetSdmcArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -15741,6 +16715,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSPXI_GetNandArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -15753,6 +16728,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the error code to"] + #[doc = ""] pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result; } extern "C" { @@ -15762,6 +16738,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the detection status to"] + #[doc = ""] pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { @@ -15771,6 +16748,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to output the writable status to"] + #[doc = ""] pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { @@ -15781,6 +16759,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Buffer to output the CID to."] #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -15791,6 +16770,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Buffer to output the CID to."] #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -15800,6 +16780,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Buffer to output the speed info to."] + #[doc = ""] pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { @@ -15809,6 +16790,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Buffer to output the speed info to."] + #[doc = ""] pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { @@ -15819,6 +16801,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Buffer to output the log to."] #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -15829,6 +16812,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Buffer to output the log to."] #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -15850,6 +16834,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `inserted` - Pointer to output the insertion status to."] + #[doc = ""] pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result; } extern "C" { @@ -15859,6 +16844,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { @@ -15868,6 +16854,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { @@ -15877,6 +16864,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { @@ -15886,6 +16874,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `commandId` - ID of the command."] + #[doc = ""] pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result; } extern "C" { @@ -15896,6 +16885,7 @@ extern "C" { #[doc = ""] #[doc = "* `commandId` - ID of the command."] #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSPXI_CardNorDirectCommandWithAddress( serviceHandle: Handle, commandId: u8_, @@ -15911,6 +16901,7 @@ extern "C" { #[doc = "* `commandId` - ID of the command."] #[doc = "* `size` - Size of the output buffer."] #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectRead( serviceHandle: Handle, commandId: u8_, @@ -15928,6 +16919,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the output buffer."] #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectReadWithAddress( serviceHandle: Handle, commandId: u8_, @@ -15945,6 +16937,11 @@ extern "C" { #[doc = "* `commandId` - ID of the command."] #[doc = "* `size` - Size of the input buffer."] #[doc = "* `output` - Input buffer."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Stubbed in latest firmware, since ?.?.?"] + #[doc = ""] pub fn FSPXI_CardNorDirectWrite( serviceHandle: Handle, commandId: u8_, @@ -15962,6 +16959,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the input buffer."] #[doc = "* `input` - Input buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectWriteWithAddress( serviceHandle: Handle, commandId: u8_, @@ -15980,6 +16978,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the output buffer."] #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectRead_4xIO( serviceHandle: Handle, commandId: u8_, @@ -15997,6 +16996,7 @@ extern "C" { #[doc = "* `address` - Address to provide."] #[doc = "* `size` - Size of the input buffer."] #[doc = "* `output` - Input buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify( serviceHandle: Handle, address: u32_, @@ -16011,6 +17011,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify( serviceHandle: Handle, address: u32_, @@ -16024,6 +17025,7 @@ extern "C" { #[doc = ""] #[doc = "* `info` - Pointer to output the product info to."] #[doc = "* `archive` - Open NCCH content archive"] + #[doc = ""] pub fn FSPXI_GetProductInfo( serviceHandle: Handle, info: *mut FS_ProductInfo, @@ -16037,6 +17039,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `baudRate` - Baud rate to set."] + #[doc = ""] pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { @@ -16046,6 +17049,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `busMode` - Bus mode to set."] + #[doc = ""] pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result; } extern "C" { @@ -16055,6 +17059,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `unk` - FS sends *(0x1FF81086)"] + #[doc = ""] pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result; } extern "C" { @@ -16064,6 +17069,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { @@ -16073,6 +17079,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { @@ -16087,6 +17094,7 @@ extern "C" { #[doc = "* `idSize` - Size of each ID element."] #[doc = "* `shared` - Whether to enumerate shared ext save data."] #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSPXI_EnumerateExtSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -16107,6 +17115,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the special content."] #[doc = "* `programId` - Program ID owning the special content."] #[doc = "* `type` - Type of special content."] + #[doc = ""] pub fn FSPXI_GetSpecialContentIndex( serviceHandle: Handle, index: *mut u16_, @@ -16124,6 +17133,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the program."] #[doc = "* `programId` - ID of the program."] #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] + #[doc = ""] pub fn FSPXI_GetLegacyRomHeader( serviceHandle: Handle, mediaType: FS_MediaType, @@ -16141,6 +17151,7 @@ extern "C" { #[doc = "* `programId` - ID of the program."] #[doc = "* `banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] #[doc = "* `unk` - Unknown. Always 1?"] + #[doc = ""] pub fn FSPXI_GetLegacyBannerData( serviceHandle: Handle, mediaType: FS_MediaType, @@ -16156,6 +17167,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `unk` - Unknown. Transaction?"] + #[doc = ""] pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result; } extern "C" { @@ -16190,6 +17202,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to output the root path to."] #[doc = "* `length` - Length of the output buffer in bytes."] + #[doc = ""] pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result; } extern "C" { @@ -16200,6 +17213,7 @@ extern "C" { #[doc = ""] #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] #[doc = "* `mediaType` - System media type to check."] + #[doc = ""] pub fn FSPXI_GetArchiveResource( serviceHandle: Handle, archiveResource: *mut FS_ArchiveResource, @@ -16213,6 +17227,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `seed` - Pointer to output the seed to."] + #[doc = ""] pub fn FSPXI_ExportIntegrityVerificationSeed( serviceHandle: Handle, seed: *mut FS_IntegrityVerificationSeed, @@ -16225,6 +17240,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `seed` - Seed to import."] + #[doc = ""] pub fn FSPXI_ImportIntegrityVerificationSeed( serviceHandle: Handle, seed: *const FS_IntegrityVerificationSeed, @@ -16240,6 +17256,7 @@ extern "C" { #[doc = "* `mediaType` - Media type of the program."] #[doc = "* `programId` - ID of the program."] #[doc = "* `header` - Pointer to output the legacy sub banner data to."] + #[doc = ""] pub fn FSPXI_GetLegacySubBannerData( serviceHandle: Handle, bannerSize: u32_, @@ -16256,6 +17273,7 @@ extern "C" { #[doc = ""] #[doc = "* `buf` - Buffer to output random bytes to."] #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GenerateRandomBytes( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -16272,6 +17290,7 @@ extern "C" { #[doc = "* `out` - The pointer to write the timestamp to."] #[doc = "* `path` - The UTF-16 path of the file."] #[doc = "* `size` - The size of the path."] + #[doc = ""] pub fn FSPXI_GetFileLastModified( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16290,6 +17309,7 @@ extern "C" { #[doc = "* `fileOffset` - Offset of the file."] #[doc = "* `size` - Size of the buffer."] #[doc = "* `data` - Buffer to read to."] + #[doc = ""] pub fn FSPXI_ReadSpecialFile( serviceHandle: Handle, bytesRead: *mut u32_, @@ -16305,6 +17325,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `fileSize` - Pointer to output the size to."] + #[doc = ""] pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result; } extern "C" { @@ -16314,6 +17335,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `context` - Pointer to output the context to."] + #[doc = ""] pub fn FSPXI_StartDeviceMoveAsSource( serviceHandle: Handle, context: *mut FS_DeviceMoveContext, @@ -16327,6 +17349,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to use."] #[doc = "* `clear` - Whether to clear the device's data first."] + #[doc = ""] pub fn FSPXI_StartDeviceMoveAsDestination( serviceHandle: Handle, context: FS_DeviceMoveContext, @@ -16347,6 +17370,7 @@ extern "C" { #[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] #[doc = "* `hashtableSize` - Size of hashtable."] #[doc = "* `unk` - Unknown. Always 0x00001000? Possibly block size?"] + #[doc = ""] pub fn FSPXI_ReadFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -16374,6 +17398,7 @@ extern "C" { #[doc = "* `hashtableSize` - Size of hashtable"] #[doc = "* `unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] #[doc = "* `unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] + #[doc = ""] pub fn FSPXI_WriteFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -16394,6 +17419,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `latency` - Latency to apply."] + #[doc = ""] pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result; } extern "C" { @@ -16403,6 +17429,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result; } extern "C" { @@ -16412,6 +17439,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] + #[doc = ""] pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result; } extern "C" { @@ -16423,6 +17451,7 @@ extern "C" { #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] #[doc = "* `idsSize` - Size of the IDs buffer."] #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSPXI_EnumerateSystemSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -16439,6 +17468,7 @@ extern "C" { #[doc = "* `unk` - Unknown"] #[doc = "* `buffer` - Buffer to write the report to."] #[doc = "* `size` - Size of buffer"] + #[doc = ""] pub fn FSPXI_ReadNandReport( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -16450,6 +17480,10 @@ extern "C" { #[must_use] #[doc = "Unknown command 0x56"] #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Called by FSUSER_ControlArchive with ArchiveAction 0x789D"] + #[doc = ""] pub fn FSPXI_Unknown0x56( serviceHandle: Handle, out: *mut u32_, @@ -16471,7 +17505,9 @@ extern "C" { extern "C" { #[doc = "Gets the current fs:REG session handle."] #[doc = ""] - #[doc = "Returns: The current fs:REG session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current fs:REG session handle."] #[doc = ""] pub fn fsRegGetSessionHandle() -> *mut Handle; } @@ -16485,6 +17521,7 @@ extern "C" { #[doc = "* `programHandle` - The program handle."] #[doc = "* `programInfo` - Information about the program."] #[doc = "* `storageInfo` - Storage information to register."] + #[doc = ""] pub fn FSREG_Register( pid: u32_, programHandle: u64_, @@ -16499,6 +17536,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `pid` - The Process ID of the program."] + #[doc = ""] pub fn FSREG_Unregister(pid: u32_) -> Result; } extern "C" { @@ -16510,6 +17548,7 @@ extern "C" { #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set(s)."] #[doc = "* `maxNumEntries` - The maximum number of entries."] #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn FSREG_GetProgramInfo( exheaderInfos: *mut ExHeader_Info, maxNumEntries: u32_, @@ -16524,6 +17563,7 @@ extern "C" { #[doc = ""] #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] #[doc = "* `programInfo` - Information about the program to load."] + #[doc = ""] pub fn FSREG_LoadProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -16536,6 +17576,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result; } extern "C" { @@ -16545,6 +17586,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result; } #[doc = "Shared Mii struct"] @@ -17845,6 +18887,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - Pointer to write the current user's login status to."] + #[doc = ""] pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result; } extern "C" { @@ -17854,6 +18897,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - Pointer to write the current user's online status to."] + #[doc = ""] pub fn FRDU_IsOnline(state: *mut bool) -> Result; } extern "C" { @@ -17869,6 +18913,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - Event to signal when Login is done."] + #[doc = ""] pub fn FRD_Login(event: Handle) -> Result; } extern "C" { @@ -17878,6 +18923,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `key` - Pointer to write the current user's friend key to."] + #[doc = ""] pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result; } extern "C" { @@ -17889,6 +18935,7 @@ extern "C" { #[doc = "* `isPublicMode` - Determines whether friends are notified of the current user's online status."] #[doc = "* `isShowGameName` - Determines whether friends are notified of the application that the current user is running."] #[doc = "* `isShowPlayedGame` - Determiens whether to display the current user's game history."] + #[doc = ""] pub fn FRD_GetMyPreference( isPublicMode: *mut bool, isShowGameName: *mut bool, @@ -17902,6 +18949,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `profile` - Pointer to write the current user's profile information to."] + #[doc = ""] pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result; } extern "C" { @@ -17912,6 +18960,7 @@ extern "C" { #[doc = ""] #[doc = "* `name` - Pointer to write the current user's screen name to."] #[doc = "* `max_size` - Max size of the screen name."] + #[doc = ""] pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { @@ -17921,6 +18970,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mii` - Pointer to write the current user's mii data to."] + #[doc = ""] pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result; } extern "C" { @@ -17930,6 +18980,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `titleId` - Pointer to write the current user's playing game to."] + #[doc = ""] pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result; } extern "C" { @@ -17939,6 +18990,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `titleId` - Pointer to write the title ID of current user's favourite game to."] + #[doc = ""] pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result; } extern "C" { @@ -17949,6 +19001,7 @@ extern "C" { #[doc = ""] #[doc = "* `comment` - Pointer to write the current user's comment to."] #[doc = "* `max_size` - Max size of the comment."] + #[doc = ""] pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { @@ -17961,6 +19014,7 @@ extern "C" { #[doc = "* `num` - Stores the number of friend keys obtained."] #[doc = "* `offset` - The index of the friend key to start with."] #[doc = "* `size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] + #[doc = ""] pub fn FRD_GetFriendKeyList( friendKeyList: *mut FriendKey, num: *mut u32_, @@ -17977,6 +19031,7 @@ extern "C" { #[doc = "* `miiDataList` - Pointer to write Mii data to."] #[doc = "* `friendKeyList` - Pointer to FriendKeys."] #[doc = "* `size` - Number of Friendkeys."] + #[doc = ""] pub fn FRD_GetFriendMii( miiDataList: *mut MiiData, friendKeyList: *const FriendKey, @@ -17992,6 +19047,7 @@ extern "C" { #[doc = "* `profile` - Pointer to write profile data to."] #[doc = "* `friendKeyList` - Pointer to FriendKeys."] #[doc = "* `size` - Number of FriendKeys."] + #[doc = ""] pub fn FRD_GetFriendProfile( profile: *mut FriendProfile, friendKeyList: *const FriendKey, @@ -18007,6 +19063,7 @@ extern "C" { #[doc = "* `desc` - Pointer to write Game Description data to."] #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] #[doc = "* `size` - Number Of FriendKeys."] + #[doc = ""] pub fn FRD_GetFriendPlayingGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -18022,6 +19079,7 @@ extern "C" { #[doc = "* `desc` - Pointer to write Game Description data to."] #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] #[doc = "* `count` - Number Of FriendKeys."] + #[doc = ""] pub fn FRD_GetFriendFavouriteGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -18036,6 +19094,7 @@ extern "C" { #[doc = ""] #[doc = "* `friendKeyList` - Pointer to a list of friend keys."] #[doc = "* `isFromList` - Pointer to a write the friendship status to."] + #[doc = ""] pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result; } extern "C" { @@ -18045,6 +19104,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `desc` - Pointer to write the game mode description to."] + #[doc = ""] pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result; } extern "C" { @@ -18054,6 +19114,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `event` - event which will be signaled."] + #[doc = ""] pub fn FRD_AttachToEventNotification(event: Handle) -> Result; } extern "C" { @@ -18065,6 +19126,7 @@ extern "C" { #[doc = "* `event` - Pointer to write recieved notification event struct to."] #[doc = "* `count` - Number of events"] #[doc = "* `recievedNotifCount` - Number of notification reccieved."] + #[doc = ""] pub fn FRD_GetEventNotification( event: *mut NotificationEvent, count: u32_, @@ -18079,6 +19141,7 @@ extern "C" { #[doc = ""] #[doc = "* `principalId` - The principal ID being used."] #[doc = "* `friendCode` - Pointer to write the friend code to."] + #[doc = ""] pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result; } extern "C" { @@ -18089,6 +19152,7 @@ extern "C" { #[doc = ""] #[doc = "* `friendCode` - The friend code being used."] #[doc = "* `principalId` - Pointer to write the principal ID to."] + #[doc = ""] pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result; } extern "C" { @@ -18099,6 +19163,7 @@ extern "C" { #[doc = ""] #[doc = "* `friendCode` - The friend code being used."] #[doc = "* `isValid` - Pointer to write the validity of the friend code to."] + #[doc = ""] pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result; } extern "C" { @@ -18108,6 +19173,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sdkVer` - The SDK version needed to be used."] + #[doc = ""] pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result; } extern "C" { @@ -18118,6 +19184,7 @@ extern "C" { #[doc = ""] #[doc = "* `event` - Event signaled when friend is registered."] #[doc = "* `principalId` - PrincipalId of the friend to add."] + #[doc = ""] pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result; } extern "C" { @@ -18128,6 +19195,7 @@ extern "C" { #[doc = ""] #[doc = "* `principalId` - PrinipalId of the friend code to remove."] #[doc = "* `localFriendCode` - LocalFriendCode of the friend code to remove."] + #[doc = ""] pub fn FRD_RemoveFriend(principalId: u32_, localFriendCode: u64_) -> Result; } #[doc = "Top screen."] @@ -18160,7 +19228,9 @@ extern "C" { extern "C" { #[doc = "Gets a pointer to the current gsp::Lcd session handle."] #[doc = ""] - #[doc = "Returns: A pointer to the current gsp::Lcd session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current gsp::Lcd session handle."] #[doc = ""] pub fn gspLcdGetSessionHandle() -> *mut Handle; } @@ -18183,6 +19253,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `screen` - Screen to power on."] + #[doc = ""] pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result; } extern "C" { @@ -18192,6 +19263,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `screen` - Screen to power off."] + #[doc = ""] pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result; } extern "C" { @@ -18201,6 +19273,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] + #[doc = ""] pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result; } extern "C" { @@ -18210,6 +19283,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `vendor` - Pointer to output the screen vendors to."] + #[doc = ""] pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result; } extern "C" { @@ -18220,6 +19294,7 @@ extern "C" { #[doc = ""] #[doc = "* `screen` - Screen to get the brightness value of."] #[doc = "* `brightness` - Brightness value returned."] + #[doc = ""] pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result; } extern "C" { @@ -18230,6 +19305,7 @@ extern "C" { #[doc = ""] #[doc = "* `screen` - Screen to set the brightness value of."] #[doc = "* `brightness` - Brightness value set."] + #[doc = ""] pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result; } extern "C" { @@ -18240,6 +19316,7 @@ extern "C" { #[doc = ""] #[doc = "* `screen` - Screen to set the brightness value of."] #[doc = "* `brightness` - Brightness value set."] + #[doc = ""] pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result; } #[doc = "A"] @@ -18458,12 +19535,13 @@ extern "C" { pub fn hidExit(); } extern "C" { - #[doc = "Sets the key repeat parameters for @ref hidKeysRepeat."] + #[doc = "Sets the key repeat parameters for [`hidKeysRepeat`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `delay` - Initial delay."] #[doc = "* `interval` - Repeat interval."] + #[doc = ""] pub fn hidSetRepeatParameters(delay: u32_, interval: u32_); } extern "C" { @@ -18476,7 +19554,9 @@ extern "C" { #[doc = ""] #[doc = "Individual buttons can be extracted using binary AND."] #[doc = ""] - #[doc = "Returns: 32-bit bitmask of held buttons (1+ frames)."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of held buttons (1+ frames)."] #[doc = ""] pub fn hidKeysHeld() -> u32_; } @@ -18485,7 +19565,9 @@ extern "C" { #[doc = ""] #[doc = "Individual buttons can be extracted using binary AND."] #[doc = ""] - #[doc = "Returns: 32-bit bitmask of newly pressed buttons."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of newly pressed buttons."] #[doc = ""] pub fn hidKeysDown() -> u32_; } @@ -18494,7 +19576,9 @@ extern "C" { #[doc = ""] #[doc = "Individual buttons can be extracted using binary AND."] #[doc = ""] - #[doc = "Returns: 32-bit bitmask of newly pressed or repeated buttons."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of newly pressed or repeated buttons."] #[doc = ""] pub fn hidKeysDownRepeat() -> u32_; } @@ -18503,7 +19587,9 @@ extern "C" { #[doc = ""] #[doc = "Individual buttons can be extracted using binary AND."] #[doc = ""] - #[doc = "Returns: 32-bit bitmask of newly released buttons."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of newly released buttons."] #[doc = ""] pub fn hidKeysUp() -> u32_; } @@ -18513,6 +19599,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `pos` - Pointer to output the touch position to."] + #[doc = ""] pub fn hidTouchRead(pos: *mut touchPosition); } extern "C" { @@ -18521,6 +19608,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `pos` - Pointer to output the circle pad position to."] + #[doc = ""] pub fn hidCircleRead(pos: *mut circlePosition); } extern "C" { @@ -18529,6 +19617,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `vector` - Pointer to output the accelerometer data to."] + #[doc = ""] pub fn hidAccelRead(vector: *mut accelVector); } extern "C" { @@ -18537,6 +19626,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `rate` - Pointer to output the gyroscope data to."] + #[doc = ""] pub fn hidGyroRead(rate: *mut angularRate); } extern "C" { @@ -18546,6 +19636,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the event."] #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = ""] pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool); } extern "C" { @@ -18557,6 +19648,7 @@ extern "C" { #[doc = "* `nextEvents` - Whether to discard the current events and wait for the next events."] #[doc = "* `cancelEvent` - Optional additional handle to wait on, otherwise 0."] #[doc = "* `timeout` - Timeout."] + #[doc = ""] pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result; } extern "C" { @@ -18571,6 +19663,7 @@ extern "C" { #[doc = "* `eventaccel` - Pointer to output the accelerometer event handle to."] #[doc = "* `eventgyro` - Pointer to output the gyroscope event handle to."] #[doc = "* `eventdebugpad` - Pointer to output the debug pad event handle to."] + #[doc = ""] pub fn HIDUSER_GetHandles( outMemHandle: *mut Handle, eventpad0: *mut Handle, @@ -18611,6 +19704,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `coeff` - Pointer to output the coefficient to."] + #[doc = ""] pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result; } extern "C" { @@ -18620,6 +19714,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `volume` - Pointer to write the volume slider value to."] + #[doc = ""] pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result; } extern "C" { @@ -18656,7 +19751,9 @@ extern "C" { extern "C" { #[doc = "Gets IRRST's held keys."] #[doc = ""] - #[doc = "Returns: IRRST's held keys."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* IRRST's held keys."] #[doc = ""] pub fn irrstKeysHeld() -> u32_; } @@ -18666,6 +19763,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `pos` - Pointer to output the current c-stick position to."] + #[doc = ""] pub fn irrstCstickRead(pos: *mut circlePosition); } extern "C" { @@ -18674,6 +19772,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `nextEvent` - Whether to discard the current event and wait until the next event."] + #[doc = ""] pub fn irrstWaitForEvent(nextEvent: bool); } extern "C" { @@ -18684,6 +19783,7 @@ extern "C" { #[doc = ""] #[doc = "* `outMemHandle` - Pointer to write the shared memory handle to."] #[doc = "* `outEventHandle` - Pointer to write the event handle to."] + #[doc = ""] pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result; } extern "C" { @@ -18694,6 +19794,7 @@ extern "C" { #[doc = ""] #[doc = "* `unk1` - Unknown."] #[doc = "* `unk2` - Unknown."] + #[doc = ""] pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result; } extern "C" { @@ -18732,7 +19833,7 @@ pub type SSLC_DefaultClientCert = ::libc::c_uint; pub const SSLCOPT_Default: _bindgen_ty_23 = 0; pub const SSLCOPT_DisableVerify: _bindgen_ty_23 = 512; pub const SSLCOPT_TLSv10: _bindgen_ty_23 = 2048; -#[doc = "sslc options. https://www.3dbrew.org/wiki/SSL_Services#SSLOpt"] +#[doc = "sslc options. "] #[doc = ""] pub type _bindgen_ty_23 = ::libc::c_uint; @@ -18754,6 +19855,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `RootCertChain_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { @@ -18763,6 +19865,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `RootCertChain_contexthandle` - RootCertChain contexthandle."] + #[doc = ""] pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { @@ -18774,6 +19877,7 @@ extern "C" { #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] #[doc = "* `cert` - Pointer to the DER cert."] #[doc = "* `certsize` - Size of the DER cert."] + #[doc = ""] pub fn sslcAddTrustedRootCA( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -18790,6 +19894,7 @@ extern "C" { #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] #[doc = "* `certID` - ID of the cert to add."] #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] + #[doc = ""] pub fn sslcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -18804,6 +19909,7 @@ extern "C" { #[doc = ""] #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] + #[doc = ""] pub fn sslcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -18816,6 +19922,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `CertChain_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result; } extern "C" { @@ -18825,6 +19932,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `CertChain_contexthandle` - CertChain contexthandle."] + #[doc = ""] pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result; } extern "C" { @@ -18836,6 +19944,7 @@ extern "C" { #[doc = "* `CertChain_contexthandle` - CertChain to use."] #[doc = "* `cert` - Pointer to the cert."] #[doc = "* `certsize` - Size of the cert."] + #[doc = ""] pub fn sslc8CertChainAddCert( CertChain_contexthandle: u32_, cert: *const u8_, @@ -18852,6 +19961,7 @@ extern "C" { #[doc = "* `CertChain_contexthandle` - CertChain to use."] #[doc = "* `certID` - ID of the cert to add."] #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] + #[doc = ""] pub fn sslc8CertChainAddDefaultCert( CertChain_contexthandle: u32_, certID: u8_, @@ -18866,6 +19976,7 @@ extern "C" { #[doc = ""] #[doc = "* `CertChain_contexthandle` - CertChain to use."] #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the CertChain."] + #[doc = ""] pub fn sslc8CertChainRemoveCert( CertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -18882,6 +19993,7 @@ extern "C" { #[doc = "* `key` - Pointer to the DER key."] #[doc = "* `keysize` - Size of the DER key."] #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -18898,6 +20010,7 @@ extern "C" { #[doc = ""] #[doc = "* `certID` - ID of the ClientCert to use."] #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -18910,6 +20023,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ClientCert_contexthandle` - ClientCert-context to use."] + #[doc = ""] pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { @@ -18926,6 +20040,7 @@ extern "C" { #[doc = ""] #[doc = "* `buf` - Output buffer."] #[doc = "* `size` - Output size."] + #[doc = ""] pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result; } extern "C" { @@ -18938,6 +20053,7 @@ extern "C" { #[doc = "* `sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] #[doc = "* `input_opt` - Input sslc options bitmask."] #[doc = "* `hostname` - Server hostname."] + #[doc = ""] pub fn sslcCreateContext( context: *mut sslcContext, sockfd: ::libc::c_int, @@ -19068,6 +20184,7 @@ extern "C" { #[doc = "* `context` - Context to open."] #[doc = "* `url` - URL to connect to."] #[doc = "* `use_defaultproxy` - Whether the default proxy should be used (0 for default)"] + #[doc = ""] pub fn httpcOpenContext( context: *mut httpcContext, method: HTTPC_RequestMethod, @@ -19082,6 +20199,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `context` - Context to close."] + #[doc = ""] pub fn httpcCloseContext(context: *mut httpcContext) -> Result; } extern "C" { @@ -19091,6 +20209,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `context` - Context to close."] + #[doc = ""] pub fn httpcCancelConnection(context: *mut httpcContext) -> Result; } extern "C" { @@ -19102,6 +20221,7 @@ extern "C" { #[doc = "* `context` - Context to use."] #[doc = "* `name` - Name of the field."] #[doc = "* `value` - Value of the field."] + #[doc = ""] pub fn httpcAddRequestHeaderField( context: *mut httpcContext, name: *const ::libc::c_char, @@ -19117,6 +20237,7 @@ extern "C" { #[doc = "* `context` - Context to use."] #[doc = "* `name` - Name of the field."] #[doc = "* `value` - Value of the field."] + #[doc = ""] pub fn httpcAddPostDataAscii( context: *mut httpcContext, name: *const ::libc::c_char, @@ -19133,6 +20254,7 @@ extern "C" { #[doc = "* `name` - Name of the field."] #[doc = "* `value` - The binary data to pass as a value."] #[doc = "* `len` - Length of the binary data which has been passed."] + #[doc = ""] pub fn httpcAddPostDataBinary( context: *mut httpcContext, name: *const ::libc::c_char, @@ -19149,6 +20271,7 @@ extern "C" { #[doc = "* `context` - Context to use."] #[doc = "* `data` - The data to be passed as raw into the body of the post request."] #[doc = "* `len` - Length of data passed by data param."] + #[doc = ""] pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result; } extern "C" { @@ -19158,6 +20281,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn httpcBeginRequest(context: *mut httpcContext) -> Result; } extern "C" { @@ -19169,6 +20293,7 @@ extern "C" { #[doc = "* `context` - Context to use."] #[doc = "* `buffer` - Buffer to receive data to."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result; } extern "C" { @@ -19181,6 +20306,7 @@ extern "C" { #[doc = "* `buffer` - Buffer to receive data to."] #[doc = "* `size` - Size of the buffer."] #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] + #[doc = ""] pub fn httpcReceiveDataTimeout( context: *mut httpcContext, buffer: *mut u8_, @@ -19196,6 +20322,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to use."] #[doc = "* `out` - Pointer to output the HTTP request state to."] + #[doc = ""] pub fn httpcGetRequestState( context: *mut httpcContext, out: *mut HTTPC_RequestStatus, @@ -19210,6 +20337,7 @@ extern "C" { #[doc = "* `context` - Context to use."] #[doc = "* `downloadedsize` - Pointer to output the downloaded size to."] #[doc = "* `contentsize` - Pointer to output the total content size to."] + #[doc = ""] pub fn httpcGetDownloadSizeState( context: *mut httpcContext, downloadedsize: *mut u32_, @@ -19224,6 +20352,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to get the response code of."] #[doc = "* `out` - Pointer to write the response code to."] + #[doc = ""] pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result; } extern "C" { @@ -19235,6 +20364,7 @@ extern "C" { #[doc = "* `context` - Context to get the response code of."] #[doc = "* `out` - Pointer to write the response code to."] #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] + #[doc = ""] pub fn httpcGetResponseStatusCodeTimeout( context: *mut httpcContext, out: *mut u32_, @@ -19251,6 +20381,7 @@ extern "C" { #[doc = "* `name` - Name of the field."] #[doc = "* `value` - Pointer to output the value of the field to."] #[doc = "* `valuebuf_maxsize` - Maximum size of the value buffer."] + #[doc = ""] pub fn httpcGetResponseHeader( context: *mut httpcContext, name: *const ::libc::c_char, @@ -19267,6 +20398,7 @@ extern "C" { #[doc = "* `context` - Context to use."] #[doc = "* `cert` - Pointer to DER cert."] #[doc = "* `certsize` - Size of the DER cert."] + #[doc = ""] pub fn httpcAddTrustedRootCA( context: *mut httpcContext, cert: *const u8_, @@ -19281,6 +20413,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to use."] #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = ""] pub fn httpcAddDefaultCert(context: *mut httpcContext, certID: SSLC_DefaultRootCert) -> Result; } extern "C" { @@ -19291,6 +20424,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to use."] #[doc = "* `RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] + #[doc = ""] pub fn httpcSelectRootCertChain( context: *mut httpcContext, RootCertChain_contexthandle: u32_, @@ -19307,6 +20441,7 @@ extern "C" { #[doc = "* `certsize` - Size of the DER cert."] #[doc = "* `privk` - Pointer to the DER private key."] #[doc = "* `privk_size` - Size of the privk."] + #[doc = ""] pub fn httpcSetClientCert( context: *mut httpcContext, cert: *const u8_, @@ -19323,6 +20458,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to use."] #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = ""] pub fn httpcSetClientCertDefault( context: *mut httpcContext, certID: SSLC_DefaultClientCert, @@ -19336,6 +20472,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to use."] #[doc = "* `ClientCert_contexthandle` - Contexthandle for the ClientCert."] + #[doc = ""] pub fn httpcSetClientCertContext( context: *mut httpcContext, ClientCert_contexthandle: u32_, @@ -19351,6 +20488,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to set flags on."] #[doc = "* `options` - SSL option flags."] + #[doc = ""] pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { @@ -19363,6 +20501,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to clear flags on."] #[doc = "* `options` - SSL option flags."] + #[doc = ""] pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { @@ -19372,6 +20511,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `RootCertChain_contexthandle` - Output RootCertChain contexthandle."] + #[doc = ""] pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { @@ -19381,6 +20521,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = ""] pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { @@ -19393,6 +20534,7 @@ extern "C" { #[doc = "* `cert` - Pointer to DER cert."] #[doc = "* `certsize` - Size of the DER cert."] #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] + #[doc = ""] pub fn httpcRootCertChainAddCert( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -19409,6 +20551,7 @@ extern "C" { #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] #[doc = "* `certID` - ID of the cert to add, see sslc.h."] #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] + #[doc = ""] pub fn httpcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -19423,6 +20566,7 @@ extern "C" { #[doc = ""] #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] #[doc = "* `cert_contexthandle` - Contexthandle of the cert to remove."] + #[doc = ""] pub fn httpcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -19439,6 +20583,7 @@ extern "C" { #[doc = "* `privk` - Pointer to the DER private key."] #[doc = "* `privk_size` - Size of the privk."] #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] + #[doc = ""] pub fn httpcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -19455,6 +20600,7 @@ extern "C" { #[doc = ""] #[doc = "* `certID` - ID of the cert to add, see sslc.h."] #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] + #[doc = ""] pub fn httpcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -19467,6 +20613,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ClientCert_contexthandle` - ClientCert context to use."] + #[doc = ""] pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { @@ -19481,6 +20628,7 @@ extern "C" { #[doc = "* `buffer` - Buffer to write data to."] #[doc = "* `size` - Size of the buffer."] #[doc = "* `downloadedsize` - Pointer to write the size of the downloaded data to."] + #[doc = ""] pub fn httpcDownloadData( context: *mut httpcContext, buffer: *mut u8_, @@ -19496,6 +20644,7 @@ extern "C" { #[doc = ""] #[doc = "* `context` - Context to set the KeepAlive flag on."] #[doc = "* `option` - HTTPC_KeepAlive option."] + #[doc = ""] pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result; } #[doc = "Node info struct."] @@ -19678,6 +20827,7 @@ extern "C" { #[doc = ""] #[doc = "* `sharedmem_size` - This must be 0x1000-byte aligned."] #[doc = "* `username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] + #[doc = ""] pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result; } extern "C" { @@ -19693,6 +20843,7 @@ extern "C" { #[doc = ""] #[doc = "* `nodeinfo` - Output NodeInfo struct."] #[doc = "* `username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] + #[doc = ""] pub fn udsGenerateNodeInfo( nodeinfo: *mut udsNodeInfo, username: *const ::libc::c_char, @@ -19706,6 +20857,7 @@ extern "C" { #[doc = ""] #[doc = "* `nodeinfo` - Input NodeInfo struct."] #[doc = "* `username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] + #[doc = ""] pub fn udsGetNodeInfoUsername( nodeinfo: *const udsNodeInfo, username: *mut ::libc::c_char, @@ -19717,6 +20869,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `nodeinfo` - Input NodeInfo struct."] + #[doc = ""] pub fn udsCheckNodeInfoInitialized(nodeinfo: *const udsNodeInfo) -> bool; } extern "C" { @@ -19728,6 +20881,7 @@ extern "C" { #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] #[doc = "* `max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] + #[doc = ""] pub fn udsGenerateDefaultNetworkStruct( network: *mut udsNetworkStruct, wlancommID: u32_, @@ -19746,6 +20900,7 @@ extern "C" { #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] #[doc = "* `host_macaddress` - When set, this code will only return network info from the specified host MAC address."] + #[doc = ""] pub fn udsScanBeacons( outbuf: *mut ::libc::c_void, maxsize: size_t, @@ -19765,6 +20920,7 @@ extern "C" { #[doc = ""] #[doc = "* `buf` - Appdata buffer."] #[doc = "* `size` - Size of the input appdata."] + #[doc = ""] pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result; } extern "C" { @@ -19776,6 +20932,7 @@ extern "C" { #[doc = "* `buf` - Appdata buffer."] #[doc = "* `size` - Max size of the output buffer."] #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] + #[doc = ""] pub fn udsGetApplicationData( buf: *mut ::libc::c_void, size: size_t, @@ -19791,6 +20948,7 @@ extern "C" { #[doc = "* `buf` - Appdata buffer."] #[doc = "* `size` - Max size of the output buffer."] #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] + #[doc = ""] pub fn udsGetNetworkStructApplicationData( network: *const udsNetworkStruct, buf: *mut ::libc::c_void, @@ -19809,6 +20967,7 @@ extern "C" { #[doc = "* `spectator` - False for a regular bind, true for a spectator."] #[doc = "* `data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] #[doc = "* `recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] + #[doc = ""] pub fn udsBind( bindcontext: *mut udsBindContext, NetworkNodeID: u16_, @@ -19824,18 +20983,22 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `bindcontext` - The bind context."] + #[doc = ""] pub fn udsUnbind(bindcontext: *mut udsBindContext) -> Result; } extern "C" { #[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] #[doc = ""] - #[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Always true. However if wait=false, this will return false if the event wasn't signaled."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `bindcontext` - The bind context."] #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] + #[doc = ""] pub fn udsWaitDataAvailable( bindcontext: *const udsBindContext, nextEvent: bool, @@ -19853,6 +21016,7 @@ extern "C" { #[doc = "* `size` - Size of the buffer."] #[doc = "* `actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] #[doc = "* `src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] + #[doc = ""] pub fn udsPullPacket( bindcontext: *const udsBindContext, buf: *mut ::libc::c_void, @@ -19872,6 +21036,7 @@ extern "C" { #[doc = "* `flags` - Send flags, see the UDS_SENDFLAG enum values."] #[doc = "* `buf` - Input send buffer."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn udsSendTo( dst_NetworkNodeID: u16_, data_channel: u8_, @@ -19887,6 +21052,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `channel` - Output channel."] + #[doc = ""] pub fn udsGetChannel(channel: *mut u8_) -> Result; } extern "C" { @@ -19901,6 +21067,7 @@ extern "C" { #[doc = "* `context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] + #[doc = ""] pub fn udsCreateNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -19924,6 +21091,7 @@ extern "C" { #[doc = "* `connection_type` - Type of connection, see the udsConnectionType enum values."] #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] + #[doc = ""] pub fn udsConnectNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -19954,6 +21122,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] + #[doc = ""] pub fn udsEjectClient(NetworkNodeID: u16_) -> Result; } extern "C" { @@ -19970,6 +21139,7 @@ extern "C" { #[doc = ""] #[doc = "* `bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] #[doc = "* `flag` - When false, bit-clear, otherwise bit-set."] + #[doc = ""] pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result; } extern "C" { @@ -19981,6 +21151,7 @@ extern "C" { #[doc = "* `block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] #[doc = "* `clients` - When true, (un)block regular clients."] #[doc = "* `flag` - When true, update UDSNETATTR_x4. Normally this should be false."] + #[doc = ""] pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result; } extern "C" { @@ -19996,17 +21167,21 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `output` - Output ConnectionStatus struct."] + #[doc = ""] pub fn udsGetConnectionStatus(output: *mut udsConnectionStatus) -> Result; } extern "C" { #[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] #[doc = ""] - #[doc = "Returns: Always true. However if wait=false, this will return false if the event wasn't signaled."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Always true. However if wait=false, this will return false if the event wasn't signaled."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] + #[doc = ""] pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool; } extern "C" { @@ -20017,6 +21192,7 @@ extern "C" { #[doc = ""] #[doc = "* `NetworkNodeID` - Target NetworkNodeID."] #[doc = "* `output` - Output NodeInfo struct."] + #[doc = ""] pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result; } pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0; @@ -20083,6 +21259,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - State specified in the ndmExclusiveState enumerator."] + #[doc = ""] pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result; } extern "C" { @@ -20098,6 +21275,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - Pointer to write the exclsuive state to."] + #[doc = ""] pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result; } extern "C" { @@ -20119,6 +21297,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mask` - The specified daemon."] + #[doc = ""] pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { @@ -20128,6 +21307,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mask` - The specified daemon."] + #[doc = ""] pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { @@ -20137,6 +21317,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `flag` - 0 = Wait for completion, 1 = Perform in background."] + #[doc = ""] pub fn NDMU_SuspendScheduler(flag: u32_) -> Result; } extern "C" { @@ -20152,6 +21333,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - Pointer to write the current state to."] + #[doc = ""] pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result; } extern "C" { @@ -20161,6 +21343,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - Pointer to write the daemons state to."] + #[doc = ""] pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result; } extern "C" { @@ -20170,6 +21353,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `interval` - Value to set the scan interval to."] + #[doc = ""] pub fn NDMU_SetScanInterval(interval: u32_) -> Result; } extern "C" { @@ -20179,6 +21363,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `interval` - Pointer to write the interval value to."] + #[doc = ""] pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result; } extern "C" { @@ -20188,6 +21373,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `interval` - Pointer to write the interval value to."] + #[doc = ""] pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result; } extern "C" { @@ -20203,6 +21389,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] + #[doc = ""] pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result; } extern "C" { @@ -20300,7 +21487,7 @@ pub struct NIM_TitleConfig { #[doc = "Age for the HOME Menu parental controls"] #[doc = ""] pub ratingAge: u8_, - #[doc = "Media type, see @ref FS_MediaType enum"] + #[doc = "Media type, see [`FS_MediaType`] enum"] #[doc = ""] pub mediaType: u8_, #[doc = "Padding"] @@ -20336,6 +21523,7 @@ extern "C" { #[doc = ""] #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] #[doc = "* `buffer_len` - Length of the passed buffer."] + #[doc = ""] pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result; } extern "C" { @@ -20346,7 +21534,8 @@ extern "C" { #[doc = ""] #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] #[doc = "* `buffer_len` - Length of the passed buffer."] - #[doc = "* `TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use @ref nimsInit instead."] + #[doc = "* `TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use [`nimsInit`] instead."] + #[doc = ""] pub fn nimsInitWithTIN( buffer: *mut ::libc::c_void, buffer_len: size_t, @@ -20371,6 +21560,7 @@ extern "C" { #[doc = ""] #[doc = "* `attr` - Name of the attribute."] #[doc = "* `val` - Value of the attribute."] + #[doc = ""] pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result; } extern "C" { @@ -20380,10 +21570,11 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `want_update` - Set to true if a system update is required. Can be NULL."] + #[doc = ""] pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result; } extern "C" { - #[doc = "Makes a TitleConfig struct for use with @ref NIMS_RegisterTask, @ref NIMS_StartDownload or @ref NIMS_StartDownloadSimple."] + #[doc = "Makes a TitleConfig struct for use with [`NIMS_RegisterTask`] [`NIMS_StartDownload`] or [`NIMS_StartDownloadSimple`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -20392,6 +21583,7 @@ extern "C" { #[doc = "* `version` - Version of the title to download and install."] #[doc = "* `ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] #[doc = "* `mediaType` - Media type of the title to download and install."] + #[doc = ""] pub fn NIMS_MakeTitleConfig( cfg: *mut NIM_TitleConfig, titleId: u64_, @@ -20406,9 +21598,10 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] + #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] #[doc = "* `name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] #[doc = "* `maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] + #[doc = ""] pub fn NIMS_RegisterTask( cfg: *const NIM_TitleConfig, name: *const ::libc::c_char, @@ -20423,6 +21616,7 @@ extern "C" { #[doc = ""] #[doc = "* `titleId` - Title ID to check for."] #[doc = "* `registered` - Whether there is a background download task registered."] + #[doc = ""] pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result; } extern "C" { @@ -20432,25 +21626,28 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `titleId` - Title ID whose background download task to cancel."] + #[doc = ""] pub fn NIMS_UnregisterTask(titleId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Starts an active download with NIM. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] + #[doc = "Starts an active download with NIM. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] - #[doc = "* `mode` - The installation mode to use. See @ref NIM_InstallationMode."] + #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] + #[doc = "* `mode` - The installation mode to use. See [`NIM_InstallationMode`]"] + #[doc = ""] pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result; } extern "C" { #[must_use] - #[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with @ref NIMS_GetProcess. Do not exit the process while a download is in progress without calling @ref NIMS_CancelDownload."] + #[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `cfg` - Title config to use. See @ref NIMS_MakeTitleConfig."] + #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] + #[doc = ""] pub fn NIMS_StartDownloadSimple(cfg: *const NIM_TitleConfig) -> Result; } extern "C" { @@ -20459,7 +21656,8 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `tp` - Title progress struct to write to. See @ref NIM_TitleProgress."] + #[doc = "* `tp` - Title progress struct to write to. See [`NIM_TitleProgress`]"] + #[doc = ""] pub fn NIMS_GetProgress(tp: *mut NIM_TitleProgress) -> Result; } extern "C" { @@ -20482,6 +21680,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `enableWifi` - True enables it, false disables it."] + #[doc = ""] pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result; } extern "C" { @@ -20494,6 +21693,7 @@ extern "C" { #[doc = ""] #[doc = "* `sharedmem_addr` - Address of the shared memory block to use."] #[doc = "* `sharedmem_size` - Size of the shared memory block."] + #[doc = ""] pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result; } extern "C" { @@ -20504,7 +21704,9 @@ extern "C" { extern "C" { #[doc = "Gets the IRU service handle."] #[doc = ""] - #[doc = "Returns: The IRU service handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The IRU service handle."] #[doc = ""] pub fn iruGetServHandle() -> Handle; } @@ -20517,6 +21719,7 @@ extern "C" { #[doc = "* `buf` - Buffer to send data from."] #[doc = "* `size` - Size of the buffer."] #[doc = "* `wait` - Whether to wait for the data to be sent."] + #[doc = ""] pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result; } extern "C" { @@ -20530,6 +21733,7 @@ extern "C" { #[doc = "* `flag` - Flags to receive data with."] #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] #[doc = "* `wait` - Whether to wait for the data to be received."] + #[doc = ""] pub fn iruRecvData( buf: *mut u8_, size: u32_, @@ -20558,6 +21762,7 @@ extern "C" { #[doc = ""] #[doc = "* `buf` - Buffer to send."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result; } extern "C" { @@ -20574,6 +21779,7 @@ extern "C" { #[doc = ""] #[doc = "* `size` - Size of the data to receive."] #[doc = "* `flag` - Flags to use when receiving."] + #[doc = ""] pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result; } extern "C" { @@ -20583,6 +21789,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] + #[doc = ""] pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result; } extern "C" { @@ -20592,6 +21799,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - Bit rate to set."] + #[doc = ""] pub fn IRU_SetBitRate(value: u8_) -> Result; } extern "C" { @@ -20601,6 +21809,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the bit rate to."] + #[doc = ""] pub fn IRU_GetBitRate(out: *mut u8_) -> Result; } extern "C" { @@ -20610,6 +21819,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - IR LED state to set."] + #[doc = ""] pub fn IRU_SetIRLEDState(value: u32_) -> Result; } extern "C" { @@ -20619,6 +21829,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the IR LED state to."] + #[doc = ""] pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result; } extern "C" { @@ -20639,6 +21850,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] + #[doc = ""] pub fn NS_LaunchFIRM(titleid: u64_) -> Result; } extern "C" { @@ -20650,6 +21862,7 @@ extern "C" { #[doc = "* `titleid` - ID of the title to launch, or 0 for gamecard."] #[doc = "* `launch_flags` - Flags used when launching the title."] #[doc = "* `procid` - Pointer to write the process ID of the launched title to."] + #[doc = ""] pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result; } extern "C" { @@ -20666,6 +21879,7 @@ extern "C" { #[doc = ""] #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard."] #[doc = "* `flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] + #[doc = ""] pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result; } extern "C" { @@ -20676,6 +21890,7 @@ extern "C" { #[doc = ""] #[doc = "* `mediatype` - Mediatype of the title."] #[doc = "* `titleid` - ID of the title to launch."] + #[doc = ""] pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result; } extern "C" { @@ -20686,6 +21901,7 @@ extern "C" { #[doc = ""] #[doc = "* `titleid` - ID of the title to terminate."] #[doc = "* `timeout` - Timeout in nanoseconds. Pass 0 if not required."] + #[doc = ""] pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result; } extern "C" { @@ -20726,7 +21942,9 @@ extern "C" { extern "C" { #[doc = "Gets the current pm:app session handle."] #[doc = ""] - #[doc = "Returns: The current pm:app session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current pm:app session handle."] #[doc = ""] pub fn pmAppGetSessionHandle() -> *mut Handle; } @@ -20738,6 +21956,7 @@ extern "C" { #[doc = ""] #[doc = "* `programInfo` - Program information of the title."] #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { @@ -20749,6 +21968,7 @@ extern "C" { #[doc = "* `programInfo` - Program information of the title."] #[doc = "* `programInfoUpdate` - Program information of the update title."] #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMAPP_LaunchTitleUpdate( programInfo: *const FS_ProgramInfo, programInfoUpdate: *const FS_ProgramInfo, @@ -20764,6 +21984,7 @@ extern "C" { #[doc = "* `outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] #[doc = "* `outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] #[doc = "* `programInfo` - Program information of the title."] + #[doc = ""] pub fn PMAPP_GetTitleExheaderFlags( outCoreInfo: *mut ExHeader_Arm11CoreInfo, outSiFlags: *mut ExHeader_SystemInfoFlags, @@ -20778,6 +21999,7 @@ extern "C" { #[doc = ""] #[doc = "* `size` - Size of the FIRM launch parameter buffer."] #[doc = "* `in` - Buffer to retrieve the launch parameters from."] + #[doc = ""] pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result; } extern "C" { @@ -20788,6 +22010,7 @@ extern "C" { #[doc = ""] #[doc = "* `size` - Size of the FIRM launch parameter buffer."] #[doc = "* `out` - Buffer to write the launch parameters to. [Direction: In, Out]"] + #[doc = ""] pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -20799,6 +22022,7 @@ extern "C" { #[doc = "* `firmTidLow` - Low Title ID of the FIRM title to launch."] #[doc = "* `size` - Size of the FIRM launch parameter buffer."] #[doc = "* `in` - Buffer to retrieve the launch parameters from."] + #[doc = ""] pub fn PMAPP_LaunchFIRMSetParams( firmTidLow: u32_, size: u32_, @@ -20812,6 +22036,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] + #[doc = ""] pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result; } extern "C" { @@ -20821,6 +22046,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `timeout` - Timeout in nanoseconds"] + #[doc = ""] pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result; } extern "C" { @@ -20831,6 +22057,7 @@ extern "C" { #[doc = ""] #[doc = "* `titleId` - Title ID of the processes to terminate"] #[doc = "* `timeout` - Timeout in nanoseconds"] + #[doc = ""] pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result; } extern "C" { @@ -20841,6 +22068,7 @@ extern "C" { #[doc = ""] #[doc = "* `pid` - Process-ID of the process to terminate"] #[doc = "* `timeout` - Timeout in nanoseconds"] + #[doc = ""] pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result; } extern "C" { @@ -20850,6 +22078,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `tid` - TitleID of the process to unregister"] + #[doc = ""] pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result; } extern "C" { @@ -20859,6 +22088,11 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cpuTime` - Reslimit value."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* cpuTime can be no higher than reslimitdesc[0] & 0x7F in exheader (or 80 if the latter is 0)."] + #[doc = ""] pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result; } extern "C" { @@ -20868,6 +22102,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] + #[doc = ""] pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result; } extern "C" { @@ -20884,7 +22119,9 @@ extern "C" { extern "C" { #[doc = "Gets the current pm:dbg session handle."] #[doc = ""] - #[doc = "Returns: The current pm:dbg session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current pm:dbg session handle."] #[doc = ""] pub fn pmDbgGetSessionHandle() -> *mut Handle; } @@ -20892,13 +22129,14 @@ extern "C" { #[must_use] #[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] #[doc = ""] - #[doc = "If another process was enqueued, this just calls @ref RunQueuedProcess instead."] + #[doc = "If another process was enqueued, this just calls [`RunQueuedProcess`] instead."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] #[doc = "* `programInfo` - Program information of the title."] #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMDBG_LaunchAppDebug( outDebug: *mut Handle, programInfo: *const FS_ProgramInfo, @@ -20913,6 +22151,7 @@ extern "C" { #[doc = ""] #[doc = "* `programInfo` - Program information of the title."] #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { @@ -20922,6 +22161,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] + #[doc = ""] pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result; } #[doc = "CBC encryption."] @@ -21028,6 +22268,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Session handle."] + #[doc = ""] pub fn psInitHandle(handle: Handle) -> Result; } extern "C" { @@ -21049,6 +22290,7 @@ extern "C" { #[doc = "* `hash` - SHA256 hash to sign."] #[doc = "* `ctx` - RSA context."] #[doc = "* `signature` - RSA signature."] + #[doc = ""] pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result; } extern "C" { @@ -21060,6 +22302,7 @@ extern "C" { #[doc = "* `hash` - SHA256 hash to compare with."] #[doc = "* `ctx` - RSA context."] #[doc = "* `signature` - RSA signature."] + #[doc = ""] pub fn PS_VerifyRsaSha256( hash: *mut u8_, ctx: *mut psRSAContext, @@ -21078,6 +22321,7 @@ extern "C" { #[doc = "* `aes_algo` - AES algorithm to use."] #[doc = "* `key_type` - Key type to use."] #[doc = "* `iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] + #[doc = ""] pub fn PS_EncryptDecryptAes( size: u32_, in_: *mut u8_, @@ -21105,6 +22349,7 @@ extern "C" { #[doc = "* `aes_algo` - AES algorithm to use."] #[doc = "* `key_type` - Key type to use."] #[doc = "* `nonce` - Pointer to the nonce."] + #[doc = ""] pub fn PS_EncryptSignDecryptVerifyAesCcm( in_: *mut u8_, in_size: u32_, @@ -21125,6 +22370,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `seed` - Pointer to write the friend code seed to."] + #[doc = ""] pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { @@ -21134,6 +22380,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `device_id` - Pointer to write the device ID to."] + #[doc = ""] pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result; } extern "C" { @@ -21144,6 +22391,7 @@ extern "C" { #[doc = ""] #[doc = "* `out` - Pointer to the buffer to write the bytes to."] #[doc = "* `len` - Number of bytes to write."] + #[doc = ""] pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result; } extern "C" { @@ -21160,7 +22408,9 @@ extern "C" { extern "C" { #[doc = "Gets a pointer to the current ptm:u session handle."] #[doc = ""] - #[doc = "Returns: A pointer to the current ptm:u session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:u session handle."] #[doc = ""] pub fn ptmuGetSessionHandle() -> *mut Handle; } @@ -21171,6 +22421,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] + #[doc = ""] pub fn PTMU_GetShellState(out: *mut u8_) -> Result; } extern "C" { @@ -21180,6 +22431,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the current battery level to. (0-5)"] + #[doc = ""] pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result; } extern "C" { @@ -21189,6 +22441,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] + #[doc = ""] pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result; } extern "C" { @@ -21198,6 +22451,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] + #[doc = ""] pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result; } extern "C" { @@ -21207,6 +22461,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `steps` - Pointer to write the total step count to."] + #[doc = ""] pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result; } extern "C" { @@ -21216,6 +22471,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the adapter state to."] + #[doc = ""] pub fn PTMU_GetAdapterState(out: *mut bool) -> Result; } #[doc = "PDN wake events and MCU interrupts to select, combined with those of other processes"] @@ -21240,15 +22496,15 @@ pub struct PtmSleepConfig { #[doc = ""] pub continue_sleep_events: PtmWakeEvents, } -#[doc = "@ref PTMSYSM_RequestSleep has been called (ack = 3)"] +#[doc = "[`PTMSYSM_RequestSleep`] has been called (ack = 3)"] #[doc = ""] pub const PTMNOTIFID_SLEEP_REQUESTED: _bindgen_ty_27 = 257; -#[doc = "The sleep request has been denied by @ref PTMSYSM_ReplyToSleepQuery(true) (no ack required)."] +#[doc = "The sleep request has been denied by [`PTMSYSM_ReplyToSleepQuery(true)`] (no ack required)."] #[doc = ""] pub const PTMNOTIFID_SLEEP_DENIED: _bindgen_ty_27 = 258; -#[doc = "The sleep request has been allowed by @ref PTMSYSM_ReplyToSleepQuery(false) (ack = 1)."] +#[doc = "The sleep request has been allowed by [`PTMSYSM_ReplyToSleepQuery(false)`] (ack = 1)."] #[doc = ""] pub const PTMNOTIFID_SLEEP_ALLOWED: _bindgen_ty_27 = 259; @@ -21295,7 +22551,9 @@ extern "C" { extern "C" { #[doc = "Gets a pointer to the current ptm:sysm session handle."] #[doc = ""] - #[doc = "Returns: A pointer to the current ptm:sysm session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:sysm session handle."] #[doc = ""] pub fn ptmSysmGetSessionHandle() -> *mut Handle; } @@ -21312,6 +22570,11 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `deny` - Whether or not to deny the sleep request."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If deny = false, this is equivalent to calling [`PTMSYSM_NotifySleepPreparationComplete(3)`]"] + #[doc = ""] pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result; } extern "C" { @@ -21320,7 +22583,12 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `ackValue` - Use @ref ptmSysmGetNotificationAckValue"] + #[doc = "* `ackValue` - Use [`ptmSysmGetNotificationAckValue`]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* [`PTMNOTIFID_SLEEP_DENIED`] and [`PTMNOTIFID_FULLY_AWAKE`] don't require this."] + #[doc = ""] pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result; } extern "C" { @@ -21329,7 +22597,12 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `sleepConfig` - Pointer to the two sets of wake events."] + #[doc = "* `sleepConfig` - Pointer to the two sets of wake events."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Can only be called just before acknowledging [`PTMNOTIFID_GOING_TO_SLEEP`] or [`PTMNOTIFID_HALF_AWAKE`]"] + #[doc = ""] pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result; } extern "C" { @@ -21339,6 +22612,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] + #[doc = ""] pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result; } extern "C" { @@ -21354,6 +22628,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + #[doc = ""] pub fn PTMSYSM_SetUserTime(msY2k: s64) -> Result; } extern "C" { @@ -21369,6 +22644,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] + #[doc = ""] pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result; } extern "C" { @@ -21378,6 +22654,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + #[doc = ""] pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result; } extern "C" { @@ -21393,6 +22670,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `value` - Bit0: enable higher clock, Bit1: enable L2 cache."] + #[doc = ""] pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result; } extern "C" { @@ -21402,6 +22680,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] + #[doc = ""] pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result; } extern "C" { @@ -21411,6 +22690,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] + #[doc = ""] pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result; } extern "C" { @@ -21427,7 +22707,9 @@ extern "C" { extern "C" { #[doc = "Gets a pointer to the current ptm:gets session handle."] #[doc = ""] - #[doc = "Returns: A pointer to the current ptm:gets session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:gets session handle."] #[doc = ""] pub fn ptmGetsGetSessionHandle() -> *mut Handle; } @@ -21438,6 +22720,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] + #[doc = ""] pub fn PTMGETS_GetSystemTime(outMsY2k: *mut s64) -> Result; } extern "C" { @@ -21454,7 +22737,9 @@ extern "C" { extern "C" { #[doc = "Gets a pointer to the current ptm:sets session handle."] #[doc = ""] - #[doc = "Returns: A pointer to the current ptm:sets session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:sets session handle."] #[doc = ""] pub fn ptmSetsGetSessionHandle() -> *mut Handle; } @@ -21465,6 +22750,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + #[doc = ""] pub fn PTMSETS_SetSystemTime(msY2k: s64) -> Result; } #[doc = "Do not wait."] @@ -21514,10 +22800,10 @@ pub struct PXIDEV_SPIBuffer { #[doc = "Data size."] #[doc = ""] pub size: u32_, - #[doc = "Transfer options. See @ref pxiDevMakeTransferOption"] + #[doc = "Transfer options. See [`pxiDevMakeTransferOption`]"] #[doc = ""] pub transferOption: u8_, - #[doc = "Wait operation. See @ref pxiDevMakeWaitOperation"] + #[doc = "Wait operation. See [`pxiDevMakeWaitOperation`]"] #[doc = ""] pub waitOperation: u64_, } @@ -21553,6 +22839,7 @@ extern "C" { #[doc = "* `writeBuffer2` - Buffer to make second transfer from."] #[doc = "* `readBuffer2` - Buffer to receive second response to."] #[doc = "* `footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] + #[doc = ""] pub fn PXIDEV_SPIMultiWriteRead( header: *mut PXIDEV_SPIBuffer, writeBuffer1: *mut PXIDEV_SPIBuffer, @@ -21572,6 +22859,7 @@ extern "C" { #[doc = "* `initialWaitOperation` - Wait operation to perform before transferring data."] #[doc = "* `writeBuffer` - Buffer to transfer data from."] #[doc = "* `readBuffer` - Buffer to receive data to."] + #[doc = ""] pub fn PXIDEV_SPIWriteRead( bytesRead: *mut u32_, initialWaitOperation: u64_, @@ -21593,7 +22881,9 @@ extern "C" { extern "C" { #[doc = "Gets the current PxiPM session handle."] #[doc = ""] - #[doc = "Returns: The current PxiPM session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current PxiPM session handle."] #[doc = ""] pub fn pxiPmGetSessionHandle() -> *mut Handle; } @@ -21605,6 +22895,7 @@ extern "C" { #[doc = ""] #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set."] #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } extern "C" { @@ -21616,6 +22907,7 @@ extern "C" { #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] #[doc = "* `programInfo` - Information about the program to load."] #[doc = "* `updateInfo` - Information about the program update to load."] + #[doc = ""] pub fn PXIPM_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -21629,6 +22921,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result; } #[repr(C)] @@ -22392,11 +23685,11 @@ pub struct ip_mreq { #[doc = ""] pub const NETOPT_MAC_ADDRESS: NetworkOpt = 4100; -#[doc = "The ARP table @see SOCU_ARPTableEntry"] +#[doc = "The ARP table [`SOCU_ARPTableEntry`]"] #[doc = ""] pub const NETOPT_ARP_TABLE: NetworkOpt = 12290; -#[doc = "The current IP setup @see SOCU_IPInfo"] +#[doc = "The current IP setup [`SOCU_IPInfo`]"] #[doc = ""] pub const NETOPT_IP_INFO: NetworkOpt = 16387; @@ -22404,7 +23697,7 @@ pub const NETOPT_IP_INFO: NetworkOpt = 16387; #[doc = ""] pub const NETOPT_IP_MTU: NetworkOpt = 16388; -#[doc = "The routing table @see SOCU_RoutingTableEntry"] +#[doc = "The routing table [`SOCU_RoutingTableEntry`]"] #[doc = ""] pub const NETOPT_ROUTING_TABLE: NetworkOpt = 16390; @@ -22412,7 +23705,7 @@ pub const NETOPT_ROUTING_TABLE: NetworkOpt = 16390; #[doc = ""] pub const NETOPT_UDP_NUMBER: NetworkOpt = 32770; -#[doc = "The table of opened UDP sockets @see SOCU_UDPTableEntry"] +#[doc = "The table of opened UDP sockets [`SOCU_UDPTableEntry`]"] #[doc = ""] pub const NETOPT_UDP_TABLE: NetworkOpt = 32771; @@ -22420,11 +23713,11 @@ pub const NETOPT_UDP_TABLE: NetworkOpt = 32771; #[doc = ""] pub const NETOPT_TCP_NUMBER: NetworkOpt = 36866; -#[doc = "The table of opened TCP sockets @see SOCU_TCPTableEntry"] +#[doc = "The table of opened TCP sockets [`SOCU_TCPTableEntry`]"] #[doc = ""] pub const NETOPT_TCP_TABLE: NetworkOpt = 36867; -#[doc = "The table of the DNS servers @see SOCU_DNSTableEntry -- Returns a buffer of size 336 but only 2 entries are set ?"] +#[doc = "The table of the DNS servers [`SOCU_DNSTableEntry`] -- Returns a buffer of size 336 but only 2 entries are set ?"] #[doc = ""] pub const NETOPT_DNS_TABLE: NetworkOpt = 45059; @@ -22432,11 +23725,11 @@ pub const NETOPT_DNS_TABLE: NetworkOpt = 45059; #[doc = ""] pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153; -#[doc = "Options to be used with @ref SOCU_GetNetworkOpt"] +#[doc = "Options to be used with [`SOCU_GetNetworkOpt`]"] #[doc = ""] pub type NetworkOpt = ::libc::c_uint; -#[doc = "One entry of the ARP table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_ARP_TABLE"] +#[doc = "One entry of the ARP table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_ARP_TABLE`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -22450,7 +23743,7 @@ pub struct SOCU_ARPTableEntry { pub mac: [u8_; 6usize], pub padding: [u8_; 2usize], } -#[doc = "Structure returned by @ref SOCU_GetNetworkOpt when using @ref NETOPT_IP_INFO"] +#[doc = "Structure returned by [`SOCU_GetNetworkOpt`] when using [`NETOPT_IP_INFO`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -22465,7 +23758,7 @@ pub struct SOCU_IPInfo { #[doc = ""] pub broadcast: in_addr, } -#[doc = "One entry of the routing table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_ROUTING_TABLE"] +#[doc = "One entry of the routing table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_ROUTING_TABLE`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -22479,14 +23772,14 @@ pub struct SOCU_RoutingTableEntry { #[doc = "Gateway address to reach the network"] #[doc = ""] pub gateway: in_addr, - #[doc = "Linux netstat flags @see ROUTING_FLAG_G"] + #[doc = "Linux netstat flags [`ROUTING_FLAG_G`]"] #[doc = ""] pub flags: u32_, #[doc = "number of milliseconds since 1st Jan 1900 00:00."] #[doc = ""] pub time: u64_, } -#[doc = "One entry of the UDP sockets table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_UDP_TABLE"] +#[doc = "One entry of the UDP sockets table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_UDP_TABLE`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -22498,12 +23791,12 @@ pub struct SOCU_UDPTableEntry { #[doc = ""] pub remote: sockaddr_storage, } -#[doc = "One entry of the TCP sockets table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_TCP_TABLE"] +#[doc = "One entry of the TCP sockets table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_TCP_TABLE`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_TCPTableEntry { - #[doc = "@see TCP states defines"] + #[doc = "[`TCP`] states defines"] #[doc = ""] pub state: u32_, #[doc = "Local address information"] @@ -22513,7 +23806,7 @@ pub struct SOCU_TCPTableEntry { #[doc = ""] pub remote: sockaddr_storage, } -#[doc = "One entry of the DNS servers table retrieved by using @ref SOCU_GetNetworkOpt and @ref NETOPT_DNS_TABLE"] +#[doc = "One entry of the DNS servers table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_DNS_TABLE`]"] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -22534,18 +23827,29 @@ extern "C" { #[doc = ""] #[doc = "* `context_addr` - Address of a page-aligned (0x1000) buffer to be used."] #[doc = "* `context_size` - Size of the buffer, a multiple of 0x1000."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The specified context buffer can no longer be accessed by the process which called this function, since the userland permissions for this block are set to no-access."] + #[doc = ""] pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result; } extern "C" { #[must_use] #[doc = "Closes the soc service."] #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* You need to call this in order to be able to use the buffer again."] + #[doc = ""] pub fn socExit() -> Result; } extern "C" { #[doc = "Gets the system's host ID."] #[doc = ""] - #[doc = "Returns: The system's host ID."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The system's host ID."] #[doc = ""] pub fn gethostid() -> ::libc::c_long; } @@ -22561,14 +23865,17 @@ extern "C" { extern "C" { #[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] #[doc = ""] - #[doc = "Returns: 0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `level` - Only value allowed seems to be @ref SOL_CONFIG"] + #[doc = "* `level` - Only value allowed seems to be [`SOL_CONFIG`]"] #[doc = "* `optname` - The option to be retrieved"] #[doc = "* `optval` - Will contain the output of the command"] #[doc = "* `optlen` - Size of the optval buffer, will be updated to hold the size of the output"] + #[doc = ""] pub fn SOCU_GetNetworkOpt( level: ::libc::c_int, optname: NetworkOpt, @@ -22579,7 +23886,9 @@ extern "C" { extern "C" { #[doc = "Gets the system's IP address, netmask, and subnet broadcast"] #[doc = ""] - #[doc = "Returns: Error"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* error"] #[doc = ""] pub fn SOCU_GetIPInfo( ip: *mut in_addr, @@ -22590,11 +23899,14 @@ extern "C" { extern "C" { #[doc = "Adds a global socket."] #[doc = ""] - #[doc = "Returns: Error"] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* error"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sockfd` - The socket fd."] + #[doc = ""] pub fn SOCU_AddGlobalSocket(sockfd: ::libc::c_int) -> ::libc::c_int; } #[doc = "Unsigned 8-bit PCM."] @@ -22645,6 +23957,7 @@ extern "C" { #[doc = ""] #[doc = "* `size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] #[doc = "* `handle` - Size of the shared memory buffer."] + #[doc = ""] pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result; } extern "C" { @@ -22655,14 +23968,18 @@ extern "C" { extern "C" { #[doc = "Gets the size of the sample data area within the shared memory buffer."] #[doc = ""] - #[doc = "Returns: The sample data's size."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The sample data's size."] #[doc = ""] pub fn micGetSampleDataSize() -> u32_; } extern "C" { #[doc = "Gets the offset within the shared memory buffer of the last sample written."] #[doc = ""] - #[doc = "Returns: The last sample's offset."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The last sample's offset."] #[doc = ""] pub fn micGetLastSampleOffset() -> u32_; } @@ -22674,6 +23991,7 @@ extern "C" { #[doc = ""] #[doc = "* `size` - Size of the shared memory."] #[doc = "* `handle` - Handle of the shared memory."] + #[doc = ""] pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result; } extern "C" { @@ -22693,6 +24011,7 @@ extern "C" { #[doc = "* `sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] #[doc = "* `sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] #[doc = "* `loop` - Whether to loop back to the beginning of the buffer when the end is reached."] + #[doc = ""] pub fn MICU_StartSampling( encoding: MICU_Encoding, sampleRate: MICU_SampleRate, @@ -22708,6 +24027,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sampleRate` - Sample rate of outputted audio."] + #[doc = ""] pub fn MICU_AdjustSampling(sampleRate: MICU_SampleRate) -> Result; } extern "C" { @@ -22723,6 +24043,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sampling` - Pointer to output the sampling state to."] + #[doc = ""] pub fn MICU_IsSampling(sampling: *mut bool) -> Result; } extern "C" { @@ -22732,6 +24053,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `handle` - Pointer to output the event handle to."] + #[doc = ""] pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result; } extern "C" { @@ -22741,6 +24063,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `gain` - Gain to set."] + #[doc = ""] pub fn MICU_SetGain(gain: u8_) -> Result; } extern "C" { @@ -22750,6 +24073,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `gain` - Pointer to output the current gain to."] + #[doc = ""] pub fn MICU_GetGain(gain: *mut u8_) -> Result; } extern "C" { @@ -22759,6 +24083,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `power` - Whether the microphone is powered on."] + #[doc = ""] pub fn MICU_SetPower(power: bool) -> Result; } extern "C" { @@ -22768,6 +24093,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `power` - Pointer to output the power state to."] + #[doc = ""] pub fn MICU_GetPower(power: *mut bool) -> Result; } extern "C" { @@ -22777,6 +24103,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `clamp` - Whether to clamp microphone input."] + #[doc = ""] pub fn MICU_SetClamp(clamp: bool) -> Result; } extern "C" { @@ -22786,6 +24113,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `clamp` - Pointer to output the clamp state to."] + #[doc = ""] pub fn MICU_GetClamp(clamp: *mut bool) -> Result; } extern "C" { @@ -22795,6 +24123,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `allowShellClosed` - Whether to allow sampling when the shell is closed."] + #[doc = ""] pub fn MICU_SetAllowShellClosed(allowShellClosed: bool) -> Result; } #[doc = "Converting color formats."] @@ -22966,7 +24295,7 @@ impl Default for MVDSTD_OutputBuffersEntryList { } } } -#[doc = "This can be used to override the default input values for MVDSTD commands during initialization with video-processing. The default for these fields are all-zero, except for cmd1b_inval which is 1. See also here: https://www.3dbrew.org/wiki/MVD_Services"] +#[doc = "This can be used to override the default input values for MVDSTD commands during initialization with video-processing. The default for these fields are all-zero, except for cmd1b_inval which is 1. See also here: "] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -22988,6 +24317,7 @@ extern "C" { #[doc = "* `output_type` - Type of output to produce."] #[doc = "* `size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] #[doc = "* `initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] + #[doc = ""] pub fn mvdstdInit( mode: MVDSTD_Mode, input_type: MVDSTD_InputFormat, @@ -23014,6 +24344,7 @@ extern "C" { #[doc = "* `vaddr_colorconv_indata` - Virtual address of the color conversion input data."] #[doc = "* `vaddr_outdata0` - Virtual address of the output data."] #[doc = "* `vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] + #[doc = ""] pub fn mvdstdGenerateDefaultConfig( config: *mut MVDSTD_Config, input_width: u32_, @@ -23032,6 +24363,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `config` - Pointer to the configuration to use."] + #[doc = ""] pub fn mvdstdConvertImage(config: *mut MVDSTD_Config) -> Result; } extern "C" { @@ -23042,8 +24374,9 @@ extern "C" { #[doc = ""] #[doc = "* `inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `flag` - See here regarding this input flag: https://www.3dbrew.org/wiki/MVDSTD:ProcessNALUnit"] + #[doc = "* `flag` - See here regarding this input flag: "] #[doc = "* `out` - Optional output MVDSTD_ProcessNALUnitOut structure."] + #[doc = ""] pub fn mvdstdProcessVideoFrame( inbuf_vaddr: *mut ::libc::c_void, size: size_t, @@ -23059,6 +24392,7 @@ extern "C" { #[doc = ""] #[doc = "* `config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] #[doc = "* `wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] + #[doc = ""] pub fn mvdstdRenderVideoFrame(config: *mut MVDSTD_Config, wait: bool) -> Result; } extern "C" { @@ -23068,16 +24402,18 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `config` - Pointer to the configuration to set."] + #[doc = ""] pub fn MVDSTD_SetConfig(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] - #[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: https://www.3dbrew.org/wiki/MVDSTD:SetupOutputBuffers"] + #[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `entrylist` - Input entrylist."] #[doc = "* `bufsize` - Size of each buffer from the entrylist."] + #[doc = ""] pub fn mvdstdSetupOutputBuffers( entrylist: *mut MVDSTD_OutputBuffersEntryList, bufsize: u32_, @@ -23085,7 +24421,7 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: https://www.3dbrew.org/wiki/MVDSTD:OverrideOutputBuffers"] + #[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -23093,6 +24429,7 @@ extern "C" { #[doc = "* `cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] #[doc = "* `new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] #[doc = "* `new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] + #[doc = ""] pub fn mvdstdOverrideOutputBuffers( cur_outdata0: *mut ::libc::c_void, cur_outdata1: *mut ::libc::c_void, @@ -23162,7 +24499,7 @@ impl Default for NFC_TagInfo { } } } -#[doc = "AmiiboSettings structure, see also here: https://3dbrew.org/wiki/NFC:GetAmiiboSettings"] +#[doc = "AmiiboSettings structure, see also here: "] #[doc = ""] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -23189,7 +24526,7 @@ impl Default for NFC_AmiiboSettings { } } } -#[doc = "AmiiboConfig structure, see also here: https://3dbrew.org/wiki/NFC:GetAmiiboConfig"] +#[doc = "AmiiboConfig structure, see also here: "] #[doc = ""] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -23224,7 +24561,7 @@ impl Default for NFC_AmiiboConfig { } } } -#[doc = "Used by nfcInitializeWriteAppData() internally, see also here: https://3dbrew.org/wiki/NFC:GetAppDataInitStruct"] +#[doc = "Used by nfcInitializeWriteAppData() internally, see also here: "] #[doc = ""] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -23241,7 +24578,7 @@ impl Default for NFC_AppDataInitStruct { } } } -#[doc = "Used by nfcWriteAppData() internally, see also: https://3dbrew.org/wiki/NFC:WriteAppData"] +#[doc = "Used by nfcWriteAppData() internally, see also: "] #[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -23257,6 +24594,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `type` - See the NFC_OpType enum."] + #[doc = ""] pub fn nfcInit(type_: NFC_OpType) -> Result; } extern "C" { @@ -23267,7 +24605,9 @@ extern "C" { extern "C" { #[doc = "Gets the NFC service handle."] #[doc = ""] - #[doc = "Returns: The NFC service handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The NFC service handle."] #[doc = ""] pub fn nfcGetSessionHandle() -> Handle; } @@ -23278,6 +24618,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] + #[doc = ""] pub fn nfcStartScanning(inval: u16_) -> Result; } extern "C" { @@ -23310,6 +24651,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - Pointer to write NFC tag state."] + #[doc = ""] pub fn nfcGetTagState(state: *mut NFC_TagState) -> Result; } extern "C" { @@ -23319,15 +24661,17 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the output TagInfo."] + #[doc = ""] pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: https://3dbrew.org/wiki/NFC:OpenAppData"] + #[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `amiibo_appid` - Amiibo AppID. See here: https://www.3dbrew.org/wiki/Amiibo"] + #[doc = "* `amiibo_appid` - Amiibo AppID. See here: "] + #[doc = ""] pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result; } extern "C" { @@ -23339,6 +24683,7 @@ extern "C" { #[doc = "* `amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] #[doc = "* `buf` - Input buffer."] #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn nfcInitializeWriteAppData( amiibo_appid: u32_, buf: *const ::libc::c_void, @@ -23353,17 +24698,19 @@ extern "C" { #[doc = ""] #[doc = "* `buf` - Output buffer."] #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: https://3dbrew.org/wiki/NFC:WriteAppData"] + #[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `buf` - Input buffer."] #[doc = "* `size` - Buffer size."] #[doc = "* `taginfo` - TagInfo from nfcGetTagInfo()."] + #[doc = ""] pub fn nfcWriteAppData( buf: *const ::libc::c_void, size: size_t, @@ -23377,6 +24724,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the output AmiiboSettings."] + #[doc = ""] pub fn nfcGetAmiiboSettings(out: *mut NFC_AmiiboSettings) -> Result; } extern "C" { @@ -23386,21 +24734,23 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the output AmiiboConfig."] + #[doc = ""] pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: https://www.3dbrew.org/wiki/NFC:StartOtherTagScanning"] + #[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `unk0` - Same as nfcStartScanning() input."] #[doc = "* `unk1` - Unknown."] + #[doc = ""] pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: https://www.3dbrew.org/wiki/NFC:SendTagCommand"] + #[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: "] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] @@ -23410,6 +24760,7 @@ extern "C" { #[doc = "* `outsize` - Size of the output buffer."] #[doc = "* `actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] #[doc = "* `microseconds` - Timing-related field in microseconds."] + #[doc = ""] pub fn nfcSendTagCommand( inbuf: *const ::libc::c_void, insize: size_t, @@ -23473,6 +24824,7 @@ extern "C" { #[doc = "* `image` - Data of the image to show in the notification, or NULL for no image."] #[doc = "* `imageSize` - Size of the image data in bytes."] #[doc = "* `jpeg` - Whether the image is a JPEG or not."] + #[doc = ""] pub fn NEWS_AddNotification( title: *const u16_, titleLength: u32_, @@ -23490,6 +24842,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `num` - Pointer where total number will be saved."] + #[doc = ""] pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result; } extern "C" { @@ -23500,6 +24853,7 @@ extern "C" { #[doc = ""] #[doc = "* `news_id` - Identification number of the notification."] #[doc = "* `header` - Pointer to notification header to set."] + #[doc = ""] pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result; } extern "C" { @@ -23510,6 +24864,7 @@ extern "C" { #[doc = ""] #[doc = "* `news_id` - Identification number of the notification."] #[doc = "* `header` - Pointer where header of the notification will be saved."] + #[doc = ""] pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result; } extern "C" { @@ -23521,6 +24876,7 @@ extern "C" { #[doc = "* `news_id` - Identification number of the notification."] #[doc = "* `message` - Pointer to UTF-16 message to set."] #[doc = "* `size` - Size of message to set."] + #[doc = ""] pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result; } extern "C" { @@ -23532,6 +24888,7 @@ extern "C" { #[doc = "* `news_id` - Identification number of the notification."] #[doc = "* `message` - Pointer where UTF-16 message of the notification will be saved."] #[doc = "* `size` - Pointer where size of the message data will be saved in bytes."] + #[doc = ""] pub fn NEWS_GetNotificationMessage( news_id: u32_, message: *mut u16_, @@ -23547,6 +24904,7 @@ extern "C" { #[doc = "* `news_id` - Identification number of the notification."] #[doc = "* `buffer` - Pointer to MPO image to set."] #[doc = "* `size` - Size of the MPO image to set."] + #[doc = ""] pub fn NEWS_SetNotificationImage( news_id: u32_, buffer: *const ::libc::c_void, @@ -23562,6 +24920,7 @@ extern "C" { #[doc = "* `news_id` - Identification number of the notification."] #[doc = "* `buffer` - Pointer where MPO image of the notification will be saved."] #[doc = "* `size` - Pointer where size of the image data will be saved in bytes."] + #[doc = ""] pub fn NEWS_GetNotificationImage( news_id: u32_, buffer: *mut ::libc::c_void, @@ -23615,7 +24974,9 @@ extern "C" { extern "C" { #[doc = "Checks whether QTM is initialized."] #[doc = ""] - #[doc = "Returns: Whether QTM is initialized."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether QTM is initialized."] #[doc = ""] pub fn qtmCheckInitialized() -> bool; } @@ -23625,6 +24986,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `info` - Tracking info to check."] + #[doc = ""] pub fn qtmCheckHeadFullyDetected(info: *mut QTM_HeadTrackingInfo) -> bool; } extern "C" { @@ -23638,6 +25000,7 @@ extern "C" { #[doc = "* `screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] #[doc = "* `x` - Pointer to output the screen X coordinate to."] #[doc = "* `y` - Pointer to output the screen Y coordinate to."] + #[doc = ""] pub fn qtmConvertCoordToScreen( coord: *mut QTM_HeadTrackingInfoCoord, screen_width: *mut f32, @@ -23654,6 +25017,7 @@ extern "C" { #[doc = ""] #[doc = "* `val` - Normally 0."] #[doc = "* `out` - Pointer to write head tracking info to."] + #[doc = ""] pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result; } extern "C" { @@ -23670,7 +25034,9 @@ extern "C" { extern "C" { #[doc = "Gets the current srv:pm session handle."] #[doc = ""] - #[doc = "Returns: The current srv:pm session handle."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current srv:pm session handle."] #[doc = ""] pub fn srvPmGetSessionHandle() -> *mut Handle; } @@ -23682,6 +25048,7 @@ extern "C" { #[doc = ""] #[doc = "* `notificationId` - ID of the notification."] #[doc = "* `process` - Process to publish to."] + #[doc = ""] pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result; } extern "C" { @@ -23691,6 +25058,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result; } extern "C" { @@ -23702,6 +25070,7 @@ extern "C" { #[doc = "* `pid` - ID of the process."] #[doc = "* `count` - Number of services within the service access control data."] #[doc = "* `serviceAccessControlList` - Service Access Control list."] + #[doc = ""] pub fn SRVPM_RegisterProcess( pid: u32_, count: u32_, @@ -23715,6 +25084,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `pid` - ID of the process."] + #[doc = ""] pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result; } extern "C" { @@ -23736,6 +25106,7 @@ extern "C" { #[doc = ""] #[doc = "* `process` - Pointer to output the process handle to. [Direction: In, Out]"] #[doc = "* `programHandle` - The handle of the program to load."] + #[doc = ""] pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result; } extern "C" { @@ -23747,6 +25118,7 @@ extern "C" { #[doc = "* `programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] #[doc = "* `programInfo` - The program info."] #[doc = "* `programInfo` - The program update info."] + #[doc = ""] pub fn LOADER_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -23760,16 +25132,18 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `programHandle` - The handle of the program to unregister."] + #[doc = ""] pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see @ref ExHeader_Info)."] + #[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see [`ExHeader_Info)`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] #[doc = "* `programHandle` - The handle of the program to unregister"] + #[doc = ""] pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } #[doc = "The normal mode of the led"] @@ -23814,9 +25188,10 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] + #[doc = "* `reg` - Register number. See for more info"] #[doc = "* `data` - Pointer to write the data to."] #[doc = "* `size` - Size of data to be read"] + #[doc = ""] pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -23825,9 +25200,10 @@ extern "C" { #[doc = ""] #[doc = "# Arguments"] #[doc = ""] - #[doc = "* `reg` - Register number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info"] + #[doc = "* `reg` - Register number. See for more info"] #[doc = "* `data` - Pointer to write the data to."] #[doc = "* `size` - Size of data to be written"] + #[doc = ""] pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { @@ -23837,6 +25213,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `voltage` - Pointer to write the battery voltage to."] + #[doc = ""] pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result; } extern "C" { @@ -23846,6 +25223,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `level` - Pointer to write the current battery level to."] + #[doc = ""] pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result; } extern "C" { @@ -23855,6 +25233,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `level` - Pointer to write the slider level to."] + #[doc = ""] pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result; } extern "C" { @@ -23864,6 +25243,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - State of Wifi LED. (True/False)"] + #[doc = ""] pub fn MCUHWC_SetWifiLedState(state: bool) -> Result; } extern "C" { @@ -23873,6 +25253,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `state` - powerLedState State of power LED."] + #[doc = ""] pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result; } extern "C" { @@ -23882,6 +25263,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `level` - Pointer to write 3D slider level to."] + #[doc = ""] pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result; } extern "C" { @@ -23891,6 +25273,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the major firmware version to."] + #[doc = ""] pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result; } extern "C" { @@ -23900,6 +25283,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `out` - Pointer to write the minor firmware version to."] + #[doc = ""] pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result; } #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] @@ -23924,6 +25308,8 @@ pub const GX_TRANSFER_FMT_RGB5A1: GX_TRANSFER_FORMAT = 3; pub const GX_TRANSFER_FMT_RGBA4: GX_TRANSFER_FORMAT = 4; #[doc = "Supported transfer pixel formats."] #[doc = ""] +#[doc = "[`GSPGPU_FramebufferFormat`]"] +#[doc = ""] pub type GX_TRANSFER_FORMAT = ::libc::c_uint; #[doc = "No anti-aliasing"] @@ -23940,7 +25326,6 @@ pub const GX_TRANSFER_SCALE_X: GX_TRANSFER_SCALE = 1; pub const GX_TRANSFER_SCALE_XY: GX_TRANSFER_SCALE = 2; #[doc = "Anti-aliasing modes"] #[doc = ""] -#[doc = ""] #[doc = "Please remember that the framebuffer is sideways."] #[doc = "Hence if you activate 2x1 anti-aliasing the destination dimensions are w = 240*2 and h = 400"] #[doc = ""] @@ -24048,6 +25433,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `queue` - The GX command queue."] + #[doc = ""] pub fn gxCmdQueueClear(queue: *mut gxCmdQueue_s); } extern "C" { @@ -24057,6 +25443,7 @@ extern "C" { #[doc = ""] #[doc = "* `queue` - The GX command queue."] #[doc = "* `entry` - The GX command to add."] + #[doc = ""] pub fn gxCmdQueueAdd(queue: *mut gxCmdQueue_s, entry: *const gxCmdEntry_s); } extern "C" { @@ -24065,6 +25452,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `queue` - The GX command queue."] + #[doc = ""] pub fn gxCmdQueueRun(queue: *mut gxCmdQueue_s); } extern "C" { @@ -24073,17 +25461,21 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `queue` - The GX command queue."] + #[doc = ""] pub fn gxCmdQueueStop(queue: *mut gxCmdQueue_s); } extern "C" { #[doc = "Waits for a GX command queue to finish executing pending commands."] #[doc = ""] - #[doc = "Returns: False if timeout expired, true otherwise."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* false if timeout expired, true otherwise."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `queue` - The GX command queue."] #[doc = "* `timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] + #[doc = ""] pub fn gxCmdQueueWait(queue: *mut gxCmdQueue_s, timeout: s64) -> bool; } extern "C" { @@ -24092,6 +25484,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] + #[doc = ""] pub fn GX_BindQueue(queue: *mut gxCmdQueue_s); } extern "C" { @@ -24103,6 +25496,7 @@ extern "C" { #[doc = "* `src` - Source to DMA from."] #[doc = "* `dst` - Destination to DMA to."] #[doc = "* `length` - Length of data to transfer."] + #[doc = ""] pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result; } extern "C" { @@ -24114,6 +25508,7 @@ extern "C" { #[doc = "* `buf0a` - Command list address."] #[doc = "* `buf0s` - Command list size."] #[doc = "* `flags` - Flags to process with."] + #[doc = ""] pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result; } extern "C" { @@ -24130,6 +25525,7 @@ extern "C" { #[doc = "* `buf1v` - Dimensions of the second buffer."] #[doc = "* `buf1e` - End address of the second buffer."] #[doc = "* `control1` - Value to fill the second buffer with."] + #[doc = ""] pub fn GX_MemoryFill( buf0a: *mut u32_, buf0v: u32_, @@ -24152,6 +25548,11 @@ extern "C" { #[doc = "* `outadr` - Address of the output."] #[doc = "* `outdim` - Dimensions of the output."] #[doc = "* `flags` - Flags to transfer with."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The PPF event will be signaled on completion."] + #[doc = ""] pub fn GX_DisplayTransfer( inadr: *mut u32_, indim: u32_, @@ -24172,6 +25573,11 @@ extern "C" { #[doc = "* `outdim` - Dimensions of the output."] #[doc = "* `size` - Size of the data to transfer."] #[doc = "* `flags` - Flags to transfer with."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The PPF event will be signaled on completion."] + #[doc = ""] pub fn GX_TextureCopy( inadr: *mut u32_, indim: u32_, @@ -24193,6 +25599,7 @@ extern "C" { #[doc = "* `buf1s` - Size of the second buffer."] #[doc = "* `buf2a` - Address of the third buffer."] #[doc = "* `buf2s` - Size of the third buffer."] + #[doc = ""] pub fn GX_FlushCacheRegions( buf0a: *mut u32_, buf0s: u32_, @@ -25356,6 +26763,7 @@ extern "C" { #[doc = ""] #[doc = "* `cmd` - Buffer containing commands to add."] #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn GPUCMD_AddRawCommands(cmd: *const u32_, size: u32_); } extern "C" { @@ -25366,6 +26774,7 @@ extern "C" { #[doc = "* `header` - Header of the command."] #[doc = "* `param` - Parameters of the command."] #[doc = "* `paramlength` - Size of the parameter buffer."] + #[doc = ""] pub fn GPUCMD_Add(header: u32_, param: *const u32_, paramlength: u32_); } extern "C" { @@ -25375,46 +26784,59 @@ extern "C" { #[doc = ""] #[doc = "* `addr` - Pointer to output the command buffer to."] #[doc = "* `size` - Pointer to output the size (in words) of the command buffer to."] + #[doc = ""] pub fn GPUCMD_Split(addr: *mut *mut u32_, size: *mut u32_); } extern "C" { #[doc = "Converts a 32-bit float to a 16-bit float."] #[doc = ""] - #[doc = "Returns: The converted float."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof16(f: f32) -> u32_; } extern "C" { #[doc = "Converts a 32-bit float to a 20-bit float."] #[doc = ""] - #[doc = "Returns: The converted float."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof20(f: f32) -> u32_; } extern "C" { #[doc = "Converts a 32-bit float to a 24-bit float."] #[doc = ""] - #[doc = "Returns: The converted float."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof24(f: f32) -> u32_; } extern "C" { #[doc = "Converts a 32-bit float to a 31-bit float."] #[doc = ""] - #[doc = "Returns: The converted float."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof31(f: f32) -> u32_; } #[doc = "Vertex shader."] @@ -25533,7 +26955,7 @@ impl Default for DVLP_s { #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_constEntry_s { - #[doc = "Constant type. See @ref DVLE_constantType"] + #[doc = "Constant type. See [`DVLE_constantType`]"] #[doc = ""] pub type_: u16_, #[doc = "Constant ID."] @@ -25548,7 +26970,7 @@ pub struct DVLE_constEntry_s { #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_outEntry_s { - #[doc = "Output type. See @ref DVLE_outputAttribute_t"] + #[doc = "Output type. See [`DVLE_outputAttribute_t`]"] #[doc = ""] pub type_: u16_, #[doc = "Output register ID."] @@ -25678,12 +27100,15 @@ impl Default for DVLB_s { extern "C" { #[doc = "Parses a shader binary."] #[doc = ""] - #[doc = "Returns: The parsed shader binary."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The parsed shader binary."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `shbinData` - Shader binary data."] #[doc = "* `shbinSize` - Shader binary size."] + #[doc = ""] pub fn DVLB_ParseFile(shbinData: *mut u32_, shbinSize: u32_) -> *mut DVLB_s; } extern "C" { @@ -25692,17 +27117,21 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `dvlb` - DVLB to free."] + #[doc = ""] pub fn DVLB_Free(dvlb: *mut DVLB_s); } extern "C" { #[doc = "Gets a uniform register index from a shader."] #[doc = ""] - #[doc = "Returns: The uniform register index."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The uniform register index."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `dvle` - Shader to get the register from."] #[doc = "* `name` - Name of the register."] + #[doc = ""] pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const ::libc::c_char) -> s8; } extern "C" { @@ -25711,6 +27140,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `dvle` - Shader to generate an output map for."] + #[doc = ""] pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s); } #[doc = "24-bit float uniforms."] @@ -25796,6 +27226,7 @@ extern "C" { #[doc = ""] #[doc = "* `si` - Shader instance to initialize."] #[doc = "* `dvle` - DVLE to initialize the shader instance with."] + #[doc = ""] pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result; } extern "C" { @@ -25805,6 +27236,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `si` - Shader instance to free."] + #[doc = ""] pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { @@ -25816,6 +27248,7 @@ extern "C" { #[doc = "* `si` - Shader instance to use."] #[doc = "* `id` - ID of the bool uniform."] #[doc = "* `value` - Value to set."] + #[doc = ""] pub fn shaderInstanceSetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -25831,6 +27264,7 @@ extern "C" { #[doc = "* `si` - Shader instance to use."] #[doc = "* `id` - ID of the bool uniform."] #[doc = "* `value` - Pointer to output the value to."] + #[doc = ""] pub fn shaderInstanceGetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -25844,6 +27278,7 @@ extern "C" { #[doc = ""] #[doc = "* `si` - Shader instance to use."] #[doc = "* `name` - Name of the uniform."] + #[doc = ""] pub fn shaderInstanceGetUniformLocation( si: *mut shaderInstance_s, name: *const ::libc::c_char, @@ -25856,6 +27291,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sp` - Shader program to initialize."] + #[doc = ""] pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result; } extern "C" { @@ -25865,6 +27301,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sp` - Shader program to free."] + #[doc = ""] pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result; } extern "C" { @@ -25875,6 +27312,7 @@ extern "C" { #[doc = ""] #[doc = "* `sp` - Shader program to use."] #[doc = "* `dvle` - Vertex shader to set."] + #[doc = ""] pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result; } extern "C" { @@ -25886,6 +27324,7 @@ extern "C" { #[doc = "* `sp` - Shader program to use."] #[doc = "* `dvle` - Geometry shader to set."] #[doc = "* `stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] + #[doc = ""] pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result; } extern "C" { @@ -25896,6 +27335,7 @@ extern "C" { #[doc = ""] #[doc = "* `sp` - Shader program to use."] #[doc = "* `permutation` - Attribute permutation to use."] + #[doc = ""] pub fn shaderProgramSetGshInputPermutation( sp: *mut shaderProgram_s, permutation: u64_, @@ -25910,6 +27350,7 @@ extern "C" { #[doc = "* `sp` - Shader program to use."] #[doc = "* `sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] #[doc = "* `sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] + #[doc = ""] pub fn shaderProgramConfigure( sp: *mut shaderProgram_s, sendVshCode: bool, @@ -25923,6 +27364,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `sp` - Shader program to use."] + #[doc = ""] pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result; } #[doc = "Mono sound"] @@ -25937,6 +27379,8 @@ pub const NDSP_OUTPUT_STEREO: ndspOutputMode = 1; #[doc = ""] pub const NDSP_OUTPUT_SURROUND: ndspOutputMode = 2; +#[doc = "# Data types"] +#[doc = ""] #[doc = "Sound output modes."] #[doc = ""] @@ -26079,6 +27523,8 @@ pub type ndspAuxCallback = ::core::option::Option< ), >; extern "C" { + #[doc = "# Initialization and basic operations"] + #[doc = ""] #[doc = "Sets up the DSP component."] #[doc = ""] #[doc = "# Arguments"] @@ -26087,6 +27533,7 @@ extern "C" { #[doc = "* `size` - Size of the DSP binary."] #[doc = "* `progMask` - Program RAM block mask to load the binary to."] #[doc = "* `dataMask` - Data RAM block mask to load the binary to."] + #[doc = ""] pub fn ndspUseComponent( binary: *const ::libc::c_void, size: u32_, @@ -26108,23 +27555,30 @@ extern "C" { extern "C" { #[doc = "Gets the number of dropped sound frames."] #[doc = ""] - #[doc = "Returns: The number of dropped sound frames."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The number of dropped sound frames."] #[doc = ""] pub fn ndspGetDroppedFrames() -> u32_; } extern "C" { #[doc = "Gets the total sound frame count."] #[doc = ""] - #[doc = "Returns: The total sound frame count."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The total sound frame count."] #[doc = ""] pub fn ndspGetFrameCount() -> u32_; } extern "C" { + #[doc = "# General parameters"] + #[doc = ""] #[doc = "Sets the master volume."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `volume` - Volume to set. Defaults to 1.0f."] + #[doc = ""] pub fn ndspSetMasterVol(volume: f32); } extern "C" { @@ -26133,6 +27587,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] + #[doc = ""] pub fn ndspSetOutputMode(mode: ndspOutputMode); } extern "C" { @@ -26141,6 +27596,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] + #[doc = ""] pub fn ndspSetClippingMode(mode: ndspClippingMode); } extern "C" { @@ -26149,6 +27605,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `count` - Output count to set. Defaults to 2."] + #[doc = ""] pub fn ndspSetOutputCount(count: ::libc::c_int); } extern "C" { @@ -26157,6 +27614,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `capture` - Wave buffer to capture to."] + #[doc = ""] pub fn ndspSetCapture(capture: *mut ndspWaveBuf); } extern "C" { @@ -26166,14 +27624,18 @@ extern "C" { #[doc = ""] #[doc = "* `callback` - Callback to set."] #[doc = "* `data` - User-defined data to pass to the callback."] + #[doc = ""] pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void); } extern "C" { + #[doc = "# Surround"] + #[doc = ""] #[doc = "Sets the surround sound depth."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `depth` - Depth to set. Defaults to 0x7FFF."] + #[doc = ""] pub fn ndspSurroundSetDepth(depth: u16_); } extern "C" { @@ -26182,6 +27644,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] + #[doc = ""] pub fn ndspSurroundSetPos(pos: ndspSpeakerPos); } extern "C" { @@ -26190,15 +27653,19 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `ratio` - Rear ratio to set. Defaults to 0x8000."] + #[doc = ""] pub fn ndspSurroundSetRearRatio(ratio: u16_); } extern "C" { + #[doc = "# Auxiliary output"] + #[doc = ""] #[doc = "Configures whether an auxiliary output is enabled."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the auxiliary output."] #[doc = "* `enable` - Whether to enable the auxiliary output."] + #[doc = ""] pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { @@ -26208,6 +27675,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the auxiliary output."] #[doc = "* `bypass` - Whether to use front bypass."] + #[doc = ""] pub fn ndspAuxSetFrontBypass(id: ::libc::c_int, bypass: bool); } extern "C" { @@ -26217,6 +27685,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the auxiliary output."] #[doc = "* `volume` - Volume to set."] + #[doc = ""] pub fn ndspAuxSetVolume(id: ::libc::c_int, volume: f32); } extern "C" { @@ -26227,6 +27696,7 @@ extern "C" { #[doc = "* `id` - ID of the auxiliary output."] #[doc = "* `callback` - Callback to set."] #[doc = "* `data` - User-defined data to pass to the callback."] + #[doc = ""] pub fn ndspAuxSetCallback( id: ::libc::c_int, callback: ndspAuxCallback, @@ -26245,19 +27715,21 @@ pub const NDSP_ENCODING_PCM16: _bindgen_ty_30 = 1; #[doc = ""] pub const NDSP_ENCODING_ADPCM: _bindgen_ty_30 = 2; +#[doc = "# Data types"] +#[doc = ""] #[doc = "Supported sample encodings."] #[doc = ""] pub type _bindgen_ty_30 = ::libc::c_uint; -#[doc = "Buffer contains Mono PCM8."] +#[doc = "Buffer contains Mono PCM8."] #[doc = ""] pub const NDSP_FORMAT_MONO_PCM8: _bindgen_ty_31 = 1; -#[doc = "Buffer contains Mono PCM16."] +#[doc = "Buffer contains Mono PCM16."] #[doc = ""] pub const NDSP_FORMAT_MONO_PCM16: _bindgen_ty_31 = 5; -#[doc = "Buffer contains Mono ADPCM."] +#[doc = "Buffer contains Mono ADPCM."] #[doc = ""] pub const NDSP_FORMAT_MONO_ADPCM: _bindgen_ty_31 = 9; @@ -26310,11 +27782,14 @@ pub const NDSP_INTERP_NONE: ndspInterpType = 2; pub type ndspInterpType = ::libc::c_uint; extern "C" { + #[doc = "# Basic channel operation"] + #[doc = ""] #[doc = "Resets a channel."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnReset(id: ::libc::c_int); } extern "C" { @@ -26323,46 +27798,59 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnInitParams(id: ::libc::c_int); } extern "C" { #[doc = "Checks whether a channel is currently playing."] #[doc = ""] - #[doc = "Returns: Whether the channel is currently playing."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether the channel is currently playing."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool; } extern "C" { #[doc = "Gets the current sample position of a channel."] #[doc = ""] - #[doc = "Returns: The channel's sample position."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The channel's sample position."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32_; } extern "C" { #[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] #[doc = ""] - #[doc = "Returns: The sequence ID of the wave buffer."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The sequence ID of the wave buffer."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16_; } extern "C" { #[doc = "Checks whether a channel is currently paused."] #[doc = ""] - #[doc = "Returns: Whether the channel is currently paused."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether the channel is currently paused."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool; } extern "C" { @@ -26372,15 +27860,19 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `paused` - Whether the channel is to be paused (true) or unpaused (false)."] + #[doc = ""] pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool); } extern "C" { + #[doc = "# Configuration"] + #[doc = ""] #[doc = "Sets the format of a channel."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `format` - Format to use."] + #[doc = ""] pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16_); } extern "C" { @@ -26390,6 +27882,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `type` - Interpolation type to use."] + #[doc = ""] pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType); } extern "C" { @@ -26399,6 +27892,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `rate` - Sample rate to use."] + #[doc = ""] pub fn ndspChnSetRate(id: ::libc::c_int, rate: f32); } extern "C" { @@ -26415,6 +27909,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `mix` - Mix parameters to use. Working hypothesis:"] + #[doc = ""] pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32); } extern "C" { @@ -26424,14 +27919,18 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `coefs` - DSPADPCM coefficients to use."] + #[doc = ""] pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16_); } extern "C" { + #[doc = "# Wave buffers"] + #[doc = ""] #[doc = "Clears the wave buffer queue of a channel and stops playback."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnWaveBufClear(id: ::libc::c_int); } extern "C" { @@ -26441,15 +27940,23 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `buf` - Wave buffer to add."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If the channel's wave buffer queue was empty before the use of this function, playback is started."] + #[doc = ""] pub fn ndspChnWaveBufAdd(id: ::libc::c_int, buf: *mut ndspWaveBuf); } extern "C" { + #[doc = "# IIR filters"] + #[doc = ""] #[doc = "Configures whether the IIR monopole filter of a channel is enabled."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `enable` - Whether to enable the IIR monopole filter."] + #[doc = ""] pub fn ndspChnIirMonoSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { @@ -26459,6 +27966,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `enable` - Whether to enable the IIR monopole filter."] + #[doc = ""] pub fn ndspChnIirMonoSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -26473,6 +27981,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `f0` - Low pass cut-off frequency."] + #[doc = ""] pub fn ndspChnIirMonoSetParamsLowPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { @@ -26482,6 +27991,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `f0` - High pass cut-off frequency."] + #[doc = ""] pub fn ndspChnIirMonoSetParamsHighPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { @@ -26491,6 +28001,7 @@ extern "C" { #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `enable` - Whether to enable the IIR biquad filter."] + #[doc = ""] pub fn ndspChnIirBiquadSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { @@ -26499,6 +28010,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -26517,6 +28029,7 @@ extern "C" { #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `f0` - Low pass cut-off frequency."] #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { @@ -26527,6 +28040,7 @@ extern "C" { #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `f0` - High pass cut-off frequency."] #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { @@ -26537,6 +28051,7 @@ extern "C" { #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `f0` - Mid-frequency."] #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { @@ -26547,6 +28062,7 @@ extern "C" { #[doc = "* `id` - ID of the channel (0..23)."] #[doc = "* `f0` - Notch frequency."] #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsNotchFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { @@ -26558,6 +28074,7 @@ extern "C" { #[doc = "* `f0` - Central frequency."] #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] #[doc = "* `gain` - Amount of gain (raw value = 10 ^ dB/40)"] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsPeakingEqualizer( id: ::libc::c_int, f0: f32, @@ -26955,6 +28472,7 @@ extern "C" { #[doc = "* `type` - Keyboard type."] #[doc = "* `numButtons` - Number of dialog buttons to display (1, 2 or 3)."] #[doc = "* `maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] + #[doc = ""] pub fn swkbdInit( swkbd: *mut SwkbdState, type_: SwkbdType, @@ -26969,6 +28487,7 @@ extern "C" { #[doc = ""] #[doc = "* `swkbd` - Pointer to swkbd state."] #[doc = "* `features` - Feature bitmask."] + #[doc = ""] pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32_); } extern "C" { @@ -26978,6 +28497,7 @@ extern "C" { #[doc = ""] #[doc = "* `swkbd` - Pointer to swkbd state."] #[doc = "* `text` - Hint text."] + #[doc = ""] pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { @@ -26989,6 +28509,7 @@ extern "C" { #[doc = "* `button` - Specifies which button to configure."] #[doc = "* `text` - Button text."] #[doc = "* `submit` - Specifies whether pushing the button will submit the text or discard it."] + #[doc = ""] pub fn swkbdSetButton( swkbd: *mut SwkbdState, button: SwkbdButton, @@ -27003,6 +28524,7 @@ extern "C" { #[doc = ""] #[doc = "* `swkbd` - Pointer to swkbd state."] #[doc = "* `text` - Initial text."] + #[doc = ""] pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { @@ -27013,6 +28535,7 @@ extern "C" { #[doc = "* `word` - Pointer to dictionary word structure."] #[doc = "* `reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] #[doc = "* `text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] + #[doc = ""] pub fn swkbdSetDictWord( word: *mut SwkbdDictWord, reading: *const ::libc::c_char, @@ -27027,6 +28550,7 @@ extern "C" { #[doc = "* `swkbd` - Pointer to swkbd state."] #[doc = "* `dict` - Pointer to dictionary words."] #[doc = "* `wordCount` - Number of words in the dictionary."] + #[doc = ""] pub fn swkbdSetDictionary( swkbd: *mut SwkbdState, dict: *const SwkbdDictWord, @@ -27042,6 +28566,7 @@ extern "C" { #[doc = "* `data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] + #[doc = ""] pub fn swkbdSetStatusData( swkbd: *mut SwkbdState, data: *mut SwkbdStatusData, @@ -27058,6 +28583,7 @@ extern "C" { #[doc = "* `data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] + #[doc = ""] pub fn swkbdSetLearningData( swkbd: *mut SwkbdState, data: *mut SwkbdLearningData, @@ -27073,6 +28599,7 @@ extern "C" { #[doc = "* `swkbd` - Pointer to swkbd state."] #[doc = "* `callback` - Filter callback function."] #[doc = "* `user` - Custom data to be passed to the callback function."] + #[doc = ""] pub fn swkbdSetFilterCallback( swkbd: *mut SwkbdState, callback: SwkbdCallbackFn, @@ -27082,13 +28609,16 @@ extern "C" { extern "C" { #[doc = "Launches a software keyboard in order to input text."] #[doc = ""] - #[doc = "Returns: The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `swkbd` - Pointer to swkbd state."] #[doc = "* `buf` - Pointer to output buffer which will hold the inputted text."] #[doc = "* `bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] + #[doc = ""] pub fn swkbdInputText( swkbd: *mut SwkbdState, buf: *mut ::libc::c_char, @@ -27191,6 +28721,7 @@ extern "C" { #[doc = "* `err` - Pointer to errorConf."] #[doc = "* `type` - errorType Type of error."] #[doc = "* `lang` - CFG_Language Lang of error."] + #[doc = ""] pub fn errorInit(err: *mut errorConf, type_: errorType, lang: CFG_Language); } extern "C" { @@ -27200,6 +28731,7 @@ extern "C" { #[doc = ""] #[doc = "* `err` - Pointer to errorConf."] #[doc = "* `error` - Error-code to display."] + #[doc = ""] pub fn errorCode(err: *mut errorConf, error: ::libc::c_int); } extern "C" { @@ -27209,6 +28741,7 @@ extern "C" { #[doc = ""] #[doc = "* `err` - Pointer to errorConf."] #[doc = "* `text` - Error-text to display."] + #[doc = ""] pub fn errorText(err: *mut errorConf, text: *const ::libc::c_char); } extern "C" { @@ -27217,6 +28750,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `err` - Pointer to errorConf."] + #[doc = ""] pub fn errorDisp(err: *mut errorConf); } #[doc = "Parameter structure passed to AppletEd"] @@ -27252,7 +28786,7 @@ pub struct MiiSelectorConf { #[doc = ""] pub _unk0x8D: [u8_; 3usize], #[doc = "Index of the initially selected Mii. If"] - #[doc = "@ref MiiSelectorConf.show_guest_page is"] + #[doc = "[`MiiSelectorConf.show_guest_page`] is"] #[doc = "set, this is the index of a Guest Mii,"] #[doc = "otherwise that of a user Mii."] #[doc = ""] @@ -27270,7 +28804,7 @@ pub struct MiiSelectorConf { #[doc = "@private"] #[doc = ""] pub _unk0xFE: u16_, - #[doc = "Will be set to @ref MIISELECTOR_MAGIC before launching the"] + #[doc = "Will be set to [`MIISELECTOR_MAGIC`] before launching the"] #[doc = "applet."] #[doc = ""] pub magic: u32_, @@ -27307,7 +28841,7 @@ pub struct MiiSelectorReturn { pub _pad0x68: u16_, #[doc = "Checksum of the returned Mii data."] #[doc = "Stored as a big-endian value; use"] - #[doc = "@ref miiSelectorChecksumIsValid to"] + #[doc = "[`miiSelectorChecksumIsValid`] to"] #[doc = "verify."] #[doc = ""] pub checksum: u16_, @@ -27352,88 +28886,89 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Pointer to Miiselector config."] + #[doc = ""] pub fn miiSelectorInit(conf: *mut MiiSelectorConf); } extern "C" { #[doc = "Launch the Mii selector library applet"] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Configuration determining how the applet should behave"] + #[doc = ""] pub fn miiSelectorLaunch(conf: *const MiiSelectorConf, returnbuf: *mut MiiSelectorReturn); } extern "C" { #[doc = "Sets title of the Mii selector library applet"] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Pointer to miiSelector configuration"] #[doc = "* `text` - Title text of Mii selector"] + #[doc = ""] pub fn miiSelectorSetTitle(conf: *mut MiiSelectorConf, text: *const ::libc::c_char); } extern "C" { #[doc = "Specifies which special options are enabled in the Mii selector"] #[doc = ""] - #[doc = ""] - #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Pointer to miiSelector configuration"] #[doc = "* `options` - Options bitmask"] + #[doc = ""] pub fn miiSelectorSetOptions(conf: *mut MiiSelectorConf, options: u32_); } extern "C" { #[doc = "Specifies which guest Miis will be selectable"] #[doc = ""] - #[doc = ""] + #[doc = "[`MIISELECTOR_GUESTMII_SLOTS`] can be used to whitelist all the guest Miis."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Pointer to miiSelector configuration"] #[doc = "* `index` - Index of the guest Miis that will be whitelisted."] + #[doc = ""] pub fn miiSelectorWhitelistGuestMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { #[doc = "Specifies which guest Miis will be unselectable"] #[doc = ""] - #[doc = ""] + #[doc = "[`MIISELECTOR_GUESTMII_SLOTS`] can be used to blacklist all the guest Miis."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Pointer to miiSelector configuration"] #[doc = "* `index` - Index of the guest Miis that will be blacklisted."] + #[doc = ""] pub fn miiSelectorBlacklistGuestMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { #[doc = "Specifies which user Miis will be selectable"] #[doc = ""] - #[doc = ""] + #[doc = "[`MIISELECTOR_USERMII_SLOTS`] can be used to whitlist all the user Miis"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Pointer to miiSelector configuration"] #[doc = "* `index` - Index of the user Miis that will be whitelisted."] + #[doc = ""] pub fn miiSelectorWhitelistUserMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { #[doc = "Specifies which user Miis will be selectable"] #[doc = ""] - #[doc = ""] + #[doc = "[`MIISELECTOR_USERMII_SLOTS`] can be used to blacklist all the user Miis"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `conf` - Pointer to miiSelector configuration"] #[doc = "* `index` - Index of the user Miis that will be blacklisted."] + #[doc = ""] pub fn miiSelectorBlacklistUserMii(conf: *mut MiiSelectorConf, index: u32_); } extern "C" { #[doc = "Get Mii name"] #[doc = ""] - #[doc = ""] #[doc = "(assuming that no non-BMP characters are used), this value should be 36 (or 30 if you are not"] #[doc = "dealing with guest miis)."] #[doc = ""] @@ -27442,6 +28977,7 @@ extern "C" { #[doc = "* `returnbuf` - Pointer to miiSelector return"] #[doc = "* `out` - String containing a Mii's name"] #[doc = "* `max_size` - Size of string. Since UTF8 characters range in size from 1-3 bytes"] + #[doc = ""] pub fn miiSelectorReturnGetName( returnbuf: *const MiiSelectorReturn, out: *mut ::libc::c_char, @@ -27451,7 +28987,6 @@ extern "C" { extern "C" { #[doc = "Get Mii Author"] #[doc = ""] - #[doc = ""] #[doc = "(assuming that no non-BMP characters are used), this value should be 30."] #[doc = ""] #[doc = "# Arguments"] @@ -27459,6 +28994,7 @@ extern "C" { #[doc = "* `returnbuf` - Pointer to miiSelector return"] #[doc = "* `out` - String containing a Mii's author"] #[doc = "* `max_size` - Size of string. Since UTF8 characters range in size from 1-3 bytes"] + #[doc = ""] pub fn miiSelectorReturnGetAuthor( returnbuf: *const MiiSelectorReturn, out: *mut ::libc::c_char, @@ -27470,12 +29006,14 @@ extern "C" { #[doc = ""] #[doc = "checksum"] #[doc = ""] + #[doc = "Returns:"] #[doc = ""] - #[doc = "Returns: `true` if `returnbuf->checksum` is the same as the one computed from `returnbuf`"] + #[doc = "* `true` if `returnbuf->checksum` is the same as the one computed from `returnbuf`"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `returnbuf` - Buffer filled by Mii selector applet"] + #[doc = ""] pub fn miiSelectorChecksumIsValid(returnbuf: *const MiiSelectorReturn) -> bool; } #[doc = "Open directory struct"] @@ -27643,11 +29181,16 @@ extern "C" { #[doc = "Mounts the Application's RomFS."] #[doc = ""] #[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] - #[doc = "If on the other hand it's an NCCH, it behaves identically to \\ref romfsMountFromCurrentProcess."] + #[doc = "If on the other hand it's an NCCH, it behaves identically to [`romfsMountFromCurrentProcess`]"] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `name` - Device mount name."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function is intended to be used to access one's own RomFS."] + #[doc = ""] pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result; } extern "C" { @@ -27659,6 +29202,7 @@ extern "C" { #[doc = "* `fd` - FSFILE handle of the RomFS image."] #[doc = "* `offset` - Offset of the RomFS within the file."] #[doc = "* `name` - Device mount name."] + #[doc = ""] pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result; } extern "C" { @@ -27668,6 +29212,7 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `name` - Device mount name."] + #[doc = ""] pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result; } extern "C" { @@ -27679,6 +29224,7 @@ extern "C" { #[doc = "* `tid` - Title ID"] #[doc = "* `mediatype` - Mediatype"] #[doc = "* `name` - Device mount name."] + #[doc = ""] pub fn romfsMountFromTitle( tid: u64_, mediatype: FS_MediaType, @@ -28037,6 +29583,11 @@ extern "C" { #[doc = "# Arguments"] #[doc = ""] #[doc = "* `font` - Font to fix"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Should never be run on the system font, and only once on any other font."] + #[doc = ""] pub fn fontFixPointers(font: *mut CFNT_s); } extern "C" { @@ -28046,6 +29597,7 @@ extern "C" { #[doc = ""] #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] #[doc = "* `codePoint` - Unicode codepoint."] + #[doc = ""] pub fn fontGlyphIndexFromCodePoint(font: *mut CFNT_s, codePoint: u32_) -> ::libc::c_int; } extern "C" { @@ -28055,6 +29607,7 @@ extern "C" { #[doc = ""] #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] #[doc = "* `glyphIndex` - Index of the glyph."] + #[doc = ""] pub fn fontGetCharWidthInfo( font: *mut CFNT_s, glyphIndex: ::libc::c_int, @@ -28071,6 +29624,7 @@ extern "C" { #[doc = "* `flags` - Calculation flags (see GLYPH_POS_* flags)."] #[doc = "* `scaleX` - Scale factor to apply horizontally."] #[doc = "* `scaleY` - Scale factor to apply vertically."] + #[doc = ""] pub fn fontCalcGlyphPos( out: *mut fontGlyphPos_s, font: *mut CFNT_s, @@ -28115,11 +29669,18 @@ extern "C" { extern "C" { #[doc = "Connects to the 3dslink host, setting up an output stream."] #[doc = ""] - #[doc = "Returns: Socket fd on success, negative number on failure."] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Socket fd on success, negative number on failure."] #[doc = ""] #[doc = "# Arguments"] #[doc = ""] #[doc = "* `redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] #[doc = "* `redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The socket should be closed with close() during application cleanup."] + #[doc = ""] pub fn link3dsConnectToHost(redirStdout: bool, redirStderr: bool) -> ::libc::c_int; } From 3d4df5b03cf55fbcfe8b0aabb29701e74015578d Mon Sep 17 00:00:00 2001 From: TechiePi Date: Thu, 13 Oct 2022 19:34:28 +0200 Subject: [PATCH 16/57] Update usage of ``docstring-to-rustdoc.rs`` --- ctru-sys/src/bin/docstring-to-rustdoc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctru-sys/src/bin/docstring-to-rustdoc.rs b/ctru-sys/src/bin/docstring-to-rustdoc.rs index cc133c5..10ffed6 100644 --- a/ctru-sys/src/bin/docstring-to-rustdoc.rs +++ b/ctru-sys/src/bin/docstring-to-rustdoc.rs @@ -2,8 +2,8 @@ //! //! # Usage //! -//! `cargo run --bin docstring-to-rustdoc -- [location of the bindings.rs]` -//! Example: `cargo run --bin docstring-to-rustdoc -- src/bindings.rs` +//! `cargo run --bin docstring-to-rustdoc --features="build-binary" -- [location of the bindings.rs]` +//! Example: `cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs` //! //! # Transformations //! From 06f27a35ebd0bb2417ba5b6479ac0a5056f00424 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Thu, 13 Oct 2022 23:21:33 +0200 Subject: [PATCH 17/57] Derive some traits --- ctru-rs/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 5b0caf1..e8cf7f0 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -7,7 +7,7 @@ use ctru_sys::result::{R_DESCRIPTION, R_LEVEL, R_MODULE, R_SUMMARY}; pub type Result = ::std::result::Result; -#[derive(Debug, Clone, PartialEq, PartialOrd)] +#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord)] #[repr(transparent)] pub(crate) struct LibCtruResult(pub i32); From f896871b73f1b7d8dfa1e8c5c750637a4d913ca3 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 16 Oct 2022 15:11:55 +0200 Subject: [PATCH 18/57] Improve implementation and improve wording Co-Authored-By: Ian Chamberlain <11131775+ian-h-chamberlain@users.noreply.github.com> --- ctru-rs/src/error.rs | 27 ++++++----- ctru-rs/src/romfs.rs | 4 +- ctru-rs/src/services/apt.rs | 6 +-- ctru-rs/src/services/cam.rs | 88 ++++++++++++++++++------------------ ctru-rs/src/services/cfgu.rs | 14 +++--- ctru-rs/src/services/hid.rs | 4 +- ctru-rs/src/services/ps.rs | 8 ++-- ctru-rs/src/services/soc.rs | 4 +- ctru-rs/src/services/sslc.rs | 6 +-- 9 files changed, 82 insertions(+), 79 deletions(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index e8cf7f0..3a702a4 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -9,14 +9,11 @@ pub type Result = ::std::result::Result; #[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord)] #[repr(transparent)] -pub(crate) struct LibCtruResult(pub i32); +pub(crate) struct ResultCode(pub i32); -impl Try for LibCtruResult { +impl Try for ResultCode { type Output = (); - // This type is passed to [FromResidual::from_residual] when the LibCtruResult is an error, - // so this type implies "this is a result than CAN'T be `Ok`" (Infallible is the same as !) - // The purpose of this type is to _only_ bring information about the *Error* - type Residual = crate::Result; + type Residual = Error; fn from_output(_: Self::Output) -> Self { Self(0) @@ -24,22 +21,28 @@ impl Try for LibCtruResult { fn branch(self) -> ControlFlow { if self.0 < 0 { - ControlFlow::Break(Err(self.into())) + ControlFlow::Break(self.into()) } else { ControlFlow::Continue(()) } } } -impl FromResidual for LibCtruResult { +impl FromResidual for ResultCode { fn from_residual(e: ::Residual) -> Self { - match e.err().unwrap() { + match e { Error::Os(result) => Self(result), - _ => Self(-1), + _ => unreachable!(), } } } +impl FromResidual for Result { + fn from_residual(e: Error) -> Self { + Err(e) + } +} + /// The error type returned by all libctru functions. #[non_exhaustive] pub enum Error { @@ -73,8 +76,8 @@ impl From for Error { } } -impl From for Error { - fn from(err: LibCtruResult) -> Self { +impl From for Error { + fn from(err: ResultCode) -> Self { Self::Os(err.0) } } diff --git a/ctru-rs/src/romfs.rs b/ctru-rs/src/romfs.rs index 1392aed..2a3def2 100644 --- a/ctru-rs/src/romfs.rs +++ b/ctru-rs/src/romfs.rs @@ -10,7 +10,7 @@ //! romfs_dir = "romfs" //! ``` -use crate::error::LibCtruResult; +use crate::error::ResultCode; use once_cell::sync::Lazy; use std::ffi::CStr; use std::sync::Mutex; @@ -31,7 +31,7 @@ impl RomFS { true, || { let mount_name = CStr::from_bytes_with_nul(b"romfs\0").unwrap(); - LibCtruResult(unsafe { ctru_sys::romfsMountSelf(mount_name.as_ptr()) })?; + ResultCode(unsafe { ctru_sys::romfsMountSelf(mount_name.as_ptr()) })?; Ok(()) }, || { diff --git a/ctru-rs/src/services/apt.rs b/ctru-rs/src/services/apt.rs index e81ae63..2096a70 100644 --- a/ctru-rs/src/services/apt.rs +++ b/ctru-rs/src/services/apt.rs @@ -1,11 +1,11 @@ -use crate::error::LibCtruResult; +use crate::error::ResultCode; pub struct Apt(()); impl Apt { pub fn init() -> crate::Result { unsafe { - LibCtruResult(ctru_sys::aptInit())?; + ResultCode(ctru_sys::aptInit())?; Ok(Apt(())) } } @@ -16,7 +16,7 @@ impl Apt { pub fn set_app_cpu_time_limit(&self, percent: u32) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::APT_SetAppCpuTimeLimit(percent))?; + ResultCode(ctru_sys::APT_SetAppCpuTimeLimit(percent))?; Ok(()) } } diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index 68371c2..4339340 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -3,7 +3,7 @@ //! The CAM service provides access to the cameras. Cameras can return 2D images //! in the form of byte vectors which can be used for display or other usages. -use crate::error::LibCtruResult; +use crate::error::ResultCode; use crate::services::gspgpu::FramebufferFormat; use bitflags::bitflags; use ctru_sys::Handle; @@ -268,7 +268,7 @@ impl BothOutwardCam { brightness_synchronization: bool, ) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetBrightnessSynchronization( + ResultCode(ctru_sys::CAMU_SetBrightnessSynchronization( brightness_synchronization, ))?; Ok(()) @@ -300,7 +300,7 @@ pub trait Camera { fn is_busy(&self) -> crate::Result { unsafe { let mut is_busy = false; - LibCtruResult(ctru_sys::CAMU_IsBusy(&mut is_busy, self.port_as_raw()))?; + ResultCode(ctru_sys::CAMU_IsBusy(&mut is_busy, self.port_as_raw()))?; Ok(is_busy) } } @@ -310,7 +310,7 @@ pub trait Camera { fn get_transfer_bytes(&self) -> crate::Result { unsafe { let mut transfer_bytes = 0; - LibCtruResult(ctru_sys::CAMU_GetTransferBytes( + ResultCode(ctru_sys::CAMU_GetTransferBytes( &mut transfer_bytes, self.port_as_raw(), ))?; @@ -322,7 +322,7 @@ pub trait Camera { /// [Camera::set_trimming_params] fn set_trimming(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetTrimming(self.port_as_raw(), enabled))?; + ResultCode(ctru_sys::CAMU_SetTrimming(self.port_as_raw(), enabled))?; Ok(()) } } @@ -331,7 +331,7 @@ pub trait Camera { fn is_trimming_enabled(&self) -> crate::Result { unsafe { let mut trimming = false; - LibCtruResult(ctru_sys::CAMU_IsTrimming(&mut trimming, self.port_as_raw()))?; + ResultCode(ctru_sys::CAMU_IsTrimming(&mut trimming, self.port_as_raw()))?; Ok(trimming) } } @@ -339,7 +339,7 @@ pub trait Camera { /// Sets trimming parameters based on coordinates specified inside a [CamTrimmingParams] fn set_trimming_params(&mut self, params: CamTrimmingParams) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetTrimmingParams( + ResultCode(ctru_sys::CAMU_SetTrimmingParams( self.port_as_raw(), params.x_start, params.y_start, @@ -357,7 +357,7 @@ pub trait Camera { let mut y_start = 0; let mut x_end = 0; let mut y_end = 0; - LibCtruResult(ctru_sys::CAMU_GetTrimmingParams( + ResultCode(ctru_sys::CAMU_GetTrimmingParams( &mut x_start, &mut y_start, &mut x_end, @@ -385,7 +385,7 @@ pub trait Camera { cam_height: i16, ) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetTrimmingParamsCenter( + ResultCode(ctru_sys::CAMU_SetTrimmingParamsCenter( self.port_as_raw(), trim_width, trim_height, @@ -399,7 +399,7 @@ pub trait Camera { /// Sets the exposure level of the camera fn set_exposure(&mut self, exposure: i8) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetExposure(self.camera_as_raw(), exposure))?; + ResultCode(ctru_sys::CAMU_SetExposure(self.camera_as_raw(), exposure))?; Ok(()) } } @@ -407,7 +407,7 @@ pub trait Camera { /// Sets the white balance mod of the camera based on the passed [CamWhiteBalance] argument fn set_white_balance(&mut self, white_balance: CamWhiteBalance) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetWhiteBalance( + ResultCode(ctru_sys::CAMU_SetWhiteBalance( self.camera_as_raw(), white_balance.bits(), ))?; @@ -422,7 +422,7 @@ pub trait Camera { white_balance: CamWhiteBalance, ) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetWhiteBalanceWithoutBaseUp( + ResultCode(ctru_sys::CAMU_SetWhiteBalanceWithoutBaseUp( self.camera_as_raw(), white_balance.bits(), ))?; @@ -433,7 +433,7 @@ pub trait Camera { /// Sets the sharpness of the camera fn set_sharpness(&mut self, sharpness: i8) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetSharpness(self.camera_as_raw(), sharpness))?; + ResultCode(ctru_sys::CAMU_SetSharpness(self.camera_as_raw(), sharpness))?; Ok(()) } } @@ -441,7 +441,7 @@ pub trait Camera { /// Sets whether auto exposure is enabled or disabled for the camera fn set_auto_exposure(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetAutoExposure( + ResultCode(ctru_sys::CAMU_SetAutoExposure( self.camera_as_raw(), enabled, ))?; @@ -453,7 +453,7 @@ pub trait Camera { fn is_auto_exposure_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - LibCtruResult(ctru_sys::CAMU_IsAutoExposure( + ResultCode(ctru_sys::CAMU_IsAutoExposure( &mut enabled, self.camera_as_raw(), ))?; @@ -464,7 +464,7 @@ pub trait Camera { /// Sets whether auto white balance is enabled or disabled for the camera fn set_auto_white_balance(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetAutoWhiteBalance( + ResultCode(ctru_sys::CAMU_SetAutoWhiteBalance( self.camera_as_raw(), enabled, ))?; @@ -476,7 +476,7 @@ pub trait Camera { fn is_auto_white_balance_enabled(&self) -> crate::Result { unsafe { let mut enabled = false; - LibCtruResult(ctru_sys::CAMU_IsAutoWhiteBalance( + ResultCode(ctru_sys::CAMU_IsAutoWhiteBalance( &mut enabled, self.camera_as_raw(), ))?; @@ -487,7 +487,7 @@ pub trait Camera { /// Sets the flip direction of the camera's image based on the passed [CamFlip] argument fn flip_image(&mut self, flip: CamFlip) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_FlipImage( + ResultCode(ctru_sys::CAMU_FlipImage( self.camera_as_raw(), flip.bits(), ctru_sys::CONTEXT_A, @@ -516,7 +516,7 @@ pub trait Camera { crop_1: (i16, i16), ) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetDetailSize( + ResultCode(ctru_sys::CAMU_SetDetailSize( self.camera_as_raw(), width, height, @@ -533,7 +533,7 @@ pub trait Camera { /// Sets the view size of the camera based on the passed [CamSize] argument. fn set_view_size(&mut self, size: CamSize) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetSize( + ResultCode(ctru_sys::CAMU_SetSize( self.camera_as_raw(), size.bits(), ctru_sys::CONTEXT_A, @@ -545,7 +545,7 @@ pub trait Camera { /// Sets the frame rate of the camera based on the passed [CamFrameRate] argument. fn set_frame_rate(&mut self, frame_rate: CamFrameRate) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetFrameRate( + ResultCode(ctru_sys::CAMU_SetFrameRate( self.camera_as_raw(), frame_rate.bits(), ))?; @@ -556,7 +556,7 @@ pub trait Camera { /// Sets the photo mode of the camera based on the passed [CamPhotoMode] argument. fn set_photo_mode(&mut self, photo_mode: CamPhotoMode) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetPhotoMode( + ResultCode(ctru_sys::CAMU_SetPhotoMode( self.camera_as_raw(), photo_mode.bits(), ))?; @@ -569,7 +569,7 @@ pub trait Camera { /// Multiple effects can be set at once by combining the bitflags of [CamEffect] fn set_effect(&mut self, effect: CamEffect) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetEffect( + ResultCode(ctru_sys::CAMU_SetEffect( self.camera_as_raw(), effect.bits(), ctru_sys::CONTEXT_A, @@ -581,7 +581,7 @@ pub trait Camera { /// Sets the contrast of the camera based on the passed [CamContrast] argument. fn set_contrast(&mut self, contrast: CamContrast) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetContrast( + ResultCode(ctru_sys::CAMU_SetContrast( self.camera_as_raw(), contrast.bits(), ))?; @@ -592,7 +592,7 @@ pub trait Camera { /// Sets the lens correction of the camera based on the passed [CamLensCorrection] argument. fn set_lens_correction(&mut self, lens_correction: CamLensCorrection) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetLensCorrection( + ResultCode(ctru_sys::CAMU_SetLensCorrection( self.camera_as_raw(), lens_correction.bits(), ))?; @@ -603,7 +603,7 @@ pub trait Camera { /// Sets the output format of the camera based on the passed [CamOutputFormat] argument. fn set_output_format(&mut self, format: CamOutputFormat) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetOutputFormat( + ResultCode(ctru_sys::CAMU_SetOutputFormat( self.camera_as_raw(), format.bits(), ctru_sys::CONTEXT_A, @@ -628,7 +628,7 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetAutoExposureWindow( + ResultCode(ctru_sys::CAMU_SetAutoExposureWindow( self.camera_as_raw(), x, y, @@ -655,7 +655,7 @@ pub trait Camera { height: i16, ) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetAutoWhiteBalanceWindow( + ResultCode(ctru_sys::CAMU_SetAutoWhiteBalanceWindow( self.camera_as_raw(), x, y, @@ -669,7 +669,7 @@ pub trait Camera { /// Sets whether the noise filter should be enabled or disabled for the camera fn set_noise_filter(&mut self, enabled: bool) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetNoiseFilter(self.camera_as_raw(), enabled))?; + ResultCode(ctru_sys::CAMU_SetNoiseFilter(self.camera_as_raw(), enabled))?; Ok(()) } } @@ -681,7 +681,7 @@ pub trait Camera { data: ImageQualityCalibrationData, ) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetImageQualityCalibrationData(data.0))?; + ResultCode(ctru_sys::CAMU_SetImageQualityCalibrationData(data.0))?; Ok(()) } } @@ -690,7 +690,7 @@ pub trait Camera { fn get_image_quality_calibration_data(&self) -> crate::Result { unsafe { let mut data = ImageQualityCalibrationData::default(); - LibCtruResult(ctru_sys::CAMU_GetImageQualityCalibrationData(&mut data.0))?; + ResultCode(ctru_sys::CAMU_GetImageQualityCalibrationData(&mut data.0))?; Ok(data) } } @@ -699,7 +699,7 @@ pub trait Camera { // TODO: Explain sleep camera fn set_sleep_camera(&mut self) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_SetSleepCamera(self.camera_as_raw()))?; + ResultCode(ctru_sys::CAMU_SetSleepCamera(self.camera_as_raw()))?; Ok(()) } } @@ -723,7 +723,7 @@ pub trait Camera { ) -> crate::Result> { let transfer_unit = unsafe { let mut buf_size = 0; - LibCtruResult(ctru_sys::CAMU_GetMaxBytes( + ResultCode(ctru_sys::CAMU_GetMaxBytes( &mut buf_size, width as i16, height as i16, @@ -736,7 +736,7 @@ pub trait Camera { let mut buf = vec![0u8; usize::try_from(screen_size).unwrap()]; unsafe { - LibCtruResult(ctru_sys::CAMU_SetTransferBytes( + ResultCode(ctru_sys::CAMU_SetTransferBytes( self.port_as_raw(), transfer_unit, width as i16, @@ -745,14 +745,14 @@ pub trait Camera { }; unsafe { - LibCtruResult(ctru_sys::CAMU_Activate(self.camera_as_raw()))?; - LibCtruResult(ctru_sys::CAMU_ClearBuffer(self.port_as_raw()))?; - LibCtruResult(ctru_sys::CAMU_StartCapture(self.port_as_raw()))?; + ResultCode(ctru_sys::CAMU_Activate(self.camera_as_raw()))?; + ResultCode(ctru_sys::CAMU_ClearBuffer(self.port_as_raw()))?; + ResultCode(ctru_sys::CAMU_StartCapture(self.port_as_raw()))?; }; let receive_event = unsafe { let mut completion_handle: Handle = 0; - LibCtruResult(ctru_sys::CAMU_SetReceiving( + ResultCode(ctru_sys::CAMU_SetReceiving( &mut completion_handle, buf.as_mut_ptr() as *mut ::libc::c_void, self.port_as_raw(), @@ -763,13 +763,13 @@ pub trait Camera { }?; unsafe { - LibCtruResult(ctru_sys::svcWaitSynchronization( + ResultCode(ctru_sys::svcWaitSynchronization( receive_event, timeout.as_nanos().try_into().unwrap(), ))?; - LibCtruResult(ctru_sys::CAMU_StopCapture(self.port_as_raw()))?; - LibCtruResult(ctru_sys::svcCloseHandle(receive_event))?; - LibCtruResult(ctru_sys::CAMU_Activate(ctru_sys::SELECT_NONE))?; + ResultCode(ctru_sys::CAMU_StopCapture(self.port_as_raw()))?; + ResultCode(ctru_sys::svcCloseHandle(receive_event))?; + ResultCode(ctru_sys::CAMU_Activate(ctru_sys::SELECT_NONE))?; }; Ok(buf) @@ -786,7 +786,7 @@ impl Cam { /// rare in practice. pub fn init() -> crate::Result { unsafe { - LibCtruResult(ctru_sys::camInit())?; + ResultCode(ctru_sys::camInit())?; Ok(Cam { inner_cam: InwardCam, outer_right_cam: OutwardRightCam, @@ -799,7 +799,7 @@ impl Cam { /// Plays the specified sound based on the [CamShutterSoundType] argument pub fn play_shutter_sound(&self, sound: CamShutterSoundType) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::CAMU_PlayShutterSound(sound.bits()))?; + ResultCode(ctru_sys::CAMU_PlayShutterSound(sound.bits()))?; Ok(()) } } diff --git a/ctru-rs/src/services/cfgu.rs b/ctru-rs/src/services/cfgu.rs index 7354505..603db7e 100644 --- a/ctru-rs/src/services/cfgu.rs +++ b/ctru-rs/src/services/cfgu.rs @@ -2,7 +2,7 @@ //! //! This module contains basic methods to retrieve and change configuration from the console. -use crate::error::LibCtruResult; +use crate::error::ResultCode; #[derive(Copy, Clone, Debug)] #[repr(u32)] @@ -62,7 +62,7 @@ impl Cfgu { /// as many times as desired and the service will not exit until all /// instances of Cfgu drop out of scope. pub fn init() -> crate::Result { - LibCtruResult(unsafe { ctru_sys::cfguInit() })?; + ResultCode(unsafe { ctru_sys::cfguInit() })?; Ok(Cfgu(())) } @@ -70,7 +70,7 @@ impl Cfgu { pub fn get_region(&self) -> crate::Result { let mut region: u8 = 0; - LibCtruResult(unsafe { ctru_sys::CFGU_SecureInfoGetRegion(&mut region) })?; + ResultCode(unsafe { ctru_sys::CFGU_SecureInfoGetRegion(&mut region) })?; Ok(Region::try_from(region).unwrap()) } @@ -78,7 +78,7 @@ impl Cfgu { pub fn get_model(&self) -> crate::Result { let mut model: u8 = 0; - LibCtruResult(unsafe { ctru_sys::CFGU_GetSystemModel(&mut model) })?; + ResultCode(unsafe { ctru_sys::CFGU_GetSystemModel(&mut model) })?; Ok(SystemModel::try_from(model).unwrap()) } @@ -86,7 +86,7 @@ impl Cfgu { pub fn get_language(&self) -> crate::Result { let mut language: u8 = 0; - LibCtruResult(unsafe { ctru_sys::CFGU_GetSystemLanguage(&mut language) })?; + ResultCode(unsafe { ctru_sys::CFGU_GetSystemLanguage(&mut language) })?; Ok(Language::try_from(language).unwrap()) } @@ -94,7 +94,7 @@ impl Cfgu { pub fn is_nfc_supported(&self) -> crate::Result { let mut supported: bool = false; - LibCtruResult(unsafe { ctru_sys::CFGU_IsNFCSupported(&mut supported) })?; + ResultCode(unsafe { ctru_sys::CFGU_IsNFCSupported(&mut supported) })?; Ok(supported) } @@ -102,7 +102,7 @@ impl Cfgu { pub fn is_2ds_family(&self) -> crate::Result { let mut is_2ds_family: u8 = 0; - LibCtruResult(unsafe { ctru_sys::CFGU_GetModelNintendo2DS(&mut is_2ds_family) })?; + ResultCode(unsafe { ctru_sys::CFGU_GetModelNintendo2DS(&mut is_2ds_family) })?; Ok(is_2ds_family == 0) } } diff --git a/ctru-rs/src/services/hid.rs b/ctru-rs/src/services/hid.rs index d0aa012..6aacf3a 100644 --- a/ctru-rs/src/services/hid.rs +++ b/ctru-rs/src/services/hid.rs @@ -4,7 +4,7 @@ //! and circle pad information. It also provides information from the sound volume slider, //! the accelerometer, and the gyroscope. -use crate::error::LibCtruResult; +use crate::error::ResultCode; bitflags::bitflags! { /// A set of flags corresponding to the button and directional pad /// inputs on the 3DS @@ -63,7 +63,7 @@ pub struct CirclePosition(ctru_sys::circlePosition); impl Hid { pub fn init() -> crate::Result { unsafe { - LibCtruResult(ctru_sys::hidInit())?; + ResultCode(ctru_sys::hidInit())?; Ok(Hid(())) } } diff --git a/ctru-rs/src/services/ps.rs b/ctru-rs/src/services/ps.rs index 65f900d..0e8cc5c 100644 --- a/ctru-rs/src/services/ps.rs +++ b/ctru-rs/src/services/ps.rs @@ -4,7 +4,7 @@ //! As such, it is initialized by default in `ctru::init` instead of having a safety handler //! See also -use crate::error::LibCtruResult; +use crate::error::ResultCode; #[repr(u32)] pub enum AESAlgorithm { @@ -33,19 +33,19 @@ pub enum AESKeyType { pub fn local_friend_code_seed() -> crate::Result { let mut seed: u64 = 0; - LibCtruResult(unsafe { ctru_sys::PS_GetLocalFriendCodeSeed(&mut seed) })?; + ResultCode(unsafe { ctru_sys::PS_GetLocalFriendCodeSeed(&mut seed) })?; Ok(seed) } pub fn device_id() -> crate::Result { let mut id: u32 = 0; - LibCtruResult(unsafe { ctru_sys::PS_GetDeviceId(&mut id) })?; + ResultCode(unsafe { ctru_sys::PS_GetDeviceId(&mut id) })?; Ok(id) } pub fn generate_random_bytes(out: &mut [u8]) -> crate::Result<()> { - LibCtruResult(unsafe { + ResultCode(unsafe { ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len() as u32) })?; Ok(()) diff --git a/ctru-rs/src/services/soc.rs b/ctru-rs/src/services/soc.rs index ce8a31f..88fb4aa 100644 --- a/ctru-rs/src/services/soc.rs +++ b/ctru-rs/src/services/soc.rs @@ -3,7 +3,7 @@ use once_cell::sync::Lazy; use std::net::Ipv4Addr; use std::sync::Mutex; -use crate::error::LibCtruResult; +use crate::error::ResultCode; use crate::services::ServiceReference; use crate::Error; @@ -39,7 +39,7 @@ impl Soc { false, || { let soc_mem = unsafe { memalign(0x1000, num_bytes) } as *mut u32; - LibCtruResult(unsafe { ctru_sys::socInit(soc_mem, num_bytes as u32) })?; + ResultCode(unsafe { ctru_sys::socInit(soc_mem, num_bytes as u32) })?; Ok(()) }, diff --git a/ctru-rs/src/services/sslc.rs b/ctru-rs/src/services/sslc.rs index b422028..aa4d26f 100644 --- a/ctru-rs/src/services/sslc.rs +++ b/ctru-rs/src/services/sslc.rs @@ -1,6 +1,6 @@ // TODO: Implement remaining functions -use crate::error::LibCtruResult; +use crate::error::ResultCode; pub struct SslC(()); @@ -8,7 +8,7 @@ impl SslC { /// Initialize sslc pub fn init() -> crate::Result { unsafe { - LibCtruResult(ctru_sys::sslcInit(0))?; + ResultCode(ctru_sys::sslcInit(0))?; Ok(SslC(())) } } @@ -16,7 +16,7 @@ impl SslC { /// Fill `buf` with `buf.len()` random bytes pub fn generate_random_data(&self, buf: &mut [u8]) -> crate::Result<()> { unsafe { - LibCtruResult(ctru_sys::sslcGenerateRandomData( + ResultCode(ctru_sys::sslcGenerateRandomData( buf.as_ptr() as _, buf.len() as u32, ))?; From 95756f7b73cd82994a3257acf31a179b1e1af00b Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 16 Oct 2022 15:27:02 +0200 Subject: [PATCH 19/57] Move ``docstring-to-rustdoc`` to its own crate --- Cargo.toml | 2 +- ctru-sys/Cargo.toml | 8 -------- ctru-sys/bindgen.sh | 2 +- ctru-sys/docstring-to-rustdoc/Cargo.toml | 7 +++++++ .../src/main.rs} | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 ctru-sys/docstring-to-rustdoc/Cargo.toml rename ctru-sys/{src/bin/docstring-to-rustdoc.rs => docstring-to-rustdoc/src/main.rs} (81%) diff --git a/Cargo.toml b/Cargo.toml index a32362d..d7694bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["ctru-rs", "ctru-sys"] +members = ["ctru-rs", "ctru-sys", "ctru-sys/docstring-to-rustdoc"] [patch.'https://github.com/Meziu/ctru-rs'] # Make sure all dependencies use the local ctru-sys package diff --git a/ctru-sys/Cargo.toml b/ctru-sys/Cargo.toml index c505fae..6367b13 100644 --- a/ctru-sys/Cargo.toml +++ b/ctru-sys/Cargo.toml @@ -8,11 +8,3 @@ edition = "2021" [dependencies] libc = { version = "0.2.121", default-features = false } -doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", version = "0.2.2", rev = "573f483ad63ab4662650961998d3ed093a703983", optional = true } - -[features] -build-binary = ["doxygen-rs"] - -[[bin]] -name = "docstring-to-rustdoc" -required-features = ["build-binary"] diff --git a/ctru-sys/bindgen.sh b/ctru-sys/bindgen.sh index d6c8556..c70951a 100755 --- a/ctru-sys/bindgen.sh +++ b/ctru-sys/bindgen.sh @@ -29,6 +29,6 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \ -D__3DS__ \ > src/bindings.rs -cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs +cargo docstring-to-rustdoc src/bindings.rs cargo fmt --all diff --git a/ctru-sys/docstring-to-rustdoc/Cargo.toml b/ctru-sys/docstring-to-rustdoc/Cargo.toml new file mode 100644 index 0000000..9b38256 --- /dev/null +++ b/ctru-sys/docstring-to-rustdoc/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "docstring-to-rustdoc" +version = "0.1.0" +edition = "2021" + +[dependencies] +doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", version = "0.2.2", rev = "573f483ad63ab4662650961998d3ed093a703983" } \ No newline at end of file diff --git a/ctru-sys/src/bin/docstring-to-rustdoc.rs b/ctru-sys/docstring-to-rustdoc/src/main.rs similarity index 81% rename from ctru-sys/src/bin/docstring-to-rustdoc.rs rename to ctru-sys/docstring-to-rustdoc/src/main.rs index 10ffed6..43fa96b 100644 --- a/ctru-sys/src/bin/docstring-to-rustdoc.rs +++ b/ctru-sys/docstring-to-rustdoc/src/main.rs @@ -2,8 +2,8 @@ //! //! # Usage //! -//! `cargo run --bin docstring-to-rustdoc --features="build-binary" -- [location of the bindings.rs]` -//! Example: `cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs` +//! `cargo docstring-to-rustdoc [location of the bindings.rs]` +//! Example: `cargo docstring-to-rustdoc src/bindings.rs` //! //! # Transformations //! From dff7ee19c6ef04fd868e0c85585c242550260454 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 16 Oct 2022 17:54:09 +0200 Subject: [PATCH 20/57] Fix docstring-to-rustdoc usage --- ctru-sys/bindgen.sh | 2 +- ctru-sys/docstring-to-rustdoc/src/main.rs | 4 +- ctru-sys/src/bindings.rs | 22449 ++++++++++---------- 3 files changed, 11568 insertions(+), 10887 deletions(-) diff --git a/ctru-sys/bindgen.sh b/ctru-sys/bindgen.sh index c70951a..6fbaaab 100755 --- a/ctru-sys/bindgen.sh +++ b/ctru-sys/bindgen.sh @@ -29,6 +29,6 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \ -D__3DS__ \ > src/bindings.rs -cargo docstring-to-rustdoc src/bindings.rs +cargo run --package docstring-to-rustdoc -- src/bindings.rs cargo fmt --all diff --git a/ctru-sys/docstring-to-rustdoc/src/main.rs b/ctru-sys/docstring-to-rustdoc/src/main.rs index 43fa96b..c86cc85 100644 --- a/ctru-sys/docstring-to-rustdoc/src/main.rs +++ b/ctru-sys/docstring-to-rustdoc/src/main.rs @@ -2,8 +2,8 @@ //! //! # Usage //! -//! `cargo docstring-to-rustdoc [location of the bindings.rs]` -//! Example: `cargo docstring-to-rustdoc src/bindings.rs` +//! `cargo run --package docstring-to-rustdoc -- [location of the bindings.rs]` +//! Example: `cargo run --package docstring-to-rustdoc -- src/bindings.rs` //! //! # Transformations //! diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs index ff6db4b..5bea3bc 100644 --- a/ctru-sys/src/bindings.rs +++ b/ctru-sys/src/bindings.rs @@ -1292,51 +1292,62 @@ pub type ThreadFunc = ::core::option::Option; #[doc = "Structure representing CPU registers"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CpuRegisters { - #[doc = "r0-r12."] - #[doc = ""] +#[doc = "r0-r12."] +#[doc = ""] + pub r: [u32_; 13usize], - #[doc = "sp."] - #[doc = ""] +#[doc = "sp."] +#[doc = ""] + pub sp: u32_, - #[doc = "lr."] - #[doc = ""] +#[doc = "lr."] +#[doc = ""] + pub lr: u32_, - #[doc = "pc. May need to be adjusted."] - #[doc = ""] +#[doc = "pc. May need to be adjusted."] +#[doc = ""] + pub pc: u32_, - #[doc = "cpsr."] - #[doc = ""] +#[doc = "cpsr."] +#[doc = ""] + pub cpsr: u32_, } #[doc = "Structure representing FPU registers"] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct FpuRegisters { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1, - #[doc = "fpscr."] - #[doc = ""] +#[doc = "fpscr."] +#[doc = ""] + pub fpscr: u32_, - #[doc = "fpexc."] - #[doc = ""] +#[doc = "fpexc."] +#[doc = ""] + pub fpexc: u32_, } #[repr(C)] #[derive(Copy, Clone)] pub union FpuRegisters__bindgen_ty_1 { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1__bindgen_ty_1, - #[doc = "s0-s31."] - #[doc = ""] +#[doc = "s0-s31."] +#[doc = ""] + pub s: [f32; 32usize], } #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FpuRegisters__bindgen_ty_1__bindgen_ty_1 { - #[doc = "d0-d15."] - #[doc = ""] +#[doc = "d0-d15."] +#[doc = ""] + pub d: [f64; 16usize], } impl Default for FpuRegisters__bindgen_ty_1 { @@ -1369,6 +1380,7 @@ pub const RL_STATUS: _bindgen_ty_1 = 25; #[doc = "Result code level values."] #[doc = ""] + pub type _bindgen_ty_1 = ::libc::c_uint; pub const RS_SUCCESS: _bindgen_ty_2 = 0; pub const RS_NOP: _bindgen_ty_2 = 1; @@ -1386,6 +1398,7 @@ pub const RS_INVALIDRESVAL: _bindgen_ty_2 = 63; #[doc = "Result code summary values."] #[doc = ""] + pub type _bindgen_ty_2 = ::libc::c_uint; pub const RM_COMMON: _bindgen_ty_3 = 0; pub const RM_KERNEL: _bindgen_ty_3 = 1; @@ -1488,6 +1501,7 @@ pub const RM_INVALIDRESVAL: _bindgen_ty_3 = 255; #[doc = "Result code module values."] #[doc = ""] + pub type _bindgen_ty_3 = ::libc::c_uint; pub const RD_SUCCESS: _bindgen_ty_4 = 0; pub const RD_INVALID_RESULT_VALUE: _bindgen_ty_4 = 1023; @@ -1517,512 +1531,631 @@ pub const RD_INVALID_SELECTION: _bindgen_ty_4 = 1000; #[doc = "Result code generic description values."] #[doc = ""] + pub type _bindgen_ty_4 = ::libc::c_uint; #[doc = "Readable"] #[doc = ""] + pub const IPC_BUFFER_R: IPC_BufferRights = 2; #[doc = "Writable"] #[doc = ""] + pub const IPC_BUFFER_W: IPC_BufferRights = 4; #[doc = "Readable and Writable"] #[doc = ""] + pub const IPC_BUFFER_RW: IPC_BufferRights = 6; #[doc = "IPC buffer access rights."] #[doc = ""] + pub type IPC_BufferRights = ::libc::c_uint; #[doc = "Memory un-mapping"] #[doc = ""] + pub const MEMOP_FREE: MemOp = 1; #[doc = "Reserve memory"] #[doc = ""] + pub const MEMOP_RESERVE: MemOp = 2; #[doc = "Memory mapping"] #[doc = ""] + pub const MEMOP_ALLOC: MemOp = 3; #[doc = "Mirror mapping"] #[doc = ""] + pub const MEMOP_MAP: MemOp = 4; #[doc = "Mirror unmapping"] #[doc = ""] + pub const MEMOP_UNMAP: MemOp = 5; #[doc = "Change protection"] #[doc = ""] + pub const MEMOP_PROT: MemOp = 6; #[doc = "APPLICATION memory region."] #[doc = ""] + pub const MEMOP_REGION_APP: MemOp = 256; #[doc = "SYSTEM memory region."] #[doc = ""] + pub const MEMOP_REGION_SYSTEM: MemOp = 512; #[doc = "BASE memory region."] #[doc = ""] + pub const MEMOP_REGION_BASE: MemOp = 768; #[doc = "Operation bitmask."] #[doc = ""] + pub const MEMOP_OP_MASK: MemOp = 255; #[doc = "Region bitmask."] #[doc = ""] + pub const MEMOP_REGION_MASK: MemOp = 3840; #[doc = "Flag for linear memory operations"] #[doc = ""] + pub const MEMOP_LINEAR_FLAG: MemOp = 65536; #[doc = "Allocates linear memory."] #[doc = ""] + pub const MEMOP_ALLOC_LINEAR: MemOp = 65539; #[doc = "[`svcControlMemory`] operation flags"] -#[doc = ""] #[doc = "The lowest 8 bits are the operation"] #[doc = ""] + pub type MemOp = ::libc::c_uint; #[doc = "Free memory"] #[doc = ""] + pub const MEMSTATE_FREE: MemState = 0; #[doc = "Reserved memory"] #[doc = ""] + pub const MEMSTATE_RESERVED: MemState = 1; #[doc = "I/O memory"] #[doc = ""] + pub const MEMSTATE_IO: MemState = 2; #[doc = "Static memory"] #[doc = ""] + pub const MEMSTATE_STATIC: MemState = 3; #[doc = "Code memory"] #[doc = ""] + pub const MEMSTATE_CODE: MemState = 4; #[doc = "Private memory"] #[doc = ""] + pub const MEMSTATE_PRIVATE: MemState = 5; #[doc = "Shared memory"] #[doc = ""] + pub const MEMSTATE_SHARED: MemState = 6; #[doc = "Continuous memory"] #[doc = ""] + pub const MEMSTATE_CONTINUOUS: MemState = 7; #[doc = "Aliased memory"] #[doc = ""] + pub const MEMSTATE_ALIASED: MemState = 8; #[doc = "Alias memory"] #[doc = ""] + pub const MEMSTATE_ALIAS: MemState = 9; #[doc = "Aliased code memory"] #[doc = ""] + pub const MEMSTATE_ALIASCODE: MemState = 10; #[doc = "Locked memory"] #[doc = ""] + pub const MEMSTATE_LOCKED: MemState = 11; #[doc = "The state of a memory block."] #[doc = ""] + pub type MemState = ::libc::c_uint; #[doc = "Readable"] #[doc = ""] + pub const MEMPERM_READ: MemPerm = 1; #[doc = "Writable"] #[doc = ""] + pub const MEMPERM_WRITE: MemPerm = 2; #[doc = "Executable"] #[doc = ""] + pub const MEMPERM_EXECUTE: MemPerm = 4; #[doc = "Readable and writable"] #[doc = ""] + pub const MEMPERM_READWRITE: MemPerm = 3; #[doc = "Readable and executable"] #[doc = ""] + pub const MEMPERM_READEXECUTE: MemPerm = 5; #[doc = "Don't care"] #[doc = ""] + pub const MEMPERM_DONTCARE: MemPerm = 268435456; #[doc = "Memory permission flags"] #[doc = ""] + pub type MemPerm = ::libc::c_uint; #[doc = "All regions."] #[doc = ""] + pub const MEMREGION_ALL: MemRegion = 0; #[doc = "APPLICATION memory."] #[doc = ""] + pub const MEMREGION_APPLICATION: MemRegion = 1; #[doc = "SYSTEM memory."] #[doc = ""] + pub const MEMREGION_SYSTEM: MemRegion = 2; #[doc = "BASE memory."] #[doc = ""] + pub const MEMREGION_BASE: MemRegion = 3; #[doc = "Memory regions."] #[doc = ""] + pub type MemRegion = ::libc::c_uint; #[doc = "Memory information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MemInfo { - #[doc = "Base address."] - #[doc = ""] +#[doc = "Base address."] +#[doc = ""] + pub base_addr: u32_, - #[doc = "Size."] - #[doc = ""] +#[doc = "Size."] +#[doc = ""] + pub size: u32_, - #[doc = "Memory permissions. See [`MemPerm`]"] - #[doc = ""] +#[doc = "Memory permissions. See [`MemPerm`]"] +#[doc = ""] + pub perm: u32_, - #[doc = "Memory state. See [`MemState`]"] - #[doc = ""] +#[doc = "Memory state. See [`MemState`]"] +#[doc = ""] + pub state: u32_, } #[doc = "Memory page information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PageInfo { - #[doc = "Page flags."] - #[doc = ""] +#[doc = "Page flags."] +#[doc = ""] + pub flags: u32_, } #[doc = "Signal #value threads for wake-up."] #[doc = ""] + pub const ARBITRATION_SIGNAL: ArbitrationType = 0; #[doc = "If the memory at the address is strictly lower than #value, then wait for signal."] #[doc = ""] + pub const ARBITRATION_WAIT_IF_LESS_THAN: ArbitrationType = 1; #[doc = "If the memory at the address is strictly lower than #value, then decrement it and wait for signal."] #[doc = ""] + pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN: ArbitrationType = 2; #[doc = "If the memory at the address is strictly lower than #value, then wait for signal or timeout."] #[doc = ""] + pub const ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 3; #[doc = "If the memory at the address is strictly lower than #value, then decrement it and wait for signal or timeout."] #[doc = ""] + pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 4; #[doc = "Arbitration modes."] #[doc = ""] + pub type ArbitrationType = ::libc::c_uint; #[doc = "When the primitive is signaled, it will wake up exactly one thread and will clear itself automatically."] #[doc = ""] + pub const RESET_ONESHOT: ResetType = 0; #[doc = "When the primitive is signaled, it will wake up all threads and it won't clear itself automatically."] #[doc = ""] + pub const RESET_STICKY: ResetType = 1; #[doc = "Only meaningful for timers: same as ONESHOT but it will periodically signal the timer instead of just once."] #[doc = ""] + pub const RESET_PULSE: ResetType = 2; #[doc = "Reset types (for use with events and timers)"] #[doc = ""] + pub type ResetType = ::libc::c_uint; #[doc = "Unknown."] #[doc = ""] + pub const THREADINFO_TYPE_UNKNOWN: ThreadInfoType = 0; #[doc = "Types of thread info."] #[doc = ""] + pub type ThreadInfoType = ::libc::c_uint; #[doc = "Thread priority"] #[doc = ""] + pub const RESLIMIT_PRIORITY: ResourceLimitType = 0; #[doc = "Quantity of allocatable memory"] #[doc = ""] + pub const RESLIMIT_COMMIT: ResourceLimitType = 1; #[doc = "Number of threads"] #[doc = ""] + pub const RESLIMIT_THREAD: ResourceLimitType = 2; #[doc = "Number of events"] #[doc = ""] + pub const RESLIMIT_EVENT: ResourceLimitType = 3; #[doc = "Number of mutexes"] #[doc = ""] + pub const RESLIMIT_MUTEX: ResourceLimitType = 4; #[doc = "Number of semaphores"] #[doc = ""] + pub const RESLIMIT_SEMAPHORE: ResourceLimitType = 5; #[doc = "Number of timers"] #[doc = ""] + pub const RESLIMIT_TIMER: ResourceLimitType = 6; #[doc = "Number of shared memory objects, see [`svcCreateMemoryBlock`]"] #[doc = ""] + pub const RESLIMIT_SHAREDMEMORY: ResourceLimitType = 7; #[doc = "Number of address arbiters"] #[doc = ""] + pub const RESLIMIT_ADDRESSARBITER: ResourceLimitType = 8; #[doc = "CPU time. Value expressed in percentage regular until it reaches 90."] #[doc = ""] + pub const RESLIMIT_CPUTIME: ResourceLimitType = 9; #[doc = "Forces enum size to be 32 bits"] #[doc = ""] + pub const RESLIMIT_BIT: ResourceLimitType = 2147483648; #[doc = "Types of resource limit"] #[doc = ""] + pub type ResourceLimitType = ::libc::c_uint; #[doc = "DMA transfer involving at least one device is starting and has not reached DMAWFP yet."] #[doc = ""] + pub const DMASTATE_STARTING: DmaState = 0; #[doc = "DMA channel is in WFP state for the destination device (2nd loop iteration onwards)."] #[doc = ""] + pub const DMASTATE_WFP_DST: DmaState = 1; #[doc = "DMA channel is in WFP state for the source device (2nd loop iteration onwards)."] #[doc = ""] + pub const DMASTATE_WFP_SRC: DmaState = 2; #[doc = "DMA transfer is running."] #[doc = ""] + pub const DMASTATE_RUNNING: DmaState = 3; #[doc = "DMA transfer is done."] #[doc = ""] + pub const DMASTATE_DONE: DmaState = 4; #[doc = "DMA transfer state."] #[doc = ""] + pub type DmaState = ::libc::c_uint; #[doc = "DMA source is a device/peripheral. Address will not auto-increment."] #[doc = ""] + pub const DMACFG_SRC_IS_DEVICE: _bindgen_ty_5 = 1; #[doc = "DMA destination is a device/peripheral. Address will not auto-increment."] #[doc = ""] + pub const DMACFG_DST_IS_DEVICE: _bindgen_ty_5 = 2; #[doc = "Make [`svcStartInterProcessDma`] wait for the channel to be unlocked."] #[doc = ""] + pub const DMACFG_WAIT_AVAILABLE: _bindgen_ty_5 = 4; #[doc = "Keep the channel locked after the transfer. Required for [`svcRestartDma`]"] #[doc = ""] + pub const DMACFG_KEEP_LOCKED: _bindgen_ty_5 = 8; #[doc = "Use the provided source device configuration even if the DMA source is not a device."] #[doc = ""] + pub const DMACFG_USE_SRC_CONFIG: _bindgen_ty_5 = 64; #[doc = "Use the provided destination device configuration even if the DMA destination is not a device."] #[doc = ""] + pub const DMACFG_USE_DST_CONFIG: _bindgen_ty_5 = 128; #[doc = "Configuration flags for [`DmaConfig`]"] #[doc = ""] + pub type _bindgen_ty_5 = ::libc::c_uint; #[doc = "Unlock the channel after transfer."] #[doc = ""] + pub const DMARST_UNLOCK: _bindgen_ty_6 = 1; #[doc = "Replace DMAFLUSHP instructions by NOP (they may not be regenerated even if this flag is not set)."] #[doc = ""] + pub const DMARST_RESUME_DEVICE: _bindgen_ty_6 = 2; #[doc = "Configuration flags for [`svcRestartDma`]"] #[doc = ""] + pub type _bindgen_ty_6 = ::libc::c_uint; #[doc = "Device configuration structure, part of [`DmaConfig`]"] -#[doc = ""] #[doc = "- if (and only if) src/dst is a device, then src/dst won't be auto-incremented."] #[doc = "- the kernel uses DMAMOV instead of DMAADNH, when having to decrement (possibly working around an erratum);"] #[doc = "this forces all loops to be unrolled -- you need to keep that in mind when using negative increments, as the kernel"] #[doc = "uses a limit of 100 DMA instruction bytes per channel."] -#[doc = ""] #[doc = "# Notes"] #[doc = ""] -#[doc = "*"] -#[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaDeviceConfig { - #[doc = "DMA device ID."] - #[doc = ""] +#[doc = "DMA device ID."] +#[doc = ""] + pub deviceId: s8, - #[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] - #[doc = ""] +#[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] +#[doc = ""] + pub allowedAlignments: s8, - #[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] - #[doc = ""] +#[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] +#[doc = ""] + pub burstSize: s16, - #[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] - #[doc = ""] +#[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] +#[doc = ""] + pub transferSize: s16, - #[doc = "Burst loop stride, can be <= 0."] - #[doc = ""] +#[doc = "Burst loop stride, can be <= 0."] +#[doc = ""] + pub burstStride: s16, - #[doc = "\"Transfer\" loop stride, can be <= 0."] - #[doc = ""] + pub transferStride: s16, } #[doc = "Configuration stucture for [`svcStartInterProcessDma`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaConfig { - #[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] - #[doc = ""] +#[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] +#[doc = ""] + pub channelId: s8, - #[doc = "Endian swap size (can be 0)."] - #[doc = ""] +#[doc = "Endian swap size (can be 0)."] +#[doc = ""] + pub endianSwapSize: s8, - #[doc = "DMACFG_* flags."] - #[doc = ""] +#[doc = "DMACFG_* flags."] +#[doc = ""] + pub flags: u8_, pub _padding: u8_, - #[doc = "Source device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] - #[doc = ""] +#[doc = "Source device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] +#[doc = ""] + pub srcCfg: DmaDeviceConfig, - #[doc = "Destination device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] - #[doc = ""] +#[doc = "Destination device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] +#[doc = ""] + pub dstCfg: DmaDeviceConfig, } #[doc = "Enable and lock perfmon. functionality."] #[doc = ""] + pub const PERFCOUNTEROP_ENABLE: PerfCounterOperation = 0; #[doc = "Disable and forcibly unlock perfmon. functionality."] #[doc = ""] + pub const PERFCOUNTEROP_DISABLE: PerfCounterOperation = 1; #[doc = "Get the value of a counter register."] #[doc = ""] + pub const PERFCOUNTEROP_GET_VALUE: PerfCounterOperation = 2; #[doc = "Set the value of a counter register."] #[doc = ""] + pub const PERFCOUNTEROP_SET_VALUE: PerfCounterOperation = 3; #[doc = "Get the overflow flags for all CP15 and SCU counters."] #[doc = ""] + pub const PERFCOUNTEROP_GET_OVERFLOW_FLAGS: PerfCounterOperation = 4; #[doc = "Reset the value and/or overflow flags of selected counters."] #[doc = ""] + pub const PERFCOUNTEROP_RESET: PerfCounterOperation = 5; #[doc = "Get the event ID associated to a particular counter."] #[doc = ""] + pub const PERFCOUNTEROP_GET_EVENT: PerfCounterOperation = 6; #[doc = "Set the event ID associated to a paritcular counter."] #[doc = ""] + pub const PERFCOUNTEROP_SET_EVENT: PerfCounterOperation = 7; #[doc = "(Dis)allow the kernel to track counter overflows and to use 64-bit counter values."] #[doc = ""] + pub const PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED: PerfCounterOperation = 8; #[doc = "Operations for [`svcControlPerformanceCounter`]"] #[doc = ""] + pub type PerfCounterOperation = ::libc::c_uint; pub const PERFCOUNTERREG_CORE_BASE: PerfCounterRegister = 0; #[doc = "CP15 PMN0."] #[doc = ""] + pub const PERFCOUNTERREG_CORE_COUNT_REG_0: PerfCounterRegister = 0; #[doc = "CP15 PMN1."] #[doc = ""] + pub const PERFCOUNTERREG_CORE_COUNT_REG_1: PerfCounterRegister = 1; #[doc = "CP15 CCNT."] #[doc = ""] + pub const PERFCOUNTERREG_CORE_CYCLE_COUNTER: PerfCounterRegister = 2; pub const PERFCOUNTERREG_SCU_BASE: PerfCounterRegister = 16; #[doc = "SCU MN0."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_0: PerfCounterRegister = 16; #[doc = "SCU MN1."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_1: PerfCounterRegister = 17; #[doc = "SCU MN2."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_2: PerfCounterRegister = 18; #[doc = "SCU MN3."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_3: PerfCounterRegister = 19; #[doc = "SCU MN4. Prod-N3DS only. IRQ line missing."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_4: PerfCounterRegister = 20; #[doc = "SCU MN5. Prod-N3DS only. IRQ line missing."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_5: PerfCounterRegister = 21; #[doc = "SCU MN6. Prod-N3DS only. IRQ line missing."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_6: PerfCounterRegister = 22; #[doc = "SCU MN7. Prod-N3DS only. IRQ line missing."] #[doc = ""] + pub const PERFCOUNTERREG_SCU_7: PerfCounterRegister = 23; #[doc = "Performance counter register IDs (CP15 and SCU)."] #[doc = ""] + pub type PerfCounterRegister = ::libc::c_uint; pub const PERFCOUNTEREVT_CORE_BASE: PerfCounterEvent = 0; pub const PERFCOUNTEREVT_CORE_INST_CACHE_MISS: PerfCounterEvent = 0; @@ -2049,10 +2182,12 @@ pub const PERFCOUNTEREVT_CORE_MERGE_IN_STORE_BUFFER: PerfCounterEvent = 20; #[doc = "One cycle elapsed."] #[doc = ""] + pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT: PerfCounterEvent = 255; #[doc = "64 cycles elapsed."] #[doc = ""] + pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT_64: PerfCounterEvent = 4095; pub const PERFCOUNTEREVT_SCU_BASE: PerfCounterEvent = 4096; pub const PERFCOUNTEREVT_SCU_DISABLED: PerfCounterEvent = 4096; @@ -2077,57 +2212,66 @@ pub const PERFCOUNTEREVT_SCU_EXTERNAL_READ: PerfCounterEvent = 4114; pub const PERFCOUNTEREVT_SCU_EXTERNAL_WRITE: PerfCounterEvent = 4115; pub const PERFCOUNTEREVT_SCU_CYCLE_COUNT: PerfCounterEvent = 4127; #[doc = "Performance counter event IDs (CP15 or SCU)."] -#[doc = ""] #[doc = "- CP15: "] #[doc = "- SCU: "] -#[doc = ""] #[doc = "# Notes"] +#[doc = "Refer to:"] #[doc = ""] -#[doc = "* Refer to:"] -#[doc = ""] + pub type PerfCounterEvent = ::libc::c_uint; #[doc = "Event relating to the attachment of a process."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachProcessEvent { - #[doc = "ID of the program."] - #[doc = ""] +#[doc = "ID of the program."] +#[doc = ""] + pub program_id: u64_, - #[doc = "Name of the process."] - #[doc = ""] +#[doc = "Name of the process."] +#[doc = ""] + pub process_name: [::libc::c_char; 8usize], - #[doc = "ID of the process."] - #[doc = ""] +#[doc = "ID of the process."] +#[doc = ""] + pub process_id: u32_, - #[doc = "Always 0"] - #[doc = ""] +#[doc = "Always 0"] +#[doc = ""] + pub other_flags: u32_, } #[doc = "Process exited either normally or due to an uncaught exception."] #[doc = ""] + pub const EXITPROCESS_EVENT_EXIT: ExitProcessEventReason = 0; #[doc = "Process has been terminated by [`svcTerminateProcess`]"] #[doc = ""] + pub const EXITPROCESS_EVENT_TERMINATE: ExitProcessEventReason = 1; #[doc = "Process has been terminated by [`svcTerminateDebugProcess`]"] #[doc = ""] + pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2; #[doc = "Reasons for an exit process event."] #[doc = ""] + pub type ExitProcessEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a process."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitProcessEvent { - #[doc = "Reason for exiting. See [`ExitProcessEventReason`]"] - #[doc = ""] +#[doc = "Reason for exiting. See [`ExitProcessEventReason`]"] +#[doc = ""] + pub reason: ExitProcessEventReason, } impl Default for ExitProcessEvent { @@ -2141,46 +2285,57 @@ impl Default for ExitProcessEvent { } #[doc = "Event relating to the attachment of a thread."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachThreadEvent { - #[doc = "ID of the creating thread."] - #[doc = ""] +#[doc = "ID of the creating thread."] +#[doc = ""] + pub creator_thread_id: u32_, - #[doc = "Thread local storage."] - #[doc = ""] +#[doc = "Thread local storage."] +#[doc = ""] + pub thread_local_storage: u32_, - #[doc = "Entry point of the thread."] - #[doc = ""] +#[doc = "Entry point of the thread."] +#[doc = ""] + pub entry_point: u32_, } #[doc = "Thread exited."] #[doc = ""] + pub const EXITTHREAD_EVENT_EXIT: ExitThreadEventReason = 0; #[doc = "Thread terminated."] #[doc = ""] + pub const EXITTHREAD_EVENT_TERMINATE: ExitThreadEventReason = 1; #[doc = "Process exited either normally or due to an uncaught exception."] #[doc = ""] + pub const EXITTHREAD_EVENT_EXIT_PROCESS: ExitThreadEventReason = 2; #[doc = "Process has been terminated by [`svcTerminateProcess`]"] #[doc = ""] + pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3; #[doc = "Reasons for an exit thread event."] #[doc = ""] + pub type ExitThreadEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a thread."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitThreadEvent { - #[doc = "Reason for exiting. See [`ExitThreadEventReason`]"] - #[doc = ""] +#[doc = "Reason for exiting. See [`ExitThreadEventReason`]"] +#[doc = ""] + pub reason: ExitThreadEventReason, } impl Default for ExitThreadEvent { @@ -2195,102 +2350,127 @@ impl Default for ExitThreadEvent { #[doc = "Panic."] #[doc = ""] + pub const USERBREAK_PANIC: UserBreakType = 0; #[doc = "Assertion failed."] #[doc = ""] + pub const USERBREAK_ASSERT: UserBreakType = 1; #[doc = "User related."] #[doc = ""] + pub const USERBREAK_USER: UserBreakType = 2; #[doc = "Load RO."] #[doc = ""] + pub const USERBREAK_LOAD_RO: UserBreakType = 3; #[doc = "Unload RO."] #[doc = ""] + pub const USERBREAK_UNLOAD_RO: UserBreakType = 4; #[doc = "Reasons for a user break."] #[doc = ""] + pub type UserBreakType = ::libc::c_uint; #[doc = "Undefined instruction."] #[doc = ""] + pub const EXCEVENT_UNDEFINED_INSTRUCTION: ExceptionEventType = 0; #[doc = "Prefetch abort."] #[doc = ""] + pub const EXCEVENT_PREFETCH_ABORT: ExceptionEventType = 1; #[doc = "Data abort (other than the below kind)."] #[doc = ""] + pub const EXCEVENT_DATA_ABORT: ExceptionEventType = 2; #[doc = "Unaligned data access."] #[doc = ""] + pub const EXCEVENT_UNALIGNED_DATA_ACCESS: ExceptionEventType = 3; #[doc = "Attached break."] #[doc = ""] + pub const EXCEVENT_ATTACH_BREAK: ExceptionEventType = 4; #[doc = "Stop point reached."] #[doc = ""] + pub const EXCEVENT_STOP_POINT: ExceptionEventType = 5; #[doc = "User break occurred."] #[doc = ""] + pub const EXCEVENT_USER_BREAK: ExceptionEventType = 6; #[doc = "Debugger break occurred."] #[doc = ""] + pub const EXCEVENT_DEBUGGER_BREAK: ExceptionEventType = 7; #[doc = "Undefined syscall."] #[doc = ""] + pub const EXCEVENT_UNDEFINED_SYSCALL: ExceptionEventType = 8; #[doc = "Reasons for an exception event."] #[doc = ""] + pub type ExceptionEventType = ::libc::c_uint; #[doc = "Event relating to fault exceptions (CPU exceptions other than stop points and undefined syscalls)."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FaultExceptionEvent { - #[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] - #[doc = ""] +#[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] +#[doc = ""] + pub fault_information: u32_, } #[doc = "See [`SVC_STOP_POINT`]"] #[doc = ""] + pub const STOPPOINT_SVC_FF: StopPointType = 0; #[doc = "Breakpoint."] #[doc = ""] + pub const STOPPOINT_BREAKPOINT: StopPointType = 1; #[doc = "Watchpoint."] #[doc = ""] + pub const STOPPOINT_WATCHPOINT: StopPointType = 2; #[doc = "Stop point types"] #[doc = ""] + pub type StopPointType = ::libc::c_uint; #[doc = "Event relating to stop points"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StopPointExceptionEvent { - #[doc = "Stop point type, see [`StopPointType`]"] - #[doc = ""] +#[doc = "Stop point type, see [`StopPointType`]"] +#[doc = ""] + pub type_: StopPointType, - #[doc = "FAR for Watchpoints, otherwise 0."] - #[doc = ""] +#[doc = "FAR for Watchpoints, otherwise 0."] +#[doc = ""] + pub fault_information: u32_, } impl Default for StopPointExceptionEvent { @@ -2304,17 +2484,21 @@ impl Default for StopPointExceptionEvent { } #[doc = "Event relating to [`svcBreak`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UserBreakExceptionEvent { - #[doc = "User break type, see [`UserBreakType`]"] - #[doc = ""] +#[doc = "User break type, see [`UserBreakType`]"] +#[doc = ""] + pub type_: UserBreakType, - #[doc = "For LOAD_RO and UNLOAD_RO."] - #[doc = ""] +#[doc = "For LOAD_RO and UNLOAD_RO."] +#[doc = ""] + pub croInfo: u32_, - #[doc = "For LOAD_RO and UNLOAD_RO."] - #[doc = ""] +#[doc = "For LOAD_RO and UNLOAD_RO."] +#[doc = ""] + pub croInfoSize: u32_, } impl Default for UserBreakExceptionEvent { @@ -2328,40 +2512,49 @@ impl Default for UserBreakExceptionEvent { } #[doc = "Event relating to [`svcBreakDebugProcess`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DebuggerBreakExceptionEvent { - #[doc = "IDs of the attached process's threads that were running on each core at the time of the [`svcBreakDebugProcess`] call, or -1 (only the first 2 values are meaningful on O3DS)."] - #[doc = ""] +#[doc = "IDs of the attached process's threads that were running on each core at the time of the [`svcBreakDebugProcess`] call, or -1 (only the first 2 values are meaningful on O3DS)."] +#[doc = ""] + pub thread_ids: [s32; 4usize], } #[doc = "Event relating to exceptions."] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct ExceptionEvent { - #[doc = "Type of event. See [`ExceptionEventType`]"] - #[doc = ""] +#[doc = "Type of event. See [`ExceptionEventType`]"] +#[doc = ""] + pub type_: ExceptionEventType, - #[doc = "Address of the exception."] - #[doc = ""] +#[doc = "Address of the exception."] +#[doc = ""] + pub address: u32_, pub __bindgen_anon_1: ExceptionEvent__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ExceptionEvent__bindgen_ty_1 { - #[doc = "Fault exception event data."] - #[doc = ""] +#[doc = "Fault exception event data."] +#[doc = ""] + pub fault: FaultExceptionEvent, - #[doc = "Stop point exception event data."] - #[doc = ""] +#[doc = "Stop point exception event data."] +#[doc = ""] + pub stop_point: StopPointExceptionEvent, - #[doc = "User break exception event data."] - #[doc = ""] +#[doc = "User break exception event data."] +#[doc = ""] + pub user_break: UserBreakExceptionEvent, - #[doc = "Debugger break exception event data"] - #[doc = ""] +#[doc = "Debugger break exception event data"] +#[doc = ""] + pub debugger_break: DebuggerBreakExceptionEvent, } impl Default for ExceptionEvent__bindgen_ty_1 { @@ -2384,53 +2577,66 @@ impl Default for ExceptionEvent { } #[doc = "Event relating to the scheduler."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ScheduleInOutEvent { - #[doc = "Clock tick that the event occurred."] - #[doc = ""] +#[doc = "Clock tick that the event occurred."] +#[doc = ""] + pub clock_tick: u64_, } #[doc = "Event relating to syscalls."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SyscallInOutEvent { - #[doc = "Clock tick that the event occurred."] - #[doc = ""] +#[doc = "Clock tick that the event occurred."] +#[doc = ""] + pub clock_tick: u64_, - #[doc = "Syscall sent/received."] - #[doc = ""] +#[doc = "Syscall sent/received."] +#[doc = ""] + pub syscall: u32_, } #[doc = "Event relating to debug output."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OutputStringEvent { - #[doc = "Address of the outputted string."] - #[doc = ""] +#[doc = "Address of the outputted string."] +#[doc = ""] + pub string_addr: u32_, - #[doc = "Size of the outputted string."] - #[doc = ""] +#[doc = "Size of the outputted string."] +#[doc = ""] + pub string_size: u32_, } #[doc = "Event relating to the mapping of memory."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MapEvent { - #[doc = "Mapped address."] - #[doc = ""] +#[doc = "Mapped address."] +#[doc = ""] + pub mapped_addr: u32_, - #[doc = "Mapped size."] - #[doc = ""] +#[doc = "Mapped size."] +#[doc = ""] + pub mapped_size: u32_, - #[doc = "Memory permissions. See [`MemPerm`]"] - #[doc = ""] +#[doc = "Memory permissions. See [`MemPerm`]"] +#[doc = ""] + pub memperm: MemPerm, - #[doc = "Memory state. See [`MemState`]"] - #[doc = ""] +#[doc = "Memory state. See [`MemState`]"] +#[doc = ""] + pub memstate: MemState, } impl Default for MapEvent { @@ -2445,107 +2651,135 @@ impl Default for MapEvent { #[doc = "Process attached event."] #[doc = ""] + pub const DBGEVENT_ATTACH_PROCESS: DebugEventType = 0; #[doc = "Thread attached event."] #[doc = ""] + pub const DBGEVENT_ATTACH_THREAD: DebugEventType = 1; #[doc = "Thread exit event."] #[doc = ""] + pub const DBGEVENT_EXIT_THREAD: DebugEventType = 2; #[doc = "Process exit event."] #[doc = ""] + pub const DBGEVENT_EXIT_PROCESS: DebugEventType = 3; #[doc = "Exception event."] #[doc = ""] + pub const DBGEVENT_EXCEPTION: DebugEventType = 4; #[doc = "DLL load event."] #[doc = ""] + pub const DBGEVENT_DLL_LOAD: DebugEventType = 5; #[doc = "DLL unload event."] #[doc = ""] + pub const DBGEVENT_DLL_UNLOAD: DebugEventType = 6; #[doc = "Schedule in event."] #[doc = ""] + pub const DBGEVENT_SCHEDULE_IN: DebugEventType = 7; #[doc = "Schedule out event."] #[doc = ""] + pub const DBGEVENT_SCHEDULE_OUT: DebugEventType = 8; #[doc = "Syscall in event."] #[doc = ""] + pub const DBGEVENT_SYSCALL_IN: DebugEventType = 9; #[doc = "Syscall out event."] #[doc = ""] + pub const DBGEVENT_SYSCALL_OUT: DebugEventType = 10; #[doc = "Output string event."] #[doc = ""] + pub const DBGEVENT_OUTPUT_STRING: DebugEventType = 11; #[doc = "Map event."] #[doc = ""] + pub const DBGEVENT_MAP: DebugEventType = 12; #[doc = "Debug event type."] #[doc = ""] + pub type DebugEventType = ::libc::c_uint; #[doc = "Information about a debug event."] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct DebugEventInfo { - #[doc = "Type of event. See [`DebugEventType`]"] - #[doc = ""] +#[doc = "Type of event. See [`DebugEventType`]"] +#[doc = ""] + pub type_: DebugEventType, - #[doc = "ID of the thread."] - #[doc = ""] +#[doc = "ID of the thread."] +#[doc = ""] + pub thread_id: u32_, - #[doc = "Flags. Bit0 means that [`svcContinueDebugEvent`] needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] - #[doc = ""] +#[doc = "Flags. Bit0 means that [`svcContinueDebugEvent`] needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] +#[doc = ""] + pub flags: u32_, - #[doc = "Always 0."] - #[doc = ""] +#[doc = "Always 0."] +#[doc = ""] + pub remnants: [u8_; 4usize], pub __bindgen_anon_1: DebugEventInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union DebugEventInfo__bindgen_ty_1 { - #[doc = "Process attachment event data."] - #[doc = ""] +#[doc = "Process attachment event data."] +#[doc = ""] + pub attach_process: AttachProcessEvent, - #[doc = "Thread attachment event data."] - #[doc = ""] +#[doc = "Thread attachment event data."] +#[doc = ""] + pub attach_thread: AttachThreadEvent, - #[doc = "Thread exit event data."] - #[doc = ""] +#[doc = "Thread exit event data."] +#[doc = ""] + pub exit_thread: ExitThreadEvent, - #[doc = "Process exit event data."] - #[doc = ""] +#[doc = "Process exit event data."] +#[doc = ""] + pub exit_process: ExitProcessEvent, - #[doc = "Exception event data."] - #[doc = ""] +#[doc = "Exception event data."] +#[doc = ""] + pub exception: ExceptionEvent, - #[doc = "Schedule in/out event data."] - #[doc = ""] +#[doc = "Schedule in/out event data."] +#[doc = ""] + pub scheduler: ScheduleInOutEvent, - #[doc = "Syscall in/out event data."] - #[doc = ""] +#[doc = "Syscall in/out event data."] +#[doc = ""] + pub syscall: SyscallInOutEvent, - #[doc = "Output string event data."] - #[doc = ""] +#[doc = "Output string event data."] +#[doc = ""] + pub output_string: OutputStringEvent, - #[doc = "Map event data."] - #[doc = ""] +#[doc = "Map event data."] +#[doc = ""] + pub map: MapEvent, } impl Default for DebugEventInfo__bindgen_ty_1 { @@ -2569,35 +2803,43 @@ impl Default for DebugEventInfo { #[doc = "Inhibit user-defined CPU exception handlers (including watchpoints and breakpoints, regardless of any [`svcKernelSetState`] call)."] #[doc = ""] + pub const DBG_INHIBIT_USER_CPU_EXCEPTION_HANDLERS: DebugFlags = 1; #[doc = "Signal fault exception events. See [`FaultExceptionEvent`]"] #[doc = ""] + pub const DBG_SIGNAL_FAULT_EXCEPTION_EVENTS: DebugFlags = 2; #[doc = "Signal schedule in/out events. See [`ScheduleInOutEvent`]"] #[doc = ""] + pub const DBG_SIGNAL_SCHEDULE_EVENTS: DebugFlags = 4; #[doc = "Signal syscall in/out events. See [`SyscallInOutEvent`]"] #[doc = ""] + pub const DBG_SIGNAL_SYSCALL_EVENTS: DebugFlags = 8; #[doc = "Signal map events. See [`MapEvent`]"] #[doc = ""] + pub const DBG_SIGNAL_MAP_EVENTS: DebugFlags = 16; #[doc = "Debug flags for an attached process, set by [`svcContinueDebugEvent`]"] #[doc = ""] + pub type DebugFlags = ::libc::c_uint; #[repr(C)] #[derive(Copy, Clone)] pub struct ThreadContext { - #[doc = "CPU registers."] - #[doc = ""] +#[doc = "CPU registers."] +#[doc = ""] + pub cpu_registers: CpuRegisters, - #[doc = "FPU registers."] - #[doc = ""] +#[doc = "FPU registers."] +#[doc = ""] + pub fpu_registers: FpuRegisters, } impl Default for ThreadContext { @@ -2612,117 +2854,148 @@ impl Default for ThreadContext { #[doc = "Control r0-r12."] #[doc = ""] + pub const THREADCONTEXT_CONTROL_CPU_GPRS: ThreadContextControlFlags = 1; #[doc = "Control sp, lr, pc, cpsr."] #[doc = ""] + pub const THREADCONTEXT_CONTROL_CPU_SPRS: ThreadContextControlFlags = 2; #[doc = "Control d0-d15 (or s0-s31)."] #[doc = ""] + pub const THREADCONTEXT_CONTROL_FPU_GPRS: ThreadContextControlFlags = 4; #[doc = "Control fpscr, fpexc."] #[doc = ""] + pub const THREADCONTEXT_CONTROL_FPU_SPRS: ThreadContextControlFlags = 8; #[doc = "Control r0-r12, sp, lr, pc, cpsr."] #[doc = ""] + pub const THREADCONTEXT_CONTROL_CPU_REGS: ThreadContextControlFlags = 3; #[doc = "Control d0-d15, fpscr, fpexc."] #[doc = ""] + pub const THREADCONTEXT_CONTROL_FPU_REGS: ThreadContextControlFlags = 12; #[doc = "Control all of the above."] #[doc = ""] + pub const THREADCONTEXT_CONTROL_ALL: ThreadContextControlFlags = 15; #[doc = "Control flags for [`svcGetDebugThreadContext`] and [`svcSetDebugThreadContext`]"] #[doc = ""] + pub type ThreadContextControlFlags = ::libc::c_uint; #[doc = "Thread priority."] #[doc = ""] + pub const DBGTHREAD_PARAMETER_PRIORITY: DebugThreadParameter = 0; #[doc = "Low scheduling mask."] #[doc = ""] + pub const DBGTHREAD_PARAMETER_SCHEDULING_MASK_LOW: DebugThreadParameter = 1; #[doc = "Ideal processor."] #[doc = ""] + pub const DBGTHREAD_PARAMETER_CPU_IDEAL: DebugThreadParameter = 2; #[doc = "Processor that created the threod."] #[doc = ""] + pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3; #[doc = "Thread parameter field for [`svcGetDebugThreadParameter`]"] #[doc = ""] + pub type DebugThreadParameter = ::libc::c_uint; #[doc = "Information on address space for process. All sizes are in pages (0x1000 bytes)"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CodeSetInfo { - #[doc = "ASCII name of codeset"] - #[doc = ""] +#[doc = "ASCII name of codeset"] +#[doc = ""] + pub name: [u8_; 8usize], pub unk1: u16_, pub unk2: u16_, pub unk3: u32_, - #[doc = ".text start address"] - #[doc = ""] +#[doc = ".text start address"] +#[doc = ""] + pub text_addr: u32_, - #[doc = ".text number of pages"] - #[doc = ""] +#[doc = ".text number of pages"] +#[doc = ""] + pub text_size: u32_, - #[doc = ".rodata start address"] - #[doc = ""] +#[doc = ".rodata start address"] +#[doc = ""] + pub ro_addr: u32_, - #[doc = ".rodata number of pages"] - #[doc = ""] +#[doc = ".rodata number of pages"] +#[doc = ""] + pub ro_size: u32_, - #[doc = ".data, .bss start address"] - #[doc = ""] +#[doc = ".data, .bss start address"] +#[doc = ""] + pub rw_addr: u32_, - #[doc = ".data number of pages"] - #[doc = ""] +#[doc = ".data number of pages"] +#[doc = ""] + pub rw_size: u32_, - #[doc = "total pages for .text (aligned)"] - #[doc = ""] +#[doc = "total pages for .text (aligned)"] +#[doc = ""] + pub text_size_total: u32_, - #[doc = "total pages for .rodata (aligned)"] - #[doc = ""] +#[doc = "total pages for .rodata (aligned)"] +#[doc = ""] + pub ro_size_total: u32_, - #[doc = "total pages for .data, .bss (aligned)"] - #[doc = ""] +#[doc = "total pages for .data, .bss (aligned)"] +#[doc = ""] + pub rw_size_total: u32_, pub unk4: u32_, - #[doc = "Program ID"] - #[doc = ""] +#[doc = "Program ID"] +#[doc = ""] + pub program_id: u64_, } #[doc = "Information for the main thread of a process."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StartupInfo { - #[doc = "Priority of the main thread."] - #[doc = ""] +#[doc = "Priority of the main thread."] +#[doc = ""] + pub priority: ::libc::c_int, - #[doc = "Size of the stack of the main thread."] - #[doc = ""] +#[doc = "Size of the stack of the main thread."] +#[doc = ""] + pub stack_size: u32_, - #[doc = "Unused on retail kernel."] - #[doc = ""] +#[doc = "Unused on retail kernel."] +#[doc = ""] + pub argc: ::libc::c_int, - #[doc = "Unused on retail kernel."] - #[doc = ""] +#[doc = "Unused on retail kernel."] +#[doc = ""] + pub argv: *mut u16_, - #[doc = "Unused on retail kernel."] - #[doc = ""] +#[doc = "Unused on retail kernel."] +#[doc = ""] + pub envp: *mut u16_, } impl Default for StartupInfo { @@ -2736,27 +3009,24 @@ impl Default for StartupInfo { } extern "C" { #[must_use] - #[doc = "# Memory management"] - #[doc = ""] - #[doc = "Controls memory mapping"] - #[doc = ""] - #[doc = "It has to be pointing to a RW memory."] - #[doc = "Use NULL if the operation is [`MEMOP_FREE`] or [`MEMOP_ALLOC`]"] - #[doc = "Value 0 is used when unmapping memory."] - #[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] - #[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] - #[doc = "More information is available at "] - #[doc = "[`svcControlProcessMemory`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] - #[doc = "* `addr0` - The virtual address to be used for the operation."] - #[doc = "* `addr1` - The virtual address to be (un)mirrored by @p addr0 when using [`MEMOP_MAP`] or [`MEMOP_UNMAP`]"] - #[doc = "* `size` - The requested size for [`MEMOP_ALLOC`] and [`MEMOP_ALLOC_LINEAR`]"] - #[doc = "* `op` - Operation flags. See [`MemOp`]"] - #[doc = "* `perm` - A combination of [`MEMPERM_READ`] and [`MEMPERM_WRITE`] Using MEMPERM_EXECUTE will return an error."] - #[doc = ""] +#[doc = "# Memory management"] +#[doc = "Controls memory mapping"] +#[doc = "It has to be pointing to a RW memory."] +#[doc = "Use NULL if the operation is [`MEMOP_FREE`] or [`MEMOP_ALLOC`]"] +#[doc = "Value 0 is used when unmapping memory."] +#[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] +#[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] +#[doc = "More information is available at "] +#[doc = "[`svcControlProcessMemory`]"] +#[doc = "# Arguments"] +#[doc = "`addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] +#[doc = "`addr0` - The virtual address to be used for the operation."] +#[doc = "`addr1` - The virtual address to be (un)mirrored by @p addr0 when using [`MEMOP_MAP`] or [`MEMOP_UNMAP`]"] +#[doc = "`size` - The requested size for [`MEMOP_ALLOC`] and [`MEMOP_ALLOC_LINEAR`]"] +#[doc = "`op` - Operation flags. See [`MemOp`]"] +#[doc = "`perm` - A combination of [`MEMPERM_READ`] and [`MEMPERM_WRITE`] Using MEMPERM_EXECUTE will return an error."] +#[doc = ""] + pub fn svcControlMemory( addr_out: *mut u32_, addr0: u32_, @@ -2768,22 +3038,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Controls the memory mapping of a process"] - #[doc = ""] - #[doc = "This is the only SVC which allows mapping executable memory."] - #[doc = "Using [`MEMOP_PROT`] will change the memory permissions of an already mapped memory."] - #[doc = "[`svcControlProcess`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `addr0` - The virtual address to map"] - #[doc = "* `addr1` - The virtual address to be mapped by @p addr0"] - #[doc = "* `type` - Only operations [`MEMOP_MAP`] [`MEMOP_UNMAP`] and [`MEMOP_PROT`] are allowed."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The pseudo handle for the current process is not supported by this service call."] - #[doc = ""] +#[doc = "Controls the memory mapping of a process"] +#[doc = "This is the only SVC which allows mapping executable memory."] +#[doc = "Using [`MEMOP_PROT`] will change the memory permissions of an already mapped memory."] +#[doc = "[`svcControlProcess`]"] +#[doc = "# Arguments"] +#[doc = "`addr0` - The virtual address to map"] +#[doc = "`addr1` - The virtual address to be mapped by @p addr0"] +#[doc = "`type` - Only operations [`MEMOP_MAP`] [`MEMOP_UNMAP`] and [`MEMOP_PROT`] are allowed."] +#[doc = "# Notes"] +#[doc = "The pseudo handle for the current process is not supported by this service call."] +#[doc = ""] + pub fn svcControlProcessMemory( process: Handle, addr0: u32_, @@ -2795,20 +3061,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a block of shared memory"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `memblock` - Pointer to store the handle of the block [Direction: In, Out]"] - #[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] - #[doc = "* `size` - Size of the memory to map, a multiple of 0x1000."] - #[doc = "* `my_perm` - Memory permissions for the current process"] - #[doc = "* `other_perm` - Memory permissions for the other processes"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The shared memory block, and its rights, are destroyed when the handle is closed."] - #[doc = ""] +#[doc = "Creates a block of shared memory"] +#[doc = "# Arguments"] +#[doc = "`memblock` - Pointer to store the handle of the block [Direction: In, Out]"] +#[doc = "`addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] +#[doc = "`size` - Size of the memory to map, a multiple of 0x1000."] +#[doc = "`my_perm` - Memory permissions for the current process"] +#[doc = "`other_perm` - Memory permissions for the other processes"] +#[doc = "# Notes"] +#[doc = "The shared memory block, and its rights, are destroyed when the handle is closed."] +#[doc = ""] + pub fn svcCreateMemoryBlock( memblock: *mut Handle, addr: u32_, @@ -2819,19 +3082,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Maps a block of shared memory"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `memblock` - Handle of the block"] - #[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] - #[doc = "* `my_perm` - Memory permissions for the current process"] - #[doc = "* `other_perm` - Memory permissions for the other processes"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The shared memory block, and its rights, are destroyed when the handle is closed."] - #[doc = ""] +#[doc = "Maps a block of shared memory"] +#[doc = "# Arguments"] +#[doc = "`memblock` - Handle of the block"] +#[doc = "`addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] +#[doc = "`my_perm` - Memory permissions for the current process"] +#[doc = "`other_perm` - Memory permissions for the other processes"] +#[doc = "# Notes"] +#[doc = "The shared memory block, and its rights, are destroyed when the handle is closed."] +#[doc = ""] + pub fn svcMapMemoryBlock( memblock: Handle, addr: u32_, @@ -2841,62 +3101,57 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Maps a block of process memory, starting from address 0x00100000."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `destAddress` - Address of the block of memory to map, in the current (destination) process."] - #[doc = "* `size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] - #[doc = ""] +#[doc = "Maps a block of process memory, starting from address 0x00100000."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`destAddress` - Address of the block of memory to map, in the current (destination) process."] +#[doc = "`size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] +#[doc = ""] + pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Unmaps a block of process memory, starting from address 0x00100000."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `destAddress` - Address of the block of memory to unmap, in the current (destination) process."] - #[doc = "* `size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] - #[doc = ""] +#[doc = "Unmaps a block of process memory, starting from address 0x00100000."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`destAddress` - Address of the block of memory to unmap, in the current (destination) process."] +#[doc = "`size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] +#[doc = ""] + pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Unmaps a block of shared memory"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `memblock` - Handle of the block"] - #[doc = "* `addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] - #[doc = ""] +#[doc = "Unmaps a block of shared memory"] +#[doc = "# Arguments"] +#[doc = "`memblock` - Handle of the block"] +#[doc = "`addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] +#[doc = ""] + pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Queries memory information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] - #[doc = "* `out` - Pointer to output page info to."] - #[doc = "* `addr` - Virtual memory address to query."] - #[doc = ""] +#[doc = "Queries memory information."] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output memory info to. [Direction: In, Out]"] +#[doc = "`out` - Pointer to output page info to."] +#[doc = "`addr` - Virtual memory address to query."] +#[doc = ""] + pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Queries process memory information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] - #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] - #[doc = "* `process` - Process to query memory from."] - #[doc = "* `addr` - Virtual memory address to query."] - #[doc = ""] +#[doc = "Queries process memory information."] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output memory info to. [Direction: In, Out]"] +#[doc = "`out` - Pointer to output page info to. [Direction: In, Out]"] +#[doc = "`process` - Process to query memory from."] +#[doc = "`addr` - Virtual memory address to query."] +#[doc = ""] + pub fn svcQueryProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -2906,65 +3161,60 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "# Process management"] - #[doc = ""] - #[doc = "Gets the handle of a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - The handle of the process [Direction: In, Out]"] - #[doc = "* `processId` - The ID of the process to open"] - #[doc = ""] +#[doc = "# Process management"] +#[doc = "Gets the handle of a process."] +#[doc = "# Arguments"] +#[doc = "`process` - The handle of the process [Direction: In, Out]"] +#[doc = "`processId` - The ID of the process to open"] +#[doc = ""] + pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result; } extern "C" { - #[doc = "Exits the current process."] - #[doc = ""] +#[doc = "Exits the current process."] +#[doc = ""] + pub fn svcExitProcess(); } extern "C" { #[must_use] - #[doc = "Terminates a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process to terminate."] - #[doc = ""] +#[doc = "Terminates a process."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process to terminate."] +#[doc = ""] + pub fn svcTerminateProcess(process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets information about a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output process info to. [Direction: In, Out]"] - #[doc = "* `process` - Handle of the process to get information about."] - #[doc = "* `type` - Type of information to retreieve."] - #[doc = ""] +#[doc = "Gets information about a process."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output process info to. [Direction: In, Out]"] +#[doc = "`process` - Handle of the process to get information about."] +#[doc = "`type` - Type of information to retreieve."] +#[doc = ""] + pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the ID of a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the process ID to. [Direction: In, Out]"] - #[doc = "* `handle` - Handle of the process to get the ID of."] - #[doc = ""] +#[doc = "Gets the ID of a process."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the process ID to. [Direction: In, Out]"] +#[doc = "`handle` - Handle of the process to get the ID of."] +#[doc = ""] + pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a list of running processes."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `processCount` - Pointer to output the process count to. [Direction: In, Out]"] - #[doc = "* `processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] - #[doc = "* `processIdMaxCount` - Maximum number of process IDs."] - #[doc = ""] +#[doc = "Gets a list of running processes."] +#[doc = "# Arguments"] +#[doc = "`processCount` - Pointer to output the process count to. [Direction: In, Out]"] +#[doc = "`processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] +#[doc = "`processIdMaxCount` - Maximum number of process IDs."] +#[doc = ""] + pub fn svcGetProcessList( processCount: *mut s32, processIds: *mut u32_, @@ -2973,15 +3223,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a list of the threads of a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `threadCount` - Pointer to output the thread count to. [Direction: In, Out]"] - #[doc = "* `threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] - #[doc = "* `threadIdMaxCount` - Maximum number of thread IDs."] - #[doc = "* `process` - Process handle to list the threads of."] - #[doc = ""] +#[doc = "Gets a list of the threads of a process."] +#[doc = "# Arguments"] +#[doc = "`threadCount` - Pointer to output the thread count to. [Direction: In, Out]"] +#[doc = "`threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] +#[doc = "`threadIdMaxCount` - Maximum number of thread IDs."] +#[doc = "`process` - Process handle to list the threads of."] +#[doc = ""] + pub fn svcGetThreadList( threadCount: *mut s32, threadIds: *mut u32_, @@ -2991,15 +3240,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `portServer` - Pointer to output the port server handle to. [Direction: In, Out]"] - #[doc = "* `portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] - #[doc = "* `name` - Name of the port."] - #[doc = "* `maxSessions` - Maximum number of sessions that can connect to the port."] - #[doc = ""] +#[doc = "Creates a port."] +#[doc = "# Arguments"] +#[doc = "`portServer` - Pointer to output the port server handle to. [Direction: In, Out]"] +#[doc = "`portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] +#[doc = "`name` - Name of the port."] +#[doc = "`maxSessions` - Maximum number of sessions that can connect to the port."] +#[doc = ""] + pub fn svcCreatePort( portServer: *mut Handle, portClient: *mut Handle, @@ -3009,27 +3257,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Connects to a port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the port handle to. [Direction: In, Out]"] - #[doc = "* `portName` - Name of the port."] - #[doc = ""] +#[doc = "Connects to a port."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the port handle to. [Direction: In, Out]"] +#[doc = "`portName` - Name of the port."] +#[doc = ""] + pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Sets up virtual address space for a new process"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the code set handle to. [Direction: In, Out]"] - #[doc = "* `info` - Description for setting up the addresses"] - #[doc = "* `code_ptr` - Pointer to .text in shared memory"] - #[doc = "* `ro_ptr` - Pointer to .rodata in shared memory"] - #[doc = "* `data_ptr` - Pointer to .data in shared memory"] - #[doc = ""] +#[doc = "Sets up virtual address space for a new process"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the code set handle to. [Direction: In, Out]"] +#[doc = "`info` - Description for setting up the addresses"] +#[doc = "`code_ptr` - Pointer to .text in shared memory"] +#[doc = "`ro_ptr` - Pointer to .rodata in shared memory"] +#[doc = "`data_ptr` - Pointer to .data in shared memory"] +#[doc = ""] + pub fn svcCreateCodeSet( out: *mut Handle, info: *const CodeSetInfo, @@ -3040,15 +3286,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets up virtual address space for a new process"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the process handle to. [Direction: In, Out]"] - #[doc = "* `codeset` - Codeset created for this process"] - #[doc = "* `arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] - #[doc = "* `arm11kernelcaps_num` - Number of kernel capabilities"] - #[doc = ""] +#[doc = "Sets up virtual address space for a new process"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the process handle to. [Direction: In, Out]"] +#[doc = "`codeset` - Codeset created for this process"] +#[doc = "`arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] +#[doc = "`arm11kernelcaps_num` - Number of kernel capabilities"] +#[doc = ""] + pub fn svcCreateProcess( out: *mut Handle, codeset: Handle, @@ -3058,14 +3303,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a process's affinity mask."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `processorcount` - Number of processors."] - #[doc = ""] +#[doc = "Gets a process's affinity mask."] +#[doc = "# Arguments"] +#[doc = "`affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] +#[doc = "`process` - Handle of the process."] +#[doc = "`processorcount` - Number of processors."] +#[doc = ""] + pub fn svcGetProcessAffinityMask( affinitymask: *mut u8_, process: Handle, @@ -3074,14 +3318,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets a process's affinity mask."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] - #[doc = "* `processorcount` - Number of processors."] - #[doc = ""] +#[doc = "Sets a process's affinity mask."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`affinitymask` - Pointer to retrieve the affinity masks from."] +#[doc = "`processorcount` - Number of processors."] +#[doc = ""] + pub fn svcSetProcessAffinityMask( process: Handle, affinitymask: *const u8_, @@ -3090,64 +3333,56 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a process's ideal processor."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] - #[doc = "* `process` - Handle of the process."] - #[doc = ""] +#[doc = "Gets a process's ideal processor."] +#[doc = "# Arguments"] +#[doc = "`processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] +#[doc = "`process` - Handle of the process."] +#[doc = ""] + pub fn svcGetProcessIdealProcessor(processorid: *mut s32, process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a process's ideal processor."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `processorid` - ID of the process's ideal processor."] - #[doc = ""] +#[doc = "Sets a process's ideal processor."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`processorid` - ID of the process's ideal processor."] +#[doc = ""] + pub fn svcSetProcessIdealProcessor(process: Handle, processorid: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Launches the main thread of the process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `info` - Pointer to a StartupInfo structure describing information for the main thread."] - #[doc = ""] +#[doc = "Launches the main thread of the process."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`info` - Pointer to a StartupInfo structure describing information for the main thread."] +#[doc = ""] + pub fn svcRun(process: Handle, info: *const StartupInfo) -> Result; } extern "C" { #[must_use] - #[doc = "# Multithreading"] - #[doc = ""] - #[doc = "Creates a new thread."] - #[doc = ""] - #[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] - #[doc = "For old 3ds it has to be <2, and for new 3DS <4."] - #[doc = "Value -1 means all CPUs and -2 read from the Exheader."] - #[doc = "The processor with ID 1 is the system processor."] - #[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] - #[doc = "Since a thread is considered as a waitable object, you can use [`svcWaitSynchronization`]"] - #[doc = "and [`svcWaitSynchronizationN`] to join with it."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - The thread handle [Direction: In, Out]"] - #[doc = "* `entrypoint` - The function that will be called first upon thread creation"] - #[doc = "* `arg` - The argument passed to @p entrypoint"] - #[doc = "* `stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] - #[doc = "* `thread_priority` - Low values gives the thread higher priority."] - #[doc = "* `processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The kernel will clear the @p stack_top's address low 3 bits to make sure it is 0x8-bytes aligned."] - #[doc = ""] +#[doc = "# Multithreading"] +#[doc = "Creates a new thread."] +#[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] +#[doc = "For old 3ds it has to be <2, and for new 3DS <4."] +#[doc = "Value -1 means all CPUs and -2 read from the Exheader."] +#[doc = "The processor with ID 1 is the system processor."] +#[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] +#[doc = "Since a thread is considered as a waitable object, you can use [`svcWaitSynchronization`]"] +#[doc = "and [`svcWaitSynchronizationN`] to join with it."] +#[doc = "# Arguments"] +#[doc = "`thread` - The thread handle [Direction: In, Out]"] +#[doc = "`entrypoint` - The function that will be called first upon thread creation"] +#[doc = "`arg` - The argument passed to @p entrypoint"] +#[doc = "`stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] +#[doc = "`thread_priority` - Low values gives the thread higher priority."] +#[doc = "`processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] +#[doc = "# Notes"] +#[doc = "The kernel will clear the @p stack_top's address low 3 bits to make sure it is 0x8-bytes aligned."] +#[doc = ""] + pub fn svcCreateThread( thread: *mut Handle, entrypoint: ThreadFunc, @@ -3159,61 +3394,57 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the handle of a thread."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - The handle of the thread [Direction: In, Out]"] - #[doc = "* `process` - The ID of the process linked to the thread"] - #[doc = ""] +#[doc = "Gets the handle of a thread."] +#[doc = "# Arguments"] +#[doc = "`thread` - The handle of the thread [Direction: In, Out]"] +#[doc = "`process` - The ID of the process linked to the thread"] +#[doc = ""] + pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result; } extern "C" { - #[doc = "Exits the current thread."] - #[doc = ""] - #[doc = "This will trigger a state change and hence release all [`svcWaitSynchronization`] operations."] - #[doc = "It means that you can join a thread by calling ```"] - #[doc = "svcWaitSynchronization(threadHandle,yourtimeout); ```"] - #[doc = ""] +#[doc = "Exits the current thread."] +#[doc = "This will trigger a state change and hence release all [`svcWaitSynchronization`] operations."] +#[doc = "It means that you can join a thread by calling ```"] +#[doc = "svcWaitSynchronization(threadHandle,yourtimeout); ```"] +#[doc = ""] + pub fn svcExitThread(); } extern "C" { - #[doc = "Puts the current thread to sleep."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ns` - The minimum number of nanoseconds to sleep for."] - #[doc = ""] +#[doc = "Puts the current thread to sleep."] +#[doc = "# Arguments"] +#[doc = "`ns` - The minimum number of nanoseconds to sleep for."] +#[doc = ""] + pub fn svcSleepThread(ns: s64); } extern "C" { #[must_use] - #[doc = "Retrieves the priority of a thread."] - #[doc = ""] +#[doc = "Retrieves the priority of a thread."] +#[doc = ""] + pub fn svcGetThreadPriority(out: *mut s32, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Changes the priority of a thread"] - #[doc = ""] - #[doc = "Low values gives the thread higher priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `prio` - For userland apps, this has to be within the range [0x18;0x3F]"] - #[doc = ""] +#[doc = "Changes the priority of a thread"] +#[doc = "Low values gives the thread higher priority."] +#[doc = "# Arguments"] +#[doc = "`prio` - For userland apps, this has to be within the range [0x18;0x3F]"] +#[doc = ""] + pub fn svcSetThreadPriority(thread: Handle, prio: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a thread's affinity mask."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] - #[doc = "* `thread` - Handle of the thread."] - #[doc = "* `processorcount` - Number of processors."] - #[doc = ""] +#[doc = "Gets a thread's affinity mask."] +#[doc = "# Arguments"] +#[doc = "`affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] +#[doc = "`thread` - Handle of the thread."] +#[doc = "`processorcount` - Number of processors."] +#[doc = ""] + pub fn svcGetThreadAffinityMask( affinitymask: *mut u8_, thread: Handle, @@ -3222,14 +3453,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets a thread's affinity mask."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - Handle of the thread."] - #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] - #[doc = "* `processorcount` - Number of processors."] - #[doc = ""] +#[doc = "Sets a thread's affinity mask."] +#[doc = "# Arguments"] +#[doc = "`thread` - Handle of the thread."] +#[doc = "`affinitymask` - Pointer to retrieve the affinity masks from."] +#[doc = "`processorcount` - Number of processors."] +#[doc = ""] + pub fn svcSetThreadAffinityMask( thread: Handle, affinitymask: *const u8_, @@ -3238,66 +3468,61 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a thread's ideal processor."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] - #[doc = "* `thread` - Handle of the thread."] - #[doc = ""] +#[doc = "Gets a thread's ideal processor."] +#[doc = "# Arguments"] +#[doc = "`processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] +#[doc = "`thread` - Handle of the thread."] +#[doc = ""] + pub fn svcGetThreadIdealProcessor(processorid: *mut s32, thread: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a thread's ideal processor."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - Handle of the thread."] - #[doc = "* `processorid` - ID of the thread's ideal processor."] - #[doc = ""] +#[doc = "Sets a thread's ideal processor."] +#[doc = "# Arguments"] +#[doc = "`thread` - Handle of the thread."] +#[doc = "`processorid` - ID of the thread's ideal processor."] +#[doc = ""] + pub fn svcSetThreadIdealProcessor(thread: Handle, processorid: s32) -> Result; } extern "C" { - #[doc = "Returns the ID of the processor the current thread is running on."] - #[doc = ""] - #[doc = "[`svcCreateThread`]"] - #[doc = ""] +#[doc = "Returns the ID of the processor the current thread is running on."] +#[doc = "[`svcCreateThread`]"] +#[doc = ""] + pub fn svcGetProcessorID() -> s32; } extern "C" { #[must_use] - #[doc = "Gets the ID of a thread."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] - #[doc = "* `handle` - Handle of the thread."] - #[doc = ""] +#[doc = "Gets the ID of a thread."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] +#[doc = "`handle` - Handle of the thread."] +#[doc = ""] + pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the resource limit set of a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] - #[doc = "* `process` - Process to get the resource limits of."] - #[doc = ""] +#[doc = "Gets the resource limit set of a process."] +#[doc = "# Arguments"] +#[doc = "`resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] +#[doc = "`process` - Process to get the resource limits of."] +#[doc = ""] + pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the value limits of a resource limit set."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `values` - Pointer to output the value limits to. [Direction: In, Out]"] - #[doc = "* `resourceLimit` - Resource limit set to use."] - #[doc = "* `names` - Resource limit names to get the limits of."] - #[doc = "* `nameCount` - Number of resource limit names."] - #[doc = ""] +#[doc = "Gets the value limits of a resource limit set."] +#[doc = "# Arguments"] +#[doc = "`values` - Pointer to output the value limits to. [Direction: In, Out]"] +#[doc = "`resourceLimit` - Resource limit set to use."] +#[doc = "`names` - Resource limit names to get the limits of."] +#[doc = "`nameCount` - Number of resource limit names."] +#[doc = ""] + pub fn svcGetResourceLimitLimitValues( values: *mut s64, resourceLimit: Handle, @@ -3307,15 +3532,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the values of a resource limit set."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `values` - Pointer to output the values to. [Direction: In, Out]"] - #[doc = "* `resourceLimit` - Resource limit set to use."] - #[doc = "* `names` - Resource limit names to get the values of."] - #[doc = "* `nameCount` - Number of resource limit names."] - #[doc = ""] +#[doc = "Gets the values of a resource limit set."] +#[doc = "# Arguments"] +#[doc = "`values` - Pointer to output the values to. [Direction: In, Out]"] +#[doc = "`resourceLimit` - Resource limit set to use."] +#[doc = "`names` - Resource limit names to get the values of."] +#[doc = "`nameCount` - Number of resource limit names."] +#[doc = ""] + pub fn svcGetResourceLimitCurrentValues( values: *mut s64, resourceLimit: Handle, @@ -3325,38 +3549,34 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the resource limit set of a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Process to set the resource limit set to."] - #[doc = "* `resourceLimit` - Resource limit set handle."] - #[doc = ""] +#[doc = "Sets the resource limit set of a process."] +#[doc = "# Arguments"] +#[doc = "`process` - Process to set the resource limit set to."] +#[doc = "`resourceLimit` - Resource limit set handle."] +#[doc = ""] + pub fn svcSetProcessResourceLimits(process: Handle, resourceLimit: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a resource limit set."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Creates a resource limit set."] +#[doc = "# Arguments"] +#[doc = "`resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] +#[doc = ""] + pub fn svcCreateResourceLimit(resourceLimit: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the value limits of a resource limit set."] - #[doc = ""] - #[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `resourceLimit` - Resource limit set to use."] - #[doc = "* `names` - Resource limit names to set the limits of."] - #[doc = "* `values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] - #[doc = "* `nameCount` - Number of resource limit names."] - #[doc = ""] +#[doc = "Sets the value limits of a resource limit set."] +#[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] +#[doc = "# Arguments"] +#[doc = "`resourceLimit` - Resource limit set to use."] +#[doc = "`names` - Resource limit names to set the limits of."] +#[doc = "`values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] +#[doc = "`nameCount` - Number of resource limit names."] +#[doc = ""] + pub fn svcSetResourceLimitValues( resourceLimit: Handle, names: *const ResourceLimitType, @@ -3366,132 +3586,118 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the process ID of a thread."] - #[doc = ""] - #[doc = "[`svcOpenProcess`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] - #[doc = "* `handle` - Handle of the thread."] - #[doc = ""] +#[doc = "Gets the process ID of a thread."] +#[doc = "[`svcOpenProcess`]"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] +#[doc = "`handle` - Handle of the thread."] +#[doc = ""] + pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if a thread handle is valid."] - #[doc = ""] - #[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle"] - #[doc = "* 0xD8E007F7 (BAD_HANDLE) if it isn't."] - #[doc = ""] +#[doc = "Checks if a thread handle is valid."] +#[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] +#[doc = "Returns:"] +#[doc = "0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle"] +#[doc = "0xD8E007F7 (BAD_HANDLE) if it isn't."] +#[doc = ""] + pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result; } extern "C" { #[must_use] - #[doc = "# Synchronization"] - #[doc = ""] - #[doc = "Creates a mutex."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] - #[doc = "* `initially_locked` - Whether the mutex should be initially locked."] - #[doc = ""] +#[doc = "# Synchronization"] +#[doc = "Creates a mutex."] +#[doc = "# Arguments"] +#[doc = "`mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] +#[doc = "`initially_locked` - Whether the mutex should be initially locked."] +#[doc = ""] + pub fn svcCreateMutex(mutex: *mut Handle, initially_locked: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Releases a mutex."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the mutex."] - #[doc = ""] +#[doc = "Releases a mutex."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the mutex."] +#[doc = ""] + pub fn svcReleaseMutex(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a semaphore."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] - #[doc = "* `initial_count` - Initial count of the semaphore."] - #[doc = "* `max_count` - Maximum count of the semaphore."] - #[doc = ""] +#[doc = "Creates a semaphore."] +#[doc = "# Arguments"] +#[doc = "`semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] +#[doc = "`initial_count` - Initial count of the semaphore."] +#[doc = "`max_count` - Maximum count of the semaphore."] +#[doc = ""] + pub fn svcCreateSemaphore(semaphore: *mut Handle, initial_count: s32, max_count: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Releases a semaphore."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] - #[doc = "* `semaphore` - Handle of the semaphore."] - #[doc = "* `release_count` - Number to increase the semaphore count by."] - #[doc = ""] +#[doc = "Releases a semaphore."] +#[doc = "# Arguments"] +#[doc = "`count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] +#[doc = "`semaphore` - Handle of the semaphore."] +#[doc = "`release_count` - Number to increase the semaphore count by."] +#[doc = ""] + pub fn svcReleaseSemaphore(count: *mut s32, semaphore: Handle, release_count: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Creates an event handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to output the created event handle to. [Direction: In, Out]"] - #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] - #[doc = ""] +#[doc = "Creates an event handle."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to output the created event handle to. [Direction: In, Out]"] +#[doc = "`reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] +#[doc = ""] + pub fn svcCreateEvent(event: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] - #[doc = "Signals an event."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the event to signal."] - #[doc = ""] +#[doc = "Signals an event."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the event to signal."] +#[doc = ""] + pub fn svcSignalEvent(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Clears an event."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the event to clear."] - #[doc = ""] +#[doc = "Clears an event."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the event to clear."] +#[doc = ""] + pub fn svcClearEvent(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for synchronization on a handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle to wait on."] - #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] - #[doc = ""] +#[doc = "Waits for synchronization on a handle."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle to wait on."] +#[doc = "`nanoseconds` - Maximum nanoseconds to wait for."] +#[doc = ""] + pub fn svcWaitSynchronization(handle: Handle, nanoseconds: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for synchronization on multiple handles."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the index of the synchronized handle to. [Direction: In, Out]"] - #[doc = "* `handles` - Handles to wait on."] - #[doc = "* `handles_num` - Number of handles."] - #[doc = "* `wait_all` - Whether to wait for synchronization on all handles."] - #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] - #[doc = ""] +#[doc = "Waits for synchronization on multiple handles."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the index of the synchronized handle to. [Direction: In, Out]"] +#[doc = "`handles` - Handles to wait on."] +#[doc = "`handles_num` - Number of handles."] +#[doc = "`wait_all` - Whether to wait for synchronization on all handles."] +#[doc = "`nanoseconds` - Maximum nanoseconds to wait for."] +#[doc = ""] + pub fn svcWaitSynchronizationN( out: *mut s32, handles: *const Handle, @@ -3502,36 +3708,29 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates an address arbiter"] - #[doc = ""] - #[doc = "[`svcArbitrateAddress`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Creates an address arbiter"] +#[doc = "[`svcArbitrateAddress`]"] +#[doc = "# Arguments"] +#[doc = "`mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] +#[doc = ""] + pub fn svcCreateAddressArbiter(arbiter: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Arbitrate an address, can be used for synchronization"] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* Please use [`syncArbitrateAddressWithTimeout`] instead."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `arbiter` - Handle of the arbiter"] - #[doc = "* `addr` - A pointer to a s32 value."] - #[doc = "* `type` - Type of action to be performed by the arbiter"] - #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] - #[doc = "* `timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use [`svcArbitrateAddressNoTimeout`] instead."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] - #[doc = ""] +#[doc = "Arbitrate an address, can be used for synchronization"] +#[doc = "**Warning!**"] +#[doc = "Please use [`syncArbitrateAddressWithTimeout`] instead."] +#[doc = "# Arguments"] +#[doc = "`arbiter` - Handle of the arbiter"] +#[doc = "`addr` - A pointer to a s32 value."] +#[doc = "`type` - Type of action to be performed by the arbiter"] +#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] +#[doc = "`timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use [`svcArbitrateAddressNoTimeout`] instead."] +#[doc = "# Notes"] +#[doc = "Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] +#[doc = ""] + pub fn svcArbitrateAddress( arbiter: Handle, addr: u32_, @@ -3542,23 +3741,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Same as [`svcArbitrateAddress`] but with the timeout_ns parameter undefined."] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* Please use [`syncArbitrateAddress`] instead."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `arbiter` - Handle of the arbiter"] - #[doc = "* `addr` - A pointer to a s32 value."] - #[doc = "* `type` - Type of action to be performed by the arbiter"] - #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] - #[doc = ""] +#[doc = "Same as [`svcArbitrateAddress`] but with the timeout_ns parameter undefined."] +#[doc = "**Warning!**"] +#[doc = "Please use [`syncArbitrateAddress`] instead."] +#[doc = "# Arguments"] +#[doc = "`arbiter` - Handle of the arbiter"] +#[doc = "`addr` - A pointer to a s32 value."] +#[doc = "`type` - Type of action to be performed by the arbiter"] +#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] +#[doc = "# Notes"] +#[doc = "Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] +#[doc = ""] + pub fn svcArbitrateAddressNoTimeout( arbiter: Handle, addr: u32_, @@ -3568,58 +3762,53 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends a synchronized request to a session handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `session` - Handle of the session."] - #[doc = ""] +#[doc = "Sends a synchronized request to a session handle."] +#[doc = "# Arguments"] +#[doc = "`session` - Handle of the session."] +#[doc = ""] + pub fn svcSendSyncRequest(session: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Connects to a port via a handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] - #[doc = "* `clientPort` - Port client endpoint to connect to."] - #[doc = ""] +#[doc = "Connects to a port via a handle."] +#[doc = "# Arguments"] +#[doc = "`clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] +#[doc = "`clientPort` - Port client endpoint to connect to."] +#[doc = ""] + pub fn svcCreateSessionToPort(clientSession: *mut Handle, clientPort: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a linked pair of session endpoints."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] - #[doc = "* `clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Creates a linked pair of session endpoints."] +#[doc = "# Arguments"] +#[doc = "`serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] +#[doc = "`clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] +#[doc = ""] + pub fn svcCreateSession(serverSession: *mut Handle, clientSession: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Accepts a session."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `session` - Pointer to output the created session handle to. [Direction: In, Out]"] - #[doc = "* `port` - Handle of the port to accept a session from."] - #[doc = ""] +#[doc = "Accepts a session."] +#[doc = "# Arguments"] +#[doc = "`session` - Pointer to output the created session handle to. [Direction: In, Out]"] +#[doc = "`port` - Handle of the port to accept a session from."] +#[doc = ""] + pub fn svcAcceptSession(session: *mut Handle, port: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Replies to and receives a new request."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `index` - Pointer to the index of the request."] - #[doc = "* `handles` - Session handles to receive requests from."] - #[doc = "* `handleCount` - Number of handles."] - #[doc = "* `replyTarget` - Handle of the session to reply to."] - #[doc = ""] +#[doc = "Replies to and receives a new request."] +#[doc = "# Arguments"] +#[doc = "`index` - Pointer to the index of the request."] +#[doc = "`handles` - Session handles to receive requests from."] +#[doc = "`handleCount` - Number of handles."] +#[doc = "`replyTarget` - Handle of the session to reply to."] +#[doc = ""] + pub fn svcReplyAndReceive( index: *mut s32, handles: *const Handle, @@ -3629,126 +3818,113 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "# Time"] - #[doc = ""] - #[doc = "Creates a timer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] - #[doc = "* `reset_type` - Type of reset to perform on the timer."] - #[doc = ""] +#[doc = "# Time"] +#[doc = "Creates a timer."] +#[doc = "# Arguments"] +#[doc = "`timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] +#[doc = "`reset_type` - Type of reset to perform on the timer."] +#[doc = ""] + pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a timer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timer` - Handle of the timer to set."] - #[doc = "* `initial` - Initial value of the timer."] - #[doc = "* `interval` - Interval of the timer."] - #[doc = ""] +#[doc = "Sets a timer."] +#[doc = "# Arguments"] +#[doc = "`timer` - Handle of the timer to set."] +#[doc = "`initial` - Initial value of the timer."] +#[doc = "`interval` - Interval of the timer."] +#[doc = ""] + pub fn svcSetTimer(timer: Handle, initial: s64, interval: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels a timer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timer` - Handle of the timer to cancel."] - #[doc = ""] +#[doc = "Cancels a timer."] +#[doc = "# Arguments"] +#[doc = "`timer` - Handle of the timer to cancel."] +#[doc = ""] + pub fn svcCancelTimer(timer: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Clears a timer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timer` - Handle of the timer to clear."] - #[doc = ""] +#[doc = "Clears a timer."] +#[doc = "# Arguments"] +#[doc = "`timer` - Handle of the timer to clear."] +#[doc = ""] + pub fn svcClearTimer(timer: Handle) -> Result; } extern "C" { - #[doc = "Gets the current system tick."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current system tick."] - #[doc = ""] +#[doc = "Gets the current system tick."] +#[doc = "Returns:"] +#[doc = "The current system tick."] +#[doc = ""] + pub fn svcGetSystemTick() -> u64_; } extern "C" { #[must_use] - #[doc = "# System"] - #[doc = ""] - #[doc = "Closes a handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle to close."] - #[doc = ""] +#[doc = "# System"] +#[doc = "Closes a handle."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle to close."] +#[doc = ""] + pub fn svcCloseHandle(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Duplicates a handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] - #[doc = "* `original` - Handle to duplicate."] - #[doc = ""] +#[doc = "Duplicates a handle."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] +#[doc = "`original` - Handle to duplicate."] +#[doc = ""] + pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a handle info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the handle info to. [Direction: In, Out]"] - #[doc = "* `handle` - Handle to get the info for."] - #[doc = "* `param` - Parameter clarifying the handle info type."] - #[doc = ""] +#[doc = "Gets a handle info."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the handle info to. [Direction: In, Out]"] +#[doc = "`handle` - Handle to get the info for."] +#[doc = "`param` - Parameter clarifying the handle info type."] +#[doc = ""] + pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the system info to. [Direction: In, Out]"] - #[doc = "* `type` - Type of system info to retrieve."] - #[doc = "* `param` - Parameter clarifying the system info type."] - #[doc = ""] +#[doc = "Gets the system info."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the system info to. [Direction: In, Out]"] +#[doc = "`type` - Type of system info to retrieve."] +#[doc = "`param` - Parameter clarifying the system info type."] +#[doc = ""] + pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current kernel state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `type` - Type of state to set (the other parameters depend on it)."] - #[doc = ""] +#[doc = "Sets the current kernel state."] +#[doc = "# Arguments"] +#[doc = "`type` - Type of state to set (the other parameters depend on it)."] +#[doc = ""] + pub fn svcKernelSetState(type_: u32_, ...) -> Result; } extern "C" { #[must_use] - #[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `interruptId` - Interrupt identfier (see "] - #[doc = "* `eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] - #[doc = "* `priority` - Priority of the interrupt for the current process."] - #[doc = "* `isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] - #[doc = ""] +#[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] +#[doc = "# Arguments"] +#[doc = "`interruptId` - Interrupt identfier (see "] +#[doc = "`eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] +#[doc = "`priority` - Priority of the interrupt for the current process."] +#[doc = "`isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] +#[doc = ""] + pub fn svcBindInterrupt( interruptId: u32_, eventOrSemaphore: Handle, @@ -3758,69 +3934,62 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `interruptId` - Interrupt identfier, see (see "] - #[doc = "* `eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] - #[doc = ""] +#[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] +#[doc = "# Arguments"] +#[doc = "`interruptId` - Interrupt identfier, see (see "] +#[doc = "`eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] +#[doc = ""] + pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates a process's data cache."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `addr` - Address to invalidate."] - #[doc = "* `size` - Size of the memory to invalidate."] - #[doc = ""] +#[doc = "Invalidates a process's data cache."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`addr` - Address to invalidate."] +#[doc = "`size` - Size of the memory to invalidate."] +#[doc = ""] + pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Cleans a process's data cache."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `addr` - Address to clean."] - #[doc = "* `size` - Size of the memory to clean."] - #[doc = ""] +#[doc = "Cleans a process's data cache."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`addr` - Address to clean."] +#[doc = "`size` - Size of the memory to clean."] +#[doc = ""] + pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes (cleans and invalidates) a process's data cache."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Handle of the process."] - #[doc = "* `addr` - Address to flush."] - #[doc = "* `size` - Size of the memory to flush."] - #[doc = ""] +#[doc = "Flushes (cleans and invalidates) a process's data cache."] +#[doc = "# Arguments"] +#[doc = "`process` - Handle of the process."] +#[doc = "`addr` - Address to flush."] +#[doc = "`size` - Size of the memory to flush."] +#[doc = ""] + pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Begins an inter-process DMA transfer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dma` - Pointer to output the handle of the DMA channel object to. [Direction: In, Out]"] - #[doc = "* `dstProcess` - Destination process handle."] - #[doc = "* `dstAddr` - Address in the destination process to write data to."] - #[doc = "* `srcProcess` - Source process handle."] - #[doc = "* `srcAddr` - Address in the source to read data from."] - #[doc = "* `size` - Size of the data to transfer."] - #[doc = "* `cfg` - Configuration structure."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The handle is signaled when the transfer finishes."] - #[doc = ""] +#[doc = "Begins an inter-process DMA transfer."] +#[doc = "# Arguments"] +#[doc = "`dma` - Pointer to output the handle of the DMA channel object to. [Direction: In, Out]"] +#[doc = "`dstProcess` - Destination process handle."] +#[doc = "`dstAddr` - Address in the destination process to write data to."] +#[doc = "`srcProcess` - Source process handle."] +#[doc = "`srcAddr` - Address in the source to read data from."] +#[doc = "`size` - Size of the data to transfer."] +#[doc = "`cfg` - Configuration structure."] +#[doc = "# Notes"] +#[doc = "The handle is signaled when the transfer finishes."] +#[doc = ""] + pub fn svcStartInterProcessDma( dma: *mut Handle, dstProcess: Handle, @@ -3833,42 +4002,37 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Stops an inter-process DMA transfer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dma` - Handle of the DMA channel object."] - #[doc = ""] +#[doc = "Stops an inter-process DMA transfer."] +#[doc = "# Arguments"] +#[doc = "`dma` - Handle of the DMA channel object."] +#[doc = ""] + pub fn svcStopDma(dma: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the state of an inter-process DMA transfer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] - #[doc = "* `dma` - Handle of the DMA channel object."] - #[doc = ""] +#[doc = "Gets the state of an inter-process DMA transfer."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] +#[doc = "`dma` - Handle of the DMA channel object."] +#[doc = ""] + pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Restarts a DMA transfer, using the same configuration as before."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] - #[doc = "* `dma` - Handle of the DMA channel object."] - #[doc = "* `dstAddr` - Address in the destination process to write data to."] - #[doc = "* `srcAddr` - Address in the source to read data from."] - #[doc = "* `size` - Size of the data to transfer."] - #[doc = "* `flags` - Restart flags, [`DMARST_UNLOCK`] and/or [`DMARST_RESUME_DEVICE`]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The first transfer has to be configured with [`DMACFG_KEEP_LOCKED`]"] - #[doc = ""] +#[doc = "Restarts a DMA transfer, using the same configuration as before."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] +#[doc = "`dma` - Handle of the DMA channel object."] +#[doc = "`dstAddr` - Address in the destination process to write data to."] +#[doc = "`srcAddr` - Address in the source to read data from."] +#[doc = "`size` - Size of the data to transfer."] +#[doc = "`flags` - Restart flags, [`DMARST_UNLOCK`] and/or [`DMARST_RESUME_DEVICE`]"] +#[doc = "# Notes"] +#[doc = "The first transfer has to be configured with [`DMACFG_KEEP_LOCKED`]"] +#[doc = ""] + pub fn svcRestartDma( dma: Handle, dstAddr: u32_, @@ -3879,44 +4043,39 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] - #[doc = ""] +#[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] +#[doc = "# Arguments"] +#[doc = "`useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] +#[doc = ""] + pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Enables or disables Wi-Fi. 11.4+ only."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enabled` - Whether to enable or disable Wi-Fi."] - #[doc = ""] +#[doc = "Enables or disables Wi-Fi. 11.4+ only."] +#[doc = "# Arguments"] +#[doc = "`enabled` - Whether to enable or disable Wi-Fi."] +#[doc = ""] + pub fn svcSetWifiEnabled(enabled: bool) -> Result; } extern "C" { - #[doc = "# Debugging"] - #[doc = ""] - #[doc = "Breaks execution."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `breakReason` - Reason for breaking."] - #[doc = ""] +#[doc = "# Debugging"] +#[doc = "Breaks execution."] +#[doc = "# Arguments"] +#[doc = "`breakReason` - Reason for breaking."] +#[doc = ""] + pub fn svcBreak(breakReason: UserBreakType); } extern "C" { - #[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `breakReason` - Debug reason for breaking."] - #[doc = "* `croInfo` - Library information."] - #[doc = "* `croInfoSize` - Size of the above structure."] - #[doc = ""] +#[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] +#[doc = "# Arguments"] +#[doc = "`breakReason` - Debug reason for breaking."] +#[doc = "`croInfo` - Library information."] +#[doc = "`croInfoSize` - Size of the above structure."] +#[doc = ""] + pub fn svcBreakRO( breakReason: UserBreakType, croInfo: *const ::libc::c_void, @@ -3925,44 +4084,41 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Outputs a debug string."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `str` - String to output."] - #[doc = "* `length` - Length of the string to output, needs to be positive."] - #[doc = ""] +#[doc = "Outputs a debug string."] +#[doc = "# Arguments"] +#[doc = "`str` - String to output."] +#[doc = "`length` - Length of the string to output, needs to be positive."] +#[doc = ""] + pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Controls performance monitoring on the CP15 interface and the SCU."] - #[doc = ""] - #[doc = "The meaning of the parameters depend on the operation."] - #[doc = "The operations are the following:"] - #[doc = "- [`PERFCOUNTEROP_ENABLE`] (void) -> void, tries to enable and lock perfmon. functionality."] - #[doc = "- [`PERFCOUNTEROP_DISABLE`] (void) -> void, disable and forcibly unlocks perfmon. functionality."] - #[doc = "- [`PERFCOUNTEROP_GET_VALUE`] [`PerfCounterRegister`] reg) -> u64, gets the value of a particular counter register."] - #[doc = "- [`PERFCOUNTEROP_SET_VALUE`] [`PerfCounterRegister`] reg, u64 value) -> void, sets the value of a particular counter register."] - #[doc = "- [`PERFCOUNTEROP_GET_OVERFLOW_FLAGS`] (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] - #[doc = "- Format is a bitfield of [`PerfCounterRegister`]"] - #[doc = "- [`PERFCOUNTEROP_RESET`] (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] - #[doc = "overflow flags of selected registers."] - #[doc = "- Format is two bitfields of [`PerfCounterRegister`]"] - #[doc = "- [`PERFCOUNTEROP_GET_EVENT`] [`PerfCounterRegister`] reg) -> [`PerfCounterEvent`] gets the event associated"] - #[doc = "to a particular counter register."] - #[doc = "- [`PERFCOUNTEROP_SET_EVENT`] [`PerfCounterRegister`] reg, [`PerfCounterEvent)`] -> void, sets the event associated"] - #[doc = "to a particular counter register."] - #[doc = "- [`PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED`] (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] - #[doc = "and to use 64-bit counter values."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output. [Direction: In, Out]"] - #[doc = "* `op` - Operation, see details."] - #[doc = "* `param1` - First parameter."] - #[doc = "* `param2` - Second parameter."] - #[doc = ""] +#[doc = "Controls performance monitoring on the CP15 interface and the SCU."] +#[doc = "The meaning of the parameters depend on the operation."] +#[doc = "The operations are the following:"] +#[doc = "- [`PERFCOUNTEROP_ENABLE`] (void) -> void, tries to enable and lock perfmon. functionality."] +#[doc = "- [`PERFCOUNTEROP_DISABLE`] (void) -> void, disable and forcibly unlocks perfmon. functionality."] +#[doc = "- [`PERFCOUNTEROP_GET_VALUE`] [`PerfCounterRegister`] reg) -> u64, gets the value of a particular counter register."] +#[doc = "- [`PERFCOUNTEROP_SET_VALUE`] [`PerfCounterRegister`] reg, u64 value) -> void, sets the value of a particular counter register."] +#[doc = "- [`PERFCOUNTEROP_GET_OVERFLOW_FLAGS`] (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] +#[doc = "- Format is a bitfield of [`PerfCounterRegister`]"] +#[doc = "- [`PERFCOUNTEROP_RESET`] (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] +#[doc = "overflow flags of selected registers."] +#[doc = "- Format is two bitfields of [`PerfCounterRegister`]"] +#[doc = "- [`PERFCOUNTEROP_GET_EVENT`] [`PerfCounterRegister`] reg) -> [`PerfCounterEvent`] gets the event associated"] +#[doc = "to a particular counter register."] +#[doc = "- [`PERFCOUNTEROP_SET_EVENT`] [`PerfCounterRegister`] reg, [`PerfCounterEvent)`] -> void, sets the event associated"] +#[doc = "to a particular counter register."] +#[doc = "- [`PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED`] (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] +#[doc = "and to use 64-bit counter values."] +#[doc = "# Arguments"] +#[doc = "`out` - Output. [Direction: In, Out]"] +#[doc = "`op` - Operation, see details."] +#[doc = "`param1` - First parameter."] +#[doc = "`param2` - Second parameter."] +#[doc = ""] + pub fn svcControlPerformanceCounter( out: *mut u64_, op: PerfCounterOperation, @@ -3972,68 +4128,62 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a debug handle for an active process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] - #[doc = "* `processId` - ID of the process to debug."] - #[doc = ""] +#[doc = "Creates a debug handle for an active process."] +#[doc = "# Arguments"] +#[doc = "`debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] +#[doc = "`processId` - ID of the process to debug."] +#[doc = ""] + pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Breaks a debugged process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `debug` - Debug handle of the process."] - #[doc = ""] +#[doc = "Breaks a debugged process."] +#[doc = "# Arguments"] +#[doc = "`debug` - Debug handle of the process."] +#[doc = ""] + pub fn svcBreakDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates a debugged process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `debug` - Debug handle of the process."] - #[doc = ""] +#[doc = "Terminates a debugged process."] +#[doc = "# Arguments"] +#[doc = "`debug` - Debug handle of the process."] +#[doc = ""] + pub fn svcTerminateDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current debug event of a debugged process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output the debug event information to. [Direction: In, Out]"] - #[doc = "* `debug` - Debug handle of the process."] - #[doc = ""] +#[doc = "Gets the current debug event of a debugged process."] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output the debug event information to. [Direction: In, Out]"] +#[doc = "`debug` - Debug handle of the process."] +#[doc = ""] + pub fn svcGetProcessDebugEvent(info: *mut DebugEventInfo, debug: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Continues the current debug event of a debugged process (not necessarily the same as [`svcGetProcessDebugEvent)`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `debug` - Debug handle of the process."] - #[doc = "* `flags` - Flags to continue with, see [`DebugFlags`]"] - #[doc = ""] +#[doc = "Continues the current debug event of a debugged process (not necessarily the same as [`svcGetProcessDebugEvent)`]"] +#[doc = "# Arguments"] +#[doc = "`debug` - Debug handle of the process."] +#[doc = "`flags` - Flags to continue with, see [`DebugFlags`]"] +#[doc = ""] + pub fn svcContinueDebugEvent(debug: Handle, flags: DebugFlags) -> Result; } extern "C" { #[must_use] - #[doc = "Fetches the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Values of the registers to fetch, see [`ThreadContext`] [Direction: In, Out]"] - #[doc = "* `debug` - Debug handle of the parent process."] - #[doc = "* `threadId` - ID of the thread to fetch the saved registers of."] - #[doc = "* `controlFlags` - Which registers to fetch, see [`ThreadContextControlFlags`]"] - #[doc = ""] +#[doc = "Fetches the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] +#[doc = "# Arguments"] +#[doc = "`context` - Values of the registers to fetch, see [`ThreadContext`] [Direction: In, Out]"] +#[doc = "`debug` - Debug handle of the parent process."] +#[doc = "`threadId` - ID of the thread to fetch the saved registers of."] +#[doc = "`controlFlags` - Which registers to fetch, see [`ThreadContextControlFlags`]"] +#[doc = ""] + pub fn svcGetDebugThreadContext( context: *mut ThreadContext, debug: Handle, @@ -4043,15 +4193,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Updates the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `debug` - Debug handle of the parent process."] - #[doc = "* `threadId` - ID of the thread to update the saved registers of."] - #[doc = "* `context` - Values of the registers to update, see [`ThreadContext`]"] - #[doc = "* `controlFlags` - Which registers to update, see [`ThreadContextControlFlags`]"] - #[doc = ""] +#[doc = "Updates the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] +#[doc = "# Arguments"] +#[doc = "`debug` - Debug handle of the parent process."] +#[doc = "`threadId` - ID of the thread to update the saved registers of."] +#[doc = "`context` - Values of the registers to update, see [`ThreadContext`]"] +#[doc = "`controlFlags` - Which registers to update, see [`ThreadContextControlFlags`]"] +#[doc = ""] + pub fn svcSetDebugThreadContext( debug: Handle, threadId: u32_, @@ -4061,15 +4210,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Queries memory information of a debugged process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] - #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] - #[doc = "* `debug` - Debug handle of the process to query memory from."] - #[doc = "* `addr` - Virtual memory address to query."] - #[doc = ""] +#[doc = "Queries memory information of a debugged process."] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output memory info to. [Direction: In, Out]"] +#[doc = "`out` - Pointer to output page info to. [Direction: In, Out]"] +#[doc = "`debug` - Debug handle of the process to query memory from."] +#[doc = "`addr` - Virtual memory address to query."] +#[doc = ""] + pub fn svcQueryDebugProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -4079,15 +4227,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a debugged process's memory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buffer` - Buffer to read data to."] - #[doc = "* `debug` - Debug handle of the process."] - #[doc = "* `addr` - Address to read from."] - #[doc = "* `size` - Size of the memory to read."] - #[doc = ""] +#[doc = "Reads from a debugged process's memory."] +#[doc = "# Arguments"] +#[doc = "`buffer` - Buffer to read data to."] +#[doc = "`debug` - Debug handle of the process."] +#[doc = "`addr` - Address to read from."] +#[doc = "`size` - Size of the memory to read."] +#[doc = ""] + pub fn svcReadProcessMemory( buffer: *mut ::libc::c_void, debug: Handle, @@ -4097,15 +4244,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a debugged process's memory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `debug` - Debug handle of the process."] - #[doc = "* `buffer` - Buffer to write data from."] - #[doc = "* `addr` - Address to write to."] - #[doc = "* `size` - Size of the memory to write."] - #[doc = ""] +#[doc = "Writes to a debugged process's memory."] +#[doc = "# Arguments"] +#[doc = "`debug` - Debug handle of the process."] +#[doc = "`buffer` - Buffer to write data from."] +#[doc = "`addr` - Address to write to."] +#[doc = "`size` - Size of the memory to write."] +#[doc = ""] + pub fn svcWriteProcessMemory( debug: Handle, buffer: *const ::libc::c_void, @@ -4115,28 +4261,26 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see ."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] - #[doc = "* `control` - Value of the control regiser."] - #[doc = "* `value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] - #[doc = ""] +#[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see ."] +#[doc = "# Arguments"] +#[doc = "`registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] +#[doc = "`control` - Value of the control regiser."] +#[doc = "`value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] +#[doc = ""] + pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a debugged thread's parameter."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `unused` - Unused. [Direction: In, Out]"] - #[doc = "* `out` - Output value. [Direction: In, Out]"] - #[doc = "* `debug` - Debug handle of the process."] - #[doc = "* `threadId` - ID of the thread"] - #[doc = "* `parameter` - Parameter to fetch, see [`DebugThreadParameter`]"] - #[doc = ""] +#[doc = "Gets a debugged thread's parameter."] +#[doc = "# Arguments"] +#[doc = "`unused` - Unused. [Direction: In, Out]"] +#[doc = "`out` - Output value. [Direction: In, Out]"] +#[doc = "`debug` - Debug handle of the process."] +#[doc = "`threadId` - ID of the thread"] +#[doc = "`parameter` - Parameter to fetch, see [`DebugThreadParameter`]"] +#[doc = ""] + pub fn svcGetDebugThreadParam( unused: *mut s64, out: *mut u32_, @@ -4147,210 +4291,256 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a function in supervisor mode."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `callback` - Function to execute."] - #[doc = ""] +#[doc = "Executes a function in supervisor mode."] +#[doc = "# Arguments"] +#[doc = "`callback` - Function to execute."] +#[doc = ""] + pub fn svcBackdoor(callback: ::core::option::Option s32>) -> Result; } #[doc = "Mount \"nand:/\""] #[doc = ""] + pub const ARM9DESC_MOUNT_NAND: _bindgen_ty_7 = 1; #[doc = "Mount nand:/ro/ as read-write"] #[doc = ""] + pub const ARM9DESC_MOUNT_NANDRO_RW: _bindgen_ty_7 = 2; #[doc = "Mount \"twln:/\""] #[doc = ""] + pub const ARM9DESC_MOUNT_TWLN: _bindgen_ty_7 = 4; #[doc = "Mount \"wnand:/\""] #[doc = ""] + pub const ARM9DESC_MOUNT_WNAND: _bindgen_ty_7 = 8; #[doc = "Mount \"cardspi:/\""] #[doc = ""] + pub const ARM9DESC_MOUNT_CARDSPI: _bindgen_ty_7 = 16; #[doc = "Use SDIF3"] #[doc = ""] + pub const ARM9DESC_USE_SDIF3: _bindgen_ty_7 = 32; #[doc = "Create seed (movable.sed)"] #[doc = ""] + pub const ARM9DESC_CREATE_SEED: _bindgen_ty_7 = 64; #[doc = "Use card SPI, required by multiple pxi:dev commands"] #[doc = ""] + pub const ARM9DESC_USE_CARD_SPI: _bindgen_ty_7 = 128; #[doc = "SD application (not checked)"] #[doc = ""] + pub const ARM9DESC_SD_APPLICATION: _bindgen_ty_7 = 256; #[doc = "Mount \"sdmc:/\" as read-write"] #[doc = ""] + pub const ARM9DESC_MOUNT_SDMC_RW: _bindgen_ty_7 = 512; #[doc = "ARM9 descriptor flags"] #[doc = ""] + pub type _bindgen_ty_7 = ::libc::c_uint; #[doc = "Category \"system application\""] #[doc = ""] + pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: _bindgen_ty_8 = 1; #[doc = "Category \"hardware check\""] #[doc = ""] + pub const FSACCESS_CATEGORY_HARDWARE_CHECK: _bindgen_ty_8 = 2; #[doc = "Category \"filesystem tool\""] #[doc = ""] + pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: _bindgen_ty_8 = 4; #[doc = "Debug"] #[doc = ""] + pub const FSACCESS_DEBUG: _bindgen_ty_8 = 8; #[doc = "TWLCARD backup"] #[doc = ""] + pub const FSACCESS_TWLCARD_BACKUP: _bindgen_ty_8 = 16; #[doc = "TWLNAND data"] #[doc = ""] + pub const FSACCESS_TWLNAND_DATA: _bindgen_ty_8 = 32; #[doc = "BOSS (SpotPass)"] #[doc = ""] + pub const FSACCESS_BOSS: _bindgen_ty_8 = 64; #[doc = "SDMC (read-write)"] #[doc = ""] + pub const FSACCESS_SDMC_RW: _bindgen_ty_8 = 128; #[doc = "Core"] #[doc = ""] + pub const FSACCESS_CORE: _bindgen_ty_8 = 256; #[doc = "nand:/ro/ (read-only)"] #[doc = ""] + pub const FSACCESS_NANDRO_RO: _bindgen_ty_8 = 512; #[doc = "nand:/rw/"] #[doc = ""] + pub const FSACCESS_NANDRW: _bindgen_ty_8 = 1024; #[doc = "nand:/ro/ (read-write)"] #[doc = ""] + pub const FSACCESS_NANDRO_RW: _bindgen_ty_8 = 2048; #[doc = "Category \"System Settings\""] #[doc = ""] + pub const FSACCESS_CATEGORY_SYSTEM_SETTINGS: _bindgen_ty_8 = 4096; #[doc = "Cardboard (System Transfer)"] #[doc = ""] + pub const FSACCESS_CARDBOARD: _bindgen_ty_8 = 8192; #[doc = "Export/Import IVs (movable.sed)"] #[doc = ""] + pub const FSACCESS_EXPORT_IMPORT_IVS: _bindgen_ty_8 = 16384; #[doc = "SDMC (write-only)"] #[doc = ""] + pub const FSACCESS_SDMC_WO: _bindgen_ty_8 = 32768; -#[doc = "\"Switch cleanup\" (3.0+)"] -#[doc = ""] + pub const FSACCESS_SWITCH_CLEANUP: _bindgen_ty_8 = 65536; #[doc = "Savedata move (5.0+)"] #[doc = ""] + pub const FSACCESS_SAVEDATA_MOVE: _bindgen_ty_8 = 131072; #[doc = "Shop (5.0+)"] #[doc = ""] + pub const FSACCESS_SHOP: _bindgen_ty_8 = 262144; #[doc = "Shop (5.0+)"] #[doc = ""] + pub const FSACCESS_SHELL: _bindgen_ty_8 = 524288; #[doc = "Category \"Home Menu\" (6.0+)"] #[doc = ""] + pub const FSACCESS_CATEGORY_HOME_MENU: _bindgen_ty_8 = 1048576; #[doc = "Seed DB (9.6+)"] #[doc = ""] + pub const FSACCESS_SEEDDB: _bindgen_ty_8 = 2097152; #[doc = "Filesystem access flags"] #[doc = ""] + pub type _bindgen_ty_8 = ::libc::c_uint; #[doc = "Regular application"] #[doc = ""] + pub const RESLIMIT_CATEGORY_APPLICATION: ResourceLimitCategory = 0; #[doc = "System applet"] #[doc = ""] + pub const RESLIMIT_CATEGORY_SYS_APPLET: ResourceLimitCategory = 1; #[doc = "Library applet"] #[doc = ""] + pub const RESLIMIT_CATEGORY_LIB_APPLET: ResourceLimitCategory = 2; #[doc = "System modules running inside the BASE memregion"] #[doc = ""] + pub const RESLIMIT_CATEGORY_OTHER: ResourceLimitCategory = 3; #[doc = "The resource limit category of a title"] #[doc = ""] + pub type ResourceLimitCategory = ::libc::c_uint; #[doc = "64MB of usable application memory"] #[doc = ""] + pub const SYSMODE_O3DS_PROD: SystemMode = 0; #[doc = "124MB of usable application memory. Unusable on O3DS"] #[doc = ""] + pub const SYSMODE_N3DS_PROD: SystemMode = 1; #[doc = "97MB/178MB of usable application memory"] #[doc = ""] + pub const SYSMODE_DEV1: SystemMode = 2; #[doc = "80MB/124MB of usable application memory"] #[doc = ""] + pub const SYSMODE_DEV2: SystemMode = 3; #[doc = "72MB of usable application memory. Same as \"Prod\" on N3DS"] #[doc = ""] + pub const SYSMODE_DEV3: SystemMode = 4; #[doc = "32MB of usable application memory. Same as \"Prod\" on N3DS"] #[doc = ""] + pub const SYSMODE_DEV4: SystemMode = 5; #[doc = "The system mode a title should be launched under"] #[doc = ""] + pub type SystemMode = ::libc::c_uint; #[doc = "The system info flags and remaster version of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_SystemInfoFlags { - #[doc = "Reserved"] - #[doc = ""] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 5usize], pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Remaster version"] - #[doc = ""] +#[doc = "Remaster version"] +#[doc = ""] + pub remaster_version: u16_, } impl ExHeader_SystemInfoFlags { @@ -4395,62 +4585,79 @@ impl ExHeader_SystemInfoFlags { } #[doc = "Information about a title's section"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSectionInfo { - #[doc = "The address of the section"] - #[doc = ""] +#[doc = "The address of the section"] +#[doc = ""] + pub address: u32_, - #[doc = "The number of pages the section occupies"] - #[doc = ""] +#[doc = "The number of pages the section occupies"] +#[doc = ""] + pub num_pages: u32_, - #[doc = "The size of the section"] - #[doc = ""] +#[doc = "The size of the section"] +#[doc = ""] + pub size: u32_, } #[doc = "The name of a title and infomation about its section"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSetInfo { - #[doc = "Title name"] - #[doc = ""] +#[doc = "Title name"] +#[doc = ""] + pub name: [::libc::c_char; 8usize], - #[doc = "System info flags, see [`ExHeader_SystemInfoFlags`]"] - #[doc = ""] +#[doc = "System info flags, see [`ExHeader_SystemInfoFlags`]"] +#[doc = ""] + pub flags: ExHeader_SystemInfoFlags, - #[doc = ".text section info, see [`ExHeader_CodeSectionInfo`]"] - #[doc = ""] +#[doc = ".text section info, see [`ExHeader_CodeSectionInfo`]"] +#[doc = ""] + pub text: ExHeader_CodeSectionInfo, - #[doc = "Stack size"] - #[doc = ""] +#[doc = "Stack size"] +#[doc = ""] + pub stack_size: u32_, - #[doc = ".rodata section info, see [`ExHeader_CodeSectionInfo`]"] - #[doc = ""] +#[doc = ".rodata section info, see [`ExHeader_CodeSectionInfo`]"] +#[doc = ""] + pub rodata: ExHeader_CodeSectionInfo, - #[doc = "Reserved"] - #[doc = ""] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: u32_, - #[doc = ".data section info, see [`ExHeader_CodeSectionInfo`]"] - #[doc = ""] +#[doc = ".data section info, see [`ExHeader_CodeSectionInfo`]"] +#[doc = ""] + pub data: ExHeader_CodeSectionInfo, - #[doc = ".bss section size"] - #[doc = ""] +#[doc = ".bss section size"] +#[doc = ""] + pub bss_size: u32_, } #[doc = "The savedata size and jump ID of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemInfo { - #[doc = "Savedata size"] - #[doc = ""] +#[doc = "Savedata size"] +#[doc = ""] + pub savedata_size: u64_, - #[doc = "Jump ID"] - #[doc = ""] +#[doc = "Jump ID"] +#[doc = ""] + pub jump_id: u64_, - #[doc = "Reserved"] - #[doc = ""] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 48usize], } impl Default for ExHeader_SystemInfo { @@ -4464,17 +4671,21 @@ impl Default for ExHeader_SystemInfo { } #[doc = "The code set info, dependencies and system info of a title (SCI)"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemControlInfo { - #[doc = "Code set info, see [`ExHeader_CodeSetInfo`]"] - #[doc = ""] +#[doc = "Code set info, see [`ExHeader_CodeSetInfo`]"] +#[doc = ""] + pub codeset_info: ExHeader_CodeSetInfo, - #[doc = "Title IDs of the titles that this program depends on"] - #[doc = ""] +#[doc = "Title IDs of the titles that this program depends on"] +#[doc = ""] + pub dependencies: [u64_; 48usize], - #[doc = "System info, see [`ExHeader_SystemInfo`]"] - #[doc = ""] +#[doc = "System info, see [`ExHeader_SystemInfo`]"] +#[doc = ""] + pub system_info: ExHeader_SystemInfo, } impl Default for ExHeader_SystemControlInfo { @@ -4488,20 +4699,25 @@ impl Default for ExHeader_SystemControlInfo { } #[doc = "The ARM11 filesystem info of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11StorageInfo { - #[doc = "Extdata ID"] - #[doc = ""] +#[doc = "Extdata ID"] +#[doc = ""] + pub extdata_id: u64_, - #[doc = "IDs of the system savedata accessible by the title"] - #[doc = ""] +#[doc = "IDs of the system savedata accessible by the title"] +#[doc = ""] + pub system_savedata_ids: [u32_; 2usize], - #[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] - #[doc = ""] +#[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] +#[doc = ""] + pub accessible_savedata_ids: u64_, - #[doc = "FS access flags"] - #[doc = ""] +#[doc = "FS access flags"] +#[doc = ""] + pub fs_access_info: u32_, pub _bitfield_align_1: [u32; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, @@ -4565,16 +4781,19 @@ impl ExHeader_Arm11StorageInfo { } #[doc = "The CPU-related and memory-layout-related info of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11CoreInfo { - #[doc = "The low title ID of the target firmware"] - #[doc = ""] +#[doc = "The low title ID of the target firmware"] +#[doc = ""] + pub core_version: u32_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, - #[doc = "The priority of the title's main thread"] - #[doc = ""] +#[doc = "The priority of the title's main thread"] +#[doc = ""] + pub priority: u8_, } impl Default for ExHeader_Arm11CoreInfo { @@ -4725,29 +4944,37 @@ impl ExHeader_Arm11CoreInfo { } #[doc = "The ARM11 system-local capabilities of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11SystemLocalCapabilities { - #[doc = "Title ID"] - #[doc = ""] +#[doc = "Title ID"] +#[doc = ""] + pub title_id: u64_, - #[doc = "Core info, see [`ExHeader_Arm11CoreInfo`]"] - #[doc = ""] +#[doc = "Core info, see [`ExHeader_Arm11CoreInfo`]"] +#[doc = ""] + pub core_info: ExHeader_Arm11CoreInfo, - #[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] - #[doc = ""] +#[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] +#[doc = ""] + pub reslimits: [u16_; 16usize], - #[doc = "Storage info, see [`ExHeader_Arm11StorageInfo`]"] - #[doc = ""] +#[doc = "Storage info, see [`ExHeader_Arm11StorageInfo`]"] +#[doc = ""] + pub storage_info: ExHeader_Arm11StorageInfo, - #[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] - #[doc = ""] +#[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] +#[doc = ""] + pub service_access: [[::libc::c_char; 8usize]; 34usize], - #[doc = "Reserved"] - #[doc = ""] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 15usize], - #[doc = "Resource limit category, see [`ExHeader_Arm11SystemLocalCapabilities`]"] - #[doc = ""] +#[doc = "Resource limit category, see [`ExHeader_Arm11SystemLocalCapabilities`]"] +#[doc = ""] + pub reslimit_category: ResourceLimitCategory, } impl Default for ExHeader_Arm11SystemLocalCapabilities { @@ -4761,41 +4988,51 @@ impl Default for ExHeader_Arm11SystemLocalCapabilities { } #[doc = "The ARM11 kernel capabilities of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11KernelCapabilities { - #[doc = "ARM11 kernel descriptors, see 3dbrew"] - #[doc = ""] +#[doc = "ARM11 kernel descriptors, see 3dbrew"] +#[doc = ""] + pub descriptors: [u32_; 28usize], - #[doc = "Reserved"] - #[doc = ""] +#[doc = "Reserved"] +#[doc = ""] + pub reserved: [u8_; 16usize], } #[doc = "The ARM9 access control of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm9AccessControl { - #[doc = "Process9 FS descriptors, see 3dbrew"] - #[doc = ""] +#[doc = "Process9 FS descriptors, see 3dbrew"] +#[doc = ""] + pub descriptors: [u8_; 15usize], - #[doc = "Descriptor version"] - #[doc = ""] +#[doc = "Descriptor version"] +#[doc = ""] + pub descriptor_version: u8_, } #[doc = "The access control information of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessControlInfo { - #[doc = "ARM11 system-local capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] - #[doc = ""] +#[doc = "ARM11 system-local capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] +#[doc = ""] + pub local_caps: ExHeader_Arm11SystemLocalCapabilities, - #[doc = "ARM11 kernel capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] - #[doc = ""] +#[doc = "ARM11 kernel capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] +#[doc = ""] + pub kernel_caps: ExHeader_Arm11KernelCapabilities, - #[doc = "ARM9 access control, see [`ExHeader_Arm9AccessControl`]"] - #[doc = ""] +#[doc = "ARM9 access control, see [`ExHeader_Arm9AccessControl`]"] +#[doc = ""] + pub access_control: ExHeader_Arm9AccessControl, } impl Default for ExHeader_AccessControlInfo { @@ -4809,14 +5046,17 @@ impl Default for ExHeader_AccessControlInfo { } #[doc = "Main extended header data, as returned by PXIPM, Loader and FSREG service commands"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Info { - #[doc = "System control info, see [`ExHeader_SystemControlInfo`]"] - #[doc = ""] +#[doc = "System control info, see [`ExHeader_SystemControlInfo`]"] +#[doc = ""] + pub sci: ExHeader_SystemControlInfo, - #[doc = "Access control info, see [`ExHeader_AccessControlInfo`]"] - #[doc = ""] +#[doc = "Access control info, see [`ExHeader_AccessControlInfo`]"] +#[doc = ""] + pub aci: ExHeader_AccessControlInfo, } impl Default for ExHeader_Info { @@ -4830,17 +5070,21 @@ impl Default for ExHeader_Info { } #[doc = "Extended header access descriptor"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessDescriptor { - #[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] - #[doc = ""] +#[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] +#[doc = ""] + pub signature: [u8_; 256usize], - #[doc = "The modulus used for the above signature, with 65537 as public exponent"] - #[doc = ""] +#[doc = "The modulus used for the above signature, with 65537 as public exponent"] +#[doc = ""] + pub ncchModulus: [u8_; 256usize], - #[doc = "This is compared for equality with the first ACI by Process9, see [`ExHeader_AccessControlInfo`]"] - #[doc = ""] +#[doc = "This is compared for equality with the first ACI by Process9, see [`ExHeader_AccessControlInfo`]"] +#[doc = ""] + pub acli: ExHeader_AccessControlInfo, } impl Default for ExHeader_AccessDescriptor { @@ -4854,14 +5098,17 @@ impl Default for ExHeader_AccessDescriptor { } #[doc = "The NCCH Extended Header of a title"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader { - #[doc = "Main extended header data, see [`ExHeader_Info`]"] - #[doc = ""] +#[doc = "Main extended header data, see [`ExHeader_Info`]"] +#[doc = ""] + pub info: ExHeader_Info, - #[doc = "Access descriptor, see [`ExHeader_AccessDescriptor`]"] - #[doc = ""] +#[doc = "Access descriptor, see [`ExHeader_AccessDescriptor`]"] +#[doc = ""] + pub access_descriptor: ExHeader_AccessDescriptor, } impl Default for ExHeader { @@ -4875,80 +5122,74 @@ impl Default for ExHeader { } extern "C" { #[must_use] - #[doc = "Initializes the service API."] - #[doc = ""] +#[doc = "Initializes the service API."] +#[doc = ""] + pub fn srvInit() -> Result; } extern "C" { - #[doc = "Exits the service API."] - #[doc = ""] +#[doc = "Exits the service API."] +#[doc = ""] + pub fn srvExit(); } extern "C" { - #[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] - #[doc = ""] - #[doc = "srvGetServiceHandle will always block if the service hasn't been registered yet,"] - #[doc = "use srvIsServiceRegistered to check whether that is the case or not."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `blocking` - Whether srvGetServiceHandle should be non-blocking."] - #[doc = ""] +#[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] +#[doc = "srvGetServiceHandle will always block if the service hasn't been registered yet,"] +#[doc = "use srvIsServiceRegistered to check whether that is the case or not."] +#[doc = "# Arguments"] +#[doc = "`blocking` - Whether srvGetServiceHandle should be non-blocking."] +#[doc = ""] + pub fn srvSetBlockingPolicy(nonBlocking: bool); } extern "C" { - #[doc = "Gets the current service API session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current service API session handle."] - #[doc = ""] +#[doc = "Gets the current service API session handle."] +#[doc = "Returns:"] +#[doc = "The current service API session handle."] +#[doc = ""] + pub fn srvGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] - #[doc = ""] - #[doc = "0xD8E06406 if the caller has no right to access the service,"] - #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 0 if no error occured,"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the handle to."] - #[doc = "* `name` - Name of the service."] - #[doc = ""] +#[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] +#[doc = "0xD8E06406 if the caller has no right to access the service,"] +#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] +#[doc = "Returns:"] +#[doc = "0 if no error occured,"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the handle to."] +#[doc = "`name` - Name of the service."] +#[doc = ""] + pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Registers the current process as a client to the service API."] - #[doc = ""] +#[doc = "Registers the current process as a client to the service API."] +#[doc = ""] + pub fn srvRegisterClient() -> Result; } extern "C" { #[must_use] - #[doc = "Enables service notificatios, returning a notification semaphore."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `semaphoreOut` - Pointer to output the notification semaphore to."] - #[doc = ""] +#[doc = "Enables service notificatios, returning a notification semaphore."] +#[doc = "# Arguments"] +#[doc = "`semaphoreOut` - Pointer to output the notification semaphore to."] +#[doc = ""] + pub fn srvEnableNotification(semaphoreOut: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Registers the current process as a service."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the service handle to."] - #[doc = "* `name` - Name of the service."] - #[doc = "* `maxSessions` - Maximum number of sessions the service can handle."] - #[doc = ""] +#[doc = "Registers the current process as a service."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the service handle to."] +#[doc = "`name` - Name of the service."] +#[doc = "`maxSessions` - Maximum number of sessions the service can handle."] +#[doc = ""] + pub fn srvRegisterService( out: *mut Handle, name: *const ::libc::c_char, @@ -4957,125 +5198,111 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters the current process as a service."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Name of the service."] - #[doc = ""] +#[doc = "Unregisters the current process as a service."] +#[doc = "# Arguments"] +#[doc = "`name` - Name of the service."] +#[doc = ""] + pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves a service handle."] - #[doc = ""] - #[doc = "0xD8E06406 if the caller has no right to access the service,"] - #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 0 if no error occured,"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the handle to."] - #[doc = "* `name` - Name of the service."] - #[doc = ""] +#[doc = "Retrieves a service handle."] +#[doc = "0xD8E06406 if the caller has no right to access the service,"] +#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] +#[doc = "Returns:"] +#[doc = "0 if no error occured,"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the handle to."] +#[doc = "`name` - Name of the service."] +#[doc = ""] + pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Registers a port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Name of the port."] - #[doc = "* `clientHandle` - Client handle of the port."] - #[doc = ""] +#[doc = "Registers a port."] +#[doc = "# Arguments"] +#[doc = "`name` - Name of the port."] +#[doc = "`clientHandle` - Client handle of the port."] +#[doc = ""] + pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Unregisters a port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Name of the port."] - #[doc = ""] +#[doc = "Unregisters a port."] +#[doc = "# Arguments"] +#[doc = "`name` - Name of the port."] +#[doc = ""] + pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves a port handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the handle to."] - #[doc = "* `name` - Name of the port."] - #[doc = ""] +#[doc = "Retrieves a port handle."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the handle to."] +#[doc = "`name` - Name of the port."] +#[doc = ""] + pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for a port to be registered."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Name of the port to wait for registration."] - #[doc = ""] +#[doc = "Waits for a port to be registered."] +#[doc = "# Arguments"] +#[doc = "`name` - Name of the port to wait for registration."] +#[doc = ""] + pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Subscribes to a notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `notificationId` - ID of the notification."] - #[doc = ""] +#[doc = "Subscribes to a notification."] +#[doc = "# Arguments"] +#[doc = "`notificationId` - ID of the notification."] +#[doc = ""] + pub fn srvSubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Unsubscribes from a notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `notificationId` - ID of the notification."] - #[doc = ""] - pub fn srvUnsubscribe(notificationId: u32_) -> Result; +#[doc = "Unsubscribes from a notification."] +#[doc = "# Arguments"] +#[doc = "`notificationId` - ID of the notification."] +#[doc = ""] + + pub fn srvUnsubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Receives a notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `notificationIdOut` - Pointer to output the ID of the received notification to."] - #[doc = ""] +#[doc = "Receives a notification."] +#[doc = "# Arguments"] +#[doc = "`notificationIdOut` - Pointer to output the ID of the received notification to."] +#[doc = ""] + pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Publishes a notification to subscribers."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `notificationId` - ID of the notification."] - #[doc = "* `flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] - #[doc = ""] +#[doc = "Publishes a notification to subscribers."] +#[doc = "# Arguments"] +#[doc = "`notificationId` - ID of the notification."] +#[doc = "`flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] +#[doc = ""] + pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `processIdCountOut` - Pointer to output the number of process IDs to."] - #[doc = "* `processIdsOut` - Pointer to output the process IDs to. Should have size \"60 * sizeof(u32)\"."] - #[doc = "* `notificationId` - ID of the notification."] - #[doc = ""] +#[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] +#[doc = "# Arguments"] +#[doc = "`processIdCountOut` - Pointer to output the number of process IDs to."] +#[doc = "`processIdsOut` - Pointer to output the process IDs to. Should have size \"60 sizeof(u32)\"."] +#[doc = "`notificationId` - ID of the notification."] +#[doc = ""] + pub fn srvPublishAndGetSubscriber( processIdCountOut: *mut u32_, processIdsOut: *mut u32_, @@ -5084,86 +5311,99 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks whether a service is registered."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `registeredOut` - Pointer to output the registration status to."] - #[doc = "* `name` - Name of the service to check."] - #[doc = ""] +#[doc = "Checks whether a service is registered."] +#[doc = "# Arguments"] +#[doc = "`registeredOut` - Pointer to output the registration status to."] +#[doc = "`name` - Name of the service to check."] +#[doc = ""] + pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Checks whether a port is registered."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `registeredOut` - Pointer to output the registration status to."] - #[doc = "* `name` - Name of the port to check."] - #[doc = ""] +#[doc = "Checks whether a port is registered."] +#[doc = "# Arguments"] +#[doc = "`registeredOut` - Pointer to output the registration status to."] +#[doc = "`name` - Name of the port to check."] +#[doc = ""] + pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } #[doc = "For generic errors. Shows miscellaneous info."] #[doc = ""] + pub const ERRF_ERRTYPE_GENERIC: ERRF_ErrType = 0; #[doc = "Same output as generic, but informs the user that \"the System Memory has been damaged\"."] #[doc = ""] + pub const ERRF_ERRTYPE_MEM_CORRUPT: ERRF_ErrType = 1; #[doc = "Displays the \"The Game Card was removed.\" message."] #[doc = ""] + pub const ERRF_ERRTYPE_CARD_REMOVED: ERRF_ErrType = 2; #[doc = "For exceptions, or more specifically 'crashes'. union data should be exception_data."] #[doc = ""] + pub const ERRF_ERRTYPE_EXCEPTION: ERRF_ErrType = 3; #[doc = "For general failure. Shows a message. union data should have a string set in failure_mesg"] #[doc = ""] + pub const ERRF_ERRTYPE_FAILURE: ERRF_ErrType = 4; #[doc = "Outputs logs to NAND in some cases."] #[doc = ""] + pub const ERRF_ERRTYPE_LOGGED: ERRF_ErrType = 5; #[doc = "Types of errors that can be thrown by err:f."] #[doc = ""] + pub type ERRF_ErrType = ::libc::c_uint; #[doc = "Prefetch Abort"] #[doc = ""] + pub const ERRF_EXCEPTION_PREFETCH_ABORT: ERRF_ExceptionType = 0; #[doc = "Data abort"] #[doc = ""] + pub const ERRF_EXCEPTION_DATA_ABORT: ERRF_ExceptionType = 1; #[doc = "Undefined instruction"] #[doc = ""] + pub const ERRF_EXCEPTION_UNDEFINED: ERRF_ExceptionType = 2; #[doc = "VFP (floating point) exception."] #[doc = ""] + pub const ERRF_EXCEPTION_VFP: ERRF_ExceptionType = 3; #[doc = "Types of 'Exceptions' thrown for ERRF_ERRTYPE_EXCEPTION"] #[doc = ""] + pub type ERRF_ExceptionType = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionInfo { - #[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] - #[doc = ""] +#[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] +#[doc = ""] + pub type_: ERRF_ExceptionType, pub reserved: [u8_; 3usize], - #[doc = "ifsr (prefetch abort) / dfsr (data abort)"] - #[doc = ""] +#[doc = "ifsr (prefetch abort) / dfsr (data abort)"] +#[doc = ""] + pub fsr: u32_, - #[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] - #[doc = ""] +#[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] +#[doc = ""] + pub far: u32_, pub fpexc: u32_, pub fpinst: u32_, @@ -5181,11 +5421,13 @@ impl Default for ERRF_ExceptionInfo { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionData { - #[doc = "Exception info struct"] - #[doc = ""] +#[doc = "Exception info struct"] +#[doc = ""] + pub excep: ERRF_ExceptionInfo, - #[doc = "CPU register dump."] - #[doc = ""] +#[doc = "CPU register dump."] +#[doc = ""] + pub regs: CpuRegisters, } impl Default for ERRF_ExceptionData { @@ -5200,42 +5442,53 @@ impl Default for ERRF_ExceptionData { #[repr(C)] #[derive(Copy, Clone)] pub struct ERRF_FatalErrInfo { - #[doc = "Type, one of the ERRF_ERRTYPE_* enum"] - #[doc = ""] +#[doc = "Type, one of the ERRF_ERRTYPE_* enum"] +#[doc = ""] + pub type_: ERRF_ErrType, - #[doc = "High revison ID"] - #[doc = ""] +#[doc = "High revison ID"] +#[doc = ""] + pub revHigh: u8_, - #[doc = "Low revision ID"] - #[doc = ""] +#[doc = "Low revision ID"] +#[doc = ""] + pub revLow: u16_, - #[doc = "Result code"] - #[doc = ""] +#[doc = "Result code"] +#[doc = ""] + pub resCode: u32_, - #[doc = "PC address at exception"] - #[doc = ""] +#[doc = "PC address at exception"] +#[doc = ""] + pub pcAddr: u32_, - #[doc = "Process ID."] - #[doc = ""] +#[doc = "Process ID."] +#[doc = ""] + pub procId: u32_, - #[doc = "Title ID."] - #[doc = ""] +#[doc = "Title ID."] +#[doc = ""] + pub titleId: u64_, - #[doc = "Application Title ID."] - #[doc = ""] +#[doc = "Application Title ID."] +#[doc = ""] + pub appTitleId: u64_, - #[doc = "The different types of data for errors."] - #[doc = ""] +#[doc = "The different types of data for errors."] +#[doc = ""] + pub data: ERRF_FatalErrInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ERRF_FatalErrInfo__bindgen_ty_1 { - #[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] - #[doc = ""] +#[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] +#[doc = ""] + pub exception_data: ERRF_ExceptionData, - #[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] - #[doc = ""] +#[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] +#[doc = ""] + pub failure_mesg: [::libc::c_char; 96usize], } impl Default for ERRF_FatalErrInfo__bindgen_ty_1 { @@ -5258,88 +5511,82 @@ impl Default for ERRF_FatalErrInfo { } extern "C" { #[must_use] - #[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] - #[doc = ""] +#[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] +#[doc = ""] + pub fn errfInit() -> Result; } extern "C" { - #[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] - #[doc = ""] +#[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] +#[doc = ""] + pub fn errfExit(); } extern "C" { - #[doc = "Gets the current err:f API session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current err:f API session handle."] - #[doc = ""] +#[doc = "Gets the current err:f API session handle."] +#[doc = "Returns:"] +#[doc = "The current err:f API session handle."] +#[doc = ""] + pub fn errfGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Throws a system error and possibly results in ErrDisp triggering."] - #[doc = ""] - #[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] - #[doc = "top screen with a developer console or the proper patches in a CFW applied."] - #[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] - #[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] - #[doc = "constructing the ERRF_FatalErrInfo struct yourself."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `error` - Error to throw. [Direction: In]"] - #[doc = ""] +#[doc = "Throws a system error and possibly results in ErrDisp triggering."] +#[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] +#[doc = "top screen with a developer console or the proper patches in a CFW applied."] +#[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] +#[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] +#[doc = "constructing the ERRF_FatalErrInfo struct yourself."] +#[doc = "# Arguments"] +#[doc = "`error` - Error to throw. [Direction: In]"] +#[doc = ""] + pub fn ERRF_Throw(error: *const ERRF_FatalErrInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Throws a system error with the given Result code."] - #[doc = ""] - #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] - #[doc = "This function \\em does fill in the address where this function was called from."] - #[doc = "See for expected top screen output"] - #[doc = "on development units/patched ErrDisp."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `failure` - Result code to throw. [Direction: In]"] - #[doc = ""] +#[doc = "Throws a system error with the given Result code."] +#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] +#[doc = "This function \\em does fill in the address where this function was called from."] +#[doc = "See for expected top screen output"] +#[doc = "on development units/patched ErrDisp."] +#[doc = "# Arguments"] +#[doc = "`failure` - Result code to throw. [Direction: In]"] +#[doc = ""] + pub fn ERRF_ThrowResult(failure: Result) -> Result; } extern "C" { #[must_use] - #[doc = "Throws a system error with the given Result code and message."] - #[doc = ""] - #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] - #[doc = "This function does \\em not fill in the address where this function was called from because it"] - #[doc = "would not be displayed."] - #[doc = "The message is only displayed on development units/patched ErrDisp."] - #[doc = "See for expected top screen output"] - #[doc = "on development units/patched ErrDisp."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `failure` - Result code to throw. [Direction: In]"] - #[doc = "* `message` - The message to display. [Direction: In]"] - #[doc = ""] +#[doc = "Throws a system error with the given Result code and message."] +#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] +#[doc = "This function does \\em not fill in the address where this function was called from because it"] +#[doc = "would not be displayed."] +#[doc = "The message is only displayed on development units/patched ErrDisp."] +#[doc = "See for expected top screen output"] +#[doc = "on development units/patched ErrDisp."] +#[doc = "# Arguments"] +#[doc = "`failure` - Result code to throw. [Direction: In]"] +#[doc = "`message` - The message to display. [Direction: In]"] +#[doc = ""] + pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result; } extern "C" { - #[doc = "Handles an exception using ErrDisp."] - #[doc = ""] - #[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] - #[doc = "[`threadOnException`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `excep` - Exception information"] - #[doc = "* `regs` - CPU registers"] - #[doc = ""] +#[doc = "Handles an exception using ErrDisp."] +#[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] +#[doc = "[`threadOnException`]"] +#[doc = "# Arguments"] +#[doc = "`excep` - Exception information"] +#[doc = "`regs` - CPU registers"] +#[doc = ""] + pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters); } #[doc = "Kernel configuration page (read-only)."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osKernelConfig_s { @@ -5365,24 +5612,30 @@ pub struct osKernelConfig_s { } #[doc = "Time reference information struct (filled in by PTM)."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osTimeRef_s { - #[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] - #[doc = ""] +#[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] +#[doc = ""] + pub value_ms: u64_, - #[doc = "System ticks elapsed since boot when this structure was last updated"] - #[doc = ""] +#[doc = "System ticks elapsed since boot when this structure was last updated"] +#[doc = ""] + pub value_tick: u64_, - #[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around [`SYSCLOCK_ARM11)`]"] - #[doc = ""] +#[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around [`SYSCLOCK_ARM11)`]"] +#[doc = ""] + pub sysclock_hz: s64, - #[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] - #[doc = ""] +#[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] +#[doc = ""] + pub drift_ms: s64, } #[doc = "Shared system configuration page structure (read-only or read-write depending on exheader)."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osSharedConfig_s { @@ -5408,18 +5661,22 @@ pub struct osSharedConfig_s { } #[doc = "Tick counter."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct TickCounter { - #[doc = "Elapsed CPU ticks between measurements."] - #[doc = ""] +#[doc = "Elapsed CPU ticks between measurements."] +#[doc = ""] + pub elapsed: u64_, - #[doc = "Point in time used as reference."] - #[doc = ""] +#[doc = "Point in time used as reference."] +#[doc = ""] + pub reference: u64_, } #[doc = "OS_VersionBin. Format of the system version: \"..-\""] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OS_VersionBin { @@ -5431,101 +5688,81 @@ pub struct OS_VersionBin { pub reserved_x5: [u8_; 3usize], } extern "C" { - #[doc = "Converts an address from virtual (process) memory to physical memory."] - #[doc = ""] - #[doc = "It is sometimes required by services or when using the GPU command buffer."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The corresponding physical address."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `vaddr` - Input virtual address."] - #[doc = ""] +#[doc = "Converts an address from virtual (process) memory to physical memory."] +#[doc = "It is sometimes required by services or when using the GPU command buffer."] +#[doc = "Returns:"] +#[doc = "The corresponding physical address."] +#[doc = "# Arguments"] +#[doc = "`vaddr` - Input virtual address."] +#[doc = ""] + pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32_; } extern "C" { - #[doc = "Converts 0x14* vmem to 0x30*."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `vaddr` - Input virtual address."] - #[doc = ""] +#[doc = "Converts 0x14* vmem to 0x30*."] +#[doc = "Returns:"] +#[doc = "The corresponding address in the 0x30range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] +#[doc = "# Arguments"] +#[doc = "`vaddr` - Input virtual address."] +#[doc = ""] + pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Retrieves basic information about a service error."] - #[doc = ""] - #[doc = "This can be used to get some details about an error returned by a service call."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A string containing a summary of an error."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `error` - Error to retrieve information about."] - #[doc = ""] +#[doc = "Retrieves basic information about a service error."] +#[doc = "This can be used to get some details about an error returned by a service call."] +#[doc = "Returns:"] +#[doc = "A string containing a summary of an error."] +#[doc = "# Arguments"] +#[doc = "`error` - Error to retrieve information about."] +#[doc = ""] + pub fn osStrError(error: Result) -> *const ::libc::c_char; } extern "C" { - #[doc = "Reads the latest reference timepoint published by PTM."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Structure (see [`osTimeRef_s)`]"] - #[doc = ""] +#[doc = "Reads the latest reference timepoint published by PTM."] +#[doc = "Returns:"] +#[doc = "Structure (see [`osTimeRef_s)`]"] +#[doc = ""] + pub fn osGetTimeRef() -> osTimeRef_s; } extern "C" { - #[doc = "Gets the current time."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The number of milliseconds since 1st Jan 1900 00:00."] - #[doc = ""] +#[doc = "Gets the current time."] +#[doc = "Returns:"] +#[doc = "The number of milliseconds since 1st Jan 1900 00:00."] +#[doc = ""] + pub fn osGetTime() -> u64_; } extern "C" { - #[doc = "Reads the elapsed time in a tick counter."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The number of milliseconds elapsed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cnt` - The tick counter."] - #[doc = ""] +#[doc = "Reads the elapsed time in a tick counter."] +#[doc = "Returns:"] +#[doc = "The number of milliseconds elapsed."] +#[doc = "# Arguments"] +#[doc = "`cnt` - The tick counter."] +#[doc = ""] + pub fn osTickCounterRead(cnt: *const TickCounter) -> f64; } extern "C" { - #[doc = "Configures the New 3DS speedup."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Specifies whether to enable or disable the speedup."] - #[doc = ""] +#[doc = "Configures the New 3DS speedup."] +#[doc = "# Arguments"] +#[doc = "`enable` - Specifies whether to enable or disable the speedup."] +#[doc = ""] + pub fn osSetSpeedupEnable(enable: bool); } extern "C" { #[must_use] - #[doc = "Gets the NAND system-version stored in NVer/CVer."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] - #[doc = "* `cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] - #[doc = ""] +#[doc = "Gets the NAND system-version stored in NVer/CVer."] +#[doc = "Returns:"] +#[doc = "The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] +#[doc = "# Arguments"] +#[doc = "`nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] +#[doc = "`cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] +#[doc = ""] + pub fn osGetSystemVersionData( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5533,19 +5770,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This is a wrapper for osGetSystemVersionData."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* See osGetSystemVersionData."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nver_versionbin` - Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] - #[doc = "* `cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] - #[doc = "* `sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] - #[doc = "* `sysverstr_maxsize` - Max size of the above string buffer, *including* NULL-terminator."] - #[doc = ""] +#[doc = "This is a wrapper for osGetSystemVersionData."] +#[doc = "Returns:"] +#[doc = "See osGetSystemVersionData."] +#[doc = "# Arguments"] +#[doc = "`nver_versionbin` - Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] +#[doc = "`cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] +#[doc = "`sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] +#[doc = "`sysverstr_maxsize` - Max size of the above string buffer, *includingNULL-terminator."] +#[doc = ""] + pub fn osGetSystemVersionDataString( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5595,88 +5829,88 @@ extern "C" { #[doc = "A light lock."] #[doc = ""] + pub type LightLock = _LOCK_T; #[doc = "A recursive lock."] #[doc = ""] + pub type RecursiveLock = _LOCK_RECURSIVE_T; #[doc = "A condition variable."] #[doc = ""] + pub type CondVar = s32; #[doc = "A light event."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightEvent { - #[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] - #[doc = ""] +#[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] +#[doc = ""] + pub state: s32, - #[doc = "Lock used for sticky timer operation"] - #[doc = ""] +#[doc = "Lock used for sticky timer operation"] +#[doc = ""] + pub lock: LightLock, } #[doc = "A light semaphore."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightSemaphore { - #[doc = "The current release count of the semaphore"] - #[doc = ""] +#[doc = "The current release count of the semaphore"] +#[doc = ""] + pub current_count: s32, - #[doc = "Number of threads concurrently acquiring the semaphore"] - #[doc = ""] +#[doc = "Number of threads concurrently acquiring the semaphore"] +#[doc = ""] + pub num_threads_acq: s16, - #[doc = "The maximum release count of the semaphore"] - #[doc = ""] +#[doc = "The maximum release count of the semaphore"] +#[doc = ""] + pub max_count: s16, } extern "C" { #[must_use] - #[doc = "Function used to implement user-mode synchronization primitives."] - #[doc = ""] - #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] - #[doc = "```"] - #[doc = ""] - #[doc = "s32 val=0;"] - #[doc = "// Does *nothing* since val >= 0"] - #[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] - #[doc = "```"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] - #[doc = "* `type` - Type of action to be performed by the arbiter"] - #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Usage of this function entails an implicit Data Memory Barrier (dmb)."] - #[doc = ""] +#[doc = "Function used to implement user-mode synchronization primitives."] +#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] +#[doc = "```"] +#[doc = "s32 val=0;"] +#[doc = "// Does *nothing* since val >= 0"] +#[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] +#[doc = "```"] +#[doc = "# Arguments"] +#[doc = "`addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] +#[doc = "`type` - Type of action to be performed by the arbiter"] +#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] +#[doc = "# Notes"] +#[doc = "Usage of this function entails an implicit Data Memory Barrier (dmb)."] +#[doc = ""] + pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] - #[doc = ""] - #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] - #[doc = "```"] - #[doc = ""] - #[doc = "s32 val=0;"] - #[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] - #[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] - #[doc = "```"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] - #[doc = "* `type` - Type of action to be performed by the arbiter (must use [`ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT`] or [`ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)`]"] - #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Usage of this function entails an implicit Data Memory Barrier (dmb)."] - #[doc = ""] +#[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] +#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] +#[doc = "```"] +#[doc = "s32 val=0;"] +#[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] +#[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] +#[doc = "```"] +#[doc = "# Arguments"] +#[doc = "`addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] +#[doc = "`type` - Type of action to be performed by the arbiter (must use [`ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT`] or [`ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)`]"] +#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] +#[doc = "# Notes"] +#[doc = "Usage of this function entails an implicit Data Memory Barrier (dmb)."] +#[doc = ""] + pub fn syncArbitrateAddressWithTimeout( addr: *mut s32, type_: ArbitrationType, @@ -5685,117 +5919,100 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Initializes a light lock."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Initializes a light lock."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn LightLock_Init(lock: *mut LightLock); } extern "C" { - #[doc = "Locks a light lock."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Locks a light lock."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn LightLock_Lock(lock: *mut LightLock); } extern "C" { - #[doc = "Attempts to lock a light lock."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Zero on success, non-zero on failure."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Attempts to lock a light lock."] +#[doc = "Returns:"] +#[doc = "Zero on success, non-zero on failure."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn LightLock_TryLock(lock: *mut LightLock) -> ::libc::c_int; } extern "C" { - #[doc = "Unlocks a light lock."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Unlocks a light lock."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn LightLock_Unlock(lock: *mut LightLock); } extern "C" { - #[doc = "Initializes a recursive lock."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Initializes a recursive lock."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn RecursiveLock_Init(lock: *mut RecursiveLock); } extern "C" { - #[doc = "Locks a recursive lock."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Locks a recursive lock."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn RecursiveLock_Lock(lock: *mut RecursiveLock); } extern "C" { - #[doc = "Attempts to lock a recursive lock."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Zero on success, non-zero on failure."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Attempts to lock a recursive lock."] +#[doc = "Returns:"] +#[doc = "Zero on success, non-zero on failure."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> ::libc::c_int; } extern "C" { - #[doc = "Unlocks a recursive lock."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `lock` - Pointer to the lock."] - #[doc = ""] +#[doc = "Unlocks a recursive lock."] +#[doc = "# Arguments"] +#[doc = "`lock` - Pointer to the lock."] +#[doc = ""] + pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock); } extern "C" { - #[doc = "Initializes a condition variable."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cv` - Pointer to the condition variable."] - #[doc = ""] +#[doc = "Initializes a condition variable."] +#[doc = "# Arguments"] +#[doc = "`cv` - Pointer to the condition variable."] +#[doc = ""] + pub fn CondVar_Init(cv: *mut CondVar); } extern "C" { - #[doc = "Waits on a condition variable."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cv` - Pointer to the condition variable."] - #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] - #[doc = ""] +#[doc = "Waits on a condition variable."] +#[doc = "# Arguments"] +#[doc = "`cv` - Pointer to the condition variable."] +#[doc = "`lock` - Pointer to the lock to atomically unlock/relock during the wait."] +#[doc = ""] + pub fn CondVar_Wait(cv: *mut CondVar, lock: *mut LightLock); } extern "C" { - #[doc = "Waits on a condition variable with a timeout."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Zero on success, non-zero on failure."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cv` - Pointer to the condition variable."] - #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] - #[doc = "* `timeout_ns` - Timeout in nanoseconds."] - #[doc = ""] +#[doc = "Waits on a condition variable with a timeout."] +#[doc = "Returns:"] +#[doc = "Zero on success, non-zero on failure."] +#[doc = "# Arguments"] +#[doc = "`cv` - Pointer to the condition variable."] +#[doc = "`lock` - Pointer to the lock to atomically unlock/relock during the wait."] +#[doc = "`timeout_ns` - Timeout in nanoseconds."] +#[doc = ""] + pub fn CondVar_WaitTimeout( cv: *mut CondVar, lock: *mut LightLock, @@ -5803,131 +6020,113 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { - #[doc = "Wakes up threads waiting on a condition variable."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cv` - Pointer to the condition variable."] - #[doc = "* `num_threads` - Maximum number of threads to wake up (or [`ARBITRATION_SIGNAL_ALL`] to wake them all)."] - #[doc = ""] +#[doc = "Wakes up threads waiting on a condition variable."] +#[doc = "# Arguments"] +#[doc = "`cv` - Pointer to the condition variable."] +#[doc = "`num_threads` - Maximum number of threads to wake up (or [`ARBITRATION_SIGNAL_ALL`] to wake them all)."] +#[doc = ""] + pub fn CondVar_WakeUp(cv: *mut CondVar, num_threads: s32); } extern "C" { - #[doc = "Initializes a light event."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the event."] - #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] - #[doc = ""] +#[doc = "Initializes a light event."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the event."] +#[doc = "`reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] +#[doc = ""] + pub fn LightEvent_Init(event: *mut LightEvent, reset_type: ResetType); } extern "C" { - #[doc = "Clears a light event."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the event."] - #[doc = ""] +#[doc = "Clears a light event."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the event."] +#[doc = ""] + pub fn LightEvent_Clear(event: *mut LightEvent); } extern "C" { - #[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the event."] - #[doc = ""] +#[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the event."] +#[doc = ""] + pub fn LightEvent_Pulse(event: *mut LightEvent); } extern "C" { - #[doc = "Signals a light event, waking up threads waiting on it."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the event."] - #[doc = ""] +#[doc = "Signals a light event, waking up threads waiting on it."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the event."] +#[doc = ""] + pub fn LightEvent_Signal(event: *mut LightEvent); } extern "C" { - #[doc = "Attempts to wait on a light event."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Non-zero if the event was signaled, zero otherwise."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the event."] - #[doc = ""] +#[doc = "Attempts to wait on a light event."] +#[doc = "Returns:"] +#[doc = "Non-zero if the event was signaled, zero otherwise."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the event."] +#[doc = ""] + pub fn LightEvent_TryWait(event: *mut LightEvent) -> ::libc::c_int; } extern "C" { - #[doc = "Waits on a light event."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the event."] - #[doc = ""] +#[doc = "Waits on a light event."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the event."] +#[doc = ""] + pub fn LightEvent_Wait(event: *mut LightEvent); } extern "C" { - #[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Non-zero on timeout, zero otherwise."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the event."] - #[doc = "* `timeout_ns` - Timeout in nanoseconds."] - #[doc = ""] +#[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] +#[doc = "Returns:"] +#[doc = "Non-zero on timeout, zero otherwise."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the event."] +#[doc = "`timeout_ns` - Timeout in nanoseconds."] +#[doc = ""] + pub fn LightEvent_WaitTimeout(event: *mut LightEvent, timeout_ns: s64) -> ::libc::c_int; } extern "C" { - #[doc = "Initializes a light semaphore."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to the semaphore."] - #[doc = "* `max_count` - Initial count of the semaphore."] - #[doc = "* `max_count` - Maximum count of the semaphore."] - #[doc = ""] +#[doc = "Initializes a light semaphore."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to the semaphore."] +#[doc = "`max_count` - Initial count of the semaphore."] +#[doc = "`max_count` - Maximum count of the semaphore."] +#[doc = ""] + pub fn LightSemaphore_Init(semaphore: *mut LightSemaphore, initial_count: s16, max_count: s16); } extern "C" { - #[doc = "Acquires a light semaphore."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `semaphore` - Pointer to the semaphore."] - #[doc = "* `count` - Acquire count"] - #[doc = ""] +#[doc = "Acquires a light semaphore."] +#[doc = "# Arguments"] +#[doc = "`semaphore` - Pointer to the semaphore."] +#[doc = "`count` - Acquire count"] +#[doc = ""] + pub fn LightSemaphore_Acquire(semaphore: *mut LightSemaphore, count: s32); } extern "C" { - #[doc = "Attempts to acquire a light semaphore."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Zero on success, non-zero on failure"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `semaphore` - Pointer to the semaphore."] - #[doc = "* `count` - Acquire count"] - #[doc = ""] +#[doc = "Attempts to acquire a light semaphore."] +#[doc = "Returns:"] +#[doc = "Zero on success, non-zero on failure"] +#[doc = "# Arguments"] +#[doc = "`semaphore` - Pointer to the semaphore."] +#[doc = "`count` - Acquire count"] +#[doc = ""] + pub fn LightSemaphore_TryAcquire(semaphore: *mut LightSemaphore, count: s32) -> ::libc::c_int; } extern "C" { - #[doc = "Releases a light semaphore."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `semaphore` - Pointer to the semaphore."] - #[doc = "* `count` - Release count"] - #[doc = ""] +#[doc = "Releases a light semaphore."] +#[doc = "# Arguments"] +#[doc = "`semaphore` - Pointer to the semaphore."] +#[doc = "`count` - Release count"] +#[doc = ""] + pub fn LightSemaphore_Release(semaphore: *mut LightSemaphore, count: s32); } #[repr(C)] @@ -5938,48 +6137,42 @@ pub struct Thread_tag { #[doc = "libctru thread handle type"] #[doc = ""] + pub type Thread = *mut Thread_tag; #[doc = "Exception handler type, necessarily an ARM function that does not return."] #[doc = ""] + pub type ExceptionHandler = ::core::option::Option< unsafe extern "C" fn(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters), >; extern "C" { - #[doc = "Creates a new libctru thread."] - #[doc = ""] - #[doc = "For userland apps, this has to be within the range [0x18;0x3F]."] - #[doc = "The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] - #[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] - #[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] - #[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] - #[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] - #[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] - #[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] - #[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] - #[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* [`svcExitThread`] should never be called from the thread, use [`threadExit`] instead."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The libctru thread handle on success, NULL on failure."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `entrypoint` - The function that will be called first upon thread creation"] - #[doc = "* `arg` - The argument passed to @p entrypoint"] - #[doc = "* `stack_size` - The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] - #[doc = "* `prio` - Low values gives the thread higher priority."] - #[doc = "* `core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] - #[doc = "* `detached` - When set to true, the thread is automatically freed when it finishes."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Default exit code of a thread is 0."] - #[doc = ""] +#[doc = "Creates a new libctru thread."] +#[doc = "For userland apps, this has to be within the range [0x18;0x3F]."] +#[doc = "The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] +#[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] +#[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] +#[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] +#[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] +#[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] +#[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] +#[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] +#[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] +#[doc = "**Warning!**"] +#[doc = "[`svcExitThread`] should never be called from the thread, use [`threadExit`] instead."] +#[doc = "Returns:"] +#[doc = "The libctru thread handle on success, NULL on failure."] +#[doc = "# Arguments"] +#[doc = "`entrypoint` - The function that will be called first upon thread creation"] +#[doc = "`arg` - The argument passed to @p entrypoint"] +#[doc = "`stack_size` - The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] +#[doc = "`prio` - Low values gives the thread higher priority."] +#[doc = "`core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] +#[doc = "`detached` - When set to true, the thread is automatically freed when it finishes."] +#[doc = "# Notes"] +#[doc = "Default exit code of a thread is 0."] +#[doc = ""] + pub fn threadCreate( entrypoint: ThreadFunc, arg: *mut ::libc::c_void, @@ -5990,107 +6183,102 @@ extern "C" { ) -> Thread; } extern "C" { - #[doc = "Retrieves the OS thread handle of a libctru thread."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* OS thread handle"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - libctru thread handle"] - #[doc = ""] +#[doc = "Retrieves the OS thread handle of a libctru thread."] +#[doc = "Returns:"] +#[doc = "OS thread handle"] +#[doc = "# Arguments"] +#[doc = "`thread` - libctru thread handle"] +#[doc = ""] + pub fn threadGetHandle(thread: Thread) -> Handle; } extern "C" { - #[doc = "Retrieves the exit code of a finished libctru thread."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Exit code"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - libctru thread handle"] - #[doc = ""] +#[doc = "Retrieves the exit code of a finished libctru thread."] +#[doc = "Returns:"] +#[doc = "Exit code"] +#[doc = "# Arguments"] +#[doc = "`thread` - libctru thread handle"] +#[doc = ""] + pub fn threadGetExitCode(thread: Thread) -> ::libc::c_int; } extern "C" { - #[doc = "Frees a finished libctru thread."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - libctru thread handle"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* This function should not be called if the thread is detached, as it is freed automatically when it finishes."] - #[doc = ""] +#[doc = "Frees a finished libctru thread."] +#[doc = "# Arguments"] +#[doc = "`thread` - libctru thread handle"] +#[doc = "# Notes"] +#[doc = "This function should not be called if the thread is detached, as it is freed automatically when it finishes."] +#[doc = ""] + pub fn threadFree(thread: Thread); } extern "C" { #[must_use] - #[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - libctru thread handle"] - #[doc = "* `timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] - #[doc = ""] +#[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] +#[doc = "# Arguments"] +#[doc = "`thread` - libctru thread handle"] +#[doc = "`timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] +#[doc = ""] + pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result; } extern "C" { - #[doc = "Changes a thread's status from attached to detached."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `thread` - libctru thread handle"] - #[doc = ""] +#[doc = "Changes a thread's status from attached to detached."] +#[doc = "# Arguments"] +#[doc = "`thread` - libctru thread handle"] +#[doc = ""] + pub fn threadDetach(thread: Thread); } extern "C" { - #[doc = "Retrieves the libctru thread handle of the current thread."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* libctru thread handle of the current thread, or NULL for the main thread"] - #[doc = ""] +#[doc = "Retrieves the libctru thread handle of the current thread."] +#[doc = "Returns:"] +#[doc = "libctru thread handle of the current thread, or NULL for the main thread"] +#[doc = ""] + pub fn threadGetCurrent() -> Thread; } extern "C" { - #[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `rc` - Exit code"] - #[doc = ""] +#[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] +#[doc = "# Arguments"] +#[doc = "`rc` - Exit code"] +#[doc = ""] + pub fn threadExit(rc: ::libc::c_int); } #[doc = "Framebuffer information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_FramebufferInfo { - #[doc = "Active framebuffer. (0 = first, 1 = second)"] - #[doc = ""] +#[doc = "Active framebuffer. (0 = first, 1 = second)"] +#[doc = ""] + pub active_framebuf: u32_, - #[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] - #[doc = ""] +#[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] +#[doc = ""] + pub framebuf0_vaddr: *mut u32_, - #[doc = "For the main screen: 3D right framebuffer address."] - #[doc = ""] +#[doc = "For the main screen: 3D right framebuffer address."] +#[doc = ""] + pub framebuf1_vaddr: *mut u32_, - #[doc = "Value for 0x1EF00X90, controls framebuffer width."] - #[doc = ""] +#[doc = "Value for 0x1EF00X90, controls framebuffer width."] +#[doc = ""] + pub framebuf_widthbytesize: u32_, - #[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] - #[doc = ""] +#[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] +#[doc = ""] + pub format: u32_, - #[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] - #[doc = ""] +#[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] +#[doc = ""] + pub framebuf_dispselect: u32_, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unk: u32_, } impl Default for GSPGPU_FramebufferInfo { @@ -6105,43 +6293,54 @@ impl Default for GSPGPU_FramebufferInfo { #[doc = "RGBA8. (4 bytes)"] #[doc = ""] + pub const GSP_RGBA8_OES: GSPGPU_FramebufferFormat = 0; #[doc = "BGR8. (3 bytes)"] #[doc = ""] + pub const GSP_BGR8_OES: GSPGPU_FramebufferFormat = 1; #[doc = "RGB565. (2 bytes)"] #[doc = ""] + pub const GSP_RGB565_OES: GSPGPU_FramebufferFormat = 2; #[doc = "RGB5A1. (2 bytes)"] #[doc = ""] + pub const GSP_RGB5_A1_OES: GSPGPU_FramebufferFormat = 3; #[doc = "RGBA4. (2 bytes)"] #[doc = ""] + pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormat = 4; #[doc = "Framebuffer format."] #[doc = ""] + pub type GSPGPU_FramebufferFormat = ::libc::c_uint; #[doc = "Capture info entry."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfoEntry { - #[doc = "Left framebuffer."] - #[doc = ""] +#[doc = "Left framebuffer."] +#[doc = ""] + pub framebuf0_vaddr: *mut u32_, - #[doc = "Right framebuffer."] - #[doc = ""] +#[doc = "Right framebuffer."] +#[doc = ""] + pub framebuf1_vaddr: *mut u32_, - #[doc = "Framebuffer format."] - #[doc = ""] +#[doc = "Framebuffer format."] +#[doc = ""] + pub format: u32_, - #[doc = "Framebuffer pitch."] - #[doc = ""] +#[doc = "Framebuffer pitch."] +#[doc = ""] + pub framebuf_widthbytesize: u32_, } impl Default for GSPGPU_CaptureInfoEntry { @@ -6155,11 +6354,13 @@ impl Default for GSPGPU_CaptureInfoEntry { } #[doc = "Capture info."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfo { - #[doc = "Capture info entries, one for each screen."] - #[doc = ""] +#[doc = "Capture info entries, one for each screen."] +#[doc = ""] + pub screencapture: [GSPGPU_CaptureInfoEntry; 2usize], } impl Default for GSPGPU_CaptureInfo { @@ -6174,84 +6375,90 @@ impl Default for GSPGPU_CaptureInfo { #[doc = "Memory fill completed."] #[doc = ""] + pub const GSPGPU_EVENT_PSC0: GSPGPU_Event = 0; #[doc = "TODO"] #[doc = ""] + pub const GSPGPU_EVENT_PSC1: GSPGPU_Event = 1; #[doc = "TODO"] #[doc = ""] + pub const GSPGPU_EVENT_VBlank0: GSPGPU_Event = 2; #[doc = "TODO"] #[doc = ""] + pub const GSPGPU_EVENT_VBlank1: GSPGPU_Event = 3; #[doc = "Display transfer finished."] #[doc = ""] + pub const GSPGPU_EVENT_PPF: GSPGPU_Event = 4; #[doc = "Command list processing finished."] #[doc = ""] + pub const GSPGPU_EVENT_P3D: GSPGPU_Event = 5; #[doc = "TODO"] #[doc = ""] + pub const GSPGPU_EVENT_DMA: GSPGPU_Event = 6; #[doc = "Used to know how many events there are."] #[doc = ""] + pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7; #[doc = "GSPGPU events."] #[doc = ""] + pub type GSPGPU_Event = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes GSPGPU."] - #[doc = ""] +#[doc = "Initializes GSPGPU."] +#[doc = ""] + pub fn gspInit() -> Result; } extern "C" { - #[doc = "Exits GSPGPU."] - #[doc = ""] +#[doc = "Exits GSPGPU."] +#[doc = ""] + pub fn gspExit(); } extern "C" { - #[doc = "Gets a pointer to the current gsp::Gpu session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current gsp::Gpu session handle."] - #[doc = ""] +#[doc = "Gets a pointer to the current gsp::Gpu session handle."] +#[doc = "Returns:"] +#[doc = "A pointer to the current gsp::Gpu session handle."] +#[doc = ""] + pub fn gspGetSessionHandle() -> *mut Handle; } extern "C" { - #[doc = "Returns true if the application currently has GPU rights."] - #[doc = ""] +#[doc = "Returns true if the application currently has GPU rights."] +#[doc = ""] + pub fn gspHasGpuRight() -> bool; } extern "C" { - #[doc = "Presents a buffer to the specified screen."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* true if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] - #[doc = "* `swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] - #[doc = "* `fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] - #[doc = "* `fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] - #[doc = "* `stride` - Stride in bytes between scanlines"] - #[doc = "* `mode` - Mode configuration to be written to LCD register"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The most recently presented buffer is processed and configured during the specified screen's next VBlank event."] - #[doc = ""] +#[doc = "Presents a buffer to the specified screen."] +#[doc = "Returns:"] +#[doc = "true if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] +#[doc = "`swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] +#[doc = "`fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] +#[doc = "`fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] +#[doc = "`stride` - Stride in bytes between scanlines"] +#[doc = "`mode` - Mode configuration to be written to LCD register"] +#[doc = "# Notes"] +#[doc = "The most recently presented buffer is processed and configured during the specified screen's next VBlank event."] +#[doc = ""] + pub fn gspPresentBuffer( screen: ::libc::c_uint, swap: ::libc::c_uint, @@ -6262,24 +6469,22 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Returns true if a prior [`gspPresentBuffer`] command is still pending to be processed by GSP."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] - #[doc = ""] +#[doc = "Returns true if a prior [`gspPresentBuffer`] command is still pending to be processed by GSP."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] +#[doc = ""] + pub fn gspIsPresentPending(screen: ::libc::c_uint) -> bool; } extern "C" { - #[doc = "Configures a callback to run when a GSPGPU event occurs."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the event."] - #[doc = "* `cb` - Callback to run."] - #[doc = "* `data` - Data to be passed to the callback."] - #[doc = "* `oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] - #[doc = ""] +#[doc = "Configures a callback to run when a GSPGPU event occurs."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the event."] +#[doc = "`cb` - Callback to run."] +#[doc = "`data` - Data to be passed to the callback."] +#[doc = "`oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] +#[doc = ""] + pub fn gspSetEventCallback( id: GSPGPU_Event, cb: ThreadFunc, @@ -6288,99 +6493,95 @@ extern "C" { ); } extern "C" { - #[doc = "Waits for a GSPGPU event to occur."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the event."] - #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] - #[doc = ""] +#[doc = "Waits for a GSPGPU event to occur."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the event."] +#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] +#[doc = ""] + pub fn gspWaitForEvent(id: GSPGPU_Event, nextEvent: bool); } extern "C" { - #[doc = "Waits for any GSPGPU event to occur."] - #[doc = ""] - #[doc = "The function returns immediately if there are unprocessed events at the time of call."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The ID of the event that occurred."] - #[doc = ""] +#[doc = "Waits for any GSPGPU event to occur."] +#[doc = "The function returns immediately if there are unprocessed events at the time of call."] +#[doc = "Returns:"] +#[doc = "The ID of the event that occurred."] +#[doc = ""] + pub fn gspWaitForAnyEvent() -> GSPGPU_Event; } extern "C" { #[must_use] - #[doc = "Submits a GX command."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `gxCommand` - GX command to execute."] - #[doc = ""] +#[doc = "Submits a GX command."] +#[doc = "# Arguments"] +#[doc = "`gxCommand` - GX command to execute."] +#[doc = ""] + pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Acquires GPU rights."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flags` - Flags to acquire with."] - #[doc = ""] +#[doc = "Acquires GPU rights."] +#[doc = "# Arguments"] +#[doc = "`flags` - Flags to acquire with."] +#[doc = ""] + pub fn GSPGPU_AcquireRight(flags: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Releases GPU rights."] - #[doc = ""] +#[doc = "Releases GPU rights."] +#[doc = ""] + pub fn GSPGPU_ReleaseRight() -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves display capture info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `captureinfo` - Pointer to output capture info to."] - #[doc = ""] +#[doc = "Retrieves display capture info."] +#[doc = "# Arguments"] +#[doc = "`captureinfo` - Pointer to output capture info to."] +#[doc = ""] + pub fn GSPGPU_ImportDisplayCaptureInfo(captureinfo: *mut GSPGPU_CaptureInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Saves the VRAM sys area."] - #[doc = ""] +#[doc = "Saves the VRAM sys area."] +#[doc = ""] + pub fn GSPGPU_SaveVramSysArea() -> Result; } extern "C" { #[must_use] - #[doc = "Resets the GPU"] - #[doc = ""] +#[doc = "Resets the GPU"] +#[doc = ""] + pub fn GSPGPU_ResetGpuCore() -> Result; } extern "C" { #[must_use] - #[doc = "Restores the VRAM sys area."] - #[doc = ""] +#[doc = "Restores the VRAM sys area."] +#[doc = ""] + pub fn GSPGPU_RestoreVramSysArea() -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to force the LCD to black."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] - #[doc = ""] +#[doc = "Sets whether to force the LCD to black."] +#[doc = "# Arguments"] +#[doc = "`flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] +#[doc = ""] + pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Updates a screen's framebuffer state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screenid` - ID of the screen to update."] - #[doc = "* `framebufinfo` - Framebuffer information to update with."] - #[doc = ""] +#[doc = "Updates a screen's framebuffer state."] +#[doc = "# Arguments"] +#[doc = "`screenid` - ID of the screen to update."] +#[doc = "`framebufinfo` - Framebuffer information to update with."] +#[doc = ""] + pub fn GSPGPU_SetBufferSwap( screenid: u32_, framebufinfo: *const GSPGPU_FramebufferInfo, @@ -6388,50 +6589,46 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Flushes memory from the data cache."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `adr` - Address to flush."] - #[doc = "* `size` - Size of the memory to flush."] - #[doc = ""] +#[doc = "Flushes memory from the data cache."] +#[doc = "# Arguments"] +#[doc = "`adr` - Address to flush."] +#[doc = "`size` - Size of the memory to flush."] +#[doc = ""] + pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates memory in the data cache."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `adr` - Address to invalidate."] - #[doc = "* `size` - Size of the memory to invalidate."] - #[doc = ""] +#[doc = "Invalidates memory in the data cache."] +#[doc = "# Arguments"] +#[doc = "`adr` - Address to invalidate."] +#[doc = "`size` - Size of the memory to invalidate."] +#[doc = ""] + pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to GPU hardware registers."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `regAddr` - Register address to write to."] - #[doc = "* `data` - Data to write."] - #[doc = "* `size` - Size of the data to write."] - #[doc = ""] +#[doc = "Writes to GPU hardware registers."] +#[doc = "# Arguments"] +#[doc = "`regAddr` - Register address to write to."] +#[doc = "`data` - Data to write."] +#[doc = "`size` - Size of the data to write."] +#[doc = ""] + pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to GPU hardware registers with a mask."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `regAddr` - Register address to write to."] - #[doc = "* `data` - Data to write."] - #[doc = "* `datasize` - Size of the data to write."] - #[doc = "* `maskdata` - Data of the mask."] - #[doc = "* `masksize` - Size of the mask."] - #[doc = ""] +#[doc = "Writes to GPU hardware registers with a mask."] +#[doc = "# Arguments"] +#[doc = "`regAddr` - Register address to write to."] +#[doc = "`data` - Data to write."] +#[doc = "`datasize` - Size of the data to write."] +#[doc = "`maskdata` - Data of the mask."] +#[doc = "`masksize` - Size of the mask."] +#[doc = ""] + pub fn GSPGPU_WriteHWRegsWithMask( regAddr: u32_, data: *const u32_, @@ -6442,27 +6639,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from GPU hardware registers."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `regAddr` - Register address to read from."] - #[doc = "* `data` - Buffer to read data to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Reads from GPU hardware registers."] +#[doc = "# Arguments"] +#[doc = "`regAddr` - Register address to read from."] +#[doc = "`data` - Buffer to read data to."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Registers the interrupt relay queue."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `eventHandle` - Handle of the GX command event."] - #[doc = "* `flags` - Flags to register with."] - #[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] - #[doc = "* `threadID` - Pointer to output the GSP thread ID to."] - #[doc = ""] +#[doc = "Registers the interrupt relay queue."] +#[doc = "# Arguments"] +#[doc = "`eventHandle` - Handle of the GX command event."] +#[doc = "`flags` - Flags to register with."] +#[doc = "`outMemHandle` - Pointer to output the shared memory handle to."] +#[doc = "`threadID` - Pointer to output the GSP thread ID to."] +#[doc = ""] + pub fn GSPGPU_RegisterInterruptRelayQueue( eventHandle: Handle, flags: u32_, @@ -6472,77 +6667,79 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters the interrupt relay queue."] - #[doc = ""] +#[doc = "Unregisters the interrupt relay queue."] +#[doc = ""] + pub fn GSPGPU_UnregisterInterruptRelayQueue() -> Result; } extern "C" { #[must_use] - #[doc = "Triggers a handling of commands written to shared memory."] - #[doc = ""] +#[doc = "Triggers a handling of commands written to shared memory."] +#[doc = ""] + pub fn GSPGPU_TriggerCmdReqQueue() -> Result; } extern "C" { #[must_use] - #[doc = "Sets 3D_LEDSTATE to the input state value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] - #[doc = ""] +#[doc = "Sets 3D_LEDSTATE to the input state value."] +#[doc = "# Arguments"] +#[doc = "`disable` - False = 3D LED enable, true = 3D LED disable."] +#[doc = ""] + pub fn GSPGPU_SetLedForceOff(disable: bool) -> Result; } #[doc = "Top screen"] #[doc = ""] + pub const GFX_TOP: gfxScreen_t = 0; #[doc = "Bottom screen"] #[doc = ""] + pub const GFX_BOTTOM: gfxScreen_t = 1; #[doc = "Screen IDs."] #[doc = ""] + pub type gfxScreen_t = ::libc::c_uint; #[doc = "Left eye framebuffer"] #[doc = ""] + pub const GFX_LEFT: gfx3dSide_t = 0; #[doc = "Right eye framebuffer"] #[doc = ""] + pub const GFX_RIGHT: gfx3dSide_t = 1; #[doc = "Top screen framebuffer side."] -#[doc = ""] #[doc = "This is only meaningful when stereoscopic 3D is enabled on the top screen."] #[doc = "In any other case, use [`GFX_LEFT`]"] #[doc = ""] + pub type gfx3dSide_t = ::libc::c_uint; extern "C" { - #[doc = "Initializes the LCD framebuffers with default parameters"] - #[doc = ""] - #[doc = "This is equivalent to calling: ```"] - #[doc = "gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); ```"] - #[doc = ""] +#[doc = "Initializes the LCD framebuffers with default parameters"] +#[doc = "This is equivalent to calling: ```"] +#[doc = "gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); ```"] +#[doc = ""] + pub fn gfxInitDefault(); } extern "C" { - #[doc = "Initializes the LCD framebuffers."] - #[doc = ""] - #[doc = "This function allocates memory for the framebuffers in the specified memory region."] - #[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `topFormat` - The format of the top screen framebuffers."] - #[doc = "* `bottomFormat` - The format of the bottom screen framebuffers."] - #[doc = "* `vramBuffers` - Whether to allocate the framebuffers in VRAM."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* This function internally calls [`gspInit`]"] - #[doc = ""] +#[doc = "Initializes the LCD framebuffers."] +#[doc = "This function allocates memory for the framebuffers in the specified memory region."] +#[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] +#[doc = "# Arguments"] +#[doc = "`topFormat` - The format of the top screen framebuffers."] +#[doc = "`bottomFormat` - The format of the bottom screen framebuffers."] +#[doc = "`vramBuffers` - Whether to allocate the framebuffers in VRAM."] +#[doc = "# Notes"] +#[doc = "This function internally calls [`gspInit`]"] +#[doc = ""] + pub fn gfxInit( topFormat: GSPGPU_FramebufferFormat, bottomFormat: GSPGPU_FramebufferFormat, @@ -6550,123 +6747,98 @@ extern "C" { ); } extern "C" { - #[doc = "Deinitializes and frees the LCD framebuffers."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* This function internally calls [`gspExit`]"] - #[doc = ""] +#[doc = "Deinitializes and frees the LCD framebuffers."] +#[doc = "# Notes"] +#[doc = "This function internally calls [`gspExit`]"] +#[doc = ""] + pub fn gfxExit(); } extern "C" { - #[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Pass true to enable, false to disable."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Stereoscopic 3D is disabled by default."] - #[doc = ""] +#[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] +#[doc = "# Arguments"] +#[doc = "`enable` - Pass true to enable, false to disable."] +#[doc = "# Notes"] +#[doc = "Stereoscopic 3D is disabled by default."] +#[doc = ""] + pub fn gfxSet3D(enable: bool); } extern "C" { - #[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* true if 3D enabled, false otherwise."] - #[doc = ""] +#[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] +#[doc = "Returns:"] +#[doc = "true if 3D enabled, false otherwise."] +#[doc = ""] + pub fn gfxIs3D() -> bool; } extern "C" { - #[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* true if wide mode enabled, false otherwise."] - #[doc = ""] +#[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] +#[doc = "Returns:"] +#[doc = "true if wide mode enabled, false otherwise."] +#[doc = ""] + pub fn gfxIsWide() -> bool; } extern "C" { - #[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* Wide mode does not work on Old 2DS consoles (however it does work on New 2DS XL consoles)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Pass true to enable, false to disable."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Wide mode is disabled by default."] - #[doc = "* Wide and stereoscopic 3D modes are mutually exclusive."] - #[doc = "* In wide mode pixels are not square, since scanlines are half as tall as they normally are."] - #[doc = ""] +#[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] +#[doc = "**Warning!**"] +#[doc = "Wide mode does not work on Old 2DS consoles (however it does work on New 2DS XL consoles)."] +#[doc = "# Arguments"] +#[doc = "`enable` - Pass true to enable, false to disable."] +#[doc = "# Notes"] +#[doc = "Wide mode is disabled by default."] +#[doc = "Wide and stereoscopic 3D modes are mutually exclusive."] +#[doc = "In wide mode pixels are not square, since scanlines are half as tall as they normally are."] +#[doc = ""] + pub fn gfxSetWide(enable: bool); } extern "C" { - #[doc = "Changes the pixel format of a screen."] - #[doc = ""] - #[doc = "they are freed and new ones are reallocated."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] - #[doc = "* `format` - Pixel format (see [`GSPGPU_FramebufferFormat)`]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* If the currently allocated framebuffers are too small for the specified format,"] - #[doc = ""] +#[doc = "Changes the pixel format of a screen."] +#[doc = "they are freed and new ones are reallocated."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] +#[doc = "`format` - Pixel format (see [`GSPGPU_FramebufferFormat)`]"] +#[doc = "# Notes"] +#[doc = "If the currently allocated framebuffers are too small for the specified format,"] +#[doc = ""] + pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormat); } extern "C" { - #[doc = "Retrieves the current pixel format of a screen."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Pixel format (see [`GSPGPU_FramebufferFormat)`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] - #[doc = ""] +#[doc = "Retrieves the current pixel format of a screen."] +#[doc = "Returns:"] +#[doc = "Pixel format (see [`GSPGPU_FramebufferFormat)`]"] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] +#[doc = ""] + pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormat; } extern "C" { - #[doc = "Enables or disables double buffering on a screen."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] - #[doc = "* `enable` - Pass true to enable, false to disable."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Double buffering is enabled by default."] - #[doc = ""] +#[doc = "Enables or disables double buffering on a screen."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] +#[doc = "`enable` - Pass true to enable, false to disable."] +#[doc = "# Notes"] +#[doc = "Double buffering is enabled by default."] +#[doc = ""] + pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, enable: bool); } extern "C" { - #[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] - #[doc = ""] - #[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current framebuffer of the chosen screen."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] - #[doc = "* `side` - Framebuffer side (see [`gfx3dSide_t)`] (pass [`GFX_LEFT`] if not using stereoscopic 3D)"] - #[doc = "* `width` - Pointer that will hold the width of the framebuffer in pixels."] - #[doc = "* `height` - Pointer that will hold the height of the framebuffer in pixels."] - #[doc = ""] +#[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] +#[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] +#[doc = "Returns:"] +#[doc = "A pointer to the current framebuffer of the chosen screen."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] +#[doc = "`side` - Framebuffer side (see [`gfx3dSide_t)`] (pass [`GFX_LEFT`] if not using stereoscopic 3D)"] +#[doc = "`width` - Pointer that will hold the width of the framebuffer in pixels."] +#[doc = "`height` - Pointer that will hold the height of the framebuffer in pixels."] +#[doc = ""] + pub fn gfxGetFramebuffer( screen: gfxScreen_t, side: gfx3dSide_t, @@ -6675,83 +6847,78 @@ extern "C" { ) -> *mut u8_; } extern "C" { - #[doc = "Flushes the data cache for the current framebuffers."] - #[doc = ""] - #[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* This is **only used during software rendering**. Since this function has significant overhead,"] - #[doc = ""] +#[doc = "Flushes the data cache for the current framebuffers."] +#[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] +#[doc = "**Warning!**"] +#[doc = "This is **only used during software rendering**. Since this function has significant overhead,"] +#[doc = ""] + pub fn gfxFlushBuffers(); } extern "C" { - #[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] - #[doc = ""] - #[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] - #[doc = "since this API does not implement triple buffering."] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* Only call this once per screen per frame, otherwise graphical glitches will occur"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `scr` - Screen ID (see [`gfxScreen_t)`]"] - #[doc = "* `hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Previously rendered content will be displayed on the screen after the next VBlank."] - #[doc = "* This function is still useful even if double buffering is disabled, as it must be used to commit configuration changes."] - #[doc = ""] +#[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] +#[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] +#[doc = "since this API does not implement triple buffering."] +#[doc = "**Warning!**"] +#[doc = "Only call this once per screen per frame, otherwise graphical glitches will occur"] +#[doc = "# Arguments"] +#[doc = "`scr` - Screen ID (see [`gfxScreen_t)`]"] +#[doc = "`hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] +#[doc = "# Notes"] +#[doc = "Previously rendered content will be displayed on the screen after the next VBlank."] +#[doc = "This function is still useful even if double buffering is disabled, as it must be used to commit configuration changes."] +#[doc = ""] + pub fn gfxScreenSwapBuffers(scr: gfxScreen_t, hasStereo: bool); } extern "C" { - #[doc = "**Warning!** This is deprecated! - This function has been superseded by [`gfxScreenSwapBuffers`] please use that instead."] - #[doc = ""] - #[doc = "Same as [`gfxScreenSwapBuffers`] but with hasStereo set to true."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `scr` - Screen ID (see [`gfxScreen_t)`]"] - #[doc = "* `immediate` - This parameter no longer has any effect and is thus ignored."] - #[doc = ""] +#[doc = "**Warning!** This is deprecated! - This function has been superseded by [`gfxScreenSwapBuffers`] please use that instead."] +#[doc = "Same as [`gfxScreenSwapBuffers`] but with hasStereo set to true."] +#[doc = "# Arguments"] +#[doc = "`scr` - Screen ID (see [`gfxScreen_t)`]"] +#[doc = "`immediate` - This parameter no longer has any effect and is thus ignored."] +#[doc = ""] + pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool); } extern "C" { - #[doc = "Updates the configuration of both screens."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* This function is equivalent to: ``` gfxScreenSwapBuffers(GFX_TOP,true); gfxScreenSwapBuffers(GFX_BOTTOM,true); ```"] - #[doc = ""] +#[doc = "Updates the configuration of both screens."] +#[doc = "# Notes"] +#[doc = "This function is equivalent to: ``` gfxScreenSwapBuffers(GFX_TOP,true); gfxScreenSwapBuffers(GFX_BOTTOM,true); ```"] +#[doc = ""] + pub fn gfxSwapBuffers(); } extern "C" { - #[doc = "Same as [`gfxSwapBuffers`] (formerly different)."] - #[doc = ""] +#[doc = "Same as [`gfxSwapBuffers`] (formerly different)."] +#[doc = ""] + pub fn gfxSwapBuffersGpu(); } #[doc = "A callback for printing a character."] #[doc = ""] + pub type ConsolePrint = ::core::option::Option< unsafe extern "C" fn(con: *mut ::libc::c_void, c: ::libc::c_int) -> bool, >; #[doc = "A font struct for the console."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ConsoleFont { - #[doc = "A pointer to the font graphics"] - #[doc = ""] +#[doc = "A pointer to the font graphics"] +#[doc = ""] + pub gfx: *mut u8_, - #[doc = "Offset to the first valid character in the font table"] - #[doc = ""] +#[doc = "Offset to the first valid character in the font table"] +#[doc = ""] + pub asciiOffset: u16_, - #[doc = "Number of characters in the font graphics"] - #[doc = ""] +#[doc = "Number of characters in the font graphics"] +#[doc = ""] + pub numChars: u16_, } impl Default for ConsoleFont { @@ -6764,71 +6931,88 @@ impl Default for ConsoleFont { } } #[doc = "Console structure used to store the state of a console render context."] -#[doc = ""] #[doc = "Default values from consoleGetDefault();"] #[doc = "```"] -#[doc = ""] #[doc = "PrintConsole defaultConsole ="] #[doc = "{"] #[doc = "};"] #[doc = "```"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PrintConsole { - #[doc = "Font of the console"] - #[doc = ""] +#[doc = "Font of the console"] +#[doc = ""] + pub font: ConsoleFont, - #[doc = "Framebuffer address"] - #[doc = ""] +#[doc = "Framebuffer address"] +#[doc = ""] + pub frameBuffer: *mut u16_, - #[doc = "Current X location of the cursor (as a tile offset by default)"] - #[doc = ""] +#[doc = "Current X location of the cursor (as a tile offset by default)"] +#[doc = ""] + pub cursorX: ::libc::c_int, - #[doc = "Current Y location of the cursor (as a tile offset by default)"] - #[doc = ""] +#[doc = "Current Y location of the cursor (as a tile offset by default)"] +#[doc = ""] + pub cursorY: ::libc::c_int, - #[doc = "Internal state"] - #[doc = ""] +#[doc = "Internal state"] +#[doc = ""] + pub prevCursorX: ::libc::c_int, - #[doc = "Internal state"] - #[doc = ""] +#[doc = "Internal state"] +#[doc = ""] + pub prevCursorY: ::libc::c_int, - #[doc = "Width of the console hardware layer in characters"] - #[doc = ""] +#[doc = "Width of the console hardware layer in characters"] +#[doc = ""] + pub consoleWidth: ::libc::c_int, - #[doc = "Height of the console hardware layer in characters"] - #[doc = ""] +#[doc = "Height of the console hardware layer in characters"] +#[doc = ""] + pub consoleHeight: ::libc::c_int, - #[doc = "Window X location in characters (not implemented)"] - #[doc = ""] +#[doc = "Window X location in characters (not implemented)"] +#[doc = ""] + pub windowX: ::libc::c_int, - #[doc = "Window Y location in characters (not implemented)"] - #[doc = ""] +#[doc = "Window Y location in characters (not implemented)"] +#[doc = ""] + pub windowY: ::libc::c_int, - #[doc = "Window width in characters (not implemented)"] - #[doc = ""] +#[doc = "Window width in characters (not implemented)"] +#[doc = ""] + pub windowWidth: ::libc::c_int, - #[doc = "Window height in characters (not implemented)"] - #[doc = ""] +#[doc = "Window height in characters (not implemented)"] +#[doc = ""] + pub windowHeight: ::libc::c_int, - #[doc = "Size of a tab"] - #[doc = ""] +#[doc = "Size of a tab"] +#[doc = ""] + pub tabSize: ::libc::c_int, - #[doc = "Foreground color"] - #[doc = ""] +#[doc = "Foreground color"] +#[doc = ""] + pub fg: u16_, - #[doc = "Background color"] - #[doc = ""] +#[doc = "Background color"] +#[doc = ""] + pub bg: u16_, - #[doc = "Reverse/bright flags"] - #[doc = ""] +#[doc = "Reverse/bright flags"] +#[doc = ""] + pub flags: ::libc::c_int, - #[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] - #[doc = ""] +#[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] +#[doc = ""] + pub PrintChar: ConsolePrint, - #[doc = "True if the console is initialized"] - #[doc = ""] +#[doc = "True if the console is initialized"] +#[doc = ""] + pub consoleInitialised: bool, } impl Default for PrintConsole { @@ -6843,41 +7027,43 @@ impl Default for PrintConsole { #[doc = "Swallows prints to stderr"] #[doc = ""] + pub const debugDevice_NULL: debugDevice = 0; #[doc = "Outputs stderr debug statements using svcOutputDebugString, which can then be captured by interactive debuggers"] #[doc = ""] + pub const debugDevice_SVC: debugDevice = 1; #[doc = "Directs stderr debug statements to 3DS console window"] #[doc = ""] + pub const debugDevice_CONSOLE: debugDevice = 2; pub const debugDevice_3DMOO: debugDevice = 1; #[doc = "Console debug devices supported by libnds."] #[doc = ""] + pub type debugDevice = ::libc::c_uint; extern "C" { - #[doc = "Loads the font into the console."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `console` - Pointer to the console to update, if NULL it will update the current console."] - #[doc = "* `font` - The font to load."] - #[doc = ""] +#[doc = "Loads the font into the console."] +#[doc = "# Arguments"] +#[doc = "`console` - Pointer to the console to update, if NULL it will update the current console."] +#[doc = "`font` - The font to load."] +#[doc = ""] + pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont); } extern "C" { - #[doc = "Sets the print window."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `console` - Console to set, if NULL it will set the current console window."] - #[doc = "* `x` - X location of the window."] - #[doc = "* `y` - Y location of the window."] - #[doc = "* `width` - Width of the window."] - #[doc = "* `height` - Height of the window."] - #[doc = ""] +#[doc = "Sets the print window."] +#[doc = "# Arguments"] +#[doc = "`console` - Console to set, if NULL it will set the current console window."] +#[doc = "`x` - X location of the window."] +#[doc = "`y` - Y location of the window."] +#[doc = "`width` - Width of the window."] +#[doc = "`height` - Height of the window."] +#[doc = ""] + pub fn consoleSetWindow( console: *mut PrintConsole, x: ::libc::c_int, @@ -6887,84 +7073,77 @@ extern "C" { ); } extern "C" { - #[doc = "Gets a pointer to the console with the default values."] - #[doc = ""] - #[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the console with the default values."] - #[doc = ""] +#[doc = "Gets a pointer to the console with the default values."] +#[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] +#[doc = "Returns:"] +#[doc = "A pointer to the console with the default values."] +#[doc = ""] + pub fn consoleGetDefault() -> *mut PrintConsole; } extern "C" { - #[doc = "Make the specified console the render target."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the previous console."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console))."] - #[doc = ""] +#[doc = "Make the specified console the render target."] +#[doc = "Returns:"] +#[doc = "A pointer to the previous console."] +#[doc = "# Arguments"] +#[doc = "`console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsoleconsole))."] +#[doc = ""] + pub fn consoleSelect(console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { - #[doc = "Initialise the console."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current console."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - The screen to use for the console."] - #[doc = "* `console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] - #[doc = ""] +#[doc = "Initialise the console."] +#[doc = "Returns:"] +#[doc = "A pointer to the current console."] +#[doc = "# Arguments"] +#[doc = "`screen` - The screen to use for the console."] +#[doc = "`console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] +#[doc = ""] + pub fn consoleInit(screen: gfxScreen_t, console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { - #[doc = "Initializes debug console output on stderr to the specified device."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `device` - The debug device (or devices) to output debug print statements to."] - #[doc = ""] +#[doc = "Initializes debug console output on stderr to the specified device."] +#[doc = "# Arguments"] +#[doc = "`device` - The debug device (or devices) to output debug print statements to."] +#[doc = ""] + pub fn consoleDebugInit(device: debugDevice); } extern "C" { - #[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] - #[doc = ""] +#[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] +#[doc = ""] + pub fn consoleClear(); } #[doc = "Use APT workaround."] #[doc = ""] + pub const RUNFLAG_APTWORKAROUND: _bindgen_ty_9 = 1; #[doc = "Reinitialize APT."] #[doc = ""] + pub const RUNFLAG_APTREINIT: _bindgen_ty_9 = 2; #[doc = "Chainload APT on return."] #[doc = ""] + pub const RUNFLAG_APTCHAINLOAD: _bindgen_ty_9 = 4; #[doc = "System run-flags."] #[doc = ""] + pub type _bindgen_ty_9 = ::libc::c_uint; extern "C" { - #[doc = "Retrieves a handle from the environment handle list."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The retrieved handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Name of the handle."] - #[doc = ""] +#[doc = "Retrieves a handle from the environment handle list."] +#[doc = "Returns:"] +#[doc = "The retrieved handle."] +#[doc = "# Arguments"] +#[doc = "`name` - Name of the handle."] +#[doc = ""] + pub fn envGetHandle(name: *const ::libc::c_char) -> Handle; } pub type _off_t = __int64_t; @@ -7165,73 +7344,91 @@ pub struct pthread_once_t { #[doc = "Dummy compression"] #[doc = ""] + pub const DECOMPRESS_DUMMY: decompressType = 0; #[doc = "LZSS/LZ10 compression"] #[doc = ""] + pub const DECOMPRESS_LZSS: decompressType = 16; #[doc = "LZSS/LZ10 compression"] #[doc = ""] + pub const DECOMPRESS_LZ10: decompressType = 16; #[doc = "LZ11 compression"] #[doc = ""] + pub const DECOMPRESS_LZ11: decompressType = 17; #[doc = "Huffman compression with 1-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF1: decompressType = 33; #[doc = "Huffman compression with 2-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF2: decompressType = 34; #[doc = "Huffman compression with 3-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF3: decompressType = 35; #[doc = "Huffman compression with 4-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF4: decompressType = 36; #[doc = "Huffman compression with 5-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF5: decompressType = 37; #[doc = "Huffman compression with 6-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF6: decompressType = 38; #[doc = "Huffman compression with 7-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF7: decompressType = 39; #[doc = "Huffman compression with 8-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF8: decompressType = 40; #[doc = "Huffman compression with 8-bit data"] #[doc = ""] + pub const DECOMPRESS_HUFF: decompressType = 40; #[doc = "Run-length encoding compression"] #[doc = ""] + pub const DECOMPRESS_RLE: decompressType = 48; #[doc = "Compression types"] #[doc = ""] + pub type decompressType = ::libc::c_uint; #[doc = "I/O vector"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct decompressIOVec { - #[doc = "I/O buffer"] - #[doc = ""] +#[doc = "I/O buffer"] +#[doc = ""] + pub data: *mut ::libc::c_void, - #[doc = "Buffer size"] - #[doc = ""] +#[doc = "Buffer size"] +#[doc = ""] + pub size: size_t, } impl Default for decompressIOVec { @@ -7246,6 +7443,7 @@ impl Default for decompressIOVec { #[doc = "Data callback"] #[doc = ""] + pub type decompressCallback = ::core::option::Option< unsafe extern "C" fn( userdata: *mut ::libc::c_void, @@ -7254,18 +7452,15 @@ pub type decompressCallback = ::core::option::Option< ) -> ssize_t, >; extern "C" { - #[doc = "Decompression callback for file descriptors"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Number of bytes read"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `userdata` - Address of file descriptor [Direction: In]"] - #[doc = "* `buffer` - Buffer to write into [Direction: In]"] - #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] - #[doc = ""] +#[doc = "Decompression callback for file descriptors"] +#[doc = "Returns:"] +#[doc = "Number of bytes read"] +#[doc = "# Arguments"] +#[doc = "`userdata` - Address of file descriptor [Direction: In]"] +#[doc = "`buffer` - Buffer to write into [Direction: In]"] +#[doc = "`size` - Size to read from file descriptor [Direction: In]"] +#[doc = ""] + pub fn decompressCallback_FD( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -7273,18 +7468,15 @@ extern "C" { ) -> ssize_t; } extern "C" { - #[doc = "Decompression callback for stdio FILE*"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Number of bytes read"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `userdata` - FILE* [Direction: In]"] - #[doc = "* `buffer` - Buffer to write into [Direction: In]"] - #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] - #[doc = ""] +#[doc = "Decompression callback for stdio FILE*"] +#[doc = "Returns:"] +#[doc = "Number of bytes read"] +#[doc = "# Arguments"] +#[doc = "`userdata` - FILE[Direction: In]"] +#[doc = "`buffer` - Buffer to write into [Direction: In]"] +#[doc = "`size` - Size to read from file descriptor [Direction: In]"] +#[doc = ""] + pub fn decompressCallback_Stdio( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -7292,23 +7484,19 @@ extern "C" { ) -> ssize_t; } extern "C" { - #[doc = "Decode decompression header"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Bytes consumed"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `type` - Decompression type [Direction: In, Out]"] - #[doc = "* `size` - Decompressed size [Direction: In, Out]"] - #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] - #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] - #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - #[doc = ""] - #[doc = "# Return values"] - #[doc = "* -1 error"] - #[doc = ""] +#[doc = "Decode decompression header"] +#[doc = "Returns:"] +#[doc = "Bytes consumed"] +#[doc = "# Arguments"] +#[doc = "`type` - Decompression type [Direction: In, Out]"] +#[doc = "`size` - Decompressed size [Direction: In, Out]"] +#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] +#[doc = "# Return values"] +#[doc = "-1 error"] +#[doc = ""] + pub fn decompressHeader( type_: *mut decompressType, size: *mut size_t, @@ -7318,28 +7506,22 @@ extern "C" { ) -> ssize_t; } extern "C" { - #[doc = "Decompress data"] - #[doc = ""] - #[doc = "and insize is the size of that data. If callback is not null,"] - #[doc = "userdata is passed to callback to fetch more data, and insize is"] - #[doc = "unused."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether succeeded"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `iov` - Output vector [Direction: In]"] - #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] - #[doc = "* `callback` - Data callback (see note) [Direction: In]"] - #[doc = "* `userdata` - User data passed to callback (see note) [Direction: In]"] - #[doc = "* `insize` - Size of userdata (see note) [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* If callback is null, userdata is a pointer to memory to read from,"] - #[doc = ""] +#[doc = "Decompress data"] +#[doc = "and insize is the size of that data. If callback is not null,"] +#[doc = "userdata is passed to callback to fetch more data, and insize is"] +#[doc = "unused."] +#[doc = "Returns:"] +#[doc = "Whether succeeded"] +#[doc = "# Arguments"] +#[doc = "`iov` - Output vector [Direction: In]"] +#[doc = "`iovcnt` - Number of buffers [Direction: In]"] +#[doc = "`callback` - Data callback (see note) [Direction: In]"] +#[doc = "`userdata` - User data passed to callback (see note) [Direction: In]"] +#[doc = "`insize` - Size of userdata (see note) [Direction: In]"] +#[doc = "# Notes"] +#[doc = "If callback is null, userdata is a pointer to memory to read from,"] +#[doc = ""] + pub fn decompressV( iov: *const decompressIOVec, iovcnt: size_t, @@ -7349,20 +7531,17 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress LZSS/LZ10"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether succeeded"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `iov` - Output vector [Direction: In]"] - #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] - #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] - #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] - #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - #[doc = ""] +#[doc = "Decompress LZSS/LZ10"] +#[doc = "Returns:"] +#[doc = "Whether succeeded"] +#[doc = "# Arguments"] +#[doc = "`iov` - Output vector [Direction: In]"] +#[doc = "`iovcnt` - Number of buffers [Direction: In]"] +#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] +#[doc = ""] + pub fn decompressV_LZSS( iov: *const decompressIOVec, iovcnt: size_t, @@ -7372,20 +7551,17 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress LZ11"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether succeeded"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `iov` - Output vector [Direction: In]"] - #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] - #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] - #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] - #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - #[doc = ""] +#[doc = "Decompress LZ11"] +#[doc = "Returns:"] +#[doc = "Whether succeeded"] +#[doc = "# Arguments"] +#[doc = "`iov` - Output vector [Direction: In]"] +#[doc = "`iovcnt` - Number of buffers [Direction: In]"] +#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] +#[doc = ""] + pub fn decompressV_LZ11( iov: *const decompressIOVec, iovcnt: size_t, @@ -7395,21 +7571,18 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress Huffman"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether succeeded"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bits` - Data size in bits (usually 4 or 8) [Direction: In]"] - #[doc = "* `iov` - Output vector [Direction: In]"] - #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] - #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] - #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] - #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - #[doc = ""] +#[doc = "Decompress Huffman"] +#[doc = "Returns:"] +#[doc = "Whether succeeded"] +#[doc = "# Arguments"] +#[doc = "`bits` - Data size in bits (usually 4 or 8) [Direction: In]"] +#[doc = "`iov` - Output vector [Direction: In]"] +#[doc = "`iovcnt` - Number of buffers [Direction: In]"] +#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] +#[doc = ""] + pub fn decompressV_Huff( bits: size_t, iov: *const decompressIOVec, @@ -7420,20 +7593,17 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Decompress run-length encoding"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether succeeded"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `iov` - Output vector [Direction: In]"] - #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] - #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] - #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] - #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] - #[doc = ""] +#[doc = "Decompress run-length encoding"] +#[doc = "Returns:"] +#[doc = "Whether succeeded"] +#[doc = "# Arguments"] +#[doc = "`iov` - Output vector [Direction: In]"] +#[doc = "`iovcnt` - Number of buffers [Direction: In]"] +#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] +#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] +#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] +#[doc = ""] + pub fn decompressV_RLE( iov: *const decompressIOVec, iovcnt: size_t, @@ -7443,313 +7613,241 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of input code units consumed"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output codepoint [Direction: In, Out]"] - #[doc = "* `in` - Input sequence [Direction: In]"] - #[doc = ""] +#[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] +#[doc = "Returns:"] +#[doc = "number of input code units consumed"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output codepoint [Direction: In, Out]"] +#[doc = "`in` - Input sequence [Direction: In]"] +#[doc = ""] + pub fn decode_utf8(out: *mut u32, in_: *const u8) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of input code units consumed"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output codepoint [Direction: In, Out]"] - #[doc = "* `in` - Input sequence [Direction: In]"] - #[doc = ""] +#[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] +#[doc = "Returns:"] +#[doc = "number of input code units consumed"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output codepoint [Direction: In, Out]"] +#[doc = "`in` - Input sequence [Direction: In]"] +#[doc = ""] + pub fn decode_utf16(out: *mut u32, in_: *const u16) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input codepoint [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out must be able to store 4 code units"] - #[doc = ""] +#[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input codepoint [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn encode_utf8(out: *mut u8, in_: u32) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input codepoint [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out must be able to store 2 code units"] - #[doc = ""] +#[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input codepoint [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn encode_utf16(out: *mut u16, in_: u32) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] - #[doc = "* `len` - Output length [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out is not null-terminated"] - #[doc = ""] +#[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "`len` - Output length [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] - #[doc = "* `len` - Output length [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out is not null-terminated"] - #[doc = ""] +#[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "`len` - Output length [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] - #[doc = "* `len` - Output length [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out is not null-terminated"] - #[doc = ""] +#[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "`len` - Output length [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] - #[doc = "* `len` - Output length [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out is not null-terminated"] - #[doc = ""] +#[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "`len` - Output length [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] - #[doc = "Fills the output buffer up to \\a len code units."] - #[doc = "Returns the number of code units that the input would produce;"] - #[doc = "if it returns greater than \\a len, the output has been"] - #[doc = "truncated."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] - #[doc = "* `len` - Output length [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out is not null-terminated"] - #[doc = ""] +#[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] +#[doc = "Fills the output buffer up to \\a len code units."] +#[doc = "Returns the number of code units that the input would produce;"] +#[doc = "if it returns greater than \\a len, the output has been"] +#[doc = "truncated."] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "`len` - Output length [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* number of output code units produced"] - #[doc = "* -1 for error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output sequence [Direction: In, Out]"] - #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] - #[doc = "* `len` - Output length [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* \\a out is not null-terminated"] - #[doc = ""] +#[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] +#[doc = "Returns:"] +#[doc = "number of output code units produced"] +#[doc = "-1 for error"] +#[doc = "# Arguments"] +#[doc = "`out` - Output sequence [Direction: In, Out]"] +#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] +#[doc = "`len` - Output length [Direction: In]"] +#[doc = "# Notes"] +#[doc = ""] + pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { - #[doc = "Allocates a 0x80-byte aligned buffer."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The allocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = ""] +#[doc = "Allocates a 0x80-byte aligned buffer."] +#[doc = "Returns:"] +#[doc = "The allocated buffer."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = ""] + pub fn linearAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a buffer aligned to the given size."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The allocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = "* `alignment` - Alignment to use."] - #[doc = ""] +#[doc = "Allocates a buffer aligned to the given size."] +#[doc = "Returns:"] +#[doc = "The allocated buffer."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = "`alignment` - Alignment to use."] +#[doc = ""] + pub fn linearMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Reallocates a buffer."] - #[doc = ""] - #[doc = "Note: Not implemented yet."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The reallocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mem` - Buffer to reallocate."] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = ""] +#[doc = "Reallocates a buffer."] +#[doc = "Note: Not implemented yet."] +#[doc = "Returns:"] +#[doc = "The reallocated buffer."] +#[doc = "# Arguments"] +#[doc = "`mem` - Buffer to reallocate."] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = ""] + pub fn linearRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Retrieves the allocated size of a buffer."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The size of the buffer."] - #[doc = ""] +#[doc = "Retrieves the allocated size of a buffer."] +#[doc = "Returns:"] +#[doc = "The size of the buffer."] +#[doc = ""] + pub fn linearGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { - #[doc = "Frees a buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mem` - Buffer to free."] - #[doc = ""] +#[doc = "Frees a buffer."] +#[doc = "# Arguments"] +#[doc = "`mem` - Buffer to free."] +#[doc = ""] + pub fn linearFree(mem: *mut ::libc::c_void); } extern "C" { - #[doc = "Gets the current linear free space."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current linear free space."] - #[doc = ""] +#[doc = "Gets the current linear free space."] +#[doc = "Returns:"] +#[doc = "The current linear free space."] +#[doc = ""] + pub fn linearSpaceFree() -> u32_; } extern "C" { - #[doc = "Initializes the mappable allocator."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `addrMin` - Minimum address."] - #[doc = "* `addrMax` - Maxium address."] - #[doc = ""] +#[doc = "Initializes the mappable allocator."] +#[doc = "# Arguments"] +#[doc = "`addrMin` - Minimum address."] +#[doc = "`addrMax` - Maxium address."] +#[doc = ""] + pub fn mappableInit(addrMin: u32_, addrMax: u32_); } extern "C" { - #[doc = "Finds a mappable memory area."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The mappable area."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the area to find."] - #[doc = ""] +#[doc = "Finds a mappable memory area."] +#[doc = "Returns:"] +#[doc = "The mappable area."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the area to find."] +#[doc = ""] + pub fn mappableAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Frees a mappable area (stubbed)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mem` - Mappable area to free."] - #[doc = ""] +#[doc = "Frees a mappable area (stubbed)."] +#[doc = "# Arguments"] +#[doc = "`mem` - Mappable area to free."] +#[doc = ""] + pub fn mappableFree(mem: *mut ::libc::c_void); } pub const VRAM_ALLOC_A: vramAllocPos = 1; @@ -7757,59 +7855,47 @@ pub const VRAM_ALLOC_B: vramAllocPos = 2; pub const VRAM_ALLOC_ANY: vramAllocPos = 3; pub type vramAllocPos = ::libc::c_uint; extern "C" { - #[doc = "Allocates a 0x80-byte aligned buffer."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The allocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = ""] +#[doc = "Allocates a 0x80-byte aligned buffer."] +#[doc = "Returns:"] +#[doc = "The allocated buffer."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = ""] + pub fn vramAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The allocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = "* `pos` - VRAM bank to use (see [`vramAllocPos)`]"] - #[doc = ""] +#[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] +#[doc = "Returns:"] +#[doc = "The allocated buffer."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = "`pos` - VRAM bank to use (see [`vramAllocPos)`]"] +#[doc = ""] + pub fn vramAllocAt(size: size_t, pos: vramAllocPos) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a buffer aligned to the given size."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The allocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = "* `alignment` - Alignment to use."] - #[doc = ""] +#[doc = "Allocates a buffer aligned to the given size."] +#[doc = "Returns:"] +#[doc = "The allocated buffer."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = "`alignment` - Alignment to use."] +#[doc = ""] + pub fn vramMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The allocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = "* `alignment` - Alignment to use."] - #[doc = "* `pos` - VRAM bank to use (see [`vramAllocPos)`]"] - #[doc = ""] +#[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] +#[doc = "Returns:"] +#[doc = "The allocated buffer."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = "`alignment` - Alignment to use."] +#[doc = "`pos` - VRAM bank to use (see [`vramAllocPos)`]"] +#[doc = ""] + pub fn vramMemAlignAt( size: size_t, alignment: size_t, @@ -7817,86 +7903,89 @@ extern "C" { ) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Reallocates a buffer."] - #[doc = ""] - #[doc = "Note: Not implemented yet."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The reallocated buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mem` - Buffer to reallocate."] - #[doc = "* `size` - Size of the buffer to allocate."] - #[doc = ""] +#[doc = "Reallocates a buffer."] +#[doc = "Note: Not implemented yet."] +#[doc = "Returns:"] +#[doc = "The reallocated buffer."] +#[doc = "# Arguments"] +#[doc = "`mem` - Buffer to reallocate."] +#[doc = "`size` - Size of the buffer to allocate."] +#[doc = ""] + pub fn vramRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { - #[doc = "Retrieves the allocated size of a buffer."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The size of the buffer."] - #[doc = ""] +#[doc = "Retrieves the allocated size of a buffer."] +#[doc = "Returns:"] +#[doc = "The size of the buffer."] +#[doc = ""] + pub fn vramGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { - #[doc = "Frees a buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mem` - Buffer to free."] - #[doc = ""] +#[doc = "Frees a buffer."] +#[doc = "# Arguments"] +#[doc = "`mem` - Buffer to free."] +#[doc = ""] + pub fn vramFree(mem: *mut ::libc::c_void); } extern "C" { - #[doc = "Gets the current VRAM free space."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current VRAM free space."] - #[doc = ""] +#[doc = "Gets the current VRAM free space."] +#[doc = "Returns:"] +#[doc = "The current VRAM free space."] +#[doc = ""] + pub fn vramSpaceFree() -> u32_; } #[doc = "Open authentication."] #[doc = ""] + pub const AC_OPEN: acSecurityMode = 0; #[doc = "WEP 40-bit authentication."] #[doc = ""] + pub const AC_WEP_40BIT: acSecurityMode = 1; #[doc = "WEP 104-bit authentication."] #[doc = ""] + pub const AC_WEP_104BIT: acSecurityMode = 2; #[doc = "WEP 128-bit authentication."] #[doc = ""] + pub const AC_WEP_128BIT: acSecurityMode = 3; #[doc = "WPA TKIP authentication."] #[doc = ""] + pub const AC_WPA_TKIP: acSecurityMode = 4; #[doc = "WPA2 TKIP authentication."] #[doc = ""] + pub const AC_WPA2_TKIP: acSecurityMode = 5; #[doc = "WPA AES authentication."] #[doc = ""] + pub const AC_WPA_AES: acSecurityMode = 6; #[doc = "WPA2 AES authentication."] #[doc = ""] + pub const AC_WPA2_AES: acSecurityMode = 7; #[doc = "Wifi security modes."] #[doc = ""] + pub type acSecurityMode = ::libc::c_uint; #[doc = "Struct to contain the data for connecting to a Wifi network from a stored slot."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct acuConfig { @@ -7913,530 +8002,604 @@ impl Default for acuConfig { } extern "C" { #[must_use] - #[doc = "Initializes AC."] - #[doc = ""] +#[doc = "Initializes AC."] +#[doc = ""] + pub fn acInit() -> Result; } extern "C" { - #[doc = "Exits AC."] - #[doc = ""] +#[doc = "Exits AC."] +#[doc = ""] + pub fn acExit(); } extern "C" { #[must_use] - #[doc = "Waits for the system to connect to the internet."] - #[doc = ""] +#[doc = "Waits for the system to connect to the internet."] +#[doc = ""] + pub fn acWaitInternetConnection() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi status."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] - #[doc = ""] +#[doc = "Gets the connected Wifi status."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] +#[doc = ""] + pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi status."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] - #[doc = ""] +#[doc = "Gets the connected Wifi status."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] +#[doc = ""] + pub fn ACU_GetStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi security mode."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] - #[doc = ""] +#[doc = "Gets the connected Wifi security mode."] +#[doc = "# Arguments"] +#[doc = "`mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] +#[doc = ""] + pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi SSID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `SSID` - Pointer to output the connected Wifi SSID to."] - #[doc = ""] +#[doc = "Gets the connected Wifi SSID."] +#[doc = "# Arguments"] +#[doc = "`SSID` - Pointer to output the connected Wifi SSID to."] +#[doc = ""] + pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected Wifi SSID length."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the connected Wifi SSID length to."] - #[doc = ""] +#[doc = "Gets the connected Wifi SSID length."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the connected Wifi SSID length to."] +#[doc = ""] + pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Determines whether proxy is enabled for the connected network."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Pointer to output the proxy status to."] - #[doc = ""] +#[doc = "Determines whether proxy is enabled for the connected network."] +#[doc = "# Arguments"] +#[doc = "`enable` - Pointer to output the proxy status to."] +#[doc = ""] + pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected network's proxy port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the proxy port to."] - #[doc = ""] +#[doc = "Gets the connected network's proxy port."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the proxy port to."] +#[doc = ""] + pub fn ACU_GetProxyPort(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected network's proxy username."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] - #[doc = ""] +#[doc = "Gets the connected network's proxy username."] +#[doc = "# Arguments"] +#[doc = "`username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] +#[doc = ""] + pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the connected network's proxy password."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] - #[doc = ""] +#[doc = "Gets the connected network's proxy password."] +#[doc = "# Arguments"] +#[doc = "`password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] +#[doc = ""] + pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the last error to occur during a connection."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `errorCode` - Pointer to output the error code to."] - #[doc = ""] +#[doc = "Gets the last error to occur during a connection."] +#[doc = "# Arguments"] +#[doc = "`errorCode` - Pointer to output the error code to."] +#[doc = ""] + pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the last detailed error to occur during a connection."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `errorCode` - Pointer to output the error code to."] - #[doc = ""] +#[doc = "Gets the last detailed error to occur during a connection."] +#[doc = "# Arguments"] +#[doc = "`errorCode` - Pointer to output the error code to."] +#[doc = ""] + pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares a buffer to hold the configuration data to start a connection."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to an acuConfig struct to contain the data."] - #[doc = ""] +#[doc = "Prepares a buffer to hold the configuration data to start a connection."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to an acuConfig struct to contain the data."] +#[doc = ""] + pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Sets something that makes the connection reliable."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - #[doc = "* `area` - Always 2 ?"] - #[doc = ""] +#[doc = "Sets something that makes the connection reliable."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = "`area` - Always 2 ?"] +#[doc = ""] + pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the slot to use when connecting."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - #[doc = "* `type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] - #[doc = ""] +#[doc = "Sets the slot to use when connecting."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = "`type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] +#[doc = ""] + pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets something that makes the connection reliable."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - #[doc = ""] +#[doc = "Sets something that makes the connection reliable."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = ""] + pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Starts the connection procedure."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] - #[doc = "* `connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] - #[doc = ""] +#[doc = "Starts the connection procedure."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] +#[doc = "`connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] +#[doc = ""] + pub fn ACU_ConnectAsync(config: *const acuConfig, connectionHandle: Handle) -> Result; } #[doc = "Open for reading."] #[doc = ""] + pub const FS_OPEN_READ: _bindgen_ty_10 = 1; #[doc = "Open for writing."] #[doc = ""] + pub const FS_OPEN_WRITE: _bindgen_ty_10 = 2; #[doc = "Create file."] #[doc = ""] + pub const FS_OPEN_CREATE: _bindgen_ty_10 = 4; #[doc = "Open flags."] #[doc = ""] + pub type _bindgen_ty_10 = ::libc::c_uint; #[doc = "Flush."] #[doc = ""] + pub const FS_WRITE_FLUSH: _bindgen_ty_11 = 1; #[doc = "Update file timestamp."] #[doc = ""] + pub const FS_WRITE_UPDATE_TIME: _bindgen_ty_11 = 256; #[doc = "Write flags."] #[doc = ""] + pub type _bindgen_ty_11 = ::libc::c_uint; #[doc = "Directory."] #[doc = ""] + pub const FS_ATTRIBUTE_DIRECTORY: _bindgen_ty_12 = 1; #[doc = "Hidden."] #[doc = ""] + pub const FS_ATTRIBUTE_HIDDEN: _bindgen_ty_12 = 256; #[doc = "Archive."] #[doc = ""] + pub const FS_ATTRIBUTE_ARCHIVE: _bindgen_ty_12 = 65536; #[doc = "Read-only."] #[doc = ""] + pub const FS_ATTRIBUTE_READ_ONLY: _bindgen_ty_12 = 16777216; #[doc = "Attribute flags."] #[doc = ""] + pub type _bindgen_ty_12 = ::libc::c_uint; #[doc = "NAND."] #[doc = ""] + pub const MEDIATYPE_NAND: FS_MediaType = 0; #[doc = "SD card."] #[doc = ""] + pub const MEDIATYPE_SD: FS_MediaType = 1; #[doc = "Game card."] #[doc = ""] + pub const MEDIATYPE_GAME_CARD: FS_MediaType = 2; #[doc = "Media types."] #[doc = ""] + pub type FS_MediaType = ::libc::c_uint; #[doc = "CTR NAND."] #[doc = ""] + pub const SYSTEM_MEDIATYPE_CTR_NAND: FS_SystemMediaType = 0; #[doc = "TWL NAND."] #[doc = ""] + pub const SYSTEM_MEDIATYPE_TWL_NAND: FS_SystemMediaType = 1; #[doc = "SD card."] #[doc = ""] + pub const SYSTEM_MEDIATYPE_SD: FS_SystemMediaType = 2; #[doc = "TWL Photo."] #[doc = ""] + pub const SYSTEM_MEDIATYPE_TWL_PHOTO: FS_SystemMediaType = 3; #[doc = "System media types."] #[doc = ""] + pub type FS_SystemMediaType = ::libc::c_uint; #[doc = "RomFS archive."] #[doc = ""] + pub const ARCHIVE_ROMFS: FS_ArchiveID = 3; #[doc = "Save data archive."] #[doc = ""] + pub const ARCHIVE_SAVEDATA: FS_ArchiveID = 4; #[doc = "Ext data archive."] #[doc = ""] + pub const ARCHIVE_EXTDATA: FS_ArchiveID = 6; #[doc = "Shared ext data archive."] #[doc = ""] + pub const ARCHIVE_SHARED_EXTDATA: FS_ArchiveID = 7; #[doc = "System save data archive."] #[doc = ""] + pub const ARCHIVE_SYSTEM_SAVEDATA: FS_ArchiveID = 8; #[doc = "SDMC archive."] #[doc = ""] + pub const ARCHIVE_SDMC: FS_ArchiveID = 9; #[doc = "Write-only SDMC archive."] #[doc = ""] + pub const ARCHIVE_SDMC_WRITE_ONLY: FS_ArchiveID = 10; #[doc = "BOSS ext data archive."] #[doc = ""] + pub const ARCHIVE_BOSS_EXTDATA: FS_ArchiveID = 305419896; #[doc = "Card SPI FS archive."] #[doc = ""] + pub const ARCHIVE_CARD_SPIFS: FS_ArchiveID = 305419897; #[doc = "Ext data and BOSS ext data archive."] #[doc = ""] + pub const ARCHIVE_EXTDATA_AND_BOSS_EXTDATA: FS_ArchiveID = 305419899; #[doc = "System save data archive."] #[doc = ""] + pub const ARCHIVE_SYSTEM_SAVEDATA2: FS_ArchiveID = 305419900; #[doc = "Read-write NAND archive."] #[doc = ""] + pub const ARCHIVE_NAND_RW: FS_ArchiveID = 305419901; #[doc = "Read-only NAND archive."] #[doc = ""] + pub const ARCHIVE_NAND_RO: FS_ArchiveID = 305419902; #[doc = "Read-only write access NAND archive."] #[doc = ""] + pub const ARCHIVE_NAND_RO_WRITE_ACCESS: FS_ArchiveID = 305419903; #[doc = "User save data and ExeFS/RomFS archive."] #[doc = ""] + pub const ARCHIVE_SAVEDATA_AND_CONTENT: FS_ArchiveID = 591751050; #[doc = "User save data and ExeFS/RomFS archive (only ExeFS for fs:LDR)."] #[doc = ""] + pub const ARCHIVE_SAVEDATA_AND_CONTENT2: FS_ArchiveID = 591751054; #[doc = "NAND CTR FS archive."] #[doc = ""] + pub const ARCHIVE_NAND_CTR_FS: FS_ArchiveID = 1450741931; #[doc = "TWL PHOTO archive."] #[doc = ""] + pub const ARCHIVE_TWL_PHOTO: FS_ArchiveID = 1450741932; #[doc = "TWL SOUND archive."] #[doc = ""] + pub const ARCHIVE_TWL_SOUND: FS_ArchiveID = 1450741933; #[doc = "NAND TWL FS archive."] #[doc = ""] + pub const ARCHIVE_NAND_TWL_FS: FS_ArchiveID = 1450741934; #[doc = "NAND W FS archive."] #[doc = ""] + pub const ARCHIVE_NAND_W_FS: FS_ArchiveID = 1450741935; #[doc = "Game card save data archive."] #[doc = ""] + pub const ARCHIVE_GAMECARD_SAVEDATA: FS_ArchiveID = 1450741937; #[doc = "User save data archive."] #[doc = ""] + pub const ARCHIVE_USER_SAVEDATA: FS_ArchiveID = 1450741938; #[doc = "Demo save data archive."] #[doc = ""] + pub const ARCHIVE_DEMO_SAVEDATA: FS_ArchiveID = 1450741940; #[doc = "Archive IDs."] #[doc = ""] + pub type FS_ArchiveID = ::libc::c_uint; #[doc = "Invalid path."] #[doc = ""] + pub const PATH_INVALID: FS_PathType = 0; #[doc = "Empty path."] #[doc = ""] + pub const PATH_EMPTY: FS_PathType = 1; #[doc = "Binary path. Meaning is per-archive."] #[doc = ""] + pub const PATH_BINARY: FS_PathType = 2; #[doc = "ASCII text path."] #[doc = ""] + pub const PATH_ASCII: FS_PathType = 3; #[doc = "UTF-16 text path."] #[doc = ""] + pub const PATH_UTF16: FS_PathType = 4; #[doc = "Path types."] #[doc = ""] + pub type FS_PathType = ::libc::c_uint; #[doc = "SD application."] #[doc = ""] + pub const SECUREVALUE_SLOT_SD: FS_SecureValueSlot = 4096; #[doc = "Secure value slot."] #[doc = ""] + pub type FS_SecureValueSlot = ::libc::c_uint; #[doc = "512KHz."] #[doc = ""] + pub const BAUDRATE_512KHZ: FS_CardSpiBaudRate = 0; #[doc = "1MHz."] #[doc = ""] + pub const BAUDRATE_1MHZ: FS_CardSpiBaudRate = 1; #[doc = "2MHz."] #[doc = ""] + pub const BAUDRATE_2MHZ: FS_CardSpiBaudRate = 2; #[doc = "4MHz."] #[doc = ""] + pub const BAUDRATE_4MHZ: FS_CardSpiBaudRate = 3; #[doc = "8MHz."] #[doc = ""] + pub const BAUDRATE_8MHZ: FS_CardSpiBaudRate = 4; #[doc = "16MHz."] #[doc = ""] + pub const BAUDRATE_16MHZ: FS_CardSpiBaudRate = 5; #[doc = "Card SPI baud rate."] #[doc = ""] + pub type FS_CardSpiBaudRate = ::libc::c_uint; #[doc = "1-bit."] #[doc = ""] + pub const BUSMODE_1BIT: FS_CardSpiBusMode = 0; #[doc = "4-bit."] #[doc = ""] + pub const BUSMODE_4BIT: FS_CardSpiBusMode = 1; #[doc = "Card SPI bus mode."] #[doc = ""] + pub type FS_CardSpiBusMode = ::libc::c_uint; #[doc = "Update."] #[doc = ""] + pub const SPECIALCONTENT_UPDATE: FS_SpecialContentType = 1; #[doc = "Manual."] #[doc = ""] + pub const SPECIALCONTENT_MANUAL: FS_SpecialContentType = 2; #[doc = "DLP child."] #[doc = ""] + pub const SPECIALCONTENT_DLP_CHILD: FS_SpecialContentType = 3; #[doc = "Card SPI bus mode."] #[doc = ""] + pub type FS_SpecialContentType = ::libc::c_uint; #[doc = "CTR card."] #[doc = ""] + pub const CARD_CTR: FS_CardType = 0; #[doc = "TWL card."] #[doc = ""] + pub const CARD_TWL: FS_CardType = 1; pub type FS_CardType = ::libc::c_uint; pub const FS_ACTION_UNKNOWN: FS_Action = 0; #[doc = "FS control actions."] #[doc = ""] + pub type FS_Action = ::libc::c_uint; #[doc = "Commits save data changes. No inputs/outputs."] #[doc = ""] + pub const ARCHIVE_ACTION_COMMIT_SAVE_DATA: FS_ArchiveAction = 0; #[doc = "Retrieves a file's last-modified timestamp. In: \"u16*, UTF-16 Path\", Out: \"u64, Time Stamp\"."] #[doc = ""] + pub const ARCHIVE_ACTION_GET_TIMESTAMP: FS_ArchiveAction = 1; pub const ARCHIVE_ACTION_UNKNOWN: FS_ArchiveAction = 30877; #[doc = "Archive control actions."] #[doc = ""] + pub type FS_ArchiveAction = ::libc::c_uint; #[doc = "Deletes a save's secure value. In: \"u64, ((SecureValueSlot <32) | (TitleUniqueId <8) | TitleVariation)\", Out: \"u8, Value Existed\""] #[doc = ""] + pub const SECURESAVE_ACTION_DELETE: FS_SecureSaveAction = 0; #[doc = "Formats a save. No inputs/outputs."] #[doc = ""] + pub const SECURESAVE_ACTION_FORMAT: FS_SecureSaveAction = 1; #[doc = "Secure save control actions."] #[doc = ""] + pub type FS_SecureSaveAction = ::libc::c_uint; pub const FILE_ACTION_UNKNOWN: FS_FileAction = 0; #[doc = "File control actions."] #[doc = ""] + pub type FS_FileAction = ::libc::c_uint; pub const DIRECTORY_ACTION_UNKNOWN: FS_DirectoryAction = 0; #[doc = "Directory control actions."] #[doc = ""] + pub type FS_DirectoryAction = ::libc::c_uint; #[doc = "Directory entry."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_DirectoryEntry { - #[doc = "UTF-16 directory name."] - #[doc = ""] +#[doc = "UTF-16 directory name."] +#[doc = ""] + pub name: [u16_; 262usize], - #[doc = "File name."] - #[doc = ""] +#[doc = "File name."] +#[doc = ""] + pub shortName: [::libc::c_char; 10usize], - #[doc = "File extension."] - #[doc = ""] +#[doc = "File extension."] +#[doc = ""] + pub shortExt: [::libc::c_char; 4usize], - #[doc = "Valid flag. (Always 1)"] - #[doc = ""] +#[doc = "Valid flag. (Always 1)"] +#[doc = ""] + pub valid: u8_, - #[doc = "Reserved."] - #[doc = ""] +#[doc = "Reserved."] +#[doc = ""] + pub reserved: u8_, - #[doc = "Attributes."] - #[doc = ""] +#[doc = "Attributes."] +#[doc = ""] + pub attributes: u32_, - #[doc = "File size."] - #[doc = ""] +#[doc = "File size."] +#[doc = ""] + pub fileSize: u64_, } impl Default for FS_DirectoryEntry { @@ -8450,34 +8613,42 @@ impl Default for FS_DirectoryEntry { } #[doc = "Archive resource information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ArchiveResource { - #[doc = "Size of each sector, in bytes."] - #[doc = ""] +#[doc = "Size of each sector, in bytes."] +#[doc = ""] + pub sectorSize: u32_, - #[doc = "Size of each cluster, in bytes."] - #[doc = ""] +#[doc = "Size of each cluster, in bytes."] +#[doc = ""] + pub clusterSize: u32_, - #[doc = "Total number of clusters."] - #[doc = ""] +#[doc = "Total number of clusters."] +#[doc = ""] + pub totalClusters: u32_, - #[doc = "Number of free clusters."] - #[doc = ""] +#[doc = "Number of free clusters."] +#[doc = ""] + pub freeClusters: u32_, } #[doc = "Program information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_ProgramInfo { - #[doc = "Program ID."] - #[doc = ""] +#[doc = "Program ID."] +#[doc = ""] + pub programId: u64_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Padding."] - #[doc = ""] +#[doc = "Padding."] +#[doc = ""] + pub padding: [u8_; 7usize], } impl Default for FS_ProgramInfo { @@ -8513,29 +8684,36 @@ impl FS_ProgramInfo { } #[doc = "Product information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ProductInfo { - #[doc = "Product code."] - #[doc = ""] +#[doc = "Product code."] +#[doc = ""] + pub productCode: [::libc::c_char; 16usize], - #[doc = "Company code."] - #[doc = ""] +#[doc = "Company code."] +#[doc = ""] + pub companyCode: [::libc::c_char; 2usize], - #[doc = "Remaster version."] - #[doc = ""] +#[doc = "Remaster version."] +#[doc = ""] + pub remasterVersion: u16_, } #[doc = "Integrity verification seed."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_IntegrityVerificationSeed { - #[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] - #[doc = ""] +#[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] +#[doc = ""] + pub aesCbcMac: [u8_; 16usize], - #[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] - #[doc = ""] +#[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] +#[doc = ""] + pub movableSed: [u8_; 288usize], } impl Default for FS_IntegrityVerificationSeed { @@ -8549,22 +8727,27 @@ impl Default for FS_IntegrityVerificationSeed { } #[doc = "Ext save data information."] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct FS_ExtSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unknown: u8_, - #[doc = "Reserved."] - #[doc = ""] +#[doc = "Reserved."] +#[doc = ""] + pub reserved1: u16_, - #[doc = "Save ID."] - #[doc = ""] +#[doc = "Save ID."] +#[doc = ""] + pub saveId: u64_, - #[doc = "Reserved."] - #[doc = ""] +#[doc = "Reserved."] +#[doc = ""] + pub reserved2: u32_, } impl Default for FS_ExtSaveDataInfo { @@ -8600,19 +8783,23 @@ impl FS_ExtSaveDataInfo { } #[doc = "System save data information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_SystemSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unknown: u8_, - #[doc = "Reserved."] - #[doc = ""] +#[doc = "Reserved."] +#[doc = ""] + pub reserved: u16_, - #[doc = "Save ID."] - #[doc = ""] +#[doc = "Save ID."] +#[doc = ""] + pub saveId: u32_, } impl Default for FS_SystemSaveDataInfo { @@ -8648,29 +8835,36 @@ impl FS_SystemSaveDataInfo { } #[doc = "Device move context."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_DeviceMoveContext { - #[doc = "IVs."] - #[doc = ""] +#[doc = "IVs."] +#[doc = ""] + pub ivs: [u8_; 16usize], - #[doc = "Encrypt parameter."] - #[doc = ""] +#[doc = "Encrypt parameter."] +#[doc = ""] + pub encryptParameter: [u8_; 16usize], } #[doc = "Filesystem path data, detailing the specific target of an operation."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_Path { - #[doc = "FS path type."] - #[doc = ""] +#[doc = "FS path type."] +#[doc = ""] + pub type_: FS_PathType, - #[doc = "FS path size."] - #[doc = ""] +#[doc = "FS path size."] +#[doc = ""] + pub size: u32_, - #[doc = "Pointer to FS path data."] - #[doc = ""] +#[doc = "Pointer to FS path data."] +#[doc = ""] + pub data: *const ::libc::c_void, } impl Default for FS_Path { @@ -8684,103 +8878,102 @@ impl Default for FS_Path { } #[doc = "SDMC/NAND speed information"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_SdMmcSpeedInfo { - #[doc = "Whether or not High Speed Mode is enabled."] - #[doc = ""] +#[doc = "Whether or not High Speed Mode is enabled."] +#[doc = ""] + pub highSpeedModeEnabled: bool, - #[doc = "Whether or not a clock divider of 2 is being used."] - #[doc = ""] +#[doc = "Whether or not a clock divider of 2 is being used."] +#[doc = ""] + pub usesHighestClockRate: bool, - #[doc = "The value of the SD_CLK_CTRL register."] - #[doc = ""] +#[doc = "The value of the SD_CLK_CTRL register."] +#[doc = ""] + pub sdClkCtrl: u16_, } #[doc = "Filesystem archive handle, providing access to a filesystem's contents."] #[doc = ""] + pub type FS_Archive = u64_; extern "C" { #[must_use] - #[doc = "Initializes FS."] - #[doc = ""] +#[doc = "Initializes FS."] +#[doc = ""] + pub fn fsInit() -> Result; } extern "C" { - #[doc = "Exits FS."] - #[doc = ""] +#[doc = "Exits FS."] +#[doc = ""] + pub fn fsExit(); } extern "C" { - #[doc = "Sets the FSUSER session to use in the current thread."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `session` - The handle of the FSUSER session to use."] - #[doc = ""] +#[doc = "Sets the FSUSER session to use in the current thread."] +#[doc = "# Arguments"] +#[doc = "`session` - The handle of the FSUSER session to use."] +#[doc = ""] + pub fn fsUseSession(session: Handle); } extern "C" { - #[doc = "Disables the FSUSER session override in the current thread."] - #[doc = ""] +#[doc = "Disables the FSUSER session override in the current thread."] +#[doc = ""] + pub fn fsEndUseSession(); } extern "C" { - #[doc = "Exempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] - #[doc = ""] - #[doc = "Instead, the archive will use the default FS session handle, opened with [`srvGetSessionHandle`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to exempt."] - #[doc = ""] +#[doc = "Exempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] +#[doc = "Instead, the archive will use the default FS session handle, opened with [`srvGetSessionHandle`]"] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to exempt."] +#[doc = ""] + pub fn fsExemptFromSession(archive: FS_Archive); } extern "C" { - #[doc = "Unexempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to remove from the exemption list."] - #[doc = ""] +#[doc = "Unexempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to remove from the exemption list."] +#[doc = ""] + pub fn fsUnexemptFromSession(archive: FS_Archive); } extern "C" { - #[doc = "Creates an FS_Path instance."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The created FS_Path instance."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `type` - Type of path."] - #[doc = "* `path` - Path to use."] - #[doc = ""] +#[doc = "Creates an FS_Path instance."] +#[doc = "Returns:"] +#[doc = "The created FS_Path instance."] +#[doc = "# Arguments"] +#[doc = "`type` - Type of path."] +#[doc = "`path` - Path to use."] +#[doc = ""] + pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void) -> FS_Path; } extern "C" { - #[doc = "Gets the current FS session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current FS session handle."] - #[doc = ""] +#[doc = "Gets the current FS session handle."] +#[doc = "Returns:"] +#[doc = "The current FS session handle."] +#[doc = ""] + pub fn fsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Performs a control operation on the filesystem."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `action` - Action to perform."] - #[doc = "* `input` - Buffer to read input from."] - #[doc = "* `inputSize` - Size of the input."] - #[doc = "* `output` - Buffer to write output to."] - #[doc = "* `outputSize` - Size of the output."] - #[doc = ""] +#[doc = "Performs a control operation on the filesystem."] +#[doc = "# Arguments"] +#[doc = "`action` - Action to perform."] +#[doc = "`input` - Buffer to read input from."] +#[doc = "`inputSize` - Size of the input."] +#[doc = "`output` - Buffer to write output to."] +#[doc = "`outputSize` - Size of the output."] +#[doc = ""] + pub fn FSUSER_Control( action: FS_Action, input: *mut ::libc::c_void, @@ -8791,26 +8984,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes a FSUSER session."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `session` - The handle of the FSUSER session to initialize."] - #[doc = ""] +#[doc = "Initializes a FSUSER session."] +#[doc = "# Arguments"] +#[doc = "`session` - The handle of the FSUSER session to initialize."] +#[doc = ""] + pub fn FSUSER_Initialize(session: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Opens a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the file handle to."] - #[doc = "* `archive` - Archive containing the file."] - #[doc = "* `path` - Path of the file."] - #[doc = "* `openFlags` - Flags to open the file with."] - #[doc = "* `attributes` - Attributes of the file."] - #[doc = ""] +#[doc = "Opens a file."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the file handle to."] +#[doc = "`archive` - Archive containing the file."] +#[doc = "`path` - Path of the file."] +#[doc = "`openFlags` - Flags to open the file with."] +#[doc = "`attributes` - Attributes of the file."] +#[doc = ""] + pub fn FSUSER_OpenFile( out: *mut Handle, archive: FS_Archive, @@ -8821,17 +9012,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the file handle to."] - #[doc = "* `archiveId` - ID of the archive containing the file."] - #[doc = "* `archivePath` - Path of the archive containing the file."] - #[doc = "* `filePath` - Path of the file."] - #[doc = "* `openFlags` - Flags to open the file with."] - #[doc = "* `attributes` - Attributes of the file."] - #[doc = ""] +#[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the file handle to."] +#[doc = "`archiveId` - ID of the archive containing the file."] +#[doc = "`archivePath` - Path of the archive containing the file."] +#[doc = "`filePath` - Path of the file."] +#[doc = "`openFlags` - Flags to open the file with."] +#[doc = "`attributes` - Attributes of the file."] +#[doc = ""] + pub fn FSUSER_OpenFileDirectly( out: *mut Handle, archiveId: FS_ArchiveID, @@ -8843,26 +9033,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive containing the file."] - #[doc = "* `path` - Path of the file."] - #[doc = ""] +#[doc = "Deletes a file."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive containing the file."] +#[doc = "`path` - Path of the file."] +#[doc = ""] + pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Renames a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `srcArchive` - Archive containing the source file."] - #[doc = "* `srcPath` - Path of the source file."] - #[doc = "* `dstArchive` - Archive containing the destination file."] - #[doc = "* `dstPath` - Path of the destination file."] - #[doc = ""] +#[doc = "Renames a file."] +#[doc = "# Arguments"] +#[doc = "`srcArchive` - Archive containing the source file."] +#[doc = "`srcPath` - Path of the source file."] +#[doc = "`dstArchive` - Archive containing the destination file."] +#[doc = "`dstPath` - Path of the destination file."] +#[doc = ""] + pub fn FSUSER_RenameFile( srcArchive: FS_Archive, srcPath: FS_Path, @@ -8872,37 +9060,34 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a directory, failing if it is not empty."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive containing the directory."] - #[doc = "* `path` - Path of the directory."] - #[doc = ""] +#[doc = "Deletes a directory, failing if it is not empty."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive containing the directory."] +#[doc = "`path` - Path of the directory."] +#[doc = ""] + pub fn FSUSER_DeleteDirectory(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a directory, also deleting its contents."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive containing the directory."] - #[doc = "* `path` - Path of the directory."] - #[doc = ""] +#[doc = "Deletes a directory, also deleting its contents."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive containing the directory."] +#[doc = "`path` - Path of the directory."] +#[doc = ""] + pub fn FSUSER_DeleteDirectoryRecursively(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to create the file in."] - #[doc = "* `path` - Path of the file."] - #[doc = "* `attributes` - Attributes of the file."] - #[doc = "* `fileSize` - Size of the file."] - #[doc = ""] +#[doc = "Creates a file."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to create the file in."] +#[doc = "`path` - Path of the file."] +#[doc = "`attributes` - Attributes of the file."] +#[doc = "`fileSize` - Size of the file."] +#[doc = ""] + pub fn FSUSER_CreateFile( archive: FS_Archive, path: FS_Path, @@ -8912,27 +9097,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a directory"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to create the directory in."] - #[doc = "* `path` - Path of the directory."] - #[doc = "* `attributes` - Attributes of the directory."] - #[doc = ""] +#[doc = "Creates a directory"] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to create the directory in."] +#[doc = "`path` - Path of the directory."] +#[doc = "`attributes` - Attributes of the directory."] +#[doc = ""] + pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Renames a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `srcArchive` - Archive containing the source directory."] - #[doc = "* `srcPath` - Path of the source directory."] - #[doc = "* `dstArchive` - Archive containing the destination directory."] - #[doc = "* `dstPath` - Path of the destination directory."] - #[doc = ""] +#[doc = "Renames a directory."] +#[doc = "# Arguments"] +#[doc = "`srcArchive` - Archive containing the source directory."] +#[doc = "`srcPath` - Path of the source directory."] +#[doc = "`dstArchive` - Archive containing the destination directory."] +#[doc = "`dstPath` - Path of the destination directory."] +#[doc = ""] + pub fn FSUSER_RenameDirectory( srcArchive: FS_Archive, srcPath: FS_Path, @@ -8942,41 +9125,38 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the directory handle to."] - #[doc = "* `archive` - Archive containing the directory."] - #[doc = "* `path` - Path of the directory."] - #[doc = ""] +#[doc = "Opens a directory."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the directory handle to."] +#[doc = "`archive` - Archive containing the directory."] +#[doc = "`path` - Path of the directory."] +#[doc = ""] + pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Opens an archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Pointer to output the opened archive to."] - #[doc = "* `id` - ID of the archive."] - #[doc = "* `path` - Path of the archive."] - #[doc = ""] +#[doc = "Opens an archive."] +#[doc = "# Arguments"] +#[doc = "`archive` - Pointer to output the opened archive to."] +#[doc = "`id` - ID of the archive."] +#[doc = "`path` - Path of the archive."] +#[doc = ""] + pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Performs a control operation on an archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to control."] - #[doc = "* `action` - Action to perform."] - #[doc = "* `input` - Buffer to read input from."] - #[doc = "* `inputSize` - Size of the input."] - #[doc = "* `output` - Buffer to write output to."] - #[doc = "* `outputSize` - Size of the output."] - #[doc = ""] +#[doc = "Performs a control operation on an archive."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to control."] +#[doc = "`action` - Action to perform."] +#[doc = "`input` - Buffer to read input from."] +#[doc = "`inputSize` - Size of the input."] +#[doc = "`output` - Buffer to write output to."] +#[doc = "`outputSize` - Size of the output."] +#[doc = ""] + pub fn FSUSER_ControlArchive( archive: FS_Archive, action: FS_ArchiveAction, @@ -8988,232 +9168,213 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes an archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to close."] - #[doc = ""] +#[doc = "Closes an archive."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to close."] +#[doc = ""] + pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the number of free bytes within an archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `freeBytes` - Pointer to output the free bytes to."] - #[doc = "* `archive` - Archive to check."] - #[doc = ""] +#[doc = "Gets the number of free bytes within an archive."] +#[doc = "# Arguments"] +#[doc = "`freeBytes` - Pointer to output the free bytes to."] +#[doc = "`archive` - Archive to check."] +#[doc = ""] + pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the inserted card type."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `type` - Pointer to output the card type to."] - #[doc = ""] +#[doc = "Gets the inserted card type."] +#[doc = "# Arguments"] +#[doc = "`type` - Pointer to output the card type to."] +#[doc = ""] + pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC archive resource information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] - #[doc = ""] +#[doc = "Gets the SDMC archive resource information."] +#[doc = "# Arguments"] +#[doc = "`archiveResource` - Pointer to output the archive resource information to."] +#[doc = ""] + pub fn FSUSER_GetSdmcArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND archive resource information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] - #[doc = ""] +#[doc = "Gets the NAND archive resource information."] +#[doc = "# Arguments"] +#[doc = "`archiveResource` - Pointer to output the archive resource information to."] +#[doc = ""] + pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the last SDMC fatfs error."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `error` - Pointer to output the error to."] - #[doc = ""] +#[doc = "Gets the last SDMC fatfs error."] +#[doc = "# Arguments"] +#[doc = "`error` - Pointer to output the error to."] +#[doc = ""] + pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether an SD card is detected."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `detected` - Pointer to output the detection status to."] - #[doc = ""] +#[doc = "Gets whether an SD card is detected."] +#[doc = "# Arguments"] +#[doc = "`detected` - Pointer to output the detection status to."] +#[doc = ""] + pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the SD card is writable."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `writable` - Pointer to output the writable status to."] - #[doc = ""] +#[doc = "Gets whether the SD card is writable."] +#[doc = "# Arguments"] +#[doc = "`writable` - Pointer to output the writable status to."] +#[doc = ""] + pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC CID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the CID to."] - #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] - #[doc = ""] +#[doc = "Gets the SDMC CID."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the CID to."] +#[doc = "`length` - Length of the CID buffer. (should be 0x10)"] +#[doc = ""] + pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND CID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the CID to."] - #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] - #[doc = ""] +#[doc = "Gets the NAND CID."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the CID to."] +#[doc = "`length` - Length of the CID buffer. (should be 0x10)"] +#[doc = ""] + pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC speed info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `speedInfo` - Pointer to output the speed info to."] - #[doc = ""] +#[doc = "Gets the SDMC speed info."] +#[doc = "# Arguments"] +#[doc = "`speedInfo` - Pointer to output the speed info to."] +#[doc = ""] + pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND speed info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `speedInfo` - Pointer to output the speed info to."] - #[doc = ""] +#[doc = "Gets the NAND speed info."] +#[doc = "# Arguments"] +#[doc = "`speedInfo` - Pointer to output the speed info to."] +#[doc = ""] + pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC log."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the log to."] - #[doc = "* `length` - Length of the log buffer."] - #[doc = ""] +#[doc = "Gets the SDMC log."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the log to."] +#[doc = "`length` - Length of the log buffer."] +#[doc = ""] + pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND log."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the log to."] - #[doc = "* `length` - Length of the log buffer."] - #[doc = ""] +#[doc = "Gets the NAND log."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the log to."] +#[doc = "`length` - Length of the log buffer."] +#[doc = ""] + pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the SDMC log."] - #[doc = ""] +#[doc = "Clears the SDMC log."] +#[doc = ""] + pub fn FSUSER_ClearSdmcLog() -> Result; } extern "C" { #[must_use] - #[doc = "Clears the NAND log."] - #[doc = ""] +#[doc = "Clears the NAND log."] +#[doc = ""] + pub fn FSUSER_ClearNandLog() -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether a card is inserted."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inserted` - Pointer to output the insertion status to."] - #[doc = ""] +#[doc = "Gets whether a card is inserted."] +#[doc = "# Arguments"] +#[doc = "`inserted` - Pointer to output the insertion status to."] +#[doc = ""] + pub fn FSUSER_CardSlotIsInserted(inserted: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers on the card slot."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `status` - Pointer to output the power status to."] - #[doc = ""] +#[doc = "Powers on the card slot."] +#[doc = "# Arguments"] +#[doc = "`status` - Pointer to output the power status to."] +#[doc = ""] + pub fn FSUSER_CardSlotPowerOn(status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers off the card slot."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `status` - Pointer to output the power status to."] - #[doc = ""] +#[doc = "Powers off the card slot."] +#[doc = "# Arguments"] +#[doc = "`status` - Pointer to output the power status to."] +#[doc = ""] + pub fn FSUSER_CardSlotPowerOff(status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the card's power status."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `status` - Pointer to output the power status to."] - #[doc = ""] +#[doc = "Gets the card's power status."] +#[doc = "# Arguments"] +#[doc = "`status` - Pointer to output the power status to."] +#[doc = ""] + pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct command."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = ""] + pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command with an address."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct command with an address."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = ""] + pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `size` - Size of the output buffer."] - #[doc = "* `output` - Output buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct read."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`size` - Size of the output buffer."] +#[doc = "`output` - Output buffer."] +#[doc = ""] + pub fn FSUSER_CardNorDirectRead( commandId: u8_, size: u32_, @@ -9222,15 +9383,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read with an address."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the output buffer."] - #[doc = "* `output` - Output buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct read with an address."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the output buffer."] +#[doc = "`output` - Output buffer."] +#[doc = ""] + pub fn FSUSER_CardNorDirectReadWithAddress( commandId: u8_, address: u32_, @@ -9240,14 +9400,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `output` - Input buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct write."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`size` - Size of the input buffer."] +#[doc = "`output` - Input buffer."] +#[doc = ""] + pub fn FSUSER_CardNorDirectWrite( commandId: u8_, size: u32_, @@ -9256,15 +9415,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write with an address."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `input` - Input buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct write with an address."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the input buffer."] +#[doc = "`input` - Input buffer."] +#[doc = ""] + pub fn FSUSER_CardNorDirectWriteWithAddress( commandId: u8_, address: u32_, @@ -9274,15 +9432,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR 4xIO direct read."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the output buffer."] - #[doc = "* `output` - Output buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR 4xIO direct read."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the output buffer."] +#[doc = "`output` - Output buffer."] +#[doc = ""] + pub fn FSUSER_CardNorDirectRead_4xIO( commandId: u8_, address: u32_, @@ -9292,14 +9449,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct CPU write without verify."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `output` - Input buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct CPU write without verify."] +#[doc = "# Arguments"] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the input buffer."] +#[doc = "`output` - Input buffer."] +#[doc = ""] + pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify( address: u32_, size: u32_, @@ -9308,73 +9464,68 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct sector erase without verify."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `address` - Address to provide."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct sector erase without verify."] +#[doc = "# Arguments"] +#[doc = "`address` - Address to provide."] +#[doc = ""] + pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a process's product info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output the product info to."] - #[doc = "* `processId` - ID of the process."] - #[doc = ""] +#[doc = "Gets a process's product info."] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output the product info to."] +#[doc = "`processId` - ID of the process."] +#[doc = ""] + pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a process's program launch info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output the program launch info to."] - #[doc = "* `processId` - ID of the process."] - #[doc = ""] +#[doc = "Gets a process's program launch info."] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output the program launch info to."] +#[doc = "`processId` - ID of the process."] +#[doc = ""] + pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI baud rate."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `baudRate` - Baud rate to set."] - #[doc = ""] +#[doc = "Sets the CARDSPI baud rate."] +#[doc = "# Arguments"] +#[doc = "`baudRate` - Baud rate to set."] +#[doc = ""] + pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI bus mode."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `busMode` - Bus mode to set."] - #[doc = ""] +#[doc = "Sets the CARDSPI bus mode."] +#[doc = "# Arguments"] +#[doc = "`busMode` - Bus mode to set."] +#[doc = ""] + pub fn FSUSER_SetCardSpiBusMode(busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] - #[doc = "Sends initialization info to ARM9."] - #[doc = ""] +#[doc = "Sends initialization info to ARM9."] +#[doc = ""] + pub fn FSUSER_SendInitializeInfoTo9() -> Result; } extern "C" { #[must_use] - #[doc = "Gets a special content's index."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `index` - Pointer to output the index to."] - #[doc = "* `mediaType` - Media type of the special content."] - #[doc = "* `programId` - Program ID owning the special content."] - #[doc = "* `type` - Type of special content."] - #[doc = ""] +#[doc = "Gets a special content's index."] +#[doc = "# Arguments"] +#[doc = "`index` - Pointer to output the index to."] +#[doc = "`mediaType` - Media type of the special content."] +#[doc = "`programId` - Program ID owning the special content."] +#[doc = "`type` - Type of special content."] +#[doc = ""] + pub fn FSUSER_GetSpecialContentIndex( index: *mut u16_, mediaType: FS_MediaType, @@ -9384,14 +9535,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy ROM header of a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Media type of the program."] - #[doc = "* `programId` - ID of the program."] - #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] - #[doc = ""] +#[doc = "Gets the legacy ROM header of a program."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Media type of the program."] +#[doc = "`programId` - ID of the program."] +#[doc = "`header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] +#[doc = ""] + pub fn FSUSER_GetLegacyRomHeader( mediaType: FS_MediaType, programId: u64_, @@ -9400,14 +9550,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy banner data of a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Media type of the program."] - #[doc = "* `programId` - ID of the program."] - #[doc = "* `header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] - #[doc = ""] +#[doc = "Gets the legacy banner data of a program."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Media type of the program."] +#[doc = "`programId` - ID of the program."] +#[doc = "`header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] +#[doc = ""] + pub fn FSUSER_GetLegacyBannerData( mediaType: FS_MediaType, programId: u64_, @@ -9416,15 +9565,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks a process's authority to access a save data archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `access` - Pointer to output the access status to."] - #[doc = "* `mediaType` - Media type of the save data."] - #[doc = "* `saveId` - ID of the save data."] - #[doc = "* `processId` - ID of the process to check."] - #[doc = ""] +#[doc = "Checks a process's authority to access a save data archive."] +#[doc = "# Arguments"] +#[doc = "`access` - Pointer to output the access status to."] +#[doc = "`mediaType` - Media type of the save data."] +#[doc = "`saveId` - ID of the save data."] +#[doc = "`processId` - ID of the process to check."] +#[doc = ""] + pub fn FSUSER_CheckAuthorityToAccessExtSaveData( access: *mut bool, mediaType: FS_MediaType, @@ -9434,16 +9582,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Queries the total quota size of a save data archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `quotaSize` - Pointer to output the quota size to."] - #[doc = "* `directories` - Number of directories."] - #[doc = "* `files` - Number of files."] - #[doc = "* `fileSizeCount` - Number of file sizes to provide."] - #[doc = "* `fileSizes` - File sizes to provide."] - #[doc = ""] +#[doc = "Queries the total quota size of a save data archive."] +#[doc = "# Arguments"] +#[doc = "`quotaSize` - Pointer to output the quota size to."] +#[doc = "`directories` - Number of directories."] +#[doc = "`files` - Number of files."] +#[doc = "`fileSizeCount` - Number of file sizes to provide."] +#[doc = "`fileSizes` - File sizes to provide."] +#[doc = ""] + pub fn FSUSER_QueryTotalQuotaSize( quotaSize: *mut u64_, directories: u32_, @@ -9454,51 +9601,53 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Abnegates an access right."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `accessRight` - Access right to abnegate."] - #[doc = ""] +#[doc = "Abnegates an access right."] +#[doc = "# Arguments"] +#[doc = "`accessRight` - Access right to abnegate."] +#[doc = ""] + pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the 3DS SDMC root."] - #[doc = ""] +#[doc = "Deletes the 3DS SDMC root."] +#[doc = ""] + pub fn FSUSER_DeleteSdmcRoot() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all ext save data on the NAND."] - #[doc = ""] +#[doc = "Deletes all ext save data on the NAND."] +#[doc = ""] + pub fn FSUSER_DeleteAllExtSaveDataOnNand() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CTR file system."] - #[doc = ""] +#[doc = "Initializes the CTR file system."] +#[doc = ""] + pub fn FSUSER_InitializeCtrFileSystem() -> Result; } extern "C" { #[must_use] - #[doc = "Creates the FS seed."] - #[doc = ""] +#[doc = "Creates the FS seed."] +#[doc = ""] + pub fn FSUSER_CreateSeed() -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves archive format info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `totalSize` - Pointer to output the total size to."] - #[doc = "* `directories` - Pointer to output the number of directories to."] - #[doc = "* `files` - Pointer to output the number of files to."] - #[doc = "* `duplicateData` - Pointer to output whether to duplicate data to."] - #[doc = "* `archiveId` - ID of the archive."] - #[doc = "* `path` - Path of the archive."] - #[doc = ""] +#[doc = "Retrieves archive format info."] +#[doc = "# Arguments"] +#[doc = "`totalSize` - Pointer to output the total size to."] +#[doc = "`directories` - Pointer to output the number of directories to."] +#[doc = "`files` - Pointer to output the number of files to."] +#[doc = "`duplicateData` - Pointer to output whether to duplicate data to."] +#[doc = "`archiveId` - ID of the archive."] +#[doc = "`path` - Path of the archive."] +#[doc = ""] + pub fn FSUSER_GetFormatInfo( totalSize: *mut u32_, directories: *mut u32_, @@ -9510,15 +9659,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy ROM header of a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `headerSize` - Size of the ROM header."] - #[doc = "* `mediaType` - Media type of the program."] - #[doc = "* `programId` - ID of the program."] - #[doc = "* `header` - Pointer to output the legacy ROM header to."] - #[doc = ""] +#[doc = "Gets the legacy ROM header of a program."] +#[doc = "# Arguments"] +#[doc = "`headerSize` - Size of the ROM header."] +#[doc = "`mediaType` - Media type of the program."] +#[doc = "`programId` - ID of the program."] +#[doc = "`header` - Pointer to output the legacy ROM header to."] +#[doc = ""] + pub fn FSUSER_GetLegacyRomHeader2( headerSize: u32_, mediaType: FS_MediaType, @@ -9528,24 +9676,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the CTR SDMC root path."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the root path to."] - #[doc = "* `length` - Length of the output buffer."] - #[doc = ""] +#[doc = "Gets the CTR SDMC root path."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the root path to."] +#[doc = "`length` - Length of the output buffer."] +#[doc = ""] + pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an archive's resource information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] - #[doc = "* `mediaType` - System media type to check."] - #[doc = ""] +#[doc = "Gets an archive's resource information."] +#[doc = "# Arguments"] +#[doc = "`archiveResource` - Pointer to output the archive resource information to."] +#[doc = "`mediaType` - System media type to check."] +#[doc = ""] + pub fn FSUSER_GetArchiveResource( archiveResource: *mut FS_ArchiveResource, mediaType: FS_SystemMediaType, @@ -9553,43 +9699,40 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Exports the integrity verification seed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `seed` - Pointer to output the seed to."] - #[doc = ""] +#[doc = "Exports the integrity verification seed."] +#[doc = "# Arguments"] +#[doc = "`seed` - Pointer to output the seed to."] +#[doc = ""] + pub fn FSUSER_ExportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] - #[doc = "Imports an integrity verification seed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `seed` - Seed to import."] - #[doc = ""] +#[doc = "Imports an integrity verification seed."] +#[doc = "# Arguments"] +#[doc = "`seed` - Seed to import."] +#[doc = ""] + pub fn FSUSER_ImportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] - #[doc = "Formats save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archiveId` - ID of the save data archive."] - #[doc = "* `path` - Path of the save data."] - #[doc = "* `blocks` - Size of the save data in blocks. (512 bytes)"] - #[doc = "* `directories` - Number of directories."] - #[doc = "* `files` - Number of files."] - #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] - #[doc = "* `fileBuckets` - File hash tree bucket count."] - #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] - #[doc = ""] +#[doc = "Formats save data."] +#[doc = "# Arguments"] +#[doc = "`archiveId` - ID of the save data archive."] +#[doc = "`path` - Path of the save data."] +#[doc = "`blocks` - Size of the save data in blocks. (512 bytes)"] +#[doc = "`directories` - Number of directories."] +#[doc = "`files` - Number of files."] +#[doc = "`directoryBuckets` - Directory hash tree bucket count."] +#[doc = "`fileBuckets` - File hash tree bucket count."] +#[doc = "`duplicateData` - Whether to store an internal duplicate of the data."] +#[doc = ""] + pub fn FSUSER_FormatSaveData( archiveId: FS_ArchiveID, path: FS_Path, @@ -9603,15 +9746,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy sub banner data of a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bannerSize` - Size of the banner."] - #[doc = "* `mediaType` - Media type of the program."] - #[doc = "* `programId` - ID of the program."] - #[doc = "* `header` - Pointer to output the legacy sub banner data to."] - #[doc = ""] +#[doc = "Gets the legacy sub banner data of a program."] +#[doc = "# Arguments"] +#[doc = "`bannerSize` - Size of the banner."] +#[doc = "`mediaType` - Media type of the program."] +#[doc = "`programId` - ID of the program."] +#[doc = "`header` - Pointer to output the legacy sub banner data to."] +#[doc = ""] + pub fn FSUSER_GetLegacySubBannerData( bannerSize: u32_, mediaType: FS_MediaType, @@ -9621,14 +9763,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Hashes the given data and outputs a SHA256 hash."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to the data to be hashed."] - #[doc = "* `inputSize` - The size of the data."] - #[doc = "* `hash` - Hash output pointer."] - #[doc = ""] +#[doc = "Hashes the given data and outputs a SHA256 hash."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to the data to be hashed."] +#[doc = "`inputSize` - The size of the data."] +#[doc = "`hash` - Hash output pointer."] +#[doc = ""] + pub fn FSUSER_UpdateSha256Context( data: *const ::libc::c_void, inputSize: u32_, @@ -9637,15 +9778,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a special file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] - #[doc = "* `fileOffset` - Offset of the file."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `data` - Buffer to read to."] - #[doc = ""] +#[doc = "Reads from a special file."] +#[doc = "# Arguments"] +#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "`fileOffset` - Offset of the file."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`data` - Buffer to read to."] +#[doc = ""] + pub fn FSUSER_ReadSpecialFile( bytesRead: *mut u32_, fileOffset: u64_, @@ -9655,27 +9795,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the size of a special file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `fileSize` - Pointer to output the size to."] - #[doc = ""] +#[doc = "Gets the size of a special file."] +#[doc = "# Arguments"] +#[doc = "`fileSize` - Pointer to output the size to."] +#[doc = ""] + pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates ext save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Info of the save data."] - #[doc = "* `directories` - Number of directories."] - #[doc = "* `files` - Number of files."] - #[doc = "* `sizeLimit` - Size limit of the save data."] - #[doc = "* `smdhSize` - Size of the save data's SMDH data."] - #[doc = "* `smdh` - SMDH data."] - #[doc = ""] +#[doc = "Creates ext save data."] +#[doc = "# Arguments"] +#[doc = "`info` - Info of the save data."] +#[doc = "`directories` - Number of directories."] +#[doc = "`files` - Number of files."] +#[doc = "`sizeLimit` - Size limit of the save data."] +#[doc = "`smdhSize` - Size of the save data's SMDH data."] +#[doc = "`smdh` - SMDH data."] +#[doc = ""] + pub fn FSUSER_CreateExtSaveData( info: FS_ExtSaveDataInfo, directories: u32_, @@ -9687,25 +9825,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes ext save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Info of the save data."] - #[doc = ""] +#[doc = "Deletes ext save data."] +#[doc = "# Arguments"] +#[doc = "`info` - Info of the save data."] +#[doc = ""] + pub fn FSUSER_DeleteExtSaveData(info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Reads the SMDH icon of ext save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] - #[doc = "* `info` - Info of the save data."] - #[doc = "* `smdhSize` - Size of the save data SMDH."] - #[doc = "* `smdh` - Pointer to output SMDH data to."] - #[doc = ""] +#[doc = "Reads the SMDH icon of ext save data."] +#[doc = "# Arguments"] +#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "`info` - Info of the save data."] +#[doc = "`smdhSize` - Size of the save data SMDH."] +#[doc = "`smdh` - Pointer to output SMDH data to."] +#[doc = ""] + pub fn FSUSER_ReadExtSaveDataIcon( bytesRead: *mut u32_, info: FS_ExtSaveDataInfo, @@ -9715,15 +9851,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an ext data archive's block information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `totalBlocks` - Pointer to output the total blocks to."] - #[doc = "* `freeBlocks` - Pointer to output the free blocks to."] - #[doc = "* `blockSize` - Pointer to output the block size to."] - #[doc = "* `info` - Info of the save data."] - #[doc = ""] +#[doc = "Gets an ext data archive's block information."] +#[doc = "# Arguments"] +#[doc = "`totalBlocks` - Pointer to output the total blocks to."] +#[doc = "`freeBlocks` - Pointer to output the free blocks to."] +#[doc = "`blockSize` - Pointer to output the block size to."] +#[doc = "`info` - Info of the save data."] +#[doc = ""] + pub fn FSUSER_GetExtDataBlockSize( totalBlocks: *mut u64_, freeBlocks: *mut u64_, @@ -9733,17 +9868,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Enumerates ext save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] - #[doc = "* `idsSize` - Size of the IDs buffer."] - #[doc = "* `mediaType` - Media type to enumerate over."] - #[doc = "* `idSize` - Size of each ID element."] - #[doc = "* `shared` - Whether to enumerate shared ext save data."] - #[doc = "* `ids` - Pointer to output IDs to."] - #[doc = ""] +#[doc = "Enumerates ext save data."] +#[doc = "# Arguments"] +#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "`idsSize` - Size of the IDs buffer."] +#[doc = "`mediaType` - Media type to enumerate over."] +#[doc = "`idSize` - Size of each ID element."] +#[doc = "`shared` - Whether to enumerate shared ext save data."] +#[doc = "`ids` - Pointer to output IDs to."] +#[doc = ""] + pub fn FSUSER_EnumerateExtSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9755,19 +9889,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates system save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Info of the save data."] - #[doc = "* `totalSize` - Total size of the save data."] - #[doc = "* `blockSize` - Block size of the save data. (usually 0x1000)"] - #[doc = "* `directories` - Number of directories."] - #[doc = "* `files` - Number of files."] - #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] - #[doc = "* `fileBuckets` - File hash tree bucket count."] - #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] - #[doc = ""] +#[doc = "Creates system save data."] +#[doc = "# Arguments"] +#[doc = "`info` - Info of the save data."] +#[doc = "`totalSize` - Total size of the save data."] +#[doc = "`blockSize` - Block size of the save data. (usually 0x1000)"] +#[doc = "`directories` - Number of directories."] +#[doc = "`files` - Number of files."] +#[doc = "`directoryBuckets` - Directory hash tree bucket count."] +#[doc = "`fileBuckets` - File hash tree bucket count."] +#[doc = "`duplicateData` - Whether to store an internal duplicate of the data."] +#[doc = ""] + pub fn FSUSER_CreateSystemSaveData( info: FS_SystemSaveDataInfo, totalSize: u32_, @@ -9781,33 +9914,30 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes system save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Info of the save data."] - #[doc = ""] +#[doc = "Deletes system save data."] +#[doc = "# Arguments"] +#[doc = "`info` - Info of the save data."] +#[doc = ""] + pub fn FSUSER_DeleteSystemSaveData(info: FS_SystemSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates a device move as the source device."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Pointer to output the context to."] - #[doc = ""] +#[doc = "Initiates a device move as the source device."] +#[doc = "# Arguments"] +#[doc = "`context` - Pointer to output the context to."] +#[doc = ""] + pub fn FSUSER_StartDeviceMoveAsSource(context: *mut FS_DeviceMoveContext) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates a device move as the destination device."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `clear` - Whether to clear the device's data first."] - #[doc = ""] +#[doc = "Initiates a device move as the destination device."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`clear` - Whether to clear the device's data first."] +#[doc = ""] + pub fn FSUSER_StartDeviceMoveAsDestination( context: FS_DeviceMoveContext, clear: bool, @@ -9815,57 +9945,52 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets an archive's priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to use."] - #[doc = "* `priority` - Priority to set."] - #[doc = ""] +#[doc = "Sets an archive's priority."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to use."] +#[doc = "`priority` - Priority to set."] +#[doc = ""] + pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an archive's priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `priority` - Pointer to output the priority to."] - #[doc = "* `archive` - Archive to use."] - #[doc = ""] +#[doc = "Gets an archive's priority."] +#[doc = "# Arguments"] +#[doc = "`priority` - Pointer to output the priority to."] +#[doc = "`archive` - Archive to use."] +#[doc = ""] + pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Configures CTRCARD latency emulation."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `latency` - Latency to apply, in milliseconds."] - #[doc = "* `emulateEndurance` - Whether to emulate card endurance."] - #[doc = ""] +#[doc = "Configures CTRCARD latency emulation."] +#[doc = "# Arguments"] +#[doc = "`latency` - Latency to apply, in milliseconds."] +#[doc = "`emulateEndurance` - Whether to emulate card endurance."] +#[doc = ""] + pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Toggles cleaning up invalid save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] - #[doc = ""] +#[doc = "Toggles cleaning up invalid save data."] +#[doc = "# Arguments"] +#[doc = "`enable` - Whether to enable cleaning up invalid save data."] +#[doc = ""] + pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Enumerates system save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] - #[doc = "* `idsSize` - Size of the IDs buffer."] - #[doc = "* `ids` - Pointer to output IDs to."] - #[doc = ""] +#[doc = "Enumerates system save data."] +#[doc = "# Arguments"] +#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "`idsSize` - Size of the IDs buffer."] +#[doc = "`ids` - Pointer to output IDs to."] +#[doc = ""] + pub fn FSUSER_EnumerateSystemSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9874,46 +9999,42 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes a FSUSER session with an SDK version."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `session` - The handle of the FSUSER session to initialize."] - #[doc = "* `version` - SDK version to initialize with."] - #[doc = ""] +#[doc = "Initializes a FSUSER session with an SDK version."] +#[doc = "# Arguments"] +#[doc = "`session` - The handle of the FSUSER session to initialize."] +#[doc = "`version` - SDK version to initialize with."] +#[doc = ""] + pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the file system priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `priority` - Priority to set."] - #[doc = ""] +#[doc = "Sets the file system priority."] +#[doc = "# Arguments"] +#[doc = "`priority` - Priority to set."] +#[doc = ""] + pub fn FSUSER_SetPriority(priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the file system priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `priority` - Pointer to output the priority to."] - #[doc = ""] +#[doc = "Gets the file system priority."] +#[doc = "# Arguments"] +#[doc = "`priority` - Pointer to output the priority to."] +#[doc = ""] + pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the save data secure value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Secure value to set."] - #[doc = "* `slot` - Slot of the secure value."] - #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] - #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] - #[doc = ""] +#[doc = "Sets the save data secure value."] +#[doc = "# Arguments"] +#[doc = "`value` - Secure value to set."] +#[doc = "`slot` - Slot of the secure value."] +#[doc = "`titleUniqueId` - Unique ID of the title. (default = 0)"] +#[doc = "`titleVariation` - Variation of the title. (default = 0)"] +#[doc = ""] + pub fn FSUSER_SetSaveDataSecureValue( value: u64_, slot: FS_SecureValueSlot, @@ -9923,16 +10044,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the save data secure value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `exists` - Pointer to output whether the secure value exists to."] - #[doc = "* `value` - Pointer to output the secure value to."] - #[doc = "* `slot` - Slot of the secure value."] - #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] - #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] - #[doc = ""] +#[doc = "Gets the save data secure value."] +#[doc = "# Arguments"] +#[doc = "`exists` - Pointer to output whether the secure value exists to."] +#[doc = "`value` - Pointer to output the secure value to."] +#[doc = "`slot` - Slot of the secure value."] +#[doc = "`titleUniqueId` - Unique ID of the title. (default = 0)"] +#[doc = "`titleVariation` - Variation of the title. (default = 0)"] +#[doc = ""] + pub fn FSUSER_GetSaveDataSecureValue( exists: *mut bool, value: *mut u64_, @@ -9943,16 +10063,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Performs a control operation on a secure save."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `action` - Action to perform."] - #[doc = "* `input` - Buffer to read input from."] - #[doc = "* `inputSize` - Size of the input."] - #[doc = "* `output` - Buffer to write output to."] - #[doc = "* `outputSize` - Size of the output."] - #[doc = ""] +#[doc = "Performs a control operation on a secure save."] +#[doc = "# Arguments"] +#[doc = "`action` - Action to perform."] +#[doc = "`input` - Buffer to read input from."] +#[doc = "`inputSize` - Size of the input."] +#[doc = "`output` - Buffer to write output to."] +#[doc = "`outputSize` - Size of the output."] +#[doc = ""] + pub fn FSUSER_ControlSecureSave( action: FS_SecureSaveAction, input: *mut ::libc::c_void, @@ -9963,27 +10082,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the media type of the current application."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Pointer to output the media type to."] - #[doc = ""] +#[doc = "Gets the media type of the current application."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Pointer to output the media type to."] +#[doc = ""] + pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result; } extern "C" { #[must_use] - #[doc = "Performs a control operation on a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `action` - Action to perform."] - #[doc = "* `input` - Buffer to read input from."] - #[doc = "* `inputSize` - Size of the input."] - #[doc = "* `output` - Buffer to write output to."] - #[doc = "* `outputSize` - Size of the output."] - #[doc = ""] +#[doc = "Performs a control operation on a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`action` - Action to perform."] +#[doc = "`input` - Buffer to read input from."] +#[doc = "`inputSize` - Size of the input."] +#[doc = "`output` - Buffer to write output to."] +#[doc = "`outputSize` - Size of the output."] +#[doc = ""] + pub fn FSFILE_Control( handle: Handle, action: FS_FileAction, @@ -9995,15 +10112,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a handle to a sub-section of a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `subFile` - Pointer to output the sub-file to."] - #[doc = "* `offset` - Offset of the sub-section."] - #[doc = "* `size` - Size of the sub-section."] - #[doc = ""] +#[doc = "Opens a handle to a sub-section of a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`subFile` - Pointer to output the sub-file to."] +#[doc = "`offset` - Offset of the sub-section."] +#[doc = "`size` - Size of the sub-section."] +#[doc = ""] + pub fn FSFILE_OpenSubFile( handle: Handle, subFile: *mut Handle, @@ -10013,16 +10129,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] - #[doc = "* `offset` - Offset to read from."] - #[doc = "* `buffer` - Buffer to read to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Reads from a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "`offset` - Offset to read from."] +#[doc = "`buffer` - Buffer to read to."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn FSFILE_Read( handle: Handle, bytesRead: *mut u32_, @@ -10033,17 +10148,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] - #[doc = "* `offset` - Offset to write to."] - #[doc = "* `buffer` - Buffer to write from."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `flags` - Flags to use when writing."] - #[doc = ""] +#[doc = "Writes to a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`bytesWritten` - Pointer to output the number of bytes written to."] +#[doc = "`offset` - Offset to write to."] +#[doc = "`buffer` - Buffer to write from."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`flags` - Flags to use when writing."] +#[doc = ""] + pub fn FSFILE_Write( handle: Handle, bytesWritten: *mut u32_, @@ -10055,114 +10169,104 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the size of a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `size` - Pointer to output the size to."] - #[doc = ""] +#[doc = "Gets the size of a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`size` - Pointer to output the size to."] +#[doc = ""] + pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the size of a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `size` - Size to set."] - #[doc = ""] +#[doc = "Sets the size of a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`size` - Size to set."] +#[doc = ""] + pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the attributes of a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `attributes` - Pointer to output the attributes to."] - #[doc = ""] +#[doc = "Gets the attributes of a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`attributes` - Pointer to output the attributes to."] +#[doc = ""] + pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the attributes of a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `attributes` - Attributes to set."] - #[doc = ""] +#[doc = "Sets the attributes of a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`attributes` - Attributes to set."] +#[doc = ""] + pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Closes a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = ""] +#[doc = "Closes a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = ""] + pub fn FSFILE_Close(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes a file's contents."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = ""] +#[doc = "Flushes a file's contents."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = ""] + pub fn FSFILE_Flush(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a file's priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `priority` - Priority to set."] - #[doc = ""] +#[doc = "Sets a file's priority."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`priority` - Priority to set."] +#[doc = ""] + pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a file's priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `priority` - Pointer to output the priority to."] - #[doc = ""] +#[doc = "Gets a file's priority."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`priority` - Pointer to output the priority to."] +#[doc = ""] + pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Opens a duplicate handle to a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the file."] - #[doc = "* `linkFile` - Pointer to output the link handle to."] - #[doc = ""] +#[doc = "Opens a duplicate handle to a file."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the file."] +#[doc = "`linkFile` - Pointer to output the link handle to."] +#[doc = ""] + pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Performs a control operation on a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the directory."] - #[doc = "* `action` - Action to perform."] - #[doc = "* `input` - Buffer to read input from."] - #[doc = "* `inputSize` - Size of the input."] - #[doc = "* `output` - Buffer to write output to."] - #[doc = "* `outputSize` - Size of the output."] - #[doc = ""] +#[doc = "Performs a control operation on a directory."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the directory."] +#[doc = "`action` - Action to perform."] +#[doc = "`input` - Buffer to read input from."] +#[doc = "`inputSize` - Size of the input."] +#[doc = "`output` - Buffer to write output to."] +#[doc = "`outputSize` - Size of the output."] +#[doc = ""] + pub fn FSDIR_Control( handle: Handle, action: FS_DirectoryAction, @@ -10174,15 +10278,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads one or more directory entries."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the directory."] - #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] - #[doc = "* `entryCount` - Number of entries to read."] - #[doc = "* `entryOut` - Pointer to output directory entries to."] - #[doc = ""] +#[doc = "Reads one or more directory entries."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the directory."] +#[doc = "`entriesRead` - Pointer to output the number of entries read to."] +#[doc = "`entryCount` - Number of entries to read."] +#[doc = "`entryOut` - Pointer to output directory entries to."] +#[doc = ""] + pub fn FSDIR_Read( handle: Handle, entriesRead: *mut u32_, @@ -10192,215 +10295,250 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the directory."] - #[doc = ""] +#[doc = "Closes a directory."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the directory."] +#[doc = ""] + pub fn FSDIR_Close(handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a directory's priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the directory."] - #[doc = "* `priority` - Priority to set."] - #[doc = ""] +#[doc = "Sets a directory's priority."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the directory."] +#[doc = "`priority` - Priority to set."] +#[doc = ""] + pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a directory's priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Handle of the directory."] - #[doc = "* `priority` - Pointer to output the priority to."] - #[doc = ""] +#[doc = "Gets a directory's priority."] +#[doc = "# Arguments"] +#[doc = "`handle` - Handle of the directory."] +#[doc = "`priority` - Pointer to output the priority to."] +#[doc = ""] + pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } #[doc = "Contains basic information about a title."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TitleEntry { - #[doc = "The title's ID."] - #[doc = ""] +#[doc = "The title's ID."] +#[doc = ""] + pub titleID: u64_, - #[doc = "The title's installed size."] - #[doc = ""] +#[doc = "The title's installed size."] +#[doc = ""] + pub size: u64_, - #[doc = "The title's version."] - #[doc = ""] +#[doc = "The title's version."] +#[doc = ""] + pub version: u16_, - #[doc = "Unknown title data."] - #[doc = ""] +#[doc = "Unknown title data."] +#[doc = ""] + pub unk: [u8_; 6usize], } #[doc = "Titles currently installing."] #[doc = ""] + pub const AM_STATUS_MASK_INSTALLING: _bindgen_ty_13 = 1; #[doc = "Titles awaiting finalization."] #[doc = ""] + pub const AM_STATUS_MASK_AWAITING_FINALIZATION: _bindgen_ty_13 = 2; #[doc = "Pending title status mask values."] #[doc = ""] + pub type _bindgen_ty_13 = ::libc::c_uint; #[doc = "Install aborted."] #[doc = ""] + pub const AM_STATUS_ABORTED: AM_InstallStatus = 2; #[doc = "Title saved, but not installed."] #[doc = ""] + pub const AM_STATUS_SAVED: AM_InstallStatus = 3; #[doc = "Install in progress."] #[doc = ""] + pub const AM_STATUS_INSTALL_IN_PROGRESS: AM_InstallStatus = 2050; #[doc = "Awaiting finalization."] #[doc = ""] + pub const AM_STATUS_AWAITING_FINALIZATION: AM_InstallStatus = 2051; #[doc = "Pending title status values."] #[doc = ""] + pub type AM_InstallStatus = ::libc::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_PendingTitleEntry { - #[doc = "Title ID"] - #[doc = ""] +#[doc = "Title ID"] +#[doc = ""] + pub titleId: u64_, - #[doc = "Version"] - #[doc = ""] +#[doc = "Version"] +#[doc = ""] + pub version: u16_, - #[doc = "[`AM_InstallStatus`]"] - #[doc = ""] +#[doc = "[`AM_InstallStatus`]"] +#[doc = ""] + pub status: u16_, - #[doc = "Title Type"] - #[doc = ""] +#[doc = "Title Type"] +#[doc = ""] + pub titleType: u32_, - #[doc = "Unknown"] - #[doc = ""] +#[doc = "Unknown"] +#[doc = ""] + pub unk: [u8_; 8usize], } #[doc = "Non-system titles."] #[doc = ""] + pub const AM_DELETE_PENDING_NON_SYSTEM: _bindgen_ty_14 = 1; #[doc = "System titles."] #[doc = ""] + pub const AM_DELETE_PENDING_SYSTEM: _bindgen_ty_14 = 2; #[doc = "Pending title deletion flags."] #[doc = ""] + pub type _bindgen_ty_14 = ::libc::c_uint; #[doc = "Information about the TWL NAND partition."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TWLPartitionInfo { - #[doc = "Total capacity."] - #[doc = ""] +#[doc = "Total capacity."] +#[doc = ""] + pub capacity: u64_, - #[doc = "Total free space."] - #[doc = ""] +#[doc = "Total free space."] +#[doc = ""] + pub freeSpace: u64_, - #[doc = "Capacity for titles."] - #[doc = ""] +#[doc = "Capacity for titles."] +#[doc = ""] + pub titlesCapacity: u64_, - #[doc = "Free space for titles."] - #[doc = ""] +#[doc = "Free space for titles."] +#[doc = ""] + pub titlesFreeSpace: u64_, } #[doc = "Contains information about a title's content."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_ContentInfo { - #[doc = "Index of the content in the title."] - #[doc = ""] +#[doc = "Index of the content in the title."] +#[doc = ""] + pub index: u16_, - #[doc = "?"] - #[doc = ""] +#[doc = "?"] +#[doc = ""] + pub type_: u16_, - #[doc = "ID of the content in the title."] - #[doc = ""] +#[doc = "ID of the content in the title."] +#[doc = ""] + pub contentId: u32_, - #[doc = "Size of the content in the title."] - #[doc = ""] +#[doc = "Size of the content in the title."] +#[doc = ""] + pub size: u64_, - #[doc = "[`AM_ContentInfoFlags`]"] - #[doc = ""] +#[doc = "[`AM_ContentInfoFlags`]"] +#[doc = ""] + pub flags: u8_, - #[doc = "Padding"] - #[doc = ""] +#[doc = "Padding"] +#[doc = ""] + pub padding: [u8_; 7usize], } #[doc = "?"] #[doc = ""] + pub const AM_CONTENT_DOWNLOADED: AM_ContentInfoFlags = 1; #[doc = "?"] #[doc = ""] + pub const AM_CONTENT_OWNED: AM_ContentInfoFlags = 2; #[doc = "Title ContentInfo flags."] #[doc = ""] + pub type AM_ContentInfoFlags = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] - #[doc = ""] +#[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] +#[doc = ""] + pub fn amInit() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] - #[doc = ""] +#[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] +#[doc = ""] + pub fn amAppInit() -> Result; } extern "C" { - #[doc = "Exits AM."] - #[doc = ""] +#[doc = "Exits AM."] +#[doc = ""] + pub fn amExit(); } extern "C" { - #[doc = "Gets the current AM session handle."] - #[doc = ""] +#[doc = "Gets the current AM session handle."] +#[doc = ""] + pub fn amGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the number of titles for a given media type."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to get titles from."] - #[doc = "* `count` - Pointer to write the title count to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Gets the number of titles for a given media type."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to get titles from."] +#[doc = "`count` - Pointer to write the title count to. [Direction: In, Out]"] +#[doc = ""] + pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a list of title IDs present in a mediatype."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titlesRead` - Pointer to output the number of read titles to. [Direction: In, Out]"] - #[doc = "* `mediatype` - Media type to get titles from."] - #[doc = "* `titleCount` - Number of title IDs to get."] - #[doc = "* `titleIds` - Buffer to output the retrieved title IDs to."] - #[doc = ""] +#[doc = "Gets a list of title IDs present in a mediatype."] +#[doc = "# Arguments"] +#[doc = "`titlesRead` - Pointer to output the number of read titles to. [Direction: In, Out]"] +#[doc = "`mediatype` - Media type to get titles from."] +#[doc = "`titleCount` - Number of title IDs to get."] +#[doc = "`titleIds` - Buffer to output the retrieved title IDs to."] +#[doc = ""] + pub fn AM_GetTitleList( titlesRead: *mut u32_, mediatype: FS_MediaType, @@ -10410,15 +10548,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a list of details about installed titles."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to get titles from."] - #[doc = "* `titleCount` - Number of titles to list."] - #[doc = "* `titleIds` - List of title IDs to retrieve details for."] - #[doc = "* `titleInfo` - Buffer to write AM_TitleEntry's to."] - #[doc = ""] +#[doc = "Gets a list of details about installed titles."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to get titles from."] +#[doc = "`titleCount` - Number of titles to list."] +#[doc = "`titleIds` - List of title IDs to retrieve details for."] +#[doc = "`titleInfo` - Buffer to write AM_TitleEntry's to."] +#[doc = ""] + pub fn AM_GetTitleInfo( mediatype: FS_MediaType, titleCount: u32_, @@ -10428,25 +10565,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the number of tickets installed on the system."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `count` - Pointer to output the ticket count to. [Direction: In, Out]"] - #[doc = ""] - pub fn AM_GetTicketCount(count: *mut u32_) -> Result; +#[doc = "Gets the number of tickets installed on the system."] +#[doc = "# Arguments"] +#[doc = "`count` - Pointer to output the ticket count to. [Direction: In, Out]"] +#[doc = ""] + + pub fn AM_GetTicketCount(count: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a list of tickets installed on the system."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ticketsRead` - Pointer to output the number of read tickets to. [Direction: In, Out]"] - #[doc = "* `ticketCount` - Number of tickets to read."] - #[doc = "* `skip` - Number of tickets to skip."] - #[doc = "* `ticketIds` - Buffer to output the retrieved ticket IDs to."] - #[doc = ""] +#[doc = "Gets a list of tickets installed on the system."] +#[doc = "# Arguments"] +#[doc = "`ticketsRead` - Pointer to output the number of read tickets to. [Direction: In, Out]"] +#[doc = "`ticketCount` - Number of tickets to read."] +#[doc = "`skip` - Number of tickets to skip."] +#[doc = "`ticketIds` - Buffer to output the retrieved ticket IDs to."] +#[doc = ""] + pub fn AM_GetTicketList( ticketsRead: *mut u32_, ticketCount: u32_, @@ -10456,14 +10591,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the number of pending titles on this system."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `count` - Pointer to output the pending title count to. [Direction: In, Out]"] - #[doc = "* `mediatype` - Media type of pending titles to count."] - #[doc = "* `statusMask` - Bit mask of status values to include."] - #[doc = ""] +#[doc = "Gets the number of pending titles on this system."] +#[doc = "# Arguments"] +#[doc = "`count` - Pointer to output the pending title count to. [Direction: In, Out]"] +#[doc = "`mediatype` - Media type of pending titles to count."] +#[doc = "`statusMask` - Bit mask of status values to include."] +#[doc = ""] + pub fn AM_GetPendingTitleCount( count: *mut u32_, mediatype: FS_MediaType, @@ -10472,16 +10606,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a list of pending titles on this system."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titlesRead` - Pointer to output the number of read pending titles to. [Direction: In, Out]"] - #[doc = "* `titleCount` - Number of pending titles to read."] - #[doc = "* `mediatype` - Media type of pending titles to list."] - #[doc = "* `statusMask` - Bit mask of status values to include."] - #[doc = "* `titleIds` - Buffer to output the retrieved pending title IDs to."] - #[doc = ""] +#[doc = "Gets a list of pending titles on this system."] +#[doc = "# Arguments"] +#[doc = "`titlesRead` - Pointer to output the number of read pending titles to. [Direction: In, Out]"] +#[doc = "`titleCount` - Number of pending titles to read."] +#[doc = "`mediatype` - Media type of pending titles to list."] +#[doc = "`statusMask` - Bit mask of status values to include."] +#[doc = "`titleIds` - Buffer to output the retrieved pending title IDs to."] +#[doc = ""] + pub fn AM_GetPendingTitleList( titlesRead: *mut u32_, titleCount: u32_, @@ -10492,15 +10625,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets information about pending titles on this system."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleCount` - Number of pending titles to read."] - #[doc = "* `mediatype` - Media type of pending titles to get information on."] - #[doc = "* `titleIds` - IDs of the titles to get information about."] - #[doc = "* `titleInfo` - Buffer to output the retrieved pending title info to."] - #[doc = ""] +#[doc = "Gets information about pending titles on this system."] +#[doc = "# Arguments"] +#[doc = "`titleCount` - Number of pending titles to read."] +#[doc = "`mediatype` - Media type of pending titles to get information on."] +#[doc = "`titleIds` - IDs of the titles to get information about."] +#[doc = "`titleInfo` - Buffer to output the retrieved pending title info to."] +#[doc = ""] + pub fn AM_GetPendingTitleInfo( titleCount: u32_, mediatype: FS_MediaType, @@ -10510,26 +10642,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a 32-bit device-specific ID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `deviceID` - Pointer to write the device ID to."] - #[doc = ""] +#[doc = "Gets a 32-bit device-specific ID."] +#[doc = "# Arguments"] +#[doc = "`deviceID` - Pointer to write the device ID to."] +#[doc = ""] + pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Exports DSiWare to the specified filepath."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleID` - TWL titleID."] - #[doc = "* `operation` - DSiWare operation type."] - #[doc = "* `workbuf` - Work buffer."] - #[doc = "* `workbuf_size` - Work buffer size, must be >=0x20000."] - #[doc = "* `filepath` - UTF-8 filepath(converted to UTF-16 internally)."] - #[doc = ""] +#[doc = "Exports DSiWare to the specified filepath."] +#[doc = "# Arguments"] +#[doc = "`titleID` - TWL titleID."] +#[doc = "`operation` - DSiWare operation type."] +#[doc = "`workbuf` - Work buffer."] +#[doc = "`workbuf_size` - Work buffer size, must be >=0x20000."] +#[doc = "`filepath` - UTF-8 filepath(converted to UTF-16 internally)."] +#[doc = ""] + pub fn AM_ExportTwlBackup( titleID: u64_, operation: u8_, @@ -10540,15 +10670,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Imports DSiWare from the specified file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `filehandle` - FSUSER file handle."] - #[doc = "* `operation` - DSiWare operation type."] - #[doc = "* `buffer` - Work buffer."] - #[doc = "* `size` - Buffer size, must be >=0x20000."] - #[doc = ""] +#[doc = "Imports DSiWare from the specified file."] +#[doc = "# Arguments"] +#[doc = "`filehandle` - FSUSER file handle."] +#[doc = "`operation` - DSiWare operation type."] +#[doc = "`buffer` - Work buffer."] +#[doc = "`size` - Buffer size, must be >=0x20000."] +#[doc = ""] + pub fn AM_ImportTwlBackup( filehandle: Handle, operation: u8_, @@ -10558,18 +10687,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `filehandle` - FSUSER file handle."] - #[doc = "* `outinfo` - Output info buffer."] - #[doc = "* `outinfo_size` - Output info buffer size."] - #[doc = "* `workbuf` - Work buffer."] - #[doc = "* `workbuf_size` - Work buffer size."] - #[doc = "* `banner` - Output banner buffer."] - #[doc = "* `banner_size` - Output banner buffer size."] - #[doc = ""] +#[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] +#[doc = "# Arguments"] +#[doc = "`filehandle` - FSUSER file handle."] +#[doc = "`outinfo` - Output info buffer."] +#[doc = "`outinfo_size` - Output info buffer size."] +#[doc = "`workbuf` - Work buffer."] +#[doc = "`workbuf_size` - Work buffer size."] +#[doc = "`banner` - Output banner buffer."] +#[doc = "`banner_size` - Output banner buffer size."] +#[doc = ""] + pub fn AM_ReadTwlBackupInfo( filehandle: Handle, outinfo: *mut ::libc::c_void, @@ -10582,76 +10710,69 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Retrieves information about the NAND TWL partition."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Retrieves information about the NAND TWL partition."] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] +#[doc = ""] + pub fn AM_GetTWLPartitionInfo(info: *mut AM_TWLPartitionInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to install the CIA to."] - #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to install the CIA to."] +#[doc = "`ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] +#[doc = ""] + pub fn AM_StartCiaInstall(mediatype: FS_MediaType, ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] +#[doc = "# Arguments"] +#[doc = "`ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] +#[doc = ""] + pub fn AM_StartDlpChildCiaInstall(ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts the CIA install process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ciaHandle` - CIA handle to cancel."] - #[doc = ""] +#[doc = "Aborts the CIA install process."] +#[doc = "# Arguments"] +#[doc = "`ciaHandle` - CIA handle to cancel."] +#[doc = ""] + pub fn AM_CancelCIAInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finalizes the CIA install process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ciaHandle` - CIA handle to finalize."] - #[doc = ""] +#[doc = "Finalizes the CIA install process."] +#[doc = "# Arguments"] +#[doc = "`ciaHandle` - CIA handle to finalize."] +#[doc = ""] + pub fn AM_FinishCiaInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ciaHandle` - CIA handle to finalize."] - #[doc = ""] +#[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] +#[doc = "# Arguments"] +#[doc = "`ciaHandle` - CIA handle to finalize."] +#[doc = ""] + pub fn AM_FinishCiaInstallWithoutCommit(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Commits installed CIAs."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Location of the titles to finalize."] - #[doc = "* `titleCount` - Number of titles to finalize."] - #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] - #[doc = "* `titleIds` - Title IDs to finalize."] - #[doc = ""] +#[doc = "Commits installed CIAs."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Location of the titles to finalize."] +#[doc = "`titleCount` - Number of titles to finalize."] +#[doc = "`temp` - Whether the titles being finalized are in the temporary database."] +#[doc = "`titleIds` - Title IDs to finalize."] +#[doc = ""] + pub fn AM_CommitImportPrograms( mediaType: FS_MediaType, titleCount: u32_, @@ -10661,94 +10782,87 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to delete from."] - #[doc = "* `titleID` - ID of the title to delete."] - #[doc = ""] +#[doc = "Deletes a title."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to delete from."] +#[doc = "`titleID` - ID of the title to delete."] +#[doc = ""] + pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a title, provided that it is not a system title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to delete from."] - #[doc = "* `titleID` - ID of the title to delete."] - #[doc = ""] +#[doc = "Deletes a title, provided that it is not a system title."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to delete from."] +#[doc = "`titleID` - ID of the title to delete."] +#[doc = ""] + pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a ticket."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleID` - ID of the ticket to delete."] - #[doc = ""] +#[doc = "Deletes a ticket."] +#[doc = "# Arguments"] +#[doc = "`titleID` - ID of the ticket to delete."] +#[doc = ""] + pub fn AM_DeleteTicket(ticketId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a pending title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to delete from."] - #[doc = "* `titleId` - ID of the pending title to delete."] - #[doc = ""] +#[doc = "Deletes a pending title."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to delete from."] +#[doc = "`titleId` - ID of the pending title to delete."] +#[doc = ""] + pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes pending titles."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to delete from."] - #[doc = "* `flags` - Flags used to select pending titles."] - #[doc = ""] +#[doc = "Deletes pending titles."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to delete from."] +#[doc = "`flags` - Flags used to select pending titles."] +#[doc = ""] + pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all pending titles."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to delete from."] - #[doc = ""] +#[doc = "Deletes all pending titles."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to delete from."] +#[doc = ""] + pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] - #[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] - #[doc = ""] +#[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] +#[doc = ""] + pub fn AM_InstallNativeFirm() -> Result; } extern "C" { #[must_use] - #[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleID` - Title ID of the NATIVE_FIRM to install."] - #[doc = ""] +#[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] +#[doc = "# Arguments"] +#[doc = "`titleID` - Title ID of the NATIVE_FIRM to install."] +#[doc = ""] + pub fn AM_InstallFirm(titleID: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the product code of a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type of the title."] - #[doc = "* `titleID` - ID of the title."] - #[doc = "* `productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] - #[doc = ""] +#[doc = "Gets the product code of a title."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type of the title."] +#[doc = "`titleID` - ID of the title."] +#[doc = "`productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] +#[doc = ""] + pub fn AM_GetTitleProductCode( mediatype: FS_MediaType, titleId: u64_, @@ -10757,14 +10871,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the ext data ID of a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] - #[doc = "* `mediatype` - Media type of the title."] - #[doc = "* `titleID` - ID of the title."] - #[doc = ""] +#[doc = "Gets the ext data ID of a title."] +#[doc = "# Arguments"] +#[doc = "`extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] +#[doc = "`mediatype` - Media type of the title."] +#[doc = "`titleID` - ID of the title."] +#[doc = ""] + pub fn AM_GetTitleExtDataId( extDataId: *mut u64_, mediatype: FS_MediaType, @@ -10773,14 +10886,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an AM_TitleEntry instance for a CIA file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type that this CIA would be installed to."] - #[doc = "* `titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] - #[doc = "* `fileHandle` - Handle of the CIA file."] - #[doc = ""] +#[doc = "Gets an AM_TitleEntry instance for a CIA file."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type that this CIA would be installed to."] +#[doc = "`titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] +#[doc = "`fileHandle` - Handle of the CIA file."] +#[doc = ""] + pub fn AM_GetCiaFileInfo( mediatype: FS_MediaType, titleEntry: *mut AM_TitleEntry, @@ -10789,58 +10901,53 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the SMDH icon data of a CIA file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] - #[doc = "* `fileHandle` - Handle of the CIA file."] - #[doc = ""] +#[doc = "Gets the SMDH icon data of a CIA file."] +#[doc = "# Arguments"] +#[doc = "`icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] +#[doc = "`fileHandle` - Handle of the CIA file."] +#[doc = ""] + pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the title ID dependency list of a CIA file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] - #[doc = "* `fileHandle` - Handle of the CIA file."] - #[doc = ""] +#[doc = "Gets the title ID dependency list of a CIA file."] +#[doc = "# Arguments"] +#[doc = "`dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] +#[doc = "`fileHandle` - Handle of the CIA file."] +#[doc = ""] + pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the meta section offset of a CIA file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] - #[doc = "* `fileHandle` - Handle of the CIA file."] - #[doc = ""] +#[doc = "Gets the meta section offset of a CIA file."] +#[doc = "# Arguments"] +#[doc = "`metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] +#[doc = "`fileHandle` - Handle of the CIA file."] +#[doc = ""] + pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the core version of a CIA file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] - #[doc = "* `fileHandle` - Handle of the CIA file."] - #[doc = ""] +#[doc = "Gets the core version of a CIA file."] +#[doc = "# Arguments"] +#[doc = "`coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] +#[doc = "`fileHandle` - Handle of the CIA file."] +#[doc = ""] + pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the free space, in bytes, required to install a CIA file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] - #[doc = "* `mediaType` - Media type to check free space needed to install to."] - #[doc = "* `fileHandle` - Handle of the CIA file."] - #[doc = ""] +#[doc = "Gets the free space, in bytes, required to install a CIA file."] +#[doc = "# Arguments"] +#[doc = "`requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] +#[doc = "`mediaType` - Media type to check free space needed to install to."] +#[doc = "`fileHandle` - Handle of the CIA file."] +#[doc = ""] + pub fn AM_GetCiaRequiredSpace( requiredSpace: *mut u64_, mediaType: FS_MediaType, @@ -10849,14 +10956,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the full meta section of a CIA file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `meta` - Buffer to store the meta section in."] - #[doc = "* `size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] - #[doc = "* `fileHandle` - Handle of the CIA file."] - #[doc = ""] +#[doc = "Gets the full meta section of a CIA file."] +#[doc = "# Arguments"] +#[doc = "`meta` - Buffer to store the meta section in."] +#[doc = "`size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] +#[doc = "`fileHandle` - Handle of the CIA file."] +#[doc = ""] + pub fn AM_GetCiaMetaSection( meta: *mut ::libc::c_void, size: u32_, @@ -10865,106 +10971,101 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes the external (SD) title database."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `overwrite` - Overwrites the database if it already exists."] - #[doc = ""] +#[doc = "Initializes the external (SD) title database."] +#[doc = "# Arguments"] +#[doc = "`overwrite` - Overwrites the database if it already exists."] +#[doc = ""] + pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Queries whether the external title database is available."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `available` - Pointer to output the availability status to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Queries whether the external title database is available."] +#[doc = "# Arguments"] +#[doc = "`available` - Pointer to output the availability status to. [Direction: In, Out]"] +#[doc = ""] + pub fn AM_QueryAvailableExternalTitleDatabase(available: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Begins installing a ticket."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Begins installing a ticket."] +#[doc = "# Arguments"] +#[doc = "`ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] +#[doc = ""] + pub fn AM_InstallTicketBegin(ticketHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts installing a ticket."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ticketHandle` - Handle of the installation to abort."] - #[doc = ""] +#[doc = "Aborts installing a ticket."] +#[doc = "# Arguments"] +#[doc = "`ticketHandle` - Handle of the installation to abort."] +#[doc = ""] + pub fn AM_InstallTicketAbort(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing a ticket."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ticketHandle` - Handle of the installation to finalize."] - #[doc = ""] +#[doc = "Finishes installing a ticket."] +#[doc = "# Arguments"] +#[doc = "`ticketHandle` - Handle of the installation to finalize."] +#[doc = ""] + pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Begins installing a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Destination to install to."] - #[doc = "* `titleId` - ID of the title to install."] - #[doc = "* `unk` - Unknown. (usually false)"] - #[doc = ""] +#[doc = "Begins installing a title."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Destination to install to."] +#[doc = "`titleId` - ID of the title to install."] +#[doc = "`unk` - Unknown. (usually false)"] +#[doc = ""] + pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Stops installing a title, generally to be resumed later."] - #[doc = ""] +#[doc = "Stops installing a title, generally to be resumed later."] +#[doc = ""] + pub fn AM_InstallTitleStop() -> Result; } extern "C" { #[must_use] - #[doc = "Resumes installing a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Destination to install to."] - #[doc = "* `titleId` - ID of the title to install."] - #[doc = ""] +#[doc = "Resumes installing a title."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Destination to install to."] +#[doc = "`titleId` - ID of the title to install."] +#[doc = ""] + pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts installing a title."] - #[doc = ""] +#[doc = "Aborts installing a title."] +#[doc = ""] + pub fn AM_InstallTitleAbort() -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing a title."] - #[doc = ""] +#[doc = "Finishes installing a title."] +#[doc = ""] + pub fn AM_InstallTitleFinish() -> Result; } extern "C" { #[must_use] - #[doc = "Commits installed titles."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Location of the titles to finalize."] - #[doc = "* `titleCount` - Number of titles to finalize."] - #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] - #[doc = "* `titleIds` - Title IDs to finalize."] - #[doc = ""] +#[doc = "Commits installed titles."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Location of the titles to finalize."] +#[doc = "`titleCount` - Number of titles to finalize."] +#[doc = "`temp` - Whether the titles being finalized are in the temporary database."] +#[doc = "`titleIds` - Title IDs to finalize."] +#[doc = ""] + pub fn AM_CommitImportTitles( mediaType: FS_MediaType, titleCount: u32_, @@ -10974,77 +11075,70 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Begins installing a TMD."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Begins installing a TMD."] +#[doc = "# Arguments"] +#[doc = "`tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] +#[doc = ""] + pub fn AM_InstallTmdBegin(tmdHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Aborts installing a TMD."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `tmdHandle` - Handle of the installation to abort."] - #[doc = ""] +#[doc = "Aborts installing a TMD."] +#[doc = "# Arguments"] +#[doc = "`tmdHandle` - Handle of the installation to abort."] +#[doc = ""] + pub fn AM_InstallTmdAbort(tmdHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing a TMD."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `tmdHandle` - Handle of the installation to finalize."] - #[doc = "* `unk` - Unknown. (usually true)"] - #[doc = ""] +#[doc = "Finishes installing a TMD."] +#[doc = "# Arguments"] +#[doc = "`tmdHandle` - Handle of the installation to finalize."] +#[doc = "`unk` - Unknown. (usually true)"] +#[doc = ""] + pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares to import title contents."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `contentCount` - Number of contents to be imported."] - #[doc = "* `contentIndices` - Indices of the contents to be imported."] - #[doc = ""] +#[doc = "Prepares to import title contents."] +#[doc = "# Arguments"] +#[doc = "`contentCount` - Number of contents to be imported."] +#[doc = "`contentIndices` - Indices of the contents to be imported."] +#[doc = ""] + pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Begins installing title content."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] - #[doc = "* `index` - Index of the content to install."] - #[doc = ""] +#[doc = "Begins installing title content."] +#[doc = "# Arguments"] +#[doc = "`contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] +#[doc = "`index` - Index of the content to install."] +#[doc = ""] + pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Stops installing title content, generally to be resumed later."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `contentHandle` - Handle of the installation to abort."] - #[doc = ""] +#[doc = "Stops installing title content, generally to be resumed later."] +#[doc = "# Arguments"] +#[doc = "`contentHandle` - Handle of the installation to abort."] +#[doc = ""] + pub fn AM_InstallContentStop(contentHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Resumes installing title content."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] - #[doc = "* `resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] - #[doc = "* `index` - Index of the content to install."] - #[doc = ""] +#[doc = "Resumes installing title content."] +#[doc = "# Arguments"] +#[doc = "`contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] +#[doc = "`resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] +#[doc = "`index` - Index of the content to install."] +#[doc = ""] + pub fn AM_InstallContentResume( contentHandle: *mut Handle, resumeOffset: *mut u64_, @@ -11053,39 +11147,36 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Cancels installing title content."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `contentHandle` - Handle of the installation to finalize."] - #[doc = ""] +#[doc = "Cancels installing title content."] +#[doc = "# Arguments"] +#[doc = "`contentHandle` - Handle of the installation to finalize."] +#[doc = ""] + pub fn AM_InstallContentCancel(contentHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Finishes installing title content."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `contentHandle` - Handle of the installation to finalize."] - #[doc = ""] +#[doc = "Finishes installing title content."] +#[doc = "# Arguments"] +#[doc = "`contentHandle` - Handle of the installation to finalize."] +#[doc = ""] + pub fn AM_InstallContentFinish(contentHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Imports up to four certificates into the ticket certificate chain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cert1Size` - Size of the first certificate."] - #[doc = "* `cert1` - Data of the first certificate."] - #[doc = "* `cert2Size` - Size of the second certificate."] - #[doc = "* `cert2` - Data of the second certificate."] - #[doc = "* `cert3Size` - Size of the third certificate."] - #[doc = "* `cert3` - Data of the third certificate."] - #[doc = "* `cert4Size` - Size of the fourth certificate."] - #[doc = "* `cert4` - Data of the fourth certificate."] - #[doc = ""] +#[doc = "Imports up to four certificates into the ticket certificate chain."] +#[doc = "# Arguments"] +#[doc = "`cert1Size` - Size of the first certificate."] +#[doc = "`cert1` - Data of the first certificate."] +#[doc = "`cert2Size` - Size of the second certificate."] +#[doc = "`cert2` - Data of the second certificate."] +#[doc = "`cert3Size` - Size of the third certificate."] +#[doc = "`cert3` - Data of the third certificate."] +#[doc = "`cert4Size` - Size of the fourth certificate."] +#[doc = "`cert4` - Data of the fourth certificate."] +#[doc = ""] + pub fn AM_ImportCertificates( cert1Size: u32_, cert1: *mut ::libc::c_void, @@ -11099,26 +11190,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Imports a certificate into the ticket certificate chain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `certSize` - Size of the certificate."] - #[doc = "* `cert` - Data of the certificate."] - #[doc = ""] +#[doc = "Imports a certificate into the ticket certificate chain."] +#[doc = "# Arguments"] +#[doc = "`certSize` - Size of the certificate."] +#[doc = "`cert` - Data of the certificate."] +#[doc = ""] + pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Commits installed titles, and updates FIRM if necessary."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Location of the titles to finalize."] - #[doc = "* `titleCount` - Number of titles to finalize."] - #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] - #[doc = "* `titleIds` - Title IDs to finalize."] - #[doc = ""] +#[doc = "Commits installed titles, and updates FIRM if necessary."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Location of the titles to finalize."] +#[doc = "`titleCount` - Number of titles to finalize."] +#[doc = "`temp` - Whether the titles being finalized are in the temporary database."] +#[doc = "`titleIds` - Title IDs to finalize."] +#[doc = ""] + pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto( mediaType: FS_MediaType, titleCount: u32_, @@ -11128,42 +11217,43 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Resets play count of all installed demos by deleting their launch info."] - #[doc = ""] +#[doc = "Resets play count of all installed demos by deleting their launch info."] +#[doc = ""] + pub fn AM_DeleteAllDemoLaunchInfos() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes temporary titles."] - #[doc = ""] +#[doc = "Deletes temporary titles."] +#[doc = ""] + pub fn AM_DeleteAllTemporaryTitles() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all expired titles."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Media type to delete from."] - #[doc = ""] +#[doc = "Deletes all expired titles."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Media type to delete from."] +#[doc = ""] + pub fn AM_DeleteAllExpiredTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all TWL titles."] - #[doc = ""] +#[doc = "Deletes all TWL titles."] +#[doc = ""] + pub fn AM_DeleteAllTwlTitles() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the number of content index installed under the specified DLC title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `count` - Pointer to output the number of content indices to. [Direction: In, Out]"] - #[doc = "* `mediatype` - Media type of the title."] - #[doc = "* `titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] - #[doc = ""] +#[doc = "Gets the number of content index installed under the specified DLC title."] +#[doc = "# Arguments"] +#[doc = "`count` - Pointer to output the number of content indices to. [Direction: In, Out]"] +#[doc = "`mediatype` - Media type of the title."] +#[doc = "`titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] +#[doc = ""] + pub fn AMAPP_GetDLCContentInfoCount( count: *mut u32_, mediatype: FS_MediaType, @@ -11172,17 +11262,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets content infos installed under the specified DLC title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `contentInfoRead` - Pointer to output the number of content infos read to. [Direction: In, Out]"] - #[doc = "* `mediatype` - Media type of the title."] - #[doc = "* `titleID` - Title ID to retrieve the content infos for (high-id is 0x0004008C)."] - #[doc = "* `contentInfoCount` - Number of content infos to retrieve."] - #[doc = "* `offset` - Offset from the first content index the count starts at."] - #[doc = "* `contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Gets content infos installed under the specified DLC title."] +#[doc = "# Arguments"] +#[doc = "`contentInfoRead` - Pointer to output the number of content infos read to. [Direction: In, Out]"] +#[doc = "`mediatype` - Media type of the title."] +#[doc = "`titleID` - Title ID to retrieve the content infos for (high-id is 0x0004008C)."] +#[doc = "`contentInfoCount` - Number of content infos to retrieve."] +#[doc = "`offset` - Offset from the first content index the count starts at."] +#[doc = "`contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] +#[doc = ""] + pub fn AMAPP_ListDLCContentInfos( contentInfoRead: *mut u32_, mediatype: FS_MediaType, @@ -11194,32 +11283,31 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes AMPXI."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] - #[doc = ""] +#[doc = "Initializes AMPXI."] +#[doc = "# Arguments"] +#[doc = "`servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] +#[doc = ""] + pub fn ampxiInit(servhandle: Handle) -> Result; } extern "C" { - #[doc = "Exits AMPXI."] - #[doc = ""] +#[doc = "Exits AMPXI."] +#[doc = ""] + pub fn ampxiExit(); } extern "C" { #[must_use] - #[doc = "Writes a TWL save-file to NAND. "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleid` - ID of the TWL title."] - #[doc = "* `buffer` - Savedata buffer ptr."] - #[doc = "* `size` - Size of the savedata buffer."] - #[doc = "* `image_filepos` - Filepos to use for writing the data to the NAND savedata file."] - #[doc = "* `section_type` - "] - #[doc = "* `operation` - "] - #[doc = ""] +#[doc = "Writes a TWL save-file to NAND. "] +#[doc = "# Arguments"] +#[doc = "`titleid` - ID of the TWL title."] +#[doc = "`buffer` - Savedata buffer ptr."] +#[doc = "`size` - Size of the savedata buffer."] +#[doc = "`image_filepos` - Filepos to use for writing the data to the NAND savedata file."] +#[doc = "`section_type` - "] +#[doc = "`operation` - "] +#[doc = ""] + pub fn AMPXI_WriteTWLSavedata( titleid: u64_, buffer: *mut u8_, @@ -11231,16 +11319,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Finalizes title installation. "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Mediatype of the titles to finalize."] - #[doc = "* `db` - Which title database to use."] - #[doc = "* `size` - Size of the savedata buffer."] - #[doc = "* `titlecount` - Total titles."] - #[doc = "* `tidlist` - List of titleIDs."] - #[doc = ""] +#[doc = "Finalizes title installation. "] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Mediatype of the titles to finalize."] +#[doc = "`db` - Which title database to use."] +#[doc = "`size` - Size of the savedata buffer."] +#[doc = "`titlecount` - Total titles."] +#[doc = "`tidlist` - List of titleIDs."] +#[doc = ""] + pub fn AMPXI_InstallTitlesFinish( mediaType: FS_MediaType, db: u8_, @@ -11252,116 +11339,143 @@ pub const APPID_NONE: NS_APPID = 0; #[doc = "Home Menu"] #[doc = ""] + pub const APPID_HOMEMENU: NS_APPID = 257; #[doc = "Camera applet"] #[doc = ""] + pub const APPID_CAMERA: NS_APPID = 272; #[doc = "Friends List applet"] #[doc = ""] + pub const APPID_FRIENDS_LIST: NS_APPID = 274; #[doc = "Game Notes applet"] #[doc = ""] + pub const APPID_GAME_NOTES: NS_APPID = 275; #[doc = "Internet Browser"] #[doc = ""] + pub const APPID_WEB: NS_APPID = 276; #[doc = "Instruction Manual applet"] #[doc = ""] + pub const APPID_INSTRUCTION_MANUAL: NS_APPID = 277; #[doc = "Notifications applet"] #[doc = ""] + pub const APPID_NOTIFICATIONS: NS_APPID = 278; #[doc = "Miiverse applet (olv)"] #[doc = ""] + pub const APPID_MIIVERSE: NS_APPID = 279; #[doc = "Miiverse posting applet (solv3)"] #[doc = ""] + pub const APPID_MIIVERSE_POSTING: NS_APPID = 280; #[doc = "Amiibo settings applet (cabinet)"] #[doc = ""] + pub const APPID_AMIIBO_SETTINGS: NS_APPID = 281; #[doc = "Application"] #[doc = ""] + pub const APPID_APPLICATION: NS_APPID = 768; #[doc = "eShop (tiger)"] #[doc = ""] + pub const APPID_ESHOP: NS_APPID = 769; #[doc = "Software Keyboard"] #[doc = ""] + pub const APPID_SOFTWARE_KEYBOARD: NS_APPID = 1025; #[doc = "appletEd"] #[doc = ""] + pub const APPID_APPLETED: NS_APPID = 1026; #[doc = "PNOTE_AP"] #[doc = ""] + pub const APPID_PNOTE_AP: NS_APPID = 1028; #[doc = "SNOTE_AP"] #[doc = ""] + pub const APPID_SNOTE_AP: NS_APPID = 1029; #[doc = "error"] #[doc = ""] + pub const APPID_ERROR: NS_APPID = 1030; #[doc = "mint"] #[doc = ""] + pub const APPID_MINT: NS_APPID = 1031; #[doc = "extrapad"] #[doc = ""] + pub const APPID_EXTRAPAD: NS_APPID = 1032; #[doc = "memolib"] #[doc = ""] + pub const APPID_MEMOLIB: NS_APPID = 1033; #[doc = "NS Application IDs."] -#[doc = ""] #[doc = "Retrieved from "] #[doc = ""] + pub type NS_APPID = ::libc::c_uint; #[doc = "No position specified."] #[doc = ""] + pub const APTPOS_NONE: APT_AppletPos = -1; #[doc = "Application."] #[doc = ""] + pub const APTPOS_APP: APT_AppletPos = 0; #[doc = "Application library (?)."] #[doc = ""] + pub const APTPOS_APPLIB: APT_AppletPos = 1; #[doc = "System applet."] #[doc = ""] + pub const APTPOS_SYS: APT_AppletPos = 2; #[doc = "System library (?)."] #[doc = ""] + pub const APTPOS_SYSLIB: APT_AppletPos = 3; #[doc = "Resident applet."] #[doc = ""] + pub const APTPOS_RESIDENT: APT_AppletPos = 4; #[doc = "APT applet position."] #[doc = ""] + pub type APT_AppletPos = ::libc::c_int; pub type APT_AppletAttr = u8_; pub const APTREPLY_REJECT: APT_QueryReply = 0; @@ -11370,137 +11484,171 @@ pub const APTREPLY_LATER: APT_QueryReply = 2; #[doc = "APT query reply."] #[doc = ""] + pub type APT_QueryReply = ::libc::c_uint; #[doc = "No signal received."] #[doc = ""] + pub const APTSIGNAL_NONE: APT_Signal = 0; #[doc = "HOME button pressed."] #[doc = ""] + pub const APTSIGNAL_HOMEBUTTON: APT_Signal = 1; #[doc = "HOME button pressed (again?)."] #[doc = ""] + pub const APTSIGNAL_HOMEBUTTON2: APT_Signal = 2; #[doc = "Prepare to enter sleep mode."] #[doc = ""] + pub const APTSIGNAL_SLEEP_QUERY: APT_Signal = 3; #[doc = "Triggered when ptm:s GetShellStatus() returns 5."] #[doc = ""] + pub const APTSIGNAL_SLEEP_CANCEL: APT_Signal = 4; #[doc = "Enter sleep mode."] #[doc = ""] + pub const APTSIGNAL_SLEEP_ENTER: APT_Signal = 5; #[doc = "Wake from sleep mode."] #[doc = ""] + pub const APTSIGNAL_SLEEP_WAKEUP: APT_Signal = 6; #[doc = "Shutdown."] #[doc = ""] + pub const APTSIGNAL_SHUTDOWN: APT_Signal = 7; #[doc = "POWER button pressed."] #[doc = ""] + pub const APTSIGNAL_POWERBUTTON: APT_Signal = 8; #[doc = "POWER button cleared (?)."] #[doc = ""] + pub const APTSIGNAL_POWERBUTTON2: APT_Signal = 9; #[doc = "System sleeping (?)."] #[doc = ""] + pub const APTSIGNAL_TRY_SLEEP: APT_Signal = 10; #[doc = "Order to close (such as when an error happens?)."] #[doc = ""] + pub const APTSIGNAL_ORDERTOCLOSE: APT_Signal = 11; #[doc = "APT signals."] #[doc = ""] + pub type APT_Signal = ::libc::c_uint; #[doc = "No command received."] #[doc = ""] + pub const APTCMD_NONE: APT_Command = 0; #[doc = "Applet should wake up."] #[doc = ""] + pub const APTCMD_WAKEUP: APT_Command = 1; #[doc = "Source applet sent us a parameter."] #[doc = ""] + pub const APTCMD_REQUEST: APT_Command = 2; #[doc = "Target applet replied to our parameter."] #[doc = ""] + pub const APTCMD_RESPONSE: APT_Command = 3; #[doc = "Exit (??)"] #[doc = ""] + pub const APTCMD_EXIT: APT_Command = 4; #[doc = "Message (??)"] #[doc = ""] + pub const APTCMD_MESSAGE: APT_Command = 5; #[doc = "HOME button pressed once."] #[doc = ""] + pub const APTCMD_HOMEBUTTON_ONCE: APT_Command = 6; #[doc = "HOME button pressed twice (double-pressed)."] #[doc = ""] + pub const APTCMD_HOMEBUTTON_TWICE: APT_Command = 7; #[doc = "DSP should sleep (manual DSP rights related?)."] #[doc = ""] + pub const APTCMD_DSP_SLEEP: APT_Command = 8; #[doc = "DSP should wake up (manual DSP rights related?)."] #[doc = ""] + pub const APTCMD_DSP_WAKEUP: APT_Command = 9; #[doc = "Applet wakes up due to a different applet exiting."] #[doc = ""] + pub const APTCMD_WAKEUP_EXIT: APT_Command = 10; #[doc = "Applet wakes up after being paused through HOME menu."] #[doc = ""] + pub const APTCMD_WAKEUP_PAUSE: APT_Command = 11; #[doc = "Applet wakes up due to being cancelled."] #[doc = ""] + pub const APTCMD_WAKEUP_CANCEL: APT_Command = 12; #[doc = "Applet wakes up due to all applets being cancelled."] #[doc = ""] + pub const APTCMD_WAKEUP_CANCELALL: APT_Command = 13; #[doc = "Applet wakes up due to POWER button being pressed (?)."] #[doc = ""] + pub const APTCMD_WAKEUP_POWERBUTTON: APT_Command = 14; #[doc = "Applet wakes up and is instructed to jump to HOME menu (?)."] #[doc = ""] + pub const APTCMD_WAKEUP_JUMPTOHOME: APT_Command = 15; #[doc = "Request for sysapplet (?)."] #[doc = ""] + pub const APTCMD_SYSAPPLET_REQUEST: APT_Command = 16; #[doc = "Applet wakes up and is instructed to launch another applet (?)."] #[doc = ""] + pub const APTCMD_WAKEUP_LAUNCHAPP: APT_Command = 17; #[doc = "APT commands."] #[doc = ""] + pub type APT_Command = ::libc::c_uint; #[doc = "APT capture buffer information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct aptCaptureBufInfo { @@ -11519,49 +11667,61 @@ pub struct aptCaptureBufInfo__bindgen_ty_1 { #[doc = "App suspended."] #[doc = ""] + pub const APTHOOK_ONSUSPEND: APT_HookType = 0; #[doc = "App restored."] #[doc = ""] + pub const APTHOOK_ONRESTORE: APT_HookType = 1; #[doc = "App sleeping."] #[doc = ""] + pub const APTHOOK_ONSLEEP: APT_HookType = 2; #[doc = "App waking up."] #[doc = ""] + pub const APTHOOK_ONWAKEUP: APT_HookType = 3; #[doc = "App exiting."] #[doc = ""] + pub const APTHOOK_ONEXIT: APT_HookType = 4; #[doc = "Number of APT hook types."] #[doc = ""] + pub const APTHOOK_COUNT: APT_HookType = 5; #[doc = "APT hook types."] #[doc = ""] + pub type APT_HookType = ::libc::c_uint; #[doc = "APT hook function."] #[doc = ""] + pub type aptHookFn = ::core::option::Option; #[doc = "APT hook cookie."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_aptHookCookie { - #[doc = "Next cookie."] - #[doc = ""] +#[doc = "Next cookie."] +#[doc = ""] + pub next: *mut tag_aptHookCookie, - #[doc = "Hook callback."] - #[doc = ""] +#[doc = "Hook callback."] +#[doc = ""] + pub callback: aptHookFn, - #[doc = "Callback parameter."] - #[doc = ""] +#[doc = "Callback parameter."] +#[doc = ""] + pub param: *mut ::libc::c_void, } impl Default for tag_aptHookCookie { @@ -11576,10 +11736,12 @@ impl Default for tag_aptHookCookie { #[doc = "APT hook cookie."] #[doc = ""] + pub type aptHookCookie = tag_aptHookCookie; #[doc = "APT message callback."] #[doc = ""] + pub type aptMessageCb = ::core::option::Option< unsafe extern "C" fn( user: *mut ::libc::c_void, @@ -11590,124 +11752,130 @@ pub type aptMessageCb = ::core::option::Option< >; extern "C" { #[must_use] - #[doc = "Initializes APT."] - #[doc = ""] +#[doc = "Initializes APT."] +#[doc = ""] + pub fn aptInit() -> Result; } extern "C" { - #[doc = "Exits APT."] - #[doc = ""] +#[doc = "Exits APT."] +#[doc = ""] + pub fn aptExit(); } extern "C" { #[must_use] - #[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] - #[doc = ""] +#[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] +#[doc = "# Arguments"] +#[doc = "`aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] +#[doc = ""] + pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result; } extern "C" { - #[doc = "Returns true if the application is currently in the foreground."] - #[doc = ""] +#[doc = "Returns true if the application is currently in the foreground."] +#[doc = ""] + pub fn aptIsActive() -> bool; } extern "C" { - #[doc = "Returns true if the system has told the application to close."] - #[doc = ""] +#[doc = "Returns true if the system has told the application to close."] +#[doc = ""] + pub fn aptShouldClose() -> bool; } extern "C" { - #[doc = "Returns true if the system can enter sleep mode while the application is active."] - #[doc = ""] +#[doc = "Returns true if the system can enter sleep mode while the application is active."] +#[doc = ""] + pub fn aptIsSleepAllowed() -> bool; } extern "C" { - #[doc = "Configures whether the system can enter sleep mode while the application is active."] - #[doc = ""] +#[doc = "Configures whether the system can enter sleep mode while the application is active."] +#[doc = ""] + pub fn aptSetSleepAllowed(allowed: bool); } extern "C" { - #[doc = "Handles incoming sleep mode requests."] - #[doc = ""] +#[doc = "Handles incoming sleep mode requests."] +#[doc = ""] + pub fn aptHandleSleep(); } extern "C" { - #[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] - #[doc = ""] +#[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] +#[doc = ""] + pub fn aptIsHomeAllowed() -> bool; } extern "C" { - #[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] - #[doc = ""] +#[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] +#[doc = ""] + pub fn aptSetHomeAllowed(allowed: bool); } extern "C" { - #[doc = "Returns true if the system requires the application to jump back to the HOME menu."] - #[doc = ""] +#[doc = "Returns true if the system requires the application to jump back to the HOME menu."] +#[doc = ""] + pub fn aptShouldJumpToHome() -> bool; } extern "C" { - #[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by [`aptSetHomeAllowed`] (use this to show a \"no HOME allowed\" icon)."] - #[doc = ""] +#[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by [`aptSetHomeAllowed`] (use this to show a \"no HOME allowed\" icon)."] +#[doc = ""] + pub fn aptCheckHomePressRejected() -> bool; } extern "C" { - #[doc = "Jumps back to the HOME menu."] - #[doc = ""] +#[doc = "Jumps back to the HOME menu."] +#[doc = ""] + pub fn aptJumpToHomeMenu(); } extern "C" { - #[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* true if the application should keep running, false otherwise (see [`aptShouldClose)`]"] - #[doc = ""] +#[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] +#[doc = "Returns:"] +#[doc = "true if the application should keep running, false otherwise (see [`aptShouldClose)`]"] +#[doc = ""] + pub fn aptMainLoop() -> bool; } extern "C" { - #[doc = "Sets up an APT status hook."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cookie` - Hook cookie to use."] - #[doc = "* `callback` - Function to call when APT's status changes."] - #[doc = "* `param` - User-defined parameter to pass to the callback."] - #[doc = ""] +#[doc = "Sets up an APT status hook."] +#[doc = "# Arguments"] +#[doc = "`cookie` - Hook cookie to use."] +#[doc = "`callback` - Function to call when APT's status changes."] +#[doc = "`param` - User-defined parameter to pass to the callback."] +#[doc = ""] + pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut ::libc::c_void); } extern "C" { - #[doc = "Removes an APT status hook."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cookie` - Hook cookie to remove."] - #[doc = ""] +#[doc = "Removes an APT status hook."] +#[doc = "# Arguments"] +#[doc = "`cookie` - Hook cookie to remove."] +#[doc = ""] + pub fn aptUnhook(cookie: *mut aptHookCookie); } extern "C" { - #[doc = "Sets the function to be called when an APT message from another applet is received."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `callback` - Callback function."] - #[doc = "* `user` - User-defined data to be passed to the callback."] - #[doc = ""] +#[doc = "Sets the function to be called when an APT message from another applet is received."] +#[doc = "# Arguments"] +#[doc = "`callback` - Callback function."] +#[doc = "`user` - User-defined data to be passed to the callback."] +#[doc = ""] + pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut ::libc::c_void); } extern "C" { - #[doc = "Launches a library applet."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appId` - ID of the applet to launch."] - #[doc = "* `buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] - #[doc = "* `bufsize` - Size of the buffer."] - #[doc = "* `handle` - Handle to pass to the library applet."] - #[doc = ""] +#[doc = "Launches a library applet."] +#[doc = "# Arguments"] +#[doc = "`appId` - ID of the applet to launch."] +#[doc = "`buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] +#[doc = "`bufsize` - Size of the buffer."] +#[doc = "`handle` - Handle to pass to the library applet."] +#[doc = ""] + pub fn aptLaunchLibraryApplet( appId: NS_APPID, buf: *mut ::libc::c_void, @@ -11716,47 +11884,46 @@ extern "C" { ); } extern "C" { - #[doc = "Clears the chainloader state."] - #[doc = ""] +#[doc = "Clears the chainloader state."] +#[doc = ""] + pub fn aptClearChainloader(); } extern "C" { - #[doc = "Configures the chainloader to launch a specific application."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programID` - ID of the program to chainload to."] - #[doc = "* `mediatype` - Media type of the program to chainload to."] - #[doc = ""] +#[doc = "Configures the chainloader to launch a specific application."] +#[doc = "# Arguments"] +#[doc = "`programID` - ID of the program to chainload to."] +#[doc = "`mediatype` - Media type of the program to chainload to."] +#[doc = ""] + pub fn aptSetChainloader(programID: u64_, mediatype: u8_); } extern "C" { - #[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] - #[doc = ""] +#[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] +#[doc = ""] + pub fn aptSetChainloaderToSelf(); } extern "C" { #[must_use] - #[doc = "Gets an APT lock handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flags` - Flags to use."] - #[doc = "* `lockHandle` - Pointer to output the lock handle to."] - #[doc = ""] - pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result; +#[doc = "Gets an APT lock handle."] +#[doc = "# Arguments"] +#[doc = "`flags` - Flags to use."] +#[doc = "`lockHandle` - Pointer to output the lock handle to."] +#[doc = ""] + + pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes an application's registration with APT."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appId` - ID of the application."] - #[doc = "* `attr` - Attributes of the application."] - #[doc = "* `signalEvent` - Pointer to output the signal event handle to."] - #[doc = "* `resumeEvent` - Pointer to output the resume event handle to."] - #[doc = ""] +#[doc = "Initializes an application's registration with APT."] +#[doc = "# Arguments"] +#[doc = "`appId` - ID of the application."] +#[doc = "`attr` - Attributes of the application."] +#[doc = "`signalEvent` - Pointer to output the signal event handle to."] +#[doc = "`resumeEvent` - Pointer to output the resume event handle to."] +#[doc = ""] + pub fn APT_Initialize( appId: NS_APPID, attr: APT_AppletAttr, @@ -11766,42 +11933,40 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Terminates an application's registration with APT."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - ID of the application."] - #[doc = ""] +#[doc = "Terminates an application's registration with APT."] +#[doc = "# Arguments"] +#[doc = "`appID` - ID of the application."] +#[doc = ""] + pub fn APT_Finalize(appId: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Asynchronously resets the hardware."] - #[doc = ""] +#[doc = "Asynchronously resets the hardware."] +#[doc = ""] + pub fn APT_HardwareResetAsync() -> Result; } extern "C" { #[must_use] - #[doc = "Enables APT."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `attr` - Attributes of the application."] - #[doc = ""] +#[doc = "Enables APT."] +#[doc = "# Arguments"] +#[doc = "`attr` - Attributes of the application."] +#[doc = ""] + pub fn APT_Enable(attr: APT_AppletAttr) -> Result; } extern "C" { #[must_use] - #[doc = "Gets applet management info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inpos` - Requested applet position."] - #[doc = "* `outpos` - Pointer to output the position of the current applet to."] - #[doc = "* `req_appid` - Pointer to output the AppID of the applet at the requested position to."] - #[doc = "* `menu_appid` - Pointer to output the HOME menu AppID to."] - #[doc = "* `active_appid` - Pointer to output the AppID of the currently active applet to."] - #[doc = ""] +#[doc = "Gets applet management info."] +#[doc = "# Arguments"] +#[doc = "`inpos` - Requested applet position."] +#[doc = "`outpos` - Pointer to output the position of the current applet to."] +#[doc = "`req_appid` - Pointer to output the AppID of the applet at the requested position to."] +#[doc = "`menu_appid` - Pointer to output the HOME menu AppID to."] +#[doc = "`active_appid` - Pointer to output the AppID of the currently active applet to."] +#[doc = ""] + pub fn APT_GetAppletManInfo( inpos: APT_AppletPos, outpos: *mut APT_AppletPos, @@ -11812,17 +11977,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an applet's information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - AppID of the applet."] - #[doc = "* `pProgramID` - Pointer to output the program ID to."] - #[doc = "* `pMediaType` - Pointer to output the media type to."] - #[doc = "* `pRegistered` - Pointer to output the registration status to."] - #[doc = "* `pLoadState` - Pointer to output the load state to."] - #[doc = "* `pAttributes` - Pointer to output the applet atrributes to."] - #[doc = ""] +#[doc = "Gets an applet's information."] +#[doc = "# Arguments"] +#[doc = "`appID` - AppID of the applet."] +#[doc = "`pProgramID` - Pointer to output the program ID to."] +#[doc = "`pMediaType` - Pointer to output the media type to."] +#[doc = "`pRegistered` - Pointer to output the registration status to."] +#[doc = "`pLoadState` - Pointer to output the load state to."] +#[doc = "`pAttributes` - Pointer to output the applet atrributes to."] +#[doc = ""] + pub fn APT_GetAppletInfo( appID: NS_APPID, pProgramID: *mut u64_, @@ -11834,50 +11998,47 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an applet's program information."] - #[doc = ""] - #[doc = "Flags:"] - #[doc = "- 0x01: Use AM_ListTitles with NAND media type."] - #[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] - #[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] - #[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] - #[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] - #[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the applet."] - #[doc = "* `flags` - Flags to use when retreiving the information."] - #[doc = "* `titleversion` - Pointer to output the applet's title version to."] - #[doc = ""] +#[doc = "Gets an applet's program information."] +#[doc = "Flags:"] +#[doc = "- 0x01: Use AM_ListTitles with NAND media type."] +#[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] +#[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] +#[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] +#[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] +#[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the applet."] +#[doc = "`flags` - Flags to use when retreiving the information."] +#[doc = "`titleversion` - Pointer to output the applet's title version to."] +#[doc = ""] + pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current application's program ID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pProgramID` - Pointer to output the program ID to."] - #[doc = ""] +#[doc = "Gets the current application's program ID."] +#[doc = "# Arguments"] +#[doc = "`pProgramID` - Pointer to output the program ID to."] +#[doc = ""] + pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares to jump to the home menu."] - #[doc = ""] +#[doc = "Prepares to jump to the home menu."] +#[doc = ""] + pub fn APT_PrepareToJumpToHomeMenu() -> Result; } extern "C" { #[must_use] - #[doc = "Jumps to the home menu."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `param` - Parameters to jump with."] - #[doc = "* `Size` - of the parameter buffer."] - #[doc = "* `handle` - Handle to pass."] - #[doc = ""] +#[doc = "Jumps to the home menu."] +#[doc = "# Arguments"] +#[doc = "`param` - Parameters to jump with."] +#[doc = "`Size` - of the parameter buffer."] +#[doc = "`handle` - Handle to pass."] +#[doc = ""] + pub fn APT_JumpToHomeMenu( param: *const ::libc::c_void, paramSize: size_t, @@ -11886,24 +12047,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Prepares to jump to an application."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `exiting` - Specifies whether the applet is exiting."] - #[doc = ""] +#[doc = "Prepares to jump to an application."] +#[doc = "# Arguments"] +#[doc = "`exiting` - Specifies whether the applet is exiting."] +#[doc = ""] + pub fn APT_PrepareToJumpToApplication(exiting: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Jumps to an application."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `param` - Parameters to jump with."] - #[doc = "* `Size` - of the parameter buffer."] - #[doc = "* `handle` - Handle to pass."] - #[doc = ""] +#[doc = "Jumps to an application."] +#[doc = "# Arguments"] +#[doc = "`param` - Parameters to jump with."] +#[doc = "`Size` - of the parameter buffer."] +#[doc = "`handle` - Handle to pass."] +#[doc = ""] + pub fn APT_JumpToApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -11912,60 +12071,54 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets whether an application is registered."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - ID of the application."] - #[doc = "* `out` - Pointer to output the registration state to."] - #[doc = ""] +#[doc = "Gets whether an application is registered."] +#[doc = "# Arguments"] +#[doc = "`appID` - ID of the application."] +#[doc = "`out` - Pointer to output the registration state to."] +#[doc = ""] + pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Inquires as to whether a signal has been received."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - ID of the application."] - #[doc = "* `signalType` - Pointer to output the signal type to."] - #[doc = ""] +#[doc = "Inquires as to whether a signal has been received."] +#[doc = "# Arguments"] +#[doc = "`appID` - ID of the application."] +#[doc = "`signalType` - Pointer to output the signal type to."] +#[doc = ""] + pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result; } extern "C" { #[must_use] - #[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] - #[doc = ""] - #[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] - #[doc = ""] +#[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] +#[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] +#[doc = "# Arguments"] +#[doc = "`wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] +#[doc = ""] + pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result; } extern "C" { #[must_use] - #[doc = "Notifies an application to wait."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - ID of the application."] - #[doc = ""] +#[doc = "Notifies an application to wait."] +#[doc = "# Arguments"] +#[doc = "`appID` - ID of the application."] +#[doc = ""] + pub fn APT_NotifyToWait(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Calls an applet utility function."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - Utility function to call."] - #[doc = "* `out` - Pointer to write output data to."] - #[doc = "* `outSize` - Size of the output buffer."] - #[doc = "* `in` - Pointer to the input data."] - #[doc = "* `inSize` - Size of the input buffer."] - #[doc = ""] +#[doc = "Calls an applet utility function."] +#[doc = "# Arguments"] +#[doc = "`id` - Utility function to call."] +#[doc = "`out` - Pointer to write output data to."] +#[doc = "`outSize` - Size of the output buffer."] +#[doc = "`in` - Pointer to the input data."] +#[doc = "`inSize` - Size of the input buffer."] +#[doc = ""] + pub fn APT_AppletUtility( id: ::libc::c_int, out: *mut ::libc::c_void, @@ -11976,56 +12129,53 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sleeps if shell is closed (?)."] - #[doc = ""] +#[doc = "Sleeps if shell is closed (?)."] +#[doc = ""] + pub fn APT_SleepIfShellClosed() -> Result; } extern "C" { #[must_use] - #[doc = "Locks a transition (?)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `transition` - Transition ID."] - #[doc = "* `flag` - Flag (?)"] - #[doc = ""] +#[doc = "Locks a transition (?)."] +#[doc = "# Arguments"] +#[doc = "`transition` - Transition ID."] +#[doc = "`flag` - Flag (?)"] +#[doc = ""] + pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Tries to lock a transition (?)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `transition` - Transition ID."] - #[doc = "* `succeeded` - Pointer to output whether the lock was successfully applied."] - #[doc = ""] +#[doc = "Tries to lock a transition (?)."] +#[doc = "# Arguments"] +#[doc = "`transition` - Transition ID."] +#[doc = "`succeeded` - Pointer to output whether the lock was successfully applied."] +#[doc = ""] + pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Unlocks a transition (?)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `transition` - Transition ID."] - #[doc = ""] +#[doc = "Unlocks a transition (?)."] +#[doc = "# Arguments"] +#[doc = "`transition` - Transition ID."] +#[doc = ""] + pub fn APT_UnlockTransition(transition: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Glances at a receieved parameter without removing it from the queue."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - AppID of the application."] - #[doc = "* `buffer` - Buffer to receive to."] - #[doc = "* `bufferSize` - Size of the buffer."] - #[doc = "* `sender` - Pointer to output the sender's AppID to."] - #[doc = "* `command` - Pointer to output the command ID to."] - #[doc = "* `actualSize` - Pointer to output the actual received data size to."] - #[doc = "* `parameter` - Pointer to output the parameter handle to."] - #[doc = ""] +#[doc = "Glances at a receieved parameter without removing it from the queue."] +#[doc = "# Arguments"] +#[doc = "`appID` - AppID of the application."] +#[doc = "`buffer` - Buffer to receive to."] +#[doc = "`bufferSize` - Size of the buffer."] +#[doc = "`sender` - Pointer to output the sender's AppID to."] +#[doc = "`command` - Pointer to output the command ID to."] +#[doc = "`actualSize` - Pointer to output the actual received data size to."] +#[doc = "`parameter` - Pointer to output the parameter handle to."] +#[doc = ""] + pub fn APT_GlanceParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -12038,18 +12188,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Receives a parameter."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - AppID of the application."] - #[doc = "* `buffer` - Buffer to receive to."] - #[doc = "* `bufferSize` - Size of the buffer."] - #[doc = "* `sender` - Pointer to output the sender's AppID to."] - #[doc = "* `command` - Pointer to output the command ID to."] - #[doc = "* `actualSize` - Pointer to output the actual received data size to."] - #[doc = "* `parameter` - Pointer to output the parameter handle to."] - #[doc = ""] +#[doc = "Receives a parameter."] +#[doc = "# Arguments"] +#[doc = "`appID` - AppID of the application."] +#[doc = "`buffer` - Buffer to receive to."] +#[doc = "`bufferSize` - Size of the buffer."] +#[doc = "`sender` - Pointer to output the sender's AppID to."] +#[doc = "`command` - Pointer to output the command ID to."] +#[doc = "`actualSize` - Pointer to output the actual received data size to."] +#[doc = "`parameter` - Pointer to output the parameter handle to."] +#[doc = ""] + pub fn APT_ReceiveParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -12062,17 +12211,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends a parameter."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `source` - AppID of the source application."] - #[doc = "* `dest` - AppID of the destination application."] - #[doc = "* `command` - Command to send."] - #[doc = "* `buffer` - Buffer to send."] - #[doc = "* `bufferSize` - Size of the buffer."] - #[doc = "* `parameter` - Parameter handle to pass."] - #[doc = ""] +#[doc = "Sends a parameter."] +#[doc = "# Arguments"] +#[doc = "`source` - AppID of the source application."] +#[doc = "`dest` - AppID of the destination application."] +#[doc = "`command` - Command to send."] +#[doc = "`buffer` - Buffer to send."] +#[doc = "`bufferSize` - Size of the buffer."] +#[doc = "`parameter` - Parameter handle to pass."] +#[doc = ""] + pub fn APT_SendParameter( source: NS_APPID, dest: NS_APPID, @@ -12084,67 +12232,61 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `source` - AppID of the source application (use APPID_NONE to disable the check)."] - #[doc = "* `dest` - AppID of the destination application (use APPID_NONE to disable the check)."] - #[doc = "* `success` - Pointer to output true if a parameter was cancelled, or false otherwise."] - #[doc = ""] +#[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] +#[doc = "# Arguments"] +#[doc = "`source` - AppID of the source application (use APPID_NONE to disable the check)."] +#[doc = "`dest` - AppID of the destination application (use APPID_NONE to disable the check)."] +#[doc = "`success` - Pointer to output true if a parameter was cancelled, or false otherwise."] +#[doc = ""] + pub fn APT_CancelParameter(source: NS_APPID, dest: NS_APPID, success: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sends capture buffer information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `captureBuf` - Capture buffer information to send."] - #[doc = ""] +#[doc = "Sends capture buffer information."] +#[doc = "# Arguments"] +#[doc = "`captureBuf` - Capture buffer information to send."] +#[doc = ""] + pub fn APT_SendCaptureBufferInfo(captureBuf: *const aptCaptureBufInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Replies to a sleep query."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - ID of the application."] - #[doc = "* `reply` - Query reply value."] - #[doc = ""] +#[doc = "Replies to a sleep query."] +#[doc = "# Arguments"] +#[doc = "`appID` - ID of the application."] +#[doc = "`reply` - Query reply value."] +#[doc = ""] + pub fn APT_ReplySleepQuery(appID: NS_APPID, reply: APT_QueryReply) -> Result; } extern "C" { #[must_use] - #[doc = "Replies that a sleep notification has been completed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - ID of the application."] - #[doc = ""] +#[doc = "Replies that a sleep notification has been completed."] +#[doc = "# Arguments"] +#[doc = "`appID` - ID of the application."] +#[doc = ""] + pub fn APT_ReplySleepNotificationComplete(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares to close the application."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cancelPreload` - Whether applet preloads should be cancelled."] - #[doc = ""] +#[doc = "Prepares to close the application."] +#[doc = "# Arguments"] +#[doc = "`cancelPreload` - Whether applet preloads should be cancelled."] +#[doc = ""] + pub fn APT_PrepareToCloseApplication(cancelPreload: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Closes the application."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `param` - Parameters to close with."] - #[doc = "* `paramSize` - Size of param."] - #[doc = "* `handle` - Handle to pass."] - #[doc = ""] +#[doc = "Closes the application."] +#[doc = "# Arguments"] +#[doc = "`param` - Parameters to close with."] +#[doc = "`paramSize` - Size of param."] +#[doc = "`handle` - Handle to pass."] +#[doc = ""] + pub fn APT_CloseApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -12153,56 +12295,51 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the application's CPU time limit."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `percent` - CPU time limit percentage to set."] - #[doc = ""] +#[doc = "Sets the application's CPU time limit."] +#[doc = "# Arguments"] +#[doc = "`percent` - CPU time limit percentage to set."] +#[doc = ""] + pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the application's CPU time limit."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `percent` - Pointer to output the CPU time limit percentage to."] - #[doc = ""] +#[doc = "Gets the application's CPU time limit."] +#[doc = "# Arguments"] +#[doc = "`percent` - Pointer to output the CPU time limit percentage to."] +#[doc = ""] + pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks whether the system is a New 3DS."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the New 3DS flag to."] - #[doc = ""] +#[doc = "Checks whether the system is a New 3DS."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the New 3DS flag to."] +#[doc = ""] + pub fn APT_CheckNew3DS(out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Prepares for an applicaton jump."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flags` - Flags to use."] - #[doc = "* `programID` - ID of the program to jump to."] - #[doc = "* `mediatype` - Media type of the program to jump to."] - #[doc = ""] +#[doc = "Prepares for an applicaton jump."] +#[doc = "# Arguments"] +#[doc = "`flags` - Flags to use."] +#[doc = "`programID` - ID of the program to jump to."] +#[doc = "`mediatype` - Media type of the program to jump to."] +#[doc = ""] + pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Performs an application jump."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `param` - Parameter buffer."] - #[doc = "* `paramSize` - Size of parameter buffer."] - #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] - #[doc = ""] +#[doc = "Performs an application jump."] +#[doc = "# Arguments"] +#[doc = "`param` - Parameter buffer."] +#[doc = "`paramSize` - Size of parameter buffer."] +#[doc = "`hmac` - HMAC buffer (should be 0x20 bytes long)."] +#[doc = ""] + pub fn APT_DoApplicationJump( param: *const ::libc::c_void, paramSize: size_t, @@ -12211,25 +12348,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Prepares to start a library applet."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - AppID of the applet to start."] - #[doc = ""] +#[doc = "Prepares to start a library applet."] +#[doc = "# Arguments"] +#[doc = "`appID` - AppID of the applet to start."] +#[doc = ""] + pub fn APT_PrepareToStartLibraryApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Starts a library applet."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - AppID of the applet to launch."] - #[doc = "* `param` - Buffer containing applet parameters."] - #[doc = "* `paramsize` - Size of the buffer."] - #[doc = "* `handle` - Handle to pass to the applet."] - #[doc = ""] +#[doc = "Starts a library applet."] +#[doc = "# Arguments"] +#[doc = "`appID` - AppID of the applet to launch."] +#[doc = "`param` - Buffer containing applet parameters."] +#[doc = "`paramsize` - Size of the buffer."] +#[doc = "`handle` - Handle to pass to the applet."] +#[doc = ""] + pub fn APT_StartLibraryApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -12239,25 +12374,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Prepares to start a system applet."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - AppID of the applet to start."] - #[doc = ""] +#[doc = "Prepares to start a system applet."] +#[doc = "# Arguments"] +#[doc = "`appID` - AppID of the applet to start."] +#[doc = ""] + pub fn APT_PrepareToStartSystemApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] - #[doc = "Starts a system applet."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appID` - AppID of the applet to launch."] - #[doc = "* `param` - Buffer containing applet parameters."] - #[doc = "* `paramSize` - Size of the parameter buffer."] - #[doc = "* `handle` - Handle to pass to the applet."] - #[doc = ""] +#[doc = "Starts a system applet."] +#[doc = "# Arguments"] +#[doc = "`appID` - AppID of the applet to launch."] +#[doc = "`param` - Buffer containing applet parameters."] +#[doc = "`paramSize` - Size of the parameter buffer."] +#[doc = "`handle` - Handle to pass to the applet."] +#[doc = ""] + pub fn APT_StartSystemApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -12267,22 +12400,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] - #[doc = ""] +#[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] +#[doc = ""] + pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Receives the deliver (launch) argument"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `param` - Parameter buffer."] - #[doc = "* `paramSize` - Size of parameter buffer."] - #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] - #[doc = "* `sender` - Pointer to output the sender's AppID to."] - #[doc = "* `received` - Pointer to output whether an argument was received to."] - #[doc = ""] +#[doc = "Receives the deliver (launch) argument"] +#[doc = "# Arguments"] +#[doc = "`param` - Parameter buffer."] +#[doc = "`paramSize` - Size of parameter buffer."] +#[doc = "`hmac` - HMAC buffer (should be 0x20 bytes long)."] +#[doc = "`sender` - Pointer to output the sender's AppID to."] +#[doc = "`received` - Pointer to output whether an argument was received to."] +#[doc = ""] + pub fn APT_ReceiveDeliverArg( param: *const ::libc::c_void, paramSize: size_t, @@ -12293,6 +12426,7 @@ extern "C" { } #[doc = "BOSS context."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bossContext { @@ -12329,111 +12463,110 @@ pub const BOSSTASKSTATUS_ERROR: bossTaskStatus = 7; #[doc = "BOSS task status."] #[doc = ""] + pub type bossTaskStatus = ::libc::c_uint; pub const bossNsDataHeaderInfoType_ContentSize: bossNsDataHeaderInfoTypes = 3; #[doc = "Type values for bossGetNsDataHeaderInfo()."] #[doc = ""] + pub type bossNsDataHeaderInfoTypes = ::libc::c_uint; pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSizes = 4; #[doc = "Size of the output data for bossGetNsDataHeaderInfo()."] #[doc = ""] + pub type bossNsDataHeaderInfoTypeSizes = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes BOSS."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] - #[doc = "* `force_user` - When true, just use bossU instead of trying to initialize with bossP first."] - #[doc = ""] +#[doc = "Initializes BOSS."] +#[doc = "# Arguments"] +#[doc = "`programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] +#[doc = "`force_user` - When true, just use bossU instead of trying to initialize with bossP first."] +#[doc = ""] + pub fn bossInit(programID: u64_, force_user: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programID` - programID to use, 0 for the current process."] - #[doc = ""] +#[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] +#[doc = "# Arguments"] +#[doc = "`programID` - programID to use, 0 for the current process."] +#[doc = ""] + pub fn bossReinit(programID: u64_) -> Result; } extern "C" { - #[doc = "Exits BOSS."] - #[doc = ""] +#[doc = "Exits BOSS."] +#[doc = ""] + pub fn bossExit(); } extern "C" { - #[doc = "Returns the BOSS session handle."] - #[doc = ""] +#[doc = "Returns the BOSS session handle."] +#[doc = ""] + pub fn bossGetSessionHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Set the content data storage location."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] - #[doc = "* `boss_size` - Probably the max size in the extdata which BOSS can use."] - #[doc = "* `mediaType` - Roughly the same as FS mediatype."] - #[doc = ""] +#[doc = "Set the content data storage location."] +#[doc = "# Arguments"] +#[doc = "`extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] +#[doc = "`boss_size` - Probably the max size in the extdata which BOSS can use."] +#[doc = "`mediaType` - Roughly the same as FS mediatype."] +#[doc = ""] + pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] - #[doc = ""] +#[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] +#[doc = ""] + pub fn bossUnregisterStorage() -> Result; } extern "C" { #[must_use] - #[doc = "Register a task."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `taskID` - BOSS taskID."] - #[doc = "* `unk0` - Unknown, usually zero."] - #[doc = "* `unk1` - Unknown, usually zero."] - #[doc = ""] +#[doc = "Register a task."] +#[doc = "# Arguments"] +#[doc = "`taskID` - BOSS taskID."] +#[doc = "`unk0` - Unknown, usually zero."] +#[doc = "`unk1` - Unknown, usually zero."] +#[doc = ""] + pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Send a property."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `PropertyID` - PropertyID"] - #[doc = "* `buf` - Input buffer data."] - #[doc = "* `size` - Buffer size."] - #[doc = ""] +#[doc = "Send a property."] +#[doc = "# Arguments"] +#[doc = "`PropertyID` - PropertyID"] +#[doc = "`buf` - Input buffer data."] +#[doc = "`size` - Buffer size."] +#[doc = ""] + pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the content file for the specified NsDataId."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `NsDataId` - NsDataId"] - #[doc = ""] +#[doc = "Deletes the content file for the specified NsDataId."] +#[doc = "# Arguments"] +#[doc = "`NsDataId` - NsDataId"] +#[doc = ""] + pub fn bossDeleteNsData(NsDataId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets header info for the specified NsDataId."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `NsDataId` - NsDataId"] - #[doc = "* `type` - Type of data to load."] - #[doc = "* `buffer` - Output buffer."] - #[doc = "* `size` - Output buffer size."] - #[doc = ""] +#[doc = "Gets header info for the specified NsDataId."] +#[doc = "# Arguments"] +#[doc = "`NsDataId` - NsDataId"] +#[doc = "`type` - Type of data to load."] +#[doc = "`buffer` - Output buffer."] +#[doc = "`size` - Output buffer size."] +#[doc = ""] + pub fn bossGetNsDataHeaderInfo( NsDataId: u32_, type_: u8_, @@ -12443,17 +12576,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads data from the content for the specified NsDataId."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `NsDataId` - NsDataId"] - #[doc = "* `offset` - Offset in the content."] - #[doc = "* `buffer` - Output buffer."] - #[doc = "* `size` - Output buffer size."] - #[doc = "* `transfer_total` - Optional output actual read size, can be NULL."] - #[doc = "* `unk_out` - Optional unknown output, can be NULL."] - #[doc = ""] +#[doc = "Reads data from the content for the specified NsDataId."] +#[doc = "# Arguments"] +#[doc = "`NsDataId` - NsDataId"] +#[doc = "`offset` - Offset in the content."] +#[doc = "`buffer` - Output buffer."] +#[doc = "`size` - Output buffer size."] +#[doc = "`transfer_total` - Optional output actual read size, can be NULL."] +#[doc = "`unk_out` - Optional unknown output, can be NULL."] +#[doc = ""] + pub fn bossReadNsData( NsDataId: u32_, offset: u64_, @@ -12465,47 +12597,43 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Starts a task soon after running this command."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `taskID` - BOSS taskID."] - #[doc = ""] +#[doc = "Starts a task soon after running this command."] +#[doc = "# Arguments"] +#[doc = "`taskID` - BOSS taskID."] +#[doc = ""] + pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Similar to bossStartTaskImmediate?"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `taskID` - BOSS taskID."] - #[doc = ""] +#[doc = "Similar to bossStartTaskImmediate?"] +#[doc = "# Arguments"] +#[doc = "`taskID` - BOSS taskID."] +#[doc = ""] + pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `taskID` - BOSS taskID."] - #[doc = "* `unk` - Unknown, usually zero?"] - #[doc = ""] +#[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] +#[doc = "# Arguments"] +#[doc = "`taskID` - BOSS taskID."] +#[doc = "`unk` - Unknown, usually zero?"] +#[doc = ""] + pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns task state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `taskID` - BOSS taskID."] - #[doc = "* `inval` - Unknown, normally 0?"] - #[doc = "* `status` - Output status, see bossTaskStatus."] - #[doc = "* `out1` - Output field."] - #[doc = "* `out2` - Output field."] - #[doc = ""] +#[doc = "Returns task state."] +#[doc = "# Arguments"] +#[doc = "`taskID` - BOSS taskID."] +#[doc = "`inval` - Unknown, normally 0?"] +#[doc = "`status` - Output status, see bossTaskStatus."] +#[doc = "`out1` - Output field."] +#[doc = "`out2` - Output field."] +#[doc = ""] + pub fn bossGetTaskState( taskID: *const ::libc::c_char, inval: s8, @@ -12516,23 +12644,21 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This loads the current state of PropertyID 0x0 for the specified task."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `taskID` - BOSS taskID."] - #[doc = ""] +#[doc = "This loads the current state of PropertyID 0x0 for the specified task."] +#[doc = "# Arguments"] +#[doc = "`taskID` - BOSS taskID."] +#[doc = ""] + pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result; } extern "C" { - #[doc = "Setup a BOSS context with the default config."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bossContext` - BOSS context."] - #[doc = "* `seconds_interval` - Interval in seconds for running the task automatically."] - #[doc = "* `url` - Task URL."] - #[doc = ""] +#[doc = "Setup a BOSS context with the default config."] +#[doc = "# Arguments"] +#[doc = "`bossContext` - BOSS context."] +#[doc = "`seconds_interval` - Interval in seconds for running the task automatically."] +#[doc = "`url` - Task URL."] +#[doc = ""] + pub fn bossSetupContextDefault( ctx: *mut bossContext, seconds_interval: u32_, @@ -12541,182 +12667,212 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends the config stored in the context. Used before registering a task."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bossContext` - BOSS context."] - #[doc = ""] +#[doc = "Sends the config stored in the context. Used before registering a task."] +#[doc = "# Arguments"] +#[doc = "`bossContext` - BOSS context."] +#[doc = ""] + pub fn bossSendContextConfig(ctx: *mut bossContext) -> Result; } #[doc = "8-bit per component, planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P."] #[doc = ""] + pub const INPUT_YUV422_INDIV_8: Y2RU_InputFormat = 0; #[doc = "8-bit per component, planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples).\\n Usually named YUV420P."] #[doc = ""] + pub const INPUT_YUV420_INDIV_8: Y2RU_InputFormat = 1; #[doc = "16-bit per component, planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P16."] #[doc = ""] + pub const INPUT_YUV422_INDIV_16: Y2RU_InputFormat = 2; #[doc = "16-bit per component, planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples).\\n Usually named YUV420P16."] #[doc = ""] + pub const INPUT_YUV420_INDIV_16: Y2RU_InputFormat = 3; #[doc = "8-bit per component, packed YUV 4:2:2, 16bpp, (Y0 Cb Y1 Cr).\\n Usually named YUYV422."] #[doc = ""] + pub const INPUT_YUV422_BATCH: Y2RU_InputFormat = 4; #[doc = "Input color formats"] -#[doc = ""] #[doc = "For the 16-bit per component formats, bits 15-8 are padding and 7-0 contains the value."] #[doc = ""] + pub type Y2RU_InputFormat = ::libc::c_uint; #[doc = "32-bit RGBA8888. The alpha component is the 8-bit value set by [`Y2RU_SetAlpha`]"] #[doc = ""] + pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0; #[doc = "24-bit RGB888."] #[doc = ""] + pub const OUTPUT_RGB_24: Y2RU_OutputFormat = 1; #[doc = "16-bit RGBA5551. The alpha bit is the 7th bit of the alpha value set by [`Y2RU_SetAlpha`]"] #[doc = ""] + pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2; #[doc = "16-bit RGB565."] #[doc = ""] + pub const OUTPUT_RGB_16_565: Y2RU_OutputFormat = 3; #[doc = "Output color formats"] -#[doc = ""] #[doc = "Those are the same as the framebuffer and GPU texture formats."] #[doc = ""] + pub type Y2RU_OutputFormat = ::libc::c_uint; #[doc = "No rotation."] #[doc = ""] + pub const ROTATION_NONE: Y2RU_Rotation = 0; #[doc = "Clockwise 90 degrees."] #[doc = ""] + pub const ROTATION_CLOCKWISE_90: Y2RU_Rotation = 1; #[doc = "Clockwise 180 degrees."] #[doc = ""] + pub const ROTATION_CLOCKWISE_180: Y2RU_Rotation = 2; #[doc = "Clockwise 270 degrees."] #[doc = ""] + pub const ROTATION_CLOCKWISE_270: Y2RU_Rotation = 3; #[doc = "Rotation to be applied to the output."] #[doc = ""] + pub type Y2RU_Rotation = ::libc::c_uint; #[doc = "The result buffer will be laid out in linear format, the usual way."] #[doc = ""] + pub const BLOCK_LINE: Y2RU_BlockAlignment = 0; #[doc = "The result will be stored as 8x8 blocks in Z-order.\\n Useful for textures since it is the format used by the PICA200."] #[doc = ""] + pub const BLOCK_8_BY_8: Y2RU_BlockAlignment = 1; #[doc = "Block alignment of output"] -#[doc = ""] #[doc = "Defines the way the output will be laid out in memory."] #[doc = ""] + pub type Y2RU_BlockAlignment = ::libc::c_uint; #[doc = "Coefficients of the YUV->RGB conversion formula."] -#[doc = ""] #[doc = "A set of coefficients configuring the RGB to YUV conversion. Coefficients 0-4 are unsigned 2.8"] #[doc = "fixed pointer numbers representing entries on the conversion matrix, while coefficient 5-7 are"] #[doc = "signed 11.5 fixed point numbers added as offsets to the RGB result."] #[doc = "The overall conversion process formula is:"] #[doc = "```"] -#[doc = ""] #[doc = "R = trunc((rgb_Y * Y + r_V * V) + 0.75 + r_offset)"] #[doc = "G = trunc((rgb_Y * Y - g_U * U - g_V * V) + 0.75 + g_offset)"] #[doc = "B = trunc((rgb_Y * Y + b_U * U ) + 0.75 + b_offset)"] #[doc = "```"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_ColorCoefficients { - #[doc = "RGB per unit Y."] - #[doc = ""] +#[doc = "RGB per unit Y."] +#[doc = ""] + pub rgb_Y: u16_, - #[doc = "Red per unit V."] - #[doc = ""] +#[doc = "Red per unit V."] +#[doc = ""] + pub r_V: u16_, - #[doc = "Green per unit V."] - #[doc = ""] +#[doc = "Green per unit V."] +#[doc = ""] + pub g_V: u16_, - #[doc = "Green per unit U."] - #[doc = ""] +#[doc = "Green per unit U."] +#[doc = ""] + pub g_U: u16_, - #[doc = "Blue per unit U."] - #[doc = ""] +#[doc = "Blue per unit U."] +#[doc = ""] + pub b_U: u16_, - #[doc = "Red offset."] - #[doc = ""] +#[doc = "Red offset."] +#[doc = ""] + pub r_offset: u16_, - #[doc = "Green offset."] - #[doc = ""] +#[doc = "Green offset."] +#[doc = ""] + pub g_offset: u16_, - #[doc = "Blue offset."] - #[doc = ""] +#[doc = "Blue offset."] +#[doc = ""] + pub b_offset: u16_, } #[doc = "Coefficients from the ITU-R BT.601 standard with PC ranges."] #[doc = ""] + pub const COEFFICIENT_ITU_R_BT_601: Y2RU_StandardCoefficient = 0; #[doc = "Coefficients from the ITU-R BT.709 standard with PC ranges."] #[doc = ""] + pub const COEFFICIENT_ITU_R_BT_709: Y2RU_StandardCoefficient = 1; #[doc = "Coefficients from the ITU-R BT.601 standard with TV ranges."] #[doc = ""] + pub const COEFFICIENT_ITU_R_BT_601_SCALING: Y2RU_StandardCoefficient = 2; #[doc = "Coefficients from the ITU-R BT.709 standard with TV ranges."] #[doc = ""] + pub const COEFFICIENT_ITU_R_BT_709_SCALING: Y2RU_StandardCoefficient = 3; #[doc = "Preset conversion coefficients based on ITU standards for the YUV->RGB formula."] -#[doc = ""] #[doc = "For more details refer to [`Y2RU_ColorCoefficients`]"] #[doc = ""] + pub type Y2RU_StandardCoefficient = ::libc::c_uint; #[doc = "Structure used to configure all parameters at once."] -#[doc = ""] #[doc = "You can send a batch of configuration parameters using this structure and [`Y2RU_SetConversionParams`]"] #[doc = ""] + #[repr(C)] #[repr(align(4))] #[derive(Debug, Copy, Clone)] pub struct Y2RU_ConversionParams { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - #[doc = "Value passed to [`Y2RU_SetInputLineWidth`]"] - #[doc = ""] +#[doc = "Value passed to [`Y2RU_SetInputLineWidth`]"] +#[doc = ""] + pub input_line_width: s16, - #[doc = "Value passed to [`Y2RU_SetInputLines`]"] - #[doc = ""] +#[doc = "Value passed to [`Y2RU_SetInputLines`]"] +#[doc = ""] + pub input_lines: s16, pub _bitfield_align_2: [u8; 0], pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>, - #[doc = "Unused."] - #[doc = ""] +#[doc = "Unused."] +#[doc = ""] + pub unused: u8_, - #[doc = "Value passed to [`Y2RU_SetAlpha`]"] - #[doc = ""] +#[doc = "Value passed to [`Y2RU_SetAlpha`]"] +#[doc = ""] + pub alpha: u16_, } impl Default for Y2RU_ConversionParams { @@ -12824,313 +12980,290 @@ impl Y2RU_ConversionParams { } #[doc = "Dithering weights."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_DitheringWeightParams { - #[doc = "Weight 0 for even X, even Y."] - #[doc = ""] +#[doc = "Weight 0 for even X, even Y."] +#[doc = ""] + pub w0_xEven_yEven: u16_, - #[doc = "Weight 0 for odd X, even Y."] - #[doc = ""] +#[doc = "Weight 0 for odd X, even Y."] +#[doc = ""] + pub w0_xOdd_yEven: u16_, - #[doc = "Weight 0 for even X, odd Y."] - #[doc = ""] +#[doc = "Weight 0 for even X, odd Y."] +#[doc = ""] + pub w0_xEven_yOdd: u16_, - #[doc = "Weight 0 for odd X, odd Y."] - #[doc = ""] +#[doc = "Weight 0 for odd X, odd Y."] +#[doc = ""] + pub w0_xOdd_yOdd: u16_, - #[doc = "Weight 1 for even X, even Y."] - #[doc = ""] +#[doc = "Weight 1 for even X, even Y."] +#[doc = ""] + pub w1_xEven_yEven: u16_, - #[doc = "Weight 1 for odd X, even Y."] - #[doc = ""] +#[doc = "Weight 1 for odd X, even Y."] +#[doc = ""] + pub w1_xOdd_yEven: u16_, - #[doc = "Weight 1 for even X, odd Y."] - #[doc = ""] +#[doc = "Weight 1 for even X, odd Y."] +#[doc = ""] + pub w1_xEven_yOdd: u16_, - #[doc = "Weight 1 for odd X, odd Y."] - #[doc = ""] +#[doc = "Weight 1 for odd X, odd Y."] +#[doc = ""] + pub w1_xOdd_yOdd: u16_, - #[doc = "Weight 2 for even X, even Y."] - #[doc = ""] +#[doc = "Weight 2 for even X, even Y."] +#[doc = ""] + pub w2_xEven_yEven: u16_, - #[doc = "Weight 2 for odd X, even Y."] - #[doc = ""] +#[doc = "Weight 2 for odd X, even Y."] +#[doc = ""] + pub w2_xOdd_yEven: u16_, - #[doc = "Weight 2 for even X, odd Y."] - #[doc = ""] +#[doc = "Weight 2 for even X, odd Y."] +#[doc = ""] + pub w2_xEven_yOdd: u16_, - #[doc = "Weight 2 for odd X, odd Y."] - #[doc = ""] +#[doc = "Weight 2 for odd X, odd Y."] +#[doc = ""] + pub w2_xOdd_yOdd: u16_, - #[doc = "Weight 3 for even X, even Y."] - #[doc = ""] +#[doc = "Weight 3 for even X, even Y."] +#[doc = ""] + pub w3_xEven_yEven: u16_, - #[doc = "Weight 3 for odd X, even Y."] - #[doc = ""] +#[doc = "Weight 3 for odd X, even Y."] +#[doc = ""] + pub w3_xOdd_yEven: u16_, - #[doc = "Weight 3 for even X, odd Y."] - #[doc = ""] +#[doc = "Weight 3 for even X, odd Y."] +#[doc = ""] + pub w3_xEven_yOdd: u16_, - #[doc = "Weight 3 for odd X, odd Y."] - #[doc = ""] +#[doc = "Weight 3 for odd X, odd Y."] +#[doc = ""] + pub w3_xOdd_yOdd: u16_, } extern "C" { #[must_use] - #[doc = "Initializes the y2r service."] - #[doc = ""] - #[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] - #[doc = ""] +#[doc = "Initializes the y2r service."] +#[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] +#[doc = ""] + pub fn y2rInit() -> Result; } extern "C" { - #[doc = "Closes the y2r service."] - #[doc = ""] - #[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] - #[doc = ""] +#[doc = "Closes the y2r service."] +#[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] +#[doc = ""] + pub fn y2rExit(); } extern "C" { #[must_use] - #[doc = "Used to configure the input format."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `format` - Input format to use."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the input format."] +#[doc = "# Arguments"] +#[doc = "`format` - Input format to use."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetInputFormat(format: Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured input format."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `format` - Pointer to output the input format to."] - #[doc = ""] +#[doc = "Gets the configured input format."] +#[doc = "# Arguments"] +#[doc = "`format` - Pointer to output the input format to."] +#[doc = ""] + pub fn Y2RU_GetInputFormat(format: *mut Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the output format."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `format` - Output format to use."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the output format."] +#[doc = "# Arguments"] +#[doc = "`format` - Output format to use."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetOutputFormat(format: Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured output format."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `format` - Pointer to output the output format to."] - #[doc = ""] +#[doc = "Gets the configured output format."] +#[doc = "# Arguments"] +#[doc = "`format` - Pointer to output the output format to."] +#[doc = ""] + pub fn Y2RU_GetOutputFormat(format: *mut Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the rotation of the output."] - #[doc = ""] - #[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `rotation` - Rotation to use."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the rotation of the output."] +#[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] +#[doc = "# Arguments"] +#[doc = "`rotation` - Rotation to use."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetRotation(rotation: Y2RU_Rotation) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured rotation."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `rotation` - Pointer to output the rotation to."] - #[doc = ""] +#[doc = "Gets the configured rotation."] +#[doc = "# Arguments"] +#[doc = "`rotation` - Pointer to output the rotation to."] +#[doc = ""] + pub fn Y2RU_GetRotation(rotation: *mut Y2RU_Rotation) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the alignment of the output buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `alignment` - Alignment to use."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the alignment of the output buffer."] +#[doc = "# Arguments"] +#[doc = "`alignment` - Alignment to use."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetBlockAlignment(alignment: Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured alignment."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `alignment` - Pointer to output the alignment to."] - #[doc = ""] +#[doc = "Gets the configured alignment."] +#[doc = "# Arguments"] +#[doc = "`alignment` - Pointer to output the alignment to."] +#[doc = ""] + pub fn Y2RU_GetBlockAlignment(alignment: *mut Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to use spacial dithering."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Whether to use spacial dithering."] - #[doc = ""] +#[doc = "Sets whether to use spacial dithering."] +#[doc = "# Arguments"] +#[doc = "`enable` - Whether to use spacial dithering."] +#[doc = ""] + pub fn Y2RU_SetSpacialDithering(enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether to use spacial dithering."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Pointer to output the spacial dithering state to."] - #[doc = ""] +#[doc = "Gets whether to use spacial dithering."] +#[doc = "# Arguments"] +#[doc = "`enable` - Pointer to output the spacial dithering state to."] +#[doc = ""] + pub fn Y2RU_GetSpacialDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to use temporal dithering."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Whether to use temporal dithering."] - #[doc = ""] +#[doc = "Sets whether to use temporal dithering."] +#[doc = "# Arguments"] +#[doc = "`enable` - Whether to use temporal dithering."] +#[doc = ""] + pub fn Y2RU_SetTemporalDithering(enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether to use temporal dithering."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Pointer to output the temporal dithering state to."] - #[doc = ""] +#[doc = "Gets whether to use temporal dithering."] +#[doc = "# Arguments"] +#[doc = "`enable` - Pointer to output the temporal dithering state to."] +#[doc = ""] + pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the width of the image."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the width of the image."] +#[doc = "# Arguments"] +#[doc = "`line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured input line width."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `line_width` - Pointer to output the line width to."] - #[doc = ""] +#[doc = "Gets the configured input line width."] +#[doc = "# Arguments"] +#[doc = "`line_width` - Pointer to output the line width to."] +#[doc = ""] + pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the height of the image."] - #[doc = ""] - #[doc = "A multiple of 8 seems to be preferred."] - #[doc = "If using the [`BLOCK_8_BY_8`] mode, it must be a multiple of 8."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `num_lines` - Number of lines to be converted."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the height of the image."] +#[doc = "A multiple of 8 seems to be preferred."] +#[doc = "If using the [`BLOCK_8_BY_8`] mode, it must be a multiple of 8."] +#[doc = "# Arguments"] +#[doc = "`num_lines` - Number of lines to be converted."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured number of input lines."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `num_lines` - Pointer to output the input lines to."] - #[doc = ""] - pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result; +#[doc = "Gets the configured number of input lines."] +#[doc = "# Arguments"] +#[doc = "`num_lines` - Pointer to output the input lines to."] +#[doc = ""] + + pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the color conversion formula."] - #[doc = ""] - #[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `coefficients` - Coefficients to use."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the color conversion formula."] +#[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] +#[doc = "# Arguments"] +#[doc = "`coefficients` - Coefficients to use."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured color coefficients."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `num_lines` - Pointer to output the coefficients to."] - #[doc = ""] +#[doc = "Gets the configured color coefficients."] +#[doc = "# Arguments"] +#[doc = "`num_lines` - Pointer to output the coefficients to."] +#[doc = ""] + pub fn Y2RU_GetCoefficients(coefficients: *mut Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] - #[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] - #[doc = ""] - #[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `coefficient` - Standard coefficient to use."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] +#[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] +#[doc = "# Arguments"] +#[doc = "`coefficient` - Standard coefficient to use."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetStandardCoefficient(coefficient: Y2RU_StandardCoefficient) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the color coefficient parameters of a standard coefficient."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `coefficients` - Pointer to output the coefficients to."] - #[doc = "* `standardCoeff` - Standard coefficient to check."] - #[doc = ""] +#[doc = "Gets the color coefficient parameters of a standard coefficient."] +#[doc = "# Arguments"] +#[doc = "`coefficients` - Pointer to output the coefficients to."] +#[doc = "`standardCoeff` - Standard coefficient to check."] +#[doc = ""] + pub fn Y2RU_GetStandardCoefficient( coefficients: *mut Y2RU_ColorCoefficients, standardCoeff: Y2RU_StandardCoefficient, @@ -13138,92 +13271,75 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Used to configure the alpha value of the output."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `alpha` - 8-bit value to be used for the output when the format requires it."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] - #[doc = ""] +#[doc = "Used to configure the alpha value of the output."] +#[doc = "# Arguments"] +#[doc = "`alpha` - 8-bit value to be used for the output when the format requires it."] +#[doc = "# Notes"] +#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] +#[doc = ""] + pub fn Y2RU_SetAlpha(alpha: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured output alpha value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `alpha` - Pointer to output the alpha value to."] - #[doc = ""] +#[doc = "Gets the configured output alpha value."] +#[doc = "# Arguments"] +#[doc = "`alpha` - Pointer to output the alpha value to."] +#[doc = ""] + pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Used to enable the end of conversion interrupt."] - #[doc = ""] - #[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] - #[doc = "This interrupt will then be used to fire an event. See [`Y2RU_GetTransferEndEvent`]"] - #[doc = "By default the interrupt is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `should_interrupt` - Enables the interrupt if true, disable it if false."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* It seems that the event can be fired too soon in some cases, depending the transfer_unit size.\\n Please see the note at [`Y2RU_SetReceiving`]"] - #[doc = ""] +#[doc = "Used to enable the end of conversion interrupt."] +#[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] +#[doc = "This interrupt will then be used to fire an event. See [`Y2RU_GetTransferEndEvent`]"] +#[doc = "By default the interrupt is enabled."] +#[doc = "# Arguments"] +#[doc = "`should_interrupt` - Enables the interrupt if true, disable it if false."] +#[doc = "# Notes"] +#[doc = "It seems that the event can be fired too soon in some cases, depending the transfer_unit size.\\n Please see the note at [`Y2RU_SetReceiving`]"] +#[doc = ""] + pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the transfer end interrupt is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `should_interrupt` - Pointer to output the interrupt state to."] - #[doc = ""] +#[doc = "Gets whether the transfer end interrupt is enabled."] +#[doc = "# Arguments"] +#[doc = "`should_interrupt` - Pointer to output the interrupt state to."] +#[doc = ""] + pub fn Y2RU_GetTransferEndInterrupt(should_interrupt: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an handle to the end of conversion event."] - #[doc = ""] - #[doc = "To enable this event you have to use ```"] - #[doc = "```"] - #[doc = "The event will be triggered when the corresponding interrupt is fired."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."] - #[doc = ""] +#[doc = "Gets an handle to the end of conversion event."] +#[doc = "To enable this event you have to use ```"] +#[doc = "```"] +#[doc = "The event will be triggered when the corresponding interrupt is fired."] +#[doc = "# Arguments"] +#[doc = "`end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] +#[doc = "# Notes"] +#[doc = "It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."] +#[doc = ""] + pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Configures the Y plane buffer."] - #[doc = ""] - #[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] - #[doc = "* `image_size` - The total size of the data buffer."] - #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] +#[doc = "Configures the Y plane buffer."] +#[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] +#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] +#[doc = "**Warning!**"] +#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] +#[doc = "# Arguments"] +#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "`image_size` - The total size of the data buffer."] +#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] +#[doc = ""] + pub fn Y2RU_SetSendingY( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13233,22 +13349,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the U plane buffer."] - #[doc = ""] - #[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] - #[doc = "* `image_size` - The total size of the data buffer."] - #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] +#[doc = "Configures the U plane buffer."] +#[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] +#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] +#[doc = "**Warning!**"] +#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] +#[doc = "# Arguments"] +#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "`image_size` - The total size of the data buffer."] +#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] +#[doc = ""] + pub fn Y2RU_SetSendingU( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13258,22 +13370,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the V plane buffer."] - #[doc = ""] - #[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] - #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] - #[doc = "* `image_size` - The total size of the data buffer."] - #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] +#[doc = "Configures the V plane buffer."] +#[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] +#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] +#[doc = "**Warning!**"] +#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] +#[doc = "# Arguments"] +#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "`image_size` - The total size of the data buffer."] +#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] +#[doc = ""] + pub fn Y2RU_SetSendingV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13283,22 +13391,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the YUYV source buffer."] - #[doc = ""] - #[doc = "This specifies the YUYV data buffer for the packed input format [`INPUT_YUV422_BATCH`]"] - #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] - #[doc = "* `image_size` - The total size of the data buffer."] - #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] +#[doc = "Configures the YUYV source buffer."] +#[doc = "This specifies the YUYV data buffer for the packed input format [`INPUT_YUV422_BATCH`]"] +#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] +#[doc = "**Warning!**"] +#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] +#[doc = "# Arguments"] +#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] +#[doc = "`image_size` - The total size of the data buffer."] +#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] +#[doc = ""] + pub fn Y2RU_SetSendingYUYV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13308,31 +13412,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the destination buffer."] - #[doc = ""] - #[doc = "This specifies the destination buffer of the conversion."] - #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] - #[doc = "The buffer does NOT need to be allocated in the linear heap."] - #[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] - #[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] - #[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `src_buf` - A pointer to the beginning of your destination buffer in FCRAM"] - #[doc = "* `image_size` - The total size of the data buffer."] - #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] - #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "*"] - #[doc = "* Setting a transfer_unit of 4 or 8 lines seems to bring the best results in terms of speed for a 400x240 image."] - #[doc = ""] +#[doc = "Configures the destination buffer."] +#[doc = "This specifies the destination buffer of the conversion."] +#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] +#[doc = "The buffer does NOT need to be allocated in the linear heap."] +#[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] +#[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] +#[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] +#[doc = "**Warning!**"] +#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] +#[doc = "# Arguments"] +#[doc = "`src_buf` - A pointer to the beginning of your destination buffer in FCRAM"] +#[doc = "`image_size` - The total size of the data buffer."] +#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] +#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] +#[doc = "# Notes"] +#[doc = "Setting a transfer_unit of 4 or 8 lines seems to bring the best results in terms of speed for a 400x240 image."] +#[doc = ""] + pub fn Y2RU_SetReceiving( dst_buf: *mut ::libc::c_void, image_size: u32_, @@ -13342,357 +13439,398 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the Y buffer."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with [`Y2RU_SetSendingY`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - #[doc = ""] +#[doc = "Checks if the DMA has finished sending the Y buffer."] +#[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with [`Y2RU_SetSendingY`]"] +#[doc = "# Arguments"] +#[doc = "`is_done` - Pointer to the boolean that will hold the result."] +#[doc = ""] + pub fn Y2RU_IsDoneSendingY(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the U buffer."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with [`Y2RU_SetSendingU`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - #[doc = ""] +#[doc = "Checks if the DMA has finished sending the U buffer."] +#[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with [`Y2RU_SetSendingU`]"] +#[doc = "# Arguments"] +#[doc = "`is_done` - Pointer to the boolean that will hold the result."] +#[doc = ""] + pub fn Y2RU_IsDoneSendingU(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the V buffer."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with [`Y2RU_SetSendingV`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - #[doc = ""] +#[doc = "Checks if the DMA has finished sending the V buffer."] +#[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with [`Y2RU_SetSendingV`]"] +#[doc = "# Arguments"] +#[doc = "`is_done` - Pointer to the boolean that will hold the result."] +#[doc = ""] + pub fn Y2RU_IsDoneSendingV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the YUYV buffer."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with [`Y2RU_SetSendingYUYV`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - #[doc = ""] +#[doc = "Checks if the DMA has finished sending the YUYV buffer."] +#[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with [`Y2RU_SetSendingYUYV`]"] +#[doc = "# Arguments"] +#[doc = "`is_done` - Pointer to the boolean that will hold the result."] +#[doc = ""] + pub fn Y2RU_IsDoneSendingYUYV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the DMA has finished sending the converted result."] - #[doc = ""] - #[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] - #[doc = ""] +#[doc = "Checks if the DMA has finished sending the converted result."] +#[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] +#[doc = "# Arguments"] +#[doc = "`is_done` - Pointer to the boolean that will hold the result."] +#[doc = ""] + pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Configures the dithering weight parameters."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `params` - Dithering weight parameters to use."] - #[doc = ""] +#[doc = "Configures the dithering weight parameters."] +#[doc = "# Arguments"] +#[doc = "`params` - Dithering weight parameters to use."] +#[doc = ""] + pub fn Y2RU_SetDitheringWeightParams(params: *const Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the configured dithering weight parameters."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `params` - Pointer to output the dithering weight parameters to."] - #[doc = ""] +#[doc = "Gets the configured dithering weight parameters."] +#[doc = "# Arguments"] +#[doc = "`params` - Pointer to output the dithering weight parameters to."] +#[doc = ""] + pub fn Y2RU_GetDitheringWeightParams(params: *mut Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] - #[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] - #[doc = ""] - #[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `params` - Conversion parameters to set."] - #[doc = ""] +#[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] +#[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] +#[doc = "# Arguments"] +#[doc = "`params` - Conversion parameters to set."] +#[doc = ""] + pub fn Y2RU_SetConversionParams(params: *const Y2RU_ConversionParams) -> Result; } extern "C" { #[must_use] - #[doc = "Starts the conversion process"] - #[doc = ""] +#[doc = "Starts the conversion process"] +#[doc = ""] + pub fn Y2RU_StartConversion() -> Result; } extern "C" { #[must_use] - #[doc = "Cancels the conversion"] - #[doc = ""] +#[doc = "Cancels the conversion"] +#[doc = ""] + pub fn Y2RU_StopConversion() -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the conversion and DMA transfer are finished."] - #[doc = ""] - #[doc = "This can have the same problems as the event and interrupt. See [`Y2RU_SetTransferEndInterrupt`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `is_busy` - Pointer to output the busy state to."] - #[doc = ""] +#[doc = "Checks if the conversion and DMA transfer are finished."] +#[doc = "This can have the same problems as the event and interrupt. See [`Y2RU_SetTransferEndInterrupt`]"] +#[doc = "# Arguments"] +#[doc = "`is_busy` - Pointer to output the busy state to."] +#[doc = ""] + pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Checks whether Y2R is ready to be used."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ping` - Pointer to output the ready status to."] - #[doc = ""] +#[doc = "Checks whether Y2R is ready to be used."] +#[doc = "# Arguments"] +#[doc = "`ping` - Pointer to output the ready status to."] +#[doc = ""] + pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the Y2R driver."] - #[doc = ""] +#[doc = "Initializes the Y2R driver."] +#[doc = ""] + pub fn Y2RU_DriverInitialize() -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the Y2R driver."] - #[doc = ""] +#[doc = "Terminates the Y2R driver."] +#[doc = ""] + pub fn Y2RU_DriverFinalize() -> Result; } #[doc = "No port."] #[doc = ""] + pub const PORT_NONE: _bindgen_ty_15 = 0; #[doc = "CAM1 port."] #[doc = ""] + pub const PORT_CAM1: _bindgen_ty_15 = 1; #[doc = "CAM2 port."] #[doc = ""] + pub const PORT_CAM2: _bindgen_ty_15 = 2; #[doc = "Both ports."] #[doc = ""] + pub const PORT_BOTH: _bindgen_ty_15 = 3; #[doc = "Camera connection target ports."] #[doc = ""] + pub type _bindgen_ty_15 = ::libc::c_uint; #[doc = "No camera."] #[doc = ""] + pub const SELECT_NONE: _bindgen_ty_16 = 0; #[doc = "Outer camera 1."] #[doc = ""] + pub const SELECT_OUT1: _bindgen_ty_16 = 1; #[doc = "Inner camera 1."] #[doc = ""] + pub const SELECT_IN1: _bindgen_ty_16 = 2; #[doc = "Outer camera 2."] #[doc = ""] + pub const SELECT_OUT2: _bindgen_ty_16 = 4; #[doc = "Outer camera 1 and inner camera 1."] #[doc = ""] + pub const SELECT_IN1_OUT1: _bindgen_ty_16 = 3; #[doc = "Both outer cameras."] #[doc = ""] + pub const SELECT_OUT1_OUT2: _bindgen_ty_16 = 5; #[doc = "Inner camera 1 and outer camera 2."] #[doc = ""] + pub const SELECT_IN1_OUT2: _bindgen_ty_16 = 6; #[doc = "All cameras."] #[doc = ""] + pub const SELECT_ALL: _bindgen_ty_16 = 7; #[doc = "Camera combinations."] #[doc = ""] + pub type _bindgen_ty_16 = ::libc::c_uint; #[doc = "No context."] #[doc = ""] + pub const CONTEXT_NONE: CAMU_Context = 0; #[doc = "Context A."] #[doc = ""] + pub const CONTEXT_A: CAMU_Context = 1; #[doc = "Context B."] #[doc = ""] + pub const CONTEXT_B: CAMU_Context = 2; #[doc = "Both contexts."] #[doc = ""] + pub const CONTEXT_BOTH: CAMU_Context = 3; #[doc = "Camera contexts."] #[doc = ""] + pub type CAMU_Context = ::libc::c_uint; #[doc = "No flip."] #[doc = ""] + pub const FLIP_NONE: CAMU_Flip = 0; #[doc = "Horizontal flip."] #[doc = ""] + pub const FLIP_HORIZONTAL: CAMU_Flip = 1; #[doc = "Vertical flip."] #[doc = ""] + pub const FLIP_VERTICAL: CAMU_Flip = 2; #[doc = "Reverse flip."] #[doc = ""] + pub const FLIP_REVERSE: CAMU_Flip = 3; #[doc = "Ways to flip the camera image."] #[doc = ""] + pub type CAMU_Flip = ::libc::c_uint; #[doc = "VGA size. (640x480)"] #[doc = ""] + pub const SIZE_VGA: CAMU_Size = 0; #[doc = "QVGA size. (320x240)"] #[doc = ""] + pub const SIZE_QVGA: CAMU_Size = 1; #[doc = "QQVGA size. (160x120)"] #[doc = ""] + pub const SIZE_QQVGA: CAMU_Size = 2; #[doc = "CIF size. (352x288)"] #[doc = ""] + pub const SIZE_CIF: CAMU_Size = 3; #[doc = "QCIF size. (176x144)"] #[doc = ""] + pub const SIZE_QCIF: CAMU_Size = 4; #[doc = "DS LCD size. (256x192)"] #[doc = ""] + pub const SIZE_DS_LCD: CAMU_Size = 5; #[doc = "DS LCD x4 size. (512x384)"] #[doc = ""] + pub const SIZE_DS_LCDx4: CAMU_Size = 6; #[doc = "CTR Top LCD size. (400x240)"] #[doc = ""] + pub const SIZE_CTR_TOP_LCD: CAMU_Size = 7; #[doc = "CTR Bottom LCD size. (320x240)"] #[doc = ""] + pub const SIZE_CTR_BOTTOM_LCD: CAMU_Size = 1; #[doc = "Camera image resolutions."] #[doc = ""] + pub type CAMU_Size = ::libc::c_uint; #[doc = "15 FPS."] #[doc = ""] + pub const FRAME_RATE_15: CAMU_FrameRate = 0; #[doc = "15-5 FPS."] #[doc = ""] + pub const FRAME_RATE_15_TO_5: CAMU_FrameRate = 1; #[doc = "15-2 FPS."] #[doc = ""] + pub const FRAME_RATE_15_TO_2: CAMU_FrameRate = 2; #[doc = "10 FPS."] #[doc = ""] + pub const FRAME_RATE_10: CAMU_FrameRate = 3; #[doc = "8.5 FPS."] #[doc = ""] + pub const FRAME_RATE_8_5: CAMU_FrameRate = 4; #[doc = "5 FPS."] #[doc = ""] + pub const FRAME_RATE_5: CAMU_FrameRate = 5; #[doc = "20 FPS."] #[doc = ""] + pub const FRAME_RATE_20: CAMU_FrameRate = 6; #[doc = "20-5 FPS."] #[doc = ""] + pub const FRAME_RATE_20_TO_5: CAMU_FrameRate = 7; #[doc = "30 FPS."] #[doc = ""] + pub const FRAME_RATE_30: CAMU_FrameRate = 8; #[doc = "30-5 FPS."] #[doc = ""] + pub const FRAME_RATE_30_TO_5: CAMU_FrameRate = 9; #[doc = "15-10 FPS."] #[doc = ""] + pub const FRAME_RATE_15_TO_10: CAMU_FrameRate = 10; #[doc = "20-10 FPS."] #[doc = ""] + pub const FRAME_RATE_20_TO_10: CAMU_FrameRate = 11; #[doc = "30-10 FPS."] #[doc = ""] + pub const FRAME_RATE_30_TO_10: CAMU_FrameRate = 12; #[doc = "Camera capture frame rates."] #[doc = ""] + pub type CAMU_FrameRate = ::libc::c_uint; #[doc = "Auto white balance."] #[doc = ""] + pub const WHITE_BALANCE_AUTO: CAMU_WhiteBalance = 0; #[doc = "3200K white balance."] #[doc = ""] + pub const WHITE_BALANCE_3200K: CAMU_WhiteBalance = 1; #[doc = "4150K white balance."] #[doc = ""] + pub const WHITE_BALANCE_4150K: CAMU_WhiteBalance = 2; #[doc = "5200K white balance."] #[doc = ""] + pub const WHITE_BALANCE_5200K: CAMU_WhiteBalance = 3; #[doc = "6000K white balance."] #[doc = ""] + pub const WHITE_BALANCE_6000K: CAMU_WhiteBalance = 4; #[doc = "7000K white balance."] #[doc = ""] + pub const WHITE_BALANCE_7000K: CAMU_WhiteBalance = 5; pub const WHITE_BALANCE_NORMAL: CAMU_WhiteBalance = 0; pub const WHITE_BALANCE_TUNGSTEN: CAMU_WhiteBalance = 1; @@ -13704,478 +13842,580 @@ pub const WHITE_BALANCE_SHADE: CAMU_WhiteBalance = 5; #[doc = "Camera white balance modes."] #[doc = ""] + pub type CAMU_WhiteBalance = ::libc::c_uint; #[doc = "Normal mode."] #[doc = ""] + pub const PHOTO_MODE_NORMAL: CAMU_PhotoMode = 0; #[doc = "Portrait mode."] #[doc = ""] + pub const PHOTO_MODE_PORTRAIT: CAMU_PhotoMode = 1; #[doc = "Landscape mode."] #[doc = ""] + pub const PHOTO_MODE_LANDSCAPE: CAMU_PhotoMode = 2; #[doc = "Night mode."] #[doc = ""] + pub const PHOTO_MODE_NIGHTVIEW: CAMU_PhotoMode = 3; #[doc = "Letter mode."] #[doc = ""] + pub const PHOTO_MODE_LETTER: CAMU_PhotoMode = 4; #[doc = "Camera photo modes."] #[doc = ""] + pub type CAMU_PhotoMode = ::libc::c_uint; #[doc = "No effects."] #[doc = ""] + pub const EFFECT_NONE: CAMU_Effect = 0; #[doc = "Mono effect."] #[doc = ""] + pub const EFFECT_MONO: CAMU_Effect = 1; #[doc = "Sepia effect."] #[doc = ""] + pub const EFFECT_SEPIA: CAMU_Effect = 2; #[doc = "Negative effect."] #[doc = ""] + pub const EFFECT_NEGATIVE: CAMU_Effect = 3; #[doc = "Negative film effect."] #[doc = ""] + pub const EFFECT_NEGAFILM: CAMU_Effect = 4; #[doc = "Sepia effect."] #[doc = ""] + pub const EFFECT_SEPIA01: CAMU_Effect = 5; #[doc = "Camera special effects."] #[doc = ""] + pub type CAMU_Effect = ::libc::c_uint; #[doc = "Pattern 1."] #[doc = ""] + pub const CONTRAST_PATTERN_01: CAMU_Contrast = 0; #[doc = "Pattern 2."] #[doc = ""] + pub const CONTRAST_PATTERN_02: CAMU_Contrast = 1; #[doc = "Pattern 3."] #[doc = ""] + pub const CONTRAST_PATTERN_03: CAMU_Contrast = 2; #[doc = "Pattern 4."] #[doc = ""] + pub const CONTRAST_PATTERN_04: CAMU_Contrast = 3; #[doc = "Pattern 5."] #[doc = ""] + pub const CONTRAST_PATTERN_05: CAMU_Contrast = 4; #[doc = "Pattern 6."] #[doc = ""] + pub const CONTRAST_PATTERN_06: CAMU_Contrast = 5; #[doc = "Pattern 7."] #[doc = ""] + pub const CONTRAST_PATTERN_07: CAMU_Contrast = 6; #[doc = "Pattern 8."] #[doc = ""] + pub const CONTRAST_PATTERN_08: CAMU_Contrast = 7; #[doc = "Pattern 9."] #[doc = ""] + pub const CONTRAST_PATTERN_09: CAMU_Contrast = 8; #[doc = "Pattern 10."] #[doc = ""] + pub const CONTRAST_PATTERN_10: CAMU_Contrast = 9; #[doc = "Pattern 11."] #[doc = ""] + pub const CONTRAST_PATTERN_11: CAMU_Contrast = 10; #[doc = "Low contrast. (5)"] #[doc = ""] + pub const CONTRAST_LOW: CAMU_Contrast = 4; #[doc = "Normal contrast. (6)"] #[doc = ""] + pub const CONTRAST_NORMAL: CAMU_Contrast = 5; #[doc = "High contrast. (7)"] #[doc = ""] + pub const CONTRAST_HIGH: CAMU_Contrast = 6; #[doc = "Camera contrast patterns."] #[doc = ""] + pub type CAMU_Contrast = ::libc::c_uint; #[doc = "No lens correction."] #[doc = ""] + pub const LENS_CORRECTION_OFF: CAMU_LensCorrection = 0; #[doc = "Edge-to-center brightness ratio of 70."] #[doc = ""] + pub const LENS_CORRECTION_ON_70: CAMU_LensCorrection = 1; #[doc = "Edge-to-center brightness ratio of 90."] #[doc = ""] + pub const LENS_CORRECTION_ON_90: CAMU_LensCorrection = 2; #[doc = "Dark lens correction. (OFF)"] #[doc = ""] + pub const LENS_CORRECTION_DARK: CAMU_LensCorrection = 0; #[doc = "Normal lens correction. (70)"] #[doc = ""] + pub const LENS_CORRECTION_NORMAL: CAMU_LensCorrection = 1; #[doc = "Bright lens correction. (90)"] #[doc = ""] + pub const LENS_CORRECTION_BRIGHT: CAMU_LensCorrection = 2; #[doc = "Camera lens correction modes."] #[doc = ""] + pub type CAMU_LensCorrection = ::libc::c_uint; #[doc = "YUV422"] #[doc = ""] + pub const OUTPUT_YUV_422: CAMU_OutputFormat = 0; #[doc = "RGB565"] #[doc = ""] + pub const OUTPUT_RGB_565: CAMU_OutputFormat = 1; #[doc = "Camera image output formats."] #[doc = ""] + pub type CAMU_OutputFormat = ::libc::c_uint; #[doc = "Normal shutter sound."] #[doc = ""] + pub const SHUTTER_SOUND_TYPE_NORMAL: CAMU_ShutterSoundType = 0; #[doc = "Shutter sound to begin a movie."] #[doc = ""] + pub const SHUTTER_SOUND_TYPE_MOVIE: CAMU_ShutterSoundType = 1; #[doc = "Shutter sound to end a movie."] #[doc = ""] + pub const SHUTTER_SOUND_TYPE_MOVIE_END: CAMU_ShutterSoundType = 2; #[doc = "Camera shutter sounds."] #[doc = ""] + pub type CAMU_ShutterSoundType = ::libc::c_uint; #[doc = "Image quality calibration data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_ImageQualityCalibrationData { - #[doc = "Auto exposure base target brightness."] - #[doc = ""] +#[doc = "Auto exposure base target brightness."] +#[doc = ""] + pub aeBaseTarget: s16, - #[doc = "Left color correction matrix red normalization coefficient."] - #[doc = ""] +#[doc = "Left color correction matrix red normalization coefficient."] +#[doc = ""] + pub kRL: s16, - #[doc = "Left color correction matrix green normalization coefficient."] - #[doc = ""] +#[doc = "Left color correction matrix green normalization coefficient."] +#[doc = ""] + pub kGL: s16, - #[doc = "Left color correction matrix blue normalization coefficient."] - #[doc = ""] +#[doc = "Left color correction matrix blue normalization coefficient."] +#[doc = ""] + pub kBL: s16, - #[doc = "Color correction matrix position."] - #[doc = ""] +#[doc = "Color correction matrix position."] +#[doc = ""] + pub ccmPosition: s16, - #[doc = "Right camera, left color correction matrix red/green gain."] - #[doc = ""] +#[doc = "Right camera, left color correction matrix red/green gain."] +#[doc = ""] + pub awbCcmL9Right: u16_, - #[doc = "Left camera, left color correction matrix red/green gain."] - #[doc = ""] +#[doc = "Left camera, left color correction matrix red/green gain."] +#[doc = ""] + pub awbCcmL9Left: u16_, - #[doc = "Right camera, left color correction matrix blue/green gain."] - #[doc = ""] +#[doc = "Right camera, left color correction matrix blue/green gain."] +#[doc = ""] + pub awbCcmL10Right: u16_, - #[doc = "Left camera, left color correction matrix blue/green gain."] - #[doc = ""] +#[doc = "Left camera, left color correction matrix blue/green gain."] +#[doc = ""] + pub awbCcmL10Left: u16_, - #[doc = "Right camera, color correction matrix position threshold."] - #[doc = ""] +#[doc = "Right camera, color correction matrix position threshold."] +#[doc = ""] + pub awbX0Right: u16_, - #[doc = "Left camera, color correction matrix position threshold."] - #[doc = ""] +#[doc = "Left camera, color correction matrix position threshold."] +#[doc = ""] + pub awbX0Left: u16_, } #[doc = "Stereo camera calibration data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_StereoCameraCalibrationData { - #[doc = "#bool Whether the X and Y rotation data is valid."] - #[doc = ""] +#[doc = "#bool Whether the X and Y rotation data is valid."] +#[doc = ""] + pub isValidRotationXY: u8_, - #[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] - #[doc = ""] +#[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] +#[doc = ""] + pub padding: [u8_; 3usize], - #[doc = "Scale to match the left camera image with the right."] - #[doc = ""] +#[doc = "Scale to match the left camera image with the right."] +#[doc = ""] + pub scale: f32, - #[doc = "Z axis rotation to match the left camera image with the right."] - #[doc = ""] +#[doc = "Z axis rotation to match the left camera image with the right."] +#[doc = ""] + pub rotationZ: f32, - #[doc = "X axis translation to match the left camera image with the right."] - #[doc = ""] +#[doc = "X axis translation to match the left camera image with the right."] +#[doc = ""] + pub translationX: f32, - #[doc = "Y axis translation to match the left camera image with the right."] - #[doc = ""] +#[doc = "Y axis translation to match the left camera image with the right."] +#[doc = ""] + pub translationY: f32, - #[doc = "X axis rotation to match the left camera image with the right."] - #[doc = ""] +#[doc = "X axis rotation to match the left camera image with the right."] +#[doc = ""] + pub rotationX: f32, - #[doc = "Y axis rotation to match the left camera image with the right."] - #[doc = ""] +#[doc = "Y axis rotation to match the left camera image with the right."] +#[doc = ""] + pub rotationY: f32, - #[doc = "Right camera angle of view."] - #[doc = ""] +#[doc = "Right camera angle of view."] +#[doc = ""] + pub angleOfViewRight: f32, - #[doc = "Left camera angle of view."] - #[doc = ""] +#[doc = "Left camera angle of view."] +#[doc = ""] + pub angleOfViewLeft: f32, - #[doc = "Distance between cameras and measurement chart."] - #[doc = ""] +#[doc = "Distance between cameras and measurement chart."] +#[doc = ""] + pub distanceToChart: f32, - #[doc = "Distance between left and right cameras."] - #[doc = ""] +#[doc = "Distance between left and right cameras."] +#[doc = ""] + pub distanceCameras: f32, - #[doc = "Image width."] - #[doc = ""] +#[doc = "Image width."] +#[doc = ""] + pub imageWidth: s16, - #[doc = "Image height."] - #[doc = ""] +#[doc = "Image height."] +#[doc = ""] + pub imageHeight: s16, - #[doc = "Reserved for future use. (unused)"] - #[doc = ""] +#[doc = "Reserved for future use. (unused)"] +#[doc = ""] + pub reserved: [u8_; 16usize], } #[doc = "Batch camera configuration for use without a context."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterCameraSelect { - #[doc = "Selected camera."] - #[doc = ""] +#[doc = "Selected camera."] +#[doc = ""] + pub camera: u8_, - #[doc = "Camera exposure."] - #[doc = ""] +#[doc = "Camera exposure."] +#[doc = ""] + pub exposure: s8, - #[doc = "#CAMU_WhiteBalance Camera white balance."] - #[doc = ""] +#[doc = "#CAMU_WhiteBalance Camera white balance."] +#[doc = ""] + pub whiteBalance: u8_, - #[doc = "Camera sharpness."] - #[doc = ""] +#[doc = "Camera sharpness."] +#[doc = ""] + pub sharpness: s8, - #[doc = "#bool Whether to automatically determine the proper exposure."] - #[doc = ""] +#[doc = "#bool Whether to automatically determine the proper exposure."] +#[doc = ""] + pub autoExposureOn: u8_, - #[doc = "#bool Whether to automatically determine the white balance mode."] - #[doc = ""] +#[doc = "#bool Whether to automatically determine the white balance mode."] +#[doc = ""] + pub autoWhiteBalanceOn: u8_, - #[doc = "#CAMU_FrameRate Camera frame rate."] - #[doc = ""] +#[doc = "#CAMU_FrameRate Camera frame rate."] +#[doc = ""] + pub frameRate: u8_, - #[doc = "#CAMU_PhotoMode Camera photo mode."] - #[doc = ""] +#[doc = "#CAMU_PhotoMode Camera photo mode."] +#[doc = ""] + pub photoMode: u8_, - #[doc = "#CAMU_Contrast Camera contrast."] - #[doc = ""] +#[doc = "#CAMU_Contrast Camera contrast."] +#[doc = ""] + pub contrast: u8_, - #[doc = "#CAMU_LensCorrection Camera lens correction."] - #[doc = ""] +#[doc = "#CAMU_LensCorrection Camera lens correction."] +#[doc = ""] + pub lensCorrection: u8_, - #[doc = "#bool Whether to enable the camera's noise filter."] - #[doc = ""] +#[doc = "#bool Whether to enable the camera's noise filter."] +#[doc = ""] + pub noiseFilterOn: u8_, - #[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] - #[doc = ""] +#[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] +#[doc = ""] + pub padding: u8_, - #[doc = "X of the region to use for auto exposure."] - #[doc = ""] +#[doc = "X of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowX: s16, - #[doc = "Y of the region to use for auto exposure."] - #[doc = ""] +#[doc = "Y of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowY: s16, - #[doc = "Width of the region to use for auto exposure."] - #[doc = ""] +#[doc = "Width of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowWidth: s16, - #[doc = "Height of the region to use for auto exposure."] - #[doc = ""] +#[doc = "Height of the region to use for auto exposure."] +#[doc = ""] + pub autoExposureWindowHeight: s16, - #[doc = "X of the region to use for auto white balance."] - #[doc = ""] +#[doc = "X of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowX: s16, - #[doc = "Y of the region to use for auto white balance."] - #[doc = ""] +#[doc = "Y of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowY: s16, - #[doc = "Width of the region to use for auto white balance."] - #[doc = ""] +#[doc = "Width of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowWidth: s16, - #[doc = "Height of the region to use for auto white balance."] - #[doc = ""] +#[doc = "Height of the region to use for auto white balance."] +#[doc = ""] + pub autoWhiteBalanceWindowHeight: s16, } #[doc = "Batch camera configuration for use with a context."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContext { - #[doc = "Selected camera."] - #[doc = ""] +#[doc = "Selected camera."] +#[doc = ""] + pub camera: u8_, - #[doc = "#CAMU_Context Selected context."] - #[doc = ""] +#[doc = "#CAMU_Context Selected context."] +#[doc = ""] + pub context: u8_, - #[doc = "#CAMU_Flip Camera image flip mode."] - #[doc = ""] +#[doc = "#CAMU_Flip Camera image flip mode."] +#[doc = ""] + pub flip: u8_, - #[doc = "#CAMU_Effect Camera image special effects."] - #[doc = ""] +#[doc = "#CAMU_Effect Camera image special effects."] +#[doc = ""] + pub effect: u8_, - #[doc = "#CAMU_Size Camera image resolution."] - #[doc = ""] +#[doc = "#CAMU_Size Camera image resolution."] +#[doc = ""] + pub size: u8_, } #[doc = "Batch camera configuration for use with a context and with detailed size information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContextDetail { - #[doc = "Selected camera."] - #[doc = ""] +#[doc = "Selected camera."] +#[doc = ""] + pub camera: u8_, - #[doc = "#CAMU_Context Selected context."] - #[doc = ""] +#[doc = "#CAMU_Context Selected context."] +#[doc = ""] + pub context: u8_, - #[doc = "#CAMU_Flip Camera image flip mode."] - #[doc = ""] +#[doc = "#CAMU_Flip Camera image flip mode."] +#[doc = ""] + pub flip: u8_, - #[doc = "#CAMU_Effect Camera image special effects."] - #[doc = ""] +#[doc = "#CAMU_Effect Camera image special effects."] +#[doc = ""] + pub effect: u8_, - #[doc = "Image width."] - #[doc = ""] +#[doc = "Image width."] +#[doc = ""] + pub width: s16, - #[doc = "Image height."] - #[doc = ""] +#[doc = "Image height."] +#[doc = ""] + pub height: s16, - #[doc = "First crop point X."] - #[doc = ""] +#[doc = "First crop point X."] +#[doc = ""] + pub cropX0: s16, - #[doc = "First crop point Y."] - #[doc = ""] +#[doc = "First crop point Y."] +#[doc = ""] + pub cropY0: s16, - #[doc = "Second crop point X."] - #[doc = ""] +#[doc = "Second crop point X."] +#[doc = ""] + pub cropX1: s16, - #[doc = "Second crop point Y."] - #[doc = ""] +#[doc = "Second crop point Y."] +#[doc = ""] + pub cropY1: s16, } extern "C" { #[must_use] - #[doc = "Initializes the cam service."] - #[doc = ""] - #[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] - #[doc = ""] +#[doc = "Initializes the cam service."] +#[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] +#[doc = ""] + pub fn camInit() -> Result; } extern "C" { - #[doc = "Closes the cam service."] - #[doc = ""] - #[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] - #[doc = ""] +#[doc = "Closes the cam service."] +#[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] +#[doc = ""] + pub fn camExit(); } extern "C" { #[must_use] - #[doc = "Begins capture on the specified camera port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to begin capture on."] - #[doc = ""] +#[doc = "Begins capture on the specified camera port."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to begin capture on."] +#[doc = ""] + pub fn CAMU_StartCapture(port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates capture on the specified camera port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to terminate capture on."] - #[doc = ""] +#[doc = "Terminates capture on the specified camera port."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to terminate capture on."] +#[doc = ""] + pub fn CAMU_StopCapture(port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the specified camera port is busy."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `busy` - Pointer to output the busy state to."] - #[doc = "* `port` - Port to check."] - #[doc = ""] +#[doc = "Gets whether the specified camera port is busy."] +#[doc = "# Arguments"] +#[doc = "`busy` - Pointer to output the busy state to."] +#[doc = "`port` - Port to check."] +#[doc = ""] + pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the buffer and error flags of the specified camera port."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to clear."] - #[doc = ""] +#[doc = "Clears the buffer and error flags of the specified camera port."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to clear."] +#[doc = ""] + pub fn CAMU_ClearBuffer(port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a handle to the event signaled on vsync interrupts."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to output the event handle to."] - #[doc = "* `port` - Port to use."] - #[doc = ""] +#[doc = "Gets a handle to the event signaled on vsync interrupts."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to output the event handle to."] +#[doc = "`port` - Port to use."] +#[doc = ""] + pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a handle to the event signaled on camera buffer errors."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to output the event handle to."] - #[doc = "* `port` - Port to use."] - #[doc = ""] +#[doc = "Gets a handle to the event signaled on camera buffer errors."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to output the event handle to."] +#[doc = "`port` - Port to use."] +#[doc = ""] + pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates the process of receiving a camera frame."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to output the completion event handle to."] - #[doc = "* `dst` - Buffer to write data to."] - #[doc = "* `port` - Port to receive from."] - #[doc = "* `imageSize` - Size of the image to receive."] - #[doc = "* `transferUnit` - Transfer unit to use when receiving."] - #[doc = ""] +#[doc = "Initiates the process of receiving a camera frame."] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to output the completion event handle to."] +#[doc = "`dst` - Buffer to write data to."] +#[doc = "`port` - Port to receive from."] +#[doc = "`imageSize` - Size of the image to receive."] +#[doc = "`transferUnit` - Transfer unit to use when receiving."] +#[doc = ""] + pub fn CAMU_SetReceiving( event: *mut Handle, dst: *mut ::libc::c_void, @@ -14186,110 +14426,101 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets whether the specified camera port has finished receiving image data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `finishedReceiving` - Pointer to output the receiving status to."] - #[doc = "* `port` - Port to check."] - #[doc = ""] +#[doc = "Gets whether the specified camera port has finished receiving image data."] +#[doc = "# Arguments"] +#[doc = "`finishedReceiving` - Pointer to output the receiving status to."] +#[doc = "`port` - Port to check."] +#[doc = ""] + pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the number of lines to transfer into an image buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to use."] - #[doc = "* `lines` - Lines to transfer."] - #[doc = "* `width` - Width of the image."] - #[doc = "* `height` - Height of the image."] - #[doc = ""] +#[doc = "Sets the number of lines to transfer into an image buffer."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to use."] +#[doc = "`lines` - Lines to transfer."] +#[doc = "`width` - Width of the image."] +#[doc = "`height` - Height of the image."] +#[doc = ""] + pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the maximum number of lines that can be saved to an image buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `maxLines` - Pointer to write the maximum number of lines to."] - #[doc = "* `width` - Width of the image."] - #[doc = "* `height` - Height of the image."] - #[doc = ""] +#[doc = "Gets the maximum number of lines that can be saved to an image buffer."] +#[doc = "# Arguments"] +#[doc = "`maxLines` - Pointer to write the maximum number of lines to."] +#[doc = "`width` - Width of the image."] +#[doc = "`height` - Height of the image."] +#[doc = ""] + pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the number of bytes to transfer into an image buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to use."] - #[doc = "* `bytes` - Bytes to transfer."] - #[doc = "* `width` - Width of the image."] - #[doc = "* `height` - Height of the image."] - #[doc = ""] +#[doc = "Sets the number of bytes to transfer into an image buffer."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to use."] +#[doc = "`bytes` - Bytes to transfer."] +#[doc = "`width` - Width of the image."] +#[doc = "`height` - Height of the image."] +#[doc = ""] + pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the number of bytes to transfer into an image buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `transferBytes` - Pointer to write the number of bytes to."] - #[doc = "* `port` - Port to use."] - #[doc = ""] +#[doc = "Gets the number of bytes to transfer into an image buffer."] +#[doc = "# Arguments"] +#[doc = "`transferBytes` - Pointer to write the number of bytes to."] +#[doc = "`port` - Port to use."] +#[doc = ""] + pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `maxBytes` - Pointer to write the maximum number of bytes to."] - #[doc = "* `width` - Width of the image."] - #[doc = "* `height` - Height of the image."] - #[doc = ""] +#[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] +#[doc = "# Arguments"] +#[doc = "`maxBytes` - Pointer to write the maximum number of bytes to."] +#[doc = "`width` - Width of the image."] +#[doc = "`height` - Height of the image."] +#[doc = ""] + pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether image trimming is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to use."] - #[doc = "* `trimming` - Whether image trimming is enabled."] - #[doc = ""] +#[doc = "Sets whether image trimming is enabled."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to use."] +#[doc = "`trimming` - Whether image trimming is enabled."] +#[doc = ""] + pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether image trimming is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `trimming` - Pointer to output the trim state to."] - #[doc = "* `port` - Port to use."] - #[doc = ""] +#[doc = "Gets whether image trimming is enabled."] +#[doc = "# Arguments"] +#[doc = "`trimming` - Pointer to output the trim state to."] +#[doc = "`port` - Port to use."] +#[doc = ""] + pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the parameters used for trimming images."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to use."] - #[doc = "* `xStart` - Start X coordinate."] - #[doc = "* `yStart` - Start Y coordinate."] - #[doc = "* `xEnd` - End X coordinate."] - #[doc = "* `yEnd` - End Y coordinate."] - #[doc = ""] +#[doc = "Sets the parameters used for trimming images."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to use."] +#[doc = "`xStart` - Start X coordinate."] +#[doc = "`yStart` - Start Y coordinate."] +#[doc = "`xEnd` - End X coordinate."] +#[doc = "`yEnd` - End Y coordinate."] +#[doc = ""] + pub fn CAMU_SetTrimmingParams( port: u32_, xStart: s16, @@ -14300,16 +14531,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the parameters used for trimming images."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `xStart` - Pointer to write the start X coordinate to."] - #[doc = "* `yStart` - Pointer to write the start Y coordinate to."] - #[doc = "* `xEnd` - Pointer to write the end X coordinate to."] - #[doc = "* `yEnd` - Pointer to write the end Y coordinate to."] - #[doc = "* `port` - Port to use."] - #[doc = ""] +#[doc = "Gets the parameters used for trimming images."] +#[doc = "# Arguments"] +#[doc = "`xStart` - Pointer to write the start X coordinate to."] +#[doc = "`yStart` - Pointer to write the start Y coordinate to."] +#[doc = "`xEnd` - Pointer to write the end X coordinate to."] +#[doc = "`yEnd` - Pointer to write the end Y coordinate to."] +#[doc = "`port` - Port to use."] +#[doc = ""] + pub fn CAMU_GetTrimmingParams( xStart: *mut s16, yStart: *mut s16, @@ -14320,16 +14550,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the parameters used for trimming images, relative to the center of the image."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `port` - Port to use."] - #[doc = "* `trimWidth` - Trim width."] - #[doc = "* `trimHeight` - Trim height."] - #[doc = "* `camWidth` - Camera width."] - #[doc = "* `camHeight` - Camera height."] - #[doc = ""] +#[doc = "Sets the parameters used for trimming images, relative to the center of the image."] +#[doc = "# Arguments"] +#[doc = "`port` - Port to use."] +#[doc = "`trimWidth` - Trim width."] +#[doc = "`trimHeight` - Trim height."] +#[doc = "`camWidth` - Camera width."] +#[doc = "`camHeight` - Camera height."] +#[doc = ""] + pub fn CAMU_SetTrimmingParamsCenter( port: u32_, trimWidth: s16, @@ -14340,58 +14569,52 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Activates the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = ""] +#[doc = "Activates the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = ""] + pub fn CAMU_Activate(select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Switches the specified camera's active context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `context` - Context to use."] - #[doc = ""] +#[doc = "Switches the specified camera's active context."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`context` - Context to use."] +#[doc = ""] + pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the exposure value of the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `exposure` - Exposure value to use."] - #[doc = ""] +#[doc = "Sets the exposure value of the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`exposure` - Exposure value to use."] +#[doc = ""] + pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the white balance mode of the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `whiteBalance` - White balance mode to use."] - #[doc = ""] +#[doc = "Sets the white balance mode of the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`whiteBalance` - White balance mode to use."] +#[doc = ""] + pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the white balance mode of the specified camera."] - #[doc = ""] - #[doc = "TODO: Explain \"without base up\"?"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `whiteBalance` - White balance mode to use."] - #[doc = ""] +#[doc = "Sets the white balance mode of the specified camera."] +#[doc = "TODO: Explain \"without base up\"?"] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`whiteBalance` - White balance mode to use."] +#[doc = ""] + pub fn CAMU_SetWhiteBalanceWithoutBaseUp( select: u32_, whiteBalance: CAMU_WhiteBalance, @@ -14399,86 +14622,79 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the sharpness of the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `sharpness` - Sharpness to use."] - #[doc = ""] +#[doc = "Sets the sharpness of the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`sharpness` - Sharpness to use."] +#[doc = ""] + pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether auto exposure is enabled on the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `autoWhiteBalance` - Whether auto exposure is enabled."] - #[doc = ""] +#[doc = "Sets whether auto exposure is enabled on the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`autoWhiteBalance` - Whether auto exposure is enabled."] +#[doc = ""] + pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether auto exposure is enabled on the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `autoExposure` - Pointer to output the auto exposure state to."] - #[doc = "* `select` - Camera to use."] - #[doc = ""] +#[doc = "Gets whether auto exposure is enabled on the specified camera."] +#[doc = "# Arguments"] +#[doc = "`autoExposure` - Pointer to output the auto exposure state to."] +#[doc = "`select` - Camera to use."] +#[doc = ""] + pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether auto white balance is enabled on the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `autoWhiteBalance` - Whether auto white balance is enabled."] - #[doc = ""] +#[doc = "Sets whether auto white balance is enabled on the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`autoWhiteBalance` - Whether auto white balance is enabled."] +#[doc = ""] + pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether auto white balance is enabled on the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `autoWhiteBalance` - Pointer to output the auto white balance state to."] - #[doc = "* `select` - Camera to use."] - #[doc = ""] +#[doc = "Gets whether auto white balance is enabled on the specified camera."] +#[doc = "# Arguments"] +#[doc = "`autoWhiteBalance` - Pointer to output the auto white balance state to."] +#[doc = "`select` - Camera to use."] +#[doc = ""] + pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Flips the image of the specified camera in the specified context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `flip` - Flip mode to use."] - #[doc = "* `context` - Context to use."] - #[doc = ""] +#[doc = "Flips the image of the specified camera in the specified context."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`flip` - Flip mode to use."] +#[doc = "`context` - Context to use."] +#[doc = ""] + pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the image resolution of the given camera in the given context, in detail."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `width` - Width to use."] - #[doc = "* `height` - Height to use."] - #[doc = "* `cropX0` - First crop point X."] - #[doc = "* `cropY0` - First crop point Y."] - #[doc = "* `cropX1` - Second crop point X."] - #[doc = "* `cropY1` - Second crop point Y."] - #[doc = "* `context` - Context to use."] - #[doc = ""] +#[doc = "Sets the image resolution of the given camera in the given context, in detail."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`width` - Width to use."] +#[doc = "`height` - Height to use."] +#[doc = "`cropX0` - First crop point X."] +#[doc = "`cropY0` - First crop point Y."] +#[doc = "`cropX1` - Second crop point X."] +#[doc = "`cropY1` - Second crop point Y."] +#[doc = "`context` - Context to use."] +#[doc = ""] + pub fn CAMU_SetDetailSize( select: u32_, width: s16, @@ -14492,82 +14708,75 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the image resolution of the given camera in the given context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `size` - Size to use."] - #[doc = "* `context` - Context to use."] - #[doc = ""] +#[doc = "Sets the image resolution of the given camera in the given context."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`size` - Size to use."] +#[doc = "`context` - Context to use."] +#[doc = ""] + pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the frame rate of the given camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `frameRate` - Frame rate to use."] - #[doc = ""] +#[doc = "Sets the frame rate of the given camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`frameRate` - Frame rate to use."] +#[doc = ""] + pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the photo mode of the given camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `photoMode` - Photo mode to use."] - #[doc = ""] +#[doc = "Sets the photo mode of the given camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`photoMode` - Photo mode to use."] +#[doc = ""] + pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the special effects of the given camera in the given context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `effect` - Effect to use."] - #[doc = "* `context` - Context to use."] - #[doc = ""] +#[doc = "Sets the special effects of the given camera in the given context."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`effect` - Effect to use."] +#[doc = "`context` - Context to use."] +#[doc = ""] + pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the contrast mode of the given camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `contrast` - Contrast mode to use."] - #[doc = ""] +#[doc = "Sets the contrast mode of the given camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`contrast` - Contrast mode to use."] +#[doc = ""] + pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the lens correction mode of the given camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `lensCorrection` - Lens correction mode to use."] - #[doc = ""] +#[doc = "Sets the lens correction mode of the given camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`lensCorrection` - Lens correction mode to use."] +#[doc = ""] + pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the output format of the given camera in the given context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `format` - Format to output."] - #[doc = "* `context` - Context to use."] - #[doc = ""] +#[doc = "Sets the output format of the given camera in the given context."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`format` - Format to output."] +#[doc = "`context` - Context to use."] +#[doc = ""] + pub fn CAMU_SetOutputFormat( select: u32_, format: CAMU_OutputFormat, @@ -14576,16 +14785,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the region to base auto exposure off of for the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `x` - X of the region."] - #[doc = "* `y` - Y of the region."] - #[doc = "* `width` - Width of the region."] - #[doc = "* `height` - Height of the region."] - #[doc = ""] +#[doc = "Sets the region to base auto exposure off of for the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`x` - X of the region."] +#[doc = "`y` - Y of the region."] +#[doc = "`width` - Width of the region."] +#[doc = "`height` - Height of the region."] +#[doc = ""] + pub fn CAMU_SetAutoExposureWindow( select: u32_, x: s16, @@ -14596,16 +14804,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the region to base auto white balance off of for the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `x` - X of the region."] - #[doc = "* `y` - Y of the region."] - #[doc = "* `width` - Width of the region."] - #[doc = "* `height` - Height of the region."] - #[doc = ""] +#[doc = "Sets the region to base auto white balance off of for the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`x` - X of the region."] +#[doc = "`y` - Y of the region."] +#[doc = "`width` - Width of the region."] +#[doc = "`height` - Height of the region."] +#[doc = ""] + pub fn CAMU_SetAutoWhiteBalanceWindow( select: u32_, x: s16, @@ -14616,855 +14823,894 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets whether the specified camera's noise filter is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to use."] - #[doc = "* `noiseFilter` - Whether the noise filter is enabled."] - #[doc = ""] +#[doc = "Sets whether the specified camera's noise filter is enabled."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to use."] +#[doc = "`noiseFilter` - Whether the noise filter is enabled."] +#[doc = ""] + pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Synchronizes the specified cameras' vsync timing."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select1` - First camera."] - #[doc = "* `select2` - Second camera."] - #[doc = ""] +#[doc = "Synchronizes the specified cameras' vsync timing."] +#[doc = "# Arguments"] +#[doc = "`select1` - First camera."] +#[doc = "`select2` - Second camera."] +#[doc = ""] + pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timing` - Pointer to write timing data to. (size \"past * sizeof(s64)\")"] - #[doc = "* `port` - Port to use."] - #[doc = "* `past` - Number of past timings to retrieve."] - #[doc = ""] +#[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] +#[doc = "# Arguments"] +#[doc = "`timing` - Pointer to write timing data to. (size \"past sizeof(s64)\")"] +#[doc = "`port` - Port to use."] +#[doc = "`past` - Number of past timings to retrieve."] +#[doc = ""] + pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the specified camera's stereo camera calibration data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to output the stereo camera data to."] - #[doc = ""] +#[doc = "Gets the specified camera's stereo camera calibration data."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to output the stereo camera data to."] +#[doc = ""] + pub fn CAMU_GetStereoCameraCalibrationData( data: *mut CAMU_StereoCameraCalibrationData, ) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the specified camera's stereo camera calibration data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Data to set."] - #[doc = ""] +#[doc = "Sets the specified camera's stereo camera calibration data."] +#[doc = "# Arguments"] +#[doc = "`data` - Data to set."] +#[doc = ""] + pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to the specified I2C register of the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to write to."] - #[doc = "* `addr` - Address to write to."] - #[doc = "* `data` - Data to write."] - #[doc = ""] +#[doc = "Writes to the specified I2C register of the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to write to."] +#[doc = "`addr` - Address to write to."] +#[doc = "`data` - Data to write."] +#[doc = ""] + pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to the specified MCU variable of the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to write to."] - #[doc = "* `addr` - Address to write to."] - #[doc = "* `data` - Data to write."] - #[doc = ""] +#[doc = "Writes to the specified MCU variable of the specified camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to write to."] +#[doc = "`addr` - Address to write to."] +#[doc = "`data` - Data to write."] +#[doc = ""] + pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Reads the specified I2C register of the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to read data to."] - #[doc = "* `select` - Camera to read from."] - #[doc = "* `addr` - Address to read."] - #[doc = ""] +#[doc = "Reads the specified I2C register of the specified camera."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to read data to."] +#[doc = "`select` - Camera to read from."] +#[doc = "`addr` - Address to read."] +#[doc = ""] + pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Reads the specified MCU variable of the specified camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to read data to."] - #[doc = "* `select` - Camera to read from."] - #[doc = "* `addr` - Address to read."] - #[doc = ""] +#[doc = "Reads the specified MCU variable of the specified camera."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to read data to."] +#[doc = "`select` - Camera to read from."] +#[doc = "`addr` - Address to read."] +#[doc = ""] + pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the specified camera's image quality calibration data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Data to set."] - #[doc = ""] +#[doc = "Sets the specified camera's image quality calibration data."] +#[doc = "# Arguments"] +#[doc = "`data` - Data to set."] +#[doc = ""] + pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the specified camera's image quality calibration data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to write the quality data to."] - #[doc = ""] +#[doc = "Gets the specified camera's image quality calibration data."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to write the quality data to."] +#[doc = ""] + pub fn CAMU_GetImageQualityCalibrationData( data: *mut CAMU_ImageQualityCalibrationData, ) -> Result; } extern "C" { #[must_use] - #[doc = "Configures a camera with pre-packaged configuration data without a context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `Parameter` - to use."] - #[doc = ""] +#[doc = "Configures a camera with pre-packaged configuration data without a context."] +#[doc = "# Arguments"] +#[doc = "`Parameter` - to use."] +#[doc = ""] + pub fn CAMU_SetPackageParameterWithoutContext( param: CAMU_PackageParameterCameraSelect, ) -> Result; } extern "C" { #[must_use] - #[doc = "Configures a camera with pre-packaged configuration data with a context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `Parameter` - to use."] - #[doc = ""] +#[doc = "Configures a camera with pre-packaged configuration data with a context."] +#[doc = "# Arguments"] +#[doc = "`Parameter` - to use."] +#[doc = ""] + pub fn CAMU_SetPackageParameterWithContext(param: CAMU_PackageParameterContext) -> Result; } extern "C" { #[must_use] - #[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `Parameter` - to use."] - #[doc = ""] +#[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] +#[doc = "# Arguments"] +#[doc = "`Parameter` - to use."] +#[doc = ""] + pub fn CAMU_SetPackageParameterWithContextDetail( param: CAMU_PackageParameterContextDetail, ) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the Y2R coefficient applied to image data by the camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `coefficient` - Pointer to output the Y2R coefficient to."] - #[doc = ""] +#[doc = "Gets the Y2R coefficient applied to image data by the camera."] +#[doc = "# Arguments"] +#[doc = "`coefficient` - Pointer to output the Y2R coefficient to."] +#[doc = ""] + pub fn CAMU_GetSuitableY2rStandardCoefficient( coefficient: *mut Y2RU_StandardCoefficient, ) -> Result; } extern "C" { #[must_use] - #[doc = "Plays the specified shutter sound."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sound` - Shutter sound to play."] - #[doc = ""] +#[doc = "Plays the specified shutter sound."] +#[doc = "# Arguments"] +#[doc = "`sound` - Shutter sound to play."] +#[doc = ""] + pub fn CAMU_PlayShutterSound(sound: CAMU_ShutterSoundType) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the camera driver."] - #[doc = ""] +#[doc = "Initializes the camera driver."] +#[doc = ""] + pub fn CAMU_DriverInitialize() -> Result; } extern "C" { #[must_use] - #[doc = "Finalizes the camera driver."] - #[doc = ""] +#[doc = "Finalizes the camera driver."] +#[doc = ""] + pub fn CAMU_DriverFinalize() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current activated camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Pointer to output the current activated camera to."] - #[doc = ""] +#[doc = "Gets the current activated camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Pointer to output the current activated camera to."] +#[doc = ""] + pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current sleep camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Pointer to output the current sleep camera to."] - #[doc = ""] +#[doc = "Gets the current sleep camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Pointer to output the current sleep camera to."] +#[doc = ""] + pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current sleep camera."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `select` - Camera to set."] - #[doc = ""] +#[doc = "Sets the current sleep camera."] +#[doc = "# Arguments"] +#[doc = "`select` - Camera to set."] +#[doc = ""] + pub fn CAMU_SetSleepCamera(select: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `brightnessSynchronization` - Whether to enable brightness synchronization."] - #[doc = ""] +#[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] +#[doc = "# Arguments"] +#[doc = "`brightnessSynchronization` - Whether to enable brightness synchronization."] +#[doc = ""] + pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes CFGNOR."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Unknown, usually 1."] - #[doc = ""] +#[doc = "Initializes CFGNOR."] +#[doc = "# Arguments"] +#[doc = "`value` - Unknown, usually 1."] +#[doc = ""] + pub fn cfgnorInit(value: u8_) -> Result; } extern "C" { - #[doc = "Exits CFGNOR"] - #[doc = ""] +#[doc = "Exits CFGNOR"] +#[doc = ""] + pub fn cfgnorExit(); } extern "C" { #[must_use] - #[doc = "Dumps the NOR flash."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Buffer to dump to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Dumps the NOR flash."] +#[doc = "# Arguments"] +#[doc = "`buf` - Buffer to dump to."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the NOR flash."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Buffer to write from."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Writes the NOR flash."] +#[doc = "# Arguments"] +#[doc = "`buf` - Buffer to write from."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CFGNOR session."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Unknown, usually 1."] - #[doc = ""] +#[doc = "Initializes the CFGNOR session."] +#[doc = "# Arguments"] +#[doc = "`value` - Unknown, usually 1."] +#[doc = ""] + pub fn CFGNOR_Initialize(value: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Shuts down the CFGNOR session."] - #[doc = ""] +#[doc = "Shuts down the CFGNOR session."] +#[doc = ""] + pub fn CFGNOR_Shutdown() -> Result; } extern "C" { #[must_use] - #[doc = "Reads data from NOR."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `offset` - Offset to read from."] - #[doc = "* `buf` - Buffer to read data to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Reads data from NOR."] +#[doc = "# Arguments"] +#[doc = "`offset` - Offset to read from."] +#[doc = "`buf` - Buffer to read data to."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes data to NOR."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `offset` - Offset to write to."] - #[doc = "* `buf` - Buffer to write data from."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Writes data to NOR."] +#[doc = "# Arguments"] +#[doc = "`offset` - Offset to write to."] +#[doc = "`buf` - Buffer to write data from."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } #[doc = "Japan"] #[doc = ""] + pub const CFG_REGION_JPN: CFG_Region = 0; #[doc = "USA"] #[doc = ""] + pub const CFG_REGION_USA: CFG_Region = 1; #[doc = "Europe"] #[doc = ""] + pub const CFG_REGION_EUR: CFG_Region = 2; #[doc = "Australia"] #[doc = ""] + pub const CFG_REGION_AUS: CFG_Region = 3; #[doc = "China"] #[doc = ""] + pub const CFG_REGION_CHN: CFG_Region = 4; #[doc = "Korea"] #[doc = ""] + pub const CFG_REGION_KOR: CFG_Region = 5; #[doc = "Taiwan"] #[doc = ""] + pub const CFG_REGION_TWN: CFG_Region = 6; #[doc = "Configuration region values."] #[doc = ""] + pub type CFG_Region = ::libc::c_uint; #[doc = "Japanese"] #[doc = ""] + pub const CFG_LANGUAGE_JP: CFG_Language = 0; #[doc = "English"] #[doc = ""] + pub const CFG_LANGUAGE_EN: CFG_Language = 1; #[doc = "French"] #[doc = ""] + pub const CFG_LANGUAGE_FR: CFG_Language = 2; #[doc = "German"] #[doc = ""] + pub const CFG_LANGUAGE_DE: CFG_Language = 3; #[doc = "Italian"] #[doc = ""] + pub const CFG_LANGUAGE_IT: CFG_Language = 4; #[doc = "Spanish"] #[doc = ""] + pub const CFG_LANGUAGE_ES: CFG_Language = 5; #[doc = "Simplified Chinese"] #[doc = ""] + pub const CFG_LANGUAGE_ZH: CFG_Language = 6; #[doc = "Korean"] #[doc = ""] + pub const CFG_LANGUAGE_KO: CFG_Language = 7; #[doc = "Dutch"] #[doc = ""] + pub const CFG_LANGUAGE_NL: CFG_Language = 8; #[doc = "Portugese"] #[doc = ""] + pub const CFG_LANGUAGE_PT: CFG_Language = 9; #[doc = "Russian"] #[doc = ""] + pub const CFG_LANGUAGE_RU: CFG_Language = 10; #[doc = "Traditional Chinese"] #[doc = ""] + pub const CFG_LANGUAGE_TW: CFG_Language = 11; #[doc = "Configuration language values."] #[doc = ""] + pub type CFG_Language = ::libc::c_uint; #[doc = "Old 3DS (CTR)"] #[doc = ""] + pub const CFG_MODEL_3DS: CFG_SystemModel = 0; #[doc = "Old 3DS XL (SPR)"] #[doc = ""] + pub const CFG_MODEL_3DSXL: CFG_SystemModel = 1; #[doc = "New 3DS (KTR)"] #[doc = ""] + pub const CFG_MODEL_N3DS: CFG_SystemModel = 2; #[doc = "Old 2DS (FTR)"] #[doc = ""] + pub const CFG_MODEL_2DS: CFG_SystemModel = 3; #[doc = "New 3DS XL (RED)"] #[doc = ""] + pub const CFG_MODEL_N3DSXL: CFG_SystemModel = 4; #[doc = "New 2DS XL (JAN)"] #[doc = ""] + pub const CFG_MODEL_N2DSXL: CFG_SystemModel = 5; pub type CFG_SystemModel = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes CFGU."] - #[doc = ""] +#[doc = "Initializes CFGU."] +#[doc = ""] + pub fn cfguInit() -> Result; } extern "C" { - #[doc = "Exits CFGU."] - #[doc = ""] +#[doc = "Exits CFGU."] +#[doc = ""] + pub fn cfguExit(); } extern "C" { #[must_use] - #[doc = "Gets the system's region from secure info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `region` - Pointer to output the region to. (see [`CFG_Region)`]"] - #[doc = ""] +#[doc = "Gets the system's region from secure info."] +#[doc = "# Arguments"] +#[doc = "`region` - Pointer to output the region to. (see [`CFG_Region)`]"] +#[doc = ""] + pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Generates a console-unique hash."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `appIDSalt` - Salt to use."] - #[doc = "* `hash` - Pointer to output the hash to."] - #[doc = ""] +#[doc = "Generates a console-unique hash."] +#[doc = "# Arguments"] +#[doc = "`appIDSalt` - Salt to use."] +#[doc = "`hash` - Pointer to output the hash to."] +#[doc = ""] + pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the system's region is Canada or USA."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Pointer to output the result to. (0 = no, 1 = yes)"] - #[doc = ""] +#[doc = "Gets whether the system's region is Canada or USA."] +#[doc = "# Arguments"] +#[doc = "`value` - Pointer to output the result to. (0 = no, 1 = yes)"] +#[doc = ""] + pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's model."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `model` - Pointer to output the model to. (see [`CFG_SystemModel)`]"] - #[doc = ""] +#[doc = "Gets the system's model."] +#[doc = "# Arguments"] +#[doc = "`model` - Pointer to output the model to. (see [`CFG_SystemModel)`]"] +#[doc = ""] + pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the system is a 2DS."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Pointer to output the result to. (0 = yes, 1 = no)"] - #[doc = ""] +#[doc = "Gets whether the system is a 2DS."] +#[doc = "# Arguments"] +#[doc = "`value` - Pointer to output the result to. (0 = yes, 1 = no)"] +#[doc = ""] + pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a string representing a country code."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `code` - Country code to use."] - #[doc = "* `string` - Pointer to output the string to."] - #[doc = ""] +#[doc = "Gets a string representing a country code."] +#[doc = "# Arguments"] +#[doc = "`code` - Country code to use."] +#[doc = "`string` - Pointer to output the string to."] +#[doc = ""] + pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a country code ID from its string."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `string` - String to use."] - #[doc = "* `code` - Pointer to output the country code to."] - #[doc = ""] +#[doc = "Gets a country code ID from its string."] +#[doc = "# Arguments"] +#[doc = "`string` - String to use."] +#[doc = "`code` - Pointer to output the country code to."] +#[doc = ""] + pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if NFC (code name: fangate) is supported."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `isSupported` - pointer to the output the result to."] - #[doc = ""] +#[doc = "Checks if NFC (code name: fangate) is supported."] +#[doc = "# Arguments"] +#[doc = "`isSupported` - pointer to the output the result to."] +#[doc = ""] + pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a config info block with flags = 2."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the data to retrieve."] - #[doc = "* `blkID` - ID of the block to retrieve."] - #[doc = "* `outData` - Pointer to write the block data to."] - #[doc = ""] +#[doc = "Gets a config info block with flags = 2."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the data to retrieve."] +#[doc = "`blkID` - ID of the block to retrieve."] +#[doc = "`outData` - Pointer to write the block data to."] +#[doc = ""] + pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a config info block with flags = 4."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the data to retrieve."] - #[doc = "* `blkID` - ID of the block to retrieve."] - #[doc = "* `outData` - Pointer to write the block data to."] - #[doc = ""] +#[doc = "Gets a config info block with flags = 4."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the data to retrieve."] +#[doc = "`blkID` - ID of the block to retrieve."] +#[doc = "`outData` - Pointer to write the block data to."] +#[doc = ""] + pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Gets a config info block with flags = 8."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the data to retrieve."] - #[doc = "* `blkID` - ID of the block to retrieve."] - #[doc = "* `outData` - Pointer to write the block data to."] - #[doc = ""] +#[doc = "Gets a config info block with flags = 8."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the data to retrieve."] +#[doc = "`blkID` - ID of the block to retrieve."] +#[doc = "`outData` - Pointer to write the block data to."] +#[doc = ""] + pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a config info block with flags = 4."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the data to retrieve."] - #[doc = "* `blkID` - ID of the block to retrieve."] - #[doc = "* `inData` - Pointer to block data to write."] - #[doc = ""] +#[doc = "Sets a config info block with flags = 4."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the data to retrieve."] +#[doc = "`blkID` - ID of the block to retrieve."] +#[doc = "`inData` - Pointer to block data to write."] +#[doc = ""] + pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a config info block with flags = 8."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the data to retrieve."] - #[doc = "* `blkID` - ID of the block to retrieve."] - #[doc = "* `inData` - Pointer to block data to write."] - #[doc = ""] +#[doc = "Sets a config info block with flags = 8."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the data to retrieve."] +#[doc = "`blkID` - ID of the block to retrieve."] +#[doc = "`inData` - Pointer to block data to write."] +#[doc = ""] + pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the CFG buffer in memory to the savegame in NAND."] - #[doc = ""] +#[doc = "Writes the CFG buffer in memory to the savegame in NAND."] +#[doc = ""] + pub fn CFG_UpdateConfigSavegame() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's language."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `language` - Pointer to write the language to. (see [`CFG_Language)`]"] - #[doc = ""] +#[doc = "Gets the system's language."] +#[doc = "# Arguments"] +#[doc = "`language` - Pointer to write the language to. (see [`CFG_Language)`]"] +#[doc = ""] + pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] - #[doc = ""] +#[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] +#[doc = ""] + pub fn CFGI_RestoreLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] - #[doc = ""] +#[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] +#[doc = ""] + pub fn CFGI_RestoreSecureInfo() -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] - #[doc = ""] +#[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] +#[doc = ""] + pub fn CFGI_DeleteConfigSavefile() -> Result; } extern "C" { #[must_use] - #[doc = "Formats Config_Savegame."] - #[doc = ""] +#[doc = "Formats Config_Savegame."] +#[doc = ""] + pub fn CFGI_FormatConfig() -> Result; } extern "C" { #[must_use] - #[doc = "Clears parental controls"] - #[doc = ""] +#[doc = "Clears parental controls"] +#[doc = ""] + pub fn CFGI_ClearParentalControls() -> Result; } extern "C" { #[must_use] - #[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] - #[doc = ""] +#[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] +#[doc = ""] + pub fn CFGI_VerifySigLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] - #[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] - #[doc = ""] +#[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] +#[doc = ""] + pub fn CFGI_VerifySigSecureInfo() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's serial number."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `serial` - Pointer to output the serial to. (This is normally 0xF)"] - #[doc = ""] +#[doc = "Gets the system's serial number."] +#[doc = "# Arguments"] +#[doc = "`serial` - Pointer to output the serial to. (This is normally 0xF)"] +#[doc = ""] + pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] - #[doc = ""] +#[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] +#[doc = ""] + pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 64-bit local friend code seed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `seed` - Pointer to write the friend code seed to."] - #[doc = ""] - pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; +#[doc = "Gets the 64-bit local friend code seed."] +#[doc = "# Arguments"] +#[doc = "`seed` - Pointer to write the friend code seed to."] +#[doc = ""] + + pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 0x11-byte data following the SecureInfo signature."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] - #[doc = ""] +#[doc = "Gets the 0x11-byte data following the SecureInfo signature."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] +#[doc = ""] + pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] - #[doc = ""] +#[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] +#[doc = "# Arguments"] +#[doc = "`data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] +#[doc = ""] + pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result; } #[doc = "PCM8"] #[doc = ""] + pub const CSND_ENCODING_PCM8: _bindgen_ty_17 = 0; #[doc = "PCM16"] #[doc = ""] + pub const CSND_ENCODING_PCM16: _bindgen_ty_17 = 1; #[doc = "IMA-ADPCM"] #[doc = ""] + pub const CSND_ENCODING_ADPCM: _bindgen_ty_17 = 2; #[doc = "PSG (Similar to DS?)"] #[doc = ""] + pub const CSND_ENCODING_PSG: _bindgen_ty_17 = 3; #[doc = "CSND encodings."] #[doc = ""] + pub type _bindgen_ty_17 = ::libc::c_uint; #[doc = "Manual loop."] #[doc = ""] + pub const CSND_LOOPMODE_MANUAL: _bindgen_ty_18 = 0; #[doc = "Normal loop."] #[doc = ""] + pub const CSND_LOOPMODE_NORMAL: _bindgen_ty_18 = 1; #[doc = "Do not loop."] #[doc = ""] + pub const CSND_LOOPMODE_ONESHOT: _bindgen_ty_18 = 2; #[doc = "Don't reload."] #[doc = ""] + pub const CSND_LOOPMODE_NORELOAD: _bindgen_ty_18 = 3; #[doc = "CSND loop modes."] #[doc = ""] + pub type _bindgen_ty_18 = ::libc::c_uint; #[doc = "Linear interpolation."] #[doc = ""] + pub const SOUND_LINEAR_INTERP: _bindgen_ty_19 = 64; #[doc = "Repeat the sound."] #[doc = ""] + pub const SOUND_REPEAT: _bindgen_ty_19 = 1024; #[doc = "Play the sound once."] #[doc = ""] + pub const SOUND_ONE_SHOT: _bindgen_ty_19 = 2048; #[doc = "PCM8"] #[doc = ""] + pub const SOUND_FORMAT_8BIT: _bindgen_ty_19 = 0; #[doc = "PCM16"] #[doc = ""] + pub const SOUND_FORMAT_16BIT: _bindgen_ty_19 = 4096; #[doc = "ADPCM"] #[doc = ""] + pub const SOUND_FORMAT_ADPCM: _bindgen_ty_19 = 8192; #[doc = "PSG"] #[doc = ""] + pub const SOUND_FORMAT_PSG: _bindgen_ty_19 = 12288; #[doc = "Enable sound."] #[doc = ""] + pub const SOUND_ENABLE: _bindgen_ty_19 = 16384; #[doc = "Sound flags."] #[doc = ""] + pub type _bindgen_ty_19 = ::libc::c_uint; #[doc = "Repeat capture."] #[doc = ""] + pub const CAPTURE_REPEAT: _bindgen_ty_20 = 0; #[doc = "Capture once."] #[doc = ""] + pub const CAPTURE_ONE_SHOT: _bindgen_ty_20 = 1; #[doc = "PCM16"] #[doc = ""] + pub const CAPTURE_FORMAT_16BIT: _bindgen_ty_20 = 0; #[doc = "PCM8"] #[doc = ""] + pub const CAPTURE_FORMAT_8BIT: _bindgen_ty_20 = 2; #[doc = "Enable capture."] #[doc = ""] + pub const CAPTURE_ENABLE: _bindgen_ty_20 = 32768; #[doc = "Capture modes."] #[doc = ""] + pub type _bindgen_ty_20 = ::libc::c_uint; #[doc = "0.0% duty cycle"] #[doc = ""] + pub const DutyCycle_0: CSND_DutyCycle = 7; #[doc = "12.5% duty cycle"] #[doc = ""] + pub const DutyCycle_12: CSND_DutyCycle = 0; #[doc = "25.0% duty cycle"] #[doc = ""] + pub const DutyCycle_25: CSND_DutyCycle = 1; #[doc = "37.5% duty cycle"] #[doc = ""] + pub const DutyCycle_37: CSND_DutyCycle = 2; #[doc = "50.0% duty cycle"] #[doc = ""] + pub const DutyCycle_50: CSND_DutyCycle = 3; #[doc = "62.5% duty cycle"] #[doc = ""] + pub const DutyCycle_62: CSND_DutyCycle = 4; #[doc = "75.0% duty cycle"] #[doc = ""] + pub const DutyCycle_75: CSND_DutyCycle = 5; #[doc = "87.5% duty cycle"] #[doc = ""] + pub const DutyCycle_87: CSND_DutyCycle = 6; #[doc = "Duty cycles for a PSG channel."] #[doc = ""] + pub type CSND_DutyCycle = ::libc::c_uint; #[doc = "Channel info."] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub union CSND_ChnInfo { - #[doc = "Raw values."] - #[doc = ""] +#[doc = "Raw values."] +#[doc = ""] + pub value: [u32_; 3usize], pub __bindgen_anon_1: CSND_ChnInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_ChnInfo__bindgen_ty_1 { - #[doc = "Channel active."] - #[doc = ""] +#[doc = "Channel active."] +#[doc = ""] + pub active: u8_, - #[doc = "Padding."] - #[doc = ""] +#[doc = "Padding."] +#[doc = ""] + pub _pad1: u8_, - #[doc = "Padding."] - #[doc = ""] +#[doc = "Padding."] +#[doc = ""] + pub _pad2: u16_, - #[doc = "Current ADPCM sample."] - #[doc = ""] +#[doc = "Current ADPCM sample."] +#[doc = ""] + pub adpcmSample: s16, - #[doc = "Current ADPCM index."] - #[doc = ""] +#[doc = "Current ADPCM index."] +#[doc = ""] + pub adpcmIndex: u8_, - #[doc = "Padding."] - #[doc = ""] +#[doc = "Padding."] +#[doc = ""] + pub _pad3: u8_, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unknownZero: u32_, } impl Default for CSND_ChnInfo { @@ -15478,28 +15724,34 @@ impl Default for CSND_ChnInfo { } #[doc = "Capture info."] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub union CSND_CapInfo { - #[doc = "Raw values."] - #[doc = ""] +#[doc = "Raw values."] +#[doc = ""] + pub value: [u32_; 2usize], pub __bindgen_anon_1: CSND_CapInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_CapInfo__bindgen_ty_1 { - #[doc = "Capture active."] - #[doc = ""] +#[doc = "Capture active."] +#[doc = ""] + pub active: u8_, - #[doc = "Padding."] - #[doc = ""] +#[doc = "Padding."] +#[doc = ""] + pub _pad1: u8_, - #[doc = "Padding."] - #[doc = ""] +#[doc = "Padding."] +#[doc = ""] + pub _pad2: u16_, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unknownZero: u32_, } impl Default for CSND_CapInfo { @@ -15512,238 +15764,222 @@ impl Default for CSND_CapInfo { } } extern "C" { - #[doc = "CSND shared memory."] - #[doc = ""] +#[doc = "CSND shared memory."] +#[doc = ""] + pub static mut csndSharedMem: *mut vu32; } extern "C" { - #[doc = "CSND shared memory size."] - #[doc = ""] +#[doc = "CSND shared memory size."] +#[doc = ""] + pub static mut csndSharedMemSize: u32_; } extern "C" { - #[doc = "Bitmask of channels that are allowed for usage."] - #[doc = ""] +#[doc = "Bitmask of channels that are allowed for usage."] +#[doc = ""] + pub static mut csndChannels: u32_; } extern "C" { #[must_use] - #[doc = "Acquires a capture unit."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Pointer to output the capture unit to."] - #[doc = ""] +#[doc = "Acquires a capture unit."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Pointer to output the capture unit to."] +#[doc = ""] + pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Releases a capture unit."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to release."] - #[doc = ""] +#[doc = "Releases a capture unit."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to release."] +#[doc = ""] + pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes the data cache of a memory region."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `adr` - Address of the memory region."] - #[doc = "* `size` - Size of the memory region."] - #[doc = ""] +#[doc = "Flushes the data cache of a memory region."] +#[doc = "# Arguments"] +#[doc = "`adr` - Address of the memory region."] +#[doc = "`size` - Size of the memory region."] +#[doc = ""] + pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Stores the data cache of a memory region."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `adr` - Address of the memory region."] - #[doc = "* `size` - Size of the memory region."] - #[doc = ""] +#[doc = "Stores the data cache of a memory region."] +#[doc = "# Arguments"] +#[doc = "`adr` - Address of the memory region."] +#[doc = "`size` - Size of the memory region."] +#[doc = ""] + pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates the data cache of a memory region."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `adr` - Address of the memory region."] - #[doc = "* `size` - Size of the memory region."] - #[doc = ""] +#[doc = "Invalidates the data cache of a memory region."] +#[doc = "# Arguments"] +#[doc = "`adr` - Address of the memory region."] +#[doc = "`size` - Size of the memory region."] +#[doc = ""] + pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Resets CSND."] - #[doc = ""] - #[doc = "Note: Currently breaks sound, don't use for now!"] - #[doc = ""] +#[doc = "Resets CSND."] +#[doc = "Note: Currently breaks sound, don't use for now!"] +#[doc = ""] + pub fn CSND_Reset() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes CSND."] - #[doc = ""] +#[doc = "Initializes CSND."] +#[doc = ""] + pub fn csndInit() -> Result; } extern "C" { - #[doc = "Exits CSND."] - #[doc = ""] +#[doc = "Exits CSND."] +#[doc = ""] + pub fn csndExit(); } extern "C" { - #[doc = "Adds a command to the list, returning a buffer to write arguments to."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A buffer to write command arguments to."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cmdid` - ID of the command to add."] - #[doc = ""] +#[doc = "Adds a command to the list, returning a buffer to write arguments to."] +#[doc = "Returns:"] +#[doc = "A buffer to write command arguments to."] +#[doc = "# Arguments"] +#[doc = "`cmdid` - ID of the command to add."] +#[doc = ""] + pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32_; } extern "C" { - #[doc = "Adds a command to the list, copying its arguments from a buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cmdid` - ID of the command to add."] - #[doc = "* `cmdparams` - Buffer containing the command's parameters."] - #[doc = ""] +#[doc = "Adds a command to the list, copying its arguments from a buffer."] +#[doc = "# Arguments"] +#[doc = "`cmdid` - ID of the command to add."] +#[doc = "`cmdparams` - Buffer containing the command's parameters."] +#[doc = ""] + pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_); } extern "C" { #[must_use] - #[doc = "Executes pending CSND commands."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `waitDone` - Whether to wait until the commands have finished executing."] - #[doc = ""] +#[doc = "Executes pending CSND commands."] +#[doc = "# Arguments"] +#[doc = "`waitDone` - Whether to wait until the commands have finished executing."] +#[doc = ""] + pub fn csndExecCmds(waitDone: bool) -> Result; } extern "C" { - #[doc = "Sets a channel's play state, resetting registers on stop."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `value` - Play state to set."] - #[doc = ""] +#[doc = "Sets a channel's play state, resetting registers on stop."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`value` - Play state to set."] +#[doc = ""] + pub fn CSND_SetPlayStateR(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets a channel's play state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `value` - Play state to set."] - #[doc = ""] +#[doc = "Sets a channel's play state."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`value` - Play state to set."] +#[doc = ""] + pub fn CSND_SetPlayState(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets a channel's encoding."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `value` - Encoding to set."] - #[doc = ""] +#[doc = "Sets a channel's encoding."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`value` - Encoding to set."] +#[doc = ""] + pub fn CSND_SetEncoding(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets the data of a channel's block."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `block` - Block to set."] - #[doc = "* `physaddr` - Physical address to set the block to."] - #[doc = "* `size` - Size of the block."] - #[doc = ""] +#[doc = "Sets the data of a channel's block."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`block` - Block to set."] +#[doc = "`physaddr` - Physical address to set the block to."] +#[doc = "`size` - Size of the block."] +#[doc = ""] + pub fn CSND_SetBlock(channel: u32_, block: ::libc::c_int, physaddr: u32_, size: u32_); } extern "C" { - #[doc = "Sets whether to loop a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `value` - Whether to loop the channel."] - #[doc = ""] +#[doc = "Sets whether to loop a channel."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`value` - Whether to loop the channel."] +#[doc = ""] + pub fn CSND_SetLooping(channel: u32_, value: u32_); } extern "C" { - #[doc = "Sets bit 7 of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `set` - Value to set."] - #[doc = ""] +#[doc = "Sets bit 7 of a channel."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`set` - Value to set."] +#[doc = ""] + pub fn CSND_SetBit7(channel: u32_, set: bool); } extern "C" { - #[doc = "Sets whether a channel should use interpolation."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `interp` - Whether to use interpolation."] - #[doc = ""] +#[doc = "Sets whether a channel should use interpolation."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`interp` - Whether to use interpolation."] +#[doc = ""] + pub fn CSND_SetInterp(channel: u32_, interp: bool); } extern "C" { - #[doc = "Sets a channel's duty."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `duty` - Duty to set."] - #[doc = ""] +#[doc = "Sets a channel's duty."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`duty` - Duty to set."] +#[doc = ""] + pub fn CSND_SetDuty(channel: u32_, duty: CSND_DutyCycle); } extern "C" { - #[doc = "Sets a channel's timer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `timer` - Timer to set."] - #[doc = ""] +#[doc = "Sets a channel's timer."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`timer` - Timer to set."] +#[doc = ""] + pub fn CSND_SetTimer(channel: u32_, timer: u32_); } extern "C" { - #[doc = "Sets a channel's volume."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `chnVolumes` - Channel volume data to set."] - #[doc = "* `capVolumes` - Capture volume data to set."] - #[doc = ""] +#[doc = "Sets a channel's volume."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`chnVolumes` - Channel volume data to set."] +#[doc = "`capVolumes` - Capture volume data to set."] +#[doc = ""] + pub fn CSND_SetVol(channel: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { - #[doc = "Sets a channel's ADPCM state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `block` - Current block."] - #[doc = "* `sample` - Current sample."] - #[doc = "* `index` - Current index."] - #[doc = ""] +#[doc = "Sets a channel's ADPCM state."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`block` - Current block."] +#[doc = "`sample` - Current sample."] +#[doc = "`index` - Current index."] +#[doc = ""] + pub fn CSND_SetAdpcmState( channel: u32_, block: ::libc::c_int, @@ -15752,27 +15988,25 @@ extern "C" { ); } extern "C" { - #[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to use."] - #[doc = "* `reload` - Whether to reload ADPCM data."] - #[doc = ""] +#[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to use."] +#[doc = "`reload` - Whether to reload ADPCM data."] +#[doc = ""] + pub fn CSND_SetAdpcmReload(channel: u32_, reload: bool); } extern "C" { - #[doc = "Sets CSND's channel registers."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flags` - Flags to set."] - #[doc = "* `physaddr0` - Physical address of the first buffer to play."] - #[doc = "* `physaddr1` - Physical address of the second buffer to play."] - #[doc = "* `totalbytesize` - Total size of the data to play."] - #[doc = "* `chnVolumes` - Channel volume data."] - #[doc = "* `capVolumes` - Capture volume data."] - #[doc = ""] +#[doc = "Sets CSND's channel registers."] +#[doc = "# Arguments"] +#[doc = "`flags` - Flags to set."] +#[doc = "`physaddr0` - Physical address of the first buffer to play."] +#[doc = "`physaddr1` - Physical address of the second buffer to play."] +#[doc = "`totalbytesize` - Total size of the data to play."] +#[doc = "`chnVolumes` - Channel volume data."] +#[doc = "`capVolumes` - Capture volume data."] +#[doc = ""] + pub fn CSND_SetChnRegs( flags: u32_, physaddr0: u32_, @@ -15783,15 +16017,14 @@ extern "C" { ); } extern "C" { - #[doc = "Sets CSND's PSG channel registers."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flags` - Flags to set."] - #[doc = "* `chnVolumes` - Channel volume data."] - #[doc = "* `capVolumes` - Capture volume data."] - #[doc = "* `duty` - Duty value to set."] - #[doc = ""] +#[doc = "Sets CSND's PSG channel registers."] +#[doc = "# Arguments"] +#[doc = "`flags` - Flags to set."] +#[doc = "`chnVolumes` - Channel volume data."] +#[doc = "`capVolumes` - Capture volume data."] +#[doc = "`duty` - Duty value to set."] +#[doc = ""] + pub fn CSND_SetChnRegsPSG( flags: u32_, chnVolumes: u32_, @@ -15800,126 +16033,114 @@ extern "C" { ); } extern "C" { - #[doc = "Sets CSND's noise channel registers."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flags` - Flags to set."] - #[doc = "* `chnVolumes` - Channel volume data."] - #[doc = "* `capVolumes` - Capture volume data."] - #[doc = ""] +#[doc = "Sets CSND's noise channel registers."] +#[doc = "# Arguments"] +#[doc = "`flags` - Flags to set."] +#[doc = "`chnVolumes` - Channel volume data."] +#[doc = "`capVolumes` - Capture volume data."] +#[doc = ""] + pub fn CSND_SetChnRegsNoise(flags: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { - #[doc = "Sets whether a capture unit is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to use."] - #[doc = "* `enable` - Whether to enable the capture unit."] - #[doc = ""] +#[doc = "Sets whether a capture unit is enabled."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to use."] +#[doc = "`enable` - Whether to enable the capture unit."] +#[doc = ""] + pub fn CSND_CapEnable(capUnit: u32_, enable: bool); } extern "C" { - #[doc = "Sets whether a capture unit should repeat."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to use."] - #[doc = "* `repeat` - Whether the capture unit should repeat."] - #[doc = ""] +#[doc = "Sets whether a capture unit should repeat."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to use."] +#[doc = "`repeat` - Whether the capture unit should repeat."] +#[doc = ""] + pub fn CSND_CapSetRepeat(capUnit: u32_, repeat: bool); } extern "C" { - #[doc = "Sets a capture unit's format."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to use."] - #[doc = "* `eightbit` - Format to use."] - #[doc = ""] +#[doc = "Sets a capture unit's format."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to use."] +#[doc = "`eightbit` - Format to use."] +#[doc = ""] + pub fn CSND_CapSetFormat(capUnit: u32_, eightbit: bool); } extern "C" { - #[doc = "Sets a capture unit's second bit."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to use."] - #[doc = "* `set` - Value to set."] - #[doc = ""] +#[doc = "Sets a capture unit's second bit."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to use."] +#[doc = "`set` - Value to set."] +#[doc = ""] + pub fn CSND_CapSetBit2(capUnit: u32_, set: bool); } extern "C" { - #[doc = "Sets a capture unit's timer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to use."] - #[doc = "* `timer` - Timer to set."] - #[doc = ""] +#[doc = "Sets a capture unit's timer."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to use."] +#[doc = "`timer` - Timer to set."] +#[doc = ""] + pub fn CSND_CapSetTimer(capUnit: u32_, timer: u32_); } extern "C" { - #[doc = "Sets a capture unit's buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to use."] - #[doc = "* `addr` - Buffer address to use."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Sets a capture unit's buffer."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to use."] +#[doc = "`addr` - Buffer address to use."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn CSND_CapSetBuffer(capUnit: u32_, addr: u32_, size: u32_); } extern "C" { - #[doc = "Sets a capture unit's capture registers."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to use."] - #[doc = "* `flags` - Capture unit flags."] - #[doc = "* `addr` - Capture unit buffer address."] - #[doc = "* `size` - Buffer size."] - #[doc = ""] +#[doc = "Sets a capture unit's capture registers."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to use."] +#[doc = "`flags` - Capture unit flags."] +#[doc = "`addr` - Capture unit buffer address."] +#[doc = "`size` - Buffer size."] +#[doc = ""] + pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_); } extern "C" { #[must_use] - #[doc = "Sets up DSP flags."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `waitDone` - Whether to wait for completion."] - #[doc = ""] +#[doc = "Sets up DSP flags."] +#[doc = "# Arguments"] +#[doc = "`waitDone` - Whether to wait for completion."] +#[doc = ""] + pub fn CSND_SetDspFlags(waitDone: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Updates CSND information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `waitDone` - Whether to wait for completion."] - #[doc = ""] +#[doc = "Updates CSND information."] +#[doc = "# Arguments"] +#[doc = "`waitDone` - Whether to wait for completion."] +#[doc = ""] + pub fn CSND_UpdateInfo(waitDone: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Plays a sound."] - #[doc = ""] - #[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `chn` - Channel to play the sound on."] - #[doc = "* `flags` - Flags containing information about the sound."] - #[doc = "* `sampleRate` - Sample rate of the sound."] - #[doc = "* `vol` - The volume, ranges from 0.0 to 1.0 included."] - #[doc = "* `pan` - The pan, ranges from -1.0 to 1.0 included."] - #[doc = "* `data0` - First block of sound data."] - #[doc = "* `data1` - Second block of sound data. This is the block that will be looped over."] - #[doc = "* `size` - Size of the sound data."] - #[doc = ""] +#[doc = "Plays a sound."] +#[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] +#[doc = "# Arguments"] +#[doc = "`chn` - Channel to play the sound on."] +#[doc = "`flags` - Flags containing information about the sound."] +#[doc = "`sampleRate` - Sample rate of the sound."] +#[doc = "`vol` - The volume, ranges from 0.0 to 1.0 included."] +#[doc = "`pan` - The pan, ranges from -1.0 to 1.0 included."] +#[doc = "`data0` - First block of sound data."] +#[doc = "`data1` - Second block of sound data. This is the block that will be looped over."] +#[doc = "`size` - Size of the sound data."] +#[doc = ""] + pub fn csndPlaySound( chn: ::libc::c_int, flags: u32_, @@ -15932,107 +16153,105 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Gets CSND's DSP flags."] - #[doc = ""] - #[doc = "Note: Requires previous CSND_UpdateInfo()"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `outSemFlags` - Pointer to write semaphore flags to."] - #[doc = "* `outIrqFlags` - Pointer to write interrupt flags to."] - #[doc = ""] +#[doc = "Gets CSND's DSP flags."] +#[doc = "Note: Requires previous CSND_UpdateInfo()"] +#[doc = "# Arguments"] +#[doc = "`outSemFlags` - Pointer to write semaphore flags to."] +#[doc = "`outIrqFlags` - Pointer to write interrupt flags to."] +#[doc = ""] + pub fn csndGetDspFlags(outSemFlags: *mut u32_, outIrqFlags: *mut u32_); } extern "C" { - #[doc = "Gets a channel's information."] - #[doc = ""] - #[doc = "Note: Requires previous CSND_UpdateInfo()"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The channel's information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to get information for."] - #[doc = ""] +#[doc = "Gets a channel's information."] +#[doc = "Note: Requires previous CSND_UpdateInfo()"] +#[doc = "Returns:"] +#[doc = "The channel's information."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to get information for."] +#[doc = ""] + pub fn csndGetChnInfo(channel: u32_) -> *mut CSND_ChnInfo; } extern "C" { - #[doc = "Gets a capture unit's information."] - #[doc = ""] - #[doc = "Note: Requires previous CSND_UpdateInfo()"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The capture unit's information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capUnit` - Capture unit to get information for."] - #[doc = ""] +#[doc = "Gets a capture unit's information."] +#[doc = "Note: Requires previous CSND_UpdateInfo()"] +#[doc = "Returns:"] +#[doc = "The capture unit's information."] +#[doc = "# Arguments"] +#[doc = "`capUnit` - Capture unit to get information for."] +#[doc = ""] + pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo; } extern "C" { #[must_use] - #[doc = "Gets a channel's state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to get the state of."] - #[doc = "* `out` - Pointer to output channel information to."] - #[doc = ""] +#[doc = "Gets a channel's state."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to get the state of."] +#[doc = "`out` - Pointer to output channel information to."] +#[doc = ""] + pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether a channel is playing."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Channel to check."] - #[doc = "* `status` - Pointer to output the channel status to."] - #[doc = ""] +#[doc = "Gets whether a channel is playing."] +#[doc = "# Arguments"] +#[doc = "`channel` - Channel to check."] +#[doc = "`status` - Pointer to output the channel status to."] +#[doc = ""] + pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result; } #[doc = "Pipe interrupt."] #[doc = ""] + pub const DSP_INTERRUPT_PIPE: DSP_InterruptType = 2; #[doc = "DSP interrupt types."] #[doc = ""] + pub type DSP_InterruptType = ::libc::c_uint; #[doc = "DSP is going to sleep."] #[doc = ""] + pub const DSPHOOK_ONSLEEP: DSP_HookType = 0; #[doc = "DSP is waking up."] #[doc = ""] + pub const DSPHOOK_ONWAKEUP: DSP_HookType = 1; #[doc = "DSP was sleeping and the app was cancelled."] #[doc = ""] + pub const DSPHOOK_ONCANCEL: DSP_HookType = 2; #[doc = "DSP hook types."] #[doc = ""] + pub type DSP_HookType = ::libc::c_uint; #[doc = "DSP hook function."] #[doc = ""] + pub type dspHookFn = ::core::option::Option; #[doc = "DSP hook cookie."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_dspHookCookie { - #[doc = "Next cookie."] - #[doc = ""] +#[doc = "Next cookie."] +#[doc = ""] + pub next: *mut tag_dspHookCookie, - #[doc = "Hook callback."] - #[doc = ""] +#[doc = "Hook callback."] +#[doc = ""] + pub callback: dspHookFn, } impl Default for tag_dspHookCookie { @@ -16047,136 +16266,122 @@ impl Default for tag_dspHookCookie { #[doc = "DSP hook cookie."] #[doc = ""] + pub type dspHookCookie = tag_dspHookCookie; extern "C" { #[must_use] - #[doc = "Initializes the dsp service."] - #[doc = ""] - #[doc = "Call this before calling any DSP_* function."] - #[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* This will also unload any previously loaded DSP binary."] - #[doc = ""] +#[doc = "Initializes the dsp service."] +#[doc = "Call this before calling any DSP_* function."] +#[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] +#[doc = "# Notes"] +#[doc = "This will also unload any previously loaded DSP binary."] +#[doc = ""] + pub fn dspInit() -> Result; } extern "C" { - #[doc = "Closes the dsp service."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* This will also unload the DSP binary."] - #[doc = ""] +#[doc = "Closes the dsp service."] +#[doc = "# Notes"] +#[doc = "This will also unload the DSP binary."] +#[doc = ""] + pub fn dspExit(); } extern "C" { - #[doc = "Returns true if a component is loaded, false otherwise."] - #[doc = ""] +#[doc = "Returns true if a component is loaded, false otherwise."] +#[doc = ""] + pub fn dspIsComponentLoaded() -> bool; } extern "C" { - #[doc = "Sets up a DSP status hook."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cookie` - Hook cookie to use."] - #[doc = "* `callback` - Function to call when DSP's status changes."] - #[doc = ""] +#[doc = "Sets up a DSP status hook."] +#[doc = "# Arguments"] +#[doc = "`cookie` - Hook cookie to use."] +#[doc = "`callback` - Function to call when DSP's status changes."] +#[doc = ""] + pub fn dspHook(cookie: *mut dspHookCookie, callback: dspHookFn); } extern "C" { - #[doc = "Removes a DSP status hook."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cookie` - Hook cookie to remove."] - #[doc = ""] +#[doc = "Removes a DSP status hook."] +#[doc = "# Arguments"] +#[doc = "`cookie` - Hook cookie to remove."] +#[doc = ""] + pub fn dspUnhook(cookie: *mut dspHookCookie); } extern "C" { #[must_use] - #[doc = "Checks if a headphone is inserted."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `is_inserted` - Pointer to output the insertion status to."] - #[doc = ""] +#[doc = "Checks if a headphone is inserted."] +#[doc = "# Arguments"] +#[doc = "`is_inserted` - Pointer to output the insertion status to."] +#[doc = ""] + pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Flushes the cache"] - #[doc = ""] - #[doc = "Flushes the cache for the specified memory range and invalidates the cache"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] - #[doc = "* `size` - Size of the memory range to flush"] - #[doc = ""] +#[doc = "Flushes the cache"] +#[doc = "Flushes the cache for the specified memory range and invalidates the cache"] +#[doc = "# Arguments"] +#[doc = "`address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] +#[doc = "`size` - Size of the memory range to flush"] +#[doc = ""] + pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates the cache"] - #[doc = ""] - #[doc = "Invalidates the cache for the specified memory range"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] - #[doc = "* `size` - Size of the memory range to flush"] - #[doc = ""] +#[doc = "Invalidates the cache"] +#[doc = "Invalidates the cache for the specified memory range"] +#[doc = "# Arguments"] +#[doc = "`address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] +#[doc = "`size` - Size of the memory range to flush"] +#[doc = ""] + pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Retrieves the handle of the DSP semaphore."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `semaphore` - Pointer to output the semaphore to."] - #[doc = ""] +#[doc = "Retrieves the handle of the DSP semaphore."] +#[doc = "# Arguments"] +#[doc = "`semaphore` - Pointer to output the semaphore to."] +#[doc = ""] + pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the DSP hardware semaphore value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Value to set."] - #[doc = ""] +#[doc = "Sets the DSP hardware semaphore value."] +#[doc = "# Arguments"] +#[doc = "`value` - Value to set."] +#[doc = ""] + pub fn DSP_SetSemaphore(value: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Masks the DSP hardware semaphore value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mask` - Mask to apply."] - #[doc = ""] +#[doc = "Masks the DSP hardware semaphore value."] +#[doc = "# Arguments"] +#[doc = "`mask` - Mask to apply."] +#[doc = ""] + pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Loads a DSP binary and starts the DSP"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `component` - The program file address in memory"] - #[doc = "* `size` - The size of the program"] - #[doc = "* `prog_mask` - DSP memory block related ? Default is 0xff."] - #[doc = "* `data_mask` - DSP memory block related ? Default is 0xff."] - #[doc = "* `is_loaded` - Indicates if the DSP was succesfully loaded."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The binary must be signed (http://3dbrew.org/wiki/DSP_Binary)"] - #[doc = "* Seems to be called when the 3ds leaves the Sleep mode"] - #[doc = ""] +#[doc = "Loads a DSP binary and starts the DSP"] +#[doc = "# Arguments"] +#[doc = "`component` - The program file address in memory"] +#[doc = "`size` - The size of the program"] +#[doc = "`prog_mask` - DSP memory block related ? Default is 0xff."] +#[doc = "`data_mask` - DSP memory block related ? Default is 0xff."] +#[doc = "`is_loaded` - Indicates if the DSP was succesfully loaded."] +#[doc = "# Notes"] +#[doc = "The binary must be signed (http://3dbrew.org/wiki/DSP_Binary)"] +#[doc = "Seems to be called when the 3ds leaves the Sleep mode"] +#[doc = ""] + pub fn DSP_LoadComponent( component: *const ::libc::c_void, size: u32_, @@ -16187,38 +16392,35 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Stops the DSP by unloading the binary."] - #[doc = ""] +#[doc = "Stops the DSP by unloading the binary."] +#[doc = ""] + pub fn DSP_UnloadComponent() -> Result; } extern "C" { #[must_use] - #[doc = "Registers an event handle with the DSP through IPC"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Event handle to register."] - #[doc = "* `interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] - #[doc = "* `channel` - The pipe channel. Usual value is 2"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* It is possible that interrupt are inverted"] - #[doc = ""] +#[doc = "Registers an event handle with the DSP through IPC"] +#[doc = "# Arguments"] +#[doc = "`handle` - Event handle to register."] +#[doc = "`interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] +#[doc = "`channel` - The pipe channel. Usual value is 2"] +#[doc = "# Notes"] +#[doc = "It is possible that interrupt are inverted"] +#[doc = ""] + pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Reads a pipe if possible."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - unknown. Usually 2"] - #[doc = "* `peer` - unknown. Usually 0"] - #[doc = "* `buffer` - The buffer that will store the values read from the pipe"] - #[doc = "* `length` - Length of the buffer"] - #[doc = "* `length_read` - Number of bytes read by the command"] - #[doc = ""] +#[doc = "Reads a pipe if possible."] +#[doc = "# Arguments"] +#[doc = "`channel` - unknown. Usually 2"] +#[doc = "`peer` - unknown. Usually 0"] +#[doc = "`buffer` - The buffer that will store the values read from the pipe"] +#[doc = "`length` - Length of the buffer"] +#[doc = "`length_read` - Number of bytes read by the command"] +#[doc = ""] + pub fn DSP_ReadPipeIfPossible( channel: u32_, peer: u32_, @@ -16229,14 +16431,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a pipe."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - unknown. Usually 2"] - #[doc = "* `buffer` - The message to send to the DSP process"] - #[doc = "* `length` - Length of the message"] - #[doc = ""] +#[doc = "Writes to a pipe."] +#[doc = "# Arguments"] +#[doc = "`channel` - unknown. Usually 2"] +#[doc = "`buffer` - The message to send to the DSP process"] +#[doc = "`length` - Length of the message"] +#[doc = ""] + pub fn DSP_WriteProcessPipe( channel: u32_, buffer: *const ::libc::c_void, @@ -16245,13 +16446,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Converts a DSP memory address to a virtual address usable by the process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dsp_address` - Address to convert."] - #[doc = "* `arm_address` - Pointer to output the converted address to."] - #[doc = ""] +#[doc = "Converts a DSP memory address to a virtual address usable by the process."] +#[doc = "# Arguments"] +#[doc = "`dsp_address` - Address to convert."] +#[doc = "`arm_address` - Pointer to output the converted address to."] +#[doc = ""] + pub fn DSP_ConvertProcessAddressFromDspDram( dsp_address: u32_, arm_address: *mut u32_, @@ -16259,54 +16459,46 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads a DSP register"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* `value` - Pointer to read the register value to."] - #[doc = ""] +#[doc = "Reads a DSP register"] +#[doc = "# Arguments"] +#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "`value` - Pointer to read the register value to."] +#[doc = ""] + pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if you can read a DSP register"] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* This call might hang if the data is not ready. See [`DSP_SendDataIsEmpty`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* `is_ready` - Pointer to write the ready status to."] - #[doc = ""] +#[doc = "Checks if you can read a DSP register"] +#[doc = "**Warning!**"] +#[doc = "This call might hang if the data is not ready. See [`DSP_SendDataIsEmpty`]"] +#[doc = "# Arguments"] +#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "`is_ready` - Pointer to write the ready status to."] +#[doc = ""] + pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Writes to a DSP register"] - #[doc = ""] - #[doc = "**Warning!**"] - #[doc = ""] - #[doc = "* This call might hang if the SendData is not empty. See [`DSP_SendDataIsEmpty`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* `value` - Value to write."] - #[doc = ""] +#[doc = "Writes to a DSP register"] +#[doc = "**Warning!**"] +#[doc = "This call might hang if the SendData is not empty. See [`DSP_SendDataIsEmpty`]"] +#[doc = "# Arguments"] +#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "`value` - Value to write."] +#[doc = ""] + pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if you can write to a DSP register ?"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] - #[doc = "* `is_empty` - Pointer to write the empty status to."] - #[doc = ""] +#[doc = "Checks if you can write to a DSP register ?"] +#[doc = "# Arguments"] +#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] +#[doc = "`is_empty` - Pointer to write the empty status to."] +#[doc = ""] + pub fn DSP_SendDataIsEmpty(regNo: u16_, is_empty: *mut bool) -> Result; } pub type FSPXI_Archive = u64_; @@ -16314,16 +16506,15 @@ pub type FSPXI_File = u64_; pub type FSPXI_Directory = u64_; extern "C" { #[must_use] - #[doc = "Opens a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the file handle to."] - #[doc = "* `archive` - Archive containing the file."] - #[doc = "* `path` - Path of the file."] - #[doc = "* `flags` - Flags to open the file with."] - #[doc = "* `attributes` - Attributes of the file."] - #[doc = ""] +#[doc = "Opens a file."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the file handle to."] +#[doc = "`archive` - Archive containing the file."] +#[doc = "`path` - Path of the file."] +#[doc = "`flags` - Flags to open the file with."] +#[doc = "`attributes` - Attributes of the file."] +#[doc = ""] + pub fn FSPXI_OpenFile( serviceHandle: Handle, out: *mut FSPXI_File, @@ -16335,27 +16526,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive containing the file."] - #[doc = "* `path` - Path of the file."] - #[doc = ""] +#[doc = "Deletes a file."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive containing the file."] +#[doc = "`path` - Path of the file."] +#[doc = ""] + pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] - #[doc = "Renames a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `srcArchive` - Archive containing the source file."] - #[doc = "* `srcPath` - Path of the source file."] - #[doc = "* `dstArchive` - Archive containing the destination file."] - #[doc = "* `dstPath` - Path of the destination file."] - #[doc = ""] +#[doc = "Renames a file."] +#[doc = "# Arguments"] +#[doc = "`srcArchive` - Archive containing the source file."] +#[doc = "`srcPath` - Path of the source file."] +#[doc = "`dstArchive` - Archive containing the destination file."] +#[doc = "`dstPath` - Path of the destination file."] +#[doc = ""] + pub fn FSPXI_RenameFile( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -16366,13 +16555,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Deletes a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive containing the directory."] - #[doc = "* `path` - Path of the directory."] - #[doc = ""] +#[doc = "Deletes a directory."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive containing the directory."] +#[doc = "`path` - Path of the directory."] +#[doc = ""] + pub fn FSPXI_DeleteDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16381,15 +16569,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to create the file in."] - #[doc = "* `path` - Path of the file."] - #[doc = "* `attributes` - Attributes of the file."] - #[doc = "* `size` - Size of the file."] - #[doc = ""] +#[doc = "Creates a file."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to create the file in."] +#[doc = "`path` - Path of the file."] +#[doc = "`attributes` - Attributes of the file."] +#[doc = "`size` - Size of the file."] +#[doc = ""] + pub fn FSPXI_CreateFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16400,14 +16587,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to create the directory in."] - #[doc = "* `path` - Path of the directory."] - #[doc = "* `attributes` - Attributes of the directory."] - #[doc = ""] +#[doc = "Creates a directory."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to create the directory in."] +#[doc = "`path` - Path of the directory."] +#[doc = "`attributes` - Attributes of the directory."] +#[doc = ""] + pub fn FSPXI_CreateDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16417,15 +16603,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Renames a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `srcArchive` - Archive containing the source directory."] - #[doc = "* `srcPath` - Path of the source directory."] - #[doc = "* `dstArchive` - Archive containing the destination directory."] - #[doc = "* `dstPath` - Path of the destination directory."] - #[doc = ""] +#[doc = "Renames a directory."] +#[doc = "# Arguments"] +#[doc = "`srcArchive` - Archive containing the source directory."] +#[doc = "`srcPath` - Path of the source directory."] +#[doc = "`dstArchive` - Archive containing the destination directory."] +#[doc = "`dstPath` - Path of the destination directory."] +#[doc = ""] + pub fn FSPXI_RenameDirectory( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -16436,14 +16621,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a directory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the directory handle to."] - #[doc = "* `archive` - Archive containing the directory."] - #[doc = "* `path` - Path of the directory."] - #[doc = ""] +#[doc = "Opens a directory."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the directory handle to."] +#[doc = "`archive` - Archive containing the directory."] +#[doc = "`path` - Path of the directory."] +#[doc = ""] + pub fn FSPXI_OpenDirectory( serviceHandle: Handle, out: *mut FSPXI_Directory, @@ -16453,16 +16637,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to read from."] - #[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] - #[doc = "* `offset` - Offset to read from."] - #[doc = "* `buffer` - Buffer to read to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Reads from a file."] +#[doc = "# Arguments"] +#[doc = "`file` - File to read from."] +#[doc = "`bytesRead` - Pointer to output the number of read bytes to."] +#[doc = "`offset` - Offset to read from."] +#[doc = "`buffer` - Buffer to read to."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn FSPXI_ReadFile( serviceHandle: Handle, file: FSPXI_File, @@ -16474,14 +16657,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Calculate SHA256 of a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to calculate the hash of."] - #[doc = "* `buffer` - Buffer to output the hash to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Calculate SHA256 of a file."] +#[doc = "# Arguments"] +#[doc = "`file` - File to calculate the hash of."] +#[doc = "`buffer` - Buffer to output the hash to."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn FSPXI_CalculateFileHashSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -16491,17 +16673,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Writes to a file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to write to."] - #[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] - #[doc = "* `offset` - Offset to write to."] - #[doc = "* `buffer` - Buffer to write from."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `flags` - Flags to use when writing."] - #[doc = ""] +#[doc = "Writes to a file."] +#[doc = "# Arguments"] +#[doc = "`file` - File to write to."] +#[doc = "`bytesWritten` - Pointer to output the number of bytes written to."] +#[doc = "`offset` - Offset to write to."] +#[doc = "`buffer` - Buffer to write from."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`flags` - Flags to use when writing."] +#[doc = ""] + pub fn FSPXI_WriteFile( serviceHandle: Handle, file: FSPXI_File, @@ -16514,16 +16695,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Calculates the MAC used in a DISA/DIFF header?"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - Unsure"] - #[doc = "* `inBuffer` - 0x100-byte DISA/DIFF input buffer."] - #[doc = "* `inSize` - Size of inBuffer."] - #[doc = "* `outBuffer` - Buffer to write MAC to."] - #[doc = "* `outSize` - Size of outBuffer."] - #[doc = ""] +#[doc = "Calculates the MAC used in a DISA/DIFF header?"] +#[doc = "# Arguments"] +#[doc = "`file` - Unsure"] +#[doc = "`inBuffer` - 0x100-byte DISA/DIFF input buffer."] +#[doc = "`inSize` - Size of inBuffer."] +#[doc = "`outBuffer` - Buffer to write MAC to."] +#[doc = "`outSize` - Size of outBuffer."] +#[doc = ""] + pub fn FSPXI_CalcSavegameMAC( serviceHandle: Handle, file: FSPXI_File, @@ -16535,47 +16715,43 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get size of a file"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to get the size of."] - #[doc = "* `size` - Pointer to output size to."] - #[doc = ""] +#[doc = "Get size of a file"] +#[doc = "# Arguments"] +#[doc = "`file` - File to get the size of."] +#[doc = "`size` - Pointer to output size to."] +#[doc = ""] + pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Set size of a file"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to set the size of"] - #[doc = "* `size` - Size to set the file to"] - #[doc = ""] +#[doc = "Set size of a file"] +#[doc = "# Arguments"] +#[doc = "`file` - File to set the size of"] +#[doc = "`size` - Size to set the file to"] +#[doc = ""] + pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Close a file"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to close"] - #[doc = ""] +#[doc = "Close a file"] +#[doc = "# Arguments"] +#[doc = "`file` - File to close"] +#[doc = ""] + pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result; } extern "C" { #[must_use] - #[doc = "Reads one or more directory entries."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `directory` - Directory to read from."] - #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] - #[doc = "* `entryCount` - Number of entries to read."] - #[doc = "* `entryOut` - Pointer to output directory entries to."] - #[doc = ""] +#[doc = "Reads one or more directory entries."] +#[doc = "# Arguments"] +#[doc = "`directory` - Directory to read from."] +#[doc = "`entriesRead` - Pointer to output the number of entries read to."] +#[doc = "`entryCount` - Number of entries to read."] +#[doc = "`entryOut` - Pointer to output directory entries to."] +#[doc = ""] + pub fn FSPXI_ReadDirectory( serviceHandle: Handle, directory: FSPXI_Directory, @@ -16586,24 +16762,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Close a directory"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `directory` - Directory to close."] - #[doc = ""] +#[doc = "Close a directory"] +#[doc = "# Arguments"] +#[doc = "`directory` - Directory to close."] +#[doc = ""] + pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result; } extern "C" { #[must_use] - #[doc = "Opens an archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Pointer to output the opened archive to."] - #[doc = "* `id` - ID of the archive."] - #[doc = "* `path` - Path of the archive."] - #[doc = ""] +#[doc = "Opens an archive."] +#[doc = "# Arguments"] +#[doc = "`archive` - Pointer to output the opened archive to."] +#[doc = "`id` - ID of the archive."] +#[doc = "`path` - Path of the archive."] +#[doc = ""] + pub fn FSPXI_OpenArchive( serviceHandle: Handle, archive: *mut FSPXI_Archive, @@ -16613,14 +16787,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks if the archive contains a file at path."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to check."] - #[doc = "* `out` - Pointer to output existence to."] - #[doc = "* `path` - Path to check for file"] - #[doc = ""] +#[doc = "Checks if the archive contains a file at path."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to check."] +#[doc = "`out` - Pointer to output existence to."] +#[doc = "`path` - Path to check for file"] +#[doc = ""] + pub fn FSPXI_HasFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16630,14 +16803,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks if the archive contains a directory at path."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to check."] - #[doc = "* `out` - Pointer to output existence to."] - #[doc = "* `path` - Path to check for directory"] - #[doc = ""] +#[doc = "Checks if the archive contains a directory at path."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to check."] +#[doc = "`out` - Pointer to output existence to."] +#[doc = "`path` - Path to check for directory"] +#[doc = ""] + pub fn FSPXI_HasDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16647,38 +16819,33 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Commits an archive's save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to commit."] - #[doc = "* `id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Unsure why id is sent. This appears to be the default action for FSUSER_ControlArchive, with every action other than 0 and 0x789D being sent to this command."] - #[doc = ""] +#[doc = "Commits an archive's save data."] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to commit."] +#[doc = "`id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] +#[doc = "# Notes"] +#[doc = "Unsure why id is sent. This appears to be the default action for FSUSER_ControlArchive, with every action other than 0 and 0x789D being sent to this command."] +#[doc = ""] + pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Close an archive"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive to close."] - #[doc = ""] +#[doc = "Close an archive"] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive to close."] +#[doc = ""] + pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result; } extern "C" { #[must_use] - #[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - Archive handle to check validity of."] - #[doc = "* `out` - Pointer to output validity to."] - #[doc = ""] +#[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] +#[doc = "# Arguments"] +#[doc = "`archive` - Archive handle to check validity of."] +#[doc = "`out` - Pointer to output validity to."] +#[doc = ""] + pub fn FSPXI_Unknown0x17( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16687,22 +16854,20 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the inserted card type."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the card type to."] - #[doc = ""] +#[doc = "Gets the inserted card type."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the card type to."] +#[doc = ""] + pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC archive resource information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the archive resource information to."] - #[doc = ""] +#[doc = "Gets the SDMC archive resource information."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the archive resource information to."] +#[doc = ""] + pub fn FSPXI_GetSdmcArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -16710,12 +16875,11 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the NAND archive resource information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the archive resource information to."] - #[doc = ""] +#[doc = "Gets the NAND archive resource information."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the archive resource information to."] +#[doc = ""] + pub fn FSPXI_GetNandArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -16723,169 +16887,156 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the error code from the SDMC FatFS driver"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the error code to"] - #[doc = ""] +#[doc = "Gets the error code from the SDMC FatFS driver"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the error code to"] +#[doc = ""] + pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether PXIFS0 detects the SD"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the detection status to"] - #[doc = ""] +#[doc = "Gets whether PXIFS0 detects the SD"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the detection status to"] +#[doc = ""] + pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether PXIFS0 can write to the SD"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the writable status to"] - #[doc = ""] +#[doc = "Gets whether PXIFS0 can write to the SD"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the writable status to"] +#[doc = ""] + pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC CID"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Buffer to output the CID to."] - #[doc = "* `size` - Size of buffer."] - #[doc = ""] +#[doc = "Gets the SDMC CID"] +#[doc = "# Arguments"] +#[doc = "`out` - Buffer to output the CID to."] +#[doc = "`size` - Size of buffer."] +#[doc = ""] + pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND CID"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Buffer to output the CID to."] - #[doc = "* `size` - Size of buffer."] - #[doc = ""] +#[doc = "Gets the NAND CID"] +#[doc = "# Arguments"] +#[doc = "`out` - Buffer to output the CID to."] +#[doc = "`size` - Size of buffer."] +#[doc = ""] + pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC speed info"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Buffer to output the speed info to."] - #[doc = ""] +#[doc = "Gets the SDMC speed info"] +#[doc = "# Arguments"] +#[doc = "`out` - Buffer to output the speed info to."] +#[doc = ""] + pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND speed info"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Buffer to output the speed info to."] - #[doc = ""] +#[doc = "Gets the NAND speed info"] +#[doc = "# Arguments"] +#[doc = "`out` - Buffer to output the speed info to."] +#[doc = ""] + pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the SDMC log"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Buffer to output the log to."] - #[doc = "* `size` - Size of buffer."] - #[doc = ""] +#[doc = "Gets the SDMC log"] +#[doc = "# Arguments"] +#[doc = "`out` - Buffer to output the log to."] +#[doc = "`size` - Size of buffer."] +#[doc = ""] + pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the NAND log"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Buffer to output the log to."] - #[doc = "* `size` - Size of buffer."] - #[doc = ""] +#[doc = "Gets the NAND log"] +#[doc = "# Arguments"] +#[doc = "`out` - Buffer to output the log to."] +#[doc = "`size` - Size of buffer."] +#[doc = ""] + pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the SDMC log"] - #[doc = ""] +#[doc = "Clears the SDMC log"] +#[doc = ""] + pub fn FSPXI_ClearSdmcLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Clears the NAND log"] - #[doc = ""] +#[doc = "Clears the NAND log"] +#[doc = ""] + pub fn FSPXI_ClearNandLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether a card is inserted."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inserted` - Pointer to output the insertion status to."] - #[doc = ""] +#[doc = "Gets whether a card is inserted."] +#[doc = "# Arguments"] +#[doc = "`inserted` - Pointer to output the insertion status to."] +#[doc = ""] + pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers on the card slot."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `status` - Pointer to output the power status to."] - #[doc = ""] +#[doc = "Powers on the card slot."] +#[doc = "# Arguments"] +#[doc = "`status` - Pointer to output the power status to."] +#[doc = ""] + pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Powers off the card slot."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `status` - Pointer to output the power status to."] - #[doc = ""] +#[doc = "Powers off the card slot."] +#[doc = "# Arguments"] +#[doc = "`status` - Pointer to output the power status to."] +#[doc = ""] + pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the card's power status."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `status` - Pointer to output the power status to."] - #[doc = ""] +#[doc = "Gets the card's power status."] +#[doc = "# Arguments"] +#[doc = "`status` - Pointer to output the power status to."] +#[doc = ""] + pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct command."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = ""] + pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct command with an address."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct command with an address."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = ""] + pub fn FSPXI_CardNorDirectCommandWithAddress( serviceHandle: Handle, commandId: u8_, @@ -16894,14 +17045,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `size` - Size of the output buffer."] - #[doc = "* `output` - Output buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct read."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`size` - Size of the output buffer."] +#[doc = "`output` - Output buffer."] +#[doc = ""] + pub fn FSPXI_CardNorDirectRead( serviceHandle: Handle, commandId: u8_, @@ -16911,15 +17061,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct read with an address."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the output buffer."] - #[doc = "* `output` - Output buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct read with an address."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the output buffer."] +#[doc = "`output` - Output buffer."] +#[doc = ""] + pub fn FSPXI_CardNorDirectReadWithAddress( serviceHandle: Handle, commandId: u8_, @@ -16930,18 +17079,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `output` - Input buffer."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Stubbed in latest firmware, since ?.?.?"] - #[doc = ""] +#[doc = "Executes a CARDNOR direct write."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`size` - Size of the input buffer."] +#[doc = "`output` - Input buffer."] +#[doc = "# Notes"] +#[doc = "Stubbed in latest firmware, since ?.?.?"] +#[doc = ""] + pub fn FSPXI_CardNorDirectWrite( serviceHandle: Handle, commandId: u8_, @@ -16951,15 +17097,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct write with an address."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `input` - Input buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct write with an address."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the input buffer."] +#[doc = "`input` - Input buffer."] +#[doc = ""] + pub fn FSPXI_CardNorDirectWriteWithAddress( serviceHandle: Handle, commandId: u8_, @@ -16970,15 +17115,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR 4xIO direct read."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `commandId` - ID of the command."] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the output buffer."] - #[doc = "* `output` - Output buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR 4xIO direct read."] +#[doc = "# Arguments"] +#[doc = "`commandId` - ID of the command."] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the output buffer."] +#[doc = "`output` - Output buffer."] +#[doc = ""] + pub fn FSPXI_CardNorDirectRead_4xIO( serviceHandle: Handle, commandId: u8_, @@ -16989,14 +17133,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct CPU write without verify."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `address` - Address to provide."] - #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `output` - Input buffer."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct CPU write without verify."] +#[doc = "# Arguments"] +#[doc = "`address` - Address to provide."] +#[doc = "`size` - Size of the input buffer."] +#[doc = "`output` - Input buffer."] +#[doc = ""] + pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify( serviceHandle: Handle, address: u32_, @@ -17006,12 +17149,11 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Executes a CARDNOR direct sector erase without verify."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `address` - Address to provide."] - #[doc = ""] +#[doc = "Executes a CARDNOR direct sector erase without verify."] +#[doc = "# Arguments"] +#[doc = "`address` - Address to provide."] +#[doc = ""] + pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify( serviceHandle: Handle, address: u32_, @@ -17019,13 +17161,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets an NCCH's product info"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Pointer to output the product info to."] - #[doc = "* `archive` - Open NCCH content archive"] - #[doc = ""] +#[doc = "Gets an NCCH's product info"] +#[doc = "# Arguments"] +#[doc = "`info` - Pointer to output the product info to."] +#[doc = "`archive` - Open NCCH content archive"] +#[doc = ""] + pub fn FSPXI_GetProductInfo( serviceHandle: Handle, info: *mut FS_ProductInfo, @@ -17034,67 +17175,61 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI baud rate."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `baudRate` - Baud rate to set."] - #[doc = ""] +#[doc = "Sets the CARDSPI baud rate."] +#[doc = "# Arguments"] +#[doc = "`baudRate` - Baud rate to set."] +#[doc = ""] + pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the CARDSPI bus mode."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `busMode` - Bus mode to set."] - #[doc = ""] +#[doc = "Sets the CARDSPI bus mode."] +#[doc = "# Arguments"] +#[doc = "`busMode` - Bus mode to set."] +#[doc = ""] + pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] - #[doc = "Sends initialization info to ARM9"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `unk` - FS sends *(0x1FF81086)"] - #[doc = ""] +#[doc = "Sends initialization info to ARM9"] +#[doc = "# Arguments"] +#[doc = "`unk` - FS sends *(0x1FF81086)"] +#[doc = ""] + pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates ext save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Info of the save data."] - #[doc = ""] +#[doc = "Creates ext save data."] +#[doc = "# Arguments"] +#[doc = "`info` - Info of the save data."] +#[doc = ""] + pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes ext save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Info of the save data."] - #[doc = ""] +#[doc = "Deletes ext save data."] +#[doc = "# Arguments"] +#[doc = "`info` - Info of the save data."] +#[doc = ""] + pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Enumerates ext save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] - #[doc = "* `idsSize` - Size of the IDs buffer."] - #[doc = "* `mediaType` - Media type to enumerate over."] - #[doc = "* `idSize` - Size of each ID element."] - #[doc = "* `shared` - Whether to enumerate shared ext save data."] - #[doc = "* `ids` - Pointer to output IDs to."] - #[doc = ""] +#[doc = "Enumerates ext save data."] +#[doc = "# Arguments"] +#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "`idsSize` - Size of the IDs buffer."] +#[doc = "`mediaType` - Media type to enumerate over."] +#[doc = "`idSize` - Size of each ID element."] +#[doc = "`shared` - Whether to enumerate shared ext save data."] +#[doc = "`ids` - Pointer to output IDs to."] +#[doc = ""] + pub fn FSPXI_EnumerateExtSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -17107,15 +17242,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a special content's index."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `index` - Pointer to output the index to."] - #[doc = "* `mediaType` - Media type of the special content."] - #[doc = "* `programId` - Program ID owning the special content."] - #[doc = "* `type` - Type of special content."] - #[doc = ""] +#[doc = "Gets a special content's index."] +#[doc = "# Arguments"] +#[doc = "`index` - Pointer to output the index to."] +#[doc = "`mediaType` - Media type of the special content."] +#[doc = "`programId` - Program ID owning the special content."] +#[doc = "`type` - Type of special content."] +#[doc = ""] + pub fn FSPXI_GetSpecialContentIndex( serviceHandle: Handle, index: *mut u16_, @@ -17126,14 +17260,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy ROM header of a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Media type of the program."] - #[doc = "* `programId` - ID of the program."] - #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] - #[doc = ""] +#[doc = "Gets the legacy ROM header of a program."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Media type of the program."] +#[doc = "`programId` - ID of the program."] +#[doc = "`header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] +#[doc = ""] + pub fn FSPXI_GetLegacyRomHeader( serviceHandle: Handle, mediaType: FS_MediaType, @@ -17143,15 +17276,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy banner data of a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediaType` - Media type of the program."] - #[doc = "* `programId` - ID of the program."] - #[doc = "* `banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] - #[doc = "* `unk` - Unknown. Always 1?"] - #[doc = ""] +#[doc = "Gets the legacy banner data of a program."] +#[doc = "# Arguments"] +#[doc = "`mediaType` - Media type of the program."] +#[doc = "`programId` - ID of the program."] +#[doc = "`banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] +#[doc = "`unk` - Unknown. Always 1?"] +#[doc = ""] + pub fn FSPXI_GetLegacyBannerData( serviceHandle: Handle, mediaType: FS_MediaType, @@ -17162,58 +17294,59 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Formats the CARDNOR device."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `unk` - Unknown. Transaction?"] - #[doc = ""] +#[doc = "Formats the CARDNOR device."] +#[doc = "# Arguments"] +#[doc = "`unk` - Unknown. Transaction?"] +#[doc = ""] + pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes the 3DS SDMC root."] - #[doc = ""] +#[doc = "Deletes the 3DS SDMC root."] +#[doc = ""] + pub fn FSPXI_DeleteSdmcRoot(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Deletes all ext save data on the NAND."] - #[doc = ""] +#[doc = "Deletes all ext save data on the NAND."] +#[doc = ""] + pub fn FSPXI_DeleteAllExtSaveDataOnNand(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes the CTR file system."] - #[doc = ""] +#[doc = "Initializes the CTR file system."] +#[doc = ""] + pub fn FSPXI_InitializeCtrFilesystem(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Creates the FS seed."] - #[doc = ""] +#[doc = "Creates the FS seed."] +#[doc = ""] + pub fn FSPXI_CreateSeed(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the CTR SDMC root path."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to output the root path to."] - #[doc = "* `length` - Length of the output buffer in bytes."] - #[doc = ""] +#[doc = "Gets the CTR SDMC root path."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to output the root path to."] +#[doc = "`length` - Length of the output buffer in bytes."] +#[doc = ""] + pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an archive's resource information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] - #[doc = "* `mediaType` - System media type to check."] - #[doc = ""] +#[doc = "Gets an archive's resource information."] +#[doc = "# Arguments"] +#[doc = "`archiveResource` - Pointer to output the archive resource information to."] +#[doc = "`mediaType` - System media type to check."] +#[doc = ""] + pub fn FSPXI_GetArchiveResource( serviceHandle: Handle, archiveResource: *mut FS_ArchiveResource, @@ -17222,12 +17355,11 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Exports the integrity verification seed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `seed` - Pointer to output the seed to."] - #[doc = ""] +#[doc = "Exports the integrity verification seed."] +#[doc = "# Arguments"] +#[doc = "`seed` - Pointer to output the seed to."] +#[doc = ""] + pub fn FSPXI_ExportIntegrityVerificationSeed( serviceHandle: Handle, seed: *mut FS_IntegrityVerificationSeed, @@ -17235,12 +17367,11 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Imports an integrity verification seed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `seed` - Seed to import."] - #[doc = ""] +#[doc = "Imports an integrity verification seed."] +#[doc = "# Arguments"] +#[doc = "`seed` - Seed to import."] +#[doc = ""] + pub fn FSPXI_ImportIntegrityVerificationSeed( serviceHandle: Handle, seed: *const FS_IntegrityVerificationSeed, @@ -17248,15 +17379,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the legacy sub banner data of a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bannerSize` - Size of the banner."] - #[doc = "* `mediaType` - Media type of the program."] - #[doc = "* `programId` - ID of the program."] - #[doc = "* `header` - Pointer to output the legacy sub banner data to."] - #[doc = ""] +#[doc = "Gets the legacy sub banner data of a program."] +#[doc = "# Arguments"] +#[doc = "`bannerSize` - Size of the banner."] +#[doc = "`mediaType` - Media type of the program."] +#[doc = "`programId` - ID of the program."] +#[doc = "`header` - Pointer to output the legacy sub banner data to."] +#[doc = ""] + pub fn FSPXI_GetLegacySubBannerData( serviceHandle: Handle, bannerSize: u32_, @@ -17267,13 +17397,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Buffer to output random bytes to."] - #[doc = "* `size` - Size of buffer."] - #[doc = ""] +#[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] +#[doc = "# Arguments"] +#[doc = "`buf` - Buffer to output random bytes to."] +#[doc = "`size` - Size of buffer."] +#[doc = ""] + pub fn FSPXI_GenerateRandomBytes( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -17282,15 +17411,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the last modified time of a file in an archive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `archive` - The archive that contains the file."] - #[doc = "* `out` - The pointer to write the timestamp to."] - #[doc = "* `path` - The UTF-16 path of the file."] - #[doc = "* `size` - The size of the path."] - #[doc = ""] +#[doc = "Gets the last modified time of a file in an archive."] +#[doc = "# Arguments"] +#[doc = "`archive` - The archive that contains the file."] +#[doc = "`out` - The pointer to write the timestamp to."] +#[doc = "`path` - The UTF-16 path of the file."] +#[doc = "`size` - The size of the path."] +#[doc = ""] + pub fn FSPXI_GetFileLastModified( serviceHandle: Handle, archive: FSPXI_Archive, @@ -17301,15 +17429,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads from a special file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] - #[doc = "* `fileOffset` - Offset of the file."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `data` - Buffer to read to."] - #[doc = ""] +#[doc = "Reads from a special file."] +#[doc = "# Arguments"] +#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] +#[doc = "`fileOffset` - Offset of the file."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`data` - Buffer to read to."] +#[doc = ""] + pub fn FSPXI_ReadSpecialFile( serviceHandle: Handle, bytesRead: *mut u32_, @@ -17320,22 +17447,20 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the size of a special file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `fileSize` - Pointer to output the size to."] - #[doc = ""] +#[doc = "Gets the size of a special file."] +#[doc = "# Arguments"] +#[doc = "`fileSize` - Pointer to output the size to."] +#[doc = ""] + pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Initiates a device move as the source device."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Pointer to output the context to."] - #[doc = ""] +#[doc = "Initiates a device move as the source device."] +#[doc = "# Arguments"] +#[doc = "`context` - Pointer to output the context to."] +#[doc = ""] + pub fn FSPXI_StartDeviceMoveAsSource( serviceHandle: Handle, context: *mut FS_DeviceMoveContext, @@ -17343,13 +17468,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initiates a device move as the destination device."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `clear` - Whether to clear the device's data first."] - #[doc = ""] +#[doc = "Initiates a device move as the destination device."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`clear` - Whether to clear the device's data first."] +#[doc = ""] + pub fn FSPXI_StartDeviceMoveAsDestination( serviceHandle: Handle, context: FS_DeviceMoveContext, @@ -17358,19 +17482,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads data and stores SHA256 hashes of blocks"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to read from."] - #[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] - #[doc = "* `offset` - Offset to read from."] - #[doc = "* `readBuffer` - Pointer to store read data in."] - #[doc = "* `readBufferSize` - Size of readBuffer."] - #[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] - #[doc = "* `hashtableSize` - Size of hashtable."] - #[doc = "* `unk` - Unknown. Always 0x00001000? Possibly block size?"] - #[doc = ""] +#[doc = "Reads data and stores SHA256 hashes of blocks"] +#[doc = "# Arguments"] +#[doc = "`file` - File to read from."] +#[doc = "`bytesRead` - Pointer to output the number of read bytes to."] +#[doc = "`offset` - Offset to read from."] +#[doc = "`readBuffer` - Pointer to store read data in."] +#[doc = "`readBufferSize` - Size of readBuffer."] +#[doc = "`hashtable` - Pointer to store SHA256 hashes in."] +#[doc = "`hashtableSize` - Size of hashtable."] +#[doc = "`unk` - Unknown. Always 0x00001000? Possibly block size?"] +#[doc = ""] + pub fn FSPXI_ReadFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -17385,20 +17508,19 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `file` - File to write to."] - #[doc = "* `bytesWritten` - Pointer to output the number of written bytes to."] - #[doc = "* `offset` - Offset to write to."] - #[doc = "* `writeBuffer` - Buffer to write from."] - #[doc = "* `writeBufferSize` - Size of writeBuffer."] - #[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] - #[doc = "* `hashtableSize` - Size of hashtable"] - #[doc = "* `unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] - #[doc = "* `unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] - #[doc = ""] +#[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] +#[doc = "# Arguments"] +#[doc = "`file` - File to write to."] +#[doc = "`bytesWritten` - Pointer to output the number of written bytes to."] +#[doc = "`offset` - Offset to write to."] +#[doc = "`writeBuffer` - Buffer to write from."] +#[doc = "`writeBufferSize` - Size of writeBuffer."] +#[doc = "`hashtable` - Pointer to store SHA256 hashes in."] +#[doc = "`hashtableSize` - Size of hashtable"] +#[doc = "`unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] +#[doc = "`unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] +#[doc = ""] + pub fn FSPXI_WriteFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -17414,44 +17536,40 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures CTRCARD latency emulation."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `latency` - Latency to apply."] - #[doc = ""] +#[doc = "Configures CTRCARD latency emulation."] +#[doc = "# Arguments"] +#[doc = "`latency` - Latency to apply."] +#[doc = ""] + pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the file system priority."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `priority` - Priority to set."] - #[doc = ""] +#[doc = "Sets the file system priority."] +#[doc = "# Arguments"] +#[doc = "`priority` - Priority to set."] +#[doc = ""] + pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Toggles cleaning up invalid save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] - #[doc = ""] +#[doc = "Toggles cleaning up invalid save data."] +#[doc = "# Arguments"] +#[doc = "`enable` - Whether to enable cleaning up invalid save data."] +#[doc = ""] + pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Enumerates system save data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] - #[doc = "* `idsSize` - Size of the IDs buffer."] - #[doc = "* `ids` - Pointer to output IDs to."] - #[doc = ""] +#[doc = "Enumerates system save data."] +#[doc = "# Arguments"] +#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] +#[doc = "`idsSize` - Size of the IDs buffer."] +#[doc = "`ids` - Pointer to output IDs to."] +#[doc = ""] + pub fn FSPXI_EnumerateSystemSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -17461,14 +17579,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads the NAND report."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `unk` - Unknown"] - #[doc = "* `buffer` - Buffer to write the report to."] - #[doc = "* `size` - Size of buffer"] - #[doc = ""] +#[doc = "Reads the NAND report."] +#[doc = "# Arguments"] +#[doc = "`unk` - Unknown"] +#[doc = "`buffer` - Buffer to write the report to."] +#[doc = "`size` - Size of buffer"] +#[doc = ""] + pub fn FSPXI_ReadNandReport( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -17478,12 +17595,11 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unknown command 0x56"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Called by FSUSER_ControlArchive with ArchiveAction 0x789D"] - #[doc = ""] +#[doc = "Unknown command 0x56"] +#[doc = "# Notes"] +#[doc = "Called by FSUSER_ControlArchive with ArchiveAction 0x789D"] +#[doc = ""] + pub fn FSPXI_Unknown0x56( serviceHandle: Handle, out: *mut u32_, @@ -17493,35 +17609,35 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes fs:REG."] - #[doc = ""] +#[doc = "Initializes fs:REG."] +#[doc = ""] + pub fn fsRegInit() -> Result; } extern "C" { - #[doc = "Exits fs:REG."] - #[doc = ""] +#[doc = "Exits fs:REG."] +#[doc = ""] + pub fn fsRegExit(); } extern "C" { - #[doc = "Gets the current fs:REG session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current fs:REG session handle."] - #[doc = ""] +#[doc = "Gets the current fs:REG session handle."] +#[doc = "Returns:"] +#[doc = "The current fs:REG session handle."] +#[doc = ""] + pub fn fsRegGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Registers a program's storage information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pid` - The Process ID of the program."] - #[doc = "* `programHandle` - The program handle."] - #[doc = "* `programInfo` - Information about the program."] - #[doc = "* `storageInfo` - Storage information to register."] - #[doc = ""] +#[doc = "Registers a program's storage information."] +#[doc = "# Arguments"] +#[doc = "`pid` - The Process ID of the program."] +#[doc = "`programHandle` - The program handle."] +#[doc = "`programInfo` - Information about the program."] +#[doc = "`storageInfo` - Storage information to register."] +#[doc = ""] + pub fn FSREG_Register( pid: u32_, programHandle: u64_, @@ -17531,24 +17647,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters a program's storage information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pid` - The Process ID of the program."] - #[doc = ""] +#[doc = "Unregisters a program's storage information."] +#[doc = "# Arguments"] +#[doc = "`pid` - The Process ID of the program."] +#[doc = ""] + pub fn FSREG_Unregister(pid: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set(s)."] - #[doc = "* `maxNumEntries` - The maximum number of entries."] - #[doc = "* `programHandle` - The program handle."] - #[doc = ""] +#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] +#[doc = "# Arguments"] +#[doc = "`exheaderInfos[out]` - Pointer to the output exheader information set(s)."] +#[doc = "`maxNumEntries` - The maximum number of entries."] +#[doc = "`programHandle` - The program handle."] +#[doc = ""] + pub fn FSREG_GetProgramInfo( exheaderInfos: *mut ExHeader_Info, maxNumEntries: u32_, @@ -17557,13 +17671,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Loads a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] - #[doc = "* `programInfo` - Information about the program to load."] - #[doc = ""] +#[doc = "Loads a program."] +#[doc = "# Arguments"] +#[doc = "`programHandle[out]` - Pointer to the output the program handle to."] +#[doc = "`programInfo` - Information about the program to load."] +#[doc = ""] + pub fn FSREG_LoadProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -17571,26 +17684,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unloads a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programHandle` - The program handle."] - #[doc = ""] +#[doc = "Unloads a program."] +#[doc = "# Arguments"] +#[doc = "`programHandle` - The program handle."] +#[doc = ""] + pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if a program has been loaded by fs:REG."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programHandle` - The program handle."] - #[doc = ""] +#[doc = "Checks if a program has been loaded by fs:REG."] +#[doc = "# Arguments"] +#[doc = "`programHandle` - The program handle."] +#[doc = ""] + pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result; } #[doc = "Shared Mii struct"] #[doc = ""] + #[repr(C)] #[repr(align(1))] pub struct MiiData { @@ -17598,6 +17710,7 @@ pub struct MiiData { } #[doc = "Mii options"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_1 { @@ -17678,6 +17791,7 @@ impl MiiData__bindgen_ty_1 { } #[doc = "Mii position in Mii selector or Mii maker"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_2 { @@ -17723,6 +17837,7 @@ impl MiiData__bindgen_ty_2 { } #[doc = "Console Identity"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_3 { @@ -17771,6 +17886,7 @@ impl MiiData__bindgen_ty_3 { } #[doc = "Mii details"] #[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -17868,6 +17984,7 @@ impl MiiData__bindgen_ty_4 { } #[doc = "Face style"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_5 { @@ -17932,6 +18049,7 @@ impl MiiData__bindgen_ty_5 { } #[doc = "Face details"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_6 { @@ -17977,6 +18095,7 @@ impl MiiData__bindgen_ty_6 { } #[doc = "Hair details"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_7 { @@ -18022,6 +18141,7 @@ impl MiiData__bindgen_ty_7 { } #[doc = "Eye details"] #[doc = ""] + #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -18151,6 +18271,7 @@ impl MiiData__bindgen_ty_8 { } #[doc = "Eyebrow details"] #[doc = ""] + #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -18296,6 +18417,7 @@ impl MiiData__bindgen_ty_9 { } #[doc = "Nose details"] #[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18361,6 +18483,7 @@ impl MiiData__bindgen_ty_10 { } #[doc = "Mouth details"] #[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18442,6 +18565,7 @@ impl MiiData__bindgen_ty_11 { } #[doc = "Mustache details"] #[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18507,6 +18631,7 @@ impl MiiData__bindgen_ty_12 { } #[doc = "Beard details"] #[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18588,6 +18713,7 @@ impl MiiData__bindgen_ty_13 { } #[doc = "Glasses details"] #[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18669,6 +18795,7 @@ impl MiiData__bindgen_ty_14 { } #[doc = "Mole details"] #[doc = ""] + #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18759,6 +18886,7 @@ impl Default for MiiData { } #[doc = "Friend key data"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendKey { @@ -18768,6 +18896,7 @@ pub struct FriendKey { } #[doc = "Friend Title data"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct TitleData { @@ -18777,28 +18906,35 @@ pub struct TitleData { } #[doc = "Friend profile data"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendProfile { - #[doc = "The region code for the hardware."] - #[doc = ""] +#[doc = "The region code for the hardware."] +#[doc = ""] + pub region: u8_, - #[doc = "Country code."] - #[doc = ""] +#[doc = "Country code."] +#[doc = ""] + pub country: u8_, - #[doc = "Area code."] - #[doc = ""] +#[doc = "Area code."] +#[doc = ""] + pub area: u8_, - #[doc = "Language code."] - #[doc = ""] +#[doc = "Language code."] +#[doc = ""] + pub language: u8_, - #[doc = "Platform code."] - #[doc = ""] +#[doc = "Platform code."] +#[doc = ""] + pub platform: u8_, pub padding: u32_, } #[doc = "Game Description structure"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct GameDescription { @@ -18816,6 +18952,7 @@ impl Default for GameDescription { } #[doc = "Friend Notification Event structure"] #[doc = ""] + #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationEvent { @@ -18827,115 +18964,124 @@ pub struct NotificationEvent { #[doc = "Self went online"] #[doc = ""] + pub const USER_WENT_ONLINE: NotificationTypes = 1; #[doc = "Self went offline"] #[doc = ""] + pub const USER_WENT_OFFLINE: NotificationTypes = 2; #[doc = "Friend Went Online"] #[doc = ""] + pub const FRIEND_WENT_ONLINE: NotificationTypes = 3; #[doc = "Friend Presence changed"] #[doc = ""] + pub const FRIEND_UPDATED_PRESENCE: NotificationTypes = 4; #[doc = "Friend Mii changed"] #[doc = ""] + pub const FRIEND_UPDATED_MII: NotificationTypes = 5; #[doc = "Friend Profile changed"] #[doc = ""] + pub const FRIEND_UPDATED_PROFILE: NotificationTypes = 6; #[doc = "Friend went offline"] #[doc = ""] + pub const FRIEND_WENT_OFFLINE: NotificationTypes = 7; #[doc = "Friend registered self as friend"] #[doc = ""] + pub const FRIEND_REGISTERED_USER: NotificationTypes = 8; #[doc = "Friend Sent invitation"] #[doc = ""] + pub const FRIEND_SENT_INVITATION: NotificationTypes = 9; #[doc = "Enum to use with FRD_GetNotificationEvent"] #[doc = ""] + pub type NotificationTypes = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes FRD service."] - #[doc = ""] +#[doc = "Initializes FRD service."] +#[doc = ""] + pub fn frdInit() -> Result; } extern "C" { - #[doc = "Exists FRD."] - #[doc = ""] +#[doc = "Exists FRD."] +#[doc = ""] + pub fn frdExit(); } extern "C" { - #[doc = "Get FRD handle."] - #[doc = ""] +#[doc = "Get FRD handle."] +#[doc = ""] + pub fn frdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the login status of the current user."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to write the current user's login status to."] - #[doc = ""] +#[doc = "Gets the login status of the current user."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to write the current user's login status to."] +#[doc = ""] + pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the online status of the current user."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to write the current user's online status to."] - #[doc = ""] +#[doc = "Gets the online status of the current user."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to write the current user's online status to."] +#[doc = ""] + pub fn FRDU_IsOnline(state: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Logs out of Nintendo's friend server."] - #[doc = ""] +#[doc = "Logs out of Nintendo's friend server."] +#[doc = ""] + pub fn FRD_Logout() -> Result; } extern "C" { #[must_use] - #[doc = "Log in to Nintendo's friend server."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Event to signal when Login is done."] - #[doc = ""] +#[doc = "Log in to Nintendo's friend server."] +#[doc = "# Arguments"] +#[doc = "`event` - Event to signal when Login is done."] +#[doc = ""] + pub fn FRD_Login(event: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's friend key."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `key` - Pointer to write the current user's friend key to."] - #[doc = ""] +#[doc = "Gets the current user's friend key."] +#[doc = "# Arguments"] +#[doc = "`key` - Pointer to write the current user's friend key to."] +#[doc = ""] + pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's privacy information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `isPublicMode` - Determines whether friends are notified of the current user's online status."] - #[doc = "* `isShowGameName` - Determines whether friends are notified of the application that the current user is running."] - #[doc = "* `isShowPlayedGame` - Determiens whether to display the current user's game history."] - #[doc = ""] +#[doc = "Gets the current user's privacy information."] +#[doc = "# Arguments"] +#[doc = "`isPublicMode` - Determines whether friends are notified of the current user's online status."] +#[doc = "`isShowGameName` - Determines whether friends are notified of the application that the current user is running."] +#[doc = "`isShowPlayedGame` - Determiens whether to display the current user's game history."] +#[doc = ""] + pub fn FRD_GetMyPreference( isPublicMode: *mut bool, isShowGameName: *mut bool, @@ -18944,77 +19090,70 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the current user's profile information."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `profile` - Pointer to write the current user's profile information to."] - #[doc = ""] +#[doc = "Gets the current user's profile information."] +#[doc = "# Arguments"] +#[doc = "`profile` - Pointer to write the current user's profile information to."] +#[doc = ""] + pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's screen name."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Pointer to write the current user's screen name to."] - #[doc = "* `max_size` - Max size of the screen name."] - #[doc = ""] +#[doc = "Gets the current user's screen name."] +#[doc = "# Arguments"] +#[doc = "`name` - Pointer to write the current user's screen name to."] +#[doc = "`max_size` - Max size of the screen name."] +#[doc = ""] + pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's Mii data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mii` - Pointer to write the current user's mii data to."] - #[doc = ""] +#[doc = "Gets the current user's Mii data."] +#[doc = "# Arguments"] +#[doc = "`mii` - Pointer to write the current user's mii data to."] +#[doc = ""] + pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's playing game."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleId` - Pointer to write the current user's playing game to."] - #[doc = ""] +#[doc = "Gets the current user's playing game."] +#[doc = "# Arguments"] +#[doc = "`titleId` - Pointer to write the current user's playing game to."] +#[doc = ""] + pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's favourite game."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleId` - Pointer to write the title ID of current user's favourite game to."] - #[doc = ""] +#[doc = "Gets the current user's favourite game."] +#[doc = "# Arguments"] +#[doc = "`titleId` - Pointer to write the title ID of current user's favourite game to."] +#[doc = ""] + pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's comment on their friend profile."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `comment` - Pointer to write the current user's comment to."] - #[doc = "* `max_size` - Max size of the comment."] - #[doc = ""] +#[doc = "Gets the current user's comment on their friend profile."] +#[doc = "# Arguments"] +#[doc = "`comment` - Pointer to write the current user's comment to."] +#[doc = "`max_size` - Max size of the comment."] +#[doc = ""] + pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current user's friend key list."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `friendKeyList` - Pointer to write the friend key list to."] - #[doc = "* `num` - Stores the number of friend keys obtained."] - #[doc = "* `offset` - The index of the friend key to start with."] - #[doc = "* `size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] - #[doc = ""] +#[doc = "Gets the current user's friend key list."] +#[doc = "# Arguments"] +#[doc = "`friendKeyList` - Pointer to write the friend key list to."] +#[doc = "`num` - Stores the number of friend keys obtained."] +#[doc = "`offset` - The index of the friend key to start with."] +#[doc = "`size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] +#[doc = ""] + pub fn FRD_GetFriendKeyList( friendKeyList: *mut FriendKey, num: *mut u32_, @@ -19024,14 +19163,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the current user's friends' Mii data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `miiDataList` - Pointer to write Mii data to."] - #[doc = "* `friendKeyList` - Pointer to FriendKeys."] - #[doc = "* `size` - Number of Friendkeys."] - #[doc = ""] +#[doc = "Gets the current user's friends' Mii data."] +#[doc = "# Arguments"] +#[doc = "`miiDataList` - Pointer to write Mii data to."] +#[doc = "`friendKeyList` - Pointer to FriendKeys."] +#[doc = "`size` - Number of Friendkeys."] +#[doc = ""] + pub fn FRD_GetFriendMii( miiDataList: *mut MiiData, friendKeyList: *const FriendKey, @@ -19040,14 +19178,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get the current user's friends' profile data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `profile` - Pointer to write profile data to."] - #[doc = "* `friendKeyList` - Pointer to FriendKeys."] - #[doc = "* `size` - Number of FriendKeys."] - #[doc = ""] +#[doc = "Get the current user's friends' profile data."] +#[doc = "# Arguments"] +#[doc = "`profile` - Pointer to write profile data to."] +#[doc = "`friendKeyList` - Pointer to FriendKeys."] +#[doc = "`size` - Number of FriendKeys."] +#[doc = ""] + pub fn FRD_GetFriendProfile( profile: *mut FriendProfile, friendKeyList: *const FriendKey, @@ -19056,14 +19193,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get the current user's friends' playing game."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `desc` - Pointer to write Game Description data to."] - #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] - #[doc = "* `size` - Number Of FriendKeys."] - #[doc = ""] +#[doc = "Get the current user's friends' playing game."] +#[doc = "# Arguments"] +#[doc = "`desc` - Pointer to write Game Description data to."] +#[doc = "`friendKeyList` - Pointer to FriendKeys,"] +#[doc = "`size` - Number Of FriendKeys."] +#[doc = ""] + pub fn FRD_GetFriendPlayingGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -19072,14 +19208,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Get the current user's friends' favourite game."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `desc` - Pointer to write Game Description data to."] - #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] - #[doc = "* `count` - Number Of FriendKeys."] - #[doc = ""] +#[doc = "Get the current user's friends' favourite game."] +#[doc = "# Arguments"] +#[doc = "`desc` - Pointer to write Game Description data to."] +#[doc = "`friendKeyList` - Pointer to FriendKeys,"] +#[doc = "`count` - Number Of FriendKeys."] +#[doc = ""] + pub fn FRD_GetFriendFavouriteGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -19088,45 +19223,41 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets whether a friend key is included in the current user's friend list."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `friendKeyList` - Pointer to a list of friend keys."] - #[doc = "* `isFromList` - Pointer to a write the friendship status to."] - #[doc = ""] +#[doc = "Gets whether a friend key is included in the current user's friend list."] +#[doc = "# Arguments"] +#[doc = "`friendKeyList` - Pointer to a list of friend keys."] +#[doc = "`isFromList` - Pointer to a write the friendship status to."] +#[doc = ""] + pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Updates the game mode description string."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `desc` - Pointer to write the game mode description to."] - #[doc = ""] +#[doc = "Updates the game mode description string."] +#[doc = "# Arguments"] +#[doc = "`desc` - Pointer to write the game mode description to."] +#[doc = ""] + pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Event which is signaled when friend login states change."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - event which will be signaled."] - #[doc = ""] +#[doc = "Event which is signaled when friend login states change."] +#[doc = "# Arguments"] +#[doc = "`event` - event which will be signaled."] +#[doc = ""] + pub fn FRD_AttachToEventNotification(event: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Get Latest Event Notification"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Pointer to write recieved notification event struct to."] - #[doc = "* `count` - Number of events"] - #[doc = "* `recievedNotifCount` - Number of notification reccieved."] - #[doc = ""] +#[doc = "Get Latest Event Notification"] +#[doc = "# Arguments"] +#[doc = "`event` - Pointer to write recieved notification event struct to."] +#[doc = "`count` - Number of events"] +#[doc = "`recievedNotifCount` - Number of notification reccieved."] +#[doc = ""] + pub fn FRD_GetEventNotification( event: *mut NotificationEvent, count: u32_, @@ -19135,535 +19266,567 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Returns the friend code using the given principal ID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `principalId` - The principal ID being used."] - #[doc = "* `friendCode` - Pointer to write the friend code to."] - #[doc = ""] +#[doc = "Returns the friend code using the given principal ID."] +#[doc = "# Arguments"] +#[doc = "`principalId` - The principal ID being used."] +#[doc = "`friendCode` - Pointer to write the friend code to."] +#[doc = ""] + pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the principal ID using the given friend code."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `friendCode` - The friend code being used."] - #[doc = "* `principalId` - Pointer to write the principal ID to."] - #[doc = ""] +#[doc = "Returns the principal ID using the given friend code."] +#[doc = "# Arguments"] +#[doc = "`friendCode` - The friend code being used."] +#[doc = "`principalId` - Pointer to write the principal ID to."] +#[doc = ""] + pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if the friend code is valid."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `friendCode` - The friend code being used."] - #[doc = "* `isValid` - Pointer to write the validity of the friend code to."] - #[doc = ""] +#[doc = "Checks if the friend code is valid."] +#[doc = "# Arguments"] +#[doc = "`friendCode` - The friend code being used."] +#[doc = "`isValid` - Pointer to write the validity of the friend code to."] +#[doc = ""] + pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the Friend API to use a specific SDK version."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sdkVer` - The SDK version needed to be used."] - #[doc = ""] +#[doc = "Sets the Friend API to use a specific SDK version."] +#[doc = "# Arguments"] +#[doc = "`sdkVer` - The SDK version needed to be used."] +#[doc = ""] + pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Add a Friend online."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `event` - Event signaled when friend is registered."] - #[doc = "* `principalId` - PrincipalId of the friend to add."] - #[doc = ""] +#[doc = "Add a Friend online."] +#[doc = "# Arguments"] +#[doc = "`event` - Event signaled when friend is registered."] +#[doc = "`principalId` - PrincipalId of the friend to add."] +#[doc = ""] + pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Remove a Friend."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `principalId` - PrinipalId of the friend code to remove."] - #[doc = "* `localFriendCode` - LocalFriendCode of the friend code to remove."] - #[doc = ""] +#[doc = "Remove a Friend."] +#[doc = "# Arguments"] +#[doc = "`principalId` - PrinipalId of the friend code to remove."] +#[doc = "`localFriendCode` - LocalFriendCode of the friend code to remove."] +#[doc = ""] + pub fn FRD_RemoveFriend(principalId: u32_, localFriendCode: u64_) -> Result; } #[doc = "Top screen."] #[doc = ""] + pub const GSPLCD_SCREEN_TOP: _bindgen_ty_21 = 1; #[doc = "Bottom screen."] #[doc = ""] + pub const GSPLCD_SCREEN_BOTTOM: _bindgen_ty_21 = 2; #[doc = "Both screens."] #[doc = ""] + pub const GSPLCD_SCREEN_BOTH: _bindgen_ty_21 = 3; #[doc = "LCD screens."] #[doc = ""] + pub type _bindgen_ty_21 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes GSPLCD."] - #[doc = ""] +#[doc = "Initializes GSPLCD."] +#[doc = ""] + pub fn gspLcdInit() -> Result; } extern "C" { - #[doc = "Exits GSPLCD."] - #[doc = ""] +#[doc = "Exits GSPLCD."] +#[doc = ""] + pub fn gspLcdExit(); } extern "C" { - #[doc = "Gets a pointer to the current gsp::Lcd session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current gsp::Lcd session handle."] - #[doc = ""] +#[doc = "Gets a pointer to the current gsp::Lcd session handle."] +#[doc = "Returns:"] +#[doc = "A pointer to the current gsp::Lcd session handle."] +#[doc = ""] + pub fn gspLcdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Powers on both backlights."] - #[doc = ""] +#[doc = "Powers on both backlights."] +#[doc = ""] + pub fn GSPLCD_PowerOnAllBacklights() -> Result; } extern "C" { #[must_use] - #[doc = "Powers off both backlights."] - #[doc = ""] +#[doc = "Powers off both backlights."] +#[doc = ""] + pub fn GSPLCD_PowerOffAllBacklights() -> Result; } extern "C" { #[must_use] - #[doc = "Powers on the backlight."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen to power on."] - #[doc = ""] +#[doc = "Powers on the backlight."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen to power on."] +#[doc = ""] + pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Powers off the backlight."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen to power off."] - #[doc = ""] +#[doc = "Powers off the backlight."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen to power off."] +#[doc = ""] + pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets 3D_LEDSTATE to the input state value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] - #[doc = ""] +#[doc = "Sets 3D_LEDSTATE to the input state value."] +#[doc = "# Arguments"] +#[doc = "`disable` - False = 3D LED enable, true = 3D LED disable."] +#[doc = ""] + pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `vendor` - Pointer to output the screen vendors to."] - #[doc = ""] +#[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] +#[doc = "# Arguments"] +#[doc = "`vendor` - Pointer to output the screen vendors to."] +#[doc = ""] + pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen to get the brightness value of."] - #[doc = "* `brightness` - Brightness value returned."] - #[doc = ""] +#[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen to get the brightness value of."] +#[doc = "`brightness` - Brightness value returned."] +#[doc = ""] + pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the LCD screens' brightness."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen to set the brightness value of."] - #[doc = "* `brightness` - Brightness value set."] - #[doc = ""] +#[doc = "Sets the LCD screens' brightness."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen to set the brightness value of."] +#[doc = "`brightness` - Brightness value set."] +#[doc = ""] + pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the LCD screens' raw brightness."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `screen` - Screen to set the brightness value of."] - #[doc = "* `brightness` - Brightness value set."] - #[doc = ""] +#[doc = "Sets the LCD screens' raw brightness."] +#[doc = "# Arguments"] +#[doc = "`screen` - Screen to set the brightness value of."] +#[doc = "`brightness` - Brightness value set."] +#[doc = ""] + pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result; } #[doc = "A"] #[doc = ""] + pub const KEY_A: _bindgen_ty_22 = 1; #[doc = "B"] #[doc = ""] + pub const KEY_B: _bindgen_ty_22 = 2; #[doc = "Select"] #[doc = ""] + pub const KEY_SELECT: _bindgen_ty_22 = 4; #[doc = "Start"] #[doc = ""] + pub const KEY_START: _bindgen_ty_22 = 8; #[doc = "D-Pad Right"] #[doc = ""] + pub const KEY_DRIGHT: _bindgen_ty_22 = 16; #[doc = "D-Pad Left"] #[doc = ""] + pub const KEY_DLEFT: _bindgen_ty_22 = 32; #[doc = "D-Pad Up"] #[doc = ""] + pub const KEY_DUP: _bindgen_ty_22 = 64; #[doc = "D-Pad Down"] #[doc = ""] + pub const KEY_DDOWN: _bindgen_ty_22 = 128; #[doc = "R"] #[doc = ""] + pub const KEY_R: _bindgen_ty_22 = 256; #[doc = "L"] #[doc = ""] + pub const KEY_L: _bindgen_ty_22 = 512; #[doc = "X"] #[doc = ""] + pub const KEY_X: _bindgen_ty_22 = 1024; #[doc = "Y"] #[doc = ""] + pub const KEY_Y: _bindgen_ty_22 = 2048; #[doc = "ZL (New 3DS only)"] #[doc = ""] + pub const KEY_ZL: _bindgen_ty_22 = 16384; #[doc = "ZR (New 3DS only)"] #[doc = ""] + pub const KEY_ZR: _bindgen_ty_22 = 32768; #[doc = "Touch (Not actually provided by HID)"] #[doc = ""] + pub const KEY_TOUCH: _bindgen_ty_22 = 1048576; #[doc = "C-Stick Right (New 3DS only)"] #[doc = ""] + pub const KEY_CSTICK_RIGHT: _bindgen_ty_22 = 16777216; #[doc = "C-Stick Left (New 3DS only)"] #[doc = ""] + pub const KEY_CSTICK_LEFT: _bindgen_ty_22 = 33554432; #[doc = "C-Stick Up (New 3DS only)"] #[doc = ""] + pub const KEY_CSTICK_UP: _bindgen_ty_22 = 67108864; #[doc = "C-Stick Down (New 3DS only)"] #[doc = ""] + pub const KEY_CSTICK_DOWN: _bindgen_ty_22 = 134217728; #[doc = "Circle Pad Right"] #[doc = ""] + pub const KEY_CPAD_RIGHT: _bindgen_ty_22 = 268435456; #[doc = "Circle Pad Left"] #[doc = ""] + pub const KEY_CPAD_LEFT: _bindgen_ty_22 = 536870912; #[doc = "Circle Pad Up"] #[doc = ""] + pub const KEY_CPAD_UP: _bindgen_ty_22 = 1073741824; #[doc = "Circle Pad Down"] #[doc = ""] + pub const KEY_CPAD_DOWN: _bindgen_ty_22 = 2147483648; #[doc = "D-Pad Up or Circle Pad Up"] #[doc = ""] + pub const KEY_UP: _bindgen_ty_22 = 1073741888; #[doc = "D-Pad Down or Circle Pad Down"] #[doc = ""] + pub const KEY_DOWN: _bindgen_ty_22 = 2147483776; #[doc = "D-Pad Left or Circle Pad Left"] #[doc = ""] + pub const KEY_LEFT: _bindgen_ty_22 = 536870944; #[doc = "D-Pad Right or Circle Pad Right"] #[doc = ""] + pub const KEY_RIGHT: _bindgen_ty_22 = 268435472; #[doc = "Key values."] #[doc = ""] + pub type _bindgen_ty_22 = ::libc::c_uint; #[doc = "Touch position."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct touchPosition { - #[doc = "Touch X"] - #[doc = ""] +#[doc = "Touch X"] +#[doc = ""] + pub px: u16_, - #[doc = "Touch Y"] - #[doc = ""] +#[doc = "Touch Y"] +#[doc = ""] + pub py: u16_, } #[doc = "Circle Pad position."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct circlePosition { - #[doc = "Pad X"] - #[doc = ""] +#[doc = "Pad X"] +#[doc = ""] + pub dx: s16, - #[doc = "Pad Y"] - #[doc = ""] +#[doc = "Pad Y"] +#[doc = ""] + pub dy: s16, } #[doc = "Accelerometer vector."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct accelVector { - #[doc = "Accelerometer X"] - #[doc = ""] +#[doc = "Accelerometer X"] +#[doc = ""] + pub x: s16, - #[doc = "Accelerometer Y"] - #[doc = ""] +#[doc = "Accelerometer Y"] +#[doc = ""] + pub y: s16, - #[doc = "Accelerometer Z"] - #[doc = ""] +#[doc = "Accelerometer Z"] +#[doc = ""] + pub z: s16, } #[doc = "Gyroscope angular rate."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct angularRate { - #[doc = "Roll"] - #[doc = ""] +#[doc = "Roll"] +#[doc = ""] + pub x: s16, - #[doc = "Yaw"] - #[doc = ""] +#[doc = "Yaw"] +#[doc = ""] + pub z: s16, - #[doc = "Pitch"] - #[doc = ""] +#[doc = "Pitch"] +#[doc = ""] + pub y: s16, } #[doc = "Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was updated."] #[doc = ""] + pub const HIDEVENT_PAD0: HID_Event = 0; #[doc = "Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was updated."] #[doc = ""] + pub const HIDEVENT_PAD1: HID_Event = 1; #[doc = "Event signaled by HID-module, when the sharedmem accelerometer state was updated."] #[doc = ""] + pub const HIDEVENT_Accel: HID_Event = 2; #[doc = "Event signaled by HID-module, when the sharedmem gyroscope state was updated."] #[doc = ""] + pub const HIDEVENT_Gyro: HID_Event = 3; #[doc = "Event signaled by HID-module, when the sharedmem DebugPad state was updated."] #[doc = ""] + pub const HIDEVENT_DebugPad: HID_Event = 4; #[doc = "Used to know how many events there are."] #[doc = ""] + pub const HIDEVENT_MAX: HID_Event = 5; #[doc = "HID events."] #[doc = ""] + pub type HID_Event = ::libc::c_uint; extern "C" { - #[doc = "HID shared memory handle."] - #[doc = ""] +#[doc = "HID shared memory handle."] +#[doc = ""] + pub static mut hidMemHandle: Handle; } extern "C" { - #[doc = "HID shared memory."] - #[doc = ""] +#[doc = "HID shared memory."] +#[doc = ""] + pub static mut hidSharedMem: *mut vu32; } extern "C" { #[must_use] - #[doc = "Initializes HID."] - #[doc = ""] +#[doc = "Initializes HID."] +#[doc = ""] + pub fn hidInit() -> Result; } extern "C" { - #[doc = "Exits HID."] - #[doc = ""] +#[doc = "Exits HID."] +#[doc = ""] + pub fn hidExit(); } extern "C" { - #[doc = "Sets the key repeat parameters for [`hidKeysRepeat`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `delay` - Initial delay."] - #[doc = "* `interval` - Repeat interval."] - #[doc = ""] +#[doc = "Sets the key repeat parameters for [`hidKeysRepeat`]"] +#[doc = "# Arguments"] +#[doc = "`delay` - Initial delay."] +#[doc = "`interval` - Repeat interval."] +#[doc = ""] + pub fn hidSetRepeatParameters(delay: u32_, interval: u32_); } extern "C" { - #[doc = "Scans HID for input data."] - #[doc = ""] +#[doc = "Scans HID for input data."] +#[doc = ""] + pub fn hidScanInput(); } extern "C" { - #[doc = "Returns a bitmask of held buttons."] - #[doc = ""] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 32-bit bitmask of held buttons (1+ frames)."] - #[doc = ""] +#[doc = "Returns a bitmask of held buttons."] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = "Returns:"] +#[doc = "32-bit bitmask of held buttons (1+ frames)."] +#[doc = ""] + pub fn hidKeysHeld() -> u32_; } extern "C" { - #[doc = "Returns a bitmask of newly pressed buttons, this frame."] - #[doc = ""] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 32-bit bitmask of newly pressed buttons."] - #[doc = ""] +#[doc = "Returns a bitmask of newly pressed buttons, this frame."] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = "Returns:"] +#[doc = "32-bit bitmask of newly pressed buttons."] +#[doc = ""] + pub fn hidKeysDown() -> u32_; } extern "C" { - #[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] - #[doc = ""] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 32-bit bitmask of newly pressed or repeated buttons."] - #[doc = ""] +#[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = "Returns:"] +#[doc = "32-bit bitmask of newly pressed or repeated buttons."] +#[doc = ""] + pub fn hidKeysDownRepeat() -> u32_; } extern "C" { - #[doc = "Returns a bitmask of newly released buttons, this frame."] - #[doc = ""] - #[doc = "Individual buttons can be extracted using binary AND."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 32-bit bitmask of newly released buttons."] - #[doc = ""] +#[doc = "Returns a bitmask of newly released buttons, this frame."] +#[doc = "Individual buttons can be extracted using binary AND."] +#[doc = "Returns:"] +#[doc = "32-bit bitmask of newly released buttons."] +#[doc = ""] + pub fn hidKeysUp() -> u32_; } extern "C" { - #[doc = "Reads the current touch position."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pos` - Pointer to output the touch position to."] - #[doc = ""] +#[doc = "Reads the current touch position."] +#[doc = "# Arguments"] +#[doc = "`pos` - Pointer to output the touch position to."] +#[doc = ""] + pub fn hidTouchRead(pos: *mut touchPosition); } extern "C" { - #[doc = "Reads the current circle pad position."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pos` - Pointer to output the circle pad position to."] - #[doc = ""] +#[doc = "Reads the current circle pad position."] +#[doc = "# Arguments"] +#[doc = "`pos` - Pointer to output the circle pad position to."] +#[doc = ""] + pub fn hidCircleRead(pos: *mut circlePosition); } extern "C" { - #[doc = "Reads the current accelerometer data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `vector` - Pointer to output the accelerometer data to."] - #[doc = ""] +#[doc = "Reads the current accelerometer data."] +#[doc = "# Arguments"] +#[doc = "`vector` - Pointer to output the accelerometer data to."] +#[doc = ""] + pub fn hidAccelRead(vector: *mut accelVector); } extern "C" { - #[doc = "Reads the current gyroscope data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `rate` - Pointer to output the gyroscope data to."] - #[doc = ""] +#[doc = "Reads the current gyroscope data."] +#[doc = "# Arguments"] +#[doc = "`rate` - Pointer to output the gyroscope data to."] +#[doc = ""] + pub fn hidGyroRead(rate: *mut angularRate); } extern "C" { - #[doc = "Waits for an HID event."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the event."] - #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] - #[doc = ""] +#[doc = "Waits for an HID event."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the event."] +#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] +#[doc = ""] + pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool); } extern "C" { #[must_use] - #[doc = "Waits for any HID or IRRST event."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nextEvents` - Whether to discard the current events and wait for the next events."] - #[doc = "* `cancelEvent` - Optional additional handle to wait on, otherwise 0."] - #[doc = "* `timeout` - Timeout."] - #[doc = ""] +#[doc = "Waits for any HID or IRRST event."] +#[doc = "# Arguments"] +#[doc = "`nextEvents` - Whether to discard the current events and wait for the next events."] +#[doc = "`cancelEvent` - Optional additional handle to wait on, otherwise 0."] +#[doc = "`timeout` - Timeout."] +#[doc = ""] + pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the handles for HID operation."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] - #[doc = "* `eventpad0` - Pointer to output the pad 0 event handle to."] - #[doc = "* `eventpad1` - Pointer to output the pad 1 event handle to."] - #[doc = "* `eventaccel` - Pointer to output the accelerometer event handle to."] - #[doc = "* `eventgyro` - Pointer to output the gyroscope event handle to."] - #[doc = "* `eventdebugpad` - Pointer to output the debug pad event handle to."] - #[doc = ""] +#[doc = "Gets the handles for HID operation."] +#[doc = "# Arguments"] +#[doc = "`outMemHandle` - Pointer to output the shared memory handle to."] +#[doc = "`eventpad0` - Pointer to output the pad 0 event handle to."] +#[doc = "`eventpad1` - Pointer to output the pad 1 event handle to."] +#[doc = "`eventaccel` - Pointer to output the accelerometer event handle to."] +#[doc = "`eventgyro` - Pointer to output the gyroscope event handle to."] +#[doc = "`eventdebugpad` - Pointer to output the debug pad event handle to."] +#[doc = ""] + pub fn HIDUSER_GetHandles( outMemHandle: *mut Handle, eventpad0: *mut Handle, @@ -19675,144 +19838,151 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Enables the accelerometer."] - #[doc = ""] +#[doc = "Enables the accelerometer."] +#[doc = ""] + pub fn HIDUSER_EnableAccelerometer() -> Result; } extern "C" { #[must_use] - #[doc = "Disables the accelerometer."] - #[doc = ""] +#[doc = "Disables the accelerometer."] +#[doc = ""] + pub fn HIDUSER_DisableAccelerometer() -> Result; } extern "C" { #[must_use] - #[doc = "Enables the gyroscope."] - #[doc = ""] +#[doc = "Enables the gyroscope."] +#[doc = ""] + pub fn HIDUSER_EnableGyroscope() -> Result; } extern "C" { #[must_use] - #[doc = "Disables the gyroscope."] - #[doc = ""] +#[doc = "Disables the gyroscope."] +#[doc = ""] + pub fn HIDUSER_DisableGyroscope() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the gyroscope raw to dps coefficient."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `coeff` - Pointer to output the coefficient to."] - #[doc = ""] +#[doc = "Gets the gyroscope raw to dps coefficient."] +#[doc = "# Arguments"] +#[doc = "`coeff` - Pointer to output the coefficient to."] +#[doc = ""] + pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current volume slider value. (0-63)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `volume` - Pointer to write the volume slider value to."] - #[doc = ""] +#[doc = "Gets the current volume slider value. (0-63)"] +#[doc = "# Arguments"] +#[doc = "`volume` - Pointer to write the volume slider value to."] +#[doc = ""] + pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result; } extern "C" { - #[doc = "IRRST's shared memory handle."] - #[doc = ""] +#[doc = "IRRST's shared memory handle."] +#[doc = ""] + pub static mut irrstMemHandle: Handle; } extern "C" { - #[doc = "IRRST's shared memory."] - #[doc = ""] +#[doc = "IRRST's shared memory."] +#[doc = ""] + pub static mut irrstSharedMem: *mut vu32; } extern "C" { - #[doc = "IRRST's state update event"] - #[doc = ""] +#[doc = "IRRST's state update event"] +#[doc = ""] + pub static mut irrstEvent: Handle; } extern "C" { #[must_use] - #[doc = "Initializes IRRST."] - #[doc = ""] +#[doc = "Initializes IRRST."] +#[doc = ""] + pub fn irrstInit() -> Result; } extern "C" { - #[doc = "Exits IRRST."] - #[doc = ""] +#[doc = "Exits IRRST."] +#[doc = ""] + pub fn irrstExit(); } extern "C" { - #[doc = "Scans IRRST for input."] - #[doc = ""] +#[doc = "Scans IRRST for input."] +#[doc = ""] + pub fn irrstScanInput(); } extern "C" { - #[doc = "Gets IRRST's held keys."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* IRRST's held keys."] - #[doc = ""] +#[doc = "Gets IRRST's held keys."] +#[doc = "Returns:"] +#[doc = "IRRST's held keys."] +#[doc = ""] + pub fn irrstKeysHeld() -> u32_; } extern "C" { - #[doc = "Reads the current c-stick position."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pos` - Pointer to output the current c-stick position to."] - #[doc = ""] +#[doc = "Reads the current c-stick position."] +#[doc = "# Arguments"] +#[doc = "`pos` - Pointer to output the current c-stick position to."] +#[doc = ""] + pub fn irrstCstickRead(pos: *mut circlePosition); } extern "C" { - #[doc = "Waits for the IRRST input event to trigger."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nextEvent` - Whether to discard the current event and wait until the next event."] - #[doc = ""] +#[doc = "Waits for the IRRST input event to trigger."] +#[doc = "# Arguments"] +#[doc = "`nextEvent` - Whether to discard the current event and wait until the next event."] +#[doc = ""] + pub fn irrstWaitForEvent(nextEvent: bool); } extern "C" { #[must_use] - #[doc = "Gets the shared memory and event handles for IRRST."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `outMemHandle` - Pointer to write the shared memory handle to."] - #[doc = "* `outEventHandle` - Pointer to write the event handle to."] - #[doc = ""] +#[doc = "Gets the shared memory and event handles for IRRST."] +#[doc = "# Arguments"] +#[doc = "`outMemHandle` - Pointer to write the shared memory handle to."] +#[doc = "`outEventHandle` - Pointer to write the event handle to."] +#[doc = ""] + pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes IRRST."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `unk1` - Unknown."] - #[doc = "* `unk2` - Unknown."] - #[doc = ""] +#[doc = "Initializes IRRST."] +#[doc = "# Arguments"] +#[doc = "`unk1` - Unknown."] +#[doc = "`unk2` - Unknown."] +#[doc = ""] + pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Shuts down IRRST."] - #[doc = ""] +#[doc = "Shuts down IRRST."] +#[doc = ""] + pub fn IRRST_Shutdown() -> Result; } #[doc = "sslc context."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct sslcContext { - #[doc = "Service handle."] - #[doc = ""] +#[doc = "Service handle."] +#[doc = ""] + pub servhandle: Handle, - #[doc = "SSLC handle."] - #[doc = ""] +#[doc = "SSLC handle."] +#[doc = ""] + pub sslchandle: u32_, pub sharedmem_handle: Handle, } @@ -19836,48 +20006,48 @@ pub const SSLCOPT_TLSv10: _bindgen_ty_23 = 2048; #[doc = "sslc options. "] #[doc = ""] + pub type _bindgen_ty_23 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] - #[doc = ""] +#[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] +#[doc = ""] + pub fn sslcInit(session_handle: Handle) -> Result; } extern "C" { - #[doc = "Exits SSLC."] - #[doc = ""] +#[doc = "Exits SSLC."] +#[doc = ""] + pub fn sslcExit(); } extern "C" { #[must_use] - #[doc = "Creates a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - Output contexthandle."] - #[doc = ""] +#[doc = "Creates a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - Output contexthandle."] +#[doc = ""] + pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Destroys a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain contexthandle."] - #[doc = ""] +#[doc = "Destroys a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain contexthandle."] +#[doc = ""] + pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a trusted RootCA cert to a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - #[doc = "* `cert` - Pointer to the DER cert."] - #[doc = "* `certsize` - Size of the DER cert."] - #[doc = ""] +#[doc = "Adds a trusted RootCA cert to a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "`cert` - Pointer to the DER cert."] +#[doc = "`certsize` - Size of the DER cert."] +#[doc = ""] + pub fn sslcAddTrustedRootCA( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -19887,14 +20057,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default RootCA cert to a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - #[doc = "* `certID` - ID of the cert to add."] - #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] - #[doc = ""] +#[doc = "Adds a default RootCA cert to a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "`certID` - ID of the cert to add."] +#[doc = "`cert_contexthandle` - Optional, the cert contexthandle can be written here."] +#[doc = ""] + pub fn sslcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -19903,13 +20072,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Removes the specified cert from the RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] - #[doc = ""] +#[doc = "Removes the specified cert from the RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "`cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] +#[doc = ""] + pub fn sslcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -19917,34 +20085,31 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Creates an unknown CertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `CertChain_contexthandle` - Output contexthandle."] - #[doc = ""] +#[doc = "Creates an unknown CertChain."] +#[doc = "# Arguments"] +#[doc = "`CertChain_contexthandle` - Output contexthandle."] +#[doc = ""] + pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Destroys a CertChain from sslcCreate8CertChain()."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `CertChain_contexthandle` - CertChain contexthandle."] - #[doc = ""] +#[doc = "Destroys a CertChain from sslcCreate8CertChain()."] +#[doc = "# Arguments"] +#[doc = "`CertChain_contexthandle` - CertChain contexthandle."] +#[doc = ""] + pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `CertChain_contexthandle` - CertChain to use."] - #[doc = "* `cert` - Pointer to the cert."] - #[doc = "* `certsize` - Size of the cert."] - #[doc = ""] +#[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] +#[doc = "# Arguments"] +#[doc = "`CertChain_contexthandle` - CertChain to use."] +#[doc = "`cert` - Pointer to the cert."] +#[doc = "`certsize` - Size of the cert."] +#[doc = ""] + pub fn sslc8CertChainAddCert( CertChain_contexthandle: u32_, cert: *const u8_, @@ -19954,14 +20119,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `CertChain_contexthandle` - CertChain to use."] - #[doc = "* `certID` - ID of the cert to add."] - #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] - #[doc = ""] +#[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] +#[doc = "# Arguments"] +#[doc = "`CertChain_contexthandle` - CertChain to use."] +#[doc = "`certID` - ID of the cert to add."] +#[doc = "`cert_contexthandle` - Optional, the cert contexthandle can be written here."] +#[doc = ""] + pub fn sslc8CertChainAddDefaultCert( CertChain_contexthandle: u32_, certID: u8_, @@ -19970,13 +20134,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `CertChain_contexthandle` - CertChain to use."] - #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the CertChain."] - #[doc = ""] +#[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] +#[doc = "# Arguments"] +#[doc = "`CertChain_contexthandle` - CertChain to use."] +#[doc = "`cert_contexthandle` - Cert contexthandle to remove from the CertChain."] +#[doc = ""] + pub fn sslc8CertChainRemoveCert( CertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -19984,16 +20147,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a new ClientCert-context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cert` - Pointer to the DER cert."] - #[doc = "* `certsize` - Size of the DER cert."] - #[doc = "* `key` - Pointer to the DER key."] - #[doc = "* `keysize` - Size of the DER key."] - #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] - #[doc = ""] +#[doc = "Opens a new ClientCert-context."] +#[doc = "# Arguments"] +#[doc = "`cert` - Pointer to the DER cert."] +#[doc = "`certsize` - Size of the DER cert."] +#[doc = "`key` - Pointer to the DER key."] +#[doc = "`keysize` - Size of the DER key."] +#[doc = "`ClientCert_contexthandle` - Output contexthandle."] +#[doc = ""] + pub fn sslcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -20004,13 +20166,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a ClientCert-context with a default certID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `certID` - ID of the ClientCert to use."] - #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] - #[doc = ""] +#[doc = "Opens a ClientCert-context with a default certID."] +#[doc = "# Arguments"] +#[doc = "`certID` - ID of the ClientCert to use."] +#[doc = "`ClientCert_contexthandle` - Output contexthandle."] +#[doc = ""] + pub fn sslcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -20018,42 +20179,40 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes the specified ClientCert-context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ClientCert_contexthandle` - ClientCert-context to use."] - #[doc = ""] +#[doc = "Closes the specified ClientCert-context."] +#[doc = "# Arguments"] +#[doc = "`ClientCert_contexthandle` - ClientCert-context to use."] +#[doc = ""] + pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "This uses ps:ps SeedRNG internally."] - #[doc = ""] +#[doc = "This uses ps:ps SeedRNG internally."] +#[doc = ""] + pub fn sslcSeedRNG() -> Result; } extern "C" { #[must_use] - #[doc = "This uses ps:ps GenerateRandomData internally."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Output buffer."] - #[doc = "* `size` - Output size."] - #[doc = ""] +#[doc = "This uses ps:ps GenerateRandomData internally."] +#[doc = "# Arguments"] +#[doc = "`buf` - Output buffer."] +#[doc = "`size` - Output size."] +#[doc = ""] + pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a sslc context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - sslc context."] - #[doc = "* `sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] - #[doc = "* `input_opt` - Input sslc options bitmask."] - #[doc = "* `hostname` - Server hostname."] - #[doc = ""] +#[doc = "Creates a sslc context."] +#[doc = "# Arguments"] +#[doc = "`context` - sslc context."] +#[doc = "`sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] +#[doc = "`input_opt` - Input sslc options bitmask."] +#[doc = "`hostname` - Server hostname."] +#[doc = ""] + pub fn sslcCreateContext( context: *mut sslcContext, sockfd: ::libc::c_int, @@ -20127,14 +20286,17 @@ extern "C" { } #[doc = "HTTP context."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct httpcContext { - #[doc = "Service handle."] - #[doc = ""] +#[doc = "Service handle."] +#[doc = ""] + pub servhandle: Handle, - #[doc = "HTTP handle."] - #[doc = ""] +#[doc = "HTTP handle."] +#[doc = ""] + pub httphandle: u32_, } pub const HTTPC_METHOD_GET: HTTPC_RequestMethod = 1; @@ -20145,46 +20307,52 @@ pub const HTTPC_METHOD_DELETE: HTTPC_RequestMethod = 5; #[doc = "HTTP request method."] #[doc = ""] + pub type HTTPC_RequestMethod = ::libc::c_uint; #[doc = "Request in progress."] #[doc = ""] + pub const HTTPC_STATUS_REQUEST_IN_PROGRESS: HTTPC_RequestStatus = 5; #[doc = "Download ready."] #[doc = ""] + pub const HTTPC_STATUS_DOWNLOAD_READY: HTTPC_RequestStatus = 7; #[doc = "HTTP request status."] #[doc = ""] + pub type HTTPC_RequestStatus = ::libc::c_uint; pub const HTTPC_KEEPALIVE_DISABLED: HTTPC_KeepAlive = 0; pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1; #[doc = "HTTP KeepAlive option."] #[doc = ""] + pub type HTTPC_KeepAlive = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] - #[doc = ""] +#[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] +#[doc = ""] + pub fn httpcInit(sharedmem_size: u32_) -> Result; } extern "C" { - #[doc = "Exits HTTPC."] - #[doc = ""] +#[doc = "Exits HTTPC."] +#[doc = ""] + pub fn httpcExit(); } extern "C" { #[must_use] - #[doc = "Opens a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to open."] - #[doc = "* `url` - URL to connect to."] - #[doc = "* `use_defaultproxy` - Whether the default proxy should be used (0 for default)"] - #[doc = ""] +#[doc = "Opens a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to open."] +#[doc = "`url` - URL to connect to."] +#[doc = "`use_defaultproxy` - Whether the default proxy should be used (0 for default)"] +#[doc = ""] + pub fn httpcOpenContext( context: *mut httpcContext, method: HTTPC_RequestMethod, @@ -20194,34 +20362,31 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to close."] - #[doc = ""] +#[doc = "Closes a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to close."] +#[doc = ""] + pub fn httpcCloseContext(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels a HTTP connection."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to close."] - #[doc = ""] +#[doc = "Cancels a HTTP connection."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to close."] +#[doc = ""] + pub fn httpcCancelConnection(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a request header field to a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `name` - Name of the field."] - #[doc = "* `value` - Value of the field."] - #[doc = ""] +#[doc = "Adds a request header field to a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`name` - Name of the field."] +#[doc = "`value` - Value of the field."] +#[doc = ""] + pub fn httpcAddRequestHeaderField( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20230,14 +20395,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a POST form field to a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `name` - Name of the field."] - #[doc = "* `value` - Value of the field."] - #[doc = ""] +#[doc = "Adds a POST form field to a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`name` - Name of the field."] +#[doc = "`value` - Value of the field."] +#[doc = ""] + pub fn httpcAddPostDataAscii( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20246,15 +20410,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a POST form field with binary data to a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `name` - Name of the field."] - #[doc = "* `value` - The binary data to pass as a value."] - #[doc = "* `len` - Length of the binary data which has been passed."] - #[doc = ""] +#[doc = "Adds a POST form field with binary data to a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`name` - Name of the field."] +#[doc = "`value` - The binary data to pass as a value."] +#[doc = "`len` - Length of the binary data which has been passed."] +#[doc = ""] + pub fn httpcAddPostDataBinary( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20264,49 +20427,45 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a POST body to a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `data` - The data to be passed as raw into the body of the post request."] - #[doc = "* `len` - Length of data passed by data param."] - #[doc = ""] +#[doc = "Adds a POST body to a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`data` - The data to be passed as raw into the body of the post request."] +#[doc = "`len` - Length of data passed by data param."] +#[doc = ""] + pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Begins a HTTP request."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = ""] +#[doc = "Begins a HTTP request."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = ""] + pub fn httpcBeginRequest(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] - #[doc = "Receives data from a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `buffer` - Buffer to receive data to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Receives data from a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`buffer` - Buffer to receive data to."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Receives data from a HTTP context with a timeout value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `buffer` - Buffer to receive data to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] - #[doc = ""] +#[doc = "Receives data from a HTTP context with a timeout value."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`buffer` - Buffer to receive data to."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`timeout` - Maximum time in nanoseconds to wait for a reply."] +#[doc = ""] + pub fn httpcReceiveDataTimeout( context: *mut httpcContext, buffer: *mut u8_, @@ -20316,13 +20475,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the request state of a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `out` - Pointer to output the HTTP request state to."] - #[doc = ""] +#[doc = "Gets the request state of a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`out` - Pointer to output the HTTP request state to."] +#[doc = ""] + pub fn httpcGetRequestState( context: *mut httpcContext, out: *mut HTTPC_RequestStatus, @@ -20330,14 +20488,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the download size state of a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `downloadedsize` - Pointer to output the downloaded size to."] - #[doc = "* `contentsize` - Pointer to output the total content size to."] - #[doc = ""] +#[doc = "Gets the download size state of a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`downloadedsize` - Pointer to output the downloaded size to."] +#[doc = "`contentsize` - Pointer to output the total content size to."] +#[doc = ""] + pub fn httpcGetDownloadSizeState( context: *mut httpcContext, downloadedsize: *mut u32_, @@ -20346,25 +20503,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the response code of the HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to get the response code of."] - #[doc = "* `out` - Pointer to write the response code to."] - #[doc = ""] +#[doc = "Gets the response code of the HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to get the response code of."] +#[doc = "`out` - Pointer to write the response code to."] +#[doc = ""] + pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the response code of the HTTP context with a timeout value."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to get the response code of."] - #[doc = "* `out` - Pointer to write the response code to."] - #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] - #[doc = ""] +#[doc = "Gets the response code of the HTTP context with a timeout value."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to get the response code of."] +#[doc = "`out` - Pointer to write the response code to."] +#[doc = "`timeout` - Maximum time in nanoseconds to wait for a reply."] +#[doc = ""] + pub fn httpcGetResponseStatusCodeTimeout( context: *mut httpcContext, out: *mut u32_, @@ -20373,15 +20528,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a response header field from a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `name` - Name of the field."] - #[doc = "* `value` - Pointer to output the value of the field to."] - #[doc = "* `valuebuf_maxsize` - Maximum size of the value buffer."] - #[doc = ""] +#[doc = "Gets a response header field from a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`name` - Name of the field."] +#[doc = "`value` - Pointer to output the value of the field to."] +#[doc = "`valuebuf_maxsize` - Maximum size of the value buffer."] +#[doc = ""] + pub fn httpcGetResponseHeader( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20391,14 +20545,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a trusted RootCA cert to a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `cert` - Pointer to DER cert."] - #[doc = "* `certsize` - Size of the DER cert."] - #[doc = ""] +#[doc = "Adds a trusted RootCA cert to a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`cert` - Pointer to DER cert."] +#[doc = "`certsize` - Size of the DER cert."] +#[doc = ""] + pub fn httpcAddTrustedRootCA( context: *mut httpcContext, cert: *const u8_, @@ -20407,24 +20560,22 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default RootCA cert to a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `certID` - ID of the cert to add, see sslc.h."] - #[doc = ""] +#[doc = "Adds a default RootCA cert to a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`certID` - ID of the cert to add, see sslc.h."] +#[doc = ""] + pub fn httpcAddDefaultCert(context: *mut httpcContext, certID: SSLC_DefaultRootCert) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the RootCertChain for a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] - #[doc = ""] +#[doc = "Sets the RootCertChain for a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] +#[doc = ""] + pub fn httpcSelectRootCertChain( context: *mut httpcContext, RootCertChain_contexthandle: u32_, @@ -20432,16 +20583,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the ClientCert for a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `cert` - Pointer to DER cert."] - #[doc = "* `certsize` - Size of the DER cert."] - #[doc = "* `privk` - Pointer to the DER private key."] - #[doc = "* `privk_size` - Size of the privk."] - #[doc = ""] +#[doc = "Sets the ClientCert for a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`cert` - Pointer to DER cert."] +#[doc = "`certsize` - Size of the DER cert."] +#[doc = "`privk` - Pointer to the DER private key."] +#[doc = "`privk_size` - Size of the privk."] +#[doc = ""] + pub fn httpcSetClientCert( context: *mut httpcContext, cert: *const u8_, @@ -20452,13 +20602,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the default clientcert for a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `certID` - ID of the cert to add, see sslc.h."] - #[doc = ""] +#[doc = "Sets the default clientcert for a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`certID` - ID of the cert to add, see sslc.h."] +#[doc = ""] + pub fn httpcSetClientCertDefault( context: *mut httpcContext, certID: SSLC_DefaultClientCert, @@ -20466,13 +20615,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the ClientCert contexthandle for a HTTP context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to use."] - #[doc = "* `ClientCert_contexthandle` - Contexthandle for the ClientCert."] - #[doc = ""] +#[doc = "Sets the ClientCert contexthandle for a HTTP context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to use."] +#[doc = "`ClientCert_contexthandle` - Contexthandle for the ClientCert."] +#[doc = ""] + pub fn httpcSetClientCertContext( context: *mut httpcContext, ClientCert_contexthandle: u32_, @@ -20480,61 +20628,54 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets SSL options for the context."] - #[doc = ""] - #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to set flags on."] - #[doc = "* `options` - SSL option flags."] - #[doc = ""] +#[doc = "Sets SSL options for the context."] +#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] +#[doc = "# Arguments"] +#[doc = "`context` - Context to set flags on."] +#[doc = "`options` - SSL option flags."] +#[doc = ""] + pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the SSL options which will be cleared for the context."] - #[doc = ""] - #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to clear flags on."] - #[doc = "* `options` - SSL option flags."] - #[doc = ""] +#[doc = "Sets the SSL options which will be cleared for the context."] +#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] +#[doc = "# Arguments"] +#[doc = "`context` - Context to clear flags on."] +#[doc = "`options` - SSL option flags."] +#[doc = ""] + pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - Output RootCertChain contexthandle."] - #[doc = ""] - pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; +#[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - Output RootCertChain contexthandle."] +#[doc = ""] + + pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Destroy a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - #[doc = ""] +#[doc = "Destroy a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = ""] + pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Adds a RootCA cert to a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - #[doc = "* `cert` - Pointer to DER cert."] - #[doc = "* `certsize` - Size of the DER cert."] - #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] - #[doc = ""] +#[doc = "Adds a RootCA cert to a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "`cert` - Pointer to DER cert."] +#[doc = "`certsize` - Size of the DER cert."] +#[doc = "`cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] +#[doc = ""] + pub fn httpcRootCertChainAddCert( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -20544,14 +20685,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adds a default RootCA cert to a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - #[doc = "* `certID` - ID of the cert to add, see sslc.h."] - #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] - #[doc = ""] +#[doc = "Adds a default RootCA cert to a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "`certID` - ID of the cert to add, see sslc.h."] +#[doc = "`cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] +#[doc = ""] + pub fn httpcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -20560,13 +20700,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Removes a cert from a RootCertChain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] - #[doc = "* `cert_contexthandle` - Contexthandle of the cert to remove."] - #[doc = ""] +#[doc = "Removes a cert from a RootCertChain."] +#[doc = "# Arguments"] +#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] +#[doc = "`cert_contexthandle` - Contexthandle of the cert to remove."] +#[doc = ""] + pub fn httpcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -20574,16 +20713,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cert` - Pointer to DER cert."] - #[doc = "* `certsize` - Size of the DER cert."] - #[doc = "* `privk` - Pointer to the DER private key."] - #[doc = "* `privk_size` - Size of the privk."] - #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] - #[doc = ""] +#[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] +#[doc = "# Arguments"] +#[doc = "`cert` - Pointer to DER cert."] +#[doc = "`certsize` - Size of the DER cert."] +#[doc = "`privk` - Pointer to the DER private key."] +#[doc = "`privk_size` - Size of the privk."] +#[doc = "`ClientCert_contexthandle` - Output ClientCert context handle."] +#[doc = ""] + pub fn httpcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -20594,13 +20732,12 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `certID` - ID of the cert to add, see sslc.h."] - #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] - #[doc = ""] +#[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] +#[doc = "# Arguments"] +#[doc = "`certID` - ID of the cert to add, see sslc.h."] +#[doc = "`ClientCert_contexthandle` - Output ClientCert context handle."] +#[doc = ""] + pub fn httpcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -20608,27 +20745,24 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Closes a ClientCert context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ClientCert_contexthandle` - ClientCert context to use."] - #[doc = ""] +#[doc = "Closes a ClientCert context."] +#[doc = "# Arguments"] +#[doc = "`ClientCert_contexthandle` - ClientCert context to use."] +#[doc = ""] + pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Downloads data from the HTTP context into a buffer."] - #[doc = ""] - #[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to download data from."] - #[doc = "* `buffer` - Buffer to write data to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `downloadedsize` - Pointer to write the size of the downloaded data to."] - #[doc = ""] +#[doc = "Downloads data from the HTTP context into a buffer."] +#[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to download data from."] +#[doc = "`buffer` - Buffer to write data to."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`downloadedsize` - Pointer to write the size of the downloaded data to."] +#[doc = ""] + pub fn httpcDownloadData( context: *mut httpcContext, buffer: *mut u8_, @@ -20638,17 +20772,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets Keep-Alive for the context."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context` - Context to set the KeepAlive flag on."] - #[doc = "* `option` - HTTPC_KeepAlive option."] - #[doc = ""] +#[doc = "Sets Keep-Alive for the context."] +#[doc = "# Arguments"] +#[doc = "`context` - Context to set the KeepAlive flag on."] +#[doc = "`option` - HTTPC_KeepAlive option."] +#[doc = ""] + pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result; } #[doc = "Node info struct."] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct udsNodeInfo { @@ -20692,6 +20826,7 @@ impl Default for udsNodeInfo { } #[doc = "Connection status struct."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct udsConnectionStatus { @@ -20706,6 +20841,7 @@ pub struct udsConnectionStatus { } #[doc = "Network struct stored as big-endian."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct udsNetworkStruct { @@ -20747,6 +20883,7 @@ pub struct udsBindContext { } #[doc = "General NWM input structure used for AP scanning."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nwmScanInputStruct { @@ -20768,6 +20905,7 @@ impl Default for nwmScanInputStruct { } #[doc = "General NWM output structure from AP scanning."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyHeader { @@ -20777,6 +20915,7 @@ pub struct nwmBeaconDataReplyHeader { } #[doc = "General NWM output structure from AP scanning, for each entry."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyEntry { @@ -20792,6 +20931,7 @@ pub struct nwmBeaconDataReplyEntry { } #[doc = "Output structure generated from host scanning output."] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct udsNetworkScanInfo { @@ -20821,29 +20961,28 @@ pub const UDSCONTYPE_Spectator: udsConnectionType = 2; pub type udsConnectionType = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes UDS."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sharedmem_size` - This must be 0x1000-byte aligned."] - #[doc = "* `username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] - #[doc = ""] +#[doc = "Initializes UDS."] +#[doc = "# Arguments"] +#[doc = "`sharedmem_size` - This must be 0x1000-byte aligned."] +#[doc = "`username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] +#[doc = ""] + pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result; } extern "C" { - #[doc = "Exits UDS."] - #[doc = ""] +#[doc = "Exits UDS."] +#[doc = ""] + pub fn udsExit(); } extern "C" { #[must_use] - #[doc = "Generates a NodeInfo struct with data loaded from system-config."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nodeinfo` - Output NodeInfo struct."] - #[doc = "* `username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] - #[doc = ""] +#[doc = "Generates a NodeInfo struct with data loaded from system-config."] +#[doc = "# Arguments"] +#[doc = "`nodeinfo` - Output NodeInfo struct."] +#[doc = "`username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] +#[doc = ""] + pub fn udsGenerateNodeInfo( nodeinfo: *mut udsNodeInfo, username: *const ::libc::c_char, @@ -20851,37 +20990,34 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nodeinfo` - Input NodeInfo struct."] - #[doc = "* `username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] - #[doc = ""] +#[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] +#[doc = "# Arguments"] +#[doc = "`nodeinfo` - Input NodeInfo struct."] +#[doc = "`username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] +#[doc = ""] + pub fn udsGetNodeInfoUsername( nodeinfo: *const udsNodeInfo, username: *mut ::libc::c_char, ) -> Result; } extern "C" { - #[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nodeinfo` - Input NodeInfo struct."] - #[doc = ""] +#[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] +#[doc = "# Arguments"] +#[doc = "`nodeinfo` - Input NodeInfo struct."] +#[doc = ""] + pub fn udsCheckNodeInfoInitialized(nodeinfo: *const udsNodeInfo) -> bool; } extern "C" { - #[doc = "Generates a default NetworkStruct for creating networks."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `network` - The output struct."] - #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] - #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] - #[doc = "* `max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] - #[doc = ""] +#[doc = "Generates a default NetworkStruct for creating networks."] +#[doc = "# Arguments"] +#[doc = "`network` - The output struct."] +#[doc = "`wlancommID` - Unique local-WLAN communications ID for each application."] +#[doc = "`id8` - Additional ID that can be used by the application for different types of networks."] +#[doc = "`max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] +#[doc = ""] + pub fn udsGenerateDefaultNetworkStruct( network: *mut udsNetworkStruct, wlancommID: u32_, @@ -20891,16 +21027,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Scans for networks via beacon-scanning."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `outbuf` - Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] - #[doc = "* `maxsize` - Max size of the buffer."] - #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] - #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] - #[doc = "* `host_macaddress` - When set, this code will only return network info from the specified host MAC address."] - #[doc = ""] +#[doc = "Scans for networks via beacon-scanning."] +#[doc = "# Arguments"] +#[doc = "`outbuf` - Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] +#[doc = "`maxsize` - Max size of the buffer."] +#[doc = "`wlancommID` - Unique local-WLAN communications ID for each application."] +#[doc = "`id8` - Additional ID that can be used by the application for different types of networks."] +#[doc = "`host_macaddress` - When set, this code will only return network info from the specified host MAC address."] +#[doc = ""] + pub fn udsScanBeacons( outbuf: *mut ::libc::c_void, maxsize: size_t, @@ -20914,25 +21049,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Appdata buffer."] - #[doc = "* `size` - Size of the input appdata."] - #[doc = ""] +#[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] +#[doc = "# Arguments"] +#[doc = "`buf` - Appdata buffer."] +#[doc = "`size` - Size of the input appdata."] +#[doc = ""] + pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Appdata buffer."] - #[doc = "* `size` - Max size of the output buffer."] - #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] - #[doc = ""] +#[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] +#[doc = "# Arguments"] +#[doc = "`buf` - Appdata buffer."] +#[doc = "`size` - Max size of the output buffer."] +#[doc = "`actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] +#[doc = ""] + pub fn udsGetApplicationData( buf: *mut ::libc::c_void, size: size_t, @@ -20941,14 +21074,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Appdata buffer."] - #[doc = "* `size` - Max size of the output buffer."] - #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] - #[doc = ""] +#[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] +#[doc = "# Arguments"] +#[doc = "`buf` - Appdata buffer."] +#[doc = "`size` - Max size of the output buffer."] +#[doc = "`actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] +#[doc = ""] + pub fn udsGetNetworkStructApplicationData( network: *const udsNetworkStruct, buf: *mut ::libc::c_void, @@ -20958,16 +21090,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Create a bind."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bindcontext` - The output bind context."] - #[doc = "* `NetworkNodeID` - This is the NetworkNodeID which this bind can receive data from."] - #[doc = "* `spectator` - False for a regular bind, true for a spectator."] - #[doc = "* `data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] - #[doc = "* `recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] - #[doc = ""] +#[doc = "Create a bind."] +#[doc = "# Arguments"] +#[doc = "`bindcontext` - The output bind context."] +#[doc = "`NetworkNodeID` - This is the NetworkNodeID which this bind can receive data from."] +#[doc = "`spectator` - False for a regular bind, true for a spectator."] +#[doc = "`data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] +#[doc = "`recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] +#[doc = ""] + pub fn udsBind( bindcontext: *mut udsBindContext, NetworkNodeID: u16_, @@ -20978,27 +21109,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Remove a bind."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bindcontext` - The bind context."] - #[doc = ""] +#[doc = "Remove a bind."] +#[doc = "# Arguments"] +#[doc = "`bindcontext` - The bind context."] +#[doc = ""] + pub fn udsUnbind(bindcontext: *mut udsBindContext) -> Result; } extern "C" { - #[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Always true. However if wait=false, this will return false if the event wasn't signaled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bindcontext` - The bind context."] - #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] - #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] - #[doc = ""] +#[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] +#[doc = "Returns:"] +#[doc = "Always true. However if wait=false, this will return false if the event wasn't signaled."] +#[doc = "# Arguments"] +#[doc = "`bindcontext` - The bind context."] +#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] +#[doc = "`wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] +#[doc = ""] + pub fn udsWaitDataAvailable( bindcontext: *const udsBindContext, nextEvent: bool, @@ -21007,16 +21134,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bindcontext` - Bind context."] - #[doc = "* `buf` - Output receive buffer."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] - #[doc = "* `src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] - #[doc = ""] +#[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] +#[doc = "# Arguments"] +#[doc = "`bindcontext` - Bind context."] +#[doc = "`buf` - Output receive buffer."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] +#[doc = "`src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] +#[doc = ""] + pub fn udsPullPacket( bindcontext: *const udsBindContext, buf: *mut ::libc::c_void, @@ -21027,16 +21153,15 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sends data over the network."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dst_NetworkNodeID` - Destination NetworkNodeID."] - #[doc = "* `data_channel` - See udsBind()."] - #[doc = "* `flags` - Send flags, see the UDS_SENDFLAG enum values."] - #[doc = "* `buf` - Input send buffer."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Sends data over the network."] +#[doc = "# Arguments"] +#[doc = "`dst_NetworkNodeID` - Destination NetworkNodeID."] +#[doc = "`data_channel` - See udsBind()."] +#[doc = "`flags` - Send flags, see the UDS_SENDFLAG enum values."] +#[doc = "`buf` - Input send buffer."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn udsSendTo( dst_NetworkNodeID: u16_, data_channel: u8_, @@ -21047,27 +21172,25 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the wifi channel currently being used."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `channel` - Output channel."] - #[doc = ""] +#[doc = "Gets the wifi channel currently being used."] +#[doc = "# Arguments"] +#[doc = "`channel` - Output channel."] +#[doc = ""] + pub fn udsGetChannel(channel: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Starts hosting a new network."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `network` - The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] - #[doc = "* `passphrase` - Raw input passphrase buffer."] - #[doc = "* `passphrase_size` - Size of the passphrase buffer."] - #[doc = "* `context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] - #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] - #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] - #[doc = ""] +#[doc = "Starts hosting a new network."] +#[doc = "# Arguments"] +#[doc = "`network` - The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] +#[doc = "`passphrase` - Raw input passphrase buffer."] +#[doc = "`passphrase_size` - Size of the passphrase buffer."] +#[doc = "`context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] +#[doc = "`data_channel` - This is the data_channel value which will be passed to udsBind() internally."] +#[doc = "`recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] +#[doc = ""] + pub fn udsCreateNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -21079,19 +21202,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Connect to a network."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `network` - The NetworkStruct, you can use udsScanBeacons() for this."] - #[doc = "* `passphrase` - Raw input passphrase buffer."] - #[doc = "* `passphrase_size` - Size of the passphrase buffer."] - #[doc = "* `context` - Optional output bind context which will be created for this host."] - #[doc = "* `recv_NetworkNodeID` - This is the NetworkNodeID passed to udsBind() internally."] - #[doc = "* `connection_type` - Type of connection, see the udsConnectionType enum values."] - #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] - #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] - #[doc = ""] +#[doc = "Connect to a network."] +#[doc = "# Arguments"] +#[doc = "`network` - The NetworkStruct, you can use udsScanBeacons() for this."] +#[doc = "`passphrase` - Raw input passphrase buffer."] +#[doc = "`passphrase_size` - Size of the passphrase buffer."] +#[doc = "`context` - Optional output bind context which will be created for this host."] +#[doc = "`recv_NetworkNodeID` - This is the NetworkNodeID passed to udsBind() internally."] +#[doc = "`connection_type` - Type of connection, see the udsConnectionType enum values."] +#[doc = "`data_channel` - This is the data_channel value which will be passed to udsBind() internally."] +#[doc = "`recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] +#[doc = ""] + pub fn udsConnectNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -21105,94 +21227,90 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Stop hosting the network."] - #[doc = ""] +#[doc = "Stop hosting the network."] +#[doc = ""] + pub fn udsDestroyNetwork() -> Result; } extern "C" { #[must_use] - #[doc = "Disconnect this client device from the network."] - #[doc = ""] +#[doc = "Disconnect this client device from the network."] +#[doc = ""] + pub fn udsDisconnectNetwork() -> Result; } extern "C" { #[must_use] - #[doc = "This can be used by the host to force-disconnect client(s)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] - #[doc = ""] +#[doc = "This can be used by the host to force-disconnect client(s)."] +#[doc = "# Arguments"] +#[doc = "`NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] +#[doc = ""] + pub fn udsEjectClient(NetworkNodeID: u16_) -> Result; } extern "C" { #[must_use] - #[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] - #[doc = ""] +#[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] +#[doc = ""] + pub fn udsEjectSpectator() -> Result; } extern "C" { #[must_use] - #[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] - #[doc = "* `flag` - When false, bit-clear, otherwise bit-set."] - #[doc = ""] +#[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] +#[doc = "# Arguments"] +#[doc = "`bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] +#[doc = "`flag` - When false, bit-clear, otherwise bit-set."] +#[doc = ""] + pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result; } extern "C" { #[must_use] - #[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] - #[doc = "* `clients` - When true, (un)block regular clients."] - #[doc = "* `flag` - When true, update UDSNETATTR_x4. Normally this should be false."] - #[doc = ""] +#[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] +#[doc = "# Arguments"] +#[doc = "`block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] +#[doc = "`clients` - When true, (un)block regular clients."] +#[doc = "`flag` - When true, update UDSNETATTR_x4. Normally this should be false."] +#[doc = ""] + pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result; } extern "C" { #[must_use] - #[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] - #[doc = ""] +#[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] +#[doc = ""] + pub fn udsAllowSpectators() -> Result; } extern "C" { #[must_use] - #[doc = "This loads the current ConnectionStatus struct."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `output` - Output ConnectionStatus struct."] - #[doc = ""] +#[doc = "This loads the current ConnectionStatus struct."] +#[doc = "# Arguments"] +#[doc = "`output` - Output ConnectionStatus struct."] +#[doc = ""] + pub fn udsGetConnectionStatus(output: *mut udsConnectionStatus) -> Result; } extern "C" { - #[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Always true. However if wait=false, this will return false if the event wasn't signaled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] - #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] - #[doc = ""] +#[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] +#[doc = "Returns:"] +#[doc = "Always true. However if wait=false, this will return false if the event wasn't signaled."] +#[doc = "# Arguments"] +#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] +#[doc = "`wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] +#[doc = ""] + pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool; } extern "C" { #[must_use] - #[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `NetworkNodeID` - Target NetworkNodeID."] - #[doc = "* `output` - Output NodeInfo struct."] - #[doc = ""] +#[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] +#[doc = "# Arguments"] +#[doc = "`NetworkNodeID` - Target NetworkNodeID."] +#[doc = "`output` - Output NodeInfo struct."] +#[doc = ""] + pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result; } pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0; @@ -21203,6 +21321,7 @@ pub const NDM_EXCLUSIVE_STATE_STREETPASS_DATA: ndmExclusiveState = 4; #[doc = "Exclusive states."] #[doc = ""] + pub type ndmExclusiveState = ::libc::c_uint; pub const NDM_STATE_INITIAL: ndmState = 0; pub const NDM_STATE_SUSPENDED: ndmState = 1; @@ -21219,6 +21338,7 @@ pub const NDM_STATE_CEC_SUSPENDING: ndmState = 11; #[doc = "Current states."] #[doc = ""] + pub type ndmState = ::libc::c_uint; pub const NDM_DAEMON_CEC: ndmDaemon = 0; pub const NDM_DAEMON_BOSS: ndmDaemon = 1; @@ -21235,6 +21355,7 @@ pub const NDM_DAEMON_MASK_DEFAULT: ndmDaemonMask = 9; #[doc = "Used to specify multiple daemons."] #[doc = ""] + pub type ndmDaemonMask = ::libc::c_uint; pub const NDM_DAEMON_STATUS_BUSY: ndmDaemonStatus = 0; pub const NDM_DAEMON_STATUS_IDLE: ndmDaemonStatus = 1; @@ -21243,299 +21364,325 @@ pub const NDM_DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3; pub type ndmDaemonStatus = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes ndmu."] - #[doc = ""] +#[doc = "Initializes ndmu."] +#[doc = ""] + pub fn ndmuInit() -> Result; } extern "C" { - #[doc = "Exits ndmu."] - #[doc = ""] +#[doc = "Exits ndmu."] +#[doc = ""] + pub fn ndmuExit(); } extern "C" { #[must_use] - #[doc = "Sets the network daemon to an exclusive state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - State specified in the ndmExclusiveState enumerator."] - #[doc = ""] +#[doc = "Sets the network daemon to an exclusive state."] +#[doc = "# Arguments"] +#[doc = "`state` - State specified in the ndmExclusiveState enumerator."] +#[doc = ""] + pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels an exclusive state for the network daemon."] - #[doc = ""] +#[doc = "Cancels an exclusive state for the network daemon."] +#[doc = ""] + pub fn NDMU_LeaveExclusiveState() -> Result; } extern "C" { #[must_use] - #[doc = "Returns the exclusive state for the network daemon."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to write the exclsuive state to."] - #[doc = ""] +#[doc = "Returns the exclusive state for the network daemon."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to write the exclsuive state to."] +#[doc = ""] + pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result; } extern "C" { #[must_use] - #[doc = "Locks the exclusive state."] - #[doc = ""] +#[doc = "Locks the exclusive state."] +#[doc = ""] + pub fn NDMU_LockState() -> Result; } extern "C" { #[must_use] - #[doc = "Unlocks the exclusive state."] - #[doc = ""] +#[doc = "Unlocks the exclusive state."] +#[doc = ""] + pub fn NDMU_UnlockState() -> Result; } extern "C" { #[must_use] - #[doc = "Suspends network daemon."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mask` - The specified daemon."] - #[doc = ""] +#[doc = "Suspends network daemon."] +#[doc = "# Arguments"] +#[doc = "`mask` - The specified daemon."] +#[doc = ""] + pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] - #[doc = "Resumes network daemon."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mask` - The specified daemon."] - #[doc = ""] +#[doc = "Resumes network daemon."] +#[doc = "# Arguments"] +#[doc = "`mask` - The specified daemon."] +#[doc = ""] + pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] - #[doc = "Suspends scheduling for all network daemons."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `flag` - 0 = Wait for completion, 1 = Perform in background."] - #[doc = ""] +#[doc = "Suspends scheduling for all network daemons."] +#[doc = "# Arguments"] +#[doc = "`flag` - 0 = Wait for completion, 1 = Perform in background."] +#[doc = ""] + pub fn NDMU_SuspendScheduler(flag: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Resumes daemon scheduling."] - #[doc = ""] +#[doc = "Resumes daemon scheduling."] +#[doc = ""] + pub fn NDMU_ResumeScheduler() -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current state for the network daemon."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to write the current state to."] - #[doc = ""] +#[doc = "Returns the current state for the network daemon."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to write the current state to."] +#[doc = ""] + pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the daemon state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to write the daemons state to."] - #[doc = ""] +#[doc = "Returns the daemon state."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to write the daemons state to."] +#[doc = ""] + pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the scan interval."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `interval` - Value to set the scan interval to."] - #[doc = ""] +#[doc = "Sets the scan interval."] +#[doc = "# Arguments"] +#[doc = "`interval` - Value to set the scan interval to."] +#[doc = ""] + pub fn NDMU_SetScanInterval(interval: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the scan interval."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `interval` - Pointer to write the interval value to."] - #[doc = ""] +#[doc = "Returns the scan interval."] +#[doc = "# Arguments"] +#[doc = "`interval` - Pointer to write the interval value to."] +#[doc = ""] + pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the retry interval."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `interval` - Pointer to write the interval value to."] - #[doc = ""] +#[doc = "Returns the retry interval."] +#[doc = "# Arguments"] +#[doc = "`interval` - Pointer to write the interval value to."] +#[doc = ""] + pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Reverts network daemon to defaults."] - #[doc = ""] +#[doc = "Reverts network daemon to defaults."] +#[doc = ""] + pub fn NDMU_ResetDaemons() -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current default daemon bit mask."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] - #[doc = ""] +#[doc = "Gets the current default daemon bit mask."] +#[doc = "# Arguments"] +#[doc = "`interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] +#[doc = ""] + pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result; } extern "C" { #[must_use] - #[doc = "Clears half awake mac filter."] - #[doc = ""] +#[doc = "Clears half awake mac filter."] +#[doc = ""] + pub fn NDMU_ClearMacFilter() -> Result; } #[doc = "Initial installation"] #[doc = ""] + pub const IM_DEFAULT: NIM_InstallationMode = 0; #[doc = "Unknown"] #[doc = ""] + pub const IM_UNKNOWN1: NIM_InstallationMode = 1; #[doc = "Unknown"] #[doc = ""] + pub const IM_UNKNOWN2: NIM_InstallationMode = 2; #[doc = "Reinstall currently installed title; use this if the title is already installed (including updates)"] #[doc = ""] + pub const IM_REINSTALL: NIM_InstallationMode = 3; #[doc = "Mode that NIM downloads/installs a title with."] #[doc = ""] + pub type NIM_InstallationMode = ::libc::c_uint; #[doc = "Download not yet initialized"] #[doc = ""] + pub const DS_NOT_INITIALIZED: NIM_DownloadState = 0; #[doc = "Download initialized"] #[doc = ""] + pub const DS_INITIALIZED: NIM_DownloadState = 1; #[doc = "Downloading and installing TMD"] #[doc = ""] + pub const DS_DOWNLOAD_TMD: NIM_DownloadState = 2; #[doc = "Initializing save data"] #[doc = ""] + pub const DS_PREPARE_SAVE_DATA: NIM_DownloadState = 3; #[doc = "Downloading and installing contents"] #[doc = ""] + pub const DS_DOWNLOAD_CONTENTS: NIM_DownloadState = 4; #[doc = "Waiting before calling AM_CommitImportTitles"] #[doc = ""] + pub const DS_WAIT_COMMIT: NIM_DownloadState = 5; #[doc = "Running AM_CommitImportTitles"] #[doc = ""] + pub const DS_COMMITTING: NIM_DownloadState = 6; #[doc = "Title installation finished"] #[doc = ""] + pub const DS_FINISHED: NIM_DownloadState = 7; #[doc = "(unknown error regarding title version)"] #[doc = ""] + pub const DS_VERSION_ERROR: NIM_DownloadState = 8; #[doc = "Creating the .ctx file?"] #[doc = ""] + pub const DS_CREATE_CONTEXT: NIM_DownloadState = 9; #[doc = "Irrecoverable error encountered (e.g. out of space)"] #[doc = ""] + pub const DS_CANNOT_RECOVER: NIM_DownloadState = 10; #[doc = "Invalid state"] #[doc = ""] + pub const DS_INVALID: NIM_DownloadState = 11; #[doc = "Current state of a NIM download/installation."] #[doc = ""] + pub type NIM_DownloadState = ::libc::c_uint; #[doc = "Input configuration for NIM download/installation tasks."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleConfig { - #[doc = "Title ID"] - #[doc = ""] +#[doc = "Title ID"] +#[doc = ""] + pub titleId: u64_, - #[doc = "Title version"] - #[doc = ""] +#[doc = "Title version"] +#[doc = ""] + pub version: u32_, - #[doc = "Always 0"] - #[doc = ""] +#[doc = "Always 0"] +#[doc = ""] + pub unknown_0: u32_, - #[doc = "Age for the HOME Menu parental controls"] - #[doc = ""] +#[doc = "Age for the HOME Menu parental controls"] +#[doc = ""] + pub ratingAge: u8_, - #[doc = "Media type, see [`FS_MediaType`] enum"] - #[doc = ""] +#[doc = "Media type, see [`FS_MediaType`] enum"] +#[doc = ""] + pub mediaType: u8_, - #[doc = "Padding"] - #[doc = ""] +#[doc = "Padding"] +#[doc = ""] + pub padding: [u8_; 2usize], - #[doc = "Unknown input, seems to be always 0"] - #[doc = ""] +#[doc = "Unknown input, seems to be always 0"] +#[doc = ""] + pub unknown_1: u32_, } #[doc = "Output struct for NIM downloads/installations in progress."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleProgress { - #[doc = "State, see NIM_DownloadState enum"] - #[doc = ""] +#[doc = "State, see NIM_DownloadState enum"] +#[doc = ""] + pub state: u32_, - #[doc = "Last result code in NIM"] - #[doc = ""] +#[doc = "Last result code in NIM"] +#[doc = ""] + pub lastResult: Result, - #[doc = "Amount of bytes that have been downloaded"] - #[doc = ""] +#[doc = "Amount of bytes that have been downloaded"] +#[doc = ""] + pub downloadedSize: u64_, - #[doc = "Amount of bytes that need to be downloaded in total"] - #[doc = ""] +#[doc = "Amount of bytes that need to be downloaded in total"] +#[doc = ""] + pub totalSize: u64_, } extern "C" { #[must_use] - #[doc = "Initializes nim:s. This uses networking and is blocking."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] - #[doc = "* `buffer_len` - Length of the passed buffer."] - #[doc = ""] +#[doc = "Initializes nim:s. This uses networking and is blocking."] +#[doc = "# Arguments"] +#[doc = "`buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] +#[doc = "`buffer_len` - Length of the passed buffer."] +#[doc = ""] + pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] - #[doc = "* `buffer_len` - Length of the passed buffer."] - #[doc = "* `TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use [`nimsInit`] instead."] - #[doc = ""] +#[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] +#[doc = "# Arguments"] +#[doc = "`buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] +#[doc = "`buffer_len` - Length of the passed buffer."] +#[doc = "`TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use [`nimsInit`] instead."] +#[doc = ""] + pub fn nimsInitWithTIN( buffer: *mut ::libc::c_void, buffer_len: size_t, @@ -21543,47 +21690,46 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Exits nim:s."] - #[doc = ""] +#[doc = "Exits nim:s."] +#[doc = ""] + pub fn nimsExit(); } extern "C" { - #[doc = "Gets the current nim:s session handle."] - #[doc = ""] +#[doc = "Gets the current nim:s session handle."] +#[doc = ""] + pub fn nimsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Sets an attribute."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `attr` - Name of the attribute."] - #[doc = "* `val` - Value of the attribute."] - #[doc = ""] +#[doc = "Sets an attribute."] +#[doc = "# Arguments"] +#[doc = "`attr` - Name of the attribute."] +#[doc = "`val` - Value of the attribute."] +#[doc = ""] + pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Checks if nim wants a system update."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `want_update` - Set to true if a system update is required. Can be NULL."] - #[doc = ""] +#[doc = "Checks if nim wants a system update."] +#[doc = "# Arguments"] +#[doc = "`want_update` - Set to true if a system update is required. Can be NULL."] +#[doc = ""] + pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result; } extern "C" { - #[doc = "Makes a TitleConfig struct for use with [`NIMS_RegisterTask`] [`NIMS_StartDownload`] or [`NIMS_StartDownloadSimple`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cfg` - Struct to initialize."] - #[doc = "* `titleId` - Title ID to download and install."] - #[doc = "* `version` - Version of the title to download and install."] - #[doc = "* `ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] - #[doc = "* `mediaType` - Media type of the title to download and install."] - #[doc = ""] +#[doc = "Makes a TitleConfig struct for use with [`NIMS_RegisterTask`] [`NIMS_StartDownload`] or [`NIMS_StartDownloadSimple`]"] +#[doc = "# Arguments"] +#[doc = "`cfg` - Struct to initialize."] +#[doc = "`titleId` - Title ID to download and install."] +#[doc = "`version` - Version of the title to download and install."] +#[doc = "`ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] +#[doc = "`mediaType` - Media type of the title to download and install."] +#[doc = ""] + pub fn NIMS_MakeTitleConfig( cfg: *mut NIM_TitleConfig, titleId: u64_, @@ -21594,14 +21740,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] - #[doc = "* `name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] - #[doc = "* `maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] - #[doc = ""] +#[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] +#[doc = "# Arguments"] +#[doc = "`cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] +#[doc = "`name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] +#[doc = "`maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] +#[doc = ""] + pub fn NIMS_RegisterTask( cfg: *const NIM_TitleConfig, name: *const ::libc::c_char, @@ -21610,60 +21755,56 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Checks whether a background download task for the given title is registered with NIM."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleId` - Title ID to check for."] - #[doc = "* `registered` - Whether there is a background download task registered."] - #[doc = ""] +#[doc = "Checks whether a background download task for the given title is registered with NIM."] +#[doc = "# Arguments"] +#[doc = "`titleId` - Title ID to check for."] +#[doc = "`registered` - Whether there is a background download task registered."] +#[doc = ""] + pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Unregisters a background download task."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleId` - Title ID whose background download task to cancel."] - #[doc = ""] +#[doc = "Unregisters a background download task."] +#[doc = "# Arguments"] +#[doc = "`titleId` - Title ID whose background download task to cancel."] +#[doc = ""] + pub fn NIMS_UnregisterTask(titleId: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Starts an active download with NIM. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] - #[doc = "* `mode` - The installation mode to use. See [`NIM_InstallationMode`]"] - #[doc = ""] +#[doc = "Starts an active download with NIM. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] +#[doc = "# Arguments"] +#[doc = "`cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] +#[doc = "`mode` - The installation mode to use. See [`NIM_InstallationMode`]"] +#[doc = ""] + pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result; } extern "C" { #[must_use] - #[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] - #[doc = ""] +#[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] +#[doc = "# Arguments"] +#[doc = "`cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] +#[doc = ""] + pub fn NIMS_StartDownloadSimple(cfg: *const NIM_TitleConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Checks the status of the current active download."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `tp` - Title progress struct to write to. See [`NIM_TitleProgress`]"] - #[doc = ""] +#[doc = "Checks the status of the current active download."] +#[doc = "# Arguments"] +#[doc = "`tp` - Title progress struct to write to. See [`NIM_TitleProgress`]"] +#[doc = ""] + pub fn NIMS_GetProgress(tp: *mut NIM_TitleProgress) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels the current active download with NIM."] - #[doc = ""] +#[doc = "Cancels the current active download with NIM."] +#[doc = ""] + pub fn NIMS_CancelDownload() -> Result; } extern "C" { @@ -21675,65 +21816,60 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Turns wireless on or off."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `enableWifi` - True enables it, false disables it."] - #[doc = ""] +#[doc = "Turns wireless on or off."] +#[doc = "# Arguments"] +#[doc = "`enableWifi` - True enables it, false disables it."] +#[doc = ""] + pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes IRU."] - #[doc = ""] - #[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sharedmem_addr` - Address of the shared memory block to use."] - #[doc = "* `sharedmem_size` - Size of the shared memory block."] - #[doc = ""] +#[doc = "Initializes IRU."] +#[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] +#[doc = "# Arguments"] +#[doc = "`sharedmem_addr` - Address of the shared memory block to use."] +#[doc = "`sharedmem_size` - Size of the shared memory block."] +#[doc = ""] + pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result; } extern "C" { - #[doc = "Shuts down IRU."] - #[doc = ""] +#[doc = "Shuts down IRU."] +#[doc = ""] + pub fn iruExit(); } extern "C" { - #[doc = "Gets the IRU service handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The IRU service handle."] - #[doc = ""] +#[doc = "Gets the IRU service handle."] +#[doc = "Returns:"] +#[doc = "The IRU service handle."] +#[doc = ""] + pub fn iruGetServHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Sends IR data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Buffer to send data from."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `wait` - Whether to wait for the data to be sent."] - #[doc = ""] +#[doc = "Sends IR data."] +#[doc = "# Arguments"] +#[doc = "`buf` - Buffer to send data from."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`wait` - Whether to wait for the data to be sent."] +#[doc = ""] + pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Receives IR data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Buffer to receive data to."] - #[doc = "* `size` - Size of the buffer."] - #[doc = "* `flag` - Flags to receive data with."] - #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] - #[doc = "* `wait` - Whether to wait for the data to be received."] - #[doc = ""] +#[doc = "Receives IR data."] +#[doc = "# Arguments"] +#[doc = "`buf` - Buffer to receive data to."] +#[doc = "`size` - Size of the buffer."] +#[doc = "`flag` - Flags to receive data with."] +#[doc = "`transfercount` - Pointer to output the number of bytes read to."] +#[doc = "`wait` - Whether to wait for the data to be received."] +#[doc = ""] + pub fn iruRecvData( buf: *mut u8_, size: u32_, @@ -21744,170 +21880,165 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes the IR session."] - #[doc = ""] +#[doc = "Initializes the IR session."] +#[doc = ""] + pub fn IRU_Initialize() -> Result; } extern "C" { #[must_use] - #[doc = "Shuts down the IR session."] - #[doc = ""] +#[doc = "Shuts down the IR session."] +#[doc = ""] + pub fn IRU_Shutdown() -> Result; } extern "C" { #[must_use] - #[doc = "Begins sending data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Buffer to send."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Begins sending data."] +#[doc = "# Arguments"] +#[doc = "`buf` - Buffer to send."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for a send operation to complete."] - #[doc = ""] +#[doc = "Waits for a send operation to complete."] +#[doc = ""] + pub fn IRU_WaitSendTransfer() -> Result; } extern "C" { #[must_use] - #[doc = "Begins receiving data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the data to receive."] - #[doc = "* `flag` - Flags to use when receiving."] - #[doc = ""] +#[doc = "Begins receiving data."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the data to receive."] +#[doc = "`flag` - Flags to use when receiving."] +#[doc = ""] + pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Waits for a receive operation to complete."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] - #[doc = ""] +#[doc = "Waits for a receive operation to complete."] +#[doc = "# Arguments"] +#[doc = "`transfercount` - Pointer to output the number of bytes read to."] +#[doc = ""] + pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the IR bit rate."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Bit rate to set."] - #[doc = ""] +#[doc = "Sets the IR bit rate."] +#[doc = "# Arguments"] +#[doc = "`value` - Bit rate to set."] +#[doc = ""] + pub fn IRU_SetBitRate(value: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the IR bit rate."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the bit rate to."] - #[doc = ""] +#[doc = "Gets the IR bit rate."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the bit rate to."] +#[doc = ""] + pub fn IRU_GetBitRate(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the IR LED state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - IR LED state to set."] - #[doc = ""] +#[doc = "Sets the IR LED state."] +#[doc = "# Arguments"] +#[doc = "`value` - IR LED state to set."] +#[doc = ""] + pub fn IRU_SetIRLEDState(value: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the IR LED state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the IR LED state to."] - #[doc = ""] +#[doc = "Gets the IR LED state."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the IR LED state to."] +#[doc = ""] + pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes NS."] - #[doc = ""] +#[doc = "Initializes NS."] +#[doc = ""] + pub fn nsInit() -> Result; } extern "C" { - #[doc = "Exits NS."] - #[doc = ""] +#[doc = "Exits NS."] +#[doc = ""] + pub fn nsExit(); } extern "C" { #[must_use] - #[doc = "Launches a title and the required firmware (only if necessary)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] - #[doc = ""] +#[doc = "Launches a title and the required firmware (only if necessary)."] +#[doc = "# Arguments"] +#[doc = "`titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] +#[doc = ""] + pub fn NS_LaunchFIRM(titleid: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Launches a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleid` - ID of the title to launch, or 0 for gamecard."] - #[doc = "* `launch_flags` - Flags used when launching the title."] - #[doc = "* `procid` - Pointer to write the process ID of the launched title to."] - #[doc = ""] +#[doc = "Launches a title."] +#[doc = "# Arguments"] +#[doc = "`titleid` - ID of the title to launch, or 0 for gamecard."] +#[doc = "`launch_flags` - Flags used when launching the title."] +#[doc = "`procid` - Pointer to write the process ID of the launched title to."] +#[doc = ""] + pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the application from which this function is called"] - #[doc = ""] +#[doc = "Terminates the application from which this function is called"] +#[doc = ""] + pub fn NS_TerminateTitle() -> Result; } extern "C" { #[must_use] - #[doc = "Launches a title and the required firmware."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard."] - #[doc = "* `flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] - #[doc = ""] +#[doc = "Launches a title and the required firmware."] +#[doc = "# Arguments"] +#[doc = "`titleid` - ID of the title to launch, 0 for gamecard."] +#[doc = "`flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] +#[doc = ""] + pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Reboots to a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mediatype` - Mediatype of the title."] - #[doc = "* `titleid` - ID of the title to launch."] - #[doc = ""] +#[doc = "Reboots to a title."] +#[doc = "# Arguments"] +#[doc = "`mediatype` - Mediatype of the title."] +#[doc = "`titleid` - ID of the title to launch."] +#[doc = ""] + pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the process with the specified titleid."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleid` - ID of the title to terminate."] - #[doc = "* `timeout` - Timeout in nanoseconds. Pass 0 if not required."] - #[doc = ""] +#[doc = "Terminates the process with the specified titleid."] +#[doc = "# Arguments"] +#[doc = "`titleid` - ID of the title to terminate."] +#[doc = "`timeout` - Timeout in nanoseconds. Pass 0 if not required."] +#[doc = ""] + pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Reboots the system"] - #[doc = ""] +#[doc = "Reboots the system"] +#[doc = ""] + pub fn NS_RebootSystem() -> Result; } pub const PMLAUNCHFLAG_NORMAL_APPLICATION: _bindgen_ty_26 = 1; @@ -21918,57 +22049,59 @@ pub const PMLAUNCHFLAG_TERMINATION_NOTIFICATION_MASK: _bindgen_ty_26 = 240; #[doc = "Forces the usage of the O3DS system mode app memory setting even if N3DS system mode is not \"Legacy\". Dev4 and Dev5 not supported. N3DS only."] #[doc = ""] + pub const PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM: _bindgen_ty_26 = 256; #[doc = "In conjunction with the above, forces the 96MB app memory setting. N3DS only."] #[doc = ""] + pub const PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM: _bindgen_ty_26 = 512; pub const PMLAUNCHFLAG_USE_UPDATE_TITLE: _bindgen_ty_26 = 65536; #[doc = "Launch flags for PM launch commands."] #[doc = ""] + pub type _bindgen_ty_26 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes pm:app."] - #[doc = ""] +#[doc = "Initializes pm:app."] +#[doc = ""] + pub fn pmAppInit() -> Result; } extern "C" { - #[doc = "Exits pm:app."] - #[doc = ""] +#[doc = "Exits pm:app."] +#[doc = ""] + pub fn pmAppExit(); } extern "C" { - #[doc = "Gets the current pm:app session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current pm:app session handle."] - #[doc = ""] +#[doc = "Gets the current pm:app session handle."] +#[doc = "Returns:"] +#[doc = "The current pm:app session handle."] +#[doc = ""] + pub fn pmAppGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Launches a title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programInfo` - Program information of the title."] - #[doc = "* `launchFlags` - Flags to launch the title with."] - #[doc = ""] +#[doc = "Launches a title."] +#[doc = "# Arguments"] +#[doc = "`programInfo` - Program information of the title."] +#[doc = "`launchFlags` - Flags to launch the title with."] +#[doc = ""] + pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Launches a title, applying patches."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programInfo` - Program information of the title."] - #[doc = "* `programInfoUpdate` - Program information of the update title."] - #[doc = "* `launchFlags` - Flags to launch the title with."] - #[doc = ""] +#[doc = "Launches a title, applying patches."] +#[doc = "# Arguments"] +#[doc = "`programInfo` - Program information of the title."] +#[doc = "`programInfoUpdate` - Program information of the update title."] +#[doc = "`launchFlags` - Flags to launch the title with."] +#[doc = ""] + pub fn PMAPP_LaunchTitleUpdate( programInfo: *const FS_ProgramInfo, programInfoUpdate: *const FS_ProgramInfo, @@ -21977,14 +22110,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] - #[doc = "* `outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] - #[doc = "* `programInfo` - Program information of the title."] - #[doc = ""] +#[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] +#[doc = "# Arguments"] +#[doc = "`outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] +#[doc = "`outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] +#[doc = "`programInfo` - Program information of the title."] +#[doc = ""] + pub fn PMAPP_GetTitleExheaderFlags( outCoreInfo: *mut ExHeader_Arm11CoreInfo, outSiFlags: *mut ExHeader_SystemInfoFlags, @@ -21993,36 +22125,33 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets the current FIRM launch parameters."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the FIRM launch parameter buffer."] - #[doc = "* `in` - Buffer to retrieve the launch parameters from."] - #[doc = ""] +#[doc = "Sets the current FIRM launch parameters."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the FIRM launch parameter buffer."] +#[doc = "`in` - Buffer to retrieve the launch parameters from."] +#[doc = ""] + pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the current FIRM launch parameters."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the FIRM launch parameter buffer."] - #[doc = "* `out` - Buffer to write the launch parameters to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Gets the current FIRM launch parameters."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the FIRM launch parameter buffer."] +#[doc = "`out` - Buffer to write the launch parameters to. [Direction: In, Out]"] +#[doc = ""] + pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current FIRM launch parameters."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `firmTidLow` - Low Title ID of the FIRM title to launch."] - #[doc = "* `size` - Size of the FIRM launch parameter buffer."] - #[doc = "* `in` - Buffer to retrieve the launch parameters from."] - #[doc = ""] +#[doc = "Sets the current FIRM launch parameters."] +#[doc = "# Arguments"] +#[doc = "`firmTidLow` - Low Title ID of the FIRM title to launch."] +#[doc = "`size` - Size of the FIRM launch parameter buffer."] +#[doc = "`in` - Buffer to retrieve the launch parameters from."] +#[doc = ""] + pub fn PMAPP_LaunchFIRMSetParams( firmTidLow: u32_, size: u32_, @@ -22031,112 +22160,102 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] - #[doc = ""] +#[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] +#[doc = "# Arguments"] +#[doc = "`timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] +#[doc = ""] + pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the current Application"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timeout` - Timeout in nanoseconds"] - #[doc = ""] +#[doc = "Terminates the current Application"] +#[doc = "# Arguments"] +#[doc = "`timeout` - Timeout in nanoseconds"] +#[doc = ""] + pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the processes having the specified titleId."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `titleId` - Title ID of the processes to terminate"] - #[doc = "* `timeout` - Timeout in nanoseconds"] - #[doc = ""] +#[doc = "Terminates the processes having the specified titleId."] +#[doc = "# Arguments"] +#[doc = "`titleId` - Title ID of the processes to terminate"] +#[doc = "`timeout` - Timeout in nanoseconds"] +#[doc = ""] + pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Terminates the specified process"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pid` - Process-ID of the process to terminate"] - #[doc = "* `timeout` - Timeout in nanoseconds"] - #[doc = ""] +#[doc = "Terminates the specified process"] +#[doc = "# Arguments"] +#[doc = "`pid` - Process-ID of the process to terminate"] +#[doc = "`timeout` - Timeout in nanoseconds"] +#[doc = ""] + pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Unregisters a process"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `tid` - TitleID of the process to unregister"] - #[doc = ""] +#[doc = "Unregisters a process"] +#[doc = "# Arguments"] +#[doc = "`tid` - TitleID of the process to unregister"] +#[doc = ""] + pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the APPLICATION cputime reslimit."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cpuTime` - Reslimit value."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* cpuTime can be no higher than reslimitdesc[0] & 0x7F in exheader (or 80 if the latter is 0)."] - #[doc = ""] +#[doc = "Sets the APPLICATION cputime reslimit."] +#[doc = "# Arguments"] +#[doc = "`cpuTime` - Reslimit value."] +#[doc = "# Notes"] +#[doc = "cpuTime can be no higher than reslimitdesc[0] & 0x7F in exheader (or 80 if the latter is 0)."] +#[doc = ""] + pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the APPLICATION cputime reslimit."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Gets the APPLICATION cputime reslimit."] +#[doc = "# Arguments"] +#[doc = "`cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] +#[doc = ""] + pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes pm:dbg."] - #[doc = ""] +#[doc = "Initializes pm:dbg."] +#[doc = ""] + pub fn pmDbgInit() -> Result; } extern "C" { - #[doc = "Exits pm:dbg."] - #[doc = ""] +#[doc = "Exits pm:dbg."] +#[doc = ""] + pub fn pmDbgExit(); } extern "C" { - #[doc = "Gets the current pm:dbg session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current pm:dbg session handle."] - #[doc = ""] +#[doc = "Gets the current pm:dbg session handle."] +#[doc = "Returns:"] +#[doc = "The current pm:dbg session handle."] +#[doc = ""] + pub fn pmDbgGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] - #[doc = ""] - #[doc = "If another process was enqueued, this just calls [`RunQueuedProcess`] instead."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] - #[doc = "* `programInfo` - Program information of the title."] - #[doc = "* `launchFlags` - Flags to launch the title with."] - #[doc = ""] +#[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] +#[doc = "If another process was enqueued, this just calls [`RunQueuedProcess`] instead."] +#[doc = "# Arguments"] +#[doc = "`Pointer` - to output the debug handle to. [Direction: In, Out]"] +#[doc = "`programInfo` - Program information of the title."] +#[doc = "`launchFlags` - Flags to launch the title with."] +#[doc = ""] + pub fn PMDBG_LaunchAppDebug( outDebug: *mut Handle, programInfo: *const FS_ProgramInfo, @@ -22145,99 +22264,116 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Launches an application for debug after setting cpuTime to 0."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programInfo` - Program information of the title."] - #[doc = "* `launchFlags` - Flags to launch the title with."] - #[doc = ""] +#[doc = "Launches an application for debug after setting cpuTime to 0."] +#[doc = "# Arguments"] +#[doc = "`programInfo` - Program information of the title."] +#[doc = "`launchFlags` - Flags to launch the title with."] +#[doc = ""] + pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Runs the queued process and returns a debug handle to it."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Runs the queued process and returns a debug handle to it."] +#[doc = "# Arguments"] +#[doc = "`Pointer` - to output the debug handle to. [Direction: In, Out]"] +#[doc = ""] + pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result; } #[doc = "CBC encryption."] #[doc = ""] + pub const PS_ALGORITHM_CBC_ENC: PS_AESAlgorithm = 0; #[doc = "CBC decryption."] #[doc = ""] + pub const PS_ALGORITHM_CBC_DEC: PS_AESAlgorithm = 1; #[doc = "CTR encryption."] #[doc = ""] + pub const PS_ALGORITHM_CTR_ENC: PS_AESAlgorithm = 2; #[doc = "CTR decryption(same as PS_ALGORITHM_CTR_ENC)."] #[doc = ""] + pub const PS_ALGORITHM_CTR_DEC: PS_AESAlgorithm = 3; #[doc = "CCM encryption."] #[doc = ""] + pub const PS_ALGORITHM_CCM_ENC: PS_AESAlgorithm = 4; #[doc = "CCM decryption."] #[doc = ""] + pub const PS_ALGORITHM_CCM_DEC: PS_AESAlgorithm = 5; #[doc = "PS AES algorithms."] #[doc = ""] + pub type PS_AESAlgorithm = ::libc::c_uint; #[doc = "Key slot 0x0D."] #[doc = ""] + pub const PS_KEYSLOT_0D: PS_AESKeyType = 0; #[doc = "Key slot 0x2D."] #[doc = ""] + pub const PS_KEYSLOT_2D: PS_AESKeyType = 1; #[doc = "Key slot 0x31."] #[doc = ""] + pub const PS_KEYSLOT_31: PS_AESKeyType = 2; #[doc = "Key slot 0x38."] #[doc = ""] + pub const PS_KEYSLOT_38: PS_AESKeyType = 3; #[doc = "Key slot 0x32."] #[doc = ""] + pub const PS_KEYSLOT_32: PS_AESKeyType = 4; #[doc = "Key slot 0x39. (DLP)"] #[doc = ""] + pub const PS_KEYSLOT_39_DLP: PS_AESKeyType = 5; #[doc = "Key slot 0x2E."] #[doc = ""] + pub const PS_KEYSLOT_2E: PS_AESKeyType = 6; #[doc = "Invalid key slot."] #[doc = ""] + pub const PS_KEYSLOT_INVALID: PS_AESKeyType = 7; #[doc = "Key slot 0x36."] #[doc = ""] + pub const PS_KEYSLOT_36: PS_AESKeyType = 8; #[doc = "Key slot 0x39. (NFC)"] #[doc = ""] + pub const PS_KEYSLOT_39_NFC: PS_AESKeyType = 9; #[doc = "PS key slots."] #[doc = ""] + pub type PS_AESKeyType = ::libc::c_uint; #[doc = "RSA context."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct psRSAContext { @@ -22257,52 +22393,52 @@ impl Default for psRSAContext { } extern "C" { #[must_use] - #[doc = "Initializes PS."] - #[doc = ""] +#[doc = "Initializes PS."] +#[doc = ""] + pub fn psInit() -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PS with the specified session handle."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Session handle."] - #[doc = ""] +#[doc = "Initializes PS with the specified session handle."] +#[doc = "# Arguments"] +#[doc = "`handle` - Session handle."] +#[doc = ""] + pub fn psInitHandle(handle: Handle) -> Result; } extern "C" { - #[doc = "Exits PS."] - #[doc = ""] +#[doc = "Exits PS."] +#[doc = ""] + pub fn psExit(); } extern "C" { - #[doc = "Returns the PS session handle."] - #[doc = ""] +#[doc = "Returns the PS session handle."] +#[doc = ""] + pub fn psGetSessionHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Signs a RSA signature."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `hash` - SHA256 hash to sign."] - #[doc = "* `ctx` - RSA context."] - #[doc = "* `signature` - RSA signature."] - #[doc = ""] +#[doc = "Signs a RSA signature."] +#[doc = "# Arguments"] +#[doc = "`hash` - SHA256 hash to sign."] +#[doc = "`ctx` - RSA context."] +#[doc = "`signature` - RSA signature."] +#[doc = ""] + pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Verifies a RSA signature."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `hash` - SHA256 hash to compare with."] - #[doc = "* `ctx` - RSA context."] - #[doc = "* `signature` - RSA signature."] - #[doc = ""] +#[doc = "Verifies a RSA signature."] +#[doc = "# Arguments"] +#[doc = "`hash` - SHA256 hash to compare with."] +#[doc = "`ctx` - RSA context."] +#[doc = "`signature` - RSA signature."] +#[doc = ""] + pub fn PS_VerifyRsaSha256( hash: *mut u8_, ctx: *mut psRSAContext, @@ -22311,17 +22447,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the data."] - #[doc = "* `in` - Input buffer."] - #[doc = "* `out` - Output buffer."] - #[doc = "* `aes_algo` - AES algorithm to use."] - #[doc = "* `key_type` - Key type to use."] - #[doc = "* `iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] - #[doc = ""] +#[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the data."] +#[doc = "`in` - Input buffer."] +#[doc = "`out` - Output buffer."] +#[doc = "`aes_algo` - AES algorithm to use."] +#[doc = "`key_type` - Key type to use."] +#[doc = "`iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] +#[doc = ""] + pub fn PS_EncryptDecryptAes( size: u32_, in_: *mut u8_, @@ -22333,23 +22468,21 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Encrypts/Decrypts signed AES CCM data."] - #[doc = ""] - #[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `in` - Input buffer."] - #[doc = "* `in_size` - Size of the input buffer. Must include MAC size when decrypting."] - #[doc = "* `out` - Output buffer."] - #[doc = "* `out_size` - Size of the output buffer. Must include MAC size when encrypting."] - #[doc = "* `data_len` - Length of the data to be encrypted/decrypted."] - #[doc = "* `mac_data_len` - Length of the MAC data."] - #[doc = "* `mac_len` - Length of the MAC."] - #[doc = "* `aes_algo` - AES algorithm to use."] - #[doc = "* `key_type` - Key type to use."] - #[doc = "* `nonce` - Pointer to the nonce."] - #[doc = ""] +#[doc = "Encrypts/Decrypts signed AES CCM data."] +#[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] +#[doc = "# Arguments"] +#[doc = "`in` - Input buffer."] +#[doc = "`in_size` - Size of the input buffer. Must include MAC size when decrypting."] +#[doc = "`out` - Output buffer."] +#[doc = "`out_size` - Size of the output buffer. Must include MAC size when encrypting."] +#[doc = "`data_len` - Length of the data to be encrypted/decrypted."] +#[doc = "`mac_data_len` - Length of the MAC data."] +#[doc = "`mac_len` - Length of the MAC."] +#[doc = "`aes_algo` - AES algorithm to use."] +#[doc = "`key_type` - Key type to use."] +#[doc = "`nonce` - Pointer to the nonce."] +#[doc = ""] + pub fn PS_EncryptSignDecryptVerifyAesCcm( in_: *mut u8_, in_size: u32_, @@ -22365,446 +22498,456 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the 64-bit console friend code seed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `seed` - Pointer to write the friend code seed to."] - #[doc = ""] +#[doc = "Gets the 64-bit console friend code seed."] +#[doc = "# Arguments"] +#[doc = "`seed` - Pointer to write the friend code seed to."] +#[doc = ""] + pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the 32-bit device ID."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `device_id` - Pointer to write the device ID to."] - #[doc = ""] +#[doc = "Gets the 32-bit device ID."] +#[doc = "# Arguments"] +#[doc = "`device_id` - Pointer to write the device ID to."] +#[doc = ""] + pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Generates cryptographically secure random bytes."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to the buffer to write the bytes to."] - #[doc = "* `len` - Number of bytes to write."] - #[doc = ""] +#[doc = "Generates cryptographically secure random bytes."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to the buffer to write the bytes to."] +#[doc = "`len` - Number of bytes to write."] +#[doc = ""] + pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PTMU."] - #[doc = ""] +#[doc = "Initializes PTMU."] +#[doc = ""] + pub fn ptmuInit() -> Result; } extern "C" { - #[doc = "Exits PTMU."] - #[doc = ""] +#[doc = "Exits PTMU."] +#[doc = ""] + pub fn ptmuExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:u session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current ptm:u session handle."] - #[doc = ""] +#[doc = "Gets a pointer to the current ptm:u session handle."] +#[doc = "Returns:"] +#[doc = "A pointer to the current ptm:u session handle."] +#[doc = ""] + pub fn ptmuGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the system's current shell state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] - #[doc = ""] +#[doc = "Gets the system's current shell state."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] +#[doc = ""] + pub fn PTMU_GetShellState(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's current battery level."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the current battery level to. (0-5)"] - #[doc = ""] +#[doc = "Gets the system's current battery level."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the current battery level to. (0-5)"] +#[doc = ""] + pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's current battery charge state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] - #[doc = ""] +#[doc = "Gets the system's current battery charge state."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] +#[doc = ""] + pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the system's current pedometer state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] - #[doc = ""] +#[doc = "Gets the system's current pedometer state."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] +#[doc = ""] + pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the pedometer's total step count."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `steps` - Pointer to write the total step count to."] - #[doc = ""] +#[doc = "Gets the pedometer's total step count."] +#[doc = "# Arguments"] +#[doc = "`steps` - Pointer to write the total step count to."] +#[doc = ""] + pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the adapter is plugged in or not"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the adapter state to."] - #[doc = ""] +#[doc = "Gets whether the adapter is plugged in or not"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the adapter state to."] +#[doc = ""] + pub fn PTMU_GetAdapterState(out: *mut bool) -> Result; } #[doc = "PDN wake events and MCU interrupts to select, combined with those of other processes"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmWakeEvents { - #[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] - #[doc = ""] +#[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] +#[doc = ""] + pub pdn_wake_events: u32_, - #[doc = "MCU interrupts to check when a MCU wake event happens."] - #[doc = ""] +#[doc = "MCU interrupts to check when a MCU wake event happens."] +#[doc = ""] + pub mcu_interupt_mask: u32_, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmSleepConfig { - #[doc = "Wake events for which the system should fully wake up."] - #[doc = ""] +#[doc = "Wake events for which the system should fully wake up."] +#[doc = ""] + pub exit_sleep_events: PtmWakeEvents, - #[doc = "Wake events for which the system should return to sleep."] - #[doc = ""] +#[doc = "Wake events for which the system should return to sleep."] +#[doc = ""] + pub continue_sleep_events: PtmWakeEvents, } #[doc = "[`PTMSYSM_RequestSleep`] has been called (ack = 3)"] #[doc = ""] + pub const PTMNOTIFID_SLEEP_REQUESTED: _bindgen_ty_27 = 257; #[doc = "The sleep request has been denied by [`PTMSYSM_ReplyToSleepQuery(true)`] (no ack required)."] #[doc = ""] + pub const PTMNOTIFID_SLEEP_DENIED: _bindgen_ty_27 = 258; #[doc = "The sleep request has been allowed by [`PTMSYSM_ReplyToSleepQuery(false)`] (ack = 1)."] #[doc = ""] + pub const PTMNOTIFID_SLEEP_ALLOWED: _bindgen_ty_27 = 259; #[doc = "All processes not having \"RunnableOnSleep\" have been paused & the system is about to go to sleep (ack = 0)."] #[doc = ""] + pub const PTMNOTIFID_GOING_TO_SLEEP: _bindgen_ty_27 = 260; #[doc = "The system has been woken up, and the paused processes are about to be unpaused (ack = 1)."] #[doc = ""] + pub const PTMNOTIFID_FULLY_WAKING_UP: _bindgen_ty_27 = 261; #[doc = "The system is fully awake (no ack required)."] #[doc = ""] + pub const PTMNOTIFID_FULLY_AWAKE: _bindgen_ty_27 = 262; #[doc = "The system has been woken up but is about to go to sleep again (ack = 2)."] #[doc = ""] + pub const PTMNOTIFID_HALF_AWAKE: _bindgen_ty_27 = 263; #[doc = "The system is about to power off or reboot."] #[doc = ""] + pub const PTMNOTIFID_SHUTDOWN: _bindgen_ty_27 = 264; #[doc = "The battery level has reached 5% or below."] #[doc = ""] + pub const PTMNOTIFID_BATTERY_VERY_LOW: _bindgen_ty_27 = 529; #[doc = "The battery level has reached 10% or below."] #[doc = ""] + pub const PTMNOTIFID_BATTERY_LOW: _bindgen_ty_27 = 530; pub type _bindgen_ty_27 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes ptm:sysm."] - #[doc = ""] +#[doc = "Initializes ptm:sysm."] +#[doc = ""] + pub fn ptmSysmInit() -> Result; } extern "C" { - #[doc = "Exits ptm:sysm."] - #[doc = ""] +#[doc = "Exits ptm:sysm."] +#[doc = ""] + pub fn ptmSysmExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:sysm session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current ptm:sysm session handle."] - #[doc = ""] +#[doc = "Gets a pointer to the current ptm:sysm session handle."] +#[doc = "Returns:"] +#[doc = "A pointer to the current ptm:sysm session handle."] +#[doc = ""] + pub fn ptmSysmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Requests to enter sleep mode."] - #[doc = ""] +#[doc = "Requests to enter sleep mode."] +#[doc = ""] + pub fn PTMSYSM_RequestSleep() -> Result; } extern "C" { #[must_use] - #[doc = "Accepts or denies the incoming sleep mode request."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `deny` - Whether or not to deny the sleep request."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* If deny = false, this is equivalent to calling [`PTMSYSM_NotifySleepPreparationComplete(3)`]"] - #[doc = ""] +#[doc = "Accepts or denies the incoming sleep mode request."] +#[doc = "# Arguments"] +#[doc = "`deny` - Whether or not to deny the sleep request."] +#[doc = "# Notes"] +#[doc = "If deny = false, this is equivalent to calling [`PTMSYSM_NotifySleepPreparationComplete(3)`]"] +#[doc = ""] + pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ackValue` - Use [`ptmSysmGetNotificationAckValue`]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* [`PTMNOTIFID_SLEEP_DENIED`] and [`PTMNOTIFID_FULLY_AWAKE`] don't require this."] - #[doc = ""] +#[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] +#[doc = "# Arguments"] +#[doc = "`ackValue` - Use [`ptmSysmGetNotificationAckValue`]"] +#[doc = "# Notes"] +#[doc = "[`PTMNOTIFID_SLEEP_DENIED`] and [`PTMNOTIFID_FULLY_AWAKE`] don't require this."] +#[doc = ""] + pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sleepConfig` - Pointer to the two sets of wake events."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Can only be called just before acknowledging [`PTMNOTIFID_GOING_TO_SLEEP`] or [`PTMNOTIFID_HALF_AWAKE`]"] - #[doc = ""] +#[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] +#[doc = "# Arguments"] +#[doc = "`sleepConfig` - Pointer to the two sets of wake events."] +#[doc = "# Notes"] +#[doc = "Can only be called just before acknowledging [`PTMNOTIFID_GOING_TO_SLEEP`] or [`PTMNOTIFID_HALF_AWAKE`]"] +#[doc = ""] + pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] - #[doc = ""] +#[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] +#[doc = "# Arguments"] +#[doc = "`sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] +#[doc = ""] + pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] - #[doc = ""] +#[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] +#[doc = ""] + pub fn PTMSYSM_Awaken() -> Result; } extern "C" { #[must_use] - #[doc = "Sets the user time by updating the user time offset."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] - #[doc = ""] +#[doc = "Sets the user time by updating the user time offset."] +#[doc = "# Arguments"] +#[doc = "`msY2k` - The number of milliseconds since 01/01/2000."] +#[doc = ""] + pub fn PTMSYSM_SetUserTime(msY2k: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] - #[doc = ""] +#[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] +#[doc = ""] + pub fn PTMSYSM_InvalidateSystemTime() -> Result; } extern "C" { #[must_use] - #[doc = "Reads the time and date coming from the RTC and converts the result."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Reads the time and date coming from the RTC and converts the result."] +#[doc = "# Arguments"] +#[doc = "`outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] +#[doc = ""] + pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the time and date coming to the RTC, after conversion."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] - #[doc = ""] +#[doc = "Writes the time and date coming to the RTC, after conversion."] +#[doc = "# Arguments"] +#[doc = "`msY2k` - The number of milliseconds since 01/01/2000."] +#[doc = ""] + pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result; } extern "C" { #[must_use] - #[doc = "Returns 1 if it's a New 3DS, otherwise 0."] - #[doc = ""] +#[doc = "Returns 1 if it's a New 3DS, otherwise 0."] +#[doc = ""] + pub fn PTMSYSM_CheckNew3DS() -> Result; } extern "C" { #[must_use] - #[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `value` - Bit0: enable higher clock, Bit1: enable L2 cache."] - #[doc = ""] +#[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] +#[doc = "# Arguments"] +#[doc = "`value` - Bit0: enable higher clock, Bit1: enable L2 cache."] +#[doc = ""] + pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Trigger a hardware system shutdown via the MCU."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] - #[doc = ""] +#[doc = "Trigger a hardware system shutdown via the MCU."] +#[doc = "# Arguments"] +#[doc = "`timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] +#[doc = ""] + pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Trigger a hardware system reboot via the MCU."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] - #[doc = ""] +#[doc = "Trigger a hardware system reboot via the MCU."] +#[doc = "# Arguments"] +#[doc = "`timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] +#[doc = ""] + pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PTMGETS."] - #[doc = ""] +#[doc = "Initializes PTMGETS."] +#[doc = ""] + pub fn ptmGetsInit() -> Result; } extern "C" { - #[doc = "Exits PTMGETS."] - #[doc = ""] +#[doc = "Exits PTMGETS."] +#[doc = ""] + pub fn ptmGetsExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:gets session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current ptm:gets session handle."] - #[doc = ""] +#[doc = "Gets a pointer to the current ptm:gets session handle."] +#[doc = "Returns:"] +#[doc = "A pointer to the current ptm:gets session handle."] +#[doc = ""] + pub fn ptmGetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Gets the system time."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] - #[doc = ""] +#[doc = "Gets the system time."] +#[doc = "# Arguments"] +#[doc = "`outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] +#[doc = ""] + pub fn PTMGETS_GetSystemTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes PTMSETS."] - #[doc = ""] +#[doc = "Initializes PTMSETS."] +#[doc = ""] + pub fn ptmSetsInit() -> Result; } extern "C" { - #[doc = "Exits PTMSETS."] - #[doc = ""] +#[doc = "Exits PTMSETS."] +#[doc = ""] + pub fn ptmSetsExit(); } extern "C" { - #[doc = "Gets a pointer to the current ptm:sets session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* A pointer to the current ptm:sets session handle."] - #[doc = ""] +#[doc = "Gets a pointer to the current ptm:sets session handle."] +#[doc = "Returns:"] +#[doc = "A pointer to the current ptm:sets session handle."] +#[doc = ""] + pub fn ptmSetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Sets the system time."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] - #[doc = ""] +#[doc = "Sets the system time."] +#[doc = "# Arguments"] +#[doc = "`msY2k` - The number of milliseconds since 01/01/2000."] +#[doc = ""] + pub fn PTMSETS_SetSystemTime(msY2k: s64) -> Result; } #[doc = "Do not wait."] #[doc = ""] + pub const WAIT_NONE: PXIDEV_WaitType = 0; #[doc = "Sleep for the specified number of nanoseconds."] #[doc = ""] + pub const WAIT_SLEEP: PXIDEV_WaitType = 1; #[doc = "Wait for IREQ, return if timeout."] #[doc = ""] + pub const WAIT_IREQ_RETURN: PXIDEV_WaitType = 2; #[doc = "Wait for IREQ, continue if timeout."] #[doc = ""] + pub const WAIT_IREQ_CONTINUE: PXIDEV_WaitType = 3; #[doc = "Card SPI wait operation type."] #[doc = ""] + pub type PXIDEV_WaitType = ::libc::c_uint; #[doc = "Do not deassert."] #[doc = ""] + pub const DEASSERT_NONE: PXIDEV_DeassertType = 0; #[doc = "Deassert before waiting."] #[doc = ""] + pub const DEASSERT_BEFORE_WAIT: PXIDEV_DeassertType = 1; #[doc = "Deassert after waiting."] #[doc = ""] + pub const DEASSERT_AFTER_WAIT: PXIDEV_DeassertType = 2; #[doc = "Card SPI register deassertion type."] #[doc = ""] + pub type PXIDEV_DeassertType = ::libc::c_uint; #[doc = "Card SPI transfer buffer."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PXIDEV_SPIBuffer { - #[doc = "Data pointer."] - #[doc = ""] +#[doc = "Data pointer."] +#[doc = ""] + pub ptr: *mut ::libc::c_void, - #[doc = "Data size."] - #[doc = ""] +#[doc = "Data size."] +#[doc = ""] + pub size: u32_, - #[doc = "Transfer options. See [`pxiDevMakeTransferOption`]"] - #[doc = ""] +#[doc = "Transfer options. See [`pxiDevMakeTransferOption`]"] +#[doc = ""] + pub transferOption: u8_, - #[doc = "Wait operation. See [`pxiDevMakeWaitOperation`]"] - #[doc = ""] +#[doc = "Wait operation. See [`pxiDevMakeWaitOperation`]"] +#[doc = ""] + pub waitOperation: u64_, } impl Default for PXIDEV_SPIBuffer { @@ -22818,28 +22961,29 @@ impl Default for PXIDEV_SPIBuffer { } extern "C" { #[must_use] - #[doc = "Initializes pxi:dev."] - #[doc = ""] +#[doc = "Initializes pxi:dev."] +#[doc = ""] + pub fn pxiDevInit() -> Result; } extern "C" { - #[doc = "Shuts down pxi:dev."] - #[doc = ""] +#[doc = "Shuts down pxi:dev."] +#[doc = ""] + pub fn pxiDevExit(); } extern "C" { #[must_use] - #[doc = "Performs multiple card SPI writes and reads."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `header` - Header to lead the transfers with. Must be, at most, 8 bytes in size."] - #[doc = "* `writeBuffer1` - Buffer to make first transfer from."] - #[doc = "* `readBuffer1` - Buffer to receive first response to."] - #[doc = "* `writeBuffer2` - Buffer to make second transfer from."] - #[doc = "* `readBuffer2` - Buffer to receive second response to."] - #[doc = "* `footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] - #[doc = ""] +#[doc = "Performs multiple card SPI writes and reads."] +#[doc = "# Arguments"] +#[doc = "`header` - Header to lead the transfers with. Must be, at most, 8 bytes in size."] +#[doc = "`writeBuffer1` - Buffer to make first transfer from."] +#[doc = "`readBuffer1` - Buffer to receive first response to."] +#[doc = "`writeBuffer2` - Buffer to make second transfer from."] +#[doc = "`readBuffer2` - Buffer to receive second response to."] +#[doc = "`footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] +#[doc = ""] + pub fn PXIDEV_SPIMultiWriteRead( header: *mut PXIDEV_SPIBuffer, writeBuffer1: *mut PXIDEV_SPIBuffer, @@ -22851,15 +22995,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Performs a single card SPI write and read."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `bytesRead` - Pointer to output the number of bytes received to."] - #[doc = "* `initialWaitOperation` - Wait operation to perform before transferring data."] - #[doc = "* `writeBuffer` - Buffer to transfer data from."] - #[doc = "* `readBuffer` - Buffer to receive data to."] - #[doc = ""] +#[doc = "Performs a single card SPI write and read."] +#[doc = "# Arguments"] +#[doc = "`bytesRead` - Pointer to output the number of bytes received to."] +#[doc = "`initialWaitOperation` - Wait operation to perform before transferring data."] +#[doc = "`writeBuffer` - Buffer to transfer data from."] +#[doc = "`readBuffer` - Buffer to receive data to."] +#[doc = ""] + pub fn PXIDEV_SPIWriteRead( bytesRead: *mut u32_, initialWaitOperation: u64_, @@ -22869,45 +23012,44 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes PxiPM."] - #[doc = ""] +#[doc = "Initializes PxiPM."] +#[doc = ""] + pub fn pxiPmInit() -> Result; } extern "C" { - #[doc = "Exits PxiPM."] - #[doc = ""] +#[doc = "Exits PxiPM."] +#[doc = ""] + pub fn pxiPmExit(); } extern "C" { - #[doc = "Gets the current PxiPM session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current PxiPM session handle."] - #[doc = ""] +#[doc = "Gets the current PxiPM session handle."] +#[doc = "Returns:"] +#[doc = "The current PxiPM session handle."] +#[doc = ""] + pub fn pxiPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set."] - #[doc = "* `programHandle` - The program handle."] - #[doc = ""] +#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] +#[doc = "# Arguments"] +#[doc = "`exheaderInfos[out]` - Pointer to the output exheader information set."] +#[doc = "`programHandle` - The program handle."] +#[doc = ""] + pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Loads a program and registers it to Process9."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] - #[doc = "* `programInfo` - Information about the program to load."] - #[doc = "* `updateInfo` - Information about the program update to load."] - #[doc = ""] +#[doc = "Loads a program and registers it to Process9."] +#[doc = "# Arguments"] +#[doc = "`programHandle[out]` - Pointer to the output the program handle to."] +#[doc = "`programInfo` - Information about the program to load."] +#[doc = "`updateInfo` - Information about the program update to load."] +#[doc = ""] + pub fn PXIPM_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -22916,12 +23058,11 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unloads a program and unregisters it from Process9."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programHandle` - The program handle."] - #[doc = ""] +#[doc = "Unloads a program and unregisters it from Process9."] +#[doc = "# Arguments"] +#[doc = "`programHandle` - The program handle."] +#[doc = ""] + pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result; } #[repr(C)] @@ -23684,173 +23825,203 @@ pub struct ip_mreq { #[doc = "The mac address of the interface (u32 mac[6])"] #[doc = ""] + pub const NETOPT_MAC_ADDRESS: NetworkOpt = 4100; #[doc = "The ARP table [`SOCU_ARPTableEntry`]"] #[doc = ""] + pub const NETOPT_ARP_TABLE: NetworkOpt = 12290; #[doc = "The current IP setup [`SOCU_IPInfo`]"] #[doc = ""] + pub const NETOPT_IP_INFO: NetworkOpt = 16387; #[doc = "The value of the IP MTU (u32)"] #[doc = ""] + pub const NETOPT_IP_MTU: NetworkOpt = 16388; #[doc = "The routing table [`SOCU_RoutingTableEntry`]"] #[doc = ""] + pub const NETOPT_ROUTING_TABLE: NetworkOpt = 16390; #[doc = "The number of sockets in the UDP table (u32)"] #[doc = ""] + pub const NETOPT_UDP_NUMBER: NetworkOpt = 32770; #[doc = "The table of opened UDP sockets [`SOCU_UDPTableEntry`]"] #[doc = ""] + pub const NETOPT_UDP_TABLE: NetworkOpt = 32771; #[doc = "The number of sockets in the TCP table (u32)"] #[doc = ""] + pub const NETOPT_TCP_NUMBER: NetworkOpt = 36866; #[doc = "The table of opened TCP sockets [`SOCU_TCPTableEntry`]"] #[doc = ""] + pub const NETOPT_TCP_TABLE: NetworkOpt = 36867; #[doc = "The table of the DNS servers [`SOCU_DNSTableEntry`] -- Returns a buffer of size 336 but only 2 entries are set ?"] #[doc = ""] + pub const NETOPT_DNS_TABLE: NetworkOpt = 45059; #[doc = "The DHCP lease time remaining, in seconds"] #[doc = ""] + pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153; #[doc = "Options to be used with [`SOCU_GetNetworkOpt`]"] #[doc = ""] + pub type NetworkOpt = ::libc::c_uint; #[doc = "One entry of the ARP table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_ARP_TABLE`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_ARPTableEntry { pub unk0: u32_, - #[doc = "The IPv4 address associated to the entry"] - #[doc = ""] +#[doc = "The IPv4 address associated to the entry"] +#[doc = ""] + pub ip: in_addr, - #[doc = "The MAC address of associated to the entry"] - #[doc = ""] +#[doc = "The MAC address of associated to the entry"] +#[doc = ""] + pub mac: [u8_; 6usize], pub padding: [u8_; 2usize], } #[doc = "Structure returned by [`SOCU_GetNetworkOpt`] when using [`NETOPT_IP_INFO`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_IPInfo { - #[doc = "Current IPv4 address"] - #[doc = ""] +#[doc = "Current IPv4 address"] +#[doc = ""] + pub ip: in_addr, - #[doc = "Current network mask"] - #[doc = ""] +#[doc = "Current network mask"] +#[doc = ""] + pub netmask: in_addr, - #[doc = "Current network broadcast address"] - #[doc = ""] +#[doc = "Current network broadcast address"] +#[doc = ""] + pub broadcast: in_addr, } #[doc = "One entry of the routing table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_ROUTING_TABLE`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_RoutingTableEntry { - #[doc = "Destination IP address of the route"] - #[doc = ""] +#[doc = "Destination IP address of the route"] +#[doc = ""] + pub dest_ip: in_addr, - #[doc = "Mask used for this route"] - #[doc = ""] +#[doc = "Mask used for this route"] +#[doc = ""] + pub netmask: in_addr, - #[doc = "Gateway address to reach the network"] - #[doc = ""] +#[doc = "Gateway address to reach the network"] +#[doc = ""] + pub gateway: in_addr, - #[doc = "Linux netstat flags [`ROUTING_FLAG_G`]"] - #[doc = ""] +#[doc = "Linux netstat flags [`ROUTING_FLAG_G`]"] +#[doc = ""] + pub flags: u32_, - #[doc = "number of milliseconds since 1st Jan 1900 00:00."] - #[doc = ""] +#[doc = "number of milliseconds since 1st Jan 1900 00:00."] +#[doc = ""] + pub time: u64_, } #[doc = "One entry of the UDP sockets table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_UDP_TABLE`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_UDPTableEntry { - #[doc = "Local address information"] - #[doc = ""] +#[doc = "Local address information"] +#[doc = ""] + pub local: sockaddr_storage, - #[doc = "Remote address information"] - #[doc = ""] +#[doc = "Remote address information"] +#[doc = ""] + pub remote: sockaddr_storage, } #[doc = "One entry of the TCP sockets table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_TCP_TABLE`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_TCPTableEntry { - #[doc = "[`TCP`] states defines"] - #[doc = ""] +#[doc = "[`TCP`] states defines"] +#[doc = ""] + pub state: u32_, - #[doc = "Local address information"] - #[doc = ""] +#[doc = "Local address information"] +#[doc = ""] + pub local: sockaddr_storage, - #[doc = "Remote address information"] - #[doc = ""] +#[doc = "Remote address information"] +#[doc = ""] + pub remote: sockaddr_storage, } #[doc = "One entry of the DNS servers table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_DNS_TABLE`]"] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_DNSTableEntry { pub family: u32_, - #[doc = "Family of the address of the DNS server"] - #[doc = ""] +#[doc = "Family of the address of the DNS server"] +#[doc = ""] + pub ip: in_addr, - #[doc = "IP of the DNS server"] - #[doc = ""] +#[doc = "IP of the DNS server"] +#[doc = ""] + pub padding: [u8_; 12usize], } extern "C" { #[must_use] - #[doc = "Initializes the SOC service."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `context_addr` - Address of a page-aligned (0x1000) buffer to be used."] - #[doc = "* `context_size` - Size of the buffer, a multiple of 0x1000."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The specified context buffer can no longer be accessed by the process which called this function, since the userland permissions for this block are set to no-access."] - #[doc = ""] +#[doc = "Initializes the SOC service."] +#[doc = "# Arguments"] +#[doc = "`context_addr` - Address of a page-aligned (0x1000) buffer to be used."] +#[doc = "`context_size` - Size of the buffer, a multiple of 0x1000."] +#[doc = "# Notes"] +#[doc = "The specified context buffer can no longer be accessed by the process which called this function, since the userland permissions for this block are set to no-access."] +#[doc = ""] + pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Closes the soc service."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* You need to call this in order to be able to use the buffer again."] - #[doc = ""] +#[doc = "Closes the soc service."] +#[doc = "# Notes"] +#[doc = "You need to call this in order to be able to use the buffer again."] +#[doc = ""] + pub fn socExit() -> Result; } extern "C" { - #[doc = "Gets the system's host ID."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The system's host ID."] - #[doc = ""] +#[doc = "Gets the system's host ID."] +#[doc = "Returns:"] +#[doc = "The system's host ID."] +#[doc = ""] + pub fn gethostid() -> ::libc::c_long; } extern "C" { @@ -23863,19 +24034,16 @@ extern "C" { pub fn SOCU_CloseSockets() -> ::libc::c_int; } extern "C" { - #[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* 0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `level` - Only value allowed seems to be [`SOL_CONFIG`]"] - #[doc = "* `optname` - The option to be retrieved"] - #[doc = "* `optval` - Will contain the output of the command"] - #[doc = "* `optlen` - Size of the optval buffer, will be updated to hold the size of the output"] - #[doc = ""] +#[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] +#[doc = "Returns:"] +#[doc = "0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] +#[doc = "# Arguments"] +#[doc = "`level` - Only value allowed seems to be [`SOL_CONFIG`]"] +#[doc = "`optname` - The option to be retrieved"] +#[doc = "`optval` - Will contain the output of the command"] +#[doc = "`optlen` - Size of the optval buffer, will be updated to hold the size of the output"] +#[doc = ""] + pub fn SOCU_GetNetworkOpt( level: ::libc::c_int, optname: NetworkOpt, @@ -23884,12 +24052,11 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { - #[doc = "Gets the system's IP address, netmask, and subnet broadcast"] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* error"] - #[doc = ""] +#[doc = "Gets the system's IP address, netmask, and subnet broadcast"] +#[doc = "Returns:"] +#[doc = "error"] +#[doc = ""] + pub fn SOCU_GetIPInfo( ip: *mut in_addr, netmask: *mut in_addr, @@ -23897,121 +24064,125 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { - #[doc = "Adds a global socket."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* error"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sockfd` - The socket fd."] - #[doc = ""] +#[doc = "Adds a global socket."] +#[doc = "Returns:"] +#[doc = "error"] +#[doc = "# Arguments"] +#[doc = "`sockfd` - The socket fd."] +#[doc = ""] + pub fn SOCU_AddGlobalSocket(sockfd: ::libc::c_int) -> ::libc::c_int; } #[doc = "Unsigned 8-bit PCM."] #[doc = ""] + pub const MICU_ENCODING_PCM8: MICU_Encoding = 0; #[doc = "Unsigned 16-bit PCM."] #[doc = ""] + pub const MICU_ENCODING_PCM16: MICU_Encoding = 1; #[doc = "Signed 8-bit PCM."] #[doc = ""] + pub const MICU_ENCODING_PCM8_SIGNED: MICU_Encoding = 2; #[doc = "Signed 16-bit PCM."] #[doc = ""] + pub const MICU_ENCODING_PCM16_SIGNED: MICU_Encoding = 3; #[doc = "Microphone audio encodings."] #[doc = ""] + pub type MICU_Encoding = ::libc::c_uint; #[doc = "32728.498 Hz"] #[doc = ""] + pub const MICU_SAMPLE_RATE_32730: MICU_SampleRate = 0; #[doc = "16364.479 Hz"] #[doc = ""] + pub const MICU_SAMPLE_RATE_16360: MICU_SampleRate = 1; #[doc = "10909.499 Hz"] #[doc = ""] + pub const MICU_SAMPLE_RATE_10910: MICU_SampleRate = 2; #[doc = "8182.1245 Hz"] #[doc = ""] + pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3; #[doc = "Microphone audio sampling rates."] #[doc = ""] + pub type MICU_SampleRate = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes MIC."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] - #[doc = "* `handle` - Size of the shared memory buffer."] - #[doc = ""] +#[doc = "Initializes MIC."] +#[doc = "# Arguments"] +#[doc = "`size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] +#[doc = "`handle` - Size of the shared memory buffer."] +#[doc = ""] + pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result; } extern "C" { - #[doc = "Exits MIC."] - #[doc = ""] +#[doc = "Exits MIC."] +#[doc = ""] + pub fn micExit(); } extern "C" { - #[doc = "Gets the size of the sample data area within the shared memory buffer."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The sample data's size."] - #[doc = ""] +#[doc = "Gets the size of the sample data area within the shared memory buffer."] +#[doc = "Returns:"] +#[doc = "The sample data's size."] +#[doc = ""] + pub fn micGetSampleDataSize() -> u32_; } extern "C" { - #[doc = "Gets the offset within the shared memory buffer of the last sample written."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The last sample's offset."] - #[doc = ""] +#[doc = "Gets the offset within the shared memory buffer of the last sample written."] +#[doc = "Returns:"] +#[doc = "The last sample's offset."] +#[doc = ""] + pub fn micGetLastSampleOffset() -> u32_; } extern "C" { #[must_use] - #[doc = "Maps MIC shared memory."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `size` - Size of the shared memory."] - #[doc = "* `handle` - Handle of the shared memory."] - #[doc = ""] +#[doc = "Maps MIC shared memory."] +#[doc = "# Arguments"] +#[doc = "`size` - Size of the shared memory."] +#[doc = "`handle` - Handle of the shared memory."] +#[doc = ""] + pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Unmaps MIC shared memory."] - #[doc = ""] +#[doc = "Unmaps MIC shared memory."] +#[doc = ""] + pub fn MICU_UnmapSharedMem() -> Result; } extern "C" { #[must_use] - #[doc = "Begins sampling microphone input."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `encoding` - Encoding of outputted audio."] - #[doc = "* `sampleRate` - Sample rate of outputted audio."] - #[doc = "* `sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] - #[doc = "* `sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] - #[doc = "* `loop` - Whether to loop back to the beginning of the buffer when the end is reached."] - #[doc = ""] +#[doc = "Begins sampling microphone input."] +#[doc = "# Arguments"] +#[doc = "`encoding` - Encoding of outputted audio."] +#[doc = "`sampleRate` - Sample rate of outputted audio."] +#[doc = "`sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] +#[doc = "`sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] +#[doc = "`loop` - Whether to loop back to the beginning of the buffer when the end is reached."] +#[doc = ""] + pub fn MICU_StartSampling( encoding: MICU_Encoding, sampleRate: MICU_SampleRate, @@ -24022,230 +24193,256 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Adjusts the configuration of the current sampling session."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sampleRate` - Sample rate of outputted audio."] - #[doc = ""] +#[doc = "Adjusts the configuration of the current sampling session."] +#[doc = "# Arguments"] +#[doc = "`sampleRate` - Sample rate of outputted audio."] +#[doc = ""] + pub fn MICU_AdjustSampling(sampleRate: MICU_SampleRate) -> Result; } extern "C" { #[must_use] - #[doc = "Stops sampling microphone input."] - #[doc = ""] +#[doc = "Stops sampling microphone input."] +#[doc = ""] + pub fn MICU_StopSampling() -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether microphone input is currently being sampled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sampling` - Pointer to output the sampling state to."] - #[doc = ""] +#[doc = "Gets whether microphone input is currently being sampled."] +#[doc = "# Arguments"] +#[doc = "`sampling` - Pointer to output the sampling state to."] +#[doc = ""] + pub fn MICU_IsSampling(sampling: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets an event handle triggered when the shared memory buffer is full."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `handle` - Pointer to output the event handle to."] - #[doc = ""] +#[doc = "Gets an event handle triggered when the shared memory buffer is full."] +#[doc = "# Arguments"] +#[doc = "`handle` - Pointer to output the event handle to."] +#[doc = ""] + pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the microphone's gain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `gain` - Gain to set."] - #[doc = ""] +#[doc = "Sets the microphone's gain."] +#[doc = "# Arguments"] +#[doc = "`gain` - Gain to set."] +#[doc = ""] + pub fn MICU_SetGain(gain: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the microphone's gain."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `gain` - Pointer to output the current gain to."] - #[doc = ""] +#[doc = "Gets the microphone's gain."] +#[doc = "# Arguments"] +#[doc = "`gain` - Pointer to output the current gain to."] +#[doc = ""] + pub fn MICU_GetGain(gain: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether the microphone is powered on."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `power` - Whether the microphone is powered on."] - #[doc = ""] +#[doc = "Sets whether the microphone is powered on."] +#[doc = "# Arguments"] +#[doc = "`power` - Whether the microphone is powered on."] +#[doc = ""] + pub fn MICU_SetPower(power: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether the microphone is powered on."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `power` - Pointer to output the power state to."] - #[doc = ""] +#[doc = "Gets whether the microphone is powered on."] +#[doc = "# Arguments"] +#[doc = "`power` - Pointer to output the power state to."] +#[doc = ""] + pub fn MICU_GetPower(power: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to clamp microphone input."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `clamp` - Whether to clamp microphone input."] - #[doc = ""] +#[doc = "Sets whether to clamp microphone input."] +#[doc = "# Arguments"] +#[doc = "`clamp` - Whether to clamp microphone input."] +#[doc = ""] + pub fn MICU_SetClamp(clamp: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Gets whether to clamp microphone input."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `clamp` - Pointer to output the clamp state to."] - #[doc = ""] +#[doc = "Gets whether to clamp microphone input."] +#[doc = "# Arguments"] +#[doc = "`clamp` - Pointer to output the clamp state to."] +#[doc = ""] + pub fn MICU_GetClamp(clamp: *mut bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets whether to allow sampling when the shell is closed."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `allowShellClosed` - Whether to allow sampling when the shell is closed."] - #[doc = ""] +#[doc = "Sets whether to allow sampling when the shell is closed."] +#[doc = "# Arguments"] +#[doc = "`allowShellClosed` - Whether to allow sampling when the shell is closed."] +#[doc = ""] + pub fn MICU_SetAllowShellClosed(allowShellClosed: bool) -> Result; } #[doc = "Converting color formats."] #[doc = ""] + pub const MVDMODE_COLORFORMATCONV: MVDSTD_Mode = 0; #[doc = "Processing video."] #[doc = ""] + pub const MVDMODE_VIDEOPROCESSING: MVDSTD_Mode = 1; #[doc = "Processing mode."] #[doc = ""] + pub type MVDSTD_Mode = ::libc::c_uint; #[doc = "YUYV422"] #[doc = ""] + pub const MVD_INPUT_YUYV422: MVDSTD_InputFormat = 65537; #[doc = "H264"] #[doc = ""] + pub const MVD_INPUT_H264: MVDSTD_InputFormat = 131073; #[doc = "Input format."] #[doc = ""] + pub type MVDSTD_InputFormat = ::libc::c_uint; #[doc = "YUYV422"] #[doc = ""] + pub const MVD_OUTPUT_YUYV422: MVDSTD_OutputFormat = 65537; #[doc = "BGR565"] #[doc = ""] + pub const MVD_OUTPUT_BGR565: MVDSTD_OutputFormat = 262146; #[doc = "RGB565"] #[doc = ""] + pub const MVD_OUTPUT_RGB565: MVDSTD_OutputFormat = 262148; #[doc = "Output format."] #[doc = ""] + pub type MVDSTD_OutputFormat = ::libc::c_uint; #[doc = "Processing configuration."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MVDSTD_Config { - #[doc = "Input type."] - #[doc = ""] +#[doc = "Input type."] +#[doc = ""] + pub input_type: MVDSTD_InputFormat, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x04: u32_, - #[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] - #[doc = ""] +#[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] +#[doc = ""] + pub unk_x08: u32_, - #[doc = "Input width."] - #[doc = ""] +#[doc = "Input width."] +#[doc = ""] + pub inwidth: u32_, - #[doc = "Input height."] - #[doc = ""] +#[doc = "Input height."] +#[doc = ""] + pub inheight: u32_, - #[doc = "Physical address of color conversion input data."] - #[doc = ""] +#[doc = "Physical address of color conversion input data."] +#[doc = ""] + pub physaddr_colorconv_indata: u32_, - #[doc = "Physical address used with color conversion."] - #[doc = ""] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk0: u32_, - #[doc = "Physical address used with color conversion."] - #[doc = ""] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk1: u32_, - #[doc = "Physical address used with color conversion."] - #[doc = ""] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk2: u32_, - #[doc = "Physical address used with color conversion."] - #[doc = ""] +#[doc = "Physical address used with color conversion."] +#[doc = ""] + pub physaddr_colorconv_unk3: u32_, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x28: [u32_; 6usize], - #[doc = "Enables cropping with the input image when non-zero via the following 4 words."] - #[doc = ""] +#[doc = "Enables cropping with the input image when non-zero via the following 4 words."] +#[doc = ""] + 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_, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x54: u32_, - #[doc = "Output type."] - #[doc = ""] +#[doc = "Output type."] +#[doc = ""] + pub output_type: MVDSTD_OutputFormat, - #[doc = "Output width."] - #[doc = ""] +#[doc = "Output width."] +#[doc = ""] + pub outwidth: u32_, - #[doc = "Output height."] - #[doc = ""] +#[doc = "Output height."] +#[doc = ""] + pub outheight: u32_, - #[doc = "Physical address of output data."] - #[doc = ""] +#[doc = "Physical address of output data."] +#[doc = ""] + pub physaddr_outdata0: u32_, - #[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] - #[doc = ""] +#[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] +#[doc = ""] + pub physaddr_outdata1: u32_, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unk_x6c: [u32_; 38usize], - #[doc = "This enables using the following 4 words when non-zero."] - #[doc = ""] +#[doc = "This enables using the following 4 words when non-zero."] +#[doc = ""] + pub flag_x104: u32_, - #[doc = "Output X position in the output buffer."] - #[doc = ""] +#[doc = "Output X position in the output buffer."] +#[doc = ""] + pub output_x_pos: u32_, - #[doc = "Same as above except for the Y pos."] - #[doc = ""] +#[doc = "Same as above except for the Y pos."] +#[doc = ""] + pub output_y_pos: u32_, - #[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] - #[doc = ""] +#[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] +#[doc = ""] + pub output_width_override: u32_, - #[doc = "Same as output_width_override except for the output height."] - #[doc = ""] +#[doc = "Same as output_width_override except for the output height."] +#[doc = ""] + pub output_height_override: u32_, pub unk_x118: u32_, } @@ -24297,6 +24494,7 @@ impl Default for MVDSTD_OutputBuffersEntryList { } #[doc = "This can be used to override the default input values for MVDSTD commands during initialization with video-processing. The default for these fields are all-zero, except for cmd1b_inval which is 1. See also here: "] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MVDSTD_InitStruct { @@ -24308,16 +24506,15 @@ pub struct MVDSTD_InitStruct { } extern "C" { #[must_use] - #[doc = "Initializes MVDSTD."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mode` - Mode to initialize MVDSTD to."] - #[doc = "* `input_type` - Type of input to process."] - #[doc = "* `output_type` - Type of output to produce."] - #[doc = "* `size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] - #[doc = "* `initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] - #[doc = ""] +#[doc = "Initializes MVDSTD."] +#[doc = "# Arguments"] +#[doc = "`mode` - Mode to initialize MVDSTD to."] +#[doc = "`input_type` - Type of input to process."] +#[doc = "`output_type` - Type of output to produce."] +#[doc = "`size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] +#[doc = "`initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] +#[doc = ""] + pub fn mvdstdInit( mode: MVDSTD_Mode, input_type: MVDSTD_InputFormat, @@ -24327,24 +24524,24 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Shuts down MVDSTD."] - #[doc = ""] +#[doc = "Shuts down MVDSTD."] +#[doc = ""] + pub fn mvdstdExit(); } extern "C" { - #[doc = "Generates a default MVDSTD configuration."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to output the generated config to."] - #[doc = "* `input_width` - Input width."] - #[doc = "* `input_height` - Input height."] - #[doc = "* `output_width` - Output width."] - #[doc = "* `output_height` - Output height."] - #[doc = "* `vaddr_colorconv_indata` - Virtual address of the color conversion input data."] - #[doc = "* `vaddr_outdata0` - Virtual address of the output data."] - #[doc = "* `vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] - #[doc = ""] +#[doc = "Generates a default MVDSTD configuration."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to output the generated config to."] +#[doc = "`input_width` - Input width."] +#[doc = "`input_height` - Input height."] +#[doc = "`output_width` - Output width."] +#[doc = "`output_height` - Output height."] +#[doc = "`vaddr_colorconv_indata` - Virtual address of the color conversion input data."] +#[doc = "`vaddr_outdata0` - Virtual address of the output data."] +#[doc = "`vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] +#[doc = ""] + pub fn mvdstdGenerateDefaultConfig( config: *mut MVDSTD_Config, input_width: u32_, @@ -24358,25 +24555,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Run color-format-conversion."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to the configuration to use."] - #[doc = ""] +#[doc = "Run color-format-conversion."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to the configuration to use."] +#[doc = ""] + pub fn mvdstdConvertImage(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] - #[doc = "Processes a video frame(specifically a NAL-unit)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] - #[doc = "* `size` - Size of the input buffer."] - #[doc = "* `flag` - See here regarding this input flag: "] - #[doc = "* `out` - Optional output MVDSTD_ProcessNALUnitOut structure."] - #[doc = ""] +#[doc = "Processes a video frame(specifically a NAL-unit)."] +#[doc = "# Arguments"] +#[doc = "`inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] +#[doc = "`size` - Size of the input buffer."] +#[doc = "`flag` - See here regarding this input flag: "] +#[doc = "`out` - Optional output MVDSTD_ProcessNALUnitOut structure."] +#[doc = ""] + pub fn mvdstdProcessVideoFrame( inbuf_vaddr: *mut ::libc::c_void, size: size_t, @@ -24386,34 +24581,31 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Renders the video frame."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] - #[doc = "* `wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] - #[doc = ""] +#[doc = "Renders the video frame."] +#[doc = "# Arguments"] +#[doc = "`config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] +#[doc = "`wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] +#[doc = ""] + pub fn mvdstdRenderVideoFrame(config: *mut MVDSTD_Config, wait: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the current configuration of MVDSTD."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `config` - Pointer to the configuration to set."] - #[doc = ""] +#[doc = "Sets the current configuration of MVDSTD."] +#[doc = "# Arguments"] +#[doc = "`config` - Pointer to the configuration to set."] +#[doc = ""] + pub fn MVDSTD_SetConfig(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] - #[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `entrylist` - Input entrylist."] - #[doc = "* `bufsize` - Size of each buffer from the entrylist."] - #[doc = ""] +#[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: "] +#[doc = "# Arguments"] +#[doc = "`entrylist` - Input entrylist."] +#[doc = "`bufsize` - Size of each buffer from the entrylist."] +#[doc = ""] + pub fn mvdstdSetupOutputBuffers( entrylist: *mut MVDSTD_OutputBuffersEntryList, bufsize: u32_, @@ -24421,15 +24613,14 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cur_outdata0` - Linearmem vaddr. The current outdata0 for this entry must match this value."] - #[doc = "* `cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] - #[doc = "* `new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] - #[doc = "* `new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] - #[doc = ""] +#[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: "] +#[doc = "# Arguments"] +#[doc = "`cur_outdata0` - Linearmem vaddr. The current outdata0 for this entry must match this value."] +#[doc = "`cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] +#[doc = "`new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] +#[doc = "`new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] +#[doc = ""] + pub fn mvdstdOverrideOutputBuffers( cur_outdata0: *mut ::libc::c_void, cur_outdata1: *mut ::libc::c_void, @@ -24441,45 +24632,55 @@ pub const NFC_OpType_1: NFC_OpType = 1; #[doc = "Unknown."] #[doc = ""] + pub const NFC_OpType_NFCTag: NFC_OpType = 2; #[doc = "This is the default."] #[doc = ""] + pub const NFC_OpType_RawNFC: NFC_OpType = 3; #[doc = "NFC operation type."] #[doc = ""] + pub type NFC_OpType = ::libc::c_uint; pub const NFC_TagState_Uninitialized: NFC_TagState = 0; #[doc = "nfcInit() was not used yet."] #[doc = ""] + pub const NFC_TagState_ScanningStopped: NFC_TagState = 1; #[doc = "Not currently scanning for NFC tags. Set by nfcStopScanning() and nfcInit(), when successful."] #[doc = ""] + pub const NFC_TagState_Scanning: NFC_TagState = 2; #[doc = "Currently scanning for NFC tags. Set by nfcStartScanning() when successful."] #[doc = ""] + pub const NFC_TagState_InRange: NFC_TagState = 3; #[doc = "NFC tag is in range. The state automatically changes to this when the state was previously value 2, without using any NFC service commands."] #[doc = ""] + pub const NFC_TagState_OutOfRange: NFC_TagState = 4; #[doc = "NFC tag is now out of range, where the NFC tag was previously in range. This occurs automatically without using any NFC service commands. Once this state is entered, it won't automatically change to anything else when the tag is moved in range again. Hence, if you want to keep doing tag scanning after this, you must stop+start scanning."] #[doc = ""] + pub const NFC_TagState_DataReady: NFC_TagState = 5; pub type NFC_TagState = ::libc::c_uint; pub const NFC_amiiboFlag_Setup: _bindgen_ty_28 = 16; #[doc = "This indicates that the amiibo was setup with amiibo Settings. nfcGetAmiiboSettings() will return an all-zero struct when this is not set."] #[doc = ""] + pub const NFC_amiiboFlag_AppDataSetup: _bindgen_ty_28 = 32; #[doc = "Bit4-7 are always clear with nfcGetAmiiboSettings() due to \"& 0xF\"."] #[doc = ""] + pub type _bindgen_ty_28 = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -24501,6 +24702,7 @@ impl Default for NFC_TagInfo { } #[doc = "AmiiboSettings structure, see also here: "] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboSettings { @@ -24528,6 +24730,7 @@ impl Default for NFC_AmiiboSettings { } #[doc = "AmiiboConfig structure, see also here: "] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboConfig { @@ -24536,17 +24739,21 @@ pub struct NFC_AmiiboConfig { pub lastwritedate_day: u8_, pub write_counter: u16_, pub characterID: [u8_; 3usize], - #[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] - #[doc = ""] +#[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] +#[doc = ""] + pub series: u8_, - #[doc = "ID of the series"] - #[doc = ""] +#[doc = "ID of the series"] +#[doc = ""] + pub amiiboID: u16_, - #[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] - #[doc = ""] +#[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] +#[doc = ""] + pub type_: u8_, - #[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] - #[doc = ""] +#[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] +#[doc = ""] + pub pagex4_byte3: u8_, pub appdata_size: u16_, @@ -24563,6 +24770,7 @@ impl Default for NFC_AmiiboConfig { } #[doc = "Used by nfcInitializeWriteAppData() internally, see also here: "] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AppDataInitStruct { @@ -24580,6 +24788,7 @@ impl Default for NFC_AppDataInitStruct { } #[doc = "Used by nfcWriteAppData() internally, see also: "] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NFC_AppDataWriteStruct { @@ -24589,101 +24798,99 @@ pub struct NFC_AppDataWriteStruct { } extern "C" { #[must_use] - #[doc = "Initializes NFC."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `type` - See the NFC_OpType enum."] - #[doc = ""] +#[doc = "Initializes NFC."] +#[doc = "# Arguments"] +#[doc = "`type` - See the NFC_OpType enum."] +#[doc = ""] + pub fn nfcInit(type_: NFC_OpType) -> Result; } extern "C" { - #[doc = "Shuts down NFC."] - #[doc = ""] +#[doc = "Shuts down NFC."] +#[doc = ""] + pub fn nfcExit(); } extern "C" { - #[doc = "Gets the NFC service handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The NFC service handle."] - #[doc = ""] +#[doc = "Gets the NFC service handle."] +#[doc = "Returns:"] +#[doc = "The NFC service handle."] +#[doc = ""] + pub fn nfcGetSessionHandle() -> Handle; } extern "C" { #[must_use] - #[doc = "Starts scanning for NFC tags."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] - #[doc = ""] +#[doc = "Starts scanning for NFC tags."] +#[doc = "# Arguments"] +#[doc = "`inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] +#[doc = ""] + pub fn nfcStartScanning(inval: u16_) -> Result; } extern "C" { - #[doc = "Stops scanning for NFC tags."] - #[doc = ""] +#[doc = "Stops scanning for NFC tags."] +#[doc = ""] + pub fn nfcStopScanning(); } extern "C" { #[must_use] - #[doc = "Read amiibo NFC data and load in memory."] - #[doc = ""] +#[doc = "Read amiibo NFC data and load in memory."] +#[doc = ""] + pub fn nfcLoadAmiiboData() -> Result; } extern "C" { #[must_use] - #[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] - #[doc = ""] +#[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] +#[doc = ""] + pub fn nfcResetTagScanState() -> Result; } extern "C" { #[must_use] - #[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] - #[doc = ""] +#[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] +#[doc = ""] + pub fn nfcUpdateStoredAmiiboData() -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current NFC tag state."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - Pointer to write NFC tag state."] - #[doc = ""] +#[doc = "Returns the current NFC tag state."] +#[doc = "# Arguments"] +#[doc = "`state` - Pointer to write NFC tag state."] +#[doc = ""] + pub fn nfcGetTagState(state: *mut NFC_TagState) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current TagInfo."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the output TagInfo."] - #[doc = ""] +#[doc = "Returns the current TagInfo."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the output TagInfo."] +#[doc = ""] + pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `amiibo_appid` - Amiibo AppID. See here: "] - #[doc = ""] +#[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: "] +#[doc = "# Arguments"] +#[doc = "`amiibo_appid` - Amiibo AppID. See here: "] +#[doc = ""] + pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] - #[doc = "* `buf` - Input buffer."] - #[doc = "* `size` - Buffer size."] - #[doc = ""] +#[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] +#[doc = "# Arguments"] +#[doc = "`amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] +#[doc = "`buf` - Input buffer."] +#[doc = "`size` - Buffer size."] +#[doc = ""] + pub fn nfcInitializeWriteAppData( amiibo_appid: u32_, buf: *const ::libc::c_void, @@ -24692,25 +24899,23 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Output buffer."] - #[doc = "* `size` - Buffer size."] - #[doc = ""] +#[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] +#[doc = "# Arguments"] +#[doc = "`buf` - Output buffer."] +#[doc = "`size` - Buffer size."] +#[doc = ""] + pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] - #[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf` - Input buffer."] - #[doc = "* `size` - Buffer size."] - #[doc = "* `taginfo` - TagInfo from nfcGetTagInfo()."] - #[doc = ""] +#[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: "] +#[doc = "# Arguments"] +#[doc = "`buf` - Input buffer."] +#[doc = "`size` - Buffer size."] +#[doc = "`taginfo` - TagInfo from nfcGetTagInfo()."] +#[doc = ""] + pub fn nfcWriteAppData( buf: *const ::libc::c_void, size: size_t, @@ -24719,48 +24924,44 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Returns the current AmiiboSettings."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the output AmiiboSettings."] - #[doc = ""] +#[doc = "Returns the current AmiiboSettings."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the output AmiiboSettings."] +#[doc = ""] + pub fn nfcGetAmiiboSettings(out: *mut NFC_AmiiboSettings) -> Result; } extern "C" { #[must_use] - #[doc = "Returns the current AmiiboConfig."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the output AmiiboConfig."] - #[doc = ""] +#[doc = "Returns the current AmiiboConfig."] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the output AmiiboConfig."] +#[doc = ""] + pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result; } extern "C" { #[must_use] - #[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `unk0` - Same as nfcStartScanning() input."] - #[doc = "* `unk1` - Unknown."] - #[doc = ""] +#[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: "] +#[doc = "# Arguments"] +#[doc = "`unk0` - Same as nfcStartScanning() input."] +#[doc = "`unk1` - Unknown."] +#[doc = ""] + pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: "] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inbuf` - Input buffer."] - #[doc = "* `insize` - Size of the input buffer."] - #[doc = "* `outbuf` - Output buffer."] - #[doc = "* `outsize` - Size of the output buffer."] - #[doc = "* `actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] - #[doc = "* `microseconds` - Timing-related field in microseconds."] - #[doc = ""] +#[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: "] +#[doc = "# Arguments"] +#[doc = "`inbuf` - Input buffer."] +#[doc = "`insize` - Size of the input buffer."] +#[doc = "`outbuf` - Output buffer."] +#[doc = "`outsize` - Size of the output buffer."] +#[doc = "`actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] +#[doc = "`microseconds` - Timing-related field in microseconds."] +#[doc = ""] + pub fn nfcSendTagCommand( inbuf: *const ::libc::c_void, insize: size_t, @@ -24772,18 +24973,21 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] - #[doc = ""] +#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] +#[doc = ""] + pub fn nfcCmd21() -> Result; } extern "C" { #[must_use] - #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] - #[doc = ""] +#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] +#[doc = ""] + pub fn nfcCmd22() -> Result; } #[doc = "Notification header data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationHeader { @@ -24802,29 +25006,30 @@ pub struct NotificationHeader { } extern "C" { #[must_use] - #[doc = "Initializes NEWS."] - #[doc = ""] +#[doc = "Initializes NEWS."] +#[doc = ""] + pub fn newsInit() -> Result; } extern "C" { - #[doc = "Exits NEWS."] - #[doc = ""] +#[doc = "Exits NEWS."] +#[doc = ""] + pub fn newsExit(); } extern "C" { #[must_use] - #[doc = "Adds a notification to the home menu Notifications applet."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `title` - UTF-16 title of the notification."] - #[doc = "* `titleLength` - Number of characters in the title, not including the null-terminator."] - #[doc = "* `message` - UTF-16 message of the notification, or NULL for no message."] - #[doc = "* `messageLength` - Number of characters in the message, not including the null-terminator."] - #[doc = "* `image` - Data of the image to show in the notification, or NULL for no image."] - #[doc = "* `imageSize` - Size of the image data in bytes."] - #[doc = "* `jpeg` - Whether the image is a JPEG or not."] - #[doc = ""] +#[doc = "Adds a notification to the home menu Notifications applet."] +#[doc = "# Arguments"] +#[doc = "`title` - UTF-16 title of the notification."] +#[doc = "`titleLength` - Number of characters in the title, not including the null-terminator."] +#[doc = "`message` - UTF-16 message of the notification, or NULL for no message."] +#[doc = "`messageLength` - Number of characters in the message, not including the null-terminator."] +#[doc = "`image` - Data of the image to show in the notification, or NULL for no image."] +#[doc = "`imageSize` - Size of the image data in bytes."] +#[doc = "`jpeg` - Whether the image is a JPEG or not."] +#[doc = ""] + pub fn NEWS_AddNotification( title: *const u16_, titleLength: u32_, @@ -24837,58 +25042,53 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets current total notifications number."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `num` - Pointer where total number will be saved."] - #[doc = ""] +#[doc = "Gets current total notifications number."] +#[doc = "# Arguments"] +#[doc = "`num` - Pointer where total number will be saved."] +#[doc = ""] + pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a custom header for a specific notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `news_id` - Identification number of the notification."] - #[doc = "* `header` - Pointer to notification header to set."] - #[doc = ""] +#[doc = "Sets a custom header for a specific notification."] +#[doc = "# Arguments"] +#[doc = "`news_id` - Identification number of the notification."] +#[doc = "`header` - Pointer to notification header to set."] +#[doc = ""] + pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the header of a specific notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `news_id` - Identification number of the notification."] - #[doc = "* `header` - Pointer where header of the notification will be saved."] - #[doc = ""] +#[doc = "Gets the header of a specific notification."] +#[doc = "# Arguments"] +#[doc = "`news_id` - Identification number of the notification."] +#[doc = "`header` - Pointer where header of the notification will be saved."] +#[doc = ""] + pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a custom message for a specific notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `news_id` - Identification number of the notification."] - #[doc = "* `message` - Pointer to UTF-16 message to set."] - #[doc = "* `size` - Size of message to set."] - #[doc = ""] +#[doc = "Sets a custom message for a specific notification."] +#[doc = "# Arguments"] +#[doc = "`news_id` - Identification number of the notification."] +#[doc = "`message` - Pointer to UTF-16 message to set."] +#[doc = "`size` - Size of message to set."] +#[doc = ""] + pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the message of a specific notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `news_id` - Identification number of the notification."] - #[doc = "* `message` - Pointer where UTF-16 message of the notification will be saved."] - #[doc = "* `size` - Pointer where size of the message data will be saved in bytes."] - #[doc = ""] +#[doc = "Gets the message of a specific notification."] +#[doc = "# Arguments"] +#[doc = "`news_id` - Identification number of the notification."] +#[doc = "`message` - Pointer where UTF-16 message of the notification will be saved."] +#[doc = "`size` - Pointer where size of the message data will be saved in bytes."] +#[doc = ""] + pub fn NEWS_GetNotificationMessage( news_id: u32_, message: *mut u16_, @@ -24897,14 +25097,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Sets a custom image for a specific notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `news_id` - Identification number of the notification."] - #[doc = "* `buffer` - Pointer to MPO image to set."] - #[doc = "* `size` - Size of the MPO image to set."] - #[doc = ""] +#[doc = "Sets a custom image for a specific notification."] +#[doc = "# Arguments"] +#[doc = "`news_id` - Identification number of the notification."] +#[doc = "`buffer` - Pointer to MPO image to set."] +#[doc = "`size` - Size of the MPO image to set."] +#[doc = ""] + pub fn NEWS_SetNotificationImage( news_id: u32_, buffer: *const ::libc::c_void, @@ -24913,14 +25112,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the image of a specific notification."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `news_id` - Identification number of the notification."] - #[doc = "* `buffer` - Pointer where MPO image of the notification will be saved."] - #[doc = "* `size` - Pointer where size of the image data will be saved in bytes."] - #[doc = ""] +#[doc = "Gets the image of a specific notification."] +#[doc = "# Arguments"] +#[doc = "`news_id` - Identification number of the notification."] +#[doc = "`buffer` - Pointer where MPO image of the notification will be saved."] +#[doc = "`size` - Pointer where size of the image data will be saved in bytes."] +#[doc = ""] + pub fn NEWS_GetNotificationImage( news_id: u32_, buffer: *mut ::libc::c_void, @@ -24929,78 +25127,86 @@ extern "C" { } #[doc = "Head tracking coordinate pair."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfoCoord { - #[doc = "X coordinate."] - #[doc = ""] +#[doc = "X coordinate."] +#[doc = ""] + pub x: f32, - #[doc = "Y coordinate."] - #[doc = ""] +#[doc = "Y coordinate."] +#[doc = ""] + pub y: f32, } #[doc = "Head tracking info."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfo { - #[doc = "Flags."] - #[doc = ""] +#[doc = "Flags."] +#[doc = ""] + pub flags: [u8_; 5usize], - #[doc = "Padding."] - #[doc = ""] +#[doc = "Padding."] +#[doc = ""] + pub padding: [u8_; 3usize], - #[doc = "Unknown. Not used by System_Settings."] - #[doc = ""] +#[doc = "Unknown. Not used by System_Settings."] +#[doc = ""] + pub floatdata_x08: f32, - #[doc = "Head coordinates."] - #[doc = ""] +#[doc = "Head coordinates."] +#[doc = ""] + pub coords0: [QTM_HeadTrackingInfoCoord; 4usize], - #[doc = "Unknown. Not used by System_Settings."] - #[doc = ""] +#[doc = "Unknown. Not used by System_Settings."] +#[doc = ""] + pub unk_x2c: [u32_; 5usize], } extern "C" { #[must_use] - #[doc = "Initializes QTM."] - #[doc = ""] +#[doc = "Initializes QTM."] +#[doc = ""] + pub fn qtmInit() -> Result; } extern "C" { - #[doc = "Exits QTM."] - #[doc = ""] +#[doc = "Exits QTM."] +#[doc = ""] + pub fn qtmExit(); } extern "C" { - #[doc = "Checks whether QTM is initialized."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether QTM is initialized."] - #[doc = ""] +#[doc = "Checks whether QTM is initialized."] +#[doc = "Returns:"] +#[doc = "Whether QTM is initialized."] +#[doc = ""] + pub fn qtmCheckInitialized() -> bool; } extern "C" { - #[doc = "Checks whether a head is fully detected."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `info` - Tracking info to check."] - #[doc = ""] +#[doc = "Checks whether a head is fully detected."] +#[doc = "# Arguments"] +#[doc = "`info` - Tracking info to check."] +#[doc = ""] + pub fn qtmCheckHeadFullyDetected(info: *mut QTM_HeadTrackingInfo) -> bool; } extern "C" { #[must_use] - #[doc = "Converts QTM coordinates to screen coordinates."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `coord` - Coordinates to convert."] - #[doc = "* `screen_width` - Width of the screen. Can be NULL to use the default value for the top screen."] - #[doc = "* `screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] - #[doc = "* `x` - Pointer to output the screen X coordinate to."] - #[doc = "* `y` - Pointer to output the screen Y coordinate to."] - #[doc = ""] +#[doc = "Converts QTM coordinates to screen coordinates."] +#[doc = "# Arguments"] +#[doc = "`coord` - Coordinates to convert."] +#[doc = "`screen_width` - Width of the screen. Can be NULL to use the default value for the top screen."] +#[doc = "`screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] +#[doc = "`x` - Pointer to output the screen X coordinate to."] +#[doc = "`y` - Pointer to output the screen Y coordinate to."] +#[doc = ""] + pub fn qtmConvertCoordToScreen( coord: *mut QTM_HeadTrackingInfoCoord, screen_width: *mut f32, @@ -25011,66 +25217,63 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets the current head tracking info."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `val` - Normally 0."] - #[doc = "* `out` - Pointer to write head tracking info to."] - #[doc = ""] - pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result; +#[doc = "Gets the current head tracking info."] +#[doc = "# Arguments"] +#[doc = "`val` - Normally 0."] +#[doc = "`out` - Pointer to write head tracking info to."] +#[doc = ""] + + pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes srv:pm and the service API."] - #[doc = ""] +#[doc = "Initializes srv:pm and the service API."] +#[doc = ""] + pub fn srvPmInit() -> Result; } extern "C" { - #[doc = "Exits srv:pm and the service API."] - #[doc = ""] +#[doc = "Exits srv:pm and the service API."] +#[doc = ""] + pub fn srvPmExit(); } extern "C" { - #[doc = "Gets the current srv:pm session handle."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The current srv:pm session handle."] - #[doc = ""] +#[doc = "Gets the current srv:pm session handle."] +#[doc = "Returns:"] +#[doc = "The current srv:pm session handle."] +#[doc = ""] + pub fn srvPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] - #[doc = "Publishes a notification to a process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `notificationId` - ID of the notification."] - #[doc = "* `process` - Process to publish to."] - #[doc = ""] +#[doc = "Publishes a notification to a process."] +#[doc = "# Arguments"] +#[doc = "`notificationId` - ID of the notification."] +#[doc = "`process` - Process to publish to."] +#[doc = ""] + pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result; } extern "C" { #[must_use] - #[doc = "Publishes a notification to all processes."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `notificationId` - ID of the notification."] - #[doc = ""] +#[doc = "Publishes a notification to all processes."] +#[doc = "# Arguments"] +#[doc = "`notificationId` - ID of the notification."] +#[doc = ""] + pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Registers a process with SRV."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pid` - ID of the process."] - #[doc = "* `count` - Number of services within the service access control data."] - #[doc = "* `serviceAccessControlList` - Service Access Control list."] - #[doc = ""] +#[doc = "Registers a process with SRV."] +#[doc = "# Arguments"] +#[doc = "`pid` - ID of the process."] +#[doc = "`count` - Number of services within the service access control data."] +#[doc = "`serviceAccessControlList` - Service Access Control list."] +#[doc = ""] + pub fn SRVPM_RegisterProcess( pid: u32_, count: u32_, @@ -25079,46 +25282,45 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters a process with SRV."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pid` - ID of the process."] - #[doc = ""] +#[doc = "Unregisters a process with SRV."] +#[doc = "# Arguments"] +#[doc = "`pid` - ID of the process."] +#[doc = ""] + pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Initializes LOADER."] - #[doc = ""] +#[doc = "Initializes LOADER."] +#[doc = ""] + pub fn loaderInit() -> Result; } extern "C" { - #[doc = "Exits LOADER."] - #[doc = ""] +#[doc = "Exits LOADER."] +#[doc = ""] + pub fn loaderExit(); } extern "C" { #[must_use] - #[doc = "Loads a program and returns a process handle to the newly created process."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `process` - Pointer to output the process handle to. [Direction: In, Out]"] - #[doc = "* `programHandle` - The handle of the program to load."] - #[doc = ""] +#[doc = "Loads a program and returns a process handle to the newly created process."] +#[doc = "# Arguments"] +#[doc = "`process` - Pointer to output the process handle to. [Direction: In, Out]"] +#[doc = "`programHandle` - The handle of the program to load."] +#[doc = ""] + pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Registers a program (along with its update)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] - #[doc = "* `programInfo` - The program info."] - #[doc = "* `programInfo` - The program update info."] - #[doc = ""] +#[doc = "Registers a program (along with its update)."] +#[doc = "# Arguments"] +#[doc = "`programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] +#[doc = "`programInfo` - The program info."] +#[doc = "`programInfo` - The program update info."] +#[doc = ""] + pub fn LOADER_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -25127,255 +25329,269 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unregisters a program (along with its update)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `programHandle` - The handle of the program to unregister."] - #[doc = ""] +#[doc = "Unregisters a program (along with its update)."] +#[doc = "# Arguments"] +#[doc = "`programHandle` - The handle of the program to unregister."] +#[doc = ""] + pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] - #[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see [`ExHeader_Info)`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] - #[doc = "* `programHandle` - The handle of the program to unregister"] - #[doc = ""] +#[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see [`ExHeader_Info)`]"] +#[doc = "# Arguments"] +#[doc = "`exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] +#[doc = "`programHandle` - The handle of the program to unregister"] +#[doc = ""] + pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } #[doc = "The normal mode of the led"] #[doc = ""] + pub const LED_NORMAL: powerLedState = 1; #[doc = "The led pulses slowly as it does in the sleep mode"] #[doc = ""] + pub const LED_SLEEP_MODE: powerLedState = 2; #[doc = "Switch off power led"] #[doc = ""] + pub const LED_OFF: powerLedState = 3; #[doc = "Red state of the led"] #[doc = ""] + pub const LED_RED: powerLedState = 4; #[doc = "Blue state of the led"] #[doc = ""] + pub const LED_BLUE: powerLedState = 5; #[doc = "Blinking red state of power led and notification led"] #[doc = ""] + pub const LED_BLINK_RED: powerLedState = 6; pub type powerLedState = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Initializes mcuHwc."] - #[doc = ""] +#[doc = "Initializes mcuHwc."] +#[doc = ""] + pub fn mcuHwcInit() -> Result; } extern "C" { - #[doc = "Exits mcuHwc."] - #[doc = ""] +#[doc = "Exits mcuHwc."] +#[doc = ""] + pub fn mcuHwcExit(); } extern "C" { #[must_use] - #[doc = "Reads data from an i2c device3 register"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `reg` - Register number. See for more info"] - #[doc = "* `data` - Pointer to write the data to."] - #[doc = "* `size` - Size of data to be read"] - #[doc = ""] +#[doc = "Reads data from an i2c device3 register"] +#[doc = "# Arguments"] +#[doc = "`reg` - Register number. See for more info"] +#[doc = "`data` - Pointer to write the data to."] +#[doc = "`size` - Size of data to be read"] +#[doc = ""] + pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Writes data to a i2c device3 register"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `reg` - Register number. See for more info"] - #[doc = "* `data` - Pointer to write the data to."] - #[doc = "* `size` - Size of data to be written"] - #[doc = ""] +#[doc = "Writes data to a i2c device3 register"] +#[doc = "# Arguments"] +#[doc = "`reg` - Register number. See for more info"] +#[doc = "`data` - Pointer to write the data to."] +#[doc = "`size` - Size of data to be written"] +#[doc = ""] + pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the battery voltage"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `voltage` - Pointer to write the battery voltage to."] - #[doc = ""] +#[doc = "Gets the battery voltage"] +#[doc = "# Arguments"] +#[doc = "`voltage` - Pointer to write the battery voltage to."] +#[doc = ""] + pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the battery level"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `level` - Pointer to write the current battery level to."] - #[doc = ""] +#[doc = "Gets the battery level"] +#[doc = "# Arguments"] +#[doc = "`level` - Pointer to write the current battery level to."] +#[doc = ""] + pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the sound slider level"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `level` - Pointer to write the slider level to."] - #[doc = ""] +#[doc = "Gets the sound slider level"] +#[doc = "# Arguments"] +#[doc = "`level` - Pointer to write the slider level to."] +#[doc = ""] + pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Sets Wifi LED state"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - State of Wifi LED. (True/False)"] - #[doc = ""] +#[doc = "Sets Wifi LED state"] +#[doc = "# Arguments"] +#[doc = "`state` - State of Wifi LED. (True/False)"] +#[doc = ""] + pub fn MCUHWC_SetWifiLedState(state: bool) -> Result; } extern "C" { #[must_use] - #[doc = "Sets Power LED state"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `state` - powerLedState State of power LED."] - #[doc = ""] +#[doc = "Sets Power LED state"] +#[doc = "# Arguments"] +#[doc = "`state` - powerLedState State of power LED."] +#[doc = ""] + pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result; } extern "C" { #[must_use] - #[doc = "Gets 3d slider level"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `level` - Pointer to write 3D slider level to."] - #[doc = ""] +#[doc = "Gets 3d slider level"] +#[doc = "# Arguments"] +#[doc = "`level` - Pointer to write 3D slider level to."] +#[doc = ""] + pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the major MCU firmware version"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the major firmware version to."] - #[doc = ""] +#[doc = "Gets the major MCU firmware version"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the major firmware version to."] +#[doc = ""] + pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Gets the minor MCU firmware version"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Pointer to write the minor firmware version to."] - #[doc = ""] +#[doc = "Gets the minor MCU firmware version"] +#[doc = "# Arguments"] +#[doc = "`out` - Pointer to write the minor firmware version to."] +#[doc = ""] + pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result; } #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] #[doc = ""] + pub const GX_TRANSFER_FMT_RGBA8: GX_TRANSFER_FORMAT = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] #[doc = ""] + pub const GX_TRANSFER_FMT_RGB8: GX_TRANSFER_FORMAT = 1; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] #[doc = ""] + pub const GX_TRANSFER_FMT_RGB565: GX_TRANSFER_FORMAT = 2; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] #[doc = ""] + pub const GX_TRANSFER_FMT_RGB5A1: GX_TRANSFER_FORMAT = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] #[doc = ""] + pub const GX_TRANSFER_FMT_RGBA4: GX_TRANSFER_FORMAT = 4; #[doc = "Supported transfer pixel formats."] -#[doc = ""] #[doc = "[`GSPGPU_FramebufferFormat`]"] #[doc = ""] + pub type GX_TRANSFER_FORMAT = ::libc::c_uint; #[doc = "No anti-aliasing"] #[doc = ""] + pub const GX_TRANSFER_SCALE_NO: GX_TRANSFER_SCALE = 0; #[doc = "2x1 anti-aliasing"] #[doc = ""] + pub const GX_TRANSFER_SCALE_X: GX_TRANSFER_SCALE = 1; #[doc = "2x2 anti-aliasing"] #[doc = ""] + pub const GX_TRANSFER_SCALE_XY: GX_TRANSFER_SCALE = 2; #[doc = "Anti-aliasing modes"] -#[doc = ""] #[doc = "Please remember that the framebuffer is sideways."] #[doc = "Hence if you activate 2x1 anti-aliasing the destination dimensions are w = 240*2 and h = 400"] #[doc = ""] + pub type GX_TRANSFER_SCALE = ::libc::c_uint; #[doc = "Trigger the PPF event"] #[doc = ""] + pub const GX_FILL_TRIGGER: GX_FILL_CONTROL = 1; #[doc = "Indicates if the memory fill is complete. You should not use it when requesting a transfer."] #[doc = ""] + pub const GX_FILL_FINISHED: GX_FILL_CONTROL = 2; #[doc = "The buffer has a 16 bit per pixel depth"] #[doc = ""] + pub const GX_FILL_16BIT_DEPTH: GX_FILL_CONTROL = 0; #[doc = "The buffer has a 24 bit per pixel depth"] #[doc = ""] + pub const GX_FILL_24BIT_DEPTH: GX_FILL_CONTROL = 256; #[doc = "The buffer has a 32 bit per pixel depth"] #[doc = ""] + pub const GX_FILL_32BIT_DEPTH: GX_FILL_CONTROL = 512; #[doc = "GX transfer control flags"] #[doc = ""] + pub type GX_FILL_CONTROL = ::libc::c_uint; #[doc = "GX command entry"] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub union gxCmdEntry_s { - #[doc = "Raw command data"] - #[doc = ""] +#[doc = "Raw command data"] +#[doc = ""] + pub data: [u32_; 8usize], pub __bindgen_anon_1: gxCmdEntry_s__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct gxCmdEntry_s__bindgen_ty_1 { - #[doc = "Command type"] - #[doc = ""] +#[doc = "Command type"] +#[doc = ""] + pub type_: u8_, pub unk1: u8_, pub unk2: u8_, pub unk3: u8_, - #[doc = "Command arguments"] - #[doc = ""] +#[doc = "Command arguments"] +#[doc = ""] + pub args: [u32_; 7usize], } impl Default for gxCmdEntry_s { @@ -25389,29 +25605,37 @@ impl Default for gxCmdEntry_s { } #[doc = "GX command queue structure"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_gxCmdQueue_s { - #[doc = "Pointer to array of GX command entries"] - #[doc = ""] +#[doc = "Pointer to array of GX command entries"] +#[doc = ""] + pub entries: *mut gxCmdEntry_s, - #[doc = "Capacity of the command array"] - #[doc = ""] +#[doc = "Capacity of the command array"] +#[doc = ""] + pub maxEntries: u16_, - #[doc = "Number of commands in the queue"] - #[doc = ""] +#[doc = "Number of commands in the queue"] +#[doc = ""] + pub numEntries: u16_, - #[doc = "Index of the first pending command to be submitted to GX"] - #[doc = ""] +#[doc = "Index of the first pending command to be submitted to GX"] +#[doc = ""] + pub curEntry: u16_, - #[doc = "Number of commands completed by GX"] - #[doc = ""] +#[doc = "Number of commands completed by GX"] +#[doc = ""] + pub lastEntry: u16_, - #[doc = "User callback"] - #[doc = ""] +#[doc = "User callback"] +#[doc = ""] + pub callback: ::core::option::Option, - #[doc = "Data for user callback"] - #[doc = ""] +#[doc = "Data for user callback"] +#[doc = ""] + pub user: *mut ::libc::c_void, } impl Default for tag_gxCmdQueue_s { @@ -25426,106 +25650,96 @@ impl Default for tag_gxCmdQueue_s { #[doc = "GX command queue structure"] #[doc = ""] + pub type gxCmdQueue_s = tag_gxCmdQueue_s; extern "C" { - #[doc = "Clears a GX command queue."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `queue` - The GX command queue."] - #[doc = ""] +#[doc = "Clears a GX command queue."] +#[doc = "# Arguments"] +#[doc = "`queue` - The GX command queue."] +#[doc = ""] + pub fn gxCmdQueueClear(queue: *mut gxCmdQueue_s); } extern "C" { - #[doc = "Adds a command to a GX command queue."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `queue` - The GX command queue."] - #[doc = "* `entry` - The GX command to add."] - #[doc = ""] +#[doc = "Adds a command to a GX command queue."] +#[doc = "# Arguments"] +#[doc = "`queue` - The GX command queue."] +#[doc = "`entry` - The GX command to add."] +#[doc = ""] + pub fn gxCmdQueueAdd(queue: *mut gxCmdQueue_s, entry: *const gxCmdEntry_s); } extern "C" { - #[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `queue` - The GX command queue."] - #[doc = ""] +#[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] +#[doc = "# Arguments"] +#[doc = "`queue` - The GX command queue."] +#[doc = ""] + pub fn gxCmdQueueRun(queue: *mut gxCmdQueue_s); } extern "C" { - #[doc = "Stops a GX command queue from processing incoming commands."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `queue` - The GX command queue."] - #[doc = ""] +#[doc = "Stops a GX command queue from processing incoming commands."] +#[doc = "# Arguments"] +#[doc = "`queue` - The GX command queue."] +#[doc = ""] + pub fn gxCmdQueueStop(queue: *mut gxCmdQueue_s); } extern "C" { - #[doc = "Waits for a GX command queue to finish executing pending commands."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* false if timeout expired, true otherwise."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `queue` - The GX command queue."] - #[doc = "* `timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] - #[doc = ""] +#[doc = "Waits for a GX command queue to finish executing pending commands."] +#[doc = "Returns:"] +#[doc = "false if timeout expired, true otherwise."] +#[doc = "# Arguments"] +#[doc = "`queue` - The GX command queue."] +#[doc = "`timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] +#[doc = ""] + pub fn gxCmdQueueWait(queue: *mut gxCmdQueue_s, timeout: s64) -> bool; } extern "C" { - #[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] - #[doc = ""] +#[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] +#[doc = "# Arguments"] +#[doc = "`queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] +#[doc = ""] + pub fn GX_BindQueue(queue: *mut gxCmdQueue_s); } extern "C" { #[must_use] - #[doc = "Requests a DMA."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `src` - Source to DMA from."] - #[doc = "* `dst` - Destination to DMA to."] - #[doc = "* `length` - Length of data to transfer."] - #[doc = ""] +#[doc = "Requests a DMA."] +#[doc = "# Arguments"] +#[doc = "`src` - Source to DMA from."] +#[doc = "`dst` - Destination to DMA to."] +#[doc = "`length` - Length of data to transfer."] +#[doc = ""] + pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result; } extern "C" { #[must_use] - #[doc = "Processes a GPU command list."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf0a` - Command list address."] - #[doc = "* `buf0s` - Command list size."] - #[doc = "* `flags` - Flags to process with."] - #[doc = ""] +#[doc = "Processes a GPU command list."] +#[doc = "# Arguments"] +#[doc = "`buf0a` - Command list address."] +#[doc = "`buf0s` - Command list size."] +#[doc = "`flags` - Flags to process with."] +#[doc = ""] + pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Fills the memory of two buffers with the given values."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf0a` - Start address of the first buffer."] - #[doc = "* `buf0v` - Dimensions of the first buffer."] - #[doc = "* `buf0e` - End address of the first buffer."] - #[doc = "* `control0` - Value to fill the first buffer with."] - #[doc = "* `buf1a` - Start address of the second buffer."] - #[doc = "* `buf1v` - Dimensions of the second buffer."] - #[doc = "* `buf1e` - End address of the second buffer."] - #[doc = "* `control1` - Value to fill the second buffer with."] - #[doc = ""] +#[doc = "Fills the memory of two buffers with the given values."] +#[doc = "# Arguments"] +#[doc = "`buf0a` - Start address of the first buffer."] +#[doc = "`buf0v` - Dimensions of the first buffer."] +#[doc = "`buf0e` - End address of the first buffer."] +#[doc = "`control0` - Value to fill the first buffer with."] +#[doc = "`buf1a` - Start address of the second buffer."] +#[doc = "`buf1v` - Dimensions of the second buffer."] +#[doc = "`buf1e` - End address of the second buffer."] +#[doc = "`control1` - Value to fill the second buffer with."] +#[doc = ""] + pub fn GX_MemoryFill( buf0a: *mut u32_, buf0v: u32_, @@ -25539,20 +25753,17 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initiates a display transfer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inadr` - Address of the input."] - #[doc = "* `indim` - Dimensions of the input."] - #[doc = "* `outadr` - Address of the output."] - #[doc = "* `outdim` - Dimensions of the output."] - #[doc = "* `flags` - Flags to transfer with."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The PPF event will be signaled on completion."] - #[doc = ""] +#[doc = "Initiates a display transfer."] +#[doc = "# Arguments"] +#[doc = "`inadr` - Address of the input."] +#[doc = "`indim` - Dimensions of the input."] +#[doc = "`outadr` - Address of the output."] +#[doc = "`outdim` - Dimensions of the output."] +#[doc = "`flags` - Flags to transfer with."] +#[doc = "# Notes"] +#[doc = "The PPF event will be signaled on completion."] +#[doc = ""] + pub fn GX_DisplayTransfer( inadr: *mut u32_, indim: u32_, @@ -25563,21 +25774,18 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initiates a texture copy."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `inadr` - Address of the input."] - #[doc = "* `indim` - Dimensions of the input."] - #[doc = "* `outadr` - Address of the output."] - #[doc = "* `outdim` - Dimensions of the output."] - #[doc = "* `size` - Size of the data to transfer."] - #[doc = "* `flags` - Flags to transfer with."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The PPF event will be signaled on completion."] - #[doc = ""] +#[doc = "Initiates a texture copy."] +#[doc = "# Arguments"] +#[doc = "`inadr` - Address of the input."] +#[doc = "`indim` - Dimensions of the input."] +#[doc = "`outadr` - Address of the output."] +#[doc = "`outdim` - Dimensions of the output."] +#[doc = "`size` - Size of the data to transfer."] +#[doc = "`flags` - Flags to transfer with."] +#[doc = "# Notes"] +#[doc = "The PPF event will be signaled on completion."] +#[doc = ""] + pub fn GX_TextureCopy( inadr: *mut u32_, indim: u32_, @@ -25589,17 +25797,16 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `buf0a` - Address of the first buffer."] - #[doc = "* `buf0s` - Size of the first buffer."] - #[doc = "* `buf1a` - Address of the second buffer."] - #[doc = "* `buf1s` - Size of the second buffer."] - #[doc = "* `buf2a` - Address of the third buffer."] - #[doc = "* `buf2s` - Size of the third buffer."] - #[doc = ""] +#[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] +#[doc = "# Arguments"] +#[doc = "`buf0a` - Address of the first buffer."] +#[doc = "`buf0s` - Size of the first buffer."] +#[doc = "`buf1a` - Address of the second buffer."] +#[doc = "`buf1s` - Size of the second buffer."] +#[doc = "`buf2a` - Address of the third buffer."] +#[doc = "`buf2s` - Size of the third buffer."] +#[doc = ""] + pub fn GX_FlushCacheRegions( buf0a: *mut u32_, buf0s: u32_, @@ -25612,1333 +25819,1630 @@ extern "C" { #[doc = "Nearest-neighbor interpolation."] #[doc = ""] + pub const GPU_NEAREST: GPU_TEXTURE_FILTER_PARAM = 0; #[doc = "Linear interpolation."] #[doc = ""] + pub const GPU_LINEAR: GPU_TEXTURE_FILTER_PARAM = 1; #[doc = "Texture filters."] #[doc = ""] + pub type GPU_TEXTURE_FILTER_PARAM = ::libc::c_uint; #[doc = "Clamps to edge."] #[doc = ""] + pub const GPU_CLAMP_TO_EDGE: GPU_TEXTURE_WRAP_PARAM = 0; #[doc = "Clamps to border."] #[doc = ""] + pub const GPU_CLAMP_TO_BORDER: GPU_TEXTURE_WRAP_PARAM = 1; #[doc = "Repeats texture."] #[doc = ""] + pub const GPU_REPEAT: GPU_TEXTURE_WRAP_PARAM = 2; #[doc = "Repeats with mirrored texture."] #[doc = ""] + pub const GPU_MIRRORED_REPEAT: GPU_TEXTURE_WRAP_PARAM = 3; #[doc = "Texture wrap modes."] #[doc = ""] + pub type GPU_TEXTURE_WRAP_PARAM = ::libc::c_uint; #[doc = "2D texture"] #[doc = ""] + pub const GPU_TEX_2D: GPU_TEXTURE_MODE_PARAM = 0; #[doc = "Cube map"] #[doc = ""] + pub const GPU_TEX_CUBE_MAP: GPU_TEXTURE_MODE_PARAM = 1; #[doc = "2D Shadow texture"] #[doc = ""] + pub const GPU_TEX_SHADOW_2D: GPU_TEXTURE_MODE_PARAM = 2; #[doc = "Projection texture"] #[doc = ""] + pub const GPU_TEX_PROJECTION: GPU_TEXTURE_MODE_PARAM = 3; #[doc = "Shadow cube map"] #[doc = ""] + pub const GPU_TEX_SHADOW_CUBE: GPU_TEXTURE_MODE_PARAM = 4; #[doc = "Disabled"] #[doc = ""] + pub const GPU_TEX_DISABLED: GPU_TEXTURE_MODE_PARAM = 5; #[doc = "Texture modes."] #[doc = ""] + pub type GPU_TEXTURE_MODE_PARAM = ::libc::c_uint; #[doc = "Texture unit 0."] #[doc = ""] + pub const GPU_TEXUNIT0: GPU_TEXUNIT = 1; #[doc = "Texture unit 1."] #[doc = ""] + pub const GPU_TEXUNIT1: GPU_TEXUNIT = 2; #[doc = "Texture unit 2."] #[doc = ""] + pub const GPU_TEXUNIT2: GPU_TEXUNIT = 4; #[doc = "Supported texture units."] #[doc = ""] + pub type GPU_TEXUNIT = ::libc::c_uint; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] #[doc = ""] + pub const GPU_RGBA8: GPU_TEXCOLOR = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] #[doc = ""] + pub const GPU_RGB8: GPU_TEXCOLOR = 1; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] #[doc = ""] + pub const GPU_RGBA5551: GPU_TEXCOLOR = 2; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] #[doc = ""] + pub const GPU_RGB565: GPU_TEXCOLOR = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] #[doc = ""] + pub const GPU_RGBA4: GPU_TEXCOLOR = 4; #[doc = "8-bit Luminance + 8-bit Alpha"] #[doc = ""] + pub const GPU_LA8: GPU_TEXCOLOR = 5; #[doc = "8-bit Hi + 8-bit Lo"] #[doc = ""] + pub const GPU_HILO8: GPU_TEXCOLOR = 6; #[doc = "8-bit Luminance"] #[doc = ""] + pub const GPU_L8: GPU_TEXCOLOR = 7; #[doc = "8-bit Alpha"] #[doc = ""] + pub const GPU_A8: GPU_TEXCOLOR = 8; #[doc = "4-bit Luminance + 4-bit Alpha"] #[doc = ""] + pub const GPU_LA4: GPU_TEXCOLOR = 9; #[doc = "4-bit Luminance"] #[doc = ""] + pub const GPU_L4: GPU_TEXCOLOR = 10; #[doc = "4-bit Alpha"] #[doc = ""] + pub const GPU_A4: GPU_TEXCOLOR = 11; #[doc = "ETC1 texture compression"] #[doc = ""] + pub const GPU_ETC1: GPU_TEXCOLOR = 12; #[doc = "ETC1 texture compression + 4-bit Alpha"] #[doc = ""] + pub const GPU_ETC1A4: GPU_TEXCOLOR = 13; #[doc = "Supported texture formats."] #[doc = ""] + pub type GPU_TEXCOLOR = ::libc::c_uint; #[doc = "2D face"] #[doc = ""] + pub const GPU_TEXFACE_2D: GPU_TEXFACE = 0; #[doc = "+X face"] #[doc = ""] + pub const GPU_POSITIVE_X: GPU_TEXFACE = 0; #[doc = "-X face"] #[doc = ""] + pub const GPU_NEGATIVE_X: GPU_TEXFACE = 1; #[doc = "+Y face"] #[doc = ""] + pub const GPU_POSITIVE_Y: GPU_TEXFACE = 2; #[doc = "-Y face"] #[doc = ""] + pub const GPU_NEGATIVE_Y: GPU_TEXFACE = 3; #[doc = "+Z face"] #[doc = ""] + pub const GPU_POSITIVE_Z: GPU_TEXFACE = 4; #[doc = "-Z face"] #[doc = ""] + pub const GPU_NEGATIVE_Z: GPU_TEXFACE = 5; #[doc = "Texture faces."] #[doc = ""] + pub type GPU_TEXFACE = ::libc::c_uint; #[doc = "Clamp to zero."] #[doc = ""] + pub const GPU_PT_CLAMP_TO_ZERO: GPU_PROCTEX_CLAMP = 0; #[doc = "Clamp to edge."] #[doc = ""] + pub const GPU_PT_CLAMP_TO_EDGE: GPU_PROCTEX_CLAMP = 1; #[doc = "Symmetrical repeat."] #[doc = ""] + pub const GPU_PT_REPEAT: GPU_PROCTEX_CLAMP = 2; #[doc = "Mirrored repeat."] #[doc = ""] + pub const GPU_PT_MIRRORED_REPEAT: GPU_PROCTEX_CLAMP = 3; #[doc = "Pulse."] #[doc = ""] + pub const GPU_PT_PULSE: GPU_PROCTEX_CLAMP = 4; #[doc = "Procedural texture clamp modes."] #[doc = ""] + pub type GPU_PROCTEX_CLAMP = ::libc::c_uint; #[doc = "U"] #[doc = ""] + pub const GPU_PT_U: GPU_PROCTEX_MAPFUNC = 0; #[doc = "U2"] #[doc = ""] + pub const GPU_PT_U2: GPU_PROCTEX_MAPFUNC = 1; #[doc = "V"] #[doc = ""] + pub const GPU_PT_V: GPU_PROCTEX_MAPFUNC = 2; #[doc = "V2"] #[doc = ""] + pub const GPU_PT_V2: GPU_PROCTEX_MAPFUNC = 3; #[doc = "U+V"] #[doc = ""] + pub const GPU_PT_ADD: GPU_PROCTEX_MAPFUNC = 4; #[doc = "U2+V2"] #[doc = ""] + pub const GPU_PT_ADD2: GPU_PROCTEX_MAPFUNC = 5; #[doc = "sqrt(U2+V2)"] #[doc = ""] + pub const GPU_PT_SQRT2: GPU_PROCTEX_MAPFUNC = 6; #[doc = "min"] #[doc = ""] + pub const GPU_PT_MIN: GPU_PROCTEX_MAPFUNC = 7; #[doc = "max"] #[doc = ""] + pub const GPU_PT_MAX: GPU_PROCTEX_MAPFUNC = 8; #[doc = "rmax"] #[doc = ""] + pub const GPU_PT_RMAX: GPU_PROCTEX_MAPFUNC = 9; #[doc = "Procedural texture mapping functions."] #[doc = ""] + pub type GPU_PROCTEX_MAPFUNC = ::libc::c_uint; #[doc = "No shift."] #[doc = ""] + pub const GPU_PT_NONE: GPU_PROCTEX_SHIFT = 0; #[doc = "Odd shift."] #[doc = ""] + pub const GPU_PT_ODD: GPU_PROCTEX_SHIFT = 1; #[doc = "Even shift."] #[doc = ""] + pub const GPU_PT_EVEN: GPU_PROCTEX_SHIFT = 2; #[doc = "Procedural texture shift values."] #[doc = ""] + pub type GPU_PROCTEX_SHIFT = ::libc::c_uint; #[doc = "Nearest-neighbor"] #[doc = ""] + pub const GPU_PT_NEAREST: GPU_PROCTEX_FILTER = 0; #[doc = "Linear interpolation"] #[doc = ""] + pub const GPU_PT_LINEAR: GPU_PROCTEX_FILTER = 1; #[doc = "Nearest-neighbor with mipmap using nearest-neighbor"] #[doc = ""] + pub const GPU_PT_NEAREST_MIP_NEAREST: GPU_PROCTEX_FILTER = 2; #[doc = "Linear interpolation with mipmap using nearest-neighbor"] #[doc = ""] + pub const GPU_PT_LINEAR_MIP_NEAREST: GPU_PROCTEX_FILTER = 3; #[doc = "Nearest-neighbor with mipmap using linear interpolation"] #[doc = ""] + pub const GPU_PT_NEAREST_MIP_LINEAR: GPU_PROCTEX_FILTER = 4; #[doc = "Linear interpolation with mipmap using linear interpolation"] #[doc = ""] + pub const GPU_PT_LINEAR_MIP_LINEAR: GPU_PROCTEX_FILTER = 5; #[doc = "Procedural texture filter values."] #[doc = ""] + pub type GPU_PROCTEX_FILTER = ::libc::c_uint; #[doc = "Noise table"] #[doc = ""] + pub const GPU_LUT_NOISE: GPU_PROCTEX_LUTID = 0; #[doc = "RGB mapping function table"] #[doc = ""] + pub const GPU_LUT_RGBMAP: GPU_PROCTEX_LUTID = 2; #[doc = "Alpha mapping function table"] #[doc = ""] + pub const GPU_LUT_ALPHAMAP: GPU_PROCTEX_LUTID = 3; #[doc = "Color table"] #[doc = ""] + pub const GPU_LUT_COLOR: GPU_PROCTEX_LUTID = 4; #[doc = "Color difference table"] #[doc = ""] + pub const GPU_LUT_COLORDIF: GPU_PROCTEX_LUTID = 5; #[doc = "Procedural texture LUT IDs."] #[doc = ""] + pub type GPU_PROCTEX_LUTID = ::libc::c_uint; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] #[doc = ""] + pub const GPU_RB_RGBA8: GPU_COLORBUF = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] #[doc = ""] + pub const GPU_RB_RGB8: GPU_COLORBUF = 1; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] #[doc = ""] + pub const GPU_RB_RGBA5551: GPU_COLORBUF = 2; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] #[doc = ""] + pub const GPU_RB_RGB565: GPU_COLORBUF = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] #[doc = ""] + pub const GPU_RB_RGBA4: GPU_COLORBUF = 4; #[doc = "Supported color buffer formats."] #[doc = ""] + pub type GPU_COLORBUF = ::libc::c_uint; #[doc = "16-bit Depth"] #[doc = ""] + pub const GPU_RB_DEPTH16: GPU_DEPTHBUF = 0; #[doc = "24-bit Depth"] #[doc = ""] + pub const GPU_RB_DEPTH24: GPU_DEPTHBUF = 2; #[doc = "24-bit Depth + 8-bit Stencil"] #[doc = ""] + pub const GPU_RB_DEPTH24_STENCIL8: GPU_DEPTHBUF = 3; #[doc = "Supported depth buffer formats."] #[doc = ""] + pub type GPU_DEPTHBUF = ::libc::c_uint; #[doc = "Never pass."] #[doc = ""] + pub const GPU_NEVER: GPU_TESTFUNC = 0; #[doc = "Always pass."] #[doc = ""] + pub const GPU_ALWAYS: GPU_TESTFUNC = 1; #[doc = "Pass if equal."] #[doc = ""] + pub const GPU_EQUAL: GPU_TESTFUNC = 2; #[doc = "Pass if not equal."] #[doc = ""] + pub const GPU_NOTEQUAL: GPU_TESTFUNC = 3; #[doc = "Pass if less than."] #[doc = ""] + pub const GPU_LESS: GPU_TESTFUNC = 4; #[doc = "Pass if less than or equal."] #[doc = ""] + pub const GPU_LEQUAL: GPU_TESTFUNC = 5; #[doc = "Pass if greater than."] #[doc = ""] + pub const GPU_GREATER: GPU_TESTFUNC = 6; #[doc = "Pass if greater than or equal."] #[doc = ""] + pub const GPU_GEQUAL: GPU_TESTFUNC = 7; #[doc = "Test functions."] #[doc = ""] + pub type GPU_TESTFUNC = ::libc::c_uint; #[doc = "Pass if greater than or equal."] #[doc = ""] + pub const GPU_EARLYDEPTH_GEQUAL: GPU_EARLYDEPTHFUNC = 0; #[doc = "Pass if greater than."] #[doc = ""] + pub const GPU_EARLYDEPTH_GREATER: GPU_EARLYDEPTHFUNC = 1; #[doc = "Pass if less than or equal."] #[doc = ""] + pub const GPU_EARLYDEPTH_LEQUAL: GPU_EARLYDEPTHFUNC = 2; #[doc = "Pass if less than."] #[doc = ""] + pub const GPU_EARLYDEPTH_LESS: GPU_EARLYDEPTHFUNC = 3; #[doc = "Early depth test functions."] #[doc = ""] + pub type GPU_EARLYDEPTHFUNC = ::libc::c_uint; #[doc = "Never pass (0)."] #[doc = ""] + pub const GPU_GAS_NEVER: GPU_GASDEPTHFUNC = 0; #[doc = "Always pass (1)."] #[doc = ""] + pub const GPU_GAS_ALWAYS: GPU_GASDEPTHFUNC = 1; #[doc = "Pass if greater than (1-X)."] #[doc = ""] + pub const GPU_GAS_GREATER: GPU_GASDEPTHFUNC = 2; #[doc = "Pass if less than (X)."] #[doc = ""] + pub const GPU_GAS_LESS: GPU_GASDEPTHFUNC = 3; #[doc = "Gas depth functions."] #[doc = ""] + pub type GPU_GASDEPTHFUNC = ::libc::c_uint; #[doc = "Disable."] #[doc = ""] + pub const GPU_SCISSOR_DISABLE: GPU_SCISSORMODE = 0; #[doc = "Exclude pixels inside the scissor box."] #[doc = ""] + pub const GPU_SCISSOR_INVERT: GPU_SCISSORMODE = 1; #[doc = "Exclude pixels outside of the scissor box."] #[doc = ""] + pub const GPU_SCISSOR_NORMAL: GPU_SCISSORMODE = 3; #[doc = "Scissor test modes."] #[doc = ""] + pub type GPU_SCISSORMODE = ::libc::c_uint; #[doc = "Keep old value. (old_stencil)"] #[doc = ""] + pub const GPU_STENCIL_KEEP: GPU_STENCILOP = 0; #[doc = "Zero. (0)"] #[doc = ""] + pub const GPU_STENCIL_ZERO: GPU_STENCILOP = 1; #[doc = "Replace value. (ref)"] #[doc = ""] + pub const GPU_STENCIL_REPLACE: GPU_STENCILOP = 2; #[doc = "Increment value. (old_stencil + 1 saturated to [0, 255])"] #[doc = ""] + pub const GPU_STENCIL_INCR: GPU_STENCILOP = 3; #[doc = "Decrement value. (old_stencil - 1 saturated to [0, 255])"] #[doc = ""] + pub const GPU_STENCIL_DECR: GPU_STENCILOP = 4; #[doc = "Invert value. (~old_stencil)"] #[doc = ""] + pub const GPU_STENCIL_INVERT: GPU_STENCILOP = 5; #[doc = "Increment value. (old_stencil + 1)"] #[doc = ""] + pub const GPU_STENCIL_INCR_WRAP: GPU_STENCILOP = 6; #[doc = "Decrement value. (old_stencil - 1)"] #[doc = ""] + pub const GPU_STENCIL_DECR_WRAP: GPU_STENCILOP = 7; #[doc = "Stencil operations."] #[doc = ""] + pub type GPU_STENCILOP = ::libc::c_uint; #[doc = "Write red."] #[doc = ""] + pub const GPU_WRITE_RED: GPU_WRITEMASK = 1; #[doc = "Write green."] #[doc = ""] + pub const GPU_WRITE_GREEN: GPU_WRITEMASK = 2; #[doc = "Write blue."] #[doc = ""] + pub const GPU_WRITE_BLUE: GPU_WRITEMASK = 4; #[doc = "Write alpha."] #[doc = ""] + pub const GPU_WRITE_ALPHA: GPU_WRITEMASK = 8; #[doc = "Write depth."] #[doc = ""] + pub const GPU_WRITE_DEPTH: GPU_WRITEMASK = 16; #[doc = "Write all color components."] #[doc = ""] + pub const GPU_WRITE_COLOR: GPU_WRITEMASK = 15; #[doc = "Write all components."] #[doc = ""] + pub const GPU_WRITE_ALL: GPU_WRITEMASK = 31; #[doc = "Pixel write mask."] #[doc = ""] + pub type GPU_WRITEMASK = ::libc::c_uint; #[doc = "Add colors."] #[doc = ""] + pub const GPU_BLEND_ADD: GPU_BLENDEQUATION = 0; #[doc = "Subtract colors."] #[doc = ""] + pub const GPU_BLEND_SUBTRACT: GPU_BLENDEQUATION = 1; #[doc = "Reverse-subtract colors."] #[doc = ""] + pub const GPU_BLEND_REVERSE_SUBTRACT: GPU_BLENDEQUATION = 2; #[doc = "Use the minimum color."] #[doc = ""] + pub const GPU_BLEND_MIN: GPU_BLENDEQUATION = 3; #[doc = "Use the maximum color."] #[doc = ""] + pub const GPU_BLEND_MAX: GPU_BLENDEQUATION = 4; #[doc = "Blend modes."] #[doc = ""] + pub type GPU_BLENDEQUATION = ::libc::c_uint; #[doc = "Zero."] #[doc = ""] + pub const GPU_ZERO: GPU_BLENDFACTOR = 0; #[doc = "One."] #[doc = ""] + pub const GPU_ONE: GPU_BLENDFACTOR = 1; #[doc = "Source color."] #[doc = ""] + pub const GPU_SRC_COLOR: GPU_BLENDFACTOR = 2; #[doc = "Source color - 1."] #[doc = ""] + pub const GPU_ONE_MINUS_SRC_COLOR: GPU_BLENDFACTOR = 3; #[doc = "Destination color."] #[doc = ""] + pub const GPU_DST_COLOR: GPU_BLENDFACTOR = 4; #[doc = "Destination color - 1."] #[doc = ""] + pub const GPU_ONE_MINUS_DST_COLOR: GPU_BLENDFACTOR = 5; #[doc = "Source alpha."] #[doc = ""] + pub const GPU_SRC_ALPHA: GPU_BLENDFACTOR = 6; #[doc = "Source alpha - 1."] #[doc = ""] + pub const GPU_ONE_MINUS_SRC_ALPHA: GPU_BLENDFACTOR = 7; #[doc = "Destination alpha."] #[doc = ""] + pub const GPU_DST_ALPHA: GPU_BLENDFACTOR = 8; #[doc = "Destination alpha - 1."] #[doc = ""] + pub const GPU_ONE_MINUS_DST_ALPHA: GPU_BLENDFACTOR = 9; #[doc = "Constant color."] #[doc = ""] + pub const GPU_CONSTANT_COLOR: GPU_BLENDFACTOR = 10; #[doc = "Constant color - 1."] #[doc = ""] + pub const GPU_ONE_MINUS_CONSTANT_COLOR: GPU_BLENDFACTOR = 11; #[doc = "Constant alpha."] #[doc = ""] + pub const GPU_CONSTANT_ALPHA: GPU_BLENDFACTOR = 12; #[doc = "Constant alpha - 1."] #[doc = ""] + pub const GPU_ONE_MINUS_CONSTANT_ALPHA: GPU_BLENDFACTOR = 13; #[doc = "Saturated alpha."] #[doc = ""] + pub const GPU_SRC_ALPHA_SATURATE: GPU_BLENDFACTOR = 14; #[doc = "Blend factors."] #[doc = ""] + pub type GPU_BLENDFACTOR = ::libc::c_uint; #[doc = "Clear."] #[doc = ""] + pub const GPU_LOGICOP_CLEAR: GPU_LOGICOP = 0; #[doc = "Bitwise AND."] #[doc = ""] + pub const GPU_LOGICOP_AND: GPU_LOGICOP = 1; #[doc = "Reverse bitwise AND."] #[doc = ""] + pub const GPU_LOGICOP_AND_REVERSE: GPU_LOGICOP = 2; #[doc = "Copy."] #[doc = ""] + pub const GPU_LOGICOP_COPY: GPU_LOGICOP = 3; #[doc = "Set."] #[doc = ""] + pub const GPU_LOGICOP_SET: GPU_LOGICOP = 4; #[doc = "Inverted copy."] #[doc = ""] + pub const GPU_LOGICOP_COPY_INVERTED: GPU_LOGICOP = 5; #[doc = "No operation."] #[doc = ""] + pub const GPU_LOGICOP_NOOP: GPU_LOGICOP = 6; #[doc = "Invert."] #[doc = ""] + pub const GPU_LOGICOP_INVERT: GPU_LOGICOP = 7; #[doc = "Bitwise NAND."] #[doc = ""] + pub const GPU_LOGICOP_NAND: GPU_LOGICOP = 8; #[doc = "Bitwise OR."] #[doc = ""] + pub const GPU_LOGICOP_OR: GPU_LOGICOP = 9; #[doc = "Bitwise NOR."] #[doc = ""] + pub const GPU_LOGICOP_NOR: GPU_LOGICOP = 10; #[doc = "Bitwise XOR."] #[doc = ""] + pub const GPU_LOGICOP_XOR: GPU_LOGICOP = 11; #[doc = "Equivalent."] #[doc = ""] + pub const GPU_LOGICOP_EQUIV: GPU_LOGICOP = 12; #[doc = "Inverted bitwise AND."] #[doc = ""] + pub const GPU_LOGICOP_AND_INVERTED: GPU_LOGICOP = 13; #[doc = "Reverse bitwise OR."] #[doc = ""] + pub const GPU_LOGICOP_OR_REVERSE: GPU_LOGICOP = 14; #[doc = "Inverted bitwize OR."] #[doc = ""] + pub const GPU_LOGICOP_OR_INVERTED: GPU_LOGICOP = 15; #[doc = "Logical operations."] #[doc = ""] + pub type GPU_LOGICOP = ::libc::c_uint; #[doc = "OpenGL mode."] #[doc = ""] + pub const GPU_FRAGOPMODE_GL: GPU_FRAGOPMODE = 0; #[doc = "Gas mode (?)."] #[doc = ""] + pub const GPU_FRAGOPMODE_GAS_ACC: GPU_FRAGOPMODE = 1; #[doc = "Shadow mode (?)."] #[doc = ""] + pub const GPU_FRAGOPMODE_SHADOW: GPU_FRAGOPMODE = 3; #[doc = "Fragment operation modes."] #[doc = ""] + pub type GPU_FRAGOPMODE = ::libc::c_uint; #[doc = "8-bit byte."] #[doc = ""] + pub const GPU_BYTE: GPU_FORMATS = 0; #[doc = "8-bit unsigned byte."] #[doc = ""] + pub const GPU_UNSIGNED_BYTE: GPU_FORMATS = 1; #[doc = "16-bit short."] #[doc = ""] + pub const GPU_SHORT: GPU_FORMATS = 2; #[doc = "32-bit float."] #[doc = ""] + pub const GPU_FLOAT: GPU_FORMATS = 3; #[doc = "Supported component formats."] #[doc = ""] + pub type GPU_FORMATS = ::libc::c_uint; #[doc = "Disabled."] #[doc = ""] + pub const GPU_CULL_NONE: GPU_CULLMODE = 0; #[doc = "Front, counter-clockwise."] #[doc = ""] + pub const GPU_CULL_FRONT_CCW: GPU_CULLMODE = 1; #[doc = "Back, counter-clockwise."] #[doc = ""] + pub const GPU_CULL_BACK_CCW: GPU_CULLMODE = 2; #[doc = "Cull modes."] #[doc = ""] + pub type GPU_CULLMODE = ::libc::c_uint; #[doc = "Primary color."] #[doc = ""] + pub const GPU_PRIMARY_COLOR: GPU_TEVSRC = 0; #[doc = "Primary fragment color."] #[doc = ""] + pub const GPU_FRAGMENT_PRIMARY_COLOR: GPU_TEVSRC = 1; #[doc = "Secondary fragment color."] #[doc = ""] + pub const GPU_FRAGMENT_SECONDARY_COLOR: GPU_TEVSRC = 2; #[doc = "Texture unit 0."] #[doc = ""] + pub const GPU_TEXTURE0: GPU_TEVSRC = 3; #[doc = "Texture unit 1."] #[doc = ""] + pub const GPU_TEXTURE1: GPU_TEVSRC = 4; #[doc = "Texture unit 2."] #[doc = ""] + pub const GPU_TEXTURE2: GPU_TEVSRC = 5; #[doc = "Texture unit 3."] #[doc = ""] + pub const GPU_TEXTURE3: GPU_TEVSRC = 6; #[doc = "Previous buffer."] #[doc = ""] + pub const GPU_PREVIOUS_BUFFER: GPU_TEVSRC = 13; #[doc = "Constant value."] #[doc = ""] + pub const GPU_CONSTANT: GPU_TEVSRC = 14; #[doc = "Previous value."] #[doc = ""] + pub const GPU_PREVIOUS: GPU_TEVSRC = 15; #[doc = "Texture combiner sources."] #[doc = ""] + pub type GPU_TEVSRC = ::libc::c_uint; #[doc = "Source color."] #[doc = ""] + pub const GPU_TEVOP_RGB_SRC_COLOR: GPU_TEVOP_RGB = 0; #[doc = "Source color - 1."] #[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR: GPU_TEVOP_RGB = 1; #[doc = "Source alpha."] #[doc = ""] + pub const GPU_TEVOP_RGB_SRC_ALPHA: GPU_TEVOP_RGB = 2; #[doc = "Source alpha - 1."] #[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_RGB = 3; #[doc = "Source red."] #[doc = ""] + pub const GPU_TEVOP_RGB_SRC_R: GPU_TEVOP_RGB = 4; #[doc = "Source red - 1."] #[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_R: GPU_TEVOP_RGB = 5; #[doc = "Unknown."] #[doc = ""] + pub const GPU_TEVOP_RGB_0x06: GPU_TEVOP_RGB = 6; #[doc = "Unknown."] #[doc = ""] + pub const GPU_TEVOP_RGB_0x07: GPU_TEVOP_RGB = 7; #[doc = "Source green."] #[doc = ""] + pub const GPU_TEVOP_RGB_SRC_G: GPU_TEVOP_RGB = 8; #[doc = "Source green - 1."] #[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_G: GPU_TEVOP_RGB = 9; #[doc = "Unknown."] #[doc = ""] + pub const GPU_TEVOP_RGB_0x0A: GPU_TEVOP_RGB = 10; #[doc = "Unknown."] #[doc = ""] + pub const GPU_TEVOP_RGB_0x0B: GPU_TEVOP_RGB = 11; #[doc = "Source blue."] #[doc = ""] + pub const GPU_TEVOP_RGB_SRC_B: GPU_TEVOP_RGB = 12; #[doc = "Source blue - 1."] #[doc = ""] + pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_B: GPU_TEVOP_RGB = 13; #[doc = "Unknown."] #[doc = ""] + pub const GPU_TEVOP_RGB_0x0E: GPU_TEVOP_RGB = 14; #[doc = "Unknown."] #[doc = ""] + pub const GPU_TEVOP_RGB_0x0F: GPU_TEVOP_RGB = 15; #[doc = "Texture RGB combiner operands."] #[doc = ""] + pub type GPU_TEVOP_RGB = ::libc::c_uint; #[doc = "Source alpha."] #[doc = ""] + pub const GPU_TEVOP_A_SRC_ALPHA: GPU_TEVOP_A = 0; #[doc = "Source alpha - 1."] #[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_A = 1; #[doc = "Source red."] #[doc = ""] + pub const GPU_TEVOP_A_SRC_R: GPU_TEVOP_A = 2; #[doc = "Source red - 1."] #[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_R: GPU_TEVOP_A = 3; #[doc = "Source green."] #[doc = ""] + pub const GPU_TEVOP_A_SRC_G: GPU_TEVOP_A = 4; #[doc = "Source green - 1."] #[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_G: GPU_TEVOP_A = 5; #[doc = "Source blue."] #[doc = ""] + pub const GPU_TEVOP_A_SRC_B: GPU_TEVOP_A = 6; #[doc = "Source blue - 1."] #[doc = ""] + pub const GPU_TEVOP_A_ONE_MINUS_SRC_B: GPU_TEVOP_A = 7; #[doc = "Texture Alpha combiner operands."] #[doc = ""] + pub type GPU_TEVOP_A = ::libc::c_uint; #[doc = "Replace."] #[doc = ""] + pub const GPU_REPLACE: GPU_COMBINEFUNC = 0; #[doc = "Modulate."] #[doc = ""] + pub const GPU_MODULATE: GPU_COMBINEFUNC = 1; #[doc = "Add."] #[doc = ""] + pub const GPU_ADD: GPU_COMBINEFUNC = 2; #[doc = "Signed add."] #[doc = ""] + pub const GPU_ADD_SIGNED: GPU_COMBINEFUNC = 3; #[doc = "Interpolate."] #[doc = ""] + pub const GPU_INTERPOLATE: GPU_COMBINEFUNC = 4; #[doc = "Subtract."] #[doc = ""] + pub const GPU_SUBTRACT: GPU_COMBINEFUNC = 5; #[doc = "Dot3. RGB only."] #[doc = ""] + pub const GPU_DOT3_RGB: GPU_COMBINEFUNC = 6; #[doc = "Multiply then add."] #[doc = ""] + pub const GPU_MULTIPLY_ADD: GPU_COMBINEFUNC = 8; #[doc = "Add then multiply."] #[doc = ""] + pub const GPU_ADD_MULTIPLY: GPU_COMBINEFUNC = 9; #[doc = "Texture combiner functions."] #[doc = ""] + pub type GPU_COMBINEFUNC = ::libc::c_uint; #[doc = "1x"] #[doc = ""] + pub const GPU_TEVSCALE_1: GPU_TEVSCALE = 0; #[doc = "2x"] #[doc = ""] + pub const GPU_TEVSCALE_2: GPU_TEVSCALE = 1; #[doc = "4x"] #[doc = ""] + pub const GPU_TEVSCALE_4: GPU_TEVSCALE = 2; #[doc = "Texture scale factors."] #[doc = ""] + pub type GPU_TEVSCALE = ::libc::c_uint; #[doc = "None."] #[doc = ""] + pub const GPU_NO_FRESNEL: GPU_FRESNELSEL = 0; #[doc = "Primary alpha."] #[doc = ""] + pub const GPU_PRI_ALPHA_FRESNEL: GPU_FRESNELSEL = 1; #[doc = "Secondary alpha."] #[doc = ""] + pub const GPU_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 2; #[doc = "Primary and secondary alpha."] #[doc = ""] + pub const GPU_PRI_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 3; #[doc = "Fresnel options."] #[doc = ""] + pub type GPU_FRESNELSEL = ::libc::c_uint; #[doc = "Disabled."] #[doc = ""] + pub const GPU_BUMP_NOT_USED: GPU_BUMPMODE = 0; #[doc = "Bump as bump mapping."] #[doc = ""] + pub const GPU_BUMP_AS_BUMP: GPU_BUMPMODE = 1; #[doc = "Bump as tangent/normal mapping."] #[doc = ""] + pub const GPU_BUMP_AS_TANG: GPU_BUMPMODE = 2; #[doc = "Bump map modes."] #[doc = ""] + pub type GPU_BUMPMODE = ::libc::c_uint; #[doc = "D0 LUT."] #[doc = ""] + pub const GPU_LUT_D0: GPU_LIGHTLUTID = 0; #[doc = "D1 LUT."] #[doc = ""] + pub const GPU_LUT_D1: GPU_LIGHTLUTID = 1; #[doc = "Spotlight LUT."] #[doc = ""] + pub const GPU_LUT_SP: GPU_LIGHTLUTID = 2; #[doc = "Fresnel LUT."] #[doc = ""] + pub const GPU_LUT_FR: GPU_LIGHTLUTID = 3; #[doc = "Reflection-Blue LUT."] #[doc = ""] + pub const GPU_LUT_RB: GPU_LIGHTLUTID = 4; #[doc = "Reflection-Green LUT."] #[doc = ""] + pub const GPU_LUT_RG: GPU_LIGHTLUTID = 5; #[doc = "Reflection-Red LUT."] #[doc = ""] + pub const GPU_LUT_RR: GPU_LIGHTLUTID = 6; #[doc = "Distance attenuation LUT."] #[doc = ""] + pub const GPU_LUT_DA: GPU_LIGHTLUTID = 7; #[doc = "LUT IDs."] #[doc = ""] + pub type GPU_LIGHTLUTID = ::libc::c_uint; #[doc = "Normal*HalfVector"] #[doc = ""] + pub const GPU_LUTINPUT_NH: GPU_LIGHTLUTINPUT = 0; #[doc = "View*HalfVector"] #[doc = ""] + pub const GPU_LUTINPUT_VH: GPU_LIGHTLUTINPUT = 1; #[doc = "Normal*View"] #[doc = ""] + pub const GPU_LUTINPUT_NV: GPU_LIGHTLUTINPUT = 2; #[doc = "LightVector*Normal"] #[doc = ""] + pub const GPU_LUTINPUT_LN: GPU_LIGHTLUTINPUT = 3; #[doc = "-LightVector*SpotlightVector"] #[doc = ""] + pub const GPU_LUTINPUT_SP: GPU_LIGHTLUTINPUT = 4; #[doc = "cosine of phi"] #[doc = ""] + pub const GPU_LUTINPUT_CP: GPU_LIGHTLUTINPUT = 5; #[doc = "LUT inputs."] #[doc = ""] + pub type GPU_LIGHTLUTINPUT = ::libc::c_uint; #[doc = "1x scale."] #[doc = ""] + pub const GPU_LUTSCALER_1x: GPU_LIGHTLUTSCALER = 0; #[doc = "2x scale."] #[doc = ""] + pub const GPU_LUTSCALER_2x: GPU_LIGHTLUTSCALER = 1; #[doc = "4x scale."] #[doc = ""] + pub const GPU_LUTSCALER_4x: GPU_LIGHTLUTSCALER = 2; #[doc = "8x scale."] #[doc = ""] + pub const GPU_LUTSCALER_8x: GPU_LIGHTLUTSCALER = 3; #[doc = "0.25x scale."] #[doc = ""] + pub const GPU_LUTSCALER_0_25x: GPU_LIGHTLUTSCALER = 6; #[doc = "0.5x scale."] #[doc = ""] + pub const GPU_LUTSCALER_0_5x: GPU_LIGHTLUTSCALER = 7; #[doc = "LUT scalers."] #[doc = ""] + pub type GPU_LIGHTLUTSCALER = ::libc::c_uint; #[doc = "LUTs that are common to all lights."] #[doc = ""] + pub const GPU_LUTSELECT_COMMON: GPU_LIGHTLUTSELECT = 0; #[doc = "Spotlight LUT."] #[doc = ""] + pub const GPU_LUTSELECT_SP: GPU_LIGHTLUTSELECT = 1; #[doc = "Distance attenuation LUT."] #[doc = ""] + pub const GPU_LUTSELECT_DA: GPU_LIGHTLUTSELECT = 2; #[doc = "LUT selection."] #[doc = ""] + pub type GPU_LIGHTLUTSELECT = ::libc::c_uint; #[doc = "Fog/Gas unit disabled."] #[doc = ""] + pub const GPU_NO_FOG: GPU_FOGMODE = 0; #[doc = "Fog/Gas unit configured in Fog mode."] #[doc = ""] + pub const GPU_FOG: GPU_FOGMODE = 5; #[doc = "Fog/Gas unit configured in Gas mode."] #[doc = ""] + pub const GPU_GAS: GPU_FOGMODE = 7; #[doc = "Fog modes."] #[doc = ""] + pub type GPU_FOGMODE = ::libc::c_uint; #[doc = "Plain density."] #[doc = ""] + pub const GPU_PLAIN_DENSITY: GPU_GASMODE = 0; #[doc = "Depth density."] #[doc = ""] + pub const GPU_DEPTH_DENSITY: GPU_GASMODE = 1; #[doc = "Gas shading density source values."] #[doc = ""] + pub type GPU_GASMODE = ::libc::c_uint; #[doc = "Gas density used as input."] #[doc = ""] + pub const GPU_GAS_DENSITY: GPU_GASLUTINPUT = 0; #[doc = "Light factor used as input."] #[doc = ""] + pub const GPU_GAS_LIGHT_FACTOR: GPU_GASLUTINPUT = 1; #[doc = "Gas color LUT inputs."] #[doc = ""] + pub type GPU_GASLUTINPUT = ::libc::c_uint; #[doc = "Triangles."] #[doc = ""] + pub const GPU_TRIANGLES: GPU_Primitive_t = 0; #[doc = "Triangle strip."] #[doc = ""] + pub const GPU_TRIANGLE_STRIP: GPU_Primitive_t = 256; #[doc = "Triangle fan."] #[doc = ""] + pub const GPU_TRIANGLE_FAN: GPU_Primitive_t = 512; #[doc = "Geometry shader primitive."] #[doc = ""] + pub const GPU_GEOMETRY_PRIM: GPU_Primitive_t = 768; #[doc = "Supported primitives."] #[doc = ""] + pub type GPU_Primitive_t = ::libc::c_uint; #[doc = "Vertex shader."] #[doc = ""] + pub const GPU_VERTEX_SHADER: GPU_SHADER_TYPE = 0; #[doc = "Geometry shader."] #[doc = ""] + pub const GPU_GEOMETRY_SHADER: GPU_SHADER_TYPE = 1; #[doc = "Shader types."] #[doc = ""] + pub type GPU_SHADER_TYPE = ::libc::c_uint; extern "C" { - #[doc = "GPU command buffer."] - #[doc = ""] +#[doc = "GPU command buffer."] +#[doc = ""] + pub static mut gpuCmdBuf: *mut u32_; } extern "C" { - #[doc = "GPU command buffer size."] - #[doc = ""] +#[doc = "GPU command buffer size."] +#[doc = ""] + pub static mut gpuCmdBufSize: u32_; } extern "C" { - #[doc = "GPU command buffer offset."] - #[doc = ""] +#[doc = "GPU command buffer offset."] +#[doc = ""] + pub static mut gpuCmdBufOffset: u32_; } extern "C" { - #[doc = "Adds raw GPU commands to the current command buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `cmd` - Buffer containing commands to add."] - #[doc = "* `size` - Size of the buffer."] - #[doc = ""] +#[doc = "Adds raw GPU commands to the current command buffer."] +#[doc = "# Arguments"] +#[doc = "`cmd` - Buffer containing commands to add."] +#[doc = "`size` - Size of the buffer."] +#[doc = ""] + pub fn GPUCMD_AddRawCommands(cmd: *const u32_, size: u32_); } extern "C" { - #[doc = "Adds a GPU command to the current command buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `header` - Header of the command."] - #[doc = "* `param` - Parameters of the command."] - #[doc = "* `paramlength` - Size of the parameter buffer."] - #[doc = ""] +#[doc = "Adds a GPU command to the current command buffer."] +#[doc = "# Arguments"] +#[doc = "`header` - Header of the command."] +#[doc = "`param` - Parameters of the command."] +#[doc = "`paramlength` - Size of the parameter buffer."] +#[doc = ""] + pub fn GPUCMD_Add(header: u32_, param: *const u32_, paramlength: u32_); } extern "C" { - #[doc = "Splits the current GPU command buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `addr` - Pointer to output the command buffer to."] - #[doc = "* `size` - Pointer to output the size (in words) of the command buffer to."] - #[doc = ""] +#[doc = "Splits the current GPU command buffer."] +#[doc = "# Arguments"] +#[doc = "`addr` - Pointer to output the command buffer to."] +#[doc = "`size` - Pointer to output the size (in words) of the command buffer to."] +#[doc = ""] + pub fn GPUCMD_Split(addr: *mut *mut u32_, size: *mut u32_); } extern "C" { - #[doc = "Converts a 32-bit float to a 16-bit float."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The converted float."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `f` - Float to convert."] - #[doc = ""] +#[doc = "Converts a 32-bit float to a 16-bit float."] +#[doc = "Returns:"] +#[doc = "The converted float."] +#[doc = "# Arguments"] +#[doc = "`f` - Float to convert."] +#[doc = ""] + pub fn f32tof16(f: f32) -> u32_; } extern "C" { - #[doc = "Converts a 32-bit float to a 20-bit float."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The converted float."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `f` - Float to convert."] - #[doc = ""] +#[doc = "Converts a 32-bit float to a 20-bit float."] +#[doc = "Returns:"] +#[doc = "The converted float."] +#[doc = "# Arguments"] +#[doc = "`f` - Float to convert."] +#[doc = ""] + pub fn f32tof20(f: f32) -> u32_; } extern "C" { - #[doc = "Converts a 32-bit float to a 24-bit float."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The converted float."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `f` - Float to convert."] - #[doc = ""] +#[doc = "Converts a 32-bit float to a 24-bit float."] +#[doc = "Returns:"] +#[doc = "The converted float."] +#[doc = "# Arguments"] +#[doc = "`f` - Float to convert."] +#[doc = ""] + pub fn f32tof24(f: f32) -> u32_; } extern "C" { - #[doc = "Converts a 32-bit float to a 31-bit float."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The converted float."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `f` - Float to convert."] - #[doc = ""] +#[doc = "Converts a 32-bit float to a 31-bit float."] +#[doc = "Returns:"] +#[doc = "The converted float."] +#[doc = "# Arguments"] +#[doc = "`f` - Float to convert."] +#[doc = ""] + pub fn f32tof31(f: f32) -> u32_; } #[doc = "Vertex shader."] #[doc = ""] + pub const VERTEX_SHDR: DVLE_type = 0; #[doc = "Geometry shader."] #[doc = ""] + pub const GEOMETRY_SHDR: DVLE_type = 1; #[doc = "DVLE type."] #[doc = ""] + pub type DVLE_type = ::libc::c_uint; #[doc = "Bool."] #[doc = ""] + pub const DVLE_CONST_BOOL: DVLE_constantType = 0; #[doc = "Unsigned 8-bit integer."] #[doc = ""] + pub const DVLE_CONST_u8: DVLE_constantType = 1; #[doc = "24-bit float."] #[doc = ""] + pub const DVLE_CONST_FLOAT24: DVLE_constantType = 2; #[doc = "Constant type."] #[doc = ""] + pub type DVLE_constantType = ::libc::c_uint; #[doc = "Position."] #[doc = ""] + pub const RESULT_POSITION: DVLE_outputAttribute_t = 0; #[doc = "Normal Quaternion."] #[doc = ""] + pub const RESULT_NORMALQUAT: DVLE_outputAttribute_t = 1; #[doc = "Color."] #[doc = ""] + pub const RESULT_COLOR: DVLE_outputAttribute_t = 2; #[doc = "Texture coordinate 0."] #[doc = ""] + pub const RESULT_TEXCOORD0: DVLE_outputAttribute_t = 3; #[doc = "Texture coordinate 0 W."] #[doc = ""] + pub const RESULT_TEXCOORD0W: DVLE_outputAttribute_t = 4; #[doc = "Texture coordinate 1."] #[doc = ""] + pub const RESULT_TEXCOORD1: DVLE_outputAttribute_t = 5; #[doc = "Texture coordinate 2."] #[doc = ""] + pub const RESULT_TEXCOORD2: DVLE_outputAttribute_t = 6; #[doc = "View."] #[doc = ""] + pub const RESULT_VIEW: DVLE_outputAttribute_t = 8; #[doc = "Dummy attribute (used as passthrough for geometry shader input)."] #[doc = ""] + pub const RESULT_DUMMY: DVLE_outputAttribute_t = 9; #[doc = "Output attribute."] #[doc = ""] + pub type DVLE_outputAttribute_t = ::libc::c_uint; #[doc = "Point processing mode."] #[doc = ""] + pub const GSH_POINT: DVLE_geoShaderMode = 0; #[doc = "Variable-size primitive processing mode."] #[doc = ""] + pub const GSH_VARIABLE_PRIM: DVLE_geoShaderMode = 1; #[doc = "Fixed-size primitive processing mode."] #[doc = ""] + pub const GSH_FIXED_PRIM: DVLE_geoShaderMode = 2; #[doc = "Geometry shader operation modes."] #[doc = ""] + pub type DVLE_geoShaderMode = ::libc::c_uint; #[doc = "DVLP data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLP_s { - #[doc = "Code size."] - #[doc = ""] +#[doc = "Code size."] +#[doc = ""] + pub codeSize: u32_, - #[doc = "Code data."] - #[doc = ""] +#[doc = "Code data."] +#[doc = ""] + pub codeData: *mut u32_, - #[doc = "Operand description size."] - #[doc = ""] +#[doc = "Operand description size."] +#[doc = ""] + pub opdescSize: u32_, - #[doc = "Operand description data."] - #[doc = ""] +#[doc = "Operand description data."] +#[doc = ""] + pub opcdescData: *mut u32_, } impl Default for DVLP_s { @@ -26952,116 +27456,150 @@ impl Default for DVLP_s { } #[doc = "DVLE constant entry data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_constEntry_s { - #[doc = "Constant type. See [`DVLE_constantType`]"] - #[doc = ""] +#[doc = "Constant type. See [`DVLE_constantType`]"] +#[doc = ""] + pub type_: u16_, - #[doc = "Constant ID."] - #[doc = ""] +#[doc = "Constant ID."] +#[doc = ""] + pub id: u16_, - #[doc = "Constant data."] - #[doc = ""] +#[doc = "Constant data."] +#[doc = ""] + pub data: [u32_; 4usize], } #[doc = "DVLE output entry data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_outEntry_s { - #[doc = "Output type. See [`DVLE_outputAttribute_t`]"] - #[doc = ""] +#[doc = "Output type. See [`DVLE_outputAttribute_t`]"] +#[doc = ""] + pub type_: u16_, - #[doc = "Output register ID."] - #[doc = ""] +#[doc = "Output register ID."] +#[doc = ""] + pub regID: u16_, - #[doc = "Output mask."] - #[doc = ""] +#[doc = "Output mask."] +#[doc = ""] + pub mask: u8_, - #[doc = "Unknown."] - #[doc = ""] +#[doc = "Unknown."] +#[doc = ""] + pub unk: [u8_; 3usize], } #[doc = "DVLE uniform entry data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_uniformEntry_s { - #[doc = "Symbol offset."] - #[doc = ""] +#[doc = "Symbol offset."] +#[doc = ""] + pub symbolOffset: u32_, - #[doc = "Start register."] - #[doc = ""] +#[doc = "Start register."] +#[doc = ""] + pub startReg: u16_, - #[doc = "End register."] - #[doc = ""] +#[doc = "End register."] +#[doc = ""] + pub endReg: u16_, } #[doc = "DVLE data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLE_s { - #[doc = "DVLE type."] - #[doc = ""] +#[doc = "DVLE type."] +#[doc = ""] + pub type_: DVLE_type, - #[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] - #[doc = ""] +#[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] +#[doc = ""] + pub mergeOutmaps: bool, - #[doc = "Geometry shader operation mode."] - #[doc = ""] +#[doc = "Geometry shader operation mode."] +#[doc = ""] + pub gshMode: DVLE_geoShaderMode, - #[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] - #[doc = ""] +#[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] +#[doc = ""] + pub gshFixedVtxStart: u8_, - #[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] - #[doc = ""] +#[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] +#[doc = ""] + pub gshVariableVtxNum: u8_, - #[doc = "Number of vertices in the fixed-size primitive vertex array."] - #[doc = ""] +#[doc = "Number of vertices in the fixed-size primitive vertex array."] +#[doc = ""] + pub gshFixedVtxNum: u8_, - #[doc = "Contained DVLPs."] - #[doc = ""] +#[doc = "Contained DVLPs."] +#[doc = ""] + pub dvlp: *mut DVLP_s, - #[doc = "Offset of the start of the main function."] - #[doc = ""] +#[doc = "Offset of the start of the main function."] +#[doc = ""] + pub mainOffset: u32_, - #[doc = "Offset of the end of the main function."] - #[doc = ""] +#[doc = "Offset of the end of the main function."] +#[doc = ""] + pub endmainOffset: u32_, - #[doc = "Constant table size."] - #[doc = ""] +#[doc = "Constant table size."] +#[doc = ""] + pub constTableSize: u32_, - #[doc = "Constant table data."] - #[doc = ""] +#[doc = "Constant table data."] +#[doc = ""] + pub constTableData: *mut DVLE_constEntry_s, - #[doc = "Output table size."] - #[doc = ""] +#[doc = "Output table size."] +#[doc = ""] + pub outTableSize: u32_, - #[doc = "Output table data."] - #[doc = ""] +#[doc = "Output table data."] +#[doc = ""] + pub outTableData: *mut DVLE_outEntry_s, - #[doc = "Uniform table size."] - #[doc = ""] - pub uniformTableSize: u32_, - #[doc = "Uniform table data."] - #[doc = ""] +#[doc = "Uniform table size."] +#[doc = ""] + + pub uniformTableSize: u32_, +#[doc = "Uniform table data."] +#[doc = ""] + pub uniformTableData: *mut DVLE_uniformEntry_s, - #[doc = "Symbol table data."] - #[doc = ""] +#[doc = "Symbol table data."] +#[doc = ""] + pub symbolTableData: *mut ::libc::c_char, - #[doc = "Output map mask."] - #[doc = ""] +#[doc = "Output map mask."] +#[doc = ""] + pub outmapMask: u8_, - #[doc = "Output map data."] - #[doc = ""] +#[doc = "Output map data."] +#[doc = ""] + pub outmapData: [u32_; 8usize], - #[doc = "Output map mode."] - #[doc = ""] +#[doc = "Output map mode."] +#[doc = ""] + pub outmapMode: u32_, - #[doc = "Output map attribute clock."] - #[doc = ""] +#[doc = "Output map attribute clock."] +#[doc = ""] + pub outmapClock: u32_, } impl Default for DVLE_s { @@ -27075,17 +27613,21 @@ impl Default for DVLE_s { } #[doc = "DVLB data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLB_s { - #[doc = "DVLE count."] - #[doc = ""] +#[doc = "DVLE count."] +#[doc = ""] + pub numDVLE: u32_, - #[doc = "Primary DVLP."] - #[doc = ""] +#[doc = "Primary DVLP."] +#[doc = ""] + pub DVLP: DVLP_s, - #[doc = "Contained DVLE."] - #[doc = ""] +#[doc = "Contained DVLE."] +#[doc = ""] + pub DVLE: *mut DVLE_s, } impl Default for DVLB_s { @@ -27098,88 +27640,91 @@ impl Default for DVLB_s { } } extern "C" { - #[doc = "Parses a shader binary."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The parsed shader binary."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `shbinData` - Shader binary data."] - #[doc = "* `shbinSize` - Shader binary size."] - #[doc = ""] +#[doc = "Parses a shader binary."] +#[doc = "Returns:"] +#[doc = "The parsed shader binary."] +#[doc = "# Arguments"] +#[doc = "`shbinData` - Shader binary data."] +#[doc = "`shbinSize` - Shader binary size."] +#[doc = ""] + pub fn DVLB_ParseFile(shbinData: *mut u32_, shbinSize: u32_) -> *mut DVLB_s; } extern "C" { - #[doc = "Frees shader binary data."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dvlb` - DVLB to free."] - #[doc = ""] +#[doc = "Frees shader binary data."] +#[doc = "# Arguments"] +#[doc = "`dvlb` - DVLB to free."] +#[doc = ""] + pub fn DVLB_Free(dvlb: *mut DVLB_s); } extern "C" { - #[doc = "Gets a uniform register index from a shader."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The uniform register index."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dvle` - Shader to get the register from."] - #[doc = "* `name` - Name of the register."] - #[doc = ""] +#[doc = "Gets a uniform register index from a shader."] +#[doc = "Returns:"] +#[doc = "The uniform register index."] +#[doc = "# Arguments"] +#[doc = "`dvle` - Shader to get the register from."] +#[doc = "`name` - Name of the register."] +#[doc = ""] + pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const ::libc::c_char) -> s8; } extern "C" { - #[doc = "Generates a shader output map."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `dvle` - Shader to generate an output map for."] - #[doc = ""] +#[doc = "Generates a shader output map."] +#[doc = "# Arguments"] +#[doc = "`dvle` - Shader to generate an output map for."] +#[doc = ""] + pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s); } #[doc = "24-bit float uniforms."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct float24Uniform_s { - #[doc = "Uniform ID."] - #[doc = ""] +#[doc = "Uniform ID."] +#[doc = ""] + pub id: u32_, - #[doc = "Uniform data."] - #[doc = ""] +#[doc = "Uniform data."] +#[doc = ""] + pub data: [u32_; 3usize], } #[doc = "Describes an instance of either a vertex or geometry shader."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderInstance_s { - #[doc = "Shader DVLE."] - #[doc = ""] +#[doc = "Shader DVLE."] +#[doc = ""] + pub dvle: *mut DVLE_s, - #[doc = "Boolean uniforms."] - #[doc = ""] +#[doc = "Boolean uniforms."] +#[doc = ""] + pub boolUniforms: u16_, - #[doc = "Used boolean uniform mask."] - #[doc = ""] +#[doc = "Used boolean uniform mask."] +#[doc = ""] + pub boolUniformMask: u16_, - #[doc = "Integer uniforms."] - #[doc = ""] +#[doc = "Integer uniforms."] +#[doc = ""] + pub intUniforms: [u32_; 4usize], - #[doc = "24-bit float uniforms."] - #[doc = ""] +#[doc = "24-bit float uniforms."] +#[doc = ""] + pub float24Uniforms: *mut float24Uniform_s, - #[doc = "Used integer uniform mask."] - #[doc = ""] +#[doc = "Used integer uniform mask."] +#[doc = ""] + pub intUniformMask: u8_, - #[doc = "Float uniform count."] - #[doc = ""] +#[doc = "Float uniform count."] +#[doc = ""] + pub numFloat24Uniforms: u8_, } impl Default for shaderInstance_s { @@ -27193,20 +27738,25 @@ impl Default for shaderInstance_s { } #[doc = "Describes an instance of a full shader program."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderProgram_s { - #[doc = "Vertex shader."] - #[doc = ""] +#[doc = "Vertex shader."] +#[doc = ""] + pub vertexShader: *mut shaderInstance_s, - #[doc = "Geometry shader."] - #[doc = ""] +#[doc = "Geometry shader."] +#[doc = ""] + pub geometryShader: *mut shaderInstance_s, - #[doc = "Geometry shader input permutation."] - #[doc = ""] +#[doc = "Geometry shader input permutation."] +#[doc = ""] + pub geoShaderInputPermutation: [u32_; 2usize], - #[doc = "Geometry shader input stride."] - #[doc = ""] +#[doc = "Geometry shader input stride."] +#[doc = ""] + pub geoShaderInputStride: u8_, } impl Default for shaderProgram_s { @@ -27220,35 +27770,32 @@ impl Default for shaderProgram_s { } extern "C" { #[must_use] - #[doc = "Initializes a shader instance."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `si` - Shader instance to initialize."] - #[doc = "* `dvle` - DVLE to initialize the shader instance with."] - #[doc = ""] +#[doc = "Initializes a shader instance."] +#[doc = "# Arguments"] +#[doc = "`si` - Shader instance to initialize."] +#[doc = "`dvle` - DVLE to initialize the shader instance with."] +#[doc = ""] + pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] - #[doc = "Frees a shader instance."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `si` - Shader instance to free."] - #[doc = ""] +#[doc = "Frees a shader instance."] +#[doc = "# Arguments"] +#[doc = "`si` - Shader instance to free."] +#[doc = ""] + pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { #[must_use] - #[doc = "Sets a bool uniform of a shader."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `si` - Shader instance to use."] - #[doc = "* `id` - ID of the bool uniform."] - #[doc = "* `value` - Value to set."] - #[doc = ""] +#[doc = "Sets a bool uniform of a shader."] +#[doc = "# Arguments"] +#[doc = "`si` - Shader instance to use."] +#[doc = "`id` - ID of the bool uniform."] +#[doc = "`value` - Value to set."] +#[doc = ""] + pub fn shaderInstanceSetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -27257,14 +27804,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Gets a bool uniform of a shader."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `si` - Shader instance to use."] - #[doc = "* `id` - ID of the bool uniform."] - #[doc = "* `value` - Pointer to output the value to."] - #[doc = ""] +#[doc = "Gets a bool uniform of a shader."] +#[doc = "# Arguments"] +#[doc = "`si` - Shader instance to use."] +#[doc = "`id` - ID of the bool uniform."] +#[doc = "`value` - Pointer to output the value to."] +#[doc = ""] + pub fn shaderInstanceGetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -27272,13 +27818,12 @@ extern "C" { ) -> Result; } extern "C" { - #[doc = "Gets the location of a shader's uniform."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `si` - Shader instance to use."] - #[doc = "* `name` - Name of the uniform."] - #[doc = ""] +#[doc = "Gets the location of a shader's uniform."] +#[doc = "# Arguments"] +#[doc = "`si` - Shader instance to use."] +#[doc = "`name` - Name of the uniform."] +#[doc = ""] + pub fn shaderInstanceGetUniformLocation( si: *mut shaderInstance_s, name: *const ::libc::c_char, @@ -27286,56 +27831,51 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes a shader program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sp` - Shader program to initialize."] - #[doc = ""] +#[doc = "Initializes a shader program."] +#[doc = "# Arguments"] +#[doc = "`sp` - Shader program to initialize."] +#[doc = ""] + pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] - #[doc = "Frees a shader program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sp` - Shader program to free."] - #[doc = ""] +#[doc = "Frees a shader program."] +#[doc = "# Arguments"] +#[doc = "`sp` - Shader program to free."] +#[doc = ""] + pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the vertex shader of a shader program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sp` - Shader program to use."] - #[doc = "* `dvle` - Vertex shader to set."] - #[doc = ""] +#[doc = "Sets the vertex shader of a shader program."] +#[doc = "# Arguments"] +#[doc = "`sp` - Shader program to use."] +#[doc = "`dvle` - Vertex shader to set."] +#[doc = ""] + pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] - #[doc = "Sets the geometry shader of a shader program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sp` - Shader program to use."] - #[doc = "* `dvle` - Geometry shader to set."] - #[doc = "* `stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] - #[doc = ""] +#[doc = "Sets the geometry shader of a shader program."] +#[doc = "# Arguments"] +#[doc = "`sp` - Shader program to use."] +#[doc = "`dvle` - Geometry shader to set."] +#[doc = "`stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] +#[doc = ""] + pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result; } extern "C" { #[must_use] - #[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sp` - Shader program to use."] - #[doc = "* `permutation` - Attribute permutation to use."] - #[doc = ""] +#[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] +#[doc = "# Arguments"] +#[doc = "`sp` - Shader program to use."] +#[doc = "`permutation` - Attribute permutation to use."] +#[doc = ""] + pub fn shaderProgramSetGshInputPermutation( sp: *mut shaderProgram_s, permutation: u64_, @@ -27343,14 +27883,13 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Configures the shader units to use the specified shader program."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sp` - Shader program to use."] - #[doc = "* `sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] - #[doc = "* `sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] - #[doc = ""] +#[doc = "Configures the shader units to use the specified shader program."] +#[doc = "# Arguments"] +#[doc = "`sp` - Shader program to use."] +#[doc = "`sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] +#[doc = "`sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] +#[doc = ""] + pub fn shaderProgramConfigure( sp: *mut shaderProgram_s, sendVshCode: bool, @@ -27359,135 +27898,160 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `sp` - Shader program to use."] - #[doc = ""] +#[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] +#[doc = "# Arguments"] +#[doc = "`sp` - Shader program to use."] +#[doc = ""] + pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result; } #[doc = "Mono sound"] #[doc = ""] + pub const NDSP_OUTPUT_MONO: ndspOutputMode = 0; #[doc = "Stereo sound"] #[doc = ""] + pub const NDSP_OUTPUT_STEREO: ndspOutputMode = 1; #[doc = "3D Surround sound"] #[doc = ""] + pub const NDSP_OUTPUT_SURROUND: ndspOutputMode = 2; #[doc = "# Data types"] -#[doc = ""] #[doc = "Sound output modes."] #[doc = ""] + pub type ndspOutputMode = ::libc::c_uint; -#[doc = "\"Normal\" clipping mode (?)"] -#[doc = ""] + pub const NDSP_CLIP_NORMAL: ndspClippingMode = 0; -#[doc = "\"Soft\" clipping mode (?)"] -#[doc = ""] + pub const NDSP_CLIP_SOFT: ndspClippingMode = 1; pub type ndspClippingMode = ::libc::c_uint; #[doc = "; #[doc = "Auxiliary output callback function. (data = User provided data, nsamples = Number of samples, samples = Sample data)"] #[doc = ""] + pub type ndspAuxCallback = ::core::option::Option< unsafe extern "C" fn( data: *mut ::libc::c_void, @@ -27523,17 +28089,15 @@ pub type ndspAuxCallback = ::core::option::Option< ), >; extern "C" { - #[doc = "# Initialization and basic operations"] - #[doc = ""] - #[doc = "Sets up the DSP component."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `binary` - DSP binary to load."] - #[doc = "* `size` - Size of the DSP binary."] - #[doc = "* `progMask` - Program RAM block mask to load the binary to."] - #[doc = "* `dataMask` - Data RAM block mask to load the binary to."] - #[doc = ""] +#[doc = "# Initialization and basic operations"] +#[doc = "Sets up the DSP component."] +#[doc = "# Arguments"] +#[doc = "`binary` - DSP binary to load."] +#[doc = "`size` - Size of the DSP binary."] +#[doc = "`progMask` - Program RAM block mask to load the binary to."] +#[doc = "`dataMask` - Data RAM block mask to load the binary to."] +#[doc = ""] + pub fn ndspUseComponent( binary: *const ::libc::c_void, size: u32_, @@ -27543,160 +28107,144 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Initializes NDSP."] - #[doc = ""] +#[doc = "Initializes NDSP."] +#[doc = ""] + pub fn ndspInit() -> Result; } extern "C" { - #[doc = "Exits NDSP."] - #[doc = ""] +#[doc = "Exits NDSP."] +#[doc = ""] + pub fn ndspExit(); } extern "C" { - #[doc = "Gets the number of dropped sound frames."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The number of dropped sound frames."] - #[doc = ""] +#[doc = "Gets the number of dropped sound frames."] +#[doc = "Returns:"] +#[doc = "The number of dropped sound frames."] +#[doc = ""] + pub fn ndspGetDroppedFrames() -> u32_; } extern "C" { - #[doc = "Gets the total sound frame count."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The total sound frame count."] - #[doc = ""] +#[doc = "Gets the total sound frame count."] +#[doc = "Returns:"] +#[doc = "The total sound frame count."] +#[doc = ""] + pub fn ndspGetFrameCount() -> u32_; } extern "C" { - #[doc = "# General parameters"] - #[doc = ""] - #[doc = "Sets the master volume."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `volume` - Volume to set. Defaults to 1.0f."] - #[doc = ""] +#[doc = "# General parameters"] +#[doc = "Sets the master volume."] +#[doc = "# Arguments"] +#[doc = "`volume` - Volume to set. Defaults to 1.0f."] +#[doc = ""] + pub fn ndspSetMasterVol(volume: f32); } extern "C" { - #[doc = "Sets the output mode."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] - #[doc = ""] +#[doc = "Sets the output mode."] +#[doc = "# Arguments"] +#[doc = "`mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] +#[doc = ""] + pub fn ndspSetOutputMode(mode: ndspOutputMode); } extern "C" { - #[doc = "Sets the clipping mode."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] - #[doc = ""] +#[doc = "Sets the clipping mode."] +#[doc = "# Arguments"] +#[doc = "`mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] +#[doc = ""] + pub fn ndspSetClippingMode(mode: ndspClippingMode); } extern "C" { - #[doc = "Sets the output count."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `count` - Output count to set. Defaults to 2."] - #[doc = ""] +#[doc = "Sets the output count."] +#[doc = "# Arguments"] +#[doc = "`count` - Output count to set. Defaults to 2."] +#[doc = ""] + pub fn ndspSetOutputCount(count: ::libc::c_int); } extern "C" { - #[doc = "Sets the wave buffer to capture audio to."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `capture` - Wave buffer to capture to."] - #[doc = ""] +#[doc = "Sets the wave buffer to capture audio to."] +#[doc = "# Arguments"] +#[doc = "`capture` - Wave buffer to capture to."] +#[doc = ""] + pub fn ndspSetCapture(capture: *mut ndspWaveBuf); } extern "C" { - #[doc = "Sets the sound frame callback."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `callback` - Callback to set."] - #[doc = "* `data` - User-defined data to pass to the callback."] - #[doc = ""] +#[doc = "Sets the sound frame callback."] +#[doc = "# Arguments"] +#[doc = "`callback` - Callback to set."] +#[doc = "`data` - User-defined data to pass to the callback."] +#[doc = ""] + pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void); } extern "C" { - #[doc = "# Surround"] - #[doc = ""] - #[doc = "Sets the surround sound depth."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `depth` - Depth to set. Defaults to 0x7FFF."] - #[doc = ""] +#[doc = "# Surround"] +#[doc = "Sets the surround sound depth."] +#[doc = "# Arguments"] +#[doc = "`depth` - Depth to set. Defaults to 0x7FFF."] +#[doc = ""] + pub fn ndspSurroundSetDepth(depth: u16_); } extern "C" { - #[doc = "Sets the surround sound position."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] - #[doc = ""] +#[doc = "Sets the surround sound position."] +#[doc = "# Arguments"] +#[doc = "`pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] +#[doc = ""] + pub fn ndspSurroundSetPos(pos: ndspSpeakerPos); } extern "C" { - #[doc = "Sets the surround sound rear ratio."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `ratio` - Rear ratio to set. Defaults to 0x8000."] - #[doc = ""] +#[doc = "Sets the surround sound rear ratio."] +#[doc = "# Arguments"] +#[doc = "`ratio` - Rear ratio to set. Defaults to 0x8000."] +#[doc = ""] + pub fn ndspSurroundSetRearRatio(ratio: u16_); } extern "C" { - #[doc = "# Auxiliary output"] - #[doc = ""] - #[doc = "Configures whether an auxiliary output is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the auxiliary output."] - #[doc = "* `enable` - Whether to enable the auxiliary output."] - #[doc = ""] +#[doc = "# Auxiliary output"] +#[doc = "Configures whether an auxiliary output is enabled."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the auxiliary output."] +#[doc = "`enable` - Whether to enable the auxiliary output."] +#[doc = ""] + pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - #[doc = "Configures whether an auxiliary output should use front bypass."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the auxiliary output."] - #[doc = "* `bypass` - Whether to use front bypass."] - #[doc = ""] +#[doc = "Configures whether an auxiliary output should use front bypass."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the auxiliary output."] +#[doc = "`bypass` - Whether to use front bypass."] +#[doc = ""] + pub fn ndspAuxSetFrontBypass(id: ::libc::c_int, bypass: bool); } extern "C" { - #[doc = "Sets the volume of an auxiliary output."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the auxiliary output."] - #[doc = "* `volume` - Volume to set."] - #[doc = ""] +#[doc = "Sets the volume of an auxiliary output."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the auxiliary output."] +#[doc = "`volume` - Volume to set."] +#[doc = ""] + pub fn ndspAuxSetVolume(id: ::libc::c_int, volume: f32); } extern "C" { - #[doc = "Sets the callback of an auxiliary output."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the auxiliary output."] - #[doc = "* `callback` - Callback to set."] - #[doc = "* `data` - User-defined data to pass to the callback."] - #[doc = ""] +#[doc = "Sets the callback of an auxiliary output."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the auxiliary output."] +#[doc = "`callback` - Callback to set."] +#[doc = "`data` - User-defined data to pass to the callback."] +#[doc = ""] + pub fn ndspAuxSetCallback( id: ::libc::c_int, callback: ndspAuxCallback, @@ -27706,267 +28254,254 @@ extern "C" { #[doc = "PCM8"] #[doc = ""] + pub const NDSP_ENCODING_PCM8: _bindgen_ty_30 = 0; #[doc = "PCM16"] #[doc = ""] + pub const NDSP_ENCODING_PCM16: _bindgen_ty_30 = 1; #[doc = "DSPADPCM (GameCube format)"] #[doc = ""] + pub const NDSP_ENCODING_ADPCM: _bindgen_ty_30 = 2; #[doc = "# Data types"] -#[doc = ""] #[doc = "Supported sample encodings."] #[doc = ""] + pub type _bindgen_ty_30 = ::libc::c_uint; #[doc = "Buffer contains Mono PCM8."] #[doc = ""] + pub const NDSP_FORMAT_MONO_PCM8: _bindgen_ty_31 = 1; #[doc = "Buffer contains Mono PCM16."] #[doc = ""] + pub const NDSP_FORMAT_MONO_PCM16: _bindgen_ty_31 = 5; #[doc = "Buffer contains Mono ADPCM."] #[doc = ""] + pub const NDSP_FORMAT_MONO_ADPCM: _bindgen_ty_31 = 9; #[doc = "Buffer contains Stereo PCM8."] #[doc = ""] + pub const NDSP_FORMAT_STEREO_PCM8: _bindgen_ty_31 = 2; #[doc = "Buffer contains Stereo PCM16."] #[doc = ""] + pub const NDSP_FORMAT_STEREO_PCM16: _bindgen_ty_31 = 6; #[doc = "(Alias) Buffer contains Mono PCM8."] #[doc = ""] + pub const NDSP_FORMAT_PCM8: _bindgen_ty_31 = 1; #[doc = "(Alias) Buffer contains Mono PCM16."] #[doc = ""] + pub const NDSP_FORMAT_PCM16: _bindgen_ty_31 = 5; #[doc = "(Alias) Buffer contains Mono ADPCM."] #[doc = ""] + pub const NDSP_FORMAT_ADPCM: _bindgen_ty_31 = 9; #[doc = "Front bypass."] #[doc = ""] + pub const NDSP_FRONT_BYPASS: _bindgen_ty_31 = 16; #[doc = "(?) Unknown, under research"] #[doc = ""] + pub const NDSP_3D_SURROUND_PREPROCESSED: _bindgen_ty_31 = 64; #[doc = "Channel format flags for use with ndspChnSetFormat."] #[doc = ""] + pub type _bindgen_ty_31 = ::libc::c_uint; #[doc = "Polyphase interpolation"] #[doc = ""] + pub const NDSP_INTERP_POLYPHASE: ndspInterpType = 0; #[doc = "Linear interpolation"] #[doc = ""] + pub const NDSP_INTERP_LINEAR: ndspInterpType = 1; #[doc = "No interpolation"] #[doc = ""] + pub const NDSP_INTERP_NONE: ndspInterpType = 2; #[doc = "Interpolation types."] #[doc = ""] + pub type ndspInterpType = ::libc::c_uint; extern "C" { - #[doc = "# Basic channel operation"] - #[doc = ""] - #[doc = "Resets a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "# Basic channel operation"] +#[doc = "Resets a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnReset(id: ::libc::c_int); } extern "C" { - #[doc = "Initializes the parameters of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "Initializes the parameters of a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnInitParams(id: ::libc::c_int); } extern "C" { - #[doc = "Checks whether a channel is currently playing."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether the channel is currently playing."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "Checks whether a channel is currently playing."] +#[doc = "Returns:"] +#[doc = "Whether the channel is currently playing."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool; } extern "C" { - #[doc = "Gets the current sample position of a channel."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The channel's sample position."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "Gets the current sample position of a channel."] +#[doc = "Returns:"] +#[doc = "The channel's sample position."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32_; } extern "C" { - #[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The sequence ID of the wave buffer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] +#[doc = "Returns:"] +#[doc = "The sequence ID of the wave buffer."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16_; } extern "C" { - #[doc = "Checks whether a channel is currently paused."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Whether the channel is currently paused."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "Checks whether a channel is currently paused."] +#[doc = "Returns:"] +#[doc = "Whether the channel is currently paused."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool; } extern "C" { - #[doc = "Sets the pause status of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `paused` - Whether the channel is to be paused (true) or unpaused (false)."] - #[doc = ""] +#[doc = "Sets the pause status of a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`paused` - Whether the channel is to be paused (true) or unpaused (false)."] +#[doc = ""] + pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool); } extern "C" { - #[doc = "# Configuration"] - #[doc = ""] - #[doc = "Sets the format of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `format` - Format to use."] - #[doc = ""] +#[doc = "# Configuration"] +#[doc = "Sets the format of a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`format` - Format to use."] +#[doc = ""] + pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16_); } extern "C" { - #[doc = "Sets the interpolation type of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `type` - Interpolation type to use."] - #[doc = ""] +#[doc = "Sets the interpolation type of a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`type` - Interpolation type to use."] +#[doc = ""] + pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType); } extern "C" { - #[doc = "Sets the sample rate of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `rate` - Sample rate to use."] - #[doc = ""] +#[doc = "Sets the sample rate of a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`rate` - Sample rate to use."] +#[doc = ""] + pub fn ndspChnSetRate(id: ::libc::c_int, rate: f32); } extern "C" { - #[doc = "Sets the mix parameters (volumes) of a channel."] - #[doc = ""] - #[doc = "- 0: Front left volume."] - #[doc = "- 1: Front right volume."] - #[doc = "- 2: Back left volume:"] - #[doc = "- 3: Back right volume:"] - #[doc = "- 4..7: Same as 0..3, but for auxiliary output 0."] - #[doc = "- 8..11: Same as 0..3, but for auxiliary output 1."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `mix` - Mix parameters to use. Working hypothesis:"] - #[doc = ""] +#[doc = "Sets the mix parameters (volumes) of a channel."] +#[doc = "- 0: Front left volume."] +#[doc = "- 1: Front right volume."] +#[doc = "- 2: Back left volume:"] +#[doc = "- 3: Back right volume:"] +#[doc = "- 4..7: Same as 0..3, but for auxiliary output 0."] +#[doc = "- 8..11: Same as 0..3, but for auxiliary output 1."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`mix` - Mix parameters to use. Working hypothesis:"] +#[doc = ""] + pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32); } extern "C" { - #[doc = "Sets the DSPADPCM coefficients of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `coefs` - DSPADPCM coefficients to use."] - #[doc = ""] +#[doc = "Sets the DSPADPCM coefficients of a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`coefs` - DSPADPCM coefficients to use."] +#[doc = ""] + pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16_); } extern "C" { - #[doc = "# Wave buffers"] - #[doc = ""] - #[doc = "Clears the wave buffer queue of a channel and stops playback."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "# Wave buffers"] +#[doc = "Clears the wave buffer queue of a channel and stops playback."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnWaveBufClear(id: ::libc::c_int); } extern "C" { - #[doc = "Adds a wave buffer to the wave buffer queue of a channel."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `buf` - Wave buffer to add."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* If the channel's wave buffer queue was empty before the use of this function, playback is started."] - #[doc = ""] +#[doc = "Adds a wave buffer to the wave buffer queue of a channel."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`buf` - Wave buffer to add."] +#[doc = "# Notes"] +#[doc = "If the channel's wave buffer queue was empty before the use of this function, playback is started."] +#[doc = ""] + pub fn ndspChnWaveBufAdd(id: ::libc::c_int, buf: *mut ndspWaveBuf); } extern "C" { - #[doc = "# IIR filters"] - #[doc = ""] - #[doc = "Configures whether the IIR monopole filter of a channel is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `enable` - Whether to enable the IIR monopole filter."] - #[doc = ""] +#[doc = "# IIR filters"] +#[doc = "Configures whether the IIR monopole filter of a channel is enabled."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`enable` - Whether to enable the IIR monopole filter."] +#[doc = ""] + pub fn ndspChnIirMonoSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - #[doc = "Manually sets up the parameters on monopole filter"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `enable` - Whether to enable the IIR monopole filter."] - #[doc = ""] +#[doc = "Manually sets up the parameters on monopole filter"] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`enable` - Whether to enable the IIR monopole filter."] +#[doc = ""] + pub fn ndspChnIirMonoSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -27975,42 +28510,38 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `f0` - Low pass cut-off frequency."] - #[doc = ""] +#[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`f0` - Low pass cut-off frequency."] +#[doc = ""] + pub fn ndspChnIirMonoSetParamsLowPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { - #[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `f0` - High pass cut-off frequency."] - #[doc = ""] +#[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`f0` - High pass cut-off frequency."] +#[doc = ""] + pub fn ndspChnIirMonoSetParamsHighPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { - #[doc = "Configures whether the IIR biquad filter of a channel is enabled."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `enable` - Whether to enable the IIR biquad filter."] - #[doc = ""] +#[doc = "Configures whether the IIR biquad filter of a channel is enabled."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`enable` - Whether to enable the IIR biquad filter."] +#[doc = ""] + pub fn ndspChnIirBiquadSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - #[doc = "Manually sets up the parameters of the biquad filter"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = ""] +#[doc = "Manually sets up the parameters of the biquad filter"] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = ""] + pub fn ndspChnIirBiquadSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -28022,59 +28553,54 @@ extern "C" { ) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a low pass filter."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `f0` - Low pass cut-off frequency."] - #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - #[doc = ""] +#[doc = "Sets the biquad to be a low pass filter."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`f0` - Low pass cut-off frequency."] +#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = ""] + pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a high pass filter."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `f0` - High pass cut-off frequency."] - #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - #[doc = ""] +#[doc = "Sets the biquad to be a high pass filter."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`f0` - High pass cut-off frequency."] +#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = ""] + pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a band pass filter."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `f0` - Mid-frequency."] - #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - #[doc = ""] +#[doc = "Sets the biquad to be a band pass filter."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`f0` - Mid-frequency."] +#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = ""] + pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a notch filter."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `f0` - Notch frequency."] - #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - #[doc = ""] +#[doc = "Sets the biquad to be a notch filter."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`f0` - Notch frequency."] +#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = ""] + pub fn ndspChnIirBiquadSetParamsNotchFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - #[doc = "Sets the biquad to be a peaking equalizer."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `id` - ID of the channel (0..23)."] - #[doc = "* `f0` - Central frequency."] - #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] - #[doc = "* `gain` - Amount of gain (raw value = 10 ^ dB/40)"] - #[doc = ""] +#[doc = "Sets the biquad to be a peaking equalizer."] +#[doc = "# Arguments"] +#[doc = "`id` - ID of the channel (0..23)."] +#[doc = "`f0` - Central frequency."] +#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] +#[doc = "`gain` - Amount of gain (raw value = 10 ^ dB/40)"] +#[doc = ""] + pub fn ndspChnIirBiquadSetParamsPeakingEqualizer( id: ::libc::c_int, f0: f32, @@ -28085,249 +28611,311 @@ extern "C" { #[doc = "Normal keyboard with several pages (QWERTY/accents/symbol/mobile)"] #[doc = ""] + pub const SWKBD_TYPE_NORMAL: SwkbdType = 0; #[doc = "QWERTY keyboard only."] #[doc = ""] + pub const SWKBD_TYPE_QWERTY: SwkbdType = 1; #[doc = "Number pad."] #[doc = ""] + pub const SWKBD_TYPE_NUMPAD: SwkbdType = 2; #[doc = "On JPN systems, a text keyboard without Japanese input capabilities, otherwise same as SWKBD_TYPE_NORMAL."] #[doc = ""] + pub const SWKBD_TYPE_WESTERN: SwkbdType = 3; #[doc = "Keyboard types."] #[doc = ""] + pub type SwkbdType = ::libc::c_uint; #[doc = "All inputs are accepted."] #[doc = ""] + pub const SWKBD_ANYTHING: SwkbdValidInput = 0; #[doc = "Empty inputs are not accepted."] #[doc = ""] + pub const SWKBD_NOTEMPTY: SwkbdValidInput = 1; #[doc = "Empty or blank inputs (consisting solely of whitespace) are not accepted."] #[doc = ""] + pub const SWKBD_NOTEMPTY_NOTBLANK: SwkbdValidInput = 2; pub const SWKBD_NOTBLANK_NOTEMPTY: SwkbdValidInput = 2; #[doc = "Blank inputs (consisting solely of whitespace) are not accepted, but empty inputs are."] #[doc = ""] + pub const SWKBD_NOTBLANK: SwkbdValidInput = 3; #[doc = "The input must have a fixed length (specified by maxTextLength in swkbdInit)."] #[doc = ""] + pub const SWKBD_FIXEDLEN: SwkbdValidInput = 4; #[doc = "Accepted input types."] #[doc = ""] + pub type SwkbdValidInput = ::libc::c_uint; #[doc = "Left button (usually Cancel)"] #[doc = ""] + pub const SWKBD_BUTTON_LEFT: SwkbdButton = 0; #[doc = "Middle button (usually I Forgot)"] #[doc = ""] + pub const SWKBD_BUTTON_MIDDLE: SwkbdButton = 1; #[doc = "Right button (usually OK)"] #[doc = ""] + pub const SWKBD_BUTTON_RIGHT: SwkbdButton = 2; pub const SWKBD_BUTTON_CONFIRM: SwkbdButton = 2; #[doc = "No button (returned by swkbdInputText in special cases)"] #[doc = ""] + pub const SWKBD_BUTTON_NONE: SwkbdButton = 3; #[doc = "Keyboard dialog buttons."] #[doc = ""] + pub type SwkbdButton = ::libc::c_uint; #[doc = "Characters are not concealed."] #[doc = ""] + pub const SWKBD_PASSWORD_NONE: SwkbdPasswordMode = 0; #[doc = "Characters are concealed immediately."] #[doc = ""] + pub const SWKBD_PASSWORD_HIDE: SwkbdPasswordMode = 1; #[doc = "Characters are concealed a second after they've been typed."] #[doc = ""] + pub const SWKBD_PASSWORD_HIDE_DELAY: SwkbdPasswordMode = 2; #[doc = "Keyboard password modes."] #[doc = ""] + pub type SwkbdPasswordMode = ::libc::c_uint; #[doc = "Disallow the use of more than a certain number of digits (0 or more)"] #[doc = ""] + pub const SWKBD_FILTER_DIGITS: _bindgen_ty_32 = 1; #[doc = "Disallow the use of the @ sign."] #[doc = ""] + pub const SWKBD_FILTER_AT: _bindgen_ty_32 = 2; #[doc = "Disallow the use of the % sign."] #[doc = ""] + pub const SWKBD_FILTER_PERCENT: _bindgen_ty_32 = 4; #[doc = "Disallow the use of the \\ sign."] #[doc = ""] + pub const SWKBD_FILTER_BACKSLASH: _bindgen_ty_32 = 8; #[doc = "Disallow profanity using Nintendo's profanity filter."] #[doc = ""] + pub const SWKBD_FILTER_PROFANITY: _bindgen_ty_32 = 16; #[doc = "Use a callback in order to check the input."] #[doc = ""] + pub const SWKBD_FILTER_CALLBACK: _bindgen_ty_32 = 32; #[doc = "Keyboard input filtering flags."] #[doc = ""] + pub type _bindgen_ty_32 = ::libc::c_uint; #[doc = "Parental PIN mode."] #[doc = ""] + pub const SWKBD_PARENTAL: _bindgen_ty_33 = 1; #[doc = "Darken the top screen when the keyboard is shown."] #[doc = ""] + pub const SWKBD_DARKEN_TOP_SCREEN: _bindgen_ty_33 = 2; #[doc = "Enable predictive input (necessary for Kanji input in JPN systems)."] #[doc = ""] + pub const SWKBD_PREDICTIVE_INPUT: _bindgen_ty_33 = 4; #[doc = "Enable multiline input."] #[doc = ""] + pub const SWKBD_MULTILINE: _bindgen_ty_33 = 8; #[doc = "Enable fixed-width mode."] #[doc = ""] + pub const SWKBD_FIXED_WIDTH: _bindgen_ty_33 = 16; #[doc = "Allow the usage of the HOME button."] #[doc = ""] + pub const SWKBD_ALLOW_HOME: _bindgen_ty_33 = 32; #[doc = "Allow the usage of a software-reset combination."] #[doc = ""] + pub const SWKBD_ALLOW_RESET: _bindgen_ty_33 = 64; #[doc = "Allow the usage of the POWER button."] #[doc = ""] + pub const SWKBD_ALLOW_POWER: _bindgen_ty_33 = 128; #[doc = "Default to the QWERTY page when the keyboard is shown."] #[doc = ""] + pub const SWKBD_DEFAULT_QWERTY: _bindgen_ty_33 = 512; #[doc = "Keyboard features."] #[doc = ""] + pub type _bindgen_ty_33 = ::libc::c_uint; #[doc = "Specifies that the input is valid."] #[doc = ""] + pub const SWKBD_CALLBACK_OK: SwkbdCallbackResult = 0; #[doc = "Displays an error message, then closes the keyboard."] #[doc = ""] + pub const SWKBD_CALLBACK_CLOSE: SwkbdCallbackResult = 1; #[doc = "Displays an error message and continues displaying the keyboard."] #[doc = ""] + pub const SWKBD_CALLBACK_CONTINUE: SwkbdCallbackResult = 2; #[doc = "Keyboard filter callback return values."] #[doc = ""] + pub type SwkbdCallbackResult = ::libc::c_uint; #[doc = "Dummy/unused."] #[doc = ""] + pub const SWKBD_NONE: SwkbdResult = -1; #[doc = "Invalid parameters to swkbd."] #[doc = ""] + pub const SWKBD_INVALID_INPUT: SwkbdResult = -2; #[doc = "Out of memory."] #[doc = ""] + pub const SWKBD_OUTOFMEM: SwkbdResult = -3; #[doc = "The button was clicked in 1-button dialogs."] #[doc = ""] + pub const SWKBD_D0_CLICK: SwkbdResult = 0; #[doc = "The left button was clicked in 2-button dialogs."] #[doc = ""] + pub const SWKBD_D1_CLICK0: SwkbdResult = 1; #[doc = "The right button was clicked in 2-button dialogs."] #[doc = ""] + pub const SWKBD_D1_CLICK1: SwkbdResult = 2; #[doc = "The left button was clicked in 3-button dialogs."] #[doc = ""] + pub const SWKBD_D2_CLICK0: SwkbdResult = 3; #[doc = "The middle button was clicked in 3-button dialogs."] #[doc = ""] + pub const SWKBD_D2_CLICK1: SwkbdResult = 4; #[doc = "The right button was clicked in 3-button dialogs."] #[doc = ""] + pub const SWKBD_D2_CLICK2: SwkbdResult = 5; #[doc = "The HOME button was pressed."] #[doc = ""] + pub const SWKBD_HOMEPRESSED: SwkbdResult = 10; #[doc = "The soft-reset key combination was pressed."] #[doc = ""] + pub const SWKBD_RESETPRESSED: SwkbdResult = 11; #[doc = "The POWER button was pressed."] #[doc = ""] + pub const SWKBD_POWERPRESSED: SwkbdResult = 12; #[doc = "The parental PIN was verified successfully."] #[doc = ""] + pub const SWKBD_PARENTAL_OK: SwkbdResult = 20; #[doc = "The parental PIN was incorrect."] #[doc = ""] + pub const SWKBD_PARENTAL_FAIL: SwkbdResult = 21; #[doc = "The filter callback returned SWKBD_CALLBACK_CLOSE."] #[doc = ""] + pub const SWKBD_BANNED_INPUT: SwkbdResult = 30; #[doc = "Keyboard return values."] #[doc = ""] + pub type SwkbdResult = ::libc::c_int; #[doc = "Keyboard dictionary word for predictive input."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdDictWord { - #[doc = "Reading of the word (that is, the string that needs to be typed)."] - #[doc = ""] +#[doc = "Reading of the word (that is, the string that needs to be typed)."] +#[doc = ""] + pub reading: [u16_; 41usize], - #[doc = "Spelling of the word."] - #[doc = ""] +#[doc = "Spelling of the word."] +#[doc = ""] + pub word: [u16_; 41usize], - #[doc = "Language the word applies to."] - #[doc = ""] +#[doc = "Language the word applies to."] +#[doc = ""] + pub language: u8_, - #[doc = "Specifies if the word applies to all languages."] - #[doc = ""] +#[doc = "Specifies if the word applies to all languages."] +#[doc = ""] + pub all_languages: bool, } impl Default for SwkbdDictWord { @@ -28342,6 +28930,7 @@ impl Default for SwkbdDictWord { #[doc = "Keyboard filter callback function."] #[doc = ""] + pub type SwkbdCallbackFn = ::core::option::Option< unsafe extern "C" fn( user: *mut ::libc::c_void, @@ -28352,6 +28941,7 @@ pub type SwkbdCallbackFn = ::core::option::Option< >; #[doc = "Keyboard status data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SwkbdStatusData { @@ -28359,6 +28949,7 @@ pub struct SwkbdStatusData { } #[doc = "Keyboard predictive input learning data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdLearningData { @@ -28375,6 +28966,7 @@ impl Default for SwkbdLearningData { } #[doc = "Internal libctru book-keeping structure for software keyboards."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdExtra { @@ -28396,6 +28988,7 @@ impl Default for SwkbdExtra { } #[doc = "Software keyboard parameter structure, it shouldn't be modified directly."] #[doc = ""] + #[repr(C)] #[derive(Copy, Clone)] pub struct SwkbdState { @@ -28464,15 +29057,14 @@ impl Default for SwkbdState { } } extern "C" { - #[doc = "Initializes software keyboard status."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `type` - Keyboard type."] - #[doc = "* `numButtons` - Number of dialog buttons to display (1, 2 or 3)."] - #[doc = "* `maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] - #[doc = ""] +#[doc = "Initializes software keyboard status."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`type` - Keyboard type."] +#[doc = "`numButtons` - Number of dialog buttons to display (1, 2 or 3)."] +#[doc = "`maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] +#[doc = ""] + pub fn swkbdInit( swkbd: *mut SwkbdState, type_: SwkbdType, @@ -28481,35 +29073,32 @@ extern "C" { ); } extern "C" { - #[doc = "Specifies which special features are enabled in a software keyboard."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `features` - Feature bitmask."] - #[doc = ""] +#[doc = "Specifies which special features are enabled in a software keyboard."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`features` - Feature bitmask."] +#[doc = ""] + pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32_); } extern "C" { - #[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `text` - Hint text."] - #[doc = ""] +#[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`text` - Hint text."] +#[doc = ""] + pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { - #[doc = "Configures a dialog button in a software keyboard."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `button` - Specifies which button to configure."] - #[doc = "* `text` - Button text."] - #[doc = "* `submit` - Specifies whether pushing the button will submit the text or discard it."] - #[doc = ""] +#[doc = "Configures a dialog button in a software keyboard."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`button` - Specifies which button to configure."] +#[doc = "`text` - Button text."] +#[doc = "`submit` - Specifies whether pushing the button will submit the text or discard it."] +#[doc = ""] + pub fn swkbdSetButton( swkbd: *mut SwkbdState, button: SwkbdButton, @@ -28518,24 +29107,22 @@ extern "C" { ); } extern "C" { - #[doc = "Sets the initial text that a software keyboard will display on launch."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `text` - Initial text."] - #[doc = ""] +#[doc = "Sets the initial text that a software keyboard will display on launch."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`text` - Initial text."] +#[doc = ""] + pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { - #[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `word` - Pointer to dictionary word structure."] - #[doc = "* `reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] - #[doc = "* `text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] - #[doc = ""] +#[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] +#[doc = "# Arguments"] +#[doc = "`word` - Pointer to dictionary word structure."] +#[doc = "`reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] +#[doc = "`text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] +#[doc = ""] + pub fn swkbdSetDictWord( word: *mut SwkbdDictWord, reading: *const ::libc::c_char, @@ -28543,14 +29130,13 @@ extern "C" { ); } extern "C" { - #[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `dict` - Pointer to dictionary words."] - #[doc = "* `wordCount` - Number of words in the dictionary."] - #[doc = ""] +#[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`dict` - Pointer to dictionary words."] +#[doc = "`wordCount` - Number of words in the dictionary."] +#[doc = ""] + pub fn swkbdSetDictionary( swkbd: *mut SwkbdState, dict: *const SwkbdDictWord, @@ -28558,15 +29144,14 @@ extern "C" { ); } extern "C" { - #[doc = "Configures software keyboard internal status management."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] - #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] - #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] - #[doc = ""] +#[doc = "Configures software keyboard internal status management."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] +#[doc = "`in` - Specifies whether the data should be read from the structure when the keyboard is launched."] +#[doc = "`out` - Specifies whether the data should be written to the structure when the keyboard is closed."] +#[doc = ""] + pub fn swkbdSetStatusData( swkbd: *mut SwkbdState, data: *mut SwkbdStatusData, @@ -28575,15 +29160,14 @@ extern "C" { ); } extern "C" { - #[doc = "Configures software keyboard predictive input learning data management."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] - #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] - #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] - #[doc = ""] +#[doc = "Configures software keyboard predictive input learning data management."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] +#[doc = "`in` - Specifies whether the data should be read from the structure when the keyboard is launched."] +#[doc = "`out` - Specifies whether the data should be written to the structure when the keyboard is closed."] +#[doc = ""] + pub fn swkbdSetLearningData( swkbd: *mut SwkbdState, data: *mut SwkbdLearningData, @@ -28592,14 +29176,13 @@ extern "C" { ); } extern "C" { - #[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `callback` - Filter callback function."] - #[doc = "* `user` - Custom data to be passed to the callback function."] - #[doc = ""] +#[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`callback` - Filter callback function."] +#[doc = "`user` - Custom data to be passed to the callback function."] +#[doc = ""] + pub fn swkbdSetFilterCallback( swkbd: *mut SwkbdState, callback: SwkbdCallbackFn, @@ -28607,18 +29190,15 @@ extern "C" { ); } extern "C" { - #[doc = "Launches a software keyboard in order to input text."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `swkbd` - Pointer to swkbd state."] - #[doc = "* `buf` - Pointer to output buffer which will hold the inputted text."] - #[doc = "* `bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] - #[doc = ""] +#[doc = "Launches a software keyboard in order to input text."] +#[doc = "Returns:"] +#[doc = "The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] +#[doc = "# Arguments"] +#[doc = "`swkbd` - Pointer to swkbd state."] +#[doc = "`buf` - Pointer to output buffer which will hold the inputted text."] +#[doc = "`bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] +#[doc = ""] + pub fn swkbdInputText( swkbd: *mut SwkbdState, buf: *mut ::libc::c_char, @@ -28628,55 +29208,68 @@ extern "C" { #[doc = "checksum` is the same as the one computed from `returnbuf`"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `returnbuf` - Buffer filled by Mii selector applet"] - #[doc = ""] +#[doc = "Verifies that the Mii data returned from the applet matches its"] +#[doc = "checksum"] +#[doc = "Returns:"] +#[doc = "`true` if `returnbuf->checksum` is the same as the one computed from `returnbuf`"] +#[doc = "# Arguments"] +#[doc = "`returnbuf` - Buffer filled by Mii selector applet"] +#[doc = ""] + pub fn miiSelectorChecksumIsValid(returnbuf: *const MiiSelectorReturn) -> bool; } #[doc = "Open directory struct"] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct archive_dir_t { pub magic: u32_, pub fd: Handle, - #[doc = "CTRU handle"] - #[doc = ""] +#[doc = "CTRU handle"] +#[doc = ""] + pub index: ssize_t, - #[doc = "Current entry index"] - #[doc = ""] +#[doc = "Current entry index"] +#[doc = ""] + pub size: size_t, - #[doc = "Current batch size"] - #[doc = ""] +#[doc = "Current batch size"] +#[doc = ""] + pub entry_data: [FS_DirectoryEntry; 32usize], } impl Default for archive_dir_t { @@ -29045,15 +29635,17 @@ impl Default for archive_dir_t { } extern "C" { #[must_use] - #[doc = "Mounts the SD"] - #[doc = ""] +#[doc = "Mounts the SD"] +#[doc = ""] + pub fn archiveMountSdmc() -> Result; } extern "C" { #[must_use] - #[doc = "Mounts and opens an archive as deviceName"] - #[doc = "Returns either an archive open error code, or -1 for generic failure"] - #[doc = ""] +#[doc = "Mounts and opens an archive as deviceName"] +#[doc = "Returns either an archive open error code, or -1 for generic failure"] +#[doc = ""] + pub fn archiveMount( archiveID: FS_ArchiveID, archivePath: FS_Path, @@ -29062,169 +29654,193 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] - #[doc = "Returns -1 if the specified device is not found"] - #[doc = ""] +#[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] +#[doc = "Returns -1 if the specified device is not found"] +#[doc = ""] + pub fn archiveCommitSaveData(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Unmounts the specified device, closing its archive in the process"] - #[doc = "Returns -1 if the specified device was not found"] - #[doc = ""] +#[doc = "Unmounts the specified device, closing its archive in the process"] +#[doc = "Returns -1 if the specified device was not found"] +#[doc = ""] + pub fn archiveUnmount(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Unmounts all devices and cleans up any resources used by the driver"] - #[doc = ""] +#[doc = "Unmounts all devices and cleans up any resources used by the driver"] +#[doc = ""] + pub fn archiveUnmountAll() -> Result; } extern "C" { #[must_use] - #[doc = "Get a file's mtime"] - #[doc = ""] +#[doc = "Get a file's mtime"] +#[doc = ""] + pub fn archive_getmtime(name: *const ::libc::c_char, mtime: *mut u64_) -> Result; } #[doc = "RomFS header."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct romfs_header { - #[doc = "Size of the header."] - #[doc = ""] +#[doc = "Size of the header."] +#[doc = ""] + pub headerSize: u32_, - #[doc = "Offset of the directory hash table."] - #[doc = ""] +#[doc = "Offset of the directory hash table."] +#[doc = ""] + pub dirHashTableOff: u32_, - #[doc = "Size of the directory hash table."] - #[doc = ""] +#[doc = "Size of the directory hash table."] +#[doc = ""] + pub dirHashTableSize: u32_, - #[doc = "Offset of the directory table."] - #[doc = ""] +#[doc = "Offset of the directory table."] +#[doc = ""] + pub dirTableOff: u32_, - #[doc = "Size of the directory table."] - #[doc = ""] +#[doc = "Size of the directory table."] +#[doc = ""] + pub dirTableSize: u32_, - #[doc = "Offset of the file hash table."] - #[doc = ""] +#[doc = "Offset of the file hash table."] +#[doc = ""] + pub fileHashTableOff: u32_, - #[doc = "Size of the file hash table."] - #[doc = ""] +#[doc = "Size of the file hash table."] +#[doc = ""] + pub fileHashTableSize: u32_, - #[doc = "Offset of the file table."] - #[doc = ""] +#[doc = "Offset of the file table."] +#[doc = ""] + pub fileTableOff: u32_, - #[doc = "Size of the file table."] - #[doc = ""] +#[doc = "Size of the file table."] +#[doc = ""] + pub fileTableSize: u32_, - #[doc = "Offset of the file data."] - #[doc = ""] +#[doc = "Offset of the file data."] +#[doc = ""] + pub fileDataOff: u32_, } #[doc = "RomFS directory."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default)] pub struct romfs_dir { - #[doc = "Offset of the parent directory."] - #[doc = ""] +#[doc = "Offset of the parent directory."] +#[doc = ""] + pub parent: u32_, - #[doc = "Offset of the next sibling directory."] - #[doc = ""] +#[doc = "Offset of the next sibling directory."] +#[doc = ""] + pub sibling: u32_, - #[doc = "Offset of the first child directory."] - #[doc = ""] +#[doc = "Offset of the first child directory."] +#[doc = ""] + pub childDir: u32_, - #[doc = "Offset of the first file."] - #[doc = ""] +#[doc = "Offset of the first file."] +#[doc = ""] + pub childFile: u32_, - #[doc = "Directory hash table pointer."] - #[doc = ""] +#[doc = "Directory hash table pointer."] +#[doc = ""] + pub nextHash: u32_, - #[doc = "Name length."] - #[doc = ""] +#[doc = "Name length."] +#[doc = ""] + pub nameLen: u32_, - #[doc = "Name. (UTF-16)"] - #[doc = ""] +#[doc = "Name. (UTF-16)"] +#[doc = ""] + pub name: __IncompleteArrayField, } #[doc = "RomFS file."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default)] pub struct romfs_file { - #[doc = "Offset of the parent directory."] - #[doc = ""] +#[doc = "Offset of the parent directory."] +#[doc = ""] + pub parent: u32_, - #[doc = "Offset of the next sibling file."] - #[doc = ""] +#[doc = "Offset of the next sibling file."] +#[doc = ""] + pub sibling: u32_, - #[doc = "Offset of the file's data."] - #[doc = ""] +#[doc = "Offset of the file's data."] +#[doc = ""] + pub dataOff: u64_, - #[doc = "Length of the file's data."] - #[doc = ""] +#[doc = "Length of the file's data."] +#[doc = ""] + pub dataSize: u64_, - #[doc = "File hash table pointer."] - #[doc = ""] +#[doc = "File hash table pointer."] +#[doc = ""] + pub nextHash: u32_, - #[doc = "Name length."] - #[doc = ""] +#[doc = "Name length."] +#[doc = ""] + pub nameLen: u32_, - #[doc = "Name. (UTF-16)"] - #[doc = ""] +#[doc = "Name. (UTF-16)"] +#[doc = ""] + pub name: __IncompleteArrayField, } extern "C" { #[must_use] - #[doc = "Mounts the Application's RomFS."] - #[doc = ""] - #[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] - #[doc = "If on the other hand it's an NCCH, it behaves identically to [`romfsMountFromCurrentProcess`]"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Device mount name."] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* This function is intended to be used to access one's own RomFS."] - #[doc = ""] +#[doc = "Mounts the Application's RomFS."] +#[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] +#[doc = "If on the other hand it's an NCCH, it behaves identically to [`romfsMountFromCurrentProcess`]"] +#[doc = "# Arguments"] +#[doc = "`name` - Device mount name."] +#[doc = "# Notes"] +#[doc = "This function is intended to be used to access one's own RomFS."] +#[doc = ""] + pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Mounts RomFS from an open file."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `fd` - FSFILE handle of the RomFS image."] - #[doc = "* `offset` - Offset of the RomFS within the file."] - #[doc = "* `name` - Device mount name."] - #[doc = ""] +#[doc = "Mounts RomFS from an open file."] +#[doc = "# Arguments"] +#[doc = "`fd` - FSFILE handle of the RomFS image."] +#[doc = "`offset` - Offset of the RomFS within the file."] +#[doc = "`name` - Device mount name."] +#[doc = ""] + pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Mounts RomFS using the current process host program RomFS."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `name` - Device mount name."] - #[doc = ""] +#[doc = "Mounts RomFS using the current process host program RomFS."] +#[doc = "# Arguments"] +#[doc = "`name` - Device mount name."] +#[doc = ""] + pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] - #[doc = "Mounts RomFS from the specified title."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `tid` - Title ID"] - #[doc = "* `mediatype` - Mediatype"] - #[doc = "* `name` - Device mount name."] - #[doc = ""] +#[doc = "Mounts RomFS from the specified title."] +#[doc = "# Arguments"] +#[doc = "`tid` - Title ID"] +#[doc = "`mediatype` - Mediatype"] +#[doc = "`name` - Device mount name."] +#[doc = ""] + pub fn romfsMountFromTitle( tid: u64_, mediatype: FS_MediaType, @@ -29233,65 +29849,83 @@ extern "C" { } extern "C" { #[must_use] - #[doc = "Unmounts the RomFS device."] - #[doc = ""] +#[doc = "Unmounts the RomFS device."] +#[doc = ""] + pub fn romfsUnmount(name: *const ::libc::c_char) -> Result; } #[doc = "Character width information structure."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct charWidthInfo_s { - #[doc = "Horizontal offset to draw the glyph with."] - #[doc = ""] +#[doc = "Horizontal offset to draw the glyph with."] +#[doc = ""] + pub left: s8, - #[doc = "Width of the glyph."] - #[doc = ""] +#[doc = "Width of the glyph."] +#[doc = ""] + pub glyphWidth: u8_, - #[doc = "Width of the character, that is, horizontal distance to advance."] - #[doc = ""] +#[doc = "Width of the character, that is, horizontal distance to advance."] +#[doc = ""] + pub charWidth: u8_, } #[doc = "Font texture sheet information."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct TGLP_s { - #[doc = "Width of a glyph cell."] - #[doc = ""] +#[doc = "Width of a glyph cell."] +#[doc = ""] + pub cellWidth: u8_, - #[doc = "Height of a glyph cell."] - #[doc = ""] +#[doc = "Height of a glyph cell."] +#[doc = ""] + pub cellHeight: u8_, - #[doc = "Vertical position of the baseline."] - #[doc = ""] +#[doc = "Vertical position of the baseline."] +#[doc = ""] + pub baselinePos: u8_, - #[doc = "Maximum character width."] - #[doc = ""] +#[doc = "Maximum character width."] +#[doc = ""] + pub maxCharWidth: u8_, - #[doc = "Size in bytes of a texture sheet."] - #[doc = ""] +#[doc = "Size in bytes of a texture sheet."] +#[doc = ""] + pub sheetSize: u32_, - #[doc = "Number of texture sheets."] - #[doc = ""] +#[doc = "Number of texture sheets."] +#[doc = ""] + pub nSheets: u16_, - #[doc = "GPU texture format (GPU_TEXCOLOR)."] - #[doc = ""] +#[doc = "GPU texture format (GPU_TEXCOLOR)."] +#[doc = ""] + pub sheetFmt: u16_, - #[doc = "Number of glyphs per row per sheet."] - #[doc = ""] +#[doc = "Number of glyphs per row per sheet."] +#[doc = ""] + pub nRows: u16_, - #[doc = "Number of glyph rows per sheet."] - #[doc = ""] +#[doc = "Number of glyph rows per sheet."] +#[doc = ""] + pub nLines: u16_, - #[doc = "Texture sheet width."] - #[doc = ""] +#[doc = "Texture sheet width."] +#[doc = ""] + pub sheetWidth: u16_, - #[doc = "Texture sheet height."] - #[doc = ""] +#[doc = "Texture sheet height."] +#[doc = ""] + pub sheetHeight: u16_, - #[doc = "Pointer to texture sheet data."] - #[doc = ""] +#[doc = "Pointer to texture sheet data."] +#[doc = ""] + pub sheetData: *mut u8_, } impl Default for TGLP_s { @@ -29306,23 +29940,29 @@ impl Default for TGLP_s { #[doc = "Font character width information block structure."] #[doc = ""] + pub type CWDH_s = tag_CWDH_s; #[doc = "Font character width information block structure."] #[doc = ""] + #[repr(C)] #[derive(Debug)] pub struct tag_CWDH_s { - #[doc = "First Unicode codepoint the block applies to."] - #[doc = ""] +#[doc = "First Unicode codepoint the block applies to."] +#[doc = ""] + pub startIndex: u16_, - #[doc = "Last Unicode codepoint the block applies to."] - #[doc = ""] +#[doc = "Last Unicode codepoint the block applies to."] +#[doc = ""] + pub endIndex: u16_, - #[doc = "Pointer to the next block."] - #[doc = ""] +#[doc = "Pointer to the next block."] +#[doc = ""] + pub next: *mut CWDH_s, - #[doc = "Table of character width information structures."] - #[doc = ""] +#[doc = "Table of character width information structures."] +#[doc = ""] + pub widths: __IncompleteArrayField, } impl Default for tag_CWDH_s { @@ -29337,73 +29977,90 @@ impl Default for tag_CWDH_s { #[doc = "Identity mapping."] #[doc = ""] + pub const CMAP_TYPE_DIRECT: _bindgen_ty_36 = 0; #[doc = "Mapping using a table."] #[doc = ""] + pub const CMAP_TYPE_TABLE: _bindgen_ty_36 = 1; #[doc = "Mapping using a list of mapped characters."] #[doc = ""] + pub const CMAP_TYPE_SCAN: _bindgen_ty_36 = 2; #[doc = "Font character map methods."] #[doc = ""] + pub type _bindgen_ty_36 = ::libc::c_uint; #[doc = "Font character map structure."] #[doc = ""] + pub type CMAP_s = tag_CMAP_s; #[doc = "Font character map structure."] #[doc = ""] + #[repr(C)] pub struct tag_CMAP_s { - #[doc = "First Unicode codepoint the block applies to."] - #[doc = ""] +#[doc = "First Unicode codepoint the block applies to."] +#[doc = ""] + pub codeBegin: u16_, - #[doc = "Last Unicode codepoint the block applies to."] - #[doc = ""] +#[doc = "Last Unicode codepoint the block applies to."] +#[doc = ""] + pub codeEnd: u16_, - #[doc = "Mapping method."] - #[doc = ""] +#[doc = "Mapping method."] +#[doc = ""] + pub mappingMethod: u16_, pub reserved: u16_, - #[doc = "Pointer to the next map."] - #[doc = ""] +#[doc = "Pointer to the next map."] +#[doc = ""] + 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 { - #[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] - #[doc = ""] +#[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] +#[doc = ""] + pub indexOffset: __BindgenUnionField, - #[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] - #[doc = ""] +#[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] +#[doc = ""] + pub indexTable: __BindgenUnionField<[u16_; 0usize]>, pub __bindgen_anon_1: __BindgenUnionField, pub bindgen_union_field: u16, } #[doc = "For CMAP_TYPE_SCAN: Mapping data."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1 { - #[doc = "Number of pairs."] - #[doc = ""] +#[doc = "Number of pairs."] +#[doc = ""] + pub nScanEntries: u16_, pub scanEntries: __IncompleteArrayField, } #[doc = "Mapping pairs."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - #[doc = "Unicode codepoint."] - #[doc = ""] +#[doc = "Unicode codepoint."] +#[doc = ""] + pub code: u16_, - #[doc = "Mapped glyph index."] - #[doc = ""] +#[doc = "Mapped glyph index."] +#[doc = ""] + pub glyphIndex: u16_, } impl Default for tag_CMAP_s__bindgen_ty_1 { @@ -29426,47 +30083,61 @@ impl Default for tag_CMAP_s { } #[doc = "Font information structure."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FINF_s { - #[doc = "Signature (FINF)."] - #[doc = ""] +#[doc = "Signature (FINF)."] +#[doc = ""] + pub signature: u32_, - #[doc = "Section size."] - #[doc = ""] +#[doc = "Section size."] +#[doc = ""] + pub sectionSize: u32_, - #[doc = "Font type"] - #[doc = ""] +#[doc = "Font type"] +#[doc = ""] + pub fontType: u8_, - #[doc = "Line feed vertical distance."] - #[doc = ""] +#[doc = "Line feed vertical distance."] +#[doc = ""] + pub lineFeed: u8_, - #[doc = "Glyph index of the replacement character."] - #[doc = ""] +#[doc = "Glyph index of the replacement character."] +#[doc = ""] + pub alterCharIndex: u16_, - #[doc = "Default character width information."] - #[doc = ""] +#[doc = "Default character width information."] +#[doc = ""] + pub defaultWidth: charWidthInfo_s, - #[doc = "Font encoding (?)"] - #[doc = ""] +#[doc = "Font encoding (?)"] +#[doc = ""] + pub encoding: u8_, - #[doc = "Pointer to texture sheet information."] - #[doc = ""] +#[doc = "Pointer to texture sheet information."] +#[doc = ""] + pub tglp: *mut TGLP_s, - #[doc = "Pointer to the first character width information block."] - #[doc = ""] +#[doc = "Pointer to the first character width information block."] +#[doc = ""] + pub cwdh: *mut CWDH_s, - #[doc = "Pointer to the first character map."] - #[doc = ""] +#[doc = "Pointer to the first character map."] +#[doc = ""] + pub cmap: *mut CMAP_s, - #[doc = "Font height."] - #[doc = ""] +#[doc = "Font height."] +#[doc = ""] + pub height: u8_, - #[doc = "Font width."] - #[doc = ""] +#[doc = "Font width."] +#[doc = ""] + pub width: u8_, - #[doc = "Font ascent."] - #[doc = ""] +#[doc = "Font ascent."] +#[doc = ""] + pub ascent: u8_, pub padding: u8_, } @@ -29481,29 +30152,37 @@ impl Default for FINF_s { } #[doc = "Font structure."] #[doc = ""] + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CFNT_s { - #[doc = "Signature (CFNU)."] - #[doc = ""] +#[doc = "Signature (CFNU)."] +#[doc = ""] + pub signature: u32_, - #[doc = "Endianness constant (0xFEFF)."] - #[doc = ""] +#[doc = "Endianness constant (0xFEFF)."] +#[doc = ""] + pub endianness: u16_, - #[doc = "Header size."] - #[doc = ""] +#[doc = "Header size."] +#[doc = ""] + pub headerSize: u16_, - #[doc = "Format version."] - #[doc = ""] +#[doc = "Format version."] +#[doc = ""] + pub version: u32_, - #[doc = "File size."] - #[doc = ""] +#[doc = "File size."] +#[doc = ""] + pub fileSize: u32_, - #[doc = "Number of blocks."] - #[doc = ""] +#[doc = "Number of blocks."] +#[doc = ""] + pub nBlocks: u32_, - #[doc = "Font information."] - #[doc = ""] +#[doc = "Font information."] +#[doc = ""] + pub finf: FINF_s, } impl Default for CFNT_s { @@ -29517,26 +30196,32 @@ impl Default for CFNT_s { } #[doc = "Font glyph position structure."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s { - #[doc = "Texture sheet index to use to render the glyph."] - #[doc = ""] +#[doc = "Texture sheet index to use to render the glyph."] +#[doc = ""] + pub sheetIndex: ::libc::c_int, - #[doc = "Horizontal offset to draw the glyph width."] - #[doc = ""] +#[doc = "Horizontal offset to draw the glyph width."] +#[doc = ""] + pub xOffset: f32, - #[doc = "Horizontal distance to advance after drawing the glyph."] - #[doc = ""] +#[doc = "Horizontal distance to advance after drawing the glyph."] +#[doc = ""] + pub xAdvance: f32, - #[doc = "Glyph width."] - #[doc = ""] +#[doc = "Glyph width."] +#[doc = ""] + pub width: f32, pub texcoord: fontGlyphPos_s__bindgen_ty_1, pub vtxcoord: fontGlyphPos_s__bindgen_ty_2, } #[doc = "Texture coordinates to use to render the glyph."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_1 { @@ -29547,6 +30232,7 @@ pub struct fontGlyphPos_s__bindgen_ty_1 { } #[doc = "Vertex coordinates to use to render the glyph."] #[doc = ""] + #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_2 { @@ -29558,73 +30244,72 @@ pub struct fontGlyphPos_s__bindgen_ty_2 { #[doc = "Calculates vertex coordinates in addition to texture coordinates."] #[doc = ""] + pub const GLYPH_POS_CALC_VTXCOORD: _bindgen_ty_37 = 1; #[doc = "Position the glyph at the baseline instead of at the top-left corner."] #[doc = ""] + pub const GLYPH_POS_AT_BASELINE: _bindgen_ty_37 = 2; #[doc = "Indicates that the Y axis points up instead of down."] #[doc = ""] + pub const GLYPH_POS_Y_POINTS_UP: _bindgen_ty_37 = 4; #[doc = "Flags for use with fontCalcGlyphPos."] #[doc = ""] + pub type _bindgen_ty_37 = ::libc::c_uint; extern "C" { #[must_use] - #[doc = "Ensures the shared system font is mapped."] - #[doc = ""] +#[doc = "Ensures the shared system font is mapped."] +#[doc = ""] + pub fn fontEnsureMapped() -> Result; } extern "C" { - #[doc = "Fixes the pointers internal to a just-loaded font"] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `font` - Font to fix"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* Should never be run on the system font, and only once on any other font."] - #[doc = ""] +#[doc = "Fixes the pointers internal to a just-loaded font"] +#[doc = "# Arguments"] +#[doc = "`font` - Font to fix"] +#[doc = "# Notes"] +#[doc = "Should never be run on the system font, and only once on any other font."] +#[doc = ""] + pub fn fontFixPointers(font: *mut CFNT_s); } extern "C" { - #[doc = "Retrieves the glyph index of the specified Unicode codepoint."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] - #[doc = "* `codePoint` - Unicode codepoint."] - #[doc = ""] +#[doc = "Retrieves the glyph index of the specified Unicode codepoint."] +#[doc = "# Arguments"] +#[doc = "`font` - Pointer to font structure. If NULL, the shared system font is used."] +#[doc = "`codePoint` - Unicode codepoint."] +#[doc = ""] + pub fn fontGlyphIndexFromCodePoint(font: *mut CFNT_s, codePoint: u32_) -> ::libc::c_int; } extern "C" { - #[doc = "Retrieves character width information of the specified glyph."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] - #[doc = "* `glyphIndex` - Index of the glyph."] - #[doc = ""] +#[doc = "Retrieves character width information of the specified glyph."] +#[doc = "# Arguments"] +#[doc = "`font` - Pointer to font structure. If NULL, the shared system font is used."] +#[doc = "`glyphIndex` - Index of the glyph."] +#[doc = ""] + pub fn fontGetCharWidthInfo( font: *mut CFNT_s, glyphIndex: ::libc::c_int, ) -> *mut charWidthInfo_s; } extern "C" { - #[doc = "Calculates position information for the specified glyph."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `out` - Output structure in which to write the information."] - #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] - #[doc = "* `glyphIndex` - Index of the glyph."] - #[doc = "* `flags` - Calculation flags (see GLYPH_POS_* flags)."] - #[doc = "* `scaleX` - Scale factor to apply horizontally."] - #[doc = "* `scaleY` - Scale factor to apply vertically."] - #[doc = ""] +#[doc = "Calculates position information for the specified glyph."] +#[doc = "# Arguments"] +#[doc = "`out` - Output structure in which to write the information."] +#[doc = "`font` - Pointer to font structure. If NULL, the shared system font is used."] +#[doc = "`glyphIndex` - Index of the glyph."] +#[doc = "`flags` - Calculation flags (see GLYPH_POS_flags)."] +#[doc = "`scaleX` - Scale factor to apply horizontally."] +#[doc = "`scaleY` - Scale factor to apply vertically."] +#[doc = ""] + pub fn fontCalcGlyphPos( out: *mut fontGlyphPos_s, font: *mut CFNT_s, @@ -29662,25 +30347,21 @@ extern "C" { pub fn gdbHioDevSystem(command: *const ::libc::c_char) -> ::libc::c_int; } extern "C" { - #[doc = "Address of the host connected through 3dslink"] - #[doc = ""] +#[doc = "Address of the host connected through 3dslink"] +#[doc = ""] + pub static mut __3dslink_host: in_addr; } extern "C" { - #[doc = "Connects to the 3dslink host, setting up an output stream."] - #[doc = ""] - #[doc = "Returns:"] - #[doc = ""] - #[doc = "* Socket fd on success, negative number on failure."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] - #[doc = "* `redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] - #[doc = ""] - #[doc = "# Notes"] - #[doc = ""] - #[doc = "* The socket should be closed with close() during application cleanup."] - #[doc = ""] +#[doc = "Connects to the 3dslink host, setting up an output stream."] +#[doc = "Returns:"] +#[doc = "Socket fd on success, negative number on failure."] +#[doc = "# Arguments"] +#[doc = "`redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] +#[doc = "`redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] +#[doc = "# Notes"] +#[doc = "The socket should be closed with close() during application cleanup."] +#[doc = ""] + pub fn link3dsConnectToHost(redirStdout: bool, redirStderr: bool) -> ::libc::c_int; } From c70093cdf292b1025a16482a28570aebd59c8f70 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 16 Oct 2022 17:55:06 +0200 Subject: [PATCH 21/57] Fix formatting --- ctru-sys/src/bindings.rs | 22433 ++++++++++++++++++------------------- 1 file changed, 10876 insertions(+), 11557 deletions(-) diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs index 5bea3bc..ff6db4b 100644 --- a/ctru-sys/src/bindings.rs +++ b/ctru-sys/src/bindings.rs @@ -1292,62 +1292,51 @@ pub type ThreadFunc = ::core::option::Option; #[doc = "Structure representing CPU registers"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CpuRegisters { -#[doc = "r0-r12."] -#[doc = ""] - + #[doc = "r0-r12."] + #[doc = ""] pub r: [u32_; 13usize], -#[doc = "sp."] -#[doc = ""] - + #[doc = "sp."] + #[doc = ""] pub sp: u32_, -#[doc = "lr."] -#[doc = ""] - + #[doc = "lr."] + #[doc = ""] pub lr: u32_, -#[doc = "pc. May need to be adjusted."] -#[doc = ""] - + #[doc = "pc. May need to be adjusted."] + #[doc = ""] pub pc: u32_, -#[doc = "cpsr."] -#[doc = ""] - + #[doc = "cpsr."] + #[doc = ""] pub cpsr: u32_, } #[doc = "Structure representing FPU registers"] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct FpuRegisters { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1, -#[doc = "fpscr."] -#[doc = ""] - + #[doc = "fpscr."] + #[doc = ""] pub fpscr: u32_, -#[doc = "fpexc."] -#[doc = ""] - + #[doc = "fpexc."] + #[doc = ""] pub fpexc: u32_, } #[repr(C)] #[derive(Copy, Clone)] pub union FpuRegisters__bindgen_ty_1 { pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1__bindgen_ty_1, -#[doc = "s0-s31."] -#[doc = ""] - + #[doc = "s0-s31."] + #[doc = ""] pub s: [f32; 32usize], } #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FpuRegisters__bindgen_ty_1__bindgen_ty_1 { -#[doc = "d0-d15."] -#[doc = ""] - + #[doc = "d0-d15."] + #[doc = ""] pub d: [f64; 16usize], } impl Default for FpuRegisters__bindgen_ty_1 { @@ -1380,7 +1369,6 @@ pub const RL_STATUS: _bindgen_ty_1 = 25; #[doc = "Result code level values."] #[doc = ""] - pub type _bindgen_ty_1 = ::libc::c_uint; pub const RS_SUCCESS: _bindgen_ty_2 = 0; pub const RS_NOP: _bindgen_ty_2 = 1; @@ -1398,7 +1386,6 @@ pub const RS_INVALIDRESVAL: _bindgen_ty_2 = 63; #[doc = "Result code summary values."] #[doc = ""] - pub type _bindgen_ty_2 = ::libc::c_uint; pub const RM_COMMON: _bindgen_ty_3 = 0; pub const RM_KERNEL: _bindgen_ty_3 = 1; @@ -1501,7 +1488,6 @@ pub const RM_INVALIDRESVAL: _bindgen_ty_3 = 255; #[doc = "Result code module values."] #[doc = ""] - pub type _bindgen_ty_3 = ::libc::c_uint; pub const RD_SUCCESS: _bindgen_ty_4 = 0; pub const RD_INVALID_RESULT_VALUE: _bindgen_ty_4 = 1023; @@ -1531,631 +1517,512 @@ pub const RD_INVALID_SELECTION: _bindgen_ty_4 = 1000; #[doc = "Result code generic description values."] #[doc = ""] - pub type _bindgen_ty_4 = ::libc::c_uint; #[doc = "Readable"] #[doc = ""] - pub const IPC_BUFFER_R: IPC_BufferRights = 2; #[doc = "Writable"] #[doc = ""] - pub const IPC_BUFFER_W: IPC_BufferRights = 4; #[doc = "Readable and Writable"] #[doc = ""] - pub const IPC_BUFFER_RW: IPC_BufferRights = 6; #[doc = "IPC buffer access rights."] #[doc = ""] - pub type IPC_BufferRights = ::libc::c_uint; #[doc = "Memory un-mapping"] #[doc = ""] - pub const MEMOP_FREE: MemOp = 1; #[doc = "Reserve memory"] #[doc = ""] - pub const MEMOP_RESERVE: MemOp = 2; #[doc = "Memory mapping"] #[doc = ""] - pub const MEMOP_ALLOC: MemOp = 3; #[doc = "Mirror mapping"] #[doc = ""] - pub const MEMOP_MAP: MemOp = 4; #[doc = "Mirror unmapping"] #[doc = ""] - pub const MEMOP_UNMAP: MemOp = 5; #[doc = "Change protection"] #[doc = ""] - pub const MEMOP_PROT: MemOp = 6; #[doc = "APPLICATION memory region."] #[doc = ""] - pub const MEMOP_REGION_APP: MemOp = 256; #[doc = "SYSTEM memory region."] #[doc = ""] - pub const MEMOP_REGION_SYSTEM: MemOp = 512; #[doc = "BASE memory region."] #[doc = ""] - pub const MEMOP_REGION_BASE: MemOp = 768; #[doc = "Operation bitmask."] #[doc = ""] - pub const MEMOP_OP_MASK: MemOp = 255; #[doc = "Region bitmask."] #[doc = ""] - pub const MEMOP_REGION_MASK: MemOp = 3840; #[doc = "Flag for linear memory operations"] #[doc = ""] - pub const MEMOP_LINEAR_FLAG: MemOp = 65536; #[doc = "Allocates linear memory."] #[doc = ""] - pub const MEMOP_ALLOC_LINEAR: MemOp = 65539; #[doc = "[`svcControlMemory`] operation flags"] +#[doc = ""] #[doc = "The lowest 8 bits are the operation"] #[doc = ""] - pub type MemOp = ::libc::c_uint; #[doc = "Free memory"] #[doc = ""] - pub const MEMSTATE_FREE: MemState = 0; #[doc = "Reserved memory"] #[doc = ""] - pub const MEMSTATE_RESERVED: MemState = 1; #[doc = "I/O memory"] #[doc = ""] - pub const MEMSTATE_IO: MemState = 2; #[doc = "Static memory"] #[doc = ""] - pub const MEMSTATE_STATIC: MemState = 3; #[doc = "Code memory"] #[doc = ""] - pub const MEMSTATE_CODE: MemState = 4; #[doc = "Private memory"] #[doc = ""] - pub const MEMSTATE_PRIVATE: MemState = 5; #[doc = "Shared memory"] #[doc = ""] - pub const MEMSTATE_SHARED: MemState = 6; #[doc = "Continuous memory"] #[doc = ""] - pub const MEMSTATE_CONTINUOUS: MemState = 7; #[doc = "Aliased memory"] #[doc = ""] - pub const MEMSTATE_ALIASED: MemState = 8; #[doc = "Alias memory"] #[doc = ""] - pub const MEMSTATE_ALIAS: MemState = 9; #[doc = "Aliased code memory"] #[doc = ""] - pub const MEMSTATE_ALIASCODE: MemState = 10; #[doc = "Locked memory"] #[doc = ""] - pub const MEMSTATE_LOCKED: MemState = 11; #[doc = "The state of a memory block."] #[doc = ""] - pub type MemState = ::libc::c_uint; #[doc = "Readable"] #[doc = ""] - pub const MEMPERM_READ: MemPerm = 1; #[doc = "Writable"] #[doc = ""] - pub const MEMPERM_WRITE: MemPerm = 2; #[doc = "Executable"] #[doc = ""] - pub const MEMPERM_EXECUTE: MemPerm = 4; #[doc = "Readable and writable"] #[doc = ""] - pub const MEMPERM_READWRITE: MemPerm = 3; #[doc = "Readable and executable"] #[doc = ""] - pub const MEMPERM_READEXECUTE: MemPerm = 5; #[doc = "Don't care"] #[doc = ""] - pub const MEMPERM_DONTCARE: MemPerm = 268435456; #[doc = "Memory permission flags"] #[doc = ""] - pub type MemPerm = ::libc::c_uint; #[doc = "All regions."] #[doc = ""] - pub const MEMREGION_ALL: MemRegion = 0; #[doc = "APPLICATION memory."] #[doc = ""] - pub const MEMREGION_APPLICATION: MemRegion = 1; #[doc = "SYSTEM memory."] #[doc = ""] - pub const MEMREGION_SYSTEM: MemRegion = 2; #[doc = "BASE memory."] #[doc = ""] - pub const MEMREGION_BASE: MemRegion = 3; #[doc = "Memory regions."] #[doc = ""] - pub type MemRegion = ::libc::c_uint; #[doc = "Memory information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MemInfo { -#[doc = "Base address."] -#[doc = ""] - + #[doc = "Base address."] + #[doc = ""] pub base_addr: u32_, -#[doc = "Size."] -#[doc = ""] - + #[doc = "Size."] + #[doc = ""] pub size: u32_, -#[doc = "Memory permissions. See [`MemPerm`]"] -#[doc = ""] - + #[doc = "Memory permissions. See [`MemPerm`]"] + #[doc = ""] pub perm: u32_, -#[doc = "Memory state. See [`MemState`]"] -#[doc = ""] - + #[doc = "Memory state. See [`MemState`]"] + #[doc = ""] pub state: u32_, } #[doc = "Memory page information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PageInfo { -#[doc = "Page flags."] -#[doc = ""] - + #[doc = "Page flags."] + #[doc = ""] pub flags: u32_, } #[doc = "Signal #value threads for wake-up."] #[doc = ""] - pub const ARBITRATION_SIGNAL: ArbitrationType = 0; #[doc = "If the memory at the address is strictly lower than #value, then wait for signal."] #[doc = ""] - pub const ARBITRATION_WAIT_IF_LESS_THAN: ArbitrationType = 1; #[doc = "If the memory at the address is strictly lower than #value, then decrement it and wait for signal."] #[doc = ""] - pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN: ArbitrationType = 2; #[doc = "If the memory at the address is strictly lower than #value, then wait for signal or timeout."] #[doc = ""] - pub const ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 3; #[doc = "If the memory at the address is strictly lower than #value, then decrement it and wait for signal or timeout."] #[doc = ""] - pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 4; #[doc = "Arbitration modes."] #[doc = ""] - pub type ArbitrationType = ::libc::c_uint; #[doc = "When the primitive is signaled, it will wake up exactly one thread and will clear itself automatically."] #[doc = ""] - pub const RESET_ONESHOT: ResetType = 0; #[doc = "When the primitive is signaled, it will wake up all threads and it won't clear itself automatically."] #[doc = ""] - pub const RESET_STICKY: ResetType = 1; #[doc = "Only meaningful for timers: same as ONESHOT but it will periodically signal the timer instead of just once."] #[doc = ""] - pub const RESET_PULSE: ResetType = 2; #[doc = "Reset types (for use with events and timers)"] #[doc = ""] - pub type ResetType = ::libc::c_uint; #[doc = "Unknown."] #[doc = ""] - pub const THREADINFO_TYPE_UNKNOWN: ThreadInfoType = 0; #[doc = "Types of thread info."] #[doc = ""] - pub type ThreadInfoType = ::libc::c_uint; #[doc = "Thread priority"] #[doc = ""] - pub const RESLIMIT_PRIORITY: ResourceLimitType = 0; #[doc = "Quantity of allocatable memory"] #[doc = ""] - pub const RESLIMIT_COMMIT: ResourceLimitType = 1; #[doc = "Number of threads"] #[doc = ""] - pub const RESLIMIT_THREAD: ResourceLimitType = 2; #[doc = "Number of events"] #[doc = ""] - pub const RESLIMIT_EVENT: ResourceLimitType = 3; #[doc = "Number of mutexes"] #[doc = ""] - pub const RESLIMIT_MUTEX: ResourceLimitType = 4; #[doc = "Number of semaphores"] #[doc = ""] - pub const RESLIMIT_SEMAPHORE: ResourceLimitType = 5; #[doc = "Number of timers"] #[doc = ""] - pub const RESLIMIT_TIMER: ResourceLimitType = 6; #[doc = "Number of shared memory objects, see [`svcCreateMemoryBlock`]"] #[doc = ""] - pub const RESLIMIT_SHAREDMEMORY: ResourceLimitType = 7; #[doc = "Number of address arbiters"] #[doc = ""] - pub const RESLIMIT_ADDRESSARBITER: ResourceLimitType = 8; #[doc = "CPU time. Value expressed in percentage regular until it reaches 90."] #[doc = ""] - pub const RESLIMIT_CPUTIME: ResourceLimitType = 9; #[doc = "Forces enum size to be 32 bits"] #[doc = ""] - pub const RESLIMIT_BIT: ResourceLimitType = 2147483648; #[doc = "Types of resource limit"] #[doc = ""] - pub type ResourceLimitType = ::libc::c_uint; #[doc = "DMA transfer involving at least one device is starting and has not reached DMAWFP yet."] #[doc = ""] - pub const DMASTATE_STARTING: DmaState = 0; #[doc = "DMA channel is in WFP state for the destination device (2nd loop iteration onwards)."] #[doc = ""] - pub const DMASTATE_WFP_DST: DmaState = 1; #[doc = "DMA channel is in WFP state for the source device (2nd loop iteration onwards)."] #[doc = ""] - pub const DMASTATE_WFP_SRC: DmaState = 2; #[doc = "DMA transfer is running."] #[doc = ""] - pub const DMASTATE_RUNNING: DmaState = 3; #[doc = "DMA transfer is done."] #[doc = ""] - pub const DMASTATE_DONE: DmaState = 4; #[doc = "DMA transfer state."] #[doc = ""] - pub type DmaState = ::libc::c_uint; #[doc = "DMA source is a device/peripheral. Address will not auto-increment."] #[doc = ""] - pub const DMACFG_SRC_IS_DEVICE: _bindgen_ty_5 = 1; #[doc = "DMA destination is a device/peripheral. Address will not auto-increment."] #[doc = ""] - pub const DMACFG_DST_IS_DEVICE: _bindgen_ty_5 = 2; #[doc = "Make [`svcStartInterProcessDma`] wait for the channel to be unlocked."] #[doc = ""] - pub const DMACFG_WAIT_AVAILABLE: _bindgen_ty_5 = 4; #[doc = "Keep the channel locked after the transfer. Required for [`svcRestartDma`]"] #[doc = ""] - pub const DMACFG_KEEP_LOCKED: _bindgen_ty_5 = 8; #[doc = "Use the provided source device configuration even if the DMA source is not a device."] #[doc = ""] - pub const DMACFG_USE_SRC_CONFIG: _bindgen_ty_5 = 64; #[doc = "Use the provided destination device configuration even if the DMA destination is not a device."] #[doc = ""] - pub const DMACFG_USE_DST_CONFIG: _bindgen_ty_5 = 128; #[doc = "Configuration flags for [`DmaConfig`]"] #[doc = ""] - pub type _bindgen_ty_5 = ::libc::c_uint; #[doc = "Unlock the channel after transfer."] #[doc = ""] - pub const DMARST_UNLOCK: _bindgen_ty_6 = 1; #[doc = "Replace DMAFLUSHP instructions by NOP (they may not be regenerated even if this flag is not set)."] #[doc = ""] - pub const DMARST_RESUME_DEVICE: _bindgen_ty_6 = 2; #[doc = "Configuration flags for [`svcRestartDma`]"] #[doc = ""] - pub type _bindgen_ty_6 = ::libc::c_uint; #[doc = "Device configuration structure, part of [`DmaConfig`]"] +#[doc = ""] #[doc = "- if (and only if) src/dst is a device, then src/dst won't be auto-incremented."] #[doc = "- the kernel uses DMAMOV instead of DMAADNH, when having to decrement (possibly working around an erratum);"] #[doc = "this forces all loops to be unrolled -- you need to keep that in mind when using negative increments, as the kernel"] #[doc = "uses a limit of 100 DMA instruction bytes per channel."] +#[doc = ""] #[doc = "# Notes"] #[doc = ""] - +#[doc = "*"] +#[doc = ""] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaDeviceConfig { -#[doc = "DMA device ID."] -#[doc = ""] - + #[doc = "DMA device ID."] + #[doc = ""] pub deviceId: s8, -#[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] -#[doc = ""] - + #[doc = "Mask of allowed access alignments (8, 4, 2, 1)."] + #[doc = ""] pub allowedAlignments: s8, -#[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] -#[doc = ""] - + #[doc = "Number of bytes transferred in a burst loop. Can be 0 (in which case the max allowed alignment is used as unit)."] + #[doc = ""] pub burstSize: s16, -#[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] -#[doc = ""] - + #[doc = "Number of bytes transferred in a \"transfer\" loop (made of burst loops)."] + #[doc = ""] pub transferSize: s16, -#[doc = "Burst loop stride, can be <= 0."] -#[doc = ""] - + #[doc = "Burst loop stride, can be <= 0."] + #[doc = ""] pub burstStride: s16, - + #[doc = "\"Transfer\" loop stride, can be <= 0."] + #[doc = ""] pub transferStride: s16, } #[doc = "Configuration stucture for [`svcStartInterProcessDma`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DmaConfig { -#[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] -#[doc = ""] - + #[doc = "Channel ID (Arm11: 0-7, Arm9: 0-1). Use -1 to auto-assign to a free channel (Arm11: 3-7, Arm9: 0-1)."] + #[doc = ""] pub channelId: s8, -#[doc = "Endian swap size (can be 0)."] -#[doc = ""] - + #[doc = "Endian swap size (can be 0)."] + #[doc = ""] pub endianSwapSize: s8, -#[doc = "DMACFG_* flags."] -#[doc = ""] - + #[doc = "DMACFG_* flags."] + #[doc = ""] pub flags: u8_, pub _padding: u8_, -#[doc = "Source device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] -#[doc = ""] - + #[doc = "Source device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] + #[doc = ""] pub srcCfg: DmaDeviceConfig, -#[doc = "Destination device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] -#[doc = ""] - + #[doc = "Destination device configuration, read if [`DMACFG_SRC_IS_DEVICE`] and/or [`DMACFG_USE_SRC_CONFIG`] are set."] + #[doc = ""] pub dstCfg: DmaDeviceConfig, } #[doc = "Enable and lock perfmon. functionality."] #[doc = ""] - pub const PERFCOUNTEROP_ENABLE: PerfCounterOperation = 0; #[doc = "Disable and forcibly unlock perfmon. functionality."] #[doc = ""] - pub const PERFCOUNTEROP_DISABLE: PerfCounterOperation = 1; #[doc = "Get the value of a counter register."] #[doc = ""] - pub const PERFCOUNTEROP_GET_VALUE: PerfCounterOperation = 2; #[doc = "Set the value of a counter register."] #[doc = ""] - pub const PERFCOUNTEROP_SET_VALUE: PerfCounterOperation = 3; #[doc = "Get the overflow flags for all CP15 and SCU counters."] #[doc = ""] - pub const PERFCOUNTEROP_GET_OVERFLOW_FLAGS: PerfCounterOperation = 4; #[doc = "Reset the value and/or overflow flags of selected counters."] #[doc = ""] - pub const PERFCOUNTEROP_RESET: PerfCounterOperation = 5; #[doc = "Get the event ID associated to a particular counter."] #[doc = ""] - pub const PERFCOUNTEROP_GET_EVENT: PerfCounterOperation = 6; #[doc = "Set the event ID associated to a paritcular counter."] #[doc = ""] - pub const PERFCOUNTEROP_SET_EVENT: PerfCounterOperation = 7; #[doc = "(Dis)allow the kernel to track counter overflows and to use 64-bit counter values."] #[doc = ""] - pub const PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED: PerfCounterOperation = 8; #[doc = "Operations for [`svcControlPerformanceCounter`]"] #[doc = ""] - pub type PerfCounterOperation = ::libc::c_uint; pub const PERFCOUNTERREG_CORE_BASE: PerfCounterRegister = 0; #[doc = "CP15 PMN0."] #[doc = ""] - pub const PERFCOUNTERREG_CORE_COUNT_REG_0: PerfCounterRegister = 0; #[doc = "CP15 PMN1."] #[doc = ""] - pub const PERFCOUNTERREG_CORE_COUNT_REG_1: PerfCounterRegister = 1; #[doc = "CP15 CCNT."] #[doc = ""] - pub const PERFCOUNTERREG_CORE_CYCLE_COUNTER: PerfCounterRegister = 2; pub const PERFCOUNTERREG_SCU_BASE: PerfCounterRegister = 16; #[doc = "SCU MN0."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_0: PerfCounterRegister = 16; #[doc = "SCU MN1."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_1: PerfCounterRegister = 17; #[doc = "SCU MN2."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_2: PerfCounterRegister = 18; #[doc = "SCU MN3."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_3: PerfCounterRegister = 19; #[doc = "SCU MN4. Prod-N3DS only. IRQ line missing."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_4: PerfCounterRegister = 20; #[doc = "SCU MN5. Prod-N3DS only. IRQ line missing."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_5: PerfCounterRegister = 21; #[doc = "SCU MN6. Prod-N3DS only. IRQ line missing."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_6: PerfCounterRegister = 22; #[doc = "SCU MN7. Prod-N3DS only. IRQ line missing."] #[doc = ""] - pub const PERFCOUNTERREG_SCU_7: PerfCounterRegister = 23; #[doc = "Performance counter register IDs (CP15 and SCU)."] #[doc = ""] - pub type PerfCounterRegister = ::libc::c_uint; pub const PERFCOUNTEREVT_CORE_BASE: PerfCounterEvent = 0; pub const PERFCOUNTEREVT_CORE_INST_CACHE_MISS: PerfCounterEvent = 0; @@ -2182,12 +2049,10 @@ pub const PERFCOUNTEREVT_CORE_MERGE_IN_STORE_BUFFER: PerfCounterEvent = 20; #[doc = "One cycle elapsed."] #[doc = ""] - pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT: PerfCounterEvent = 255; #[doc = "64 cycles elapsed."] #[doc = ""] - pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT_64: PerfCounterEvent = 4095; pub const PERFCOUNTEREVT_SCU_BASE: PerfCounterEvent = 4096; pub const PERFCOUNTEREVT_SCU_DISABLED: PerfCounterEvent = 4096; @@ -2212,66 +2077,57 @@ pub const PERFCOUNTEREVT_SCU_EXTERNAL_READ: PerfCounterEvent = 4114; pub const PERFCOUNTEREVT_SCU_EXTERNAL_WRITE: PerfCounterEvent = 4115; pub const PERFCOUNTEREVT_SCU_CYCLE_COUNT: PerfCounterEvent = 4127; #[doc = "Performance counter event IDs (CP15 or SCU)."] +#[doc = ""] #[doc = "- CP15: "] #[doc = "- SCU: "] +#[doc = ""] #[doc = "# Notes"] -#[doc = "Refer to:"] #[doc = ""] - +#[doc = "* Refer to:"] +#[doc = ""] pub type PerfCounterEvent = ::libc::c_uint; #[doc = "Event relating to the attachment of a process."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachProcessEvent { -#[doc = "ID of the program."] -#[doc = ""] - + #[doc = "ID of the program."] + #[doc = ""] pub program_id: u64_, -#[doc = "Name of the process."] -#[doc = ""] - + #[doc = "Name of the process."] + #[doc = ""] pub process_name: [::libc::c_char; 8usize], -#[doc = "ID of the process."] -#[doc = ""] - + #[doc = "ID of the process."] + #[doc = ""] pub process_id: u32_, -#[doc = "Always 0"] -#[doc = ""] - + #[doc = "Always 0"] + #[doc = ""] pub other_flags: u32_, } #[doc = "Process exited either normally or due to an uncaught exception."] #[doc = ""] - pub const EXITPROCESS_EVENT_EXIT: ExitProcessEventReason = 0; #[doc = "Process has been terminated by [`svcTerminateProcess`]"] #[doc = ""] - pub const EXITPROCESS_EVENT_TERMINATE: ExitProcessEventReason = 1; #[doc = "Process has been terminated by [`svcTerminateDebugProcess`]"] #[doc = ""] - pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2; #[doc = "Reasons for an exit process event."] #[doc = ""] - pub type ExitProcessEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a process."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitProcessEvent { -#[doc = "Reason for exiting. See [`ExitProcessEventReason`]"] -#[doc = ""] - + #[doc = "Reason for exiting. See [`ExitProcessEventReason`]"] + #[doc = ""] pub reason: ExitProcessEventReason, } impl Default for ExitProcessEvent { @@ -2285,57 +2141,46 @@ impl Default for ExitProcessEvent { } #[doc = "Event relating to the attachment of a thread."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AttachThreadEvent { -#[doc = "ID of the creating thread."] -#[doc = ""] - + #[doc = "ID of the creating thread."] + #[doc = ""] pub creator_thread_id: u32_, -#[doc = "Thread local storage."] -#[doc = ""] - + #[doc = "Thread local storage."] + #[doc = ""] pub thread_local_storage: u32_, -#[doc = "Entry point of the thread."] -#[doc = ""] - + #[doc = "Entry point of the thread."] + #[doc = ""] pub entry_point: u32_, } #[doc = "Thread exited."] #[doc = ""] - pub const EXITTHREAD_EVENT_EXIT: ExitThreadEventReason = 0; #[doc = "Thread terminated."] #[doc = ""] - pub const EXITTHREAD_EVENT_TERMINATE: ExitThreadEventReason = 1; #[doc = "Process exited either normally or due to an uncaught exception."] #[doc = ""] - pub const EXITTHREAD_EVENT_EXIT_PROCESS: ExitThreadEventReason = 2; #[doc = "Process has been terminated by [`svcTerminateProcess`]"] #[doc = ""] - pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3; #[doc = "Reasons for an exit thread event."] #[doc = ""] - pub type ExitThreadEventReason = ::libc::c_uint; #[doc = "Event relating to the exiting of a thread."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExitThreadEvent { -#[doc = "Reason for exiting. See [`ExitThreadEventReason`]"] -#[doc = ""] - + #[doc = "Reason for exiting. See [`ExitThreadEventReason`]"] + #[doc = ""] pub reason: ExitThreadEventReason, } impl Default for ExitThreadEvent { @@ -2350,127 +2195,102 @@ impl Default for ExitThreadEvent { #[doc = "Panic."] #[doc = ""] - pub const USERBREAK_PANIC: UserBreakType = 0; #[doc = "Assertion failed."] #[doc = ""] - pub const USERBREAK_ASSERT: UserBreakType = 1; #[doc = "User related."] #[doc = ""] - pub const USERBREAK_USER: UserBreakType = 2; #[doc = "Load RO."] #[doc = ""] - pub const USERBREAK_LOAD_RO: UserBreakType = 3; #[doc = "Unload RO."] #[doc = ""] - pub const USERBREAK_UNLOAD_RO: UserBreakType = 4; #[doc = "Reasons for a user break."] #[doc = ""] - pub type UserBreakType = ::libc::c_uint; #[doc = "Undefined instruction."] #[doc = ""] - pub const EXCEVENT_UNDEFINED_INSTRUCTION: ExceptionEventType = 0; #[doc = "Prefetch abort."] #[doc = ""] - pub const EXCEVENT_PREFETCH_ABORT: ExceptionEventType = 1; #[doc = "Data abort (other than the below kind)."] #[doc = ""] - pub const EXCEVENT_DATA_ABORT: ExceptionEventType = 2; #[doc = "Unaligned data access."] #[doc = ""] - pub const EXCEVENT_UNALIGNED_DATA_ACCESS: ExceptionEventType = 3; #[doc = "Attached break."] #[doc = ""] - pub const EXCEVENT_ATTACH_BREAK: ExceptionEventType = 4; #[doc = "Stop point reached."] #[doc = ""] - pub const EXCEVENT_STOP_POINT: ExceptionEventType = 5; #[doc = "User break occurred."] #[doc = ""] - pub const EXCEVENT_USER_BREAK: ExceptionEventType = 6; #[doc = "Debugger break occurred."] #[doc = ""] - pub const EXCEVENT_DEBUGGER_BREAK: ExceptionEventType = 7; #[doc = "Undefined syscall."] #[doc = ""] - pub const EXCEVENT_UNDEFINED_SYSCALL: ExceptionEventType = 8; #[doc = "Reasons for an exception event."] #[doc = ""] - pub type ExceptionEventType = ::libc::c_uint; #[doc = "Event relating to fault exceptions (CPU exceptions other than stop points and undefined syscalls)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FaultExceptionEvent { -#[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] -#[doc = ""] - + #[doc = "FAR (for DATA ABORT / UNALIGNED DATA ACCESS), attempted syscall or 0"] + #[doc = ""] pub fault_information: u32_, } #[doc = "See [`SVC_STOP_POINT`]"] #[doc = ""] - pub const STOPPOINT_SVC_FF: StopPointType = 0; #[doc = "Breakpoint."] #[doc = ""] - pub const STOPPOINT_BREAKPOINT: StopPointType = 1; #[doc = "Watchpoint."] #[doc = ""] - pub const STOPPOINT_WATCHPOINT: StopPointType = 2; #[doc = "Stop point types"] #[doc = ""] - pub type StopPointType = ::libc::c_uint; #[doc = "Event relating to stop points"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StopPointExceptionEvent { -#[doc = "Stop point type, see [`StopPointType`]"] -#[doc = ""] - + #[doc = "Stop point type, see [`StopPointType`]"] + #[doc = ""] pub type_: StopPointType, -#[doc = "FAR for Watchpoints, otherwise 0."] -#[doc = ""] - + #[doc = "FAR for Watchpoints, otherwise 0."] + #[doc = ""] pub fault_information: u32_, } impl Default for StopPointExceptionEvent { @@ -2484,21 +2304,17 @@ impl Default for StopPointExceptionEvent { } #[doc = "Event relating to [`svcBreak`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UserBreakExceptionEvent { -#[doc = "User break type, see [`UserBreakType`]"] -#[doc = ""] - + #[doc = "User break type, see [`UserBreakType`]"] + #[doc = ""] pub type_: UserBreakType, -#[doc = "For LOAD_RO and UNLOAD_RO."] -#[doc = ""] - + #[doc = "For LOAD_RO and UNLOAD_RO."] + #[doc = ""] pub croInfo: u32_, -#[doc = "For LOAD_RO and UNLOAD_RO."] -#[doc = ""] - + #[doc = "For LOAD_RO and UNLOAD_RO."] + #[doc = ""] pub croInfoSize: u32_, } impl Default for UserBreakExceptionEvent { @@ -2512,49 +2328,40 @@ impl Default for UserBreakExceptionEvent { } #[doc = "Event relating to [`svcBreakDebugProcess`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DebuggerBreakExceptionEvent { -#[doc = "IDs of the attached process's threads that were running on each core at the time of the [`svcBreakDebugProcess`] call, or -1 (only the first 2 values are meaningful on O3DS)."] -#[doc = ""] - + #[doc = "IDs of the attached process's threads that were running on each core at the time of the [`svcBreakDebugProcess`] call, or -1 (only the first 2 values are meaningful on O3DS)."] + #[doc = ""] pub thread_ids: [s32; 4usize], } #[doc = "Event relating to exceptions."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct ExceptionEvent { -#[doc = "Type of event. See [`ExceptionEventType`]"] -#[doc = ""] - + #[doc = "Type of event. See [`ExceptionEventType`]"] + #[doc = ""] pub type_: ExceptionEventType, -#[doc = "Address of the exception."] -#[doc = ""] - + #[doc = "Address of the exception."] + #[doc = ""] pub address: u32_, pub __bindgen_anon_1: ExceptionEvent__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ExceptionEvent__bindgen_ty_1 { -#[doc = "Fault exception event data."] -#[doc = ""] - + #[doc = "Fault exception event data."] + #[doc = ""] pub fault: FaultExceptionEvent, -#[doc = "Stop point exception event data."] -#[doc = ""] - + #[doc = "Stop point exception event data."] + #[doc = ""] pub stop_point: StopPointExceptionEvent, -#[doc = "User break exception event data."] -#[doc = ""] - + #[doc = "User break exception event data."] + #[doc = ""] pub user_break: UserBreakExceptionEvent, -#[doc = "Debugger break exception event data"] -#[doc = ""] - + #[doc = "Debugger break exception event data"] + #[doc = ""] pub debugger_break: DebuggerBreakExceptionEvent, } impl Default for ExceptionEvent__bindgen_ty_1 { @@ -2577,66 +2384,53 @@ impl Default for ExceptionEvent { } #[doc = "Event relating to the scheduler."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ScheduleInOutEvent { -#[doc = "Clock tick that the event occurred."] -#[doc = ""] - + #[doc = "Clock tick that the event occurred."] + #[doc = ""] pub clock_tick: u64_, } #[doc = "Event relating to syscalls."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SyscallInOutEvent { -#[doc = "Clock tick that the event occurred."] -#[doc = ""] - + #[doc = "Clock tick that the event occurred."] + #[doc = ""] pub clock_tick: u64_, -#[doc = "Syscall sent/received."] -#[doc = ""] - + #[doc = "Syscall sent/received."] + #[doc = ""] pub syscall: u32_, } #[doc = "Event relating to debug output."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OutputStringEvent { -#[doc = "Address of the outputted string."] -#[doc = ""] - + #[doc = "Address of the outputted string."] + #[doc = ""] pub string_addr: u32_, -#[doc = "Size of the outputted string."] -#[doc = ""] - + #[doc = "Size of the outputted string."] + #[doc = ""] pub string_size: u32_, } #[doc = "Event relating to the mapping of memory."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MapEvent { -#[doc = "Mapped address."] -#[doc = ""] - + #[doc = "Mapped address."] + #[doc = ""] pub mapped_addr: u32_, -#[doc = "Mapped size."] -#[doc = ""] - + #[doc = "Mapped size."] + #[doc = ""] pub mapped_size: u32_, -#[doc = "Memory permissions. See [`MemPerm`]"] -#[doc = ""] - + #[doc = "Memory permissions. See [`MemPerm`]"] + #[doc = ""] pub memperm: MemPerm, -#[doc = "Memory state. See [`MemState`]"] -#[doc = ""] - + #[doc = "Memory state. See [`MemState`]"] + #[doc = ""] pub memstate: MemState, } impl Default for MapEvent { @@ -2651,135 +2445,107 @@ impl Default for MapEvent { #[doc = "Process attached event."] #[doc = ""] - pub const DBGEVENT_ATTACH_PROCESS: DebugEventType = 0; #[doc = "Thread attached event."] #[doc = ""] - pub const DBGEVENT_ATTACH_THREAD: DebugEventType = 1; #[doc = "Thread exit event."] #[doc = ""] - pub const DBGEVENT_EXIT_THREAD: DebugEventType = 2; #[doc = "Process exit event."] #[doc = ""] - pub const DBGEVENT_EXIT_PROCESS: DebugEventType = 3; #[doc = "Exception event."] #[doc = ""] - pub const DBGEVENT_EXCEPTION: DebugEventType = 4; #[doc = "DLL load event."] #[doc = ""] - pub const DBGEVENT_DLL_LOAD: DebugEventType = 5; #[doc = "DLL unload event."] #[doc = ""] - pub const DBGEVENT_DLL_UNLOAD: DebugEventType = 6; #[doc = "Schedule in event."] #[doc = ""] - pub const DBGEVENT_SCHEDULE_IN: DebugEventType = 7; #[doc = "Schedule out event."] #[doc = ""] - pub const DBGEVENT_SCHEDULE_OUT: DebugEventType = 8; #[doc = "Syscall in event."] #[doc = ""] - pub const DBGEVENT_SYSCALL_IN: DebugEventType = 9; #[doc = "Syscall out event."] #[doc = ""] - pub const DBGEVENT_SYSCALL_OUT: DebugEventType = 10; #[doc = "Output string event."] #[doc = ""] - pub const DBGEVENT_OUTPUT_STRING: DebugEventType = 11; #[doc = "Map event."] #[doc = ""] - pub const DBGEVENT_MAP: DebugEventType = 12; #[doc = "Debug event type."] #[doc = ""] - pub type DebugEventType = ::libc::c_uint; #[doc = "Information about a debug event."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct DebugEventInfo { -#[doc = "Type of event. See [`DebugEventType`]"] -#[doc = ""] - + #[doc = "Type of event. See [`DebugEventType`]"] + #[doc = ""] pub type_: DebugEventType, -#[doc = "ID of the thread."] -#[doc = ""] - + #[doc = "ID of the thread."] + #[doc = ""] pub thread_id: u32_, -#[doc = "Flags. Bit0 means that [`svcContinueDebugEvent`] needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] -#[doc = ""] - + #[doc = "Flags. Bit0 means that [`svcContinueDebugEvent`] needs to be called for this event (except for EXIT PROCESS events, where this flag is disregarded)."] + #[doc = ""] pub flags: u32_, -#[doc = "Always 0."] -#[doc = ""] - + #[doc = "Always 0."] + #[doc = ""] pub remnants: [u8_; 4usize], pub __bindgen_anon_1: DebugEventInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union DebugEventInfo__bindgen_ty_1 { -#[doc = "Process attachment event data."] -#[doc = ""] - + #[doc = "Process attachment event data."] + #[doc = ""] pub attach_process: AttachProcessEvent, -#[doc = "Thread attachment event data."] -#[doc = ""] - + #[doc = "Thread attachment event data."] + #[doc = ""] pub attach_thread: AttachThreadEvent, -#[doc = "Thread exit event data."] -#[doc = ""] - + #[doc = "Thread exit event data."] + #[doc = ""] pub exit_thread: ExitThreadEvent, -#[doc = "Process exit event data."] -#[doc = ""] - + #[doc = "Process exit event data."] + #[doc = ""] pub exit_process: ExitProcessEvent, -#[doc = "Exception event data."] -#[doc = ""] - + #[doc = "Exception event data."] + #[doc = ""] pub exception: ExceptionEvent, -#[doc = "Schedule in/out event data."] -#[doc = ""] - + #[doc = "Schedule in/out event data."] + #[doc = ""] pub scheduler: ScheduleInOutEvent, -#[doc = "Syscall in/out event data."] -#[doc = ""] - + #[doc = "Syscall in/out event data."] + #[doc = ""] pub syscall: SyscallInOutEvent, -#[doc = "Output string event data."] -#[doc = ""] - + #[doc = "Output string event data."] + #[doc = ""] pub output_string: OutputStringEvent, -#[doc = "Map event data."] -#[doc = ""] - + #[doc = "Map event data."] + #[doc = ""] pub map: MapEvent, } impl Default for DebugEventInfo__bindgen_ty_1 { @@ -2803,43 +2569,35 @@ impl Default for DebugEventInfo { #[doc = "Inhibit user-defined CPU exception handlers (including watchpoints and breakpoints, regardless of any [`svcKernelSetState`] call)."] #[doc = ""] - pub const DBG_INHIBIT_USER_CPU_EXCEPTION_HANDLERS: DebugFlags = 1; #[doc = "Signal fault exception events. See [`FaultExceptionEvent`]"] #[doc = ""] - pub const DBG_SIGNAL_FAULT_EXCEPTION_EVENTS: DebugFlags = 2; #[doc = "Signal schedule in/out events. See [`ScheduleInOutEvent`]"] #[doc = ""] - pub const DBG_SIGNAL_SCHEDULE_EVENTS: DebugFlags = 4; #[doc = "Signal syscall in/out events. See [`SyscallInOutEvent`]"] #[doc = ""] - pub const DBG_SIGNAL_SYSCALL_EVENTS: DebugFlags = 8; #[doc = "Signal map events. See [`MapEvent`]"] #[doc = ""] - pub const DBG_SIGNAL_MAP_EVENTS: DebugFlags = 16; #[doc = "Debug flags for an attached process, set by [`svcContinueDebugEvent`]"] #[doc = ""] - pub type DebugFlags = ::libc::c_uint; #[repr(C)] #[derive(Copy, Clone)] pub struct ThreadContext { -#[doc = "CPU registers."] -#[doc = ""] - + #[doc = "CPU registers."] + #[doc = ""] pub cpu_registers: CpuRegisters, -#[doc = "FPU registers."] -#[doc = ""] - + #[doc = "FPU registers."] + #[doc = ""] pub fpu_registers: FpuRegisters, } impl Default for ThreadContext { @@ -2854,148 +2612,117 @@ impl Default for ThreadContext { #[doc = "Control r0-r12."] #[doc = ""] - pub const THREADCONTEXT_CONTROL_CPU_GPRS: ThreadContextControlFlags = 1; #[doc = "Control sp, lr, pc, cpsr."] #[doc = ""] - pub const THREADCONTEXT_CONTROL_CPU_SPRS: ThreadContextControlFlags = 2; #[doc = "Control d0-d15 (or s0-s31)."] #[doc = ""] - pub const THREADCONTEXT_CONTROL_FPU_GPRS: ThreadContextControlFlags = 4; #[doc = "Control fpscr, fpexc."] #[doc = ""] - pub const THREADCONTEXT_CONTROL_FPU_SPRS: ThreadContextControlFlags = 8; #[doc = "Control r0-r12, sp, lr, pc, cpsr."] #[doc = ""] - pub const THREADCONTEXT_CONTROL_CPU_REGS: ThreadContextControlFlags = 3; #[doc = "Control d0-d15, fpscr, fpexc."] #[doc = ""] - pub const THREADCONTEXT_CONTROL_FPU_REGS: ThreadContextControlFlags = 12; #[doc = "Control all of the above."] #[doc = ""] - pub const THREADCONTEXT_CONTROL_ALL: ThreadContextControlFlags = 15; #[doc = "Control flags for [`svcGetDebugThreadContext`] and [`svcSetDebugThreadContext`]"] #[doc = ""] - pub type ThreadContextControlFlags = ::libc::c_uint; #[doc = "Thread priority."] #[doc = ""] - pub const DBGTHREAD_PARAMETER_PRIORITY: DebugThreadParameter = 0; #[doc = "Low scheduling mask."] #[doc = ""] - pub const DBGTHREAD_PARAMETER_SCHEDULING_MASK_LOW: DebugThreadParameter = 1; #[doc = "Ideal processor."] #[doc = ""] - pub const DBGTHREAD_PARAMETER_CPU_IDEAL: DebugThreadParameter = 2; #[doc = "Processor that created the threod."] #[doc = ""] - pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3; #[doc = "Thread parameter field for [`svcGetDebugThreadParameter`]"] #[doc = ""] - pub type DebugThreadParameter = ::libc::c_uint; #[doc = "Information on address space for process. All sizes are in pages (0x1000 bytes)"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CodeSetInfo { -#[doc = "ASCII name of codeset"] -#[doc = ""] - + #[doc = "ASCII name of codeset"] + #[doc = ""] pub name: [u8_; 8usize], pub unk1: u16_, pub unk2: u16_, pub unk3: u32_, -#[doc = ".text start address"] -#[doc = ""] - + #[doc = ".text start address"] + #[doc = ""] pub text_addr: u32_, -#[doc = ".text number of pages"] -#[doc = ""] - + #[doc = ".text number of pages"] + #[doc = ""] pub text_size: u32_, -#[doc = ".rodata start address"] -#[doc = ""] - + #[doc = ".rodata start address"] + #[doc = ""] pub ro_addr: u32_, -#[doc = ".rodata number of pages"] -#[doc = ""] - + #[doc = ".rodata number of pages"] + #[doc = ""] pub ro_size: u32_, -#[doc = ".data, .bss start address"] -#[doc = ""] - + #[doc = ".data, .bss start address"] + #[doc = ""] pub rw_addr: u32_, -#[doc = ".data number of pages"] -#[doc = ""] - + #[doc = ".data number of pages"] + #[doc = ""] pub rw_size: u32_, -#[doc = "total pages for .text (aligned)"] -#[doc = ""] - + #[doc = "total pages for .text (aligned)"] + #[doc = ""] pub text_size_total: u32_, -#[doc = "total pages for .rodata (aligned)"] -#[doc = ""] - + #[doc = "total pages for .rodata (aligned)"] + #[doc = ""] pub ro_size_total: u32_, -#[doc = "total pages for .data, .bss (aligned)"] -#[doc = ""] - + #[doc = "total pages for .data, .bss (aligned)"] + #[doc = ""] pub rw_size_total: u32_, pub unk4: u32_, -#[doc = "Program ID"] -#[doc = ""] - + #[doc = "Program ID"] + #[doc = ""] pub program_id: u64_, } #[doc = "Information for the main thread of a process."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StartupInfo { -#[doc = "Priority of the main thread."] -#[doc = ""] - + #[doc = "Priority of the main thread."] + #[doc = ""] pub priority: ::libc::c_int, -#[doc = "Size of the stack of the main thread."] -#[doc = ""] - + #[doc = "Size of the stack of the main thread."] + #[doc = ""] pub stack_size: u32_, -#[doc = "Unused on retail kernel."] -#[doc = ""] - + #[doc = "Unused on retail kernel."] + #[doc = ""] pub argc: ::libc::c_int, -#[doc = "Unused on retail kernel."] -#[doc = ""] - + #[doc = "Unused on retail kernel."] + #[doc = ""] pub argv: *mut u16_, -#[doc = "Unused on retail kernel."] -#[doc = ""] - + #[doc = "Unused on retail kernel."] + #[doc = ""] pub envp: *mut u16_, } impl Default for StartupInfo { @@ -3009,24 +2736,27 @@ impl Default for StartupInfo { } extern "C" { #[must_use] -#[doc = "# Memory management"] -#[doc = "Controls memory mapping"] -#[doc = "It has to be pointing to a RW memory."] -#[doc = "Use NULL if the operation is [`MEMOP_FREE`] or [`MEMOP_ALLOC`]"] -#[doc = "Value 0 is used when unmapping memory."] -#[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] -#[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] -#[doc = "More information is available at "] -#[doc = "[`svcControlProcessMemory`]"] -#[doc = "# Arguments"] -#[doc = "`addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] -#[doc = "`addr0` - The virtual address to be used for the operation."] -#[doc = "`addr1` - The virtual address to be (un)mirrored by @p addr0 when using [`MEMOP_MAP`] or [`MEMOP_UNMAP`]"] -#[doc = "`size` - The requested size for [`MEMOP_ALLOC`] and [`MEMOP_ALLOC_LINEAR`]"] -#[doc = "`op` - Operation flags. See [`MemOp`]"] -#[doc = "`perm` - A combination of [`MEMPERM_READ`] and [`MEMPERM_WRITE`] Using MEMPERM_EXECUTE will return an error."] -#[doc = ""] - + #[doc = "# Memory management"] + #[doc = ""] + #[doc = "Controls memory mapping"] + #[doc = ""] + #[doc = "It has to be pointing to a RW memory."] + #[doc = "Use NULL if the operation is [`MEMOP_FREE`] or [`MEMOP_ALLOC`]"] + #[doc = "Value 0 is used when unmapping memory."] + #[doc = "If a memory is mapped for two or more addresses, you have to use MEMOP_UNMAP before being able to MEMOP_FREE it."] + #[doc = "MEMOP_MAP will fail if @p addr1 was already mapped to another address."] + #[doc = "More information is available at "] + #[doc = "[`svcControlProcessMemory`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr_out` - The virtual address resulting from the operation. Usually the same as addr0. [Direction: In, Out]"] + #[doc = "* `addr0` - The virtual address to be used for the operation."] + #[doc = "* `addr1` - The virtual address to be (un)mirrored by @p addr0 when using [`MEMOP_MAP`] or [`MEMOP_UNMAP`]"] + #[doc = "* `size` - The requested size for [`MEMOP_ALLOC`] and [`MEMOP_ALLOC_LINEAR`]"] + #[doc = "* `op` - Operation flags. See [`MemOp`]"] + #[doc = "* `perm` - A combination of [`MEMPERM_READ`] and [`MEMPERM_WRITE`] Using MEMPERM_EXECUTE will return an error."] + #[doc = ""] pub fn svcControlMemory( addr_out: *mut u32_, addr0: u32_, @@ -3038,18 +2768,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Controls the memory mapping of a process"] -#[doc = "This is the only SVC which allows mapping executable memory."] -#[doc = "Using [`MEMOP_PROT`] will change the memory permissions of an already mapped memory."] -#[doc = "[`svcControlProcess`]"] -#[doc = "# Arguments"] -#[doc = "`addr0` - The virtual address to map"] -#[doc = "`addr1` - The virtual address to be mapped by @p addr0"] -#[doc = "`type` - Only operations [`MEMOP_MAP`] [`MEMOP_UNMAP`] and [`MEMOP_PROT`] are allowed."] -#[doc = "# Notes"] -#[doc = "The pseudo handle for the current process is not supported by this service call."] -#[doc = ""] - + #[doc = "Controls the memory mapping of a process"] + #[doc = ""] + #[doc = "This is the only SVC which allows mapping executable memory."] + #[doc = "Using [`MEMOP_PROT`] will change the memory permissions of an already mapped memory."] + #[doc = "[`svcControlProcess`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr0` - The virtual address to map"] + #[doc = "* `addr1` - The virtual address to be mapped by @p addr0"] + #[doc = "* `type` - Only operations [`MEMOP_MAP`] [`MEMOP_UNMAP`] and [`MEMOP_PROT`] are allowed."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The pseudo handle for the current process is not supported by this service call."] + #[doc = ""] pub fn svcControlProcessMemory( process: Handle, addr0: u32_, @@ -3061,17 +2795,20 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a block of shared memory"] -#[doc = "# Arguments"] -#[doc = "`memblock` - Pointer to store the handle of the block [Direction: In, Out]"] -#[doc = "`addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] -#[doc = "`size` - Size of the memory to map, a multiple of 0x1000."] -#[doc = "`my_perm` - Memory permissions for the current process"] -#[doc = "`other_perm` - Memory permissions for the other processes"] -#[doc = "# Notes"] -#[doc = "The shared memory block, and its rights, are destroyed when the handle is closed."] -#[doc = ""] - + #[doc = "Creates a block of shared memory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `memblock` - Pointer to store the handle of the block [Direction: In, Out]"] + #[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] + #[doc = "* `size` - Size of the memory to map, a multiple of 0x1000."] + #[doc = "* `my_perm` - Memory permissions for the current process"] + #[doc = "* `other_perm` - Memory permissions for the other processes"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The shared memory block, and its rights, are destroyed when the handle is closed."] + #[doc = ""] pub fn svcCreateMemoryBlock( memblock: *mut Handle, addr: u32_, @@ -3082,16 +2819,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Maps a block of shared memory"] -#[doc = "# Arguments"] -#[doc = "`memblock` - Handle of the block"] -#[doc = "`addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] -#[doc = "`my_perm` - Memory permissions for the current process"] -#[doc = "`other_perm` - Memory permissions for the other processes"] -#[doc = "# Notes"] -#[doc = "The shared memory block, and its rights, are destroyed when the handle is closed."] -#[doc = ""] - + #[doc = "Maps a block of shared memory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `memblock` - Handle of the block"] + #[doc = "* `addr` - Address of the memory to map, page-aligned. So its alignment must be 0x1000."] + #[doc = "* `my_perm` - Memory permissions for the current process"] + #[doc = "* `other_perm` - Memory permissions for the other processes"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The shared memory block, and its rights, are destroyed when the handle is closed."] + #[doc = ""] pub fn svcMapMemoryBlock( memblock: Handle, addr: u32_, @@ -3101,57 +2841,62 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Maps a block of process memory, starting from address 0x00100000."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`destAddress` - Address of the block of memory to map, in the current (destination) process."] -#[doc = "`size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] -#[doc = ""] - + #[doc = "Maps a block of process memory, starting from address 0x00100000."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `destAddress` - Address of the block of memory to map, in the current (destination) process."] + #[doc = "* `size` - Size of the block of memory to map (truncated to a multiple of 0x1000 bytes)."] + #[doc = ""] pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Unmaps a block of process memory, starting from address 0x00100000."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`destAddress` - Address of the block of memory to unmap, in the current (destination) process."] -#[doc = "`size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] -#[doc = ""] - + #[doc = "Unmaps a block of process memory, starting from address 0x00100000."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `destAddress` - Address of the block of memory to unmap, in the current (destination) process."] + #[doc = "* `size` - Size of the block of memory to unmap (truncated to a multiple of 0x1000 bytes)."] + #[doc = ""] pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Unmaps a block of shared memory"] -#[doc = "# Arguments"] -#[doc = "`memblock` - Handle of the block"] -#[doc = "`addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] -#[doc = ""] - + #[doc = "Unmaps a block of shared memory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `memblock` - Handle of the block"] + #[doc = "* `addr` - Address of the memory to unmap, page-aligned. So its alignment must be 0x1000."] + #[doc = ""] pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Queries memory information."] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output memory info to. [Direction: In, Out]"] -#[doc = "`out` - Pointer to output page info to."] -#[doc = "`addr` - Virtual memory address to query."] -#[doc = ""] - + #[doc = "Queries memory information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] + #[doc = "* `out` - Pointer to output page info to."] + #[doc = "* `addr` - Virtual memory address to query."] + #[doc = ""] pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Queries process memory information."] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output memory info to. [Direction: In, Out]"] -#[doc = "`out` - Pointer to output page info to. [Direction: In, Out]"] -#[doc = "`process` - Process to query memory from."] -#[doc = "`addr` - Virtual memory address to query."] -#[doc = ""] - + #[doc = "Queries process memory information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] + #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] + #[doc = "* `process` - Process to query memory from."] + #[doc = "* `addr` - Virtual memory address to query."] + #[doc = ""] pub fn svcQueryProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -3161,60 +2906,65 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "# Process management"] -#[doc = "Gets the handle of a process."] -#[doc = "# Arguments"] -#[doc = "`process` - The handle of the process [Direction: In, Out]"] -#[doc = "`processId` - The ID of the process to open"] -#[doc = ""] - + #[doc = "# Process management"] + #[doc = ""] + #[doc = "Gets the handle of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - The handle of the process [Direction: In, Out]"] + #[doc = "* `processId` - The ID of the process to open"] + #[doc = ""] pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result; } extern "C" { -#[doc = "Exits the current process."] -#[doc = ""] - + #[doc = "Exits the current process."] + #[doc = ""] pub fn svcExitProcess(); } extern "C" { #[must_use] -#[doc = "Terminates a process."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process to terminate."] -#[doc = ""] - + #[doc = "Terminates a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process to terminate."] + #[doc = ""] pub fn svcTerminateProcess(process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets information about a process."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output process info to. [Direction: In, Out]"] -#[doc = "`process` - Handle of the process to get information about."] -#[doc = "`type` - Type of information to retreieve."] -#[doc = ""] - + #[doc = "Gets information about a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output process info to. [Direction: In, Out]"] + #[doc = "* `process` - Handle of the process to get information about."] + #[doc = "* `type` - Type of information to retreieve."] + #[doc = ""] pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the ID of a process."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the process ID to. [Direction: In, Out]"] -#[doc = "`handle` - Handle of the process to get the ID of."] -#[doc = ""] - + #[doc = "Gets the ID of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the process ID to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle of the process to get the ID of."] + #[doc = ""] pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a list of running processes."] -#[doc = "# Arguments"] -#[doc = "`processCount` - Pointer to output the process count to. [Direction: In, Out]"] -#[doc = "`processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] -#[doc = "`processIdMaxCount` - Maximum number of process IDs."] -#[doc = ""] - + #[doc = "Gets a list of running processes."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processCount` - Pointer to output the process count to. [Direction: In, Out]"] + #[doc = "* `processIds` - Pointer to output the process IDs to. [Direction: In, Out]"] + #[doc = "* `processIdMaxCount` - Maximum number of process IDs."] + #[doc = ""] pub fn svcGetProcessList( processCount: *mut s32, processIds: *mut u32_, @@ -3223,14 +2973,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a list of the threads of a process."] -#[doc = "# Arguments"] -#[doc = "`threadCount` - Pointer to output the thread count to. [Direction: In, Out]"] -#[doc = "`threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] -#[doc = "`threadIdMaxCount` - Maximum number of thread IDs."] -#[doc = "`process` - Process handle to list the threads of."] -#[doc = ""] - + #[doc = "Gets a list of the threads of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `threadCount` - Pointer to output the thread count to. [Direction: In, Out]"] + #[doc = "* `threadIds` - Pointer to output the thread IDs to. [Direction: In, Out]"] + #[doc = "* `threadIdMaxCount` - Maximum number of thread IDs."] + #[doc = "* `process` - Process handle to list the threads of."] + #[doc = ""] pub fn svcGetThreadList( threadCount: *mut s32, threadIds: *mut u32_, @@ -3240,14 +2991,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a port."] -#[doc = "# Arguments"] -#[doc = "`portServer` - Pointer to output the port server handle to. [Direction: In, Out]"] -#[doc = "`portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] -#[doc = "`name` - Name of the port."] -#[doc = "`maxSessions` - Maximum number of sessions that can connect to the port."] -#[doc = ""] - + #[doc = "Creates a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `portServer` - Pointer to output the port server handle to. [Direction: In, Out]"] + #[doc = "* `portClient` - Pointer to output the port client handle to. [Direction: In, Out]"] + #[doc = "* `name` - Name of the port."] + #[doc = "* `maxSessions` - Maximum number of sessions that can connect to the port."] + #[doc = ""] pub fn svcCreatePort( portServer: *mut Handle, portClient: *mut Handle, @@ -3257,25 +3009,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Connects to a port."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the port handle to. [Direction: In, Out]"] -#[doc = "`portName` - Name of the port."] -#[doc = ""] - + #[doc = "Connects to a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the port handle to. [Direction: In, Out]"] + #[doc = "* `portName` - Name of the port."] + #[doc = ""] pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Sets up virtual address space for a new process"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the code set handle to. [Direction: In, Out]"] -#[doc = "`info` - Description for setting up the addresses"] -#[doc = "`code_ptr` - Pointer to .text in shared memory"] -#[doc = "`ro_ptr` - Pointer to .rodata in shared memory"] -#[doc = "`data_ptr` - Pointer to .data in shared memory"] -#[doc = ""] - + #[doc = "Sets up virtual address space for a new process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the code set handle to. [Direction: In, Out]"] + #[doc = "* `info` - Description for setting up the addresses"] + #[doc = "* `code_ptr` - Pointer to .text in shared memory"] + #[doc = "* `ro_ptr` - Pointer to .rodata in shared memory"] + #[doc = "* `data_ptr` - Pointer to .data in shared memory"] + #[doc = ""] pub fn svcCreateCodeSet( out: *mut Handle, info: *const CodeSetInfo, @@ -3286,14 +3040,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets up virtual address space for a new process"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the process handle to. [Direction: In, Out]"] -#[doc = "`codeset` - Codeset created for this process"] -#[doc = "`arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] -#[doc = "`arm11kernelcaps_num` - Number of kernel capabilities"] -#[doc = ""] - + #[doc = "Sets up virtual address space for a new process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the process handle to. [Direction: In, Out]"] + #[doc = "* `codeset` - Codeset created for this process"] + #[doc = "* `arm11kernelcaps` - ARM11 Kernel Capabilities from exheader"] + #[doc = "* `arm11kernelcaps_num` - Number of kernel capabilities"] + #[doc = ""] pub fn svcCreateProcess( out: *mut Handle, codeset: Handle, @@ -3303,13 +3058,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a process's affinity mask."] -#[doc = "# Arguments"] -#[doc = "`affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] -#[doc = "`process` - Handle of the process."] -#[doc = "`processorcount` - Number of processors."] -#[doc = ""] - + #[doc = "Gets a process's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `affinitymask` - Pointer to store the affinity masks. [Direction: In, Out]"] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcGetProcessAffinityMask( affinitymask: *mut u8_, process: Handle, @@ -3318,13 +3074,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets a process's affinity mask."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`affinitymask` - Pointer to retrieve the affinity masks from."] -#[doc = "`processorcount` - Number of processors."] -#[doc = ""] - + #[doc = "Sets a process's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] + #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcSetProcessAffinityMask( process: Handle, affinitymask: *const u8_, @@ -3333,56 +3090,64 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a process's ideal processor."] -#[doc = "# Arguments"] -#[doc = "`processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] -#[doc = "`process` - Handle of the process."] -#[doc = ""] - + #[doc = "Gets a process's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processorid` - Pointer to store the ID of the process's ideal processor. [Direction: In, Out]"] + #[doc = "* `process` - Handle of the process."] + #[doc = ""] pub fn svcGetProcessIdealProcessor(processorid: *mut s32, process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a process's ideal processor."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`processorid` - ID of the process's ideal processor."] -#[doc = ""] - + #[doc = "Sets a process's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `processorid` - ID of the process's ideal processor."] + #[doc = ""] pub fn svcSetProcessIdealProcessor(process: Handle, processorid: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Launches the main thread of the process."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`info` - Pointer to a StartupInfo structure describing information for the main thread."] -#[doc = ""] - + #[doc = "Launches the main thread of the process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `info` - Pointer to a StartupInfo structure describing information for the main thread."] + #[doc = ""] pub fn svcRun(process: Handle, info: *const StartupInfo) -> Result; } extern "C" { #[must_use] -#[doc = "# Multithreading"] -#[doc = "Creates a new thread."] -#[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] -#[doc = "For old 3ds it has to be <2, and for new 3DS <4."] -#[doc = "Value -1 means all CPUs and -2 read from the Exheader."] -#[doc = "The processor with ID 1 is the system processor."] -#[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] -#[doc = "Since a thread is considered as a waitable object, you can use [`svcWaitSynchronization`]"] -#[doc = "and [`svcWaitSynchronizationN`] to join with it."] -#[doc = "# Arguments"] -#[doc = "`thread` - The thread handle [Direction: In, Out]"] -#[doc = "`entrypoint` - The function that will be called first upon thread creation"] -#[doc = "`arg` - The argument passed to @p entrypoint"] -#[doc = "`stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] -#[doc = "`thread_priority` - Low values gives the thread higher priority."] -#[doc = "`processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] -#[doc = "# Notes"] -#[doc = "The kernel will clear the @p stack_top's address low 3 bits to make sure it is 0x8-bytes aligned."] -#[doc = ""] - + #[doc = "# Multithreading"] + #[doc = ""] + #[doc = "Creates a new thread."] + #[doc = ""] + #[doc = "For userland apps, this has to be within the range [0x18;0x3F]"] + #[doc = "For old 3ds it has to be <2, and for new 3DS <4."] + #[doc = "Value -1 means all CPUs and -2 read from the Exheader."] + #[doc = "The processor with ID 1 is the system processor."] + #[doc = "To enable multi-threading on this core you need to call APT_SetAppCpuTimeLimit at least once with a non-zero value."] + #[doc = "Since a thread is considered as a waitable object, you can use [`svcWaitSynchronization`]"] + #[doc = "and [`svcWaitSynchronizationN`] to join with it."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - The thread handle [Direction: In, Out]"] + #[doc = "* `entrypoint` - The function that will be called first upon thread creation"] + #[doc = "* `arg` - The argument passed to @p entrypoint"] + #[doc = "* `stack_top` - The top of the thread's stack. Must be 0x8 bytes mem-aligned."] + #[doc = "* `thread_priority` - Low values gives the thread higher priority."] + #[doc = "* `processor_id` - The id of the processor the thread should be ran on. Those are labelled starting from 0."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The kernel will clear the @p stack_top's address low 3 bits to make sure it is 0x8-bytes aligned."] + #[doc = ""] pub fn svcCreateThread( thread: *mut Handle, entrypoint: ThreadFunc, @@ -3394,57 +3159,61 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the handle of a thread."] -#[doc = "# Arguments"] -#[doc = "`thread` - The handle of the thread [Direction: In, Out]"] -#[doc = "`process` - The ID of the process linked to the thread"] -#[doc = ""] - + #[doc = "Gets the handle of a thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - The handle of the thread [Direction: In, Out]"] + #[doc = "* `process` - The ID of the process linked to the thread"] + #[doc = ""] pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result; } extern "C" { -#[doc = "Exits the current thread."] -#[doc = "This will trigger a state change and hence release all [`svcWaitSynchronization`] operations."] -#[doc = "It means that you can join a thread by calling ```"] -#[doc = "svcWaitSynchronization(threadHandle,yourtimeout); ```"] -#[doc = ""] - + #[doc = "Exits the current thread."] + #[doc = ""] + #[doc = "This will trigger a state change and hence release all [`svcWaitSynchronization`] operations."] + #[doc = "It means that you can join a thread by calling ```"] + #[doc = "svcWaitSynchronization(threadHandle,yourtimeout); ```"] + #[doc = ""] pub fn svcExitThread(); } extern "C" { -#[doc = "Puts the current thread to sleep."] -#[doc = "# Arguments"] -#[doc = "`ns` - The minimum number of nanoseconds to sleep for."] -#[doc = ""] - + #[doc = "Puts the current thread to sleep."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ns` - The minimum number of nanoseconds to sleep for."] + #[doc = ""] pub fn svcSleepThread(ns: s64); } extern "C" { #[must_use] -#[doc = "Retrieves the priority of a thread."] -#[doc = ""] - + #[doc = "Retrieves the priority of a thread."] + #[doc = ""] pub fn svcGetThreadPriority(out: *mut s32, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Changes the priority of a thread"] -#[doc = "Low values gives the thread higher priority."] -#[doc = "# Arguments"] -#[doc = "`prio` - For userland apps, this has to be within the range [0x18;0x3F]"] -#[doc = ""] - + #[doc = "Changes the priority of a thread"] + #[doc = ""] + #[doc = "Low values gives the thread higher priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `prio` - For userland apps, this has to be within the range [0x18;0x3F]"] + #[doc = ""] pub fn svcSetThreadPriority(thread: Handle, prio: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a thread's affinity mask."] -#[doc = "# Arguments"] -#[doc = "`affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] -#[doc = "`thread` - Handle of the thread."] -#[doc = "`processorcount` - Number of processors."] -#[doc = ""] - + #[doc = "Gets a thread's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `affinitymask` - Pointer to output the affinity masks to. [Direction: In, Out]"] + #[doc = "* `thread` - Handle of the thread."] + #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcGetThreadAffinityMask( affinitymask: *mut u8_, thread: Handle, @@ -3453,13 +3222,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets a thread's affinity mask."] -#[doc = "# Arguments"] -#[doc = "`thread` - Handle of the thread."] -#[doc = "`affinitymask` - Pointer to retrieve the affinity masks from."] -#[doc = "`processorcount` - Number of processors."] -#[doc = ""] - + #[doc = "Sets a thread's affinity mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - Handle of the thread."] + #[doc = "* `affinitymask` - Pointer to retrieve the affinity masks from."] + #[doc = "* `processorcount` - Number of processors."] + #[doc = ""] pub fn svcSetThreadAffinityMask( thread: Handle, affinitymask: *const u8_, @@ -3468,61 +3238,66 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a thread's ideal processor."] -#[doc = "# Arguments"] -#[doc = "`processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] -#[doc = "`thread` - Handle of the thread."] -#[doc = ""] - + #[doc = "Gets a thread's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processorid` - Pointer to output the ID of the thread's ideal processor to. [Direction: In, Out]"] + #[doc = "* `thread` - Handle of the thread."] + #[doc = ""] pub fn svcGetThreadIdealProcessor(processorid: *mut s32, thread: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a thread's ideal processor."] -#[doc = "# Arguments"] -#[doc = "`thread` - Handle of the thread."] -#[doc = "`processorid` - ID of the thread's ideal processor."] -#[doc = ""] - + #[doc = "Sets a thread's ideal processor."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - Handle of the thread."] + #[doc = "* `processorid` - ID of the thread's ideal processor."] + #[doc = ""] pub fn svcSetThreadIdealProcessor(thread: Handle, processorid: s32) -> Result; } extern "C" { -#[doc = "Returns the ID of the processor the current thread is running on."] -#[doc = "[`svcCreateThread`]"] -#[doc = ""] - + #[doc = "Returns the ID of the processor the current thread is running on."] + #[doc = ""] + #[doc = "[`svcCreateThread`]"] + #[doc = ""] pub fn svcGetProcessorID() -> s32; } extern "C" { #[must_use] -#[doc = "Gets the ID of a thread."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] -#[doc = "`handle` - Handle of the thread."] -#[doc = ""] - + #[doc = "Gets the ID of a thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the thread ID of the thread @p handle to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle of the thread."] + #[doc = ""] pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the resource limit set of a process."] -#[doc = "# Arguments"] -#[doc = "`resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] -#[doc = "`process` - Process to get the resource limits of."] -#[doc = ""] - + #[doc = "Gets the resource limit set of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] + #[doc = "* `process` - Process to get the resource limits of."] + #[doc = ""] pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the value limits of a resource limit set."] -#[doc = "# Arguments"] -#[doc = "`values` - Pointer to output the value limits to. [Direction: In, Out]"] -#[doc = "`resourceLimit` - Resource limit set to use."] -#[doc = "`names` - Resource limit names to get the limits of."] -#[doc = "`nameCount` - Number of resource limit names."] -#[doc = ""] - + #[doc = "Gets the value limits of a resource limit set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `values` - Pointer to output the value limits to. [Direction: In, Out]"] + #[doc = "* `resourceLimit` - Resource limit set to use."] + #[doc = "* `names` - Resource limit names to get the limits of."] + #[doc = "* `nameCount` - Number of resource limit names."] + #[doc = ""] pub fn svcGetResourceLimitLimitValues( values: *mut s64, resourceLimit: Handle, @@ -3532,14 +3307,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the values of a resource limit set."] -#[doc = "# Arguments"] -#[doc = "`values` - Pointer to output the values to. [Direction: In, Out]"] -#[doc = "`resourceLimit` - Resource limit set to use."] -#[doc = "`names` - Resource limit names to get the values of."] -#[doc = "`nameCount` - Number of resource limit names."] -#[doc = ""] - + #[doc = "Gets the values of a resource limit set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `values` - Pointer to output the values to. [Direction: In, Out]"] + #[doc = "* `resourceLimit` - Resource limit set to use."] + #[doc = "* `names` - Resource limit names to get the values of."] + #[doc = "* `nameCount` - Number of resource limit names."] + #[doc = ""] pub fn svcGetResourceLimitCurrentValues( values: *mut s64, resourceLimit: Handle, @@ -3549,34 +3325,38 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the resource limit set of a process."] -#[doc = "# Arguments"] -#[doc = "`process` - Process to set the resource limit set to."] -#[doc = "`resourceLimit` - Resource limit set handle."] -#[doc = ""] - + #[doc = "Sets the resource limit set of a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Process to set the resource limit set to."] + #[doc = "* `resourceLimit` - Resource limit set handle."] + #[doc = ""] pub fn svcSetProcessResourceLimits(process: Handle, resourceLimit: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a resource limit set."] -#[doc = "# Arguments"] -#[doc = "`resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Creates a resource limit set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `resourceLimit` - Pointer to output the resource limit set handle to. [Direction: In, Out]"] + #[doc = ""] pub fn svcCreateResourceLimit(resourceLimit: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the value limits of a resource limit set."] -#[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] -#[doc = "# Arguments"] -#[doc = "`resourceLimit` - Resource limit set to use."] -#[doc = "`names` - Resource limit names to set the limits of."] -#[doc = "`values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] -#[doc = "`nameCount` - Number of resource limit names."] -#[doc = ""] - + #[doc = "Sets the value limits of a resource limit set."] + #[doc = ""] + #[doc = "set APPMEMALLOC in configuration memory, otherwise those bits are unused."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `resourceLimit` - Resource limit set to use."] + #[doc = "* `names` - Resource limit names to set the limits of."] + #[doc = "* `values` - Value limits to set. The high 32 bits of RESLIMIT_COMMIT are used to"] + #[doc = "* `nameCount` - Number of resource limit names."] + #[doc = ""] pub fn svcSetResourceLimitValues( resourceLimit: Handle, names: *const ResourceLimitType, @@ -3586,118 +3366,132 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the process ID of a thread."] -#[doc = "[`svcOpenProcess`]"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] -#[doc = "`handle` - Handle of the thread."] -#[doc = ""] - + #[doc = "Gets the process ID of a thread."] + #[doc = ""] + #[doc = "[`svcOpenProcess`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the process ID of the thread @p handle to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle of the thread."] + #[doc = ""] pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if a thread handle is valid."] -#[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] -#[doc = "Returns:"] -#[doc = "0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle"] -#[doc = "0xD8E007F7 (BAD_HANDLE) if it isn't."] -#[doc = ""] - + #[doc = "Checks if a thread handle is valid."] + #[doc = ""] + #[doc = "This requests always return an error when called, it only checks if the handle is a thread or not."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle"] + #[doc = "* 0xD8E007F7 (BAD_HANDLE) if it isn't."] + #[doc = ""] pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result; } extern "C" { #[must_use] -#[doc = "# Synchronization"] -#[doc = "Creates a mutex."] -#[doc = "# Arguments"] -#[doc = "`mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] -#[doc = "`initially_locked` - Whether the mutex should be initially locked."] -#[doc = ""] - + #[doc = "# Synchronization"] + #[doc = ""] + #[doc = "Creates a mutex."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mutex` - Pointer to output the handle of the created mutex to. [Direction: In, Out]"] + #[doc = "* `initially_locked` - Whether the mutex should be initially locked."] + #[doc = ""] pub fn svcCreateMutex(mutex: *mut Handle, initially_locked: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Releases a mutex."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the mutex."] -#[doc = ""] - + #[doc = "Releases a mutex."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the mutex."] + #[doc = ""] pub fn svcReleaseMutex(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a semaphore."] -#[doc = "# Arguments"] -#[doc = "`semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] -#[doc = "`initial_count` - Initial count of the semaphore."] -#[doc = "`max_count` - Maximum count of the semaphore."] -#[doc = ""] - + #[doc = "Creates a semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to output the handle of the created semaphore to. [Direction: In, Out]"] + #[doc = "* `initial_count` - Initial count of the semaphore."] + #[doc = "* `max_count` - Maximum count of the semaphore."] + #[doc = ""] pub fn svcCreateSemaphore(semaphore: *mut Handle, initial_count: s32, max_count: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Releases a semaphore."] -#[doc = "# Arguments"] -#[doc = "`count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] -#[doc = "`semaphore` - Handle of the semaphore."] -#[doc = "`release_count` - Number to increase the semaphore count by."] -#[doc = ""] - + #[doc = "Releases a semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the current count of the semaphore to. [Direction: In, Out]"] + #[doc = "* `semaphore` - Handle of the semaphore."] + #[doc = "* `release_count` - Number to increase the semaphore count by."] + #[doc = ""] pub fn svcReleaseSemaphore(count: *mut s32, semaphore: Handle, release_count: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Creates an event handle."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to output the created event handle to. [Direction: In, Out]"] -#[doc = "`reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] -#[doc = ""] - + #[doc = "Creates an event handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the created event handle to. [Direction: In, Out]"] + #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] + #[doc = ""] pub fn svcCreateEvent(event: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] -#[doc = "Signals an event."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the event to signal."] -#[doc = ""] - + #[doc = "Signals an event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the event to signal."] + #[doc = ""] pub fn svcSignalEvent(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Clears an event."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the event to clear."] -#[doc = ""] - + #[doc = "Clears an event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the event to clear."] + #[doc = ""] pub fn svcClearEvent(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for synchronization on a handle."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle to wait on."] -#[doc = "`nanoseconds` - Maximum nanoseconds to wait for."] -#[doc = ""] - + #[doc = "Waits for synchronization on a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle to wait on."] + #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] + #[doc = ""] pub fn svcWaitSynchronization(handle: Handle, nanoseconds: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for synchronization on multiple handles."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the index of the synchronized handle to. [Direction: In, Out]"] -#[doc = "`handles` - Handles to wait on."] -#[doc = "`handles_num` - Number of handles."] -#[doc = "`wait_all` - Whether to wait for synchronization on all handles."] -#[doc = "`nanoseconds` - Maximum nanoseconds to wait for."] -#[doc = ""] - + #[doc = "Waits for synchronization on multiple handles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the index of the synchronized handle to. [Direction: In, Out]"] + #[doc = "* `handles` - Handles to wait on."] + #[doc = "* `handles_num` - Number of handles."] + #[doc = "* `wait_all` - Whether to wait for synchronization on all handles."] + #[doc = "* `nanoseconds` - Maximum nanoseconds to wait for."] + #[doc = ""] pub fn svcWaitSynchronizationN( out: *mut s32, handles: *const Handle, @@ -3708,29 +3502,36 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates an address arbiter"] -#[doc = "[`svcArbitrateAddress`]"] -#[doc = "# Arguments"] -#[doc = "`mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Creates an address arbiter"] + #[doc = ""] + #[doc = "[`svcArbitrateAddress`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mutex` - Pointer to output the handle of the created address arbiter to. [Direction: In, Out]"] + #[doc = ""] pub fn svcCreateAddressArbiter(arbiter: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Arbitrate an address, can be used for synchronization"] -#[doc = "**Warning!**"] -#[doc = "Please use [`syncArbitrateAddressWithTimeout`] instead."] -#[doc = "# Arguments"] -#[doc = "`arbiter` - Handle of the arbiter"] -#[doc = "`addr` - A pointer to a s32 value."] -#[doc = "`type` - Type of action to be performed by the arbiter"] -#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] -#[doc = "`timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use [`svcArbitrateAddressNoTimeout`] instead."] -#[doc = "# Notes"] -#[doc = "Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] -#[doc = ""] - + #[doc = "Arbitrate an address, can be used for synchronization"] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Please use [`syncArbitrateAddressWithTimeout`] instead."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `arbiter` - Handle of the arbiter"] + #[doc = "* `addr` - A pointer to a s32 value."] + #[doc = "* `type` - Type of action to be performed by the arbiter"] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = "* `timeout_ns` - Optional timeout in nanoseconds when using TIMEOUT actions, ignored otherwise. If not needed, use [`svcArbitrateAddressNoTimeout`] instead."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn svcArbitrateAddress( arbiter: Handle, addr: u32_, @@ -3741,18 +3542,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Same as [`svcArbitrateAddress`] but with the timeout_ns parameter undefined."] -#[doc = "**Warning!**"] -#[doc = "Please use [`syncArbitrateAddress`] instead."] -#[doc = "# Arguments"] -#[doc = "`arbiter` - Handle of the arbiter"] -#[doc = "`addr` - A pointer to a s32 value."] -#[doc = "`type` - Type of action to be performed by the arbiter"] -#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] -#[doc = "# Notes"] -#[doc = "Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] -#[doc = ""] - + #[doc = "Same as [`svcArbitrateAddress`] but with the timeout_ns parameter undefined."] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Please use [`syncArbitrateAddress`] instead."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `arbiter` - Handle of the arbiter"] + #[doc = "* `addr` - A pointer to a s32 value."] + #[doc = "* `type` - Type of action to be performed by the arbiter"] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this syscall entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn svcArbitrateAddressNoTimeout( arbiter: Handle, addr: u32_, @@ -3762,53 +3568,58 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends a synchronized request to a session handle."] -#[doc = "# Arguments"] -#[doc = "`session` - Handle of the session."] -#[doc = ""] - + #[doc = "Sends a synchronized request to a session handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - Handle of the session."] + #[doc = ""] pub fn svcSendSyncRequest(session: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Connects to a port via a handle."] -#[doc = "# Arguments"] -#[doc = "`clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] -#[doc = "`clientPort` - Port client endpoint to connect to."] -#[doc = ""] - + #[doc = "Connects to a port via a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `clientSession` - Pointer to output the client session handle to. [Direction: In, Out]"] + #[doc = "* `clientPort` - Port client endpoint to connect to."] + #[doc = ""] pub fn svcCreateSessionToPort(clientSession: *mut Handle, clientPort: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a linked pair of session endpoints."] -#[doc = "# Arguments"] -#[doc = "`serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] -#[doc = "`clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Creates a linked pair of session endpoints."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `serverSession` - Pointer to output the created server endpoint handle to. [Direction: In, Out]"] + #[doc = "* `clientSession` - Pointer to output the created client endpoint handle to. [Direction: In, Out]"] + #[doc = ""] pub fn svcCreateSession(serverSession: *mut Handle, clientSession: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Accepts a session."] -#[doc = "# Arguments"] -#[doc = "`session` - Pointer to output the created session handle to. [Direction: In, Out]"] -#[doc = "`port` - Handle of the port to accept a session from."] -#[doc = ""] - + #[doc = "Accepts a session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - Pointer to output the created session handle to. [Direction: In, Out]"] + #[doc = "* `port` - Handle of the port to accept a session from."] + #[doc = ""] pub fn svcAcceptSession(session: *mut Handle, port: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Replies to and receives a new request."] -#[doc = "# Arguments"] -#[doc = "`index` - Pointer to the index of the request."] -#[doc = "`handles` - Session handles to receive requests from."] -#[doc = "`handleCount` - Number of handles."] -#[doc = "`replyTarget` - Handle of the session to reply to."] -#[doc = ""] - + #[doc = "Replies to and receives a new request."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `index` - Pointer to the index of the request."] + #[doc = "* `handles` - Session handles to receive requests from."] + #[doc = "* `handleCount` - Number of handles."] + #[doc = "* `replyTarget` - Handle of the session to reply to."] + #[doc = ""] pub fn svcReplyAndReceive( index: *mut s32, handles: *const Handle, @@ -3818,113 +3629,126 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "# Time"] -#[doc = "Creates a timer."] -#[doc = "# Arguments"] -#[doc = "`timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] -#[doc = "`reset_type` - Type of reset to perform on the timer."] -#[doc = ""] - + #[doc = "# Time"] + #[doc = ""] + #[doc = "Creates a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Pointer to output the handle of the created timer to. [Direction: In, Out]"] + #[doc = "* `reset_type` - Type of reset to perform on the timer."] + #[doc = ""] pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a timer."] -#[doc = "# Arguments"] -#[doc = "`timer` - Handle of the timer to set."] -#[doc = "`initial` - Initial value of the timer."] -#[doc = "`interval` - Interval of the timer."] -#[doc = ""] - + #[doc = "Sets a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Handle of the timer to set."] + #[doc = "* `initial` - Initial value of the timer."] + #[doc = "* `interval` - Interval of the timer."] + #[doc = ""] pub fn svcSetTimer(timer: Handle, initial: s64, interval: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels a timer."] -#[doc = "# Arguments"] -#[doc = "`timer` - Handle of the timer to cancel."] -#[doc = ""] - + #[doc = "Cancels a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Handle of the timer to cancel."] + #[doc = ""] pub fn svcCancelTimer(timer: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Clears a timer."] -#[doc = "# Arguments"] -#[doc = "`timer` - Handle of the timer to clear."] -#[doc = ""] - + #[doc = "Clears a timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timer` - Handle of the timer to clear."] + #[doc = ""] pub fn svcClearTimer(timer: Handle) -> Result; } extern "C" { -#[doc = "Gets the current system tick."] -#[doc = "Returns:"] -#[doc = "The current system tick."] -#[doc = ""] - + #[doc = "Gets the current system tick."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current system tick."] + #[doc = ""] pub fn svcGetSystemTick() -> u64_; } extern "C" { #[must_use] -#[doc = "# System"] -#[doc = "Closes a handle."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle to close."] -#[doc = ""] - + #[doc = "# System"] + #[doc = ""] + #[doc = "Closes a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle to close."] + #[doc = ""] pub fn svcCloseHandle(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Duplicates a handle."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] -#[doc = "`original` - Handle to duplicate."] -#[doc = ""] - + #[doc = "Duplicates a handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the duplicated handle to. [Direction: In, Out]"] + #[doc = "* `original` - Handle to duplicate."] + #[doc = ""] pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a handle info."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the handle info to. [Direction: In, Out]"] -#[doc = "`handle` - Handle to get the info for."] -#[doc = "`param` - Parameter clarifying the handle info type."] -#[doc = ""] - + #[doc = "Gets a handle info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the handle info to. [Direction: In, Out]"] + #[doc = "* `handle` - Handle to get the info for."] + #[doc = "* `param` - Parameter clarifying the handle info type."] + #[doc = ""] pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system info."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the system info to. [Direction: In, Out]"] -#[doc = "`type` - Type of system info to retrieve."] -#[doc = "`param` - Parameter clarifying the system info type."] -#[doc = ""] - + #[doc = "Gets the system info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the system info to. [Direction: In, Out]"] + #[doc = "* `type` - Type of system info to retrieve."] + #[doc = "* `param` - Parameter clarifying the system info type."] + #[doc = ""] pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current kernel state."] -#[doc = "# Arguments"] -#[doc = "`type` - Type of state to set (the other parameters depend on it)."] -#[doc = ""] - + #[doc = "Sets the current kernel state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Type of state to set (the other parameters depend on it)."] + #[doc = ""] pub fn svcKernelSetState(type_: u32_, ...) -> Result; } extern "C" { #[must_use] -#[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] -#[doc = "# Arguments"] -#[doc = "`interruptId` - Interrupt identfier (see "] -#[doc = "`eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] -#[doc = "`priority` - Priority of the interrupt for the current process."] -#[doc = "`isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] -#[doc = ""] - + #[doc = "Binds an event or semaphore handle to an ARM11 interrupt."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interruptId` - Interrupt identfier (see "] + #[doc = "* `eventOrSemaphore` - Event or semaphore handle to bind to the given interrupt."] + #[doc = "* `priority` - Priority of the interrupt for the current process."] + #[doc = "* `isManualClear` - Indicates whether the interrupt has to be manually cleared or not (= level-high active)."] + #[doc = ""] pub fn svcBindInterrupt( interruptId: u32_, eventOrSemaphore: Handle, @@ -3934,62 +3758,69 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] -#[doc = "# Arguments"] -#[doc = "`interruptId` - Interrupt identfier, see (see "] -#[doc = "`eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] -#[doc = ""] - + #[doc = "Unbinds an event or semaphore handle from an ARM11 interrupt."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interruptId` - Interrupt identfier, see (see "] + #[doc = "* `eventOrSemaphore` - Event or semaphore handle to unbind from the given interrupt."] + #[doc = ""] pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates a process's data cache."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`addr` - Address to invalidate."] -#[doc = "`size` - Size of the memory to invalidate."] -#[doc = ""] - + #[doc = "Invalidates a process's data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `addr` - Address to invalidate."] + #[doc = "* `size` - Size of the memory to invalidate."] + #[doc = ""] pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Cleans a process's data cache."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`addr` - Address to clean."] -#[doc = "`size` - Size of the memory to clean."] -#[doc = ""] - + #[doc = "Cleans a process's data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `addr` - Address to clean."] + #[doc = "* `size` - Size of the memory to clean."] + #[doc = ""] pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes (cleans and invalidates) a process's data cache."] -#[doc = "# Arguments"] -#[doc = "`process` - Handle of the process."] -#[doc = "`addr` - Address to flush."] -#[doc = "`size` - Size of the memory to flush."] -#[doc = ""] - + #[doc = "Flushes (cleans and invalidates) a process's data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Handle of the process."] + #[doc = "* `addr` - Address to flush."] + #[doc = "* `size` - Size of the memory to flush."] + #[doc = ""] pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Begins an inter-process DMA transfer."] -#[doc = "# Arguments"] -#[doc = "`dma` - Pointer to output the handle of the DMA channel object to. [Direction: In, Out]"] -#[doc = "`dstProcess` - Destination process handle."] -#[doc = "`dstAddr` - Address in the destination process to write data to."] -#[doc = "`srcProcess` - Source process handle."] -#[doc = "`srcAddr` - Address in the source to read data from."] -#[doc = "`size` - Size of the data to transfer."] -#[doc = "`cfg` - Configuration structure."] -#[doc = "# Notes"] -#[doc = "The handle is signaled when the transfer finishes."] -#[doc = ""] - + #[doc = "Begins an inter-process DMA transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dma` - Pointer to output the handle of the DMA channel object to. [Direction: In, Out]"] + #[doc = "* `dstProcess` - Destination process handle."] + #[doc = "* `dstAddr` - Address in the destination process to write data to."] + #[doc = "* `srcProcess` - Source process handle."] + #[doc = "* `srcAddr` - Address in the source to read data from."] + #[doc = "* `size` - Size of the data to transfer."] + #[doc = "* `cfg` - Configuration structure."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The handle is signaled when the transfer finishes."] + #[doc = ""] pub fn svcStartInterProcessDma( dma: *mut Handle, dstProcess: Handle, @@ -4002,37 +3833,42 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Stops an inter-process DMA transfer."] -#[doc = "# Arguments"] -#[doc = "`dma` - Handle of the DMA channel object."] -#[doc = ""] - + #[doc = "Stops an inter-process DMA transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dma` - Handle of the DMA channel object."] + #[doc = ""] pub fn svcStopDma(dma: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the state of an inter-process DMA transfer."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] -#[doc = "`dma` - Handle of the DMA channel object."] -#[doc = ""] - + #[doc = "Gets the state of an inter-process DMA transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] + #[doc = "* `dma` - Handle of the DMA channel object."] + #[doc = ""] pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Restarts a DMA transfer, using the same configuration as before."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] -#[doc = "`dma` - Handle of the DMA channel object."] -#[doc = "`dstAddr` - Address in the destination process to write data to."] -#[doc = "`srcAddr` - Address in the source to read data from."] -#[doc = "`size` - Size of the data to transfer."] -#[doc = "`flags` - Restart flags, [`DMARST_UNLOCK`] and/or [`DMARST_RESUME_DEVICE`]"] -#[doc = "# Notes"] -#[doc = "The first transfer has to be configured with [`DMACFG_KEEP_LOCKED`]"] -#[doc = ""] - + #[doc = "Restarts a DMA transfer, using the same configuration as before."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to output the state of the DMA transfer to. [Direction: In, Out]"] + #[doc = "* `dma` - Handle of the DMA channel object."] + #[doc = "* `dstAddr` - Address in the destination process to write data to."] + #[doc = "* `srcAddr` - Address in the source to read data from."] + #[doc = "* `size` - Size of the data to transfer."] + #[doc = "* `flags` - Restart flags, [`DMARST_UNLOCK`] and/or [`DMARST_RESUME_DEVICE`]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The first transfer has to be configured with [`DMACFG_KEEP_LOCKED`]"] + #[doc = ""] pub fn svcRestartDma( dma: Handle, dstAddr: u32_, @@ -4043,39 +3879,44 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] -#[doc = "# Arguments"] -#[doc = "`useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] -#[doc = ""] - + #[doc = "Sets the GPU protection register to restrict the range of the GPU DMA. 11.3+ only."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `useApplicationRestriction` - Whether to use the register value used for APPLICATION titles."] + #[doc = ""] pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Enables or disables Wi-Fi. 11.4+ only."] -#[doc = "# Arguments"] -#[doc = "`enabled` - Whether to enable or disable Wi-Fi."] -#[doc = ""] - + #[doc = "Enables or disables Wi-Fi. 11.4+ only."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enabled` - Whether to enable or disable Wi-Fi."] + #[doc = ""] pub fn svcSetWifiEnabled(enabled: bool) -> Result; } extern "C" { -#[doc = "# Debugging"] -#[doc = "Breaks execution."] -#[doc = "# Arguments"] -#[doc = "`breakReason` - Reason for breaking."] -#[doc = ""] - + #[doc = "# Debugging"] + #[doc = ""] + #[doc = "Breaks execution."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `breakReason` - Reason for breaking."] + #[doc = ""] pub fn svcBreak(breakReason: UserBreakType); } extern "C" { -#[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] -#[doc = "# Arguments"] -#[doc = "`breakReason` - Debug reason for breaking."] -#[doc = "`croInfo` - Library information."] -#[doc = "`croInfoSize` - Size of the above structure."] -#[doc = ""] - + #[doc = "Breaks execution (LOAD_RO and UNLOAD_RO)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `breakReason` - Debug reason for breaking."] + #[doc = "* `croInfo` - Library information."] + #[doc = "* `croInfoSize` - Size of the above structure."] + #[doc = ""] pub fn svcBreakRO( breakReason: UserBreakType, croInfo: *const ::libc::c_void, @@ -4084,41 +3925,44 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Outputs a debug string."] -#[doc = "# Arguments"] -#[doc = "`str` - String to output."] -#[doc = "`length` - Length of the string to output, needs to be positive."] -#[doc = ""] - + #[doc = "Outputs a debug string."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `str` - String to output."] + #[doc = "* `length` - Length of the string to output, needs to be positive."] + #[doc = ""] pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Controls performance monitoring on the CP15 interface and the SCU."] -#[doc = "The meaning of the parameters depend on the operation."] -#[doc = "The operations are the following:"] -#[doc = "- [`PERFCOUNTEROP_ENABLE`] (void) -> void, tries to enable and lock perfmon. functionality."] -#[doc = "- [`PERFCOUNTEROP_DISABLE`] (void) -> void, disable and forcibly unlocks perfmon. functionality."] -#[doc = "- [`PERFCOUNTEROP_GET_VALUE`] [`PerfCounterRegister`] reg) -> u64, gets the value of a particular counter register."] -#[doc = "- [`PERFCOUNTEROP_SET_VALUE`] [`PerfCounterRegister`] reg, u64 value) -> void, sets the value of a particular counter register."] -#[doc = "- [`PERFCOUNTEROP_GET_OVERFLOW_FLAGS`] (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] -#[doc = "- Format is a bitfield of [`PerfCounterRegister`]"] -#[doc = "- [`PERFCOUNTEROP_RESET`] (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] -#[doc = "overflow flags of selected registers."] -#[doc = "- Format is two bitfields of [`PerfCounterRegister`]"] -#[doc = "- [`PERFCOUNTEROP_GET_EVENT`] [`PerfCounterRegister`] reg) -> [`PerfCounterEvent`] gets the event associated"] -#[doc = "to a particular counter register."] -#[doc = "- [`PERFCOUNTEROP_SET_EVENT`] [`PerfCounterRegister`] reg, [`PerfCounterEvent)`] -> void, sets the event associated"] -#[doc = "to a particular counter register."] -#[doc = "- [`PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED`] (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] -#[doc = "and to use 64-bit counter values."] -#[doc = "# Arguments"] -#[doc = "`out` - Output. [Direction: In, Out]"] -#[doc = "`op` - Operation, see details."] -#[doc = "`param1` - First parameter."] -#[doc = "`param2` - Second parameter."] -#[doc = ""] - + #[doc = "Controls performance monitoring on the CP15 interface and the SCU."] + #[doc = ""] + #[doc = "The meaning of the parameters depend on the operation."] + #[doc = "The operations are the following:"] + #[doc = "- [`PERFCOUNTEROP_ENABLE`] (void) -> void, tries to enable and lock perfmon. functionality."] + #[doc = "- [`PERFCOUNTEROP_DISABLE`] (void) -> void, disable and forcibly unlocks perfmon. functionality."] + #[doc = "- [`PERFCOUNTEROP_GET_VALUE`] [`PerfCounterRegister`] reg) -> u64, gets the value of a particular counter register."] + #[doc = "- [`PERFCOUNTEROP_SET_VALUE`] [`PerfCounterRegister`] reg, u64 value) -> void, sets the value of a particular counter register."] + #[doc = "- [`PERFCOUNTEROP_GET_OVERFLOW_FLAGS`] (void) -> u32, gets the overflow flags of all CP15 and SCU registers."] + #[doc = "- Format is a bitfield of [`PerfCounterRegister`]"] + #[doc = "- [`PERFCOUNTEROP_RESET`] (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or"] + #[doc = "overflow flags of selected registers."] + #[doc = "- Format is two bitfields of [`PerfCounterRegister`]"] + #[doc = "- [`PERFCOUNTEROP_GET_EVENT`] [`PerfCounterRegister`] reg) -> [`PerfCounterEvent`] gets the event associated"] + #[doc = "to a particular counter register."] + #[doc = "- [`PERFCOUNTEROP_SET_EVENT`] [`PerfCounterRegister`] reg, [`PerfCounterEvent)`] -> void, sets the event associated"] + #[doc = "to a particular counter register."] + #[doc = "- [`PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED`] (bool enabled) -> void, (dis)allows the kernel to track counter overflows"] + #[doc = "and to use 64-bit counter values."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output. [Direction: In, Out]"] + #[doc = "* `op` - Operation, see details."] + #[doc = "* `param1` - First parameter."] + #[doc = "* `param2` - Second parameter."] + #[doc = ""] pub fn svcControlPerformanceCounter( out: *mut u64_, op: PerfCounterOperation, @@ -4128,62 +3972,68 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a debug handle for an active process."] -#[doc = "# Arguments"] -#[doc = "`debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] -#[doc = "`processId` - ID of the process to debug."] -#[doc = ""] - + #[doc = "Creates a debug handle for an active process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Pointer to output the created debug handle to. [Direction: In, Out]"] + #[doc = "* `processId` - ID of the process to debug."] + #[doc = ""] pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Breaks a debugged process."] -#[doc = "# Arguments"] -#[doc = "`debug` - Debug handle of the process."] -#[doc = ""] - + #[doc = "Breaks a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = ""] pub fn svcBreakDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates a debugged process."] -#[doc = "# Arguments"] -#[doc = "`debug` - Debug handle of the process."] -#[doc = ""] - + #[doc = "Terminates a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = ""] pub fn svcTerminateDebugProcess(debug: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current debug event of a debugged process."] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output the debug event information to. [Direction: In, Out]"] -#[doc = "`debug` - Debug handle of the process."] -#[doc = ""] - + #[doc = "Gets the current debug event of a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the debug event information to. [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = ""] pub fn svcGetProcessDebugEvent(info: *mut DebugEventInfo, debug: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Continues the current debug event of a debugged process (not necessarily the same as [`svcGetProcessDebugEvent)`]"] -#[doc = "# Arguments"] -#[doc = "`debug` - Debug handle of the process."] -#[doc = "`flags` - Flags to continue with, see [`DebugFlags`]"] -#[doc = ""] - + #[doc = "Continues the current debug event of a debugged process (not necessarily the same as [`svcGetProcessDebugEvent)`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `flags` - Flags to continue with, see [`DebugFlags`]"] + #[doc = ""] pub fn svcContinueDebugEvent(debug: Handle, flags: DebugFlags) -> Result; } extern "C" { #[must_use] -#[doc = "Fetches the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] -#[doc = "# Arguments"] -#[doc = "`context` - Values of the registers to fetch, see [`ThreadContext`] [Direction: In, Out]"] -#[doc = "`debug` - Debug handle of the parent process."] -#[doc = "`threadId` - ID of the thread to fetch the saved registers of."] -#[doc = "`controlFlags` - Which registers to fetch, see [`ThreadContextControlFlags`]"] -#[doc = ""] - + #[doc = "Fetches the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Values of the registers to fetch, see [`ThreadContext`] [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the parent process."] + #[doc = "* `threadId` - ID of the thread to fetch the saved registers of."] + #[doc = "* `controlFlags` - Which registers to fetch, see [`ThreadContextControlFlags`]"] + #[doc = ""] pub fn svcGetDebugThreadContext( context: *mut ThreadContext, debug: Handle, @@ -4193,14 +4043,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Updates the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] -#[doc = "# Arguments"] -#[doc = "`debug` - Debug handle of the parent process."] -#[doc = "`threadId` - ID of the thread to update the saved registers of."] -#[doc = "`context` - Values of the registers to update, see [`ThreadContext`]"] -#[doc = "`controlFlags` - Which registers to update, see [`ThreadContextControlFlags`]"] -#[doc = ""] - + #[doc = "Updates the saved registers of a thread, either inactive or awaiting [`svcContinueDebugEvent`] belonging to a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the parent process."] + #[doc = "* `threadId` - ID of the thread to update the saved registers of."] + #[doc = "* `context` - Values of the registers to update, see [`ThreadContext`]"] + #[doc = "* `controlFlags` - Which registers to update, see [`ThreadContextControlFlags`]"] + #[doc = ""] pub fn svcSetDebugThreadContext( debug: Handle, threadId: u32_, @@ -4210,14 +4061,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Queries memory information of a debugged process."] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output memory info to. [Direction: In, Out]"] -#[doc = "`out` - Pointer to output page info to. [Direction: In, Out]"] -#[doc = "`debug` - Debug handle of the process to query memory from."] -#[doc = "`addr` - Virtual memory address to query."] -#[doc = ""] - + #[doc = "Queries memory information of a debugged process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output memory info to. [Direction: In, Out]"] + #[doc = "* `out` - Pointer to output page info to. [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the process to query memory from."] + #[doc = "* `addr` - Virtual memory address to query."] + #[doc = ""] pub fn svcQueryDebugProcessMemory( info: *mut MemInfo, out: *mut PageInfo, @@ -4227,14 +4079,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a debugged process's memory."] -#[doc = "# Arguments"] -#[doc = "`buffer` - Buffer to read data to."] -#[doc = "`debug` - Debug handle of the process."] -#[doc = "`addr` - Address to read from."] -#[doc = "`size` - Size of the memory to read."] -#[doc = ""] - + #[doc = "Reads from a debugged process's memory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buffer` - Buffer to read data to."] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `addr` - Address to read from."] + #[doc = "* `size` - Size of the memory to read."] + #[doc = ""] pub fn svcReadProcessMemory( buffer: *mut ::libc::c_void, debug: Handle, @@ -4244,14 +4097,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a debugged process's memory."] -#[doc = "# Arguments"] -#[doc = "`debug` - Debug handle of the process."] -#[doc = "`buffer` - Buffer to write data from."] -#[doc = "`addr` - Address to write to."] -#[doc = "`size` - Size of the memory to write."] -#[doc = ""] - + #[doc = "Writes to a debugged process's memory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `buffer` - Buffer to write data from."] + #[doc = "* `addr` - Address to write to."] + #[doc = "* `size` - Size of the memory to write."] + #[doc = ""] pub fn svcWriteProcessMemory( debug: Handle, buffer: *const ::libc::c_void, @@ -4261,26 +4115,28 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see ."] -#[doc = "# Arguments"] -#[doc = "`registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] -#[doc = "`control` - Value of the control regiser."] -#[doc = "`value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] -#[doc = ""] - + #[doc = "Sets an hardware breakpoint or watchpoint. This is an interface to the BRP/WRP registers, see ."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `registerId` - range 0..5 = breakpoints (BRP0-5), 0x100..0x101 = watchpoints (WRP0-1). The previous stop point for the register is disabled."] + #[doc = "* `control` - Value of the control regiser."] + #[doc = "* `value` - Value of the value register: either and address (if bit21 of control is clear) or the debug handle of a process to fetch the context ID of."] + #[doc = ""] pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a debugged thread's parameter."] -#[doc = "# Arguments"] -#[doc = "`unused` - Unused. [Direction: In, Out]"] -#[doc = "`out` - Output value. [Direction: In, Out]"] -#[doc = "`debug` - Debug handle of the process."] -#[doc = "`threadId` - ID of the thread"] -#[doc = "`parameter` - Parameter to fetch, see [`DebugThreadParameter`]"] -#[doc = ""] - + #[doc = "Gets a debugged thread's parameter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unused` - Unused. [Direction: In, Out]"] + #[doc = "* `out` - Output value. [Direction: In, Out]"] + #[doc = "* `debug` - Debug handle of the process."] + #[doc = "* `threadId` - ID of the thread"] + #[doc = "* `parameter` - Parameter to fetch, see [`DebugThreadParameter`]"] + #[doc = ""] pub fn svcGetDebugThreadParam( unused: *mut s64, out: *mut u32_, @@ -4291,256 +4147,210 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a function in supervisor mode."] -#[doc = "# Arguments"] -#[doc = "`callback` - Function to execute."] -#[doc = ""] - + #[doc = "Executes a function in supervisor mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `callback` - Function to execute."] + #[doc = ""] pub fn svcBackdoor(callback: ::core::option::Option s32>) -> Result; } #[doc = "Mount \"nand:/\""] #[doc = ""] - pub const ARM9DESC_MOUNT_NAND: _bindgen_ty_7 = 1; #[doc = "Mount nand:/ro/ as read-write"] #[doc = ""] - pub const ARM9DESC_MOUNT_NANDRO_RW: _bindgen_ty_7 = 2; #[doc = "Mount \"twln:/\""] #[doc = ""] - pub const ARM9DESC_MOUNT_TWLN: _bindgen_ty_7 = 4; #[doc = "Mount \"wnand:/\""] #[doc = ""] - pub const ARM9DESC_MOUNT_WNAND: _bindgen_ty_7 = 8; #[doc = "Mount \"cardspi:/\""] #[doc = ""] - pub const ARM9DESC_MOUNT_CARDSPI: _bindgen_ty_7 = 16; #[doc = "Use SDIF3"] #[doc = ""] - pub const ARM9DESC_USE_SDIF3: _bindgen_ty_7 = 32; #[doc = "Create seed (movable.sed)"] #[doc = ""] - pub const ARM9DESC_CREATE_SEED: _bindgen_ty_7 = 64; #[doc = "Use card SPI, required by multiple pxi:dev commands"] #[doc = ""] - pub const ARM9DESC_USE_CARD_SPI: _bindgen_ty_7 = 128; #[doc = "SD application (not checked)"] #[doc = ""] - pub const ARM9DESC_SD_APPLICATION: _bindgen_ty_7 = 256; #[doc = "Mount \"sdmc:/\" as read-write"] #[doc = ""] - pub const ARM9DESC_MOUNT_SDMC_RW: _bindgen_ty_7 = 512; #[doc = "ARM9 descriptor flags"] #[doc = ""] - pub type _bindgen_ty_7 = ::libc::c_uint; #[doc = "Category \"system application\""] #[doc = ""] - pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: _bindgen_ty_8 = 1; #[doc = "Category \"hardware check\""] #[doc = ""] - pub const FSACCESS_CATEGORY_HARDWARE_CHECK: _bindgen_ty_8 = 2; #[doc = "Category \"filesystem tool\""] #[doc = ""] - pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: _bindgen_ty_8 = 4; #[doc = "Debug"] #[doc = ""] - pub const FSACCESS_DEBUG: _bindgen_ty_8 = 8; #[doc = "TWLCARD backup"] #[doc = ""] - pub const FSACCESS_TWLCARD_BACKUP: _bindgen_ty_8 = 16; #[doc = "TWLNAND data"] #[doc = ""] - pub const FSACCESS_TWLNAND_DATA: _bindgen_ty_8 = 32; #[doc = "BOSS (SpotPass)"] #[doc = ""] - pub const FSACCESS_BOSS: _bindgen_ty_8 = 64; #[doc = "SDMC (read-write)"] #[doc = ""] - pub const FSACCESS_SDMC_RW: _bindgen_ty_8 = 128; #[doc = "Core"] #[doc = ""] - pub const FSACCESS_CORE: _bindgen_ty_8 = 256; #[doc = "nand:/ro/ (read-only)"] #[doc = ""] - pub const FSACCESS_NANDRO_RO: _bindgen_ty_8 = 512; #[doc = "nand:/rw/"] #[doc = ""] - pub const FSACCESS_NANDRW: _bindgen_ty_8 = 1024; #[doc = "nand:/ro/ (read-write)"] #[doc = ""] - pub const FSACCESS_NANDRO_RW: _bindgen_ty_8 = 2048; #[doc = "Category \"System Settings\""] #[doc = ""] - pub const FSACCESS_CATEGORY_SYSTEM_SETTINGS: _bindgen_ty_8 = 4096; #[doc = "Cardboard (System Transfer)"] #[doc = ""] - pub const FSACCESS_CARDBOARD: _bindgen_ty_8 = 8192; #[doc = "Export/Import IVs (movable.sed)"] #[doc = ""] - pub const FSACCESS_EXPORT_IMPORT_IVS: _bindgen_ty_8 = 16384; #[doc = "SDMC (write-only)"] #[doc = ""] - pub const FSACCESS_SDMC_WO: _bindgen_ty_8 = 32768; - +#[doc = "\"Switch cleanup\" (3.0+)"] +#[doc = ""] pub const FSACCESS_SWITCH_CLEANUP: _bindgen_ty_8 = 65536; #[doc = "Savedata move (5.0+)"] #[doc = ""] - pub const FSACCESS_SAVEDATA_MOVE: _bindgen_ty_8 = 131072; #[doc = "Shop (5.0+)"] #[doc = ""] - pub const FSACCESS_SHOP: _bindgen_ty_8 = 262144; #[doc = "Shop (5.0+)"] #[doc = ""] - pub const FSACCESS_SHELL: _bindgen_ty_8 = 524288; #[doc = "Category \"Home Menu\" (6.0+)"] #[doc = ""] - pub const FSACCESS_CATEGORY_HOME_MENU: _bindgen_ty_8 = 1048576; #[doc = "Seed DB (9.6+)"] #[doc = ""] - pub const FSACCESS_SEEDDB: _bindgen_ty_8 = 2097152; #[doc = "Filesystem access flags"] #[doc = ""] - pub type _bindgen_ty_8 = ::libc::c_uint; #[doc = "Regular application"] #[doc = ""] - pub const RESLIMIT_CATEGORY_APPLICATION: ResourceLimitCategory = 0; #[doc = "System applet"] #[doc = ""] - pub const RESLIMIT_CATEGORY_SYS_APPLET: ResourceLimitCategory = 1; #[doc = "Library applet"] #[doc = ""] - pub const RESLIMIT_CATEGORY_LIB_APPLET: ResourceLimitCategory = 2; #[doc = "System modules running inside the BASE memregion"] #[doc = ""] - pub const RESLIMIT_CATEGORY_OTHER: ResourceLimitCategory = 3; #[doc = "The resource limit category of a title"] #[doc = ""] - pub type ResourceLimitCategory = ::libc::c_uint; #[doc = "64MB of usable application memory"] #[doc = ""] - pub const SYSMODE_O3DS_PROD: SystemMode = 0; #[doc = "124MB of usable application memory. Unusable on O3DS"] #[doc = ""] - pub const SYSMODE_N3DS_PROD: SystemMode = 1; #[doc = "97MB/178MB of usable application memory"] #[doc = ""] - pub const SYSMODE_DEV1: SystemMode = 2; #[doc = "80MB/124MB of usable application memory"] #[doc = ""] - pub const SYSMODE_DEV2: SystemMode = 3; #[doc = "72MB of usable application memory. Same as \"Prod\" on N3DS"] #[doc = ""] - pub const SYSMODE_DEV3: SystemMode = 4; #[doc = "32MB of usable application memory. Same as \"Prod\" on N3DS"] #[doc = ""] - pub const SYSMODE_DEV4: SystemMode = 5; #[doc = "The system mode a title should be launched under"] #[doc = ""] - pub type SystemMode = ::libc::c_uint; #[doc = "The system info flags and remaster version of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_SystemInfoFlags { -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 5usize], pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Remaster version"] -#[doc = ""] - + #[doc = "Remaster version"] + #[doc = ""] pub remaster_version: u16_, } impl ExHeader_SystemInfoFlags { @@ -4585,79 +4395,62 @@ impl ExHeader_SystemInfoFlags { } #[doc = "Information about a title's section"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSectionInfo { -#[doc = "The address of the section"] -#[doc = ""] - + #[doc = "The address of the section"] + #[doc = ""] pub address: u32_, -#[doc = "The number of pages the section occupies"] -#[doc = ""] - + #[doc = "The number of pages the section occupies"] + #[doc = ""] pub num_pages: u32_, -#[doc = "The size of the section"] -#[doc = ""] - + #[doc = "The size of the section"] + #[doc = ""] pub size: u32_, } #[doc = "The name of a title and infomation about its section"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_CodeSetInfo { -#[doc = "Title name"] -#[doc = ""] - + #[doc = "Title name"] + #[doc = ""] pub name: [::libc::c_char; 8usize], -#[doc = "System info flags, see [`ExHeader_SystemInfoFlags`]"] -#[doc = ""] - + #[doc = "System info flags, see [`ExHeader_SystemInfoFlags`]"] + #[doc = ""] pub flags: ExHeader_SystemInfoFlags, -#[doc = ".text section info, see [`ExHeader_CodeSectionInfo`]"] -#[doc = ""] - + #[doc = ".text section info, see [`ExHeader_CodeSectionInfo`]"] + #[doc = ""] pub text: ExHeader_CodeSectionInfo, -#[doc = "Stack size"] -#[doc = ""] - + #[doc = "Stack size"] + #[doc = ""] pub stack_size: u32_, -#[doc = ".rodata section info, see [`ExHeader_CodeSectionInfo`]"] -#[doc = ""] - + #[doc = ".rodata section info, see [`ExHeader_CodeSectionInfo`]"] + #[doc = ""] pub rodata: ExHeader_CodeSectionInfo, -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: u32_, -#[doc = ".data section info, see [`ExHeader_CodeSectionInfo`]"] -#[doc = ""] - + #[doc = ".data section info, see [`ExHeader_CodeSectionInfo`]"] + #[doc = ""] pub data: ExHeader_CodeSectionInfo, -#[doc = ".bss section size"] -#[doc = ""] - + #[doc = ".bss section size"] + #[doc = ""] pub bss_size: u32_, } #[doc = "The savedata size and jump ID of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemInfo { -#[doc = "Savedata size"] -#[doc = ""] - + #[doc = "Savedata size"] + #[doc = ""] pub savedata_size: u64_, -#[doc = "Jump ID"] -#[doc = ""] - + #[doc = "Jump ID"] + #[doc = ""] pub jump_id: u64_, -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 48usize], } impl Default for ExHeader_SystemInfo { @@ -4671,21 +4464,17 @@ impl Default for ExHeader_SystemInfo { } #[doc = "The code set info, dependencies and system info of a title (SCI)"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_SystemControlInfo { -#[doc = "Code set info, see [`ExHeader_CodeSetInfo`]"] -#[doc = ""] - + #[doc = "Code set info, see [`ExHeader_CodeSetInfo`]"] + #[doc = ""] pub codeset_info: ExHeader_CodeSetInfo, -#[doc = "Title IDs of the titles that this program depends on"] -#[doc = ""] - + #[doc = "Title IDs of the titles that this program depends on"] + #[doc = ""] pub dependencies: [u64_; 48usize], -#[doc = "System info, see [`ExHeader_SystemInfo`]"] -#[doc = ""] - + #[doc = "System info, see [`ExHeader_SystemInfo`]"] + #[doc = ""] pub system_info: ExHeader_SystemInfo, } impl Default for ExHeader_SystemControlInfo { @@ -4699,25 +4488,20 @@ impl Default for ExHeader_SystemControlInfo { } #[doc = "The ARM11 filesystem info of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11StorageInfo { -#[doc = "Extdata ID"] -#[doc = ""] - + #[doc = "Extdata ID"] + #[doc = ""] pub extdata_id: u64_, -#[doc = "IDs of the system savedata accessible by the title"] -#[doc = ""] - + #[doc = "IDs of the system savedata accessible by the title"] + #[doc = ""] pub system_savedata_ids: [u32_; 2usize], -#[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] -#[doc = ""] - + #[doc = "IDs of the savedata accessible by the title, 20 bits each, followed by \"Use other variation savedata\""] + #[doc = ""] pub accessible_savedata_ids: u64_, -#[doc = "FS access flags"] -#[doc = ""] - + #[doc = "FS access flags"] + #[doc = ""] pub fs_access_info: u32_, pub _bitfield_align_1: [u32; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, @@ -4781,19 +4565,16 @@ impl ExHeader_Arm11StorageInfo { } #[doc = "The CPU-related and memory-layout-related info of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11CoreInfo { -#[doc = "The low title ID of the target firmware"] -#[doc = ""] - + #[doc = "The low title ID of the target firmware"] + #[doc = ""] pub core_version: u32_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, -#[doc = "The priority of the title's main thread"] -#[doc = ""] - + #[doc = "The priority of the title's main thread"] + #[doc = ""] pub priority: u8_, } impl Default for ExHeader_Arm11CoreInfo { @@ -4944,37 +4725,29 @@ impl ExHeader_Arm11CoreInfo { } #[doc = "The ARM11 system-local capabilities of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Arm11SystemLocalCapabilities { -#[doc = "Title ID"] -#[doc = ""] - + #[doc = "Title ID"] + #[doc = ""] pub title_id: u64_, -#[doc = "Core info, see [`ExHeader_Arm11CoreInfo`]"] -#[doc = ""] - + #[doc = "Core info, see [`ExHeader_Arm11CoreInfo`]"] + #[doc = ""] pub core_info: ExHeader_Arm11CoreInfo, -#[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] -#[doc = ""] - + #[doc = "Resource limit descriptors, only \"CpuTime\" (first byte) sems to be used"] + #[doc = ""] pub reslimits: [u16_; 16usize], -#[doc = "Storage info, see [`ExHeader_Arm11StorageInfo`]"] -#[doc = ""] - + #[doc = "Storage info, see [`ExHeader_Arm11StorageInfo`]"] + #[doc = ""] pub storage_info: ExHeader_Arm11StorageInfo, -#[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] -#[doc = ""] - + #[doc = "List of the services the title has access to. Limited to 32 prior to system version 9.3"] + #[doc = ""] pub service_access: [[::libc::c_char; 8usize]; 34usize], -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 15usize], -#[doc = "Resource limit category, see [`ExHeader_Arm11SystemLocalCapabilities`]"] -#[doc = ""] - + #[doc = "Resource limit category, see [`ExHeader_Arm11SystemLocalCapabilities`]"] + #[doc = ""] pub reslimit_category: ResourceLimitCategory, } impl Default for ExHeader_Arm11SystemLocalCapabilities { @@ -4988,51 +4761,41 @@ impl Default for ExHeader_Arm11SystemLocalCapabilities { } #[doc = "The ARM11 kernel capabilities of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm11KernelCapabilities { -#[doc = "ARM11 kernel descriptors, see 3dbrew"] -#[doc = ""] - + #[doc = "ARM11 kernel descriptors, see 3dbrew"] + #[doc = ""] pub descriptors: [u32_; 28usize], -#[doc = "Reserved"] -#[doc = ""] - + #[doc = "Reserved"] + #[doc = ""] pub reserved: [u8_; 16usize], } #[doc = "The ARM9 access control of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct ExHeader_Arm9AccessControl { -#[doc = "Process9 FS descriptors, see 3dbrew"] -#[doc = ""] - + #[doc = "Process9 FS descriptors, see 3dbrew"] + #[doc = ""] pub descriptors: [u8_; 15usize], -#[doc = "Descriptor version"] -#[doc = ""] - + #[doc = "Descriptor version"] + #[doc = ""] pub descriptor_version: u8_, } #[doc = "The access control information of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessControlInfo { -#[doc = "ARM11 system-local capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] -#[doc = ""] - + #[doc = "ARM11 system-local capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] + #[doc = ""] pub local_caps: ExHeader_Arm11SystemLocalCapabilities, -#[doc = "ARM11 kernel capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] -#[doc = ""] - + #[doc = "ARM11 kernel capabilities, see [`ExHeader_Arm11SystemLocalCapabilities`]"] + #[doc = ""] pub kernel_caps: ExHeader_Arm11KernelCapabilities, -#[doc = "ARM9 access control, see [`ExHeader_Arm9AccessControl`]"] -#[doc = ""] - + #[doc = "ARM9 access control, see [`ExHeader_Arm9AccessControl`]"] + #[doc = ""] pub access_control: ExHeader_Arm9AccessControl, } impl Default for ExHeader_AccessControlInfo { @@ -5046,17 +4809,14 @@ impl Default for ExHeader_AccessControlInfo { } #[doc = "Main extended header data, as returned by PXIPM, Loader and FSREG service commands"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_Info { -#[doc = "System control info, see [`ExHeader_SystemControlInfo`]"] -#[doc = ""] - + #[doc = "System control info, see [`ExHeader_SystemControlInfo`]"] + #[doc = ""] pub sci: ExHeader_SystemControlInfo, -#[doc = "Access control info, see [`ExHeader_AccessControlInfo`]"] -#[doc = ""] - + #[doc = "Access control info, see [`ExHeader_AccessControlInfo`]"] + #[doc = ""] pub aci: ExHeader_AccessControlInfo, } impl Default for ExHeader_Info { @@ -5070,21 +4830,17 @@ impl Default for ExHeader_Info { } #[doc = "Extended header access descriptor"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader_AccessDescriptor { -#[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] -#[doc = ""] - + #[doc = "The signature of the access descriptor (RSA-2048-SHA256)"] + #[doc = ""] pub signature: [u8_; 256usize], -#[doc = "The modulus used for the above signature, with 65537 as public exponent"] -#[doc = ""] - + #[doc = "The modulus used for the above signature, with 65537 as public exponent"] + #[doc = ""] pub ncchModulus: [u8_; 256usize], -#[doc = "This is compared for equality with the first ACI by Process9, see [`ExHeader_AccessControlInfo`]"] -#[doc = ""] - + #[doc = "This is compared for equality with the first ACI by Process9, see [`ExHeader_AccessControlInfo`]"] + #[doc = ""] pub acli: ExHeader_AccessControlInfo, } impl Default for ExHeader_AccessDescriptor { @@ -5098,17 +4854,14 @@ impl Default for ExHeader_AccessDescriptor { } #[doc = "The NCCH Extended Header of a title"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ExHeader { -#[doc = "Main extended header data, see [`ExHeader_Info`]"] -#[doc = ""] - + #[doc = "Main extended header data, see [`ExHeader_Info`]"] + #[doc = ""] pub info: ExHeader_Info, -#[doc = "Access descriptor, see [`ExHeader_AccessDescriptor`]"] -#[doc = ""] - + #[doc = "Access descriptor, see [`ExHeader_AccessDescriptor`]"] + #[doc = ""] pub access_descriptor: ExHeader_AccessDescriptor, } impl Default for ExHeader { @@ -5122,74 +4875,80 @@ impl Default for ExHeader { } extern "C" { #[must_use] -#[doc = "Initializes the service API."] -#[doc = ""] - + #[doc = "Initializes the service API."] + #[doc = ""] pub fn srvInit() -> Result; } extern "C" { -#[doc = "Exits the service API."] -#[doc = ""] - + #[doc = "Exits the service API."] + #[doc = ""] pub fn srvExit(); } extern "C" { -#[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] -#[doc = "srvGetServiceHandle will always block if the service hasn't been registered yet,"] -#[doc = "use srvIsServiceRegistered to check whether that is the case or not."] -#[doc = "# Arguments"] -#[doc = "`blocking` - Whether srvGetServiceHandle should be non-blocking."] -#[doc = ""] - + #[doc = "Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default), in case of unavailable (full) requested services."] + #[doc = ""] + #[doc = "srvGetServiceHandle will always block if the service hasn't been registered yet,"] + #[doc = "use srvIsServiceRegistered to check whether that is the case or not."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `blocking` - Whether srvGetServiceHandle should be non-blocking."] + #[doc = ""] pub fn srvSetBlockingPolicy(nonBlocking: bool); } extern "C" { -#[doc = "Gets the current service API session handle."] -#[doc = "Returns:"] -#[doc = "The current service API session handle."] -#[doc = ""] - + #[doc = "Gets the current service API session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current service API session handle."] + #[doc = ""] pub fn srvGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] -#[doc = "0xD8E06406 if the caller has no right to access the service,"] -#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] -#[doc = "Returns:"] -#[doc = "0 if no error occured,"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the handle to."] -#[doc = "`name` - Name of the service."] -#[doc = ""] - + #[doc = "Retrieves a service handle, retrieving from the environment handle list if possible."] + #[doc = ""] + #[doc = "0xD8E06406 if the caller has no right to access the service,"] + #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 0 if no error occured,"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the handle to."] + #[doc = "* `name` - Name of the service."] + #[doc = ""] pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Registers the current process as a client to the service API."] -#[doc = ""] - + #[doc = "Registers the current process as a client to the service API."] + #[doc = ""] pub fn srvRegisterClient() -> Result; } extern "C" { #[must_use] -#[doc = "Enables service notificatios, returning a notification semaphore."] -#[doc = "# Arguments"] -#[doc = "`semaphoreOut` - Pointer to output the notification semaphore to."] -#[doc = ""] - + #[doc = "Enables service notificatios, returning a notification semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphoreOut` - Pointer to output the notification semaphore to."] + #[doc = ""] pub fn srvEnableNotification(semaphoreOut: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Registers the current process as a service."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the service handle to."] -#[doc = "`name` - Name of the service."] -#[doc = "`maxSessions` - Maximum number of sessions the service can handle."] -#[doc = ""] - + #[doc = "Registers the current process as a service."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the service handle to."] + #[doc = "* `name` - Name of the service."] + #[doc = "* `maxSessions` - Maximum number of sessions the service can handle."] + #[doc = ""] pub fn srvRegisterService( out: *mut Handle, name: *const ::libc::c_char, @@ -5198,111 +4957,125 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters the current process as a service."] -#[doc = "# Arguments"] -#[doc = "`name` - Name of the service."] -#[doc = ""] - + #[doc = "Unregisters the current process as a service."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the service."] + #[doc = ""] pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves a service handle."] -#[doc = "0xD8E06406 if the caller has no right to access the service,"] -#[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] -#[doc = "Returns:"] -#[doc = "0 if no error occured,"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the handle to."] -#[doc = "`name` - Name of the service."] -#[doc = ""] - + #[doc = "Retrieves a service handle."] + #[doc = ""] + #[doc = "0xD8E06406 if the caller has no right to access the service,"] + #[doc = "0xD0401834 if the requested service port is full and srvGetServiceHandle is non-blocking (see [`srvSetBlockingPolicy)`]"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 0 if no error occured,"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the handle to."] + #[doc = "* `name` - Name of the service."] + #[doc = ""] pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Registers a port."] -#[doc = "# Arguments"] -#[doc = "`name` - Name of the port."] -#[doc = "`clientHandle` - Client handle of the port."] -#[doc = ""] - + #[doc = "Registers a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the port."] + #[doc = "* `clientHandle` - Client handle of the port."] + #[doc = ""] pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Unregisters a port."] -#[doc = "# Arguments"] -#[doc = "`name` - Name of the port."] -#[doc = ""] - + #[doc = "Unregisters a port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the port."] + #[doc = ""] pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves a port handle."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the handle to."] -#[doc = "`name` - Name of the port."] -#[doc = ""] - + #[doc = "Retrieves a port handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the handle to."] + #[doc = "* `name` - Name of the port."] + #[doc = ""] pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for a port to be registered."] -#[doc = "# Arguments"] -#[doc = "`name` - Name of the port to wait for registration."] -#[doc = ""] - + #[doc = "Waits for a port to be registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the port to wait for registration."] + #[doc = ""] pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Subscribes to a notification."] -#[doc = "# Arguments"] -#[doc = "`notificationId` - ID of the notification."] -#[doc = ""] - + #[doc = "Subscribes to a notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn srvSubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Unsubscribes from a notification."] -#[doc = "# Arguments"] -#[doc = "`notificationId` - ID of the notification."] -#[doc = ""] - + #[doc = "Unsubscribes from a notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn srvUnsubscribe(notificationId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Receives a notification."] -#[doc = "# Arguments"] -#[doc = "`notificationIdOut` - Pointer to output the ID of the received notification to."] -#[doc = ""] - + #[doc = "Receives a notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationIdOut` - Pointer to output the ID of the received notification to."] + #[doc = ""] pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Publishes a notification to subscribers."] -#[doc = "# Arguments"] -#[doc = "`notificationId` - ID of the notification."] -#[doc = "`flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] -#[doc = ""] - + #[doc = "Publishes a notification to subscribers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = "* `flags` - Flags to publish with. (bit 0 = only fire if not fired, bit 1 = do not report an error if there are more than 16 pending notifications)"] + #[doc = ""] pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] -#[doc = "# Arguments"] -#[doc = "`processIdCountOut` - Pointer to output the number of process IDs to."] -#[doc = "`processIdsOut` - Pointer to output the process IDs to. Should have size \"60 sizeof(u32)\"."] -#[doc = "`notificationId` - ID of the notification."] -#[doc = ""] - + #[doc = "Publishes a notification to subscribers and retrieves a list of all processes that were notified."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `processIdCountOut` - Pointer to output the number of process IDs to."] + #[doc = "* `processIdsOut` - Pointer to output the process IDs to. Should have size \"60 * sizeof(u32)\"."] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn srvPublishAndGetSubscriber( processIdCountOut: *mut u32_, processIdsOut: *mut u32_, @@ -5311,99 +5084,86 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks whether a service is registered."] -#[doc = "# Arguments"] -#[doc = "`registeredOut` - Pointer to output the registration status to."] -#[doc = "`name` - Name of the service to check."] -#[doc = ""] - + #[doc = "Checks whether a service is registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `registeredOut` - Pointer to output the registration status to."] + #[doc = "* `name` - Name of the service to check."] + #[doc = ""] pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Checks whether a port is registered."] -#[doc = "# Arguments"] -#[doc = "`registeredOut` - Pointer to output the registration status to."] -#[doc = "`name` - Name of the port to check."] -#[doc = ""] - + #[doc = "Checks whether a port is registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `registeredOut` - Pointer to output the registration status to."] + #[doc = "* `name` - Name of the port to check."] + #[doc = ""] pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } #[doc = "For generic errors. Shows miscellaneous info."] #[doc = ""] - pub const ERRF_ERRTYPE_GENERIC: ERRF_ErrType = 0; #[doc = "Same output as generic, but informs the user that \"the System Memory has been damaged\"."] #[doc = ""] - pub const ERRF_ERRTYPE_MEM_CORRUPT: ERRF_ErrType = 1; #[doc = "Displays the \"The Game Card was removed.\" message."] #[doc = ""] - pub const ERRF_ERRTYPE_CARD_REMOVED: ERRF_ErrType = 2; #[doc = "For exceptions, or more specifically 'crashes'. union data should be exception_data."] #[doc = ""] - pub const ERRF_ERRTYPE_EXCEPTION: ERRF_ErrType = 3; #[doc = "For general failure. Shows a message. union data should have a string set in failure_mesg"] #[doc = ""] - pub const ERRF_ERRTYPE_FAILURE: ERRF_ErrType = 4; #[doc = "Outputs logs to NAND in some cases."] #[doc = ""] - pub const ERRF_ERRTYPE_LOGGED: ERRF_ErrType = 5; #[doc = "Types of errors that can be thrown by err:f."] #[doc = ""] - pub type ERRF_ErrType = ::libc::c_uint; #[doc = "Prefetch Abort"] #[doc = ""] - pub const ERRF_EXCEPTION_PREFETCH_ABORT: ERRF_ExceptionType = 0; #[doc = "Data abort"] #[doc = ""] - pub const ERRF_EXCEPTION_DATA_ABORT: ERRF_ExceptionType = 1; #[doc = "Undefined instruction"] #[doc = ""] - pub const ERRF_EXCEPTION_UNDEFINED: ERRF_ExceptionType = 2; #[doc = "VFP (floating point) exception."] #[doc = ""] - pub const ERRF_EXCEPTION_VFP: ERRF_ExceptionType = 3; #[doc = "Types of 'Exceptions' thrown for ERRF_ERRTYPE_EXCEPTION"] #[doc = ""] - pub type ERRF_ExceptionType = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionInfo { -#[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] -#[doc = ""] - + #[doc = "Type of the exception. One of the ERRF_EXCEPTION_* values."] + #[doc = ""] pub type_: ERRF_ExceptionType, pub reserved: [u8_; 3usize], -#[doc = "ifsr (prefetch abort) / dfsr (data abort)"] -#[doc = ""] - + #[doc = "ifsr (prefetch abort) / dfsr (data abort)"] + #[doc = ""] pub fsr: u32_, -#[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] -#[doc = ""] - + #[doc = "pc = ifar (prefetch abort) / dfar (data abort)"] + #[doc = ""] pub far: u32_, pub fpexc: u32_, pub fpinst: u32_, @@ -5421,13 +5181,11 @@ impl Default for ERRF_ExceptionInfo { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ERRF_ExceptionData { -#[doc = "Exception info struct"] -#[doc = ""] - + #[doc = "Exception info struct"] + #[doc = ""] pub excep: ERRF_ExceptionInfo, -#[doc = "CPU register dump."] -#[doc = ""] - + #[doc = "CPU register dump."] + #[doc = ""] pub regs: CpuRegisters, } impl Default for ERRF_ExceptionData { @@ -5442,53 +5200,42 @@ impl Default for ERRF_ExceptionData { #[repr(C)] #[derive(Copy, Clone)] pub struct ERRF_FatalErrInfo { -#[doc = "Type, one of the ERRF_ERRTYPE_* enum"] -#[doc = ""] - + #[doc = "Type, one of the ERRF_ERRTYPE_* enum"] + #[doc = ""] pub type_: ERRF_ErrType, -#[doc = "High revison ID"] -#[doc = ""] - + #[doc = "High revison ID"] + #[doc = ""] pub revHigh: u8_, -#[doc = "Low revision ID"] -#[doc = ""] - + #[doc = "Low revision ID"] + #[doc = ""] pub revLow: u16_, -#[doc = "Result code"] -#[doc = ""] - + #[doc = "Result code"] + #[doc = ""] pub resCode: u32_, -#[doc = "PC address at exception"] -#[doc = ""] - + #[doc = "PC address at exception"] + #[doc = ""] pub pcAddr: u32_, -#[doc = "Process ID."] -#[doc = ""] - + #[doc = "Process ID."] + #[doc = ""] pub procId: u32_, -#[doc = "Title ID."] -#[doc = ""] - + #[doc = "Title ID."] + #[doc = ""] pub titleId: u64_, -#[doc = "Application Title ID."] -#[doc = ""] - + #[doc = "Application Title ID."] + #[doc = ""] pub appTitleId: u64_, -#[doc = "The different types of data for errors."] -#[doc = ""] - + #[doc = "The different types of data for errors."] + #[doc = ""] pub data: ERRF_FatalErrInfo__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union ERRF_FatalErrInfo__bindgen_ty_1 { -#[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] -#[doc = ""] - + #[doc = "Data for when type is ERRF_ERRTYPE_EXCEPTION"] + #[doc = ""] pub exception_data: ERRF_ExceptionData, -#[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] -#[doc = ""] - + #[doc = "String for when type is ERRF_ERRTYPE_FAILURE"] + #[doc = ""] pub failure_mesg: [::libc::c_char; 96usize], } impl Default for ERRF_FatalErrInfo__bindgen_ty_1 { @@ -5511,82 +5258,88 @@ impl Default for ERRF_FatalErrInfo { } extern "C" { #[must_use] -#[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] -#[doc = ""] - + #[doc = "Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] + #[doc = ""] pub fn errfInit() -> Result; } extern "C" { -#[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] -#[doc = ""] - + #[doc = "Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this."] + #[doc = ""] pub fn errfExit(); } extern "C" { -#[doc = "Gets the current err:f API session handle."] -#[doc = "Returns:"] -#[doc = "The current err:f API session handle."] -#[doc = ""] - + #[doc = "Gets the current err:f API session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current err:f API session handle."] + #[doc = ""] pub fn errfGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Throws a system error and possibly results in ErrDisp triggering."] -#[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] -#[doc = "top screen with a developer console or the proper patches in a CFW applied."] -#[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] -#[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] -#[doc = "constructing the ERRF_FatalErrInfo struct yourself."] -#[doc = "# Arguments"] -#[doc = "`error` - Error to throw. [Direction: In]"] -#[doc = ""] - + #[doc = "Throws a system error and possibly results in ErrDisp triggering."] + #[doc = ""] + #[doc = "After performing this, the system may panic and need to be rebooted. Extra information will be displayed on the"] + #[doc = "top screen with a developer console or the proper patches in a CFW applied."] + #[doc = "The error may not be shown and execution aborted until errfExit(void) is called."] + #[doc = "You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of"] + #[doc = "constructing the ERRF_FatalErrInfo struct yourself."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `error` - Error to throw. [Direction: In]"] + #[doc = ""] pub fn ERRF_Throw(error: *const ERRF_FatalErrInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Throws a system error with the given Result code."] -#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] -#[doc = "This function \\em does fill in the address where this function was called from."] -#[doc = "See for expected top screen output"] -#[doc = "on development units/patched ErrDisp."] -#[doc = "# Arguments"] -#[doc = "`failure` - Result code to throw. [Direction: In]"] -#[doc = ""] - + #[doc = "Throws a system error with the given Result code."] + #[doc = ""] + #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_GENERIC and fills in the required data."] + #[doc = "This function \\em does fill in the address where this function was called from."] + #[doc = "See for expected top screen output"] + #[doc = "on development units/patched ErrDisp."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `failure` - Result code to throw. [Direction: In]"] + #[doc = ""] pub fn ERRF_ThrowResult(failure: Result) -> Result; } extern "C" { #[must_use] -#[doc = "Throws a system error with the given Result code and message."] -#[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] -#[doc = "This function does \\em not fill in the address where this function was called from because it"] -#[doc = "would not be displayed."] -#[doc = "The message is only displayed on development units/patched ErrDisp."] -#[doc = "See for expected top screen output"] -#[doc = "on development units/patched ErrDisp."] -#[doc = "# Arguments"] -#[doc = "`failure` - Result code to throw. [Direction: In]"] -#[doc = "`message` - The message to display. [Direction: In]"] -#[doc = ""] - + #[doc = "Throws a system error with the given Result code and message."] + #[doc = ""] + #[doc = "This calls ERRF_Throw() with error type ERRF_ERRTYPE_FAILURE and fills in the required data."] + #[doc = "This function does \\em not fill in the address where this function was called from because it"] + #[doc = "would not be displayed."] + #[doc = "The message is only displayed on development units/patched ErrDisp."] + #[doc = "See for expected top screen output"] + #[doc = "on development units/patched ErrDisp."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `failure` - Result code to throw. [Direction: In]"] + #[doc = "* `message` - The message to display. [Direction: In]"] + #[doc = ""] pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result; } extern "C" { -#[doc = "Handles an exception using ErrDisp."] -#[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] -#[doc = "[`threadOnException`]"] -#[doc = "# Arguments"] -#[doc = "`excep` - Exception information"] -#[doc = "`regs` - CPU registers"] -#[doc = ""] - + #[doc = "Handles an exception using ErrDisp."] + #[doc = ""] + #[doc = "You might want to clear ENVINFO's bit0 to be able to see any debugging information."] + #[doc = "[`threadOnException`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `excep` - Exception information"] + #[doc = "* `regs` - CPU registers"] + #[doc = ""] pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters); } #[doc = "Kernel configuration page (read-only)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osKernelConfig_s { @@ -5612,30 +5365,24 @@ pub struct osKernelConfig_s { } #[doc = "Time reference information struct (filled in by PTM)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osTimeRef_s { -#[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] -#[doc = ""] - + #[doc = "Milliseconds elapsed since January 1900 when this structure was last updated"] + #[doc = ""] pub value_ms: u64_, -#[doc = "System ticks elapsed since boot when this structure was last updated"] -#[doc = ""] - + #[doc = "System ticks elapsed since boot when this structure was last updated"] + #[doc = ""] pub value_tick: u64_, -#[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around [`SYSCLOCK_ARM11)`]"] -#[doc = ""] - + #[doc = "System clock frequency in Hz adjusted using RTC measurements (usually around [`SYSCLOCK_ARM11)`]"] + #[doc = ""] pub sysclock_hz: s64, -#[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] -#[doc = ""] - + #[doc = "Measured time drift of the system clock (according to the RTC) in milliseconds since the last update"] + #[doc = ""] pub drift_ms: s64, } #[doc = "Shared system configuration page structure (read-only or read-write depending on exheader)."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct osSharedConfig_s { @@ -5661,22 +5408,18 @@ pub struct osSharedConfig_s { } #[doc = "Tick counter."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct TickCounter { -#[doc = "Elapsed CPU ticks between measurements."] -#[doc = ""] - + #[doc = "Elapsed CPU ticks between measurements."] + #[doc = ""] pub elapsed: u64_, -#[doc = "Point in time used as reference."] -#[doc = ""] - + #[doc = "Point in time used as reference."] + #[doc = ""] pub reference: u64_, } #[doc = "OS_VersionBin. Format of the system version: \"..-\""] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct OS_VersionBin { @@ -5688,81 +5431,101 @@ pub struct OS_VersionBin { pub reserved_x5: [u8_; 3usize], } extern "C" { -#[doc = "Converts an address from virtual (process) memory to physical memory."] -#[doc = "It is sometimes required by services or when using the GPU command buffer."] -#[doc = "Returns:"] -#[doc = "The corresponding physical address."] -#[doc = "# Arguments"] -#[doc = "`vaddr` - Input virtual address."] -#[doc = ""] - + #[doc = "Converts an address from virtual (process) memory to physical memory."] + #[doc = ""] + #[doc = "It is sometimes required by services or when using the GPU command buffer."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The corresponding physical address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vaddr` - Input virtual address."] + #[doc = ""] pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32_; } extern "C" { -#[doc = "Converts 0x14* vmem to 0x30*."] -#[doc = "Returns:"] -#[doc = "The corresponding address in the 0x30range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] -#[doc = "# Arguments"] -#[doc = "`vaddr` - Input virtual address."] -#[doc = ""] - + #[doc = "Converts 0x14* vmem to 0x30*."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The corresponding address in the 0x30* range, the input address if it's already within the new vmem, or 0 if it's outside of both ranges."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vaddr` - Input virtual address."] + #[doc = ""] pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Retrieves basic information about a service error."] -#[doc = "This can be used to get some details about an error returned by a service call."] -#[doc = "Returns:"] -#[doc = "A string containing a summary of an error."] -#[doc = "# Arguments"] -#[doc = "`error` - Error to retrieve information about."] -#[doc = ""] - + #[doc = "Retrieves basic information about a service error."] + #[doc = ""] + #[doc = "This can be used to get some details about an error returned by a service call."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A string containing a summary of an error."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `error` - Error to retrieve information about."] + #[doc = ""] pub fn osStrError(error: Result) -> *const ::libc::c_char; } extern "C" { -#[doc = "Reads the latest reference timepoint published by PTM."] -#[doc = "Returns:"] -#[doc = "Structure (see [`osTimeRef_s)`]"] -#[doc = ""] - + #[doc = "Reads the latest reference timepoint published by PTM."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Structure (see [`osTimeRef_s)`]"] + #[doc = ""] pub fn osGetTimeRef() -> osTimeRef_s; } extern "C" { -#[doc = "Gets the current time."] -#[doc = "Returns:"] -#[doc = "The number of milliseconds since 1st Jan 1900 00:00."] -#[doc = ""] - + #[doc = "Gets the current time."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The number of milliseconds since 1st Jan 1900 00:00."] + #[doc = ""] pub fn osGetTime() -> u64_; } extern "C" { -#[doc = "Reads the elapsed time in a tick counter."] -#[doc = "Returns:"] -#[doc = "The number of milliseconds elapsed."] -#[doc = "# Arguments"] -#[doc = "`cnt` - The tick counter."] -#[doc = ""] - + #[doc = "Reads the elapsed time in a tick counter."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The number of milliseconds elapsed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cnt` - The tick counter."] + #[doc = ""] pub fn osTickCounterRead(cnt: *const TickCounter) -> f64; } extern "C" { -#[doc = "Configures the New 3DS speedup."] -#[doc = "# Arguments"] -#[doc = "`enable` - Specifies whether to enable or disable the speedup."] -#[doc = ""] - + #[doc = "Configures the New 3DS speedup."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Specifies whether to enable or disable the speedup."] + #[doc = ""] pub fn osSetSpeedupEnable(enable: bool); } extern "C" { #[must_use] -#[doc = "Gets the NAND system-version stored in NVer/CVer."] -#[doc = "Returns:"] -#[doc = "The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] -#[doc = "# Arguments"] -#[doc = "`nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] -#[doc = "`cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] -#[doc = ""] - + #[doc = "Gets the NAND system-version stored in NVer/CVer."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The result-code. This value can be positive if opening \"romfs:/version.bin\" fails with stdio, since errno would be returned in that case. In some cases the error can be special negative values as well."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nver_versionbin` - Output OS_VersionBin structure for the data read from NVer."] + #[doc = "* `cver_versionbin` - Output OS_VersionBin structure for the data read from CVer."] + #[doc = ""] pub fn osGetSystemVersionData( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5770,16 +5533,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This is a wrapper for osGetSystemVersionData."] -#[doc = "Returns:"] -#[doc = "See osGetSystemVersionData."] -#[doc = "# Arguments"] -#[doc = "`nver_versionbin` - Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] -#[doc = "`cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] -#[doc = "`sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] -#[doc = "`sysverstr_maxsize` - Max size of the above string buffer, *includingNULL-terminator."] -#[doc = ""] - + #[doc = "This is a wrapper for osGetSystemVersionData."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* See osGetSystemVersionData."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nver_versionbin` - Optional output OS_VersionBin structure for the data read from NVer, can be NULL."] + #[doc = "* `cver_versionbin` - Optional output OS_VersionBin structure for the data read from CVer, can be NULL."] + #[doc = "* `sysverstr` - Output string where the printed system-version will be written, in the same format displayed by the System Settings title."] + #[doc = "* `sysverstr_maxsize` - Max size of the above string buffer, *including* NULL-terminator."] + #[doc = ""] pub fn osGetSystemVersionDataString( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, @@ -5829,88 +5595,88 @@ extern "C" { #[doc = "A light lock."] #[doc = ""] - pub type LightLock = _LOCK_T; #[doc = "A recursive lock."] #[doc = ""] - pub type RecursiveLock = _LOCK_RECURSIVE_T; #[doc = "A condition variable."] #[doc = ""] - pub type CondVar = s32; #[doc = "A light event."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightEvent { -#[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] -#[doc = ""] - + #[doc = "State of the event: -2=cleared sticky, -1=cleared oneshot, 0=signaled oneshot, 1=signaled sticky"] + #[doc = ""] pub state: s32, -#[doc = "Lock used for sticky timer operation"] -#[doc = ""] - + #[doc = "Lock used for sticky timer operation"] + #[doc = ""] pub lock: LightLock, } #[doc = "A light semaphore."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct LightSemaphore { -#[doc = "The current release count of the semaphore"] -#[doc = ""] - + #[doc = "The current release count of the semaphore"] + #[doc = ""] pub current_count: s32, -#[doc = "Number of threads concurrently acquiring the semaphore"] -#[doc = ""] - + #[doc = "Number of threads concurrently acquiring the semaphore"] + #[doc = ""] pub num_threads_acq: s16, -#[doc = "The maximum release count of the semaphore"] -#[doc = ""] - + #[doc = "The maximum release count of the semaphore"] + #[doc = ""] pub max_count: s16, } extern "C" { #[must_use] -#[doc = "Function used to implement user-mode synchronization primitives."] -#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] -#[doc = "```"] -#[doc = "s32 val=0;"] -#[doc = "// Does *nothing* since val >= 0"] -#[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] -#[doc = "```"] -#[doc = "# Arguments"] -#[doc = "`addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] -#[doc = "`type` - Type of action to be performed by the arbiter"] -#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] -#[doc = "# Notes"] -#[doc = "Usage of this function entails an implicit Data Memory Barrier (dmb)."] -#[doc = ""] - + #[doc = "Function used to implement user-mode synchronization primitives."] + #[doc = ""] + #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] + #[doc = "```"] + #[doc = ""] + #[doc = "s32 val=0;"] + #[doc = "// Does *nothing* since val >= 0"] + #[doc = "syncArbitrateAddress(&val,ARBITRATION_WAIT_IF_LESS_THAN,0);"] + #[doc = "```"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] + #[doc = "* `type` - Type of action to be performed by the arbiter"] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this function entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] -#[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] -#[doc = "```"] -#[doc = "s32 val=0;"] -#[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] -#[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] -#[doc = "```"] -#[doc = "# Arguments"] -#[doc = "`addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] -#[doc = "`type` - Type of action to be performed by the arbiter (must use [`ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT`] or [`ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)`]"] -#[doc = "`value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] -#[doc = "# Notes"] -#[doc = "Usage of this function entails an implicit Data Memory Barrier (dmb)."] -#[doc = ""] - + #[doc = "Function used to implement user-mode synchronization primitives (with timeout)."] + #[doc = ""] + #[doc = "This will perform an arbitration based on #type. The comparisons are done between #value and the value at the address #addr."] + #[doc = "```"] + #[doc = ""] + #[doc = "s32 val=0;"] + #[doc = "// Thread will wait for a signal or wake up after 10000000 nanoseconds because val 1."] + #[doc = "syncArbitrateAddressWithTimeout(&val,ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT,1,10000000LL);"] + #[doc = "```"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr` - Pointer to a signed 32-bit value whose address will be used to identify waiting threads."] + #[doc = "* `type` - Type of action to be performed by the arbiter (must use [`ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT`] or [`ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT)`]"] + #[doc = "* `value` - Number of threads to signal if using [`ARBITRATION_SIGNAL`] or the value used for comparison."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Usage of this function entails an implicit Data Memory Barrier (dmb)."] + #[doc = ""] pub fn syncArbitrateAddressWithTimeout( addr: *mut s32, type_: ArbitrationType, @@ -5919,100 +5685,117 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Initializes a light lock."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Initializes a light lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_Init(lock: *mut LightLock); } extern "C" { -#[doc = "Locks a light lock."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Locks a light lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_Lock(lock: *mut LightLock); } extern "C" { -#[doc = "Attempts to lock a light lock."] -#[doc = "Returns:"] -#[doc = "Zero on success, non-zero on failure."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Attempts to lock a light lock."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_TryLock(lock: *mut LightLock) -> ::libc::c_int; } extern "C" { -#[doc = "Unlocks a light lock."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Unlocks a light lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn LightLock_Unlock(lock: *mut LightLock); } extern "C" { -#[doc = "Initializes a recursive lock."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Initializes a recursive lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_Init(lock: *mut RecursiveLock); } extern "C" { -#[doc = "Locks a recursive lock."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Locks a recursive lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_Lock(lock: *mut RecursiveLock); } extern "C" { -#[doc = "Attempts to lock a recursive lock."] -#[doc = "Returns:"] -#[doc = "Zero on success, non-zero on failure."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Attempts to lock a recursive lock."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> ::libc::c_int; } extern "C" { -#[doc = "Unlocks a recursive lock."] -#[doc = "# Arguments"] -#[doc = "`lock` - Pointer to the lock."] -#[doc = ""] - + #[doc = "Unlocks a recursive lock."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `lock` - Pointer to the lock."] + #[doc = ""] pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock); } extern "C" { -#[doc = "Initializes a condition variable."] -#[doc = "# Arguments"] -#[doc = "`cv` - Pointer to the condition variable."] -#[doc = ""] - + #[doc = "Initializes a condition variable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = ""] pub fn CondVar_Init(cv: *mut CondVar); } extern "C" { -#[doc = "Waits on a condition variable."] -#[doc = "# Arguments"] -#[doc = "`cv` - Pointer to the condition variable."] -#[doc = "`lock` - Pointer to the lock to atomically unlock/relock during the wait."] -#[doc = ""] - + #[doc = "Waits on a condition variable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] + #[doc = ""] pub fn CondVar_Wait(cv: *mut CondVar, lock: *mut LightLock); } extern "C" { -#[doc = "Waits on a condition variable with a timeout."] -#[doc = "Returns:"] -#[doc = "Zero on success, non-zero on failure."] -#[doc = "# Arguments"] -#[doc = "`cv` - Pointer to the condition variable."] -#[doc = "`lock` - Pointer to the lock to atomically unlock/relock during the wait."] -#[doc = "`timeout_ns` - Timeout in nanoseconds."] -#[doc = ""] - + #[doc = "Waits on a condition variable with a timeout."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = "* `lock` - Pointer to the lock to atomically unlock/relock during the wait."] + #[doc = "* `timeout_ns` - Timeout in nanoseconds."] + #[doc = ""] pub fn CondVar_WaitTimeout( cv: *mut CondVar, lock: *mut LightLock, @@ -6020,113 +5803,131 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { -#[doc = "Wakes up threads waiting on a condition variable."] -#[doc = "# Arguments"] -#[doc = "`cv` - Pointer to the condition variable."] -#[doc = "`num_threads` - Maximum number of threads to wake up (or [`ARBITRATION_SIGNAL_ALL`] to wake them all)."] -#[doc = ""] - + #[doc = "Wakes up threads waiting on a condition variable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cv` - Pointer to the condition variable."] + #[doc = "* `num_threads` - Maximum number of threads to wake up (or [`ARBITRATION_SIGNAL_ALL`] to wake them all)."] + #[doc = ""] pub fn CondVar_WakeUp(cv: *mut CondVar, num_threads: s32); } extern "C" { -#[doc = "Initializes a light event."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the event."] -#[doc = "`reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] -#[doc = ""] - + #[doc = "Initializes a light event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = "* `reset_type` - Type of reset the event uses (RESET_ONESHOT/RESET_STICKY)."] + #[doc = ""] pub fn LightEvent_Init(event: *mut LightEvent, reset_type: ResetType); } extern "C" { -#[doc = "Clears a light event."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the event."] -#[doc = ""] - + #[doc = "Clears a light event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Clear(event: *mut LightEvent); } extern "C" { -#[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the event."] -#[doc = ""] - + #[doc = "Wakes up threads waiting on a sticky light event without signaling it. If the event had been signaled before, it is cleared instead."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Pulse(event: *mut LightEvent); } extern "C" { -#[doc = "Signals a light event, waking up threads waiting on it."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the event."] -#[doc = ""] - + #[doc = "Signals a light event, waking up threads waiting on it."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Signal(event: *mut LightEvent); } extern "C" { -#[doc = "Attempts to wait on a light event."] -#[doc = "Returns:"] -#[doc = "Non-zero if the event was signaled, zero otherwise."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the event."] -#[doc = ""] - + #[doc = "Attempts to wait on a light event."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Non-zero if the event was signaled, zero otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_TryWait(event: *mut LightEvent) -> ::libc::c_int; } extern "C" { -#[doc = "Waits on a light event."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the event."] -#[doc = ""] - + #[doc = "Waits on a light event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = ""] pub fn LightEvent_Wait(event: *mut LightEvent); } extern "C" { -#[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] -#[doc = "Returns:"] -#[doc = "Non-zero on timeout, zero otherwise."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the event."] -#[doc = "`timeout_ns` - Timeout in nanoseconds."] -#[doc = ""] - + #[doc = "Waits on a light event until either the event is signaled or the timeout is reached."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Non-zero on timeout, zero otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the event."] + #[doc = "* `timeout_ns` - Timeout in nanoseconds."] + #[doc = ""] pub fn LightEvent_WaitTimeout(event: *mut LightEvent, timeout_ns: s64) -> ::libc::c_int; } extern "C" { -#[doc = "Initializes a light semaphore."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to the semaphore."] -#[doc = "`max_count` - Initial count of the semaphore."] -#[doc = "`max_count` - Maximum count of the semaphore."] -#[doc = ""] - + #[doc = "Initializes a light semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to the semaphore."] + #[doc = "* `max_count` - Initial count of the semaphore."] + #[doc = "* `max_count` - Maximum count of the semaphore."] + #[doc = ""] pub fn LightSemaphore_Init(semaphore: *mut LightSemaphore, initial_count: s16, max_count: s16); } extern "C" { -#[doc = "Acquires a light semaphore."] -#[doc = "# Arguments"] -#[doc = "`semaphore` - Pointer to the semaphore."] -#[doc = "`count` - Acquire count"] -#[doc = ""] - + #[doc = "Acquires a light semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to the semaphore."] + #[doc = "* `count` - Acquire count"] + #[doc = ""] pub fn LightSemaphore_Acquire(semaphore: *mut LightSemaphore, count: s32); } extern "C" { -#[doc = "Attempts to acquire a light semaphore."] -#[doc = "Returns:"] -#[doc = "Zero on success, non-zero on failure"] -#[doc = "# Arguments"] -#[doc = "`semaphore` - Pointer to the semaphore."] -#[doc = "`count` - Acquire count"] -#[doc = ""] - + #[doc = "Attempts to acquire a light semaphore."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Zero on success, non-zero on failure"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to the semaphore."] + #[doc = "* `count` - Acquire count"] + #[doc = ""] pub fn LightSemaphore_TryAcquire(semaphore: *mut LightSemaphore, count: s32) -> ::libc::c_int; } extern "C" { -#[doc = "Releases a light semaphore."] -#[doc = "# Arguments"] -#[doc = "`semaphore` - Pointer to the semaphore."] -#[doc = "`count` - Release count"] -#[doc = ""] - + #[doc = "Releases a light semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to the semaphore."] + #[doc = "* `count` - Release count"] + #[doc = ""] pub fn LightSemaphore_Release(semaphore: *mut LightSemaphore, count: s32); } #[repr(C)] @@ -6137,42 +5938,48 @@ pub struct Thread_tag { #[doc = "libctru thread handle type"] #[doc = ""] - pub type Thread = *mut Thread_tag; #[doc = "Exception handler type, necessarily an ARM function that does not return."] #[doc = ""] - pub type ExceptionHandler = ::core::option::Option< unsafe extern "C" fn(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters), >; extern "C" { -#[doc = "Creates a new libctru thread."] -#[doc = "For userland apps, this has to be within the range [0x18;0x3F]."] -#[doc = "The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] -#[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] -#[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] -#[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] -#[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] -#[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] -#[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] -#[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] -#[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] -#[doc = "**Warning!**"] -#[doc = "[`svcExitThread`] should never be called from the thread, use [`threadExit`] instead."] -#[doc = "Returns:"] -#[doc = "The libctru thread handle on success, NULL on failure."] -#[doc = "# Arguments"] -#[doc = "`entrypoint` - The function that will be called first upon thread creation"] -#[doc = "`arg` - The argument passed to @p entrypoint"] -#[doc = "`stack_size` - The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] -#[doc = "`prio` - Low values gives the thread higher priority."] -#[doc = "`core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] -#[doc = "`detached` - When set to true, the thread is automatically freed when it finishes."] -#[doc = "# Notes"] -#[doc = "Default exit code of a thread is 0."] -#[doc = ""] - + #[doc = "Creates a new libctru thread."] + #[doc = ""] + #[doc = "For userland apps, this has to be within the range [0x18;0x3F]."] + #[doc = "The main thread usually has a priority of 0x30, but not always. Use svcGetThreadPriority() if you need"] + #[doc = "to create a thread with a priority that is explicitly greater or smaller than that of the main thread."] + #[doc = "On Old3DS it must be <2, and on New3DS it must be <4."] + #[doc = "Pass -1 to execute the thread on all CPUs and -2 to execute the thread on the default CPU (read from the Exheader)."] + #[doc = "- Processor #0 is the application core. It is always possible to create a thread on this core."] + #[doc = "- Processor #1 is the system core. If APT_SetAppCpuTimeLimit is used, it is possible to create a single thread on this core."] + #[doc = "- Processor #2 is New3DS exclusive. Normal applications can create threads on this core if the exheader kernel flags bitmask has 0x2000 set."] + #[doc = "- Processor #3 is New3DS exclusive. Normal applications cannot create threads on this core."] + #[doc = "- Processes in the BASE memory region can always create threads on processors #2 and #3."] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* [`svcExitThread`] should never be called from the thread, use [`threadExit`] instead."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The libctru thread handle on success, NULL on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `entrypoint` - The function that will be called first upon thread creation"] + #[doc = "* `arg` - The argument passed to @p entrypoint"] + #[doc = "* `stack_size` - The size of the stack that will be allocated for the thread (will be rounded to a multiple of 8 bytes)"] + #[doc = "* `prio` - Low values gives the thread higher priority."] + #[doc = "* `core_id` - The ID of the processor the thread should be ran on. Processor IDs are labeled starting from 0."] + #[doc = "* `detached` - When set to true, the thread is automatically freed when it finishes."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Default exit code of a thread is 0."] + #[doc = ""] pub fn threadCreate( entrypoint: ThreadFunc, arg: *mut ::libc::c_void, @@ -6183,102 +5990,107 @@ extern "C" { ) -> Thread; } extern "C" { -#[doc = "Retrieves the OS thread handle of a libctru thread."] -#[doc = "Returns:"] -#[doc = "OS thread handle"] -#[doc = "# Arguments"] -#[doc = "`thread` - libctru thread handle"] -#[doc = ""] - + #[doc = "Retrieves the OS thread handle of a libctru thread."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* OS thread handle"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] pub fn threadGetHandle(thread: Thread) -> Handle; } extern "C" { -#[doc = "Retrieves the exit code of a finished libctru thread."] -#[doc = "Returns:"] -#[doc = "Exit code"] -#[doc = "# Arguments"] -#[doc = "`thread` - libctru thread handle"] -#[doc = ""] - + #[doc = "Retrieves the exit code of a finished libctru thread."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Exit code"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] pub fn threadGetExitCode(thread: Thread) -> ::libc::c_int; } extern "C" { -#[doc = "Frees a finished libctru thread."] -#[doc = "# Arguments"] -#[doc = "`thread` - libctru thread handle"] -#[doc = "# Notes"] -#[doc = "This function should not be called if the thread is detached, as it is freed automatically when it finishes."] -#[doc = ""] - + #[doc = "Frees a finished libctru thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function should not be called if the thread is detached, as it is freed automatically when it finishes."] + #[doc = ""] pub fn threadFree(thread: Thread); } extern "C" { #[must_use] -#[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] -#[doc = "# Arguments"] -#[doc = "`thread` - libctru thread handle"] -#[doc = "`timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] -#[doc = ""] - + #[doc = "Waits for a libctru thread to finish (or returns immediately if it is already finished)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] + #[doc = "* `timeout_ns` - Timeout in nanoseconds. Pass U64_MAX if a timeout isn't desired"] + #[doc = ""] pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result; } extern "C" { -#[doc = "Changes a thread's status from attached to detached."] -#[doc = "# Arguments"] -#[doc = "`thread` - libctru thread handle"] -#[doc = ""] - + #[doc = "Changes a thread's status from attached to detached."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `thread` - libctru thread handle"] + #[doc = ""] pub fn threadDetach(thread: Thread); } extern "C" { -#[doc = "Retrieves the libctru thread handle of the current thread."] -#[doc = "Returns:"] -#[doc = "libctru thread handle of the current thread, or NULL for the main thread"] -#[doc = ""] - + #[doc = "Retrieves the libctru thread handle of the current thread."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* libctru thread handle of the current thread, or NULL for the main thread"] + #[doc = ""] pub fn threadGetCurrent() -> Thread; } extern "C" { -#[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] -#[doc = "# Arguments"] -#[doc = "`rc` - Exit code"] -#[doc = ""] - + #[doc = "Exits the current libctru thread with an exit code (not usable from the main thread)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rc` - Exit code"] + #[doc = ""] pub fn threadExit(rc: ::libc::c_int); } #[doc = "Framebuffer information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_FramebufferInfo { -#[doc = "Active framebuffer. (0 = first, 1 = second)"] -#[doc = ""] - + #[doc = "Active framebuffer. (0 = first, 1 = second)"] + #[doc = ""] pub active_framebuf: u32_, -#[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] -#[doc = ""] - + #[doc = "Framebuffer virtual address, for the main screen this is the 3D left framebuffer."] + #[doc = ""] pub framebuf0_vaddr: *mut u32_, -#[doc = "For the main screen: 3D right framebuffer address."] -#[doc = ""] - + #[doc = "For the main screen: 3D right framebuffer address."] + #[doc = ""] pub framebuf1_vaddr: *mut u32_, -#[doc = "Value for 0x1EF00X90, controls framebuffer width."] -#[doc = ""] - + #[doc = "Value for 0x1EF00X90, controls framebuffer width."] + #[doc = ""] pub framebuf_widthbytesize: u32_, -#[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] -#[doc = ""] - + #[doc = "Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70."] + #[doc = ""] pub format: u32_, -#[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] -#[doc = ""] - + #[doc = "Value for 0x1EF00X78, controls which framebuffer is displayed."] + #[doc = ""] pub framebuf_dispselect: u32_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk: u32_, } impl Default for GSPGPU_FramebufferInfo { @@ -6293,54 +6105,43 @@ impl Default for GSPGPU_FramebufferInfo { #[doc = "RGBA8. (4 bytes)"] #[doc = ""] - pub const GSP_RGBA8_OES: GSPGPU_FramebufferFormat = 0; #[doc = "BGR8. (3 bytes)"] #[doc = ""] - pub const GSP_BGR8_OES: GSPGPU_FramebufferFormat = 1; #[doc = "RGB565. (2 bytes)"] #[doc = ""] - pub const GSP_RGB565_OES: GSPGPU_FramebufferFormat = 2; #[doc = "RGB5A1. (2 bytes)"] #[doc = ""] - pub const GSP_RGB5_A1_OES: GSPGPU_FramebufferFormat = 3; #[doc = "RGBA4. (2 bytes)"] #[doc = ""] - pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormat = 4; #[doc = "Framebuffer format."] #[doc = ""] - pub type GSPGPU_FramebufferFormat = ::libc::c_uint; #[doc = "Capture info entry."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfoEntry { -#[doc = "Left framebuffer."] -#[doc = ""] - + #[doc = "Left framebuffer."] + #[doc = ""] pub framebuf0_vaddr: *mut u32_, -#[doc = "Right framebuffer."] -#[doc = ""] - + #[doc = "Right framebuffer."] + #[doc = ""] pub framebuf1_vaddr: *mut u32_, -#[doc = "Framebuffer format."] -#[doc = ""] - + #[doc = "Framebuffer format."] + #[doc = ""] pub format: u32_, -#[doc = "Framebuffer pitch."] -#[doc = ""] - + #[doc = "Framebuffer pitch."] + #[doc = ""] pub framebuf_widthbytesize: u32_, } impl Default for GSPGPU_CaptureInfoEntry { @@ -6354,13 +6155,11 @@ impl Default for GSPGPU_CaptureInfoEntry { } #[doc = "Capture info."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct GSPGPU_CaptureInfo { -#[doc = "Capture info entries, one for each screen."] -#[doc = ""] - + #[doc = "Capture info entries, one for each screen."] + #[doc = ""] pub screencapture: [GSPGPU_CaptureInfoEntry; 2usize], } impl Default for GSPGPU_CaptureInfo { @@ -6375,90 +6174,84 @@ impl Default for GSPGPU_CaptureInfo { #[doc = "Memory fill completed."] #[doc = ""] - pub const GSPGPU_EVENT_PSC0: GSPGPU_Event = 0; #[doc = "TODO"] #[doc = ""] - pub const GSPGPU_EVENT_PSC1: GSPGPU_Event = 1; #[doc = "TODO"] #[doc = ""] - pub const GSPGPU_EVENT_VBlank0: GSPGPU_Event = 2; #[doc = "TODO"] #[doc = ""] - pub const GSPGPU_EVENT_VBlank1: GSPGPU_Event = 3; #[doc = "Display transfer finished."] #[doc = ""] - pub const GSPGPU_EVENT_PPF: GSPGPU_Event = 4; #[doc = "Command list processing finished."] #[doc = ""] - pub const GSPGPU_EVENT_P3D: GSPGPU_Event = 5; #[doc = "TODO"] #[doc = ""] - pub const GSPGPU_EVENT_DMA: GSPGPU_Event = 6; #[doc = "Used to know how many events there are."] #[doc = ""] - pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7; #[doc = "GSPGPU events."] #[doc = ""] - pub type GSPGPU_Event = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes GSPGPU."] -#[doc = ""] - + #[doc = "Initializes GSPGPU."] + #[doc = ""] pub fn gspInit() -> Result; } extern "C" { -#[doc = "Exits GSPGPU."] -#[doc = ""] - + #[doc = "Exits GSPGPU."] + #[doc = ""] pub fn gspExit(); } extern "C" { -#[doc = "Gets a pointer to the current gsp::Gpu session handle."] -#[doc = "Returns:"] -#[doc = "A pointer to the current gsp::Gpu session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current gsp::Gpu session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current gsp::Gpu session handle."] + #[doc = ""] pub fn gspGetSessionHandle() -> *mut Handle; } extern "C" { -#[doc = "Returns true if the application currently has GPU rights."] -#[doc = ""] - + #[doc = "Returns true if the application currently has GPU rights."] + #[doc = ""] pub fn gspHasGpuRight() -> bool; } extern "C" { -#[doc = "Presents a buffer to the specified screen."] -#[doc = "Returns:"] -#[doc = "true if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] -#[doc = "`swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] -#[doc = "`fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] -#[doc = "`fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] -#[doc = "`stride` - Stride in bytes between scanlines"] -#[doc = "`mode` - Mode configuration to be written to LCD register"] -#[doc = "# Notes"] -#[doc = "The most recently presented buffer is processed and configured during the specified screen's next VBlank event."] -#[doc = ""] - + #[doc = "Presents a buffer to the specified screen."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if a buffer had already been presented to the screen but not processed yet by GSP, false otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] + #[doc = "* `swap` - Specifies which set of framebuffer registers to configure and activate (0 or 1)"] + #[doc = "* `fb_a` - Pointer to the framebuffer (in stereo mode: left eye)"] + #[doc = "* `fb_b` - Pointer to the secondary framebuffer (only used in stereo mode for the right eye, otherwise pass the same as fb_a)"] + #[doc = "* `stride` - Stride in bytes between scanlines"] + #[doc = "* `mode` - Mode configuration to be written to LCD register"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The most recently presented buffer is processed and configured during the specified screen's next VBlank event."] + #[doc = ""] pub fn gspPresentBuffer( screen: ::libc::c_uint, swap: ::libc::c_uint, @@ -6469,22 +6262,24 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Returns true if a prior [`gspPresentBuffer`] command is still pending to be processed by GSP."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] -#[doc = ""] - + #[doc = "Returns true if a prior [`gspPresentBuffer`] command is still pending to be processed by GSP."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see [`GSP_SCREEN_TOP`] and [`GSP_SCREEN_BOTTOM)`]"] + #[doc = ""] pub fn gspIsPresentPending(screen: ::libc::c_uint) -> bool; } extern "C" { -#[doc = "Configures a callback to run when a GSPGPU event occurs."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the event."] -#[doc = "`cb` - Callback to run."] -#[doc = "`data` - Data to be passed to the callback."] -#[doc = "`oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] -#[doc = ""] - + #[doc = "Configures a callback to run when a GSPGPU event occurs."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the event."] + #[doc = "* `cb` - Callback to run."] + #[doc = "* `data` - Data to be passed to the callback."] + #[doc = "* `oneShot` - When true, the callback is only executed once. When false, the callback is executed every time the event occurs."] + #[doc = ""] pub fn gspSetEventCallback( id: GSPGPU_Event, cb: ThreadFunc, @@ -6493,95 +6288,99 @@ extern "C" { ); } extern "C" { -#[doc = "Waits for a GSPGPU event to occur."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the event."] -#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] -#[doc = ""] - + #[doc = "Waits for a GSPGPU event to occur."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the event."] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = ""] pub fn gspWaitForEvent(id: GSPGPU_Event, nextEvent: bool); } extern "C" { -#[doc = "Waits for any GSPGPU event to occur."] -#[doc = "The function returns immediately if there are unprocessed events at the time of call."] -#[doc = "Returns:"] -#[doc = "The ID of the event that occurred."] -#[doc = ""] - + #[doc = "Waits for any GSPGPU event to occur."] + #[doc = ""] + #[doc = "The function returns immediately if there are unprocessed events at the time of call."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The ID of the event that occurred."] + #[doc = ""] pub fn gspWaitForAnyEvent() -> GSPGPU_Event; } extern "C" { #[must_use] -#[doc = "Submits a GX command."] -#[doc = "# Arguments"] -#[doc = "`gxCommand` - GX command to execute."] -#[doc = ""] - + #[doc = "Submits a GX command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `gxCommand` - GX command to execute."] + #[doc = ""] pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Acquires GPU rights."] -#[doc = "# Arguments"] -#[doc = "`flags` - Flags to acquire with."] -#[doc = ""] - + #[doc = "Acquires GPU rights."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to acquire with."] + #[doc = ""] pub fn GSPGPU_AcquireRight(flags: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Releases GPU rights."] -#[doc = ""] - + #[doc = "Releases GPU rights."] + #[doc = ""] pub fn GSPGPU_ReleaseRight() -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves display capture info."] -#[doc = "# Arguments"] -#[doc = "`captureinfo` - Pointer to output capture info to."] -#[doc = ""] - + #[doc = "Retrieves display capture info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `captureinfo` - Pointer to output capture info to."] + #[doc = ""] pub fn GSPGPU_ImportDisplayCaptureInfo(captureinfo: *mut GSPGPU_CaptureInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Saves the VRAM sys area."] -#[doc = ""] - + #[doc = "Saves the VRAM sys area."] + #[doc = ""] pub fn GSPGPU_SaveVramSysArea() -> Result; } extern "C" { #[must_use] -#[doc = "Resets the GPU"] -#[doc = ""] - + #[doc = "Resets the GPU"] + #[doc = ""] pub fn GSPGPU_ResetGpuCore() -> Result; } extern "C" { #[must_use] -#[doc = "Restores the VRAM sys area."] -#[doc = ""] - + #[doc = "Restores the VRAM sys area."] + #[doc = ""] pub fn GSPGPU_RestoreVramSysArea() -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to force the LCD to black."] -#[doc = "# Arguments"] -#[doc = "`flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] -#[doc = ""] - + #[doc = "Sets whether to force the LCD to black."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Whether to force the LCD to black. (0 = no, non-zero = yes)"] + #[doc = ""] pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Updates a screen's framebuffer state."] -#[doc = "# Arguments"] -#[doc = "`screenid` - ID of the screen to update."] -#[doc = "`framebufinfo` - Framebuffer information to update with."] -#[doc = ""] - + #[doc = "Updates a screen's framebuffer state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screenid` - ID of the screen to update."] + #[doc = "* `framebufinfo` - Framebuffer information to update with."] + #[doc = ""] pub fn GSPGPU_SetBufferSwap( screenid: u32_, framebufinfo: *const GSPGPU_FramebufferInfo, @@ -6589,46 +6388,50 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Flushes memory from the data cache."] -#[doc = "# Arguments"] -#[doc = "`adr` - Address to flush."] -#[doc = "`size` - Size of the memory to flush."] -#[doc = ""] - + #[doc = "Flushes memory from the data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address to flush."] + #[doc = "* `size` - Size of the memory to flush."] + #[doc = ""] pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates memory in the data cache."] -#[doc = "# Arguments"] -#[doc = "`adr` - Address to invalidate."] -#[doc = "`size` - Size of the memory to invalidate."] -#[doc = ""] - + #[doc = "Invalidates memory in the data cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address to invalidate."] + #[doc = "* `size` - Size of the memory to invalidate."] + #[doc = ""] pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to GPU hardware registers."] -#[doc = "# Arguments"] -#[doc = "`regAddr` - Register address to write to."] -#[doc = "`data` - Data to write."] -#[doc = "`size` - Size of the data to write."] -#[doc = ""] - + #[doc = "Writes to GPU hardware registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regAddr` - Register address to write to."] + #[doc = "* `data` - Data to write."] + #[doc = "* `size` - Size of the data to write."] + #[doc = ""] pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to GPU hardware registers with a mask."] -#[doc = "# Arguments"] -#[doc = "`regAddr` - Register address to write to."] -#[doc = "`data` - Data to write."] -#[doc = "`datasize` - Size of the data to write."] -#[doc = "`maskdata` - Data of the mask."] -#[doc = "`masksize` - Size of the mask."] -#[doc = ""] - + #[doc = "Writes to GPU hardware registers with a mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regAddr` - Register address to write to."] + #[doc = "* `data` - Data to write."] + #[doc = "* `datasize` - Size of the data to write."] + #[doc = "* `maskdata` - Data of the mask."] + #[doc = "* `masksize` - Size of the mask."] + #[doc = ""] pub fn GSPGPU_WriteHWRegsWithMask( regAddr: u32_, data: *const u32_, @@ -6639,25 +6442,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from GPU hardware registers."] -#[doc = "# Arguments"] -#[doc = "`regAddr` - Register address to read from."] -#[doc = "`data` - Buffer to read data to."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Reads from GPU hardware registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regAddr` - Register address to read from."] + #[doc = "* `data` - Buffer to read data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Registers the interrupt relay queue."] -#[doc = "# Arguments"] -#[doc = "`eventHandle` - Handle of the GX command event."] -#[doc = "`flags` - Flags to register with."] -#[doc = "`outMemHandle` - Pointer to output the shared memory handle to."] -#[doc = "`threadID` - Pointer to output the GSP thread ID to."] -#[doc = ""] - + #[doc = "Registers the interrupt relay queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `eventHandle` - Handle of the GX command event."] + #[doc = "* `flags` - Flags to register with."] + #[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] + #[doc = "* `threadID` - Pointer to output the GSP thread ID to."] + #[doc = ""] pub fn GSPGPU_RegisterInterruptRelayQueue( eventHandle: Handle, flags: u32_, @@ -6667,79 +6472,77 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters the interrupt relay queue."] -#[doc = ""] - + #[doc = "Unregisters the interrupt relay queue."] + #[doc = ""] pub fn GSPGPU_UnregisterInterruptRelayQueue() -> Result; } extern "C" { #[must_use] -#[doc = "Triggers a handling of commands written to shared memory."] -#[doc = ""] - + #[doc = "Triggers a handling of commands written to shared memory."] + #[doc = ""] pub fn GSPGPU_TriggerCmdReqQueue() -> Result; } extern "C" { #[must_use] -#[doc = "Sets 3D_LEDSTATE to the input state value."] -#[doc = "# Arguments"] -#[doc = "`disable` - False = 3D LED enable, true = 3D LED disable."] -#[doc = ""] - + #[doc = "Sets 3D_LEDSTATE to the input state value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] + #[doc = ""] pub fn GSPGPU_SetLedForceOff(disable: bool) -> Result; } #[doc = "Top screen"] #[doc = ""] - pub const GFX_TOP: gfxScreen_t = 0; #[doc = "Bottom screen"] #[doc = ""] - pub const GFX_BOTTOM: gfxScreen_t = 1; #[doc = "Screen IDs."] #[doc = ""] - pub type gfxScreen_t = ::libc::c_uint; #[doc = "Left eye framebuffer"] #[doc = ""] - pub const GFX_LEFT: gfx3dSide_t = 0; #[doc = "Right eye framebuffer"] #[doc = ""] - pub const GFX_RIGHT: gfx3dSide_t = 1; #[doc = "Top screen framebuffer side."] +#[doc = ""] #[doc = "This is only meaningful when stereoscopic 3D is enabled on the top screen."] #[doc = "In any other case, use [`GFX_LEFT`]"] #[doc = ""] - pub type gfx3dSide_t = ::libc::c_uint; extern "C" { -#[doc = "Initializes the LCD framebuffers with default parameters"] -#[doc = "This is equivalent to calling: ```"] -#[doc = "gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); ```"] -#[doc = ""] - + #[doc = "Initializes the LCD framebuffers with default parameters"] + #[doc = ""] + #[doc = "This is equivalent to calling: ```"] + #[doc = "gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); ```"] + #[doc = ""] pub fn gfxInitDefault(); } extern "C" { -#[doc = "Initializes the LCD framebuffers."] -#[doc = "This function allocates memory for the framebuffers in the specified memory region."] -#[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] -#[doc = "# Arguments"] -#[doc = "`topFormat` - The format of the top screen framebuffers."] -#[doc = "`bottomFormat` - The format of the bottom screen framebuffers."] -#[doc = "`vramBuffers` - Whether to allocate the framebuffers in VRAM."] -#[doc = "# Notes"] -#[doc = "This function internally calls [`gspInit`]"] -#[doc = ""] - + #[doc = "Initializes the LCD framebuffers."] + #[doc = ""] + #[doc = "This function allocates memory for the framebuffers in the specified memory region."] + #[doc = "Initially, stereoscopic 3D is disabled and double buffering is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `topFormat` - The format of the top screen framebuffers."] + #[doc = "* `bottomFormat` - The format of the bottom screen framebuffers."] + #[doc = "* `vramBuffers` - Whether to allocate the framebuffers in VRAM."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function internally calls [`gspInit`]"] + #[doc = ""] pub fn gfxInit( topFormat: GSPGPU_FramebufferFormat, bottomFormat: GSPGPU_FramebufferFormat, @@ -6747,98 +6550,123 @@ extern "C" { ); } extern "C" { -#[doc = "Deinitializes and frees the LCD framebuffers."] -#[doc = "# Notes"] -#[doc = "This function internally calls [`gspExit`]"] -#[doc = ""] - + #[doc = "Deinitializes and frees the LCD framebuffers."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function internally calls [`gspExit`]"] + #[doc = ""] pub fn gfxExit(); } extern "C" { -#[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] -#[doc = "# Arguments"] -#[doc = "`enable` - Pass true to enable, false to disable."] -#[doc = "# Notes"] -#[doc = "Stereoscopic 3D is disabled by default."] -#[doc = ""] - + #[doc = "Enables or disables the 3D stereoscopic effect on the top screen."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pass true to enable, false to disable."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Stereoscopic 3D is disabled by default."] + #[doc = ""] pub fn gfxSet3D(enable: bool); } extern "C" { -#[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] -#[doc = "Returns:"] -#[doc = "true if 3D enabled, false otherwise."] -#[doc = ""] - + #[doc = "Retrieves the status of the 3D stereoscopic effect on the top screen."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if 3D enabled, false otherwise."] + #[doc = ""] pub fn gfxIs3D() -> bool; } extern "C" { -#[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] -#[doc = "Returns:"] -#[doc = "true if wide mode enabled, false otherwise."] -#[doc = ""] - + #[doc = "Retrieves the status of the 800px (double-height) high resolution display mode of the top screen."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if wide mode enabled, false otherwise."] + #[doc = ""] pub fn gfxIsWide() -> bool; } extern "C" { -#[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] -#[doc = "**Warning!**"] -#[doc = "Wide mode does not work on Old 2DS consoles (however it does work on New 2DS XL consoles)."] -#[doc = "# Arguments"] -#[doc = "`enable` - Pass true to enable, false to disable."] -#[doc = "# Notes"] -#[doc = "Wide mode is disabled by default."] -#[doc = "Wide and stereoscopic 3D modes are mutually exclusive."] -#[doc = "In wide mode pixels are not square, since scanlines are half as tall as they normally are."] -#[doc = ""] - + #[doc = "Enables or disables the 800px (double-height) high resolution display mode of the top screen."] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Wide mode does not work on Old 2DS consoles (however it does work on New 2DS XL consoles)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pass true to enable, false to disable."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Wide mode is disabled by default."] + #[doc = "* Wide and stereoscopic 3D modes are mutually exclusive."] + #[doc = "* In wide mode pixels are not square, since scanlines are half as tall as they normally are."] + #[doc = ""] pub fn gfxSetWide(enable: bool); } extern "C" { -#[doc = "Changes the pixel format of a screen."] -#[doc = "they are freed and new ones are reallocated."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] -#[doc = "`format` - Pixel format (see [`GSPGPU_FramebufferFormat)`]"] -#[doc = "# Notes"] -#[doc = "If the currently allocated framebuffers are too small for the specified format,"] -#[doc = ""] - + #[doc = "Changes the pixel format of a screen."] + #[doc = ""] + #[doc = "they are freed and new ones are reallocated."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = "* `format` - Pixel format (see [`GSPGPU_FramebufferFormat)`]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If the currently allocated framebuffers are too small for the specified format,"] + #[doc = ""] pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormat); } extern "C" { -#[doc = "Retrieves the current pixel format of a screen."] -#[doc = "Returns:"] -#[doc = "Pixel format (see [`GSPGPU_FramebufferFormat)`]"] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] -#[doc = ""] - + #[doc = "Retrieves the current pixel format of a screen."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Pixel format (see [`GSPGPU_FramebufferFormat)`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = ""] pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormat; } extern "C" { -#[doc = "Enables or disables double buffering on a screen."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] -#[doc = "`enable` - Pass true to enable, false to disable."] -#[doc = "# Notes"] -#[doc = "Double buffering is enabled by default."] -#[doc = ""] - + #[doc = "Enables or disables double buffering on a screen."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = "* `enable` - Pass true to enable, false to disable."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Double buffering is enabled by default."] + #[doc = ""] pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, enable: bool); } extern "C" { -#[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] -#[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] -#[doc = "Returns:"] -#[doc = "A pointer to the current framebuffer of the chosen screen."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen ID (see [`gfxScreen_t)`]"] -#[doc = "`side` - Framebuffer side (see [`gfx3dSide_t)`] (pass [`GFX_LEFT`] if not using stereoscopic 3D)"] -#[doc = "`width` - Pointer that will hold the width of the framebuffer in pixels."] -#[doc = "`height` - Pointer that will hold the height of the framebuffer in pixels."] -#[doc = ""] - + #[doc = "Retrieves the framebuffer of the specified screen to which graphics should be rendered."] + #[doc = ""] + #[doc = "Please remember that the returned pointer will change every frame if double buffering is enabled."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current framebuffer of the chosen screen."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = "* `side` - Framebuffer side (see [`gfx3dSide_t)`] (pass [`GFX_LEFT`] if not using stereoscopic 3D)"] + #[doc = "* `width` - Pointer that will hold the width of the framebuffer in pixels."] + #[doc = "* `height` - Pointer that will hold the height of the framebuffer in pixels."] + #[doc = ""] pub fn gfxGetFramebuffer( screen: gfxScreen_t, side: gfx3dSide_t, @@ -6847,78 +6675,83 @@ extern "C" { ) -> *mut u8_; } extern "C" { -#[doc = "Flushes the data cache for the current framebuffers."] -#[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] -#[doc = "**Warning!**"] -#[doc = "This is **only used during software rendering**. Since this function has significant overhead,"] -#[doc = ""] - + #[doc = "Flushes the data cache for the current framebuffers."] + #[doc = ""] + #[doc = "it is preferred to call this only once per frame, after all software rendering is completed."] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* This is **only used during software rendering**. Since this function has significant overhead,"] + #[doc = ""] pub fn gfxFlushBuffers(); } extern "C" { -#[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] -#[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] -#[doc = "since this API does not implement triple buffering."] -#[doc = "**Warning!**"] -#[doc = "Only call this once per screen per frame, otherwise graphical glitches will occur"] -#[doc = "# Arguments"] -#[doc = "`scr` - Screen ID (see [`gfxScreen_t)`]"] -#[doc = "`hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] -#[doc = "# Notes"] -#[doc = "Previously rendered content will be displayed on the screen after the next VBlank."] -#[doc = "This function is still useful even if double buffering is disabled, as it must be used to commit configuration changes."] -#[doc = ""] - + #[doc = "Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled."] + #[doc = ""] + #[doc = "for both eyes, or false if the left image should be duplicated to the right eye."] + #[doc = "since this API does not implement triple buffering."] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* Only call this once per screen per frame, otherwise graphical glitches will occur"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `scr` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = "* `hasStereo` - For the top screen in 3D mode: true if the framebuffer contains individual images"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Previously rendered content will be displayed on the screen after the next VBlank."] + #[doc = "* This function is still useful even if double buffering is disabled, as it must be used to commit configuration changes."] + #[doc = ""] pub fn gfxScreenSwapBuffers(scr: gfxScreen_t, hasStereo: bool); } extern "C" { -#[doc = "**Warning!** This is deprecated! - This function has been superseded by [`gfxScreenSwapBuffers`] please use that instead."] -#[doc = "Same as [`gfxScreenSwapBuffers`] but with hasStereo set to true."] -#[doc = "# Arguments"] -#[doc = "`scr` - Screen ID (see [`gfxScreen_t)`]"] -#[doc = "`immediate` - This parameter no longer has any effect and is thus ignored."] -#[doc = ""] - + #[doc = "**Warning!** This is deprecated! - This function has been superseded by [`gfxScreenSwapBuffers`] please use that instead."] + #[doc = ""] + #[doc = "Same as [`gfxScreenSwapBuffers`] but with hasStereo set to true."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `scr` - Screen ID (see [`gfxScreen_t)`]"] + #[doc = "* `immediate` - This parameter no longer has any effect and is thus ignored."] + #[doc = ""] pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool); } extern "C" { -#[doc = "Updates the configuration of both screens."] -#[doc = "# Notes"] -#[doc = "This function is equivalent to: ``` gfxScreenSwapBuffers(GFX_TOP,true); gfxScreenSwapBuffers(GFX_BOTTOM,true); ```"] -#[doc = ""] - + #[doc = "Updates the configuration of both screens."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function is equivalent to: ``` gfxScreenSwapBuffers(GFX_TOP,true); gfxScreenSwapBuffers(GFX_BOTTOM,true); ```"] + #[doc = ""] pub fn gfxSwapBuffers(); } extern "C" { -#[doc = "Same as [`gfxSwapBuffers`] (formerly different)."] -#[doc = ""] - + #[doc = "Same as [`gfxSwapBuffers`] (formerly different)."] + #[doc = ""] pub fn gfxSwapBuffersGpu(); } #[doc = "A callback for printing a character."] #[doc = ""] - pub type ConsolePrint = ::core::option::Option< unsafe extern "C" fn(con: *mut ::libc::c_void, c: ::libc::c_int) -> bool, >; #[doc = "A font struct for the console."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ConsoleFont { -#[doc = "A pointer to the font graphics"] -#[doc = ""] - + #[doc = "A pointer to the font graphics"] + #[doc = ""] pub gfx: *mut u8_, -#[doc = "Offset to the first valid character in the font table"] -#[doc = ""] - + #[doc = "Offset to the first valid character in the font table"] + #[doc = ""] pub asciiOffset: u16_, -#[doc = "Number of characters in the font graphics"] -#[doc = ""] - + #[doc = "Number of characters in the font graphics"] + #[doc = ""] pub numChars: u16_, } impl Default for ConsoleFont { @@ -6931,88 +6764,71 @@ impl Default for ConsoleFont { } } #[doc = "Console structure used to store the state of a console render context."] +#[doc = ""] #[doc = "Default values from consoleGetDefault();"] #[doc = "```"] +#[doc = ""] #[doc = "PrintConsole defaultConsole ="] #[doc = "{"] #[doc = "};"] #[doc = "```"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PrintConsole { -#[doc = "Font of the console"] -#[doc = ""] - + #[doc = "Font of the console"] + #[doc = ""] pub font: ConsoleFont, -#[doc = "Framebuffer address"] -#[doc = ""] - + #[doc = "Framebuffer address"] + #[doc = ""] pub frameBuffer: *mut u16_, -#[doc = "Current X location of the cursor (as a tile offset by default)"] -#[doc = ""] - + #[doc = "Current X location of the cursor (as a tile offset by default)"] + #[doc = ""] pub cursorX: ::libc::c_int, -#[doc = "Current Y location of the cursor (as a tile offset by default)"] -#[doc = ""] - + #[doc = "Current Y location of the cursor (as a tile offset by default)"] + #[doc = ""] pub cursorY: ::libc::c_int, -#[doc = "Internal state"] -#[doc = ""] - + #[doc = "Internal state"] + #[doc = ""] pub prevCursorX: ::libc::c_int, -#[doc = "Internal state"] -#[doc = ""] - + #[doc = "Internal state"] + #[doc = ""] pub prevCursorY: ::libc::c_int, -#[doc = "Width of the console hardware layer in characters"] -#[doc = ""] - + #[doc = "Width of the console hardware layer in characters"] + #[doc = ""] pub consoleWidth: ::libc::c_int, -#[doc = "Height of the console hardware layer in characters"] -#[doc = ""] - + #[doc = "Height of the console hardware layer in characters"] + #[doc = ""] pub consoleHeight: ::libc::c_int, -#[doc = "Window X location in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window X location in characters (not implemented)"] + #[doc = ""] pub windowX: ::libc::c_int, -#[doc = "Window Y location in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window Y location in characters (not implemented)"] + #[doc = ""] pub windowY: ::libc::c_int, -#[doc = "Window width in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window width in characters (not implemented)"] + #[doc = ""] pub windowWidth: ::libc::c_int, -#[doc = "Window height in characters (not implemented)"] -#[doc = ""] - + #[doc = "Window height in characters (not implemented)"] + #[doc = ""] pub windowHeight: ::libc::c_int, -#[doc = "Size of a tab"] -#[doc = ""] - + #[doc = "Size of a tab"] + #[doc = ""] pub tabSize: ::libc::c_int, -#[doc = "Foreground color"] -#[doc = ""] - + #[doc = "Foreground color"] + #[doc = ""] pub fg: u16_, -#[doc = "Background color"] -#[doc = ""] - + #[doc = "Background color"] + #[doc = ""] pub bg: u16_, -#[doc = "Reverse/bright flags"] -#[doc = ""] - + #[doc = "Reverse/bright flags"] + #[doc = ""] pub flags: ::libc::c_int, -#[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] -#[doc = ""] - + #[doc = "Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles)."] + #[doc = ""] pub PrintChar: ConsolePrint, -#[doc = "True if the console is initialized"] -#[doc = ""] - + #[doc = "True if the console is initialized"] + #[doc = ""] pub consoleInitialised: bool, } impl Default for PrintConsole { @@ -7027,43 +6843,41 @@ impl Default for PrintConsole { #[doc = "Swallows prints to stderr"] #[doc = ""] - pub const debugDevice_NULL: debugDevice = 0; #[doc = "Outputs stderr debug statements using svcOutputDebugString, which can then be captured by interactive debuggers"] #[doc = ""] - pub const debugDevice_SVC: debugDevice = 1; #[doc = "Directs stderr debug statements to 3DS console window"] #[doc = ""] - pub const debugDevice_CONSOLE: debugDevice = 2; pub const debugDevice_3DMOO: debugDevice = 1; #[doc = "Console debug devices supported by libnds."] #[doc = ""] - pub type debugDevice = ::libc::c_uint; extern "C" { -#[doc = "Loads the font into the console."] -#[doc = "# Arguments"] -#[doc = "`console` - Pointer to the console to update, if NULL it will update the current console."] -#[doc = "`font` - The font to load."] -#[doc = ""] - + #[doc = "Loads the font into the console."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `console` - Pointer to the console to update, if NULL it will update the current console."] + #[doc = "* `font` - The font to load."] + #[doc = ""] pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont); } extern "C" { -#[doc = "Sets the print window."] -#[doc = "# Arguments"] -#[doc = "`console` - Console to set, if NULL it will set the current console window."] -#[doc = "`x` - X location of the window."] -#[doc = "`y` - Y location of the window."] -#[doc = "`width` - Width of the window."] -#[doc = "`height` - Height of the window."] -#[doc = ""] - + #[doc = "Sets the print window."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `console` - Console to set, if NULL it will set the current console window."] + #[doc = "* `x` - X location of the window."] + #[doc = "* `y` - Y location of the window."] + #[doc = "* `width` - Width of the window."] + #[doc = "* `height` - Height of the window."] + #[doc = ""] pub fn consoleSetWindow( console: *mut PrintConsole, x: ::libc::c_int, @@ -7073,77 +6887,84 @@ extern "C" { ); } extern "C" { -#[doc = "Gets a pointer to the console with the default values."] -#[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] -#[doc = "Returns:"] -#[doc = "A pointer to the console with the default values."] -#[doc = ""] - + #[doc = "Gets a pointer to the console with the default values."] + #[doc = ""] + #[doc = "This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit()."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the console with the default values."] + #[doc = ""] pub fn consoleGetDefault() -> *mut PrintConsole; } extern "C" { -#[doc = "Make the specified console the render target."] -#[doc = "Returns:"] -#[doc = "A pointer to the previous console."] -#[doc = "# Arguments"] -#[doc = "`console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsoleconsole))."] -#[doc = ""] - + #[doc = "Make the specified console the render target."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the previous console."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `console` - A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console))."] + #[doc = ""] pub fn consoleSelect(console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { -#[doc = "Initialise the console."] -#[doc = "Returns:"] -#[doc = "A pointer to the current console."] -#[doc = "# Arguments"] -#[doc = "`screen` - The screen to use for the console."] -#[doc = "`console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] -#[doc = ""] - + #[doc = "Initialise the console."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current console."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - The screen to use for the console."] + #[doc = "* `console` - A pointer to the console data to initialize (if it's NULL, the default console will be used)."] + #[doc = ""] pub fn consoleInit(screen: gfxScreen_t, console: *mut PrintConsole) -> *mut PrintConsole; } extern "C" { -#[doc = "Initializes debug console output on stderr to the specified device."] -#[doc = "# Arguments"] -#[doc = "`device` - The debug device (or devices) to output debug print statements to."] -#[doc = ""] - + #[doc = "Initializes debug console output on stderr to the specified device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `device` - The debug device (or devices) to output debug print statements to."] + #[doc = ""] pub fn consoleDebugInit(device: debugDevice); } extern "C" { -#[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] -#[doc = ""] - + #[doc = "Clears the screen by using iprintf(\"\\x1b[2J\");"] + #[doc = ""] pub fn consoleClear(); } #[doc = "Use APT workaround."] #[doc = ""] - pub const RUNFLAG_APTWORKAROUND: _bindgen_ty_9 = 1; #[doc = "Reinitialize APT."] #[doc = ""] - pub const RUNFLAG_APTREINIT: _bindgen_ty_9 = 2; #[doc = "Chainload APT on return."] #[doc = ""] - pub const RUNFLAG_APTCHAINLOAD: _bindgen_ty_9 = 4; #[doc = "System run-flags."] #[doc = ""] - pub type _bindgen_ty_9 = ::libc::c_uint; extern "C" { -#[doc = "Retrieves a handle from the environment handle list."] -#[doc = "Returns:"] -#[doc = "The retrieved handle."] -#[doc = "# Arguments"] -#[doc = "`name` - Name of the handle."] -#[doc = ""] - + #[doc = "Retrieves a handle from the environment handle list."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The retrieved handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Name of the handle."] + #[doc = ""] pub fn envGetHandle(name: *const ::libc::c_char) -> Handle; } pub type _off_t = __int64_t; @@ -7344,91 +7165,73 @@ pub struct pthread_once_t { #[doc = "Dummy compression"] #[doc = ""] - pub const DECOMPRESS_DUMMY: decompressType = 0; #[doc = "LZSS/LZ10 compression"] #[doc = ""] - pub const DECOMPRESS_LZSS: decompressType = 16; #[doc = "LZSS/LZ10 compression"] #[doc = ""] - pub const DECOMPRESS_LZ10: decompressType = 16; #[doc = "LZ11 compression"] #[doc = ""] - pub const DECOMPRESS_LZ11: decompressType = 17; #[doc = "Huffman compression with 1-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF1: decompressType = 33; #[doc = "Huffman compression with 2-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF2: decompressType = 34; #[doc = "Huffman compression with 3-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF3: decompressType = 35; #[doc = "Huffman compression with 4-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF4: decompressType = 36; #[doc = "Huffman compression with 5-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF5: decompressType = 37; #[doc = "Huffman compression with 6-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF6: decompressType = 38; #[doc = "Huffman compression with 7-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF7: decompressType = 39; #[doc = "Huffman compression with 8-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF8: decompressType = 40; #[doc = "Huffman compression with 8-bit data"] #[doc = ""] - pub const DECOMPRESS_HUFF: decompressType = 40; #[doc = "Run-length encoding compression"] #[doc = ""] - pub const DECOMPRESS_RLE: decompressType = 48; #[doc = "Compression types"] #[doc = ""] - pub type decompressType = ::libc::c_uint; #[doc = "I/O vector"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct decompressIOVec { -#[doc = "I/O buffer"] -#[doc = ""] - + #[doc = "I/O buffer"] + #[doc = ""] pub data: *mut ::libc::c_void, -#[doc = "Buffer size"] -#[doc = ""] - + #[doc = "Buffer size"] + #[doc = ""] pub size: size_t, } impl Default for decompressIOVec { @@ -7443,7 +7246,6 @@ impl Default for decompressIOVec { #[doc = "Data callback"] #[doc = ""] - pub type decompressCallback = ::core::option::Option< unsafe extern "C" fn( userdata: *mut ::libc::c_void, @@ -7452,15 +7254,18 @@ pub type decompressCallback = ::core::option::Option< ) -> ssize_t, >; extern "C" { -#[doc = "Decompression callback for file descriptors"] -#[doc = "Returns:"] -#[doc = "Number of bytes read"] -#[doc = "# Arguments"] -#[doc = "`userdata` - Address of file descriptor [Direction: In]"] -#[doc = "`buffer` - Buffer to write into [Direction: In]"] -#[doc = "`size` - Size to read from file descriptor [Direction: In]"] -#[doc = ""] - + #[doc = "Decompression callback for file descriptors"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Number of bytes read"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `userdata` - Address of file descriptor [Direction: In]"] + #[doc = "* `buffer` - Buffer to write into [Direction: In]"] + #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] + #[doc = ""] pub fn decompressCallback_FD( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -7468,15 +7273,18 @@ extern "C" { ) -> ssize_t; } extern "C" { -#[doc = "Decompression callback for stdio FILE*"] -#[doc = "Returns:"] -#[doc = "Number of bytes read"] -#[doc = "# Arguments"] -#[doc = "`userdata` - FILE[Direction: In]"] -#[doc = "`buffer` - Buffer to write into [Direction: In]"] -#[doc = "`size` - Size to read from file descriptor [Direction: In]"] -#[doc = ""] - + #[doc = "Decompression callback for stdio FILE*"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Number of bytes read"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `userdata` - FILE* [Direction: In]"] + #[doc = "* `buffer` - Buffer to write into [Direction: In]"] + #[doc = "* `size` - Size to read from file descriptor [Direction: In]"] + #[doc = ""] pub fn decompressCallback_Stdio( userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, @@ -7484,19 +7292,23 @@ extern "C" { ) -> ssize_t; } extern "C" { -#[doc = "Decode decompression header"] -#[doc = "Returns:"] -#[doc = "Bytes consumed"] -#[doc = "# Arguments"] -#[doc = "`type` - Decompression type [Direction: In, Out]"] -#[doc = "`size` - Decompressed size [Direction: In, Out]"] -#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] -#[doc = "# Return values"] -#[doc = "-1 error"] -#[doc = ""] - + #[doc = "Decode decompression header"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Bytes consumed"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Decompression type [Direction: In, Out]"] + #[doc = "* `size` - Decompressed size [Direction: In, Out]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] + #[doc = "# Return values"] + #[doc = "* -1 error"] + #[doc = ""] pub fn decompressHeader( type_: *mut decompressType, size: *mut size_t, @@ -7506,22 +7318,28 @@ extern "C" { ) -> ssize_t; } extern "C" { -#[doc = "Decompress data"] -#[doc = "and insize is the size of that data. If callback is not null,"] -#[doc = "userdata is passed to callback to fetch more data, and insize is"] -#[doc = "unused."] -#[doc = "Returns:"] -#[doc = "Whether succeeded"] -#[doc = "# Arguments"] -#[doc = "`iov` - Output vector [Direction: In]"] -#[doc = "`iovcnt` - Number of buffers [Direction: In]"] -#[doc = "`callback` - Data callback (see note) [Direction: In]"] -#[doc = "`userdata` - User data passed to callback (see note) [Direction: In]"] -#[doc = "`insize` - Size of userdata (see note) [Direction: In]"] -#[doc = "# Notes"] -#[doc = "If callback is null, userdata is a pointer to memory to read from,"] -#[doc = ""] - + #[doc = "Decompress data"] + #[doc = ""] + #[doc = "and insize is the size of that data. If callback is not null,"] + #[doc = "userdata is passed to callback to fetch more data, and insize is"] + #[doc = "unused."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see note) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see note) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see note) [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If callback is null, userdata is a pointer to memory to read from,"] + #[doc = ""] pub fn decompressV( iov: *const decompressIOVec, iovcnt: size_t, @@ -7531,17 +7349,20 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress LZSS/LZ10"] -#[doc = "Returns:"] -#[doc = "Whether succeeded"] -#[doc = "# Arguments"] -#[doc = "`iov` - Output vector [Direction: In]"] -#[doc = "`iovcnt` - Number of buffers [Direction: In]"] -#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] -#[doc = ""] - + #[doc = "Decompress LZSS/LZ10"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_LZSS( iov: *const decompressIOVec, iovcnt: size_t, @@ -7551,17 +7372,20 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress LZ11"] -#[doc = "Returns:"] -#[doc = "Whether succeeded"] -#[doc = "# Arguments"] -#[doc = "`iov` - Output vector [Direction: In]"] -#[doc = "`iovcnt` - Number of buffers [Direction: In]"] -#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] -#[doc = ""] - + #[doc = "Decompress LZ11"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_LZ11( iov: *const decompressIOVec, iovcnt: size_t, @@ -7571,18 +7395,21 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress Huffman"] -#[doc = "Returns:"] -#[doc = "Whether succeeded"] -#[doc = "# Arguments"] -#[doc = "`bits` - Data size in bits (usually 4 or 8) [Direction: In]"] -#[doc = "`iov` - Output vector [Direction: In]"] -#[doc = "`iovcnt` - Number of buffers [Direction: In]"] -#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] -#[doc = ""] - + #[doc = "Decompress Huffman"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bits` - Data size in bits (usually 4 or 8) [Direction: In]"] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_Huff( bits: size_t, iov: *const decompressIOVec, @@ -7593,17 +7420,20 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Decompress run-length encoding"] -#[doc = "Returns:"] -#[doc = "Whether succeeded"] -#[doc = "# Arguments"] -#[doc = "`iov` - Output vector [Direction: In]"] -#[doc = "`iovcnt` - Number of buffers [Direction: In]"] -#[doc = "`callback` - Data callback (see decompressV()) [Direction: In]"] -#[doc = "`userdata` - User data passed to callback (see decompressV()) [Direction: In]"] -#[doc = "`insize` - Size of userdata (see decompressV()) [Direction: In]"] -#[doc = ""] - + #[doc = "Decompress run-length encoding"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether succeeded"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `iov` - Output vector [Direction: In]"] + #[doc = "* `iovcnt` - Number of buffers [Direction: In]"] + #[doc = "* `callback` - Data callback (see decompressV()) [Direction: In]"] + #[doc = "* `userdata` - User data passed to callback (see decompressV()) [Direction: In]"] + #[doc = "* `insize` - Size of userdata (see decompressV()) [Direction: In]"] + #[doc = ""] pub fn decompressV_RLE( iov: *const decompressIOVec, iovcnt: size_t, @@ -7613,241 +7443,313 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] -#[doc = "Returns:"] -#[doc = "number of input code units consumed"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output codepoint [Direction: In, Out]"] -#[doc = "`in` - Input sequence [Direction: In]"] -#[doc = ""] - + #[doc = "Convert a UTF-8 sequence into a UTF-32 codepoint"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of input code units consumed"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output codepoint [Direction: In, Out]"] + #[doc = "* `in` - Input sequence [Direction: In]"] + #[doc = ""] pub fn decode_utf8(out: *mut u32, in_: *const u8) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] -#[doc = "Returns:"] -#[doc = "number of input code units consumed"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output codepoint [Direction: In, Out]"] -#[doc = "`in` - Input sequence [Direction: In]"] -#[doc = ""] - + #[doc = "Convert a UTF-16 sequence into a UTF-32 codepoint"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of input code units consumed"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output codepoint [Direction: In, Out]"] + #[doc = "* `in` - Input sequence [Direction: In]"] + #[doc = ""] pub fn decode_utf16(out: *mut u32, in_: *const u16) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input codepoint [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-32 codepoint into a UTF-8 sequence"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input codepoint [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out must be able to store 4 code units"] + #[doc = ""] pub fn encode_utf8(out: *mut u8, in_: u32) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input codepoint [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-32 codepoint into a UTF-16 sequence"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input codepoint [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out must be able to store 2 code units"] + #[doc = ""] pub fn encode_utf16(out: *mut u16, in_: u32) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "`len` - Output length [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-8 sequence into a UTF-16 sequence"] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "`len` - Output length [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-8 sequence into a UTF-32 sequence"] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "`len` - Output length [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-16 sequence into a UTF-8 sequence"] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "`len` - Output length [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-16 sequence into a UTF-32 sequence"] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] -#[doc = "Fills the output buffer up to \\a len code units."] -#[doc = "Returns the number of code units that the input would produce;"] -#[doc = "if it returns greater than \\a len, the output has been"] -#[doc = "truncated."] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "`len` - Output length [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-32 sequence into a UTF-8 sequence"] + #[doc = "Fills the output buffer up to \\a len code units."] + #[doc = "Returns the number of code units that the input would produce;"] + #[doc = "if it returns greater than \\a len, the output has been"] + #[doc = "truncated."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] -#[doc = "Returns:"] -#[doc = "number of output code units produced"] -#[doc = "-1 for error"] -#[doc = "# Arguments"] -#[doc = "`out` - Output sequence [Direction: In, Out]"] -#[doc = "`in` - Input sequence (null-terminated) [Direction: In]"] -#[doc = "`len` - Output length [Direction: In]"] -#[doc = "# Notes"] -#[doc = ""] - + #[doc = "Convert a UTF-32 sequence into a UTF-16 sequence"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* number of output code units produced"] + #[doc = "* -1 for error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output sequence [Direction: In, Out]"] + #[doc = "* `in` - Input sequence (null-terminated) [Direction: In]"] + #[doc = "* `len` - Output length [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* \\a out is not null-terminated"] + #[doc = ""] pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: size_t) -> ssize_t; } extern "C" { -#[doc = "Allocates a 0x80-byte aligned buffer."] -#[doc = "Returns:"] -#[doc = "The allocated buffer."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = ""] - + #[doc = "Allocates a 0x80-byte aligned buffer."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn linearAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a buffer aligned to the given size."] -#[doc = "Returns:"] -#[doc = "The allocated buffer."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = "`alignment` - Alignment to use."] -#[doc = ""] - + #[doc = "Allocates a buffer aligned to the given size."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `alignment` - Alignment to use."] + #[doc = ""] pub fn linearMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Reallocates a buffer."] -#[doc = "Note: Not implemented yet."] -#[doc = "Returns:"] -#[doc = "The reallocated buffer."] -#[doc = "# Arguments"] -#[doc = "`mem` - Buffer to reallocate."] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = ""] - + #[doc = "Reallocates a buffer."] + #[doc = ""] + #[doc = "Note: Not implemented yet."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The reallocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to reallocate."] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn linearRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Retrieves the allocated size of a buffer."] -#[doc = "Returns:"] -#[doc = "The size of the buffer."] -#[doc = ""] - + #[doc = "Retrieves the allocated size of a buffer."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The size of the buffer."] + #[doc = ""] pub fn linearGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { -#[doc = "Frees a buffer."] -#[doc = "# Arguments"] -#[doc = "`mem` - Buffer to free."] -#[doc = ""] - + #[doc = "Frees a buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to free."] + #[doc = ""] pub fn linearFree(mem: *mut ::libc::c_void); } extern "C" { -#[doc = "Gets the current linear free space."] -#[doc = "Returns:"] -#[doc = "The current linear free space."] -#[doc = ""] - + #[doc = "Gets the current linear free space."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current linear free space."] + #[doc = ""] pub fn linearSpaceFree() -> u32_; } extern "C" { -#[doc = "Initializes the mappable allocator."] -#[doc = "# Arguments"] -#[doc = "`addrMin` - Minimum address."] -#[doc = "`addrMax` - Maxium address."] -#[doc = ""] - + #[doc = "Initializes the mappable allocator."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addrMin` - Minimum address."] + #[doc = "* `addrMax` - Maxium address."] + #[doc = ""] pub fn mappableInit(addrMin: u32_, addrMax: u32_); } extern "C" { -#[doc = "Finds a mappable memory area."] -#[doc = "Returns:"] -#[doc = "The mappable area."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the area to find."] -#[doc = ""] - + #[doc = "Finds a mappable memory area."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The mappable area."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the area to find."] + #[doc = ""] pub fn mappableAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Frees a mappable area (stubbed)."] -#[doc = "# Arguments"] -#[doc = "`mem` - Mappable area to free."] -#[doc = ""] - + #[doc = "Frees a mappable area (stubbed)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Mappable area to free."] + #[doc = ""] pub fn mappableFree(mem: *mut ::libc::c_void); } pub const VRAM_ALLOC_A: vramAllocPos = 1; @@ -7855,47 +7757,59 @@ pub const VRAM_ALLOC_B: vramAllocPos = 2; pub const VRAM_ALLOC_ANY: vramAllocPos = 3; pub type vramAllocPos = ::libc::c_uint; extern "C" { -#[doc = "Allocates a 0x80-byte aligned buffer."] -#[doc = "Returns:"] -#[doc = "The allocated buffer."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = ""] - + #[doc = "Allocates a 0x80-byte aligned buffer."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn vramAlloc(size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] -#[doc = "Returns:"] -#[doc = "The allocated buffer."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = "`pos` - VRAM bank to use (see [`vramAllocPos)`]"] -#[doc = ""] - + #[doc = "Allocates a 0x80-byte aligned buffer in the given VRAM bank."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `pos` - VRAM bank to use (see [`vramAllocPos)`]"] + #[doc = ""] pub fn vramAllocAt(size: size_t, pos: vramAllocPos) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a buffer aligned to the given size."] -#[doc = "Returns:"] -#[doc = "The allocated buffer."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = "`alignment` - Alignment to use."] -#[doc = ""] - + #[doc = "Allocates a buffer aligned to the given size."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `alignment` - Alignment to use."] + #[doc = ""] pub fn vramMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] -#[doc = "Returns:"] -#[doc = "The allocated buffer."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = "`alignment` - Alignment to use."] -#[doc = "`pos` - VRAM bank to use (see [`vramAllocPos)`]"] -#[doc = ""] - + #[doc = "Allocates a buffer aligned to the given size in the given VRAM bank."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The allocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = "* `alignment` - Alignment to use."] + #[doc = "* `pos` - VRAM bank to use (see [`vramAllocPos)`]"] + #[doc = ""] pub fn vramMemAlignAt( size: size_t, alignment: size_t, @@ -7903,89 +7817,86 @@ extern "C" { ) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Reallocates a buffer."] -#[doc = "Note: Not implemented yet."] -#[doc = "Returns:"] -#[doc = "The reallocated buffer."] -#[doc = "# Arguments"] -#[doc = "`mem` - Buffer to reallocate."] -#[doc = "`size` - Size of the buffer to allocate."] -#[doc = ""] - + #[doc = "Reallocates a buffer."] + #[doc = ""] + #[doc = "Note: Not implemented yet."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The reallocated buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to reallocate."] + #[doc = "* `size` - Size of the buffer to allocate."] + #[doc = ""] pub fn vramRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void; } extern "C" { -#[doc = "Retrieves the allocated size of a buffer."] -#[doc = "Returns:"] -#[doc = "The size of the buffer."] -#[doc = ""] - + #[doc = "Retrieves the allocated size of a buffer."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The size of the buffer."] + #[doc = ""] pub fn vramGetSize(mem: *mut ::libc::c_void) -> size_t; } extern "C" { -#[doc = "Frees a buffer."] -#[doc = "# Arguments"] -#[doc = "`mem` - Buffer to free."] -#[doc = ""] - + #[doc = "Frees a buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mem` - Buffer to free."] + #[doc = ""] pub fn vramFree(mem: *mut ::libc::c_void); } extern "C" { -#[doc = "Gets the current VRAM free space."] -#[doc = "Returns:"] -#[doc = "The current VRAM free space."] -#[doc = ""] - + #[doc = "Gets the current VRAM free space."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current VRAM free space."] + #[doc = ""] pub fn vramSpaceFree() -> u32_; } #[doc = "Open authentication."] #[doc = ""] - pub const AC_OPEN: acSecurityMode = 0; #[doc = "WEP 40-bit authentication."] #[doc = ""] - pub const AC_WEP_40BIT: acSecurityMode = 1; #[doc = "WEP 104-bit authentication."] #[doc = ""] - pub const AC_WEP_104BIT: acSecurityMode = 2; #[doc = "WEP 128-bit authentication."] #[doc = ""] - pub const AC_WEP_128BIT: acSecurityMode = 3; #[doc = "WPA TKIP authentication."] #[doc = ""] - pub const AC_WPA_TKIP: acSecurityMode = 4; #[doc = "WPA2 TKIP authentication."] #[doc = ""] - pub const AC_WPA2_TKIP: acSecurityMode = 5; #[doc = "WPA AES authentication."] #[doc = ""] - pub const AC_WPA_AES: acSecurityMode = 6; #[doc = "WPA2 AES authentication."] #[doc = ""] - pub const AC_WPA2_AES: acSecurityMode = 7; #[doc = "Wifi security modes."] #[doc = ""] - pub type acSecurityMode = ::libc::c_uint; #[doc = "Struct to contain the data for connecting to a Wifi network from a stored slot."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct acuConfig { @@ -8002,604 +7913,530 @@ impl Default for acuConfig { } extern "C" { #[must_use] -#[doc = "Initializes AC."] -#[doc = ""] - + #[doc = "Initializes AC."] + #[doc = ""] pub fn acInit() -> Result; } extern "C" { -#[doc = "Exits AC."] -#[doc = ""] - + #[doc = "Exits AC."] + #[doc = ""] pub fn acExit(); } extern "C" { #[must_use] -#[doc = "Waits for the system to connect to the internet."] -#[doc = ""] - + #[doc = "Waits for the system to connect to the internet."] + #[doc = ""] pub fn acWaitInternetConnection() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi status."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] -#[doc = ""] - + #[doc = "Gets the connected Wifi status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)"] + #[doc = ""] pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi status."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] -#[doc = ""] - + #[doc = "Gets the connected Wifi status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)"] + #[doc = ""] pub fn ACU_GetStatus(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi security mode."] -#[doc = "# Arguments"] -#[doc = "`mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] -#[doc = ""] - + #[doc = "Gets the connected Wifi security mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)"] + #[doc = ""] pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi SSID."] -#[doc = "# Arguments"] -#[doc = "`SSID` - Pointer to output the connected Wifi SSID to."] -#[doc = ""] - + #[doc = "Gets the connected Wifi SSID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `SSID` - Pointer to output the connected Wifi SSID to."] + #[doc = ""] pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected Wifi SSID length."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the connected Wifi SSID length to."] -#[doc = ""] - + #[doc = "Gets the connected Wifi SSID length."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the connected Wifi SSID length to."] + #[doc = ""] pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Determines whether proxy is enabled for the connected network."] -#[doc = "# Arguments"] -#[doc = "`enable` - Pointer to output the proxy status to."] -#[doc = ""] - + #[doc = "Determines whether proxy is enabled for the connected network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pointer to output the proxy status to."] + #[doc = ""] pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected network's proxy port."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the proxy port to."] -#[doc = ""] - + #[doc = "Gets the connected network's proxy port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the proxy port to."] + #[doc = ""] pub fn ACU_GetProxyPort(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected network's proxy username."] -#[doc = "# Arguments"] -#[doc = "`username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] -#[doc = ""] - + #[doc = "Gets the connected network's proxy username."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `username` - Pointer to output the proxy username to. (The size must be at least 0x20-bytes)"] + #[doc = ""] pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the connected network's proxy password."] -#[doc = "# Arguments"] -#[doc = "`password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] -#[doc = ""] - + #[doc = "Gets the connected network's proxy password."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `password` - Pointer to output the proxy password to. (The size must be at least 0x20-bytes)"] + #[doc = ""] pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the last error to occur during a connection."] -#[doc = "# Arguments"] -#[doc = "`errorCode` - Pointer to output the error code to."] -#[doc = ""] - + #[doc = "Gets the last error to occur during a connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `errorCode` - Pointer to output the error code to."] + #[doc = ""] pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the last detailed error to occur during a connection."] -#[doc = "# Arguments"] -#[doc = "`errorCode` - Pointer to output the error code to."] -#[doc = ""] - + #[doc = "Gets the last detailed error to occur during a connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `errorCode` - Pointer to output the error code to."] + #[doc = ""] pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares a buffer to hold the configuration data to start a connection."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to an acuConfig struct to contain the data."] -#[doc = ""] - + #[doc = "Prepares a buffer to hold the configuration data to start a connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct to contain the data."] + #[doc = ""] pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Sets something that makes the connection reliable."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] -#[doc = "`area` - Always 2 ?"] -#[doc = ""] - + #[doc = "Sets something that makes the connection reliable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = "* `area` - Always 2 ?"] + #[doc = ""] pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the slot to use when connecting."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] -#[doc = "`type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] -#[doc = ""] - + #[doc = "Sets the slot to use when connecting."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = "* `type` - Allowed slots flag. BIT(0) for slot 1, BIT(1) for slot 2, BIT(2) for slot 3."] + #[doc = ""] pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets something that makes the connection reliable."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] -#[doc = ""] - + #[doc = "Sets something that makes the connection reliable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = ""] pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Starts the connection procedure."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] -#[doc = "`connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] -#[doc = ""] - + #[doc = "Starts the connection procedure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to an acuConfig struct used with ACU_CreateDefaultConfig previously."] + #[doc = "* `connectionHandle` - Handle created with svcCreateEvent to wait on until the connection succeeds or fails."] + #[doc = ""] pub fn ACU_ConnectAsync(config: *const acuConfig, connectionHandle: Handle) -> Result; } #[doc = "Open for reading."] #[doc = ""] - pub const FS_OPEN_READ: _bindgen_ty_10 = 1; #[doc = "Open for writing."] #[doc = ""] - pub const FS_OPEN_WRITE: _bindgen_ty_10 = 2; #[doc = "Create file."] #[doc = ""] - pub const FS_OPEN_CREATE: _bindgen_ty_10 = 4; #[doc = "Open flags."] #[doc = ""] - pub type _bindgen_ty_10 = ::libc::c_uint; #[doc = "Flush."] #[doc = ""] - pub const FS_WRITE_FLUSH: _bindgen_ty_11 = 1; #[doc = "Update file timestamp."] #[doc = ""] - pub const FS_WRITE_UPDATE_TIME: _bindgen_ty_11 = 256; #[doc = "Write flags."] #[doc = ""] - pub type _bindgen_ty_11 = ::libc::c_uint; #[doc = "Directory."] #[doc = ""] - pub const FS_ATTRIBUTE_DIRECTORY: _bindgen_ty_12 = 1; #[doc = "Hidden."] #[doc = ""] - pub const FS_ATTRIBUTE_HIDDEN: _bindgen_ty_12 = 256; #[doc = "Archive."] #[doc = ""] - pub const FS_ATTRIBUTE_ARCHIVE: _bindgen_ty_12 = 65536; #[doc = "Read-only."] #[doc = ""] - pub const FS_ATTRIBUTE_READ_ONLY: _bindgen_ty_12 = 16777216; #[doc = "Attribute flags."] #[doc = ""] - pub type _bindgen_ty_12 = ::libc::c_uint; #[doc = "NAND."] #[doc = ""] - pub const MEDIATYPE_NAND: FS_MediaType = 0; #[doc = "SD card."] #[doc = ""] - pub const MEDIATYPE_SD: FS_MediaType = 1; #[doc = "Game card."] #[doc = ""] - pub const MEDIATYPE_GAME_CARD: FS_MediaType = 2; #[doc = "Media types."] #[doc = ""] - pub type FS_MediaType = ::libc::c_uint; #[doc = "CTR NAND."] #[doc = ""] - pub const SYSTEM_MEDIATYPE_CTR_NAND: FS_SystemMediaType = 0; #[doc = "TWL NAND."] #[doc = ""] - pub const SYSTEM_MEDIATYPE_TWL_NAND: FS_SystemMediaType = 1; #[doc = "SD card."] #[doc = ""] - pub const SYSTEM_MEDIATYPE_SD: FS_SystemMediaType = 2; #[doc = "TWL Photo."] #[doc = ""] - pub const SYSTEM_MEDIATYPE_TWL_PHOTO: FS_SystemMediaType = 3; #[doc = "System media types."] #[doc = ""] - pub type FS_SystemMediaType = ::libc::c_uint; #[doc = "RomFS archive."] #[doc = ""] - pub const ARCHIVE_ROMFS: FS_ArchiveID = 3; #[doc = "Save data archive."] #[doc = ""] - pub const ARCHIVE_SAVEDATA: FS_ArchiveID = 4; #[doc = "Ext data archive."] #[doc = ""] - pub const ARCHIVE_EXTDATA: FS_ArchiveID = 6; #[doc = "Shared ext data archive."] #[doc = ""] - pub const ARCHIVE_SHARED_EXTDATA: FS_ArchiveID = 7; #[doc = "System save data archive."] #[doc = ""] - pub const ARCHIVE_SYSTEM_SAVEDATA: FS_ArchiveID = 8; #[doc = "SDMC archive."] #[doc = ""] - pub const ARCHIVE_SDMC: FS_ArchiveID = 9; #[doc = "Write-only SDMC archive."] #[doc = ""] - pub const ARCHIVE_SDMC_WRITE_ONLY: FS_ArchiveID = 10; #[doc = "BOSS ext data archive."] #[doc = ""] - pub const ARCHIVE_BOSS_EXTDATA: FS_ArchiveID = 305419896; #[doc = "Card SPI FS archive."] #[doc = ""] - pub const ARCHIVE_CARD_SPIFS: FS_ArchiveID = 305419897; #[doc = "Ext data and BOSS ext data archive."] #[doc = ""] - pub const ARCHIVE_EXTDATA_AND_BOSS_EXTDATA: FS_ArchiveID = 305419899; #[doc = "System save data archive."] #[doc = ""] - pub const ARCHIVE_SYSTEM_SAVEDATA2: FS_ArchiveID = 305419900; #[doc = "Read-write NAND archive."] #[doc = ""] - pub const ARCHIVE_NAND_RW: FS_ArchiveID = 305419901; #[doc = "Read-only NAND archive."] #[doc = ""] - pub const ARCHIVE_NAND_RO: FS_ArchiveID = 305419902; #[doc = "Read-only write access NAND archive."] #[doc = ""] - pub const ARCHIVE_NAND_RO_WRITE_ACCESS: FS_ArchiveID = 305419903; #[doc = "User save data and ExeFS/RomFS archive."] #[doc = ""] - pub const ARCHIVE_SAVEDATA_AND_CONTENT: FS_ArchiveID = 591751050; #[doc = "User save data and ExeFS/RomFS archive (only ExeFS for fs:LDR)."] #[doc = ""] - pub const ARCHIVE_SAVEDATA_AND_CONTENT2: FS_ArchiveID = 591751054; #[doc = "NAND CTR FS archive."] #[doc = ""] - pub const ARCHIVE_NAND_CTR_FS: FS_ArchiveID = 1450741931; #[doc = "TWL PHOTO archive."] #[doc = ""] - pub const ARCHIVE_TWL_PHOTO: FS_ArchiveID = 1450741932; #[doc = "TWL SOUND archive."] #[doc = ""] - pub const ARCHIVE_TWL_SOUND: FS_ArchiveID = 1450741933; #[doc = "NAND TWL FS archive."] #[doc = ""] - pub const ARCHIVE_NAND_TWL_FS: FS_ArchiveID = 1450741934; #[doc = "NAND W FS archive."] #[doc = ""] - pub const ARCHIVE_NAND_W_FS: FS_ArchiveID = 1450741935; #[doc = "Game card save data archive."] #[doc = ""] - pub const ARCHIVE_GAMECARD_SAVEDATA: FS_ArchiveID = 1450741937; #[doc = "User save data archive."] #[doc = ""] - pub const ARCHIVE_USER_SAVEDATA: FS_ArchiveID = 1450741938; #[doc = "Demo save data archive."] #[doc = ""] - pub const ARCHIVE_DEMO_SAVEDATA: FS_ArchiveID = 1450741940; #[doc = "Archive IDs."] #[doc = ""] - pub type FS_ArchiveID = ::libc::c_uint; #[doc = "Invalid path."] #[doc = ""] - pub const PATH_INVALID: FS_PathType = 0; #[doc = "Empty path."] #[doc = ""] - pub const PATH_EMPTY: FS_PathType = 1; #[doc = "Binary path. Meaning is per-archive."] #[doc = ""] - pub const PATH_BINARY: FS_PathType = 2; #[doc = "ASCII text path."] #[doc = ""] - pub const PATH_ASCII: FS_PathType = 3; #[doc = "UTF-16 text path."] #[doc = ""] - pub const PATH_UTF16: FS_PathType = 4; #[doc = "Path types."] #[doc = ""] - pub type FS_PathType = ::libc::c_uint; #[doc = "SD application."] #[doc = ""] - pub const SECUREVALUE_SLOT_SD: FS_SecureValueSlot = 4096; #[doc = "Secure value slot."] #[doc = ""] - pub type FS_SecureValueSlot = ::libc::c_uint; #[doc = "512KHz."] #[doc = ""] - pub const BAUDRATE_512KHZ: FS_CardSpiBaudRate = 0; #[doc = "1MHz."] #[doc = ""] - pub const BAUDRATE_1MHZ: FS_CardSpiBaudRate = 1; #[doc = "2MHz."] #[doc = ""] - pub const BAUDRATE_2MHZ: FS_CardSpiBaudRate = 2; #[doc = "4MHz."] #[doc = ""] - pub const BAUDRATE_4MHZ: FS_CardSpiBaudRate = 3; #[doc = "8MHz."] #[doc = ""] - pub const BAUDRATE_8MHZ: FS_CardSpiBaudRate = 4; #[doc = "16MHz."] #[doc = ""] - pub const BAUDRATE_16MHZ: FS_CardSpiBaudRate = 5; #[doc = "Card SPI baud rate."] #[doc = ""] - pub type FS_CardSpiBaudRate = ::libc::c_uint; #[doc = "1-bit."] #[doc = ""] - pub const BUSMODE_1BIT: FS_CardSpiBusMode = 0; #[doc = "4-bit."] #[doc = ""] - pub const BUSMODE_4BIT: FS_CardSpiBusMode = 1; #[doc = "Card SPI bus mode."] #[doc = ""] - pub type FS_CardSpiBusMode = ::libc::c_uint; #[doc = "Update."] #[doc = ""] - pub const SPECIALCONTENT_UPDATE: FS_SpecialContentType = 1; #[doc = "Manual."] #[doc = ""] - pub const SPECIALCONTENT_MANUAL: FS_SpecialContentType = 2; #[doc = "DLP child."] #[doc = ""] - pub const SPECIALCONTENT_DLP_CHILD: FS_SpecialContentType = 3; #[doc = "Card SPI bus mode."] #[doc = ""] - pub type FS_SpecialContentType = ::libc::c_uint; #[doc = "CTR card."] #[doc = ""] - pub const CARD_CTR: FS_CardType = 0; #[doc = "TWL card."] #[doc = ""] - pub const CARD_TWL: FS_CardType = 1; pub type FS_CardType = ::libc::c_uint; pub const FS_ACTION_UNKNOWN: FS_Action = 0; #[doc = "FS control actions."] #[doc = ""] - pub type FS_Action = ::libc::c_uint; #[doc = "Commits save data changes. No inputs/outputs."] #[doc = ""] - pub const ARCHIVE_ACTION_COMMIT_SAVE_DATA: FS_ArchiveAction = 0; #[doc = "Retrieves a file's last-modified timestamp. In: \"u16*, UTF-16 Path\", Out: \"u64, Time Stamp\"."] #[doc = ""] - pub const ARCHIVE_ACTION_GET_TIMESTAMP: FS_ArchiveAction = 1; pub const ARCHIVE_ACTION_UNKNOWN: FS_ArchiveAction = 30877; #[doc = "Archive control actions."] #[doc = ""] - pub type FS_ArchiveAction = ::libc::c_uint; #[doc = "Deletes a save's secure value. In: \"u64, ((SecureValueSlot <32) | (TitleUniqueId <8) | TitleVariation)\", Out: \"u8, Value Existed\""] #[doc = ""] - pub const SECURESAVE_ACTION_DELETE: FS_SecureSaveAction = 0; #[doc = "Formats a save. No inputs/outputs."] #[doc = ""] - pub const SECURESAVE_ACTION_FORMAT: FS_SecureSaveAction = 1; #[doc = "Secure save control actions."] #[doc = ""] - pub type FS_SecureSaveAction = ::libc::c_uint; pub const FILE_ACTION_UNKNOWN: FS_FileAction = 0; #[doc = "File control actions."] #[doc = ""] - pub type FS_FileAction = ::libc::c_uint; pub const DIRECTORY_ACTION_UNKNOWN: FS_DirectoryAction = 0; #[doc = "Directory control actions."] #[doc = ""] - pub type FS_DirectoryAction = ::libc::c_uint; #[doc = "Directory entry."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_DirectoryEntry { -#[doc = "UTF-16 directory name."] -#[doc = ""] - + #[doc = "UTF-16 directory name."] + #[doc = ""] pub name: [u16_; 262usize], -#[doc = "File name."] -#[doc = ""] - + #[doc = "File name."] + #[doc = ""] pub shortName: [::libc::c_char; 10usize], -#[doc = "File extension."] -#[doc = ""] - + #[doc = "File extension."] + #[doc = ""] pub shortExt: [::libc::c_char; 4usize], -#[doc = "Valid flag. (Always 1)"] -#[doc = ""] - + #[doc = "Valid flag. (Always 1)"] + #[doc = ""] pub valid: u8_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved: u8_, -#[doc = "Attributes."] -#[doc = ""] - + #[doc = "Attributes."] + #[doc = ""] pub attributes: u32_, -#[doc = "File size."] -#[doc = ""] - + #[doc = "File size."] + #[doc = ""] pub fileSize: u64_, } impl Default for FS_DirectoryEntry { @@ -8613,42 +8450,34 @@ impl Default for FS_DirectoryEntry { } #[doc = "Archive resource information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ArchiveResource { -#[doc = "Size of each sector, in bytes."] -#[doc = ""] - + #[doc = "Size of each sector, in bytes."] + #[doc = ""] pub sectorSize: u32_, -#[doc = "Size of each cluster, in bytes."] -#[doc = ""] - + #[doc = "Size of each cluster, in bytes."] + #[doc = ""] pub clusterSize: u32_, -#[doc = "Total number of clusters."] -#[doc = ""] - + #[doc = "Total number of clusters."] + #[doc = ""] pub totalClusters: u32_, -#[doc = "Number of free clusters."] -#[doc = ""] - + #[doc = "Number of free clusters."] + #[doc = ""] pub freeClusters: u32_, } #[doc = "Program information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_ProgramInfo { -#[doc = "Program ID."] -#[doc = ""] - + #[doc = "Program ID."] + #[doc = ""] pub programId: u64_, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub padding: [u8_; 7usize], } impl Default for FS_ProgramInfo { @@ -8684,36 +8513,29 @@ impl FS_ProgramInfo { } #[doc = "Product information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_ProductInfo { -#[doc = "Product code."] -#[doc = ""] - + #[doc = "Product code."] + #[doc = ""] pub productCode: [::libc::c_char; 16usize], -#[doc = "Company code."] -#[doc = ""] - + #[doc = "Company code."] + #[doc = ""] pub companyCode: [::libc::c_char; 2usize], -#[doc = "Remaster version."] -#[doc = ""] - + #[doc = "Remaster version."] + #[doc = ""] pub remasterVersion: u16_, } #[doc = "Integrity verification seed."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_IntegrityVerificationSeed { -#[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] -#[doc = ""] - + #[doc = "AES-CBC MAC over a SHA256 hash, which hashes the first 0x110-bytes of the cleartext SEED."] + #[doc = ""] pub aesCbcMac: [u8_; 16usize], -#[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] -#[doc = ""] - + #[doc = "The \"nand/private/movable.sed\", encrypted with AES-CTR using the above MAC for the counter."] + #[doc = ""] pub movableSed: [u8_; 288usize], } impl Default for FS_IntegrityVerificationSeed { @@ -8727,27 +8549,22 @@ impl Default for FS_IntegrityVerificationSeed { } #[doc = "Ext save data information."] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct FS_ExtSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknown: u8_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved1: u16_, -#[doc = "Save ID."] -#[doc = ""] - + #[doc = "Save ID."] + #[doc = ""] pub saveId: u64_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved2: u32_, } impl Default for FS_ExtSaveDataInfo { @@ -8783,23 +8600,19 @@ impl FS_ExtSaveDataInfo { } #[doc = "System save data information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_SystemSaveDataInfo { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknown: u8_, -#[doc = "Reserved."] -#[doc = ""] - + #[doc = "Reserved."] + #[doc = ""] pub reserved: u16_, -#[doc = "Save ID."] -#[doc = ""] - + #[doc = "Save ID."] + #[doc = ""] pub saveId: u32_, } impl Default for FS_SystemSaveDataInfo { @@ -8835,36 +8648,29 @@ impl FS_SystemSaveDataInfo { } #[doc = "Device move context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_DeviceMoveContext { -#[doc = "IVs."] -#[doc = ""] - + #[doc = "IVs."] + #[doc = ""] pub ivs: [u8_; 16usize], -#[doc = "Encrypt parameter."] -#[doc = ""] - + #[doc = "Encrypt parameter."] + #[doc = ""] pub encryptParameter: [u8_; 16usize], } #[doc = "Filesystem path data, detailing the specific target of an operation."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FS_Path { -#[doc = "FS path type."] -#[doc = ""] - + #[doc = "FS path type."] + #[doc = ""] pub type_: FS_PathType, -#[doc = "FS path size."] -#[doc = ""] - + #[doc = "FS path size."] + #[doc = ""] pub size: u32_, -#[doc = "Pointer to FS path data."] -#[doc = ""] - + #[doc = "Pointer to FS path data."] + #[doc = ""] pub data: *const ::libc::c_void, } impl Default for FS_Path { @@ -8878,102 +8684,103 @@ impl Default for FS_Path { } #[doc = "SDMC/NAND speed information"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct FS_SdMmcSpeedInfo { -#[doc = "Whether or not High Speed Mode is enabled."] -#[doc = ""] - + #[doc = "Whether or not High Speed Mode is enabled."] + #[doc = ""] pub highSpeedModeEnabled: bool, -#[doc = "Whether or not a clock divider of 2 is being used."] -#[doc = ""] - + #[doc = "Whether or not a clock divider of 2 is being used."] + #[doc = ""] pub usesHighestClockRate: bool, -#[doc = "The value of the SD_CLK_CTRL register."] -#[doc = ""] - + #[doc = "The value of the SD_CLK_CTRL register."] + #[doc = ""] pub sdClkCtrl: u16_, } #[doc = "Filesystem archive handle, providing access to a filesystem's contents."] #[doc = ""] - pub type FS_Archive = u64_; extern "C" { #[must_use] -#[doc = "Initializes FS."] -#[doc = ""] - + #[doc = "Initializes FS."] + #[doc = ""] pub fn fsInit() -> Result; } extern "C" { -#[doc = "Exits FS."] -#[doc = ""] - + #[doc = "Exits FS."] + #[doc = ""] pub fn fsExit(); } extern "C" { -#[doc = "Sets the FSUSER session to use in the current thread."] -#[doc = "# Arguments"] -#[doc = "`session` - The handle of the FSUSER session to use."] -#[doc = ""] - + #[doc = "Sets the FSUSER session to use in the current thread."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - The handle of the FSUSER session to use."] + #[doc = ""] pub fn fsUseSession(session: Handle); } extern "C" { -#[doc = "Disables the FSUSER session override in the current thread."] -#[doc = ""] - + #[doc = "Disables the FSUSER session override in the current thread."] + #[doc = ""] pub fn fsEndUseSession(); } extern "C" { -#[doc = "Exempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] -#[doc = "Instead, the archive will use the default FS session handle, opened with [`srvGetSessionHandle`]"] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to exempt."] -#[doc = ""] - + #[doc = "Exempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] + #[doc = ""] + #[doc = "Instead, the archive will use the default FS session handle, opened with [`srvGetSessionHandle`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to exempt."] + #[doc = ""] pub fn fsExemptFromSession(archive: FS_Archive); } extern "C" { -#[doc = "Unexempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to remove from the exemption list."] -#[doc = ""] - + #[doc = "Unexempts an archive from using alternate FS session handles provided with [`fsUseSession`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to remove from the exemption list."] + #[doc = ""] pub fn fsUnexemptFromSession(archive: FS_Archive); } extern "C" { -#[doc = "Creates an FS_Path instance."] -#[doc = "Returns:"] -#[doc = "The created FS_Path instance."] -#[doc = "# Arguments"] -#[doc = "`type` - Type of path."] -#[doc = "`path` - Path to use."] -#[doc = ""] - + #[doc = "Creates an FS_Path instance."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The created FS_Path instance."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Type of path."] + #[doc = "* `path` - Path to use."] + #[doc = ""] pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void) -> FS_Path; } extern "C" { -#[doc = "Gets the current FS session handle."] -#[doc = "Returns:"] -#[doc = "The current FS session handle."] -#[doc = ""] - + #[doc = "Gets the current FS session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current FS session handle."] + #[doc = ""] pub fn fsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Performs a control operation on the filesystem."] -#[doc = "# Arguments"] -#[doc = "`action` - Action to perform."] -#[doc = "`input` - Buffer to read input from."] -#[doc = "`inputSize` - Size of the input."] -#[doc = "`output` - Buffer to write output to."] -#[doc = "`outputSize` - Size of the output."] -#[doc = ""] - + #[doc = "Performs a control operation on the filesystem."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSUSER_Control( action: FS_Action, input: *mut ::libc::c_void, @@ -8984,24 +8791,26 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes a FSUSER session."] -#[doc = "# Arguments"] -#[doc = "`session` - The handle of the FSUSER session to initialize."] -#[doc = ""] - + #[doc = "Initializes a FSUSER session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - The handle of the FSUSER session to initialize."] + #[doc = ""] pub fn FSUSER_Initialize(session: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Opens a file."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the file handle to."] -#[doc = "`archive` - Archive containing the file."] -#[doc = "`path` - Path of the file."] -#[doc = "`openFlags` - Flags to open the file with."] -#[doc = "`attributes` - Attributes of the file."] -#[doc = ""] - + #[doc = "Opens a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the file handle to."] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `openFlags` - Flags to open the file with."] + #[doc = "* `attributes` - Attributes of the file."] + #[doc = ""] pub fn FSUSER_OpenFile( out: *mut Handle, archive: FS_Archive, @@ -9012,16 +8821,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the file handle to."] -#[doc = "`archiveId` - ID of the archive containing the file."] -#[doc = "`archivePath` - Path of the archive containing the file."] -#[doc = "`filePath` - Path of the file."] -#[doc = "`openFlags` - Flags to open the file with."] -#[doc = "`attributes` - Attributes of the file."] -#[doc = ""] - + #[doc = "Opens a file directly, bypassing the requirement of an opened archive handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the file handle to."] + #[doc = "* `archiveId` - ID of the archive containing the file."] + #[doc = "* `archivePath` - Path of the archive containing the file."] + #[doc = "* `filePath` - Path of the file."] + #[doc = "* `openFlags` - Flags to open the file with."] + #[doc = "* `attributes` - Attributes of the file."] + #[doc = ""] pub fn FSUSER_OpenFileDirectly( out: *mut Handle, archiveId: FS_ArchiveID, @@ -9033,24 +8843,26 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a file."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive containing the file."] -#[doc = "`path` - Path of the file."] -#[doc = ""] - + #[doc = "Deletes a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] + #[doc = ""] pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Renames a file."] -#[doc = "# Arguments"] -#[doc = "`srcArchive` - Archive containing the source file."] -#[doc = "`srcPath` - Path of the source file."] -#[doc = "`dstArchive` - Archive containing the destination file."] -#[doc = "`dstPath` - Path of the destination file."] -#[doc = ""] - + #[doc = "Renames a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source file."] + #[doc = "* `srcPath` - Path of the source file."] + #[doc = "* `dstArchive` - Archive containing the destination file."] + #[doc = "* `dstPath` - Path of the destination file."] + #[doc = ""] pub fn FSUSER_RenameFile( srcArchive: FS_Archive, srcPath: FS_Path, @@ -9060,34 +8872,37 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a directory, failing if it is not empty."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive containing the directory."] -#[doc = "`path` - Path of the directory."] -#[doc = ""] - + #[doc = "Deletes a directory, failing if it is not empty."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSUSER_DeleteDirectory(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a directory, also deleting its contents."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive containing the directory."] -#[doc = "`path` - Path of the directory."] -#[doc = ""] - + #[doc = "Deletes a directory, also deleting its contents."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSUSER_DeleteDirectoryRecursively(archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a file."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to create the file in."] -#[doc = "`path` - Path of the file."] -#[doc = "`attributes` - Attributes of the file."] -#[doc = "`fileSize` - Size of the file."] -#[doc = ""] - + #[doc = "Creates a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the file in."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `attributes` - Attributes of the file."] + #[doc = "* `fileSize` - Size of the file."] + #[doc = ""] pub fn FSUSER_CreateFile( archive: FS_Archive, path: FS_Path, @@ -9097,25 +8912,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a directory"] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to create the directory in."] -#[doc = "`path` - Path of the directory."] -#[doc = "`attributes` - Attributes of the directory."] -#[doc = ""] - + #[doc = "Creates a directory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the directory in."] + #[doc = "* `path` - Path of the directory."] + #[doc = "* `attributes` - Attributes of the directory."] + #[doc = ""] pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Renames a directory."] -#[doc = "# Arguments"] -#[doc = "`srcArchive` - Archive containing the source directory."] -#[doc = "`srcPath` - Path of the source directory."] -#[doc = "`dstArchive` - Archive containing the destination directory."] -#[doc = "`dstPath` - Path of the destination directory."] -#[doc = ""] - + #[doc = "Renames a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source directory."] + #[doc = "* `srcPath` - Path of the source directory."] + #[doc = "* `dstArchive` - Archive containing the destination directory."] + #[doc = "* `dstPath` - Path of the destination directory."] + #[doc = ""] pub fn FSUSER_RenameDirectory( srcArchive: FS_Archive, srcPath: FS_Path, @@ -9125,38 +8942,41 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a directory."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the directory handle to."] -#[doc = "`archive` - Archive containing the directory."] -#[doc = "`path` - Path of the directory."] -#[doc = ""] - + #[doc = "Opens a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the directory handle to."] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Opens an archive."] -#[doc = "# Arguments"] -#[doc = "`archive` - Pointer to output the opened archive to."] -#[doc = "`id` - ID of the archive."] -#[doc = "`path` - Path of the archive."] -#[doc = ""] - + #[doc = "Opens an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Pointer to output the opened archive to."] + #[doc = "* `id` - ID of the archive."] + #[doc = "* `path` - Path of the archive."] + #[doc = ""] pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Performs a control operation on an archive."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to control."] -#[doc = "`action` - Action to perform."] -#[doc = "`input` - Buffer to read input from."] -#[doc = "`inputSize` - Size of the input."] -#[doc = "`output` - Buffer to write output to."] -#[doc = "`outputSize` - Size of the output."] -#[doc = ""] - + #[doc = "Performs a control operation on an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to control."] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSUSER_ControlArchive( archive: FS_Archive, action: FS_ArchiveAction, @@ -9168,213 +8988,232 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes an archive."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to close."] -#[doc = ""] - + #[doc = "Closes an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to close."] + #[doc = ""] pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the number of free bytes within an archive."] -#[doc = "# Arguments"] -#[doc = "`freeBytes` - Pointer to output the free bytes to."] -#[doc = "`archive` - Archive to check."] -#[doc = ""] - + #[doc = "Gets the number of free bytes within an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `freeBytes` - Pointer to output the free bytes to."] + #[doc = "* `archive` - Archive to check."] + #[doc = ""] pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the inserted card type."] -#[doc = "# Arguments"] -#[doc = "`type` - Pointer to output the card type to."] -#[doc = ""] - + #[doc = "Gets the inserted card type."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - Pointer to output the card type to."] + #[doc = ""] pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC archive resource information."] -#[doc = "# Arguments"] -#[doc = "`archiveResource` - Pointer to output the archive resource information to."] -#[doc = ""] - + #[doc = "Gets the SDMC archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSUSER_GetSdmcArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND archive resource information."] -#[doc = "# Arguments"] -#[doc = "`archiveResource` - Pointer to output the archive resource information to."] -#[doc = ""] - + #[doc = "Gets the NAND archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the last SDMC fatfs error."] -#[doc = "# Arguments"] -#[doc = "`error` - Pointer to output the error to."] -#[doc = ""] - + #[doc = "Gets the last SDMC fatfs error."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `error` - Pointer to output the error to."] + #[doc = ""] pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether an SD card is detected."] -#[doc = "# Arguments"] -#[doc = "`detected` - Pointer to output the detection status to."] -#[doc = ""] - + #[doc = "Gets whether an SD card is detected."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `detected` - Pointer to output the detection status to."] + #[doc = ""] pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the SD card is writable."] -#[doc = "# Arguments"] -#[doc = "`writable` - Pointer to output the writable status to."] -#[doc = ""] - + #[doc = "Gets whether the SD card is writable."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `writable` - Pointer to output the writable status to."] + #[doc = ""] pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC CID."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the CID to."] -#[doc = "`length` - Length of the CID buffer. (should be 0x10)"] -#[doc = ""] - + #[doc = "Gets the SDMC CID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the CID to."] + #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] + #[doc = ""] pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND CID."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the CID to."] -#[doc = "`length` - Length of the CID buffer. (should be 0x10)"] -#[doc = ""] - + #[doc = "Gets the NAND CID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the CID to."] + #[doc = "* `length` - Length of the CID buffer. (should be 0x10)"] + #[doc = ""] pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC speed info."] -#[doc = "# Arguments"] -#[doc = "`speedInfo` - Pointer to output the speed info to."] -#[doc = ""] - + #[doc = "Gets the SDMC speed info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `speedInfo` - Pointer to output the speed info to."] + #[doc = ""] pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND speed info."] -#[doc = "# Arguments"] -#[doc = "`speedInfo` - Pointer to output the speed info to."] -#[doc = ""] - + #[doc = "Gets the NAND speed info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `speedInfo` - Pointer to output the speed info to."] + #[doc = ""] pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC log."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the log to."] -#[doc = "`length` - Length of the log buffer."] -#[doc = ""] - + #[doc = "Gets the SDMC log."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the log to."] + #[doc = "* `length` - Length of the log buffer."] + #[doc = ""] pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND log."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the log to."] -#[doc = "`length` - Length of the log buffer."] -#[doc = ""] - + #[doc = "Gets the NAND log."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the log to."] + #[doc = "* `length` - Length of the log buffer."] + #[doc = ""] pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the SDMC log."] -#[doc = ""] - + #[doc = "Clears the SDMC log."] + #[doc = ""] pub fn FSUSER_ClearSdmcLog() -> Result; } extern "C" { #[must_use] -#[doc = "Clears the NAND log."] -#[doc = ""] - + #[doc = "Clears the NAND log."] + #[doc = ""] pub fn FSUSER_ClearNandLog() -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether a card is inserted."] -#[doc = "# Arguments"] -#[doc = "`inserted` - Pointer to output the insertion status to."] -#[doc = ""] - + #[doc = "Gets whether a card is inserted."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inserted` - Pointer to output the insertion status to."] + #[doc = ""] pub fn FSUSER_CardSlotIsInserted(inserted: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers on the card slot."] -#[doc = "# Arguments"] -#[doc = "`status` - Pointer to output the power status to."] -#[doc = ""] - + #[doc = "Powers on the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSUSER_CardSlotPowerOn(status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers off the card slot."] -#[doc = "# Arguments"] -#[doc = "`status` - Pointer to output the power status to."] -#[doc = ""] - + #[doc = "Powers off the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSUSER_CardSlotPowerOff(status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the card's power status."] -#[doc = "# Arguments"] -#[doc = "`status` - Pointer to output the power status to."] -#[doc = ""] - + #[doc = "Gets the card's power status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = ""] pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command with an address."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct command with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`size` - Size of the output buffer."] -#[doc = "`output` - Output buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectRead( commandId: u8_, size: u32_, @@ -9383,14 +9222,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read with an address."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the output buffer."] -#[doc = "`output` - Output buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct read with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectReadWithAddress( commandId: u8_, address: u32_, @@ -9400,13 +9240,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`size` - Size of the input buffer."] -#[doc = "`output` - Input buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct write."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectWrite( commandId: u8_, size: u32_, @@ -9415,14 +9256,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write with an address."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the input buffer."] -#[doc = "`input` - Input buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct write with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `input` - Input buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectWriteWithAddress( commandId: u8_, address: u32_, @@ -9432,14 +9274,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR 4xIO direct read."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the output buffer."] -#[doc = "`output` - Output buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR 4xIO direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectRead_4xIO( commandId: u8_, address: u32_, @@ -9449,13 +9292,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct CPU write without verify."] -#[doc = "# Arguments"] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the input buffer."] -#[doc = "`output` - Input buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct CPU write without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] + #[doc = ""] pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify( address: u32_, size: u32_, @@ -9464,68 +9308,73 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct sector erase without verify."] -#[doc = "# Arguments"] -#[doc = "`address` - Address to provide."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct sector erase without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a process's product info."] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output the product info to."] -#[doc = "`processId` - ID of the process."] -#[doc = ""] - + #[doc = "Gets a process's product info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the product info to."] + #[doc = "* `processId` - ID of the process."] + #[doc = ""] pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a process's program launch info."] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output the program launch info to."] -#[doc = "`processId` - ID of the process."] -#[doc = ""] - + #[doc = "Gets a process's program launch info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the program launch info to."] + #[doc = "* `processId` - ID of the process."] + #[doc = ""] pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI baud rate."] -#[doc = "# Arguments"] -#[doc = "`baudRate` - Baud rate to set."] -#[doc = ""] - + #[doc = "Sets the CARDSPI baud rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `baudRate` - Baud rate to set."] + #[doc = ""] pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI bus mode."] -#[doc = "# Arguments"] -#[doc = "`busMode` - Bus mode to set."] -#[doc = ""] - + #[doc = "Sets the CARDSPI bus mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `busMode` - Bus mode to set."] + #[doc = ""] pub fn FSUSER_SetCardSpiBusMode(busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] -#[doc = "Sends initialization info to ARM9."] -#[doc = ""] - + #[doc = "Sends initialization info to ARM9."] + #[doc = ""] pub fn FSUSER_SendInitializeInfoTo9() -> Result; } extern "C" { #[must_use] -#[doc = "Gets a special content's index."] -#[doc = "# Arguments"] -#[doc = "`index` - Pointer to output the index to."] -#[doc = "`mediaType` - Media type of the special content."] -#[doc = "`programId` - Program ID owning the special content."] -#[doc = "`type` - Type of special content."] -#[doc = ""] - + #[doc = "Gets a special content's index."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `index` - Pointer to output the index to."] + #[doc = "* `mediaType` - Media type of the special content."] + #[doc = "* `programId` - Program ID owning the special content."] + #[doc = "* `type` - Type of special content."] + #[doc = ""] pub fn FSUSER_GetSpecialContentIndex( index: *mut u16_, mediaType: FS_MediaType, @@ -9535,13 +9384,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy ROM header of a program."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Media type of the program."] -#[doc = "`programId` - ID of the program."] -#[doc = "`header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] -#[doc = ""] - + #[doc = "Gets the legacy ROM header of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] + #[doc = ""] pub fn FSUSER_GetLegacyRomHeader( mediaType: FS_MediaType, programId: u64_, @@ -9550,13 +9400,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy banner data of a program."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Media type of the program."] -#[doc = "`programId` - ID of the program."] -#[doc = "`header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] -#[doc = ""] - + #[doc = "Gets the legacy banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy banner data to. (size = 0x23C0)"] + #[doc = ""] pub fn FSUSER_GetLegacyBannerData( mediaType: FS_MediaType, programId: u64_, @@ -9565,14 +9416,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks a process's authority to access a save data archive."] -#[doc = "# Arguments"] -#[doc = "`access` - Pointer to output the access status to."] -#[doc = "`mediaType` - Media type of the save data."] -#[doc = "`saveId` - ID of the save data."] -#[doc = "`processId` - ID of the process to check."] -#[doc = ""] - + #[doc = "Checks a process's authority to access a save data archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `access` - Pointer to output the access status to."] + #[doc = "* `mediaType` - Media type of the save data."] + #[doc = "* `saveId` - ID of the save data."] + #[doc = "* `processId` - ID of the process to check."] + #[doc = ""] pub fn FSUSER_CheckAuthorityToAccessExtSaveData( access: *mut bool, mediaType: FS_MediaType, @@ -9582,15 +9434,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Queries the total quota size of a save data archive."] -#[doc = "# Arguments"] -#[doc = "`quotaSize` - Pointer to output the quota size to."] -#[doc = "`directories` - Number of directories."] -#[doc = "`files` - Number of files."] -#[doc = "`fileSizeCount` - Number of file sizes to provide."] -#[doc = "`fileSizes` - File sizes to provide."] -#[doc = ""] - + #[doc = "Queries the total quota size of a save data archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `quotaSize` - Pointer to output the quota size to."] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `fileSizeCount` - Number of file sizes to provide."] + #[doc = "* `fileSizes` - File sizes to provide."] + #[doc = ""] pub fn FSUSER_QueryTotalQuotaSize( quotaSize: *mut u64_, directories: u32_, @@ -9601,53 +9454,51 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Abnegates an access right."] -#[doc = "# Arguments"] -#[doc = "`accessRight` - Access right to abnegate."] -#[doc = ""] - + #[doc = "Abnegates an access right."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `accessRight` - Access right to abnegate."] + #[doc = ""] pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the 3DS SDMC root."] -#[doc = ""] - + #[doc = "Deletes the 3DS SDMC root."] + #[doc = ""] pub fn FSUSER_DeleteSdmcRoot() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all ext save data on the NAND."] -#[doc = ""] - + #[doc = "Deletes all ext save data on the NAND."] + #[doc = ""] pub fn FSUSER_DeleteAllExtSaveDataOnNand() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CTR file system."] -#[doc = ""] - + #[doc = "Initializes the CTR file system."] + #[doc = ""] pub fn FSUSER_InitializeCtrFileSystem() -> Result; } extern "C" { #[must_use] -#[doc = "Creates the FS seed."] -#[doc = ""] - + #[doc = "Creates the FS seed."] + #[doc = ""] pub fn FSUSER_CreateSeed() -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves archive format info."] -#[doc = "# Arguments"] -#[doc = "`totalSize` - Pointer to output the total size to."] -#[doc = "`directories` - Pointer to output the number of directories to."] -#[doc = "`files` - Pointer to output the number of files to."] -#[doc = "`duplicateData` - Pointer to output whether to duplicate data to."] -#[doc = "`archiveId` - ID of the archive."] -#[doc = "`path` - Path of the archive."] -#[doc = ""] - + #[doc = "Retrieves archive format info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `totalSize` - Pointer to output the total size to."] + #[doc = "* `directories` - Pointer to output the number of directories to."] + #[doc = "* `files` - Pointer to output the number of files to."] + #[doc = "* `duplicateData` - Pointer to output whether to duplicate data to."] + #[doc = "* `archiveId` - ID of the archive."] + #[doc = "* `path` - Path of the archive."] + #[doc = ""] pub fn FSUSER_GetFormatInfo( totalSize: *mut u32_, directories: *mut u32_, @@ -9659,14 +9510,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy ROM header of a program."] -#[doc = "# Arguments"] -#[doc = "`headerSize` - Size of the ROM header."] -#[doc = "`mediaType` - Media type of the program."] -#[doc = "`programId` - ID of the program."] -#[doc = "`header` - Pointer to output the legacy ROM header to."] -#[doc = ""] - + #[doc = "Gets the legacy ROM header of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `headerSize` - Size of the ROM header."] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy ROM header to."] + #[doc = ""] pub fn FSUSER_GetLegacyRomHeader2( headerSize: u32_, mediaType: FS_MediaType, @@ -9676,22 +9528,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the CTR SDMC root path."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the root path to."] -#[doc = "`length` - Length of the output buffer."] -#[doc = ""] - + #[doc = "Gets the CTR SDMC root path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the root path to."] + #[doc = "* `length` - Length of the output buffer."] + #[doc = ""] pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an archive's resource information."] -#[doc = "# Arguments"] -#[doc = "`archiveResource` - Pointer to output the archive resource information to."] -#[doc = "`mediaType` - System media type to check."] -#[doc = ""] - + #[doc = "Gets an archive's resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = "* `mediaType` - System media type to check."] + #[doc = ""] pub fn FSUSER_GetArchiveResource( archiveResource: *mut FS_ArchiveResource, mediaType: FS_SystemMediaType, @@ -9699,40 +9553,43 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Exports the integrity verification seed."] -#[doc = "# Arguments"] -#[doc = "`seed` - Pointer to output the seed to."] -#[doc = ""] - + #[doc = "Exports the integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to output the seed to."] + #[doc = ""] pub fn FSUSER_ExportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] -#[doc = "Imports an integrity verification seed."] -#[doc = "# Arguments"] -#[doc = "`seed` - Seed to import."] -#[doc = ""] - + #[doc = "Imports an integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Seed to import."] + #[doc = ""] pub fn FSUSER_ImportIntegrityVerificationSeed( seed: *mut FS_IntegrityVerificationSeed, ) -> Result; } extern "C" { #[must_use] -#[doc = "Formats save data."] -#[doc = "# Arguments"] -#[doc = "`archiveId` - ID of the save data archive."] -#[doc = "`path` - Path of the save data."] -#[doc = "`blocks` - Size of the save data in blocks. (512 bytes)"] -#[doc = "`directories` - Number of directories."] -#[doc = "`files` - Number of files."] -#[doc = "`directoryBuckets` - Directory hash tree bucket count."] -#[doc = "`fileBuckets` - File hash tree bucket count."] -#[doc = "`duplicateData` - Whether to store an internal duplicate of the data."] -#[doc = ""] - + #[doc = "Formats save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveId` - ID of the save data archive."] + #[doc = "* `path` - Path of the save data."] + #[doc = "* `blocks` - Size of the save data in blocks. (512 bytes)"] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] + #[doc = "* `fileBuckets` - File hash tree bucket count."] + #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] + #[doc = ""] pub fn FSUSER_FormatSaveData( archiveId: FS_ArchiveID, path: FS_Path, @@ -9746,14 +9603,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy sub banner data of a program."] -#[doc = "# Arguments"] -#[doc = "`bannerSize` - Size of the banner."] -#[doc = "`mediaType` - Media type of the program."] -#[doc = "`programId` - ID of the program."] -#[doc = "`header` - Pointer to output the legacy sub banner data to."] -#[doc = ""] - + #[doc = "Gets the legacy sub banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bannerSize` - Size of the banner."] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy sub banner data to."] + #[doc = ""] pub fn FSUSER_GetLegacySubBannerData( bannerSize: u32_, mediaType: FS_MediaType, @@ -9763,13 +9621,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Hashes the given data and outputs a SHA256 hash."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to the data to be hashed."] -#[doc = "`inputSize` - The size of the data."] -#[doc = "`hash` - Hash output pointer."] -#[doc = ""] - + #[doc = "Hashes the given data and outputs a SHA256 hash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to the data to be hashed."] + #[doc = "* `inputSize` - The size of the data."] + #[doc = "* `hash` - Hash output pointer."] + #[doc = ""] pub fn FSUSER_UpdateSha256Context( data: *const ::libc::c_void, inputSize: u32_, @@ -9778,14 +9637,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a special file."] -#[doc = "# Arguments"] -#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "`fileOffset` - Offset of the file."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`data` - Buffer to read to."] -#[doc = ""] - + #[doc = "Reads from a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `fileOffset` - Offset of the file."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `data` - Buffer to read to."] + #[doc = ""] pub fn FSUSER_ReadSpecialFile( bytesRead: *mut u32_, fileOffset: u64_, @@ -9795,25 +9655,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the size of a special file."] -#[doc = "# Arguments"] -#[doc = "`fileSize` - Pointer to output the size to."] -#[doc = ""] - + #[doc = "Gets the size of a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `fileSize` - Pointer to output the size to."] + #[doc = ""] pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates ext save data."] -#[doc = "# Arguments"] -#[doc = "`info` - Info of the save data."] -#[doc = "`directories` - Number of directories."] -#[doc = "`files` - Number of files."] -#[doc = "`sizeLimit` - Size limit of the save data."] -#[doc = "`smdhSize` - Size of the save data's SMDH data."] -#[doc = "`smdh` - SMDH data."] -#[doc = ""] - + #[doc = "Creates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `sizeLimit` - Size limit of the save data."] + #[doc = "* `smdhSize` - Size of the save data's SMDH data."] + #[doc = "* `smdh` - SMDH data."] + #[doc = ""] pub fn FSUSER_CreateExtSaveData( info: FS_ExtSaveDataInfo, directories: u32_, @@ -9825,23 +9687,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes ext save data."] -#[doc = "# Arguments"] -#[doc = "`info` - Info of the save data."] -#[doc = ""] - + #[doc = "Deletes ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSUSER_DeleteExtSaveData(info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Reads the SMDH icon of ext save data."] -#[doc = "# Arguments"] -#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "`info` - Info of the save data."] -#[doc = "`smdhSize` - Size of the save data SMDH."] -#[doc = "`smdh` - Pointer to output SMDH data to."] -#[doc = ""] - + #[doc = "Reads the SMDH icon of ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `info` - Info of the save data."] + #[doc = "* `smdhSize` - Size of the save data SMDH."] + #[doc = "* `smdh` - Pointer to output SMDH data to."] + #[doc = ""] pub fn FSUSER_ReadExtSaveDataIcon( bytesRead: *mut u32_, info: FS_ExtSaveDataInfo, @@ -9851,14 +9715,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an ext data archive's block information."] -#[doc = "# Arguments"] -#[doc = "`totalBlocks` - Pointer to output the total blocks to."] -#[doc = "`freeBlocks` - Pointer to output the free blocks to."] -#[doc = "`blockSize` - Pointer to output the block size to."] -#[doc = "`info` - Info of the save data."] -#[doc = ""] - + #[doc = "Gets an ext data archive's block information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `totalBlocks` - Pointer to output the total blocks to."] + #[doc = "* `freeBlocks` - Pointer to output the free blocks to."] + #[doc = "* `blockSize` - Pointer to output the block size to."] + #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSUSER_GetExtDataBlockSize( totalBlocks: *mut u64_, freeBlocks: *mut u64_, @@ -9868,16 +9733,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Enumerates ext save data."] -#[doc = "# Arguments"] -#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "`idsSize` - Size of the IDs buffer."] -#[doc = "`mediaType` - Media type to enumerate over."] -#[doc = "`idSize` - Size of each ID element."] -#[doc = "`shared` - Whether to enumerate shared ext save data."] -#[doc = "`ids` - Pointer to output IDs to."] -#[doc = ""] - + #[doc = "Enumerates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `mediaType` - Media type to enumerate over."] + #[doc = "* `idSize` - Size of each ID element."] + #[doc = "* `shared` - Whether to enumerate shared ext save data."] + #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSUSER_EnumerateExtSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9889,18 +9755,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates system save data."] -#[doc = "# Arguments"] -#[doc = "`info` - Info of the save data."] -#[doc = "`totalSize` - Total size of the save data."] -#[doc = "`blockSize` - Block size of the save data. (usually 0x1000)"] -#[doc = "`directories` - Number of directories."] -#[doc = "`files` - Number of files."] -#[doc = "`directoryBuckets` - Directory hash tree bucket count."] -#[doc = "`fileBuckets` - File hash tree bucket count."] -#[doc = "`duplicateData` - Whether to store an internal duplicate of the data."] -#[doc = ""] - + #[doc = "Creates system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = "* `totalSize` - Total size of the save data."] + #[doc = "* `blockSize` - Block size of the save data. (usually 0x1000)"] + #[doc = "* `directories` - Number of directories."] + #[doc = "* `files` - Number of files."] + #[doc = "* `directoryBuckets` - Directory hash tree bucket count."] + #[doc = "* `fileBuckets` - File hash tree bucket count."] + #[doc = "* `duplicateData` - Whether to store an internal duplicate of the data."] + #[doc = ""] pub fn FSUSER_CreateSystemSaveData( info: FS_SystemSaveDataInfo, totalSize: u32_, @@ -9914,30 +9781,33 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes system save data."] -#[doc = "# Arguments"] -#[doc = "`info` - Info of the save data."] -#[doc = ""] - + #[doc = "Deletes system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSUSER_DeleteSystemSaveData(info: FS_SystemSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates a device move as the source device."] -#[doc = "# Arguments"] -#[doc = "`context` - Pointer to output the context to."] -#[doc = ""] - + #[doc = "Initiates a device move as the source device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Pointer to output the context to."] + #[doc = ""] pub fn FSUSER_StartDeviceMoveAsSource(context: *mut FS_DeviceMoveContext) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates a device move as the destination device."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`clear` - Whether to clear the device's data first."] -#[doc = ""] - + #[doc = "Initiates a device move as the destination device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `clear` - Whether to clear the device's data first."] + #[doc = ""] pub fn FSUSER_StartDeviceMoveAsDestination( context: FS_DeviceMoveContext, clear: bool, @@ -9945,52 +9815,57 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets an archive's priority."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to use."] -#[doc = "`priority` - Priority to set."] -#[doc = ""] - + #[doc = "Sets an archive's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to use."] + #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an archive's priority."] -#[doc = "# Arguments"] -#[doc = "`priority` - Pointer to output the priority to."] -#[doc = "`archive` - Archive to use."] -#[doc = ""] - + #[doc = "Gets an archive's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = "* `archive` - Archive to use."] + #[doc = ""] pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Configures CTRCARD latency emulation."] -#[doc = "# Arguments"] -#[doc = "`latency` - Latency to apply, in milliseconds."] -#[doc = "`emulateEndurance` - Whether to emulate card endurance."] -#[doc = ""] - + #[doc = "Configures CTRCARD latency emulation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `latency` - Latency to apply, in milliseconds."] + #[doc = "* `emulateEndurance` - Whether to emulate card endurance."] + #[doc = ""] pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Toggles cleaning up invalid save data."] -#[doc = "# Arguments"] -#[doc = "`enable` - Whether to enable cleaning up invalid save data."] -#[doc = ""] - + #[doc = "Toggles cleaning up invalid save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] + #[doc = ""] pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Enumerates system save data."] -#[doc = "# Arguments"] -#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "`idsSize` - Size of the IDs buffer."] -#[doc = "`ids` - Pointer to output IDs to."] -#[doc = ""] - + #[doc = "Enumerates system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSUSER_EnumerateSystemSaveData( idsWritten: *mut u32_, idsSize: u32_, @@ -9999,42 +9874,46 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes a FSUSER session with an SDK version."] -#[doc = "# Arguments"] -#[doc = "`session` - The handle of the FSUSER session to initialize."] -#[doc = "`version` - SDK version to initialize with."] -#[doc = ""] - + #[doc = "Initializes a FSUSER session with an SDK version."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `session` - The handle of the FSUSER session to initialize."] + #[doc = "* `version` - SDK version to initialize with."] + #[doc = ""] pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the file system priority."] -#[doc = "# Arguments"] -#[doc = "`priority` - Priority to set."] -#[doc = ""] - + #[doc = "Sets the file system priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSUSER_SetPriority(priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the file system priority."] -#[doc = "# Arguments"] -#[doc = "`priority` - Pointer to output the priority to."] -#[doc = ""] - + #[doc = "Gets the file system priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = ""] pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the save data secure value."] -#[doc = "# Arguments"] -#[doc = "`value` - Secure value to set."] -#[doc = "`slot` - Slot of the secure value."] -#[doc = "`titleUniqueId` - Unique ID of the title. (default = 0)"] -#[doc = "`titleVariation` - Variation of the title. (default = 0)"] -#[doc = ""] - + #[doc = "Sets the save data secure value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Secure value to set."] + #[doc = "* `slot` - Slot of the secure value."] + #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] + #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] + #[doc = ""] pub fn FSUSER_SetSaveDataSecureValue( value: u64_, slot: FS_SecureValueSlot, @@ -10044,15 +9923,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the save data secure value."] -#[doc = "# Arguments"] -#[doc = "`exists` - Pointer to output whether the secure value exists to."] -#[doc = "`value` - Pointer to output the secure value to."] -#[doc = "`slot` - Slot of the secure value."] -#[doc = "`titleUniqueId` - Unique ID of the title. (default = 0)"] -#[doc = "`titleVariation` - Variation of the title. (default = 0)"] -#[doc = ""] - + #[doc = "Gets the save data secure value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exists` - Pointer to output whether the secure value exists to."] + #[doc = "* `value` - Pointer to output the secure value to."] + #[doc = "* `slot` - Slot of the secure value."] + #[doc = "* `titleUniqueId` - Unique ID of the title. (default = 0)"] + #[doc = "* `titleVariation` - Variation of the title. (default = 0)"] + #[doc = ""] pub fn FSUSER_GetSaveDataSecureValue( exists: *mut bool, value: *mut u64_, @@ -10063,15 +9943,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Performs a control operation on a secure save."] -#[doc = "# Arguments"] -#[doc = "`action` - Action to perform."] -#[doc = "`input` - Buffer to read input from."] -#[doc = "`inputSize` - Size of the input."] -#[doc = "`output` - Buffer to write output to."] -#[doc = "`outputSize` - Size of the output."] -#[doc = ""] - + #[doc = "Performs a control operation on a secure save."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSUSER_ControlSecureSave( action: FS_SecureSaveAction, input: *mut ::libc::c_void, @@ -10082,25 +9963,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the media type of the current application."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Pointer to output the media type to."] -#[doc = ""] - + #[doc = "Gets the media type of the current application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Pointer to output the media type to."] + #[doc = ""] pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result; } extern "C" { #[must_use] -#[doc = "Performs a control operation on a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`action` - Action to perform."] -#[doc = "`input` - Buffer to read input from."] -#[doc = "`inputSize` - Size of the input."] -#[doc = "`output` - Buffer to write output to."] -#[doc = "`outputSize` - Size of the output."] -#[doc = ""] - + #[doc = "Performs a control operation on a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSFILE_Control( handle: Handle, action: FS_FileAction, @@ -10112,14 +9995,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a handle to a sub-section of a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`subFile` - Pointer to output the sub-file to."] -#[doc = "`offset` - Offset of the sub-section."] -#[doc = "`size` - Size of the sub-section."] -#[doc = ""] - + #[doc = "Opens a handle to a sub-section of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `subFile` - Pointer to output the sub-file to."] + #[doc = "* `offset` - Offset of the sub-section."] + #[doc = "* `size` - Size of the sub-section."] + #[doc = ""] pub fn FSFILE_OpenSubFile( handle: Handle, subFile: *mut Handle, @@ -10129,15 +10013,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "`offset` - Offset to read from."] -#[doc = "`buffer` - Buffer to read to."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Reads from a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `buffer` - Buffer to read to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn FSFILE_Read( handle: Handle, bytesRead: *mut u32_, @@ -10148,16 +10033,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`bytesWritten` - Pointer to output the number of bytes written to."] -#[doc = "`offset` - Offset to write to."] -#[doc = "`buffer` - Buffer to write from."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`flags` - Flags to use when writing."] -#[doc = ""] - + #[doc = "Writes to a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `buffer` - Buffer to write from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `flags` - Flags to use when writing."] + #[doc = ""] pub fn FSFILE_Write( handle: Handle, bytesWritten: *mut u32_, @@ -10169,104 +10055,114 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the size of a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`size` - Pointer to output the size to."] -#[doc = ""] - + #[doc = "Gets the size of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `size` - Pointer to output the size to."] + #[doc = ""] pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the size of a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`size` - Size to set."] -#[doc = ""] - + #[doc = "Sets the size of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `size` - Size to set."] + #[doc = ""] pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the attributes of a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`attributes` - Pointer to output the attributes to."] -#[doc = ""] - + #[doc = "Gets the attributes of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `attributes` - Pointer to output the attributes to."] + #[doc = ""] pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the attributes of a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`attributes` - Attributes to set."] -#[doc = ""] - + #[doc = "Sets the attributes of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `attributes` - Attributes to set."] + #[doc = ""] pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Closes a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = ""] - + #[doc = "Closes a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = ""] pub fn FSFILE_Close(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes a file's contents."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = ""] - + #[doc = "Flushes a file's contents."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = ""] pub fn FSFILE_Flush(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a file's priority."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`priority` - Priority to set."] -#[doc = ""] - + #[doc = "Sets a file's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a file's priority."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`priority` - Pointer to output the priority to."] -#[doc = ""] - + #[doc = "Gets a file's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = ""] pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Opens a duplicate handle to a file."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the file."] -#[doc = "`linkFile` - Pointer to output the link handle to."] -#[doc = ""] - + #[doc = "Opens a duplicate handle to a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the file."] + #[doc = "* `linkFile` - Pointer to output the link handle to."] + #[doc = ""] pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Performs a control operation on a directory."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the directory."] -#[doc = "`action` - Action to perform."] -#[doc = "`input` - Buffer to read input from."] -#[doc = "`inputSize` - Size of the input."] -#[doc = "`output` - Buffer to write output to."] -#[doc = "`outputSize` - Size of the output."] -#[doc = ""] - + #[doc = "Performs a control operation on a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `action` - Action to perform."] + #[doc = "* `input` - Buffer to read input from."] + #[doc = "* `inputSize` - Size of the input."] + #[doc = "* `output` - Buffer to write output to."] + #[doc = "* `outputSize` - Size of the output."] + #[doc = ""] pub fn FSDIR_Control( handle: Handle, action: FS_DirectoryAction, @@ -10278,14 +10174,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads one or more directory entries."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the directory."] -#[doc = "`entriesRead` - Pointer to output the number of entries read to."] -#[doc = "`entryCount` - Number of entries to read."] -#[doc = "`entryOut` - Pointer to output directory entries to."] -#[doc = ""] - + #[doc = "Reads one or more directory entries."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] + #[doc = "* `entryCount` - Number of entries to read."] + #[doc = "* `entryOut` - Pointer to output directory entries to."] + #[doc = ""] pub fn FSDIR_Read( handle: Handle, entriesRead: *mut u32_, @@ -10295,250 +10192,215 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes a directory."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the directory."] -#[doc = ""] - + #[doc = "Closes a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = ""] pub fn FSDIR_Close(handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a directory's priority."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the directory."] -#[doc = "`priority` - Priority to set."] -#[doc = ""] - + #[doc = "Sets a directory's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a directory's priority."] -#[doc = "# Arguments"] -#[doc = "`handle` - Handle of the directory."] -#[doc = "`priority` - Pointer to output the priority to."] -#[doc = ""] - + #[doc = "Gets a directory's priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Handle of the directory."] + #[doc = "* `priority` - Pointer to output the priority to."] + #[doc = ""] pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result; } #[doc = "Contains basic information about a title."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TitleEntry { -#[doc = "The title's ID."] -#[doc = ""] - + #[doc = "The title's ID."] + #[doc = ""] pub titleID: u64_, -#[doc = "The title's installed size."] -#[doc = ""] - + #[doc = "The title's installed size."] + #[doc = ""] pub size: u64_, -#[doc = "The title's version."] -#[doc = ""] - + #[doc = "The title's version."] + #[doc = ""] pub version: u16_, -#[doc = "Unknown title data."] -#[doc = ""] - + #[doc = "Unknown title data."] + #[doc = ""] pub unk: [u8_; 6usize], } #[doc = "Titles currently installing."] #[doc = ""] - pub const AM_STATUS_MASK_INSTALLING: _bindgen_ty_13 = 1; #[doc = "Titles awaiting finalization."] #[doc = ""] - pub const AM_STATUS_MASK_AWAITING_FINALIZATION: _bindgen_ty_13 = 2; #[doc = "Pending title status mask values."] #[doc = ""] - pub type _bindgen_ty_13 = ::libc::c_uint; #[doc = "Install aborted."] #[doc = ""] - pub const AM_STATUS_ABORTED: AM_InstallStatus = 2; #[doc = "Title saved, but not installed."] #[doc = ""] - pub const AM_STATUS_SAVED: AM_InstallStatus = 3; #[doc = "Install in progress."] #[doc = ""] - pub const AM_STATUS_INSTALL_IN_PROGRESS: AM_InstallStatus = 2050; #[doc = "Awaiting finalization."] #[doc = ""] - pub const AM_STATUS_AWAITING_FINALIZATION: AM_InstallStatus = 2051; #[doc = "Pending title status values."] #[doc = ""] - pub type AM_InstallStatus = ::libc::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_PendingTitleEntry { -#[doc = "Title ID"] -#[doc = ""] - + #[doc = "Title ID"] + #[doc = ""] pub titleId: u64_, -#[doc = "Version"] -#[doc = ""] - + #[doc = "Version"] + #[doc = ""] pub version: u16_, -#[doc = "[`AM_InstallStatus`]"] -#[doc = ""] - + #[doc = "[`AM_InstallStatus`]"] + #[doc = ""] pub status: u16_, -#[doc = "Title Type"] -#[doc = ""] - + #[doc = "Title Type"] + #[doc = ""] pub titleType: u32_, -#[doc = "Unknown"] -#[doc = ""] - + #[doc = "Unknown"] + #[doc = ""] pub unk: [u8_; 8usize], } #[doc = "Non-system titles."] #[doc = ""] - pub const AM_DELETE_PENDING_NON_SYSTEM: _bindgen_ty_14 = 1; #[doc = "System titles."] #[doc = ""] - pub const AM_DELETE_PENDING_SYSTEM: _bindgen_ty_14 = 2; #[doc = "Pending title deletion flags."] #[doc = ""] - pub type _bindgen_ty_14 = ::libc::c_uint; #[doc = "Information about the TWL NAND partition."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_TWLPartitionInfo { -#[doc = "Total capacity."] -#[doc = ""] - + #[doc = "Total capacity."] + #[doc = ""] pub capacity: u64_, -#[doc = "Total free space."] -#[doc = ""] - + #[doc = "Total free space."] + #[doc = ""] pub freeSpace: u64_, -#[doc = "Capacity for titles."] -#[doc = ""] - + #[doc = "Capacity for titles."] + #[doc = ""] pub titlesCapacity: u64_, -#[doc = "Free space for titles."] -#[doc = ""] - + #[doc = "Free space for titles."] + #[doc = ""] pub titlesFreeSpace: u64_, } #[doc = "Contains information about a title's content."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct AM_ContentInfo { -#[doc = "Index of the content in the title."] -#[doc = ""] - + #[doc = "Index of the content in the title."] + #[doc = ""] pub index: u16_, -#[doc = "?"] -#[doc = ""] - + #[doc = "?"] + #[doc = ""] pub type_: u16_, -#[doc = "ID of the content in the title."] -#[doc = ""] - + #[doc = "ID of the content in the title."] + #[doc = ""] pub contentId: u32_, -#[doc = "Size of the content in the title."] -#[doc = ""] - + #[doc = "Size of the content in the title."] + #[doc = ""] pub size: u64_, -#[doc = "[`AM_ContentInfoFlags`]"] -#[doc = ""] - + #[doc = "[`AM_ContentInfoFlags`]"] + #[doc = ""] pub flags: u8_, -#[doc = "Padding"] -#[doc = ""] - + #[doc = "Padding"] + #[doc = ""] pub padding: [u8_; 7usize], } #[doc = "?"] #[doc = ""] - pub const AM_CONTENT_DOWNLOADED: AM_ContentInfoFlags = 1; #[doc = "?"] #[doc = ""] - pub const AM_CONTENT_OWNED: AM_ContentInfoFlags = 2; #[doc = "Title ContentInfo flags."] #[doc = ""] - pub type AM_ContentInfoFlags = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] -#[doc = ""] - + #[doc = "Initializes AM. This doesn't initialize with \"am:app\", see amAppInit()."] + #[doc = ""] pub fn amInit() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] -#[doc = ""] - + #[doc = "Initializes AM with a service which has access to the amapp-commands. This should only be used when using the amapp commands, not non-amapp AM commands."] + #[doc = ""] pub fn amAppInit() -> Result; } extern "C" { -#[doc = "Exits AM."] -#[doc = ""] - + #[doc = "Exits AM."] + #[doc = ""] pub fn amExit(); } extern "C" { -#[doc = "Gets the current AM session handle."] -#[doc = ""] - + #[doc = "Gets the current AM session handle."] + #[doc = ""] pub fn amGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the number of titles for a given media type."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to get titles from."] -#[doc = "`count` - Pointer to write the title count to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Gets the number of titles for a given media type."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to get titles from."] + #[doc = "* `count` - Pointer to write the title count to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a list of title IDs present in a mediatype."] -#[doc = "# Arguments"] -#[doc = "`titlesRead` - Pointer to output the number of read titles to. [Direction: In, Out]"] -#[doc = "`mediatype` - Media type to get titles from."] -#[doc = "`titleCount` - Number of title IDs to get."] -#[doc = "`titleIds` - Buffer to output the retrieved title IDs to."] -#[doc = ""] - + #[doc = "Gets a list of title IDs present in a mediatype."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titlesRead` - Pointer to output the number of read titles to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type to get titles from."] + #[doc = "* `titleCount` - Number of title IDs to get."] + #[doc = "* `titleIds` - Buffer to output the retrieved title IDs to."] + #[doc = ""] pub fn AM_GetTitleList( titlesRead: *mut u32_, mediatype: FS_MediaType, @@ -10548,14 +10410,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a list of details about installed titles."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to get titles from."] -#[doc = "`titleCount` - Number of titles to list."] -#[doc = "`titleIds` - List of title IDs to retrieve details for."] -#[doc = "`titleInfo` - Buffer to write AM_TitleEntry's to."] -#[doc = ""] - + #[doc = "Gets a list of details about installed titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to get titles from."] + #[doc = "* `titleCount` - Number of titles to list."] + #[doc = "* `titleIds` - List of title IDs to retrieve details for."] + #[doc = "* `titleInfo` - Buffer to write AM_TitleEntry's to."] + #[doc = ""] pub fn AM_GetTitleInfo( mediatype: FS_MediaType, titleCount: u32_, @@ -10565,23 +10428,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the number of tickets installed on the system."] -#[doc = "# Arguments"] -#[doc = "`count` - Pointer to output the ticket count to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Gets the number of tickets installed on the system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the ticket count to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTicketCount(count: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a list of tickets installed on the system."] -#[doc = "# Arguments"] -#[doc = "`ticketsRead` - Pointer to output the number of read tickets to. [Direction: In, Out]"] -#[doc = "`ticketCount` - Number of tickets to read."] -#[doc = "`skip` - Number of tickets to skip."] -#[doc = "`ticketIds` - Buffer to output the retrieved ticket IDs to."] -#[doc = ""] - + #[doc = "Gets a list of tickets installed on the system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketsRead` - Pointer to output the number of read tickets to. [Direction: In, Out]"] + #[doc = "* `ticketCount` - Number of tickets to read."] + #[doc = "* `skip` - Number of tickets to skip."] + #[doc = "* `ticketIds` - Buffer to output the retrieved ticket IDs to."] + #[doc = ""] pub fn AM_GetTicketList( ticketsRead: *mut u32_, ticketCount: u32_, @@ -10591,13 +10456,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the number of pending titles on this system."] -#[doc = "# Arguments"] -#[doc = "`count` - Pointer to output the pending title count to. [Direction: In, Out]"] -#[doc = "`mediatype` - Media type of pending titles to count."] -#[doc = "`statusMask` - Bit mask of status values to include."] -#[doc = ""] - + #[doc = "Gets the number of pending titles on this system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the pending title count to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of pending titles to count."] + #[doc = "* `statusMask` - Bit mask of status values to include."] + #[doc = ""] pub fn AM_GetPendingTitleCount( count: *mut u32_, mediatype: FS_MediaType, @@ -10606,15 +10472,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a list of pending titles on this system."] -#[doc = "# Arguments"] -#[doc = "`titlesRead` - Pointer to output the number of read pending titles to. [Direction: In, Out]"] -#[doc = "`titleCount` - Number of pending titles to read."] -#[doc = "`mediatype` - Media type of pending titles to list."] -#[doc = "`statusMask` - Bit mask of status values to include."] -#[doc = "`titleIds` - Buffer to output the retrieved pending title IDs to."] -#[doc = ""] - + #[doc = "Gets a list of pending titles on this system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titlesRead` - Pointer to output the number of read pending titles to. [Direction: In, Out]"] + #[doc = "* `titleCount` - Number of pending titles to read."] + #[doc = "* `mediatype` - Media type of pending titles to list."] + #[doc = "* `statusMask` - Bit mask of status values to include."] + #[doc = "* `titleIds` - Buffer to output the retrieved pending title IDs to."] + #[doc = ""] pub fn AM_GetPendingTitleList( titlesRead: *mut u32_, titleCount: u32_, @@ -10625,14 +10492,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets information about pending titles on this system."] -#[doc = "# Arguments"] -#[doc = "`titleCount` - Number of pending titles to read."] -#[doc = "`mediatype` - Media type of pending titles to get information on."] -#[doc = "`titleIds` - IDs of the titles to get information about."] -#[doc = "`titleInfo` - Buffer to output the retrieved pending title info to."] -#[doc = ""] - + #[doc = "Gets information about pending titles on this system."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleCount` - Number of pending titles to read."] + #[doc = "* `mediatype` - Media type of pending titles to get information on."] + #[doc = "* `titleIds` - IDs of the titles to get information about."] + #[doc = "* `titleInfo` - Buffer to output the retrieved pending title info to."] + #[doc = ""] pub fn AM_GetPendingTitleInfo( titleCount: u32_, mediatype: FS_MediaType, @@ -10642,24 +10510,26 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a 32-bit device-specific ID."] -#[doc = "# Arguments"] -#[doc = "`deviceID` - Pointer to write the device ID to."] -#[doc = ""] - + #[doc = "Gets a 32-bit device-specific ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `deviceID` - Pointer to write the device ID to."] + #[doc = ""] pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Exports DSiWare to the specified filepath."] -#[doc = "# Arguments"] -#[doc = "`titleID` - TWL titleID."] -#[doc = "`operation` - DSiWare operation type."] -#[doc = "`workbuf` - Work buffer."] -#[doc = "`workbuf_size` - Work buffer size, must be >=0x20000."] -#[doc = "`filepath` - UTF-8 filepath(converted to UTF-16 internally)."] -#[doc = ""] - + #[doc = "Exports DSiWare to the specified filepath."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleID` - TWL titleID."] + #[doc = "* `operation` - DSiWare operation type."] + #[doc = "* `workbuf` - Work buffer."] + #[doc = "* `workbuf_size` - Work buffer size, must be >=0x20000."] + #[doc = "* `filepath` - UTF-8 filepath(converted to UTF-16 internally)."] + #[doc = ""] pub fn AM_ExportTwlBackup( titleID: u64_, operation: u8_, @@ -10670,14 +10540,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Imports DSiWare from the specified file."] -#[doc = "# Arguments"] -#[doc = "`filehandle` - FSUSER file handle."] -#[doc = "`operation` - DSiWare operation type."] -#[doc = "`buffer` - Work buffer."] -#[doc = "`size` - Buffer size, must be >=0x20000."] -#[doc = ""] - + #[doc = "Imports DSiWare from the specified file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `filehandle` - FSUSER file handle."] + #[doc = "* `operation` - DSiWare operation type."] + #[doc = "* `buffer` - Work buffer."] + #[doc = "* `size` - Buffer size, must be >=0x20000."] + #[doc = ""] pub fn AM_ImportTwlBackup( filehandle: Handle, operation: u8_, @@ -10687,17 +10558,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] -#[doc = "# Arguments"] -#[doc = "`filehandle` - FSUSER file handle."] -#[doc = "`outinfo` - Output info buffer."] -#[doc = "`outinfo_size` - Output info buffer size."] -#[doc = "`workbuf` - Work buffer."] -#[doc = "`workbuf_size` - Work buffer size."] -#[doc = "`banner` - Output banner buffer."] -#[doc = "`banner_size` - Output banner buffer size."] -#[doc = ""] - + #[doc = "Reads info from the specified DSiWare export file. This can only be used with DSiWare exported with certain operation value(s)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `filehandle` - FSUSER file handle."] + #[doc = "* `outinfo` - Output info buffer."] + #[doc = "* `outinfo_size` - Output info buffer size."] + #[doc = "* `workbuf` - Work buffer."] + #[doc = "* `workbuf_size` - Work buffer size."] + #[doc = "* `banner` - Output banner buffer."] + #[doc = "* `banner_size` - Output banner buffer size."] + #[doc = ""] pub fn AM_ReadTwlBackupInfo( filehandle: Handle, outinfo: *mut ::libc::c_void, @@ -10710,69 +10582,76 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Retrieves information about the NAND TWL partition."] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Retrieves information about the NAND TWL partition."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the TWL partition info to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTWLPartitionInfo(info: *mut AM_TWLPartitionInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to install the CIA to."] -#[doc = "`ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Initializes the CIA install process, returning a handle to write CIA data to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to install the CIA to."] + #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_StartCiaInstall(mediatype: FS_MediaType, ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] -#[doc = "# Arguments"] -#[doc = "`ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - Pointer to write the CIA handle to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_StartDlpChildCiaInstall(ciaHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts the CIA install process."] -#[doc = "# Arguments"] -#[doc = "`ciaHandle` - CIA handle to cancel."] -#[doc = ""] - + #[doc = "Aborts the CIA install process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - CIA handle to cancel."] + #[doc = ""] pub fn AM_CancelCIAInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finalizes the CIA install process."] -#[doc = "# Arguments"] -#[doc = "`ciaHandle` - CIA handle to finalize."] -#[doc = ""] - + #[doc = "Finalizes the CIA install process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - CIA handle to finalize."] + #[doc = ""] pub fn AM_FinishCiaInstall(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] -#[doc = "# Arguments"] -#[doc = "`ciaHandle` - CIA handle to finalize."] -#[doc = ""] - + #[doc = "Finalizes the CIA install process without committing the title to title.db or tmp*.db."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ciaHandle` - CIA handle to finalize."] + #[doc = ""] pub fn AM_FinishCiaInstallWithoutCommit(ciaHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Commits installed CIAs."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Location of the titles to finalize."] -#[doc = "`titleCount` - Number of titles to finalize."] -#[doc = "`temp` - Whether the titles being finalized are in the temporary database."] -#[doc = "`titleIds` - Title IDs to finalize."] -#[doc = ""] - + #[doc = "Commits installed CIAs."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Location of the titles to finalize."] + #[doc = "* `titleCount` - Number of titles to finalize."] + #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] + #[doc = "* `titleIds` - Title IDs to finalize."] + #[doc = ""] pub fn AM_CommitImportPrograms( mediaType: FS_MediaType, titleCount: u32_, @@ -10782,87 +10661,94 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a title."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to delete from."] -#[doc = "`titleID` - ID of the title to delete."] -#[doc = ""] - + #[doc = "Deletes a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `titleID` - ID of the title to delete."] + #[doc = ""] pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a title, provided that it is not a system title."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to delete from."] -#[doc = "`titleID` - ID of the title to delete."] -#[doc = ""] - + #[doc = "Deletes a title, provided that it is not a system title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `titleID` - ID of the title to delete."] + #[doc = ""] pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a ticket."] -#[doc = "# Arguments"] -#[doc = "`titleID` - ID of the ticket to delete."] -#[doc = ""] - + #[doc = "Deletes a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleID` - ID of the ticket to delete."] + #[doc = ""] pub fn AM_DeleteTicket(ticketId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a pending title."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to delete from."] -#[doc = "`titleId` - ID of the pending title to delete."] -#[doc = ""] - + #[doc = "Deletes a pending title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `titleId` - ID of the pending title to delete."] + #[doc = ""] pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes pending titles."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to delete from."] -#[doc = "`flags` - Flags used to select pending titles."] -#[doc = ""] - + #[doc = "Deletes pending titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = "* `flags` - Flags used to select pending titles."] + #[doc = ""] pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all pending titles."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to delete from."] -#[doc = ""] - + #[doc = "Deletes all pending titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = ""] pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] -#[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] -#[doc = ""] - + #[doc = "Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)"] + #[doc = ""] pub fn AM_InstallNativeFirm() -> Result; } extern "C" { #[must_use] -#[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] -#[doc = "# Arguments"] -#[doc = "`titleID` - Title ID of the NATIVE_FIRM to install."] -#[doc = ""] - + #[doc = "Installs a NATIVE_FIRM title to NAND. Accepts 0004013800000002 or 0004013820000002 (N3DS)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleID` - Title ID of the NATIVE_FIRM to install."] + #[doc = ""] pub fn AM_InstallFirm(titleID: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the product code of a title."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type of the title."] -#[doc = "`titleID` - ID of the title."] -#[doc = "`productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Gets the product code of a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - ID of the title."] + #[doc = "* `productCode` - Pointer to output the product code to. (length = 16) [Direction: In, Out]"] + #[doc = ""] pub fn AM_GetTitleProductCode( mediatype: FS_MediaType, titleId: u64_, @@ -10871,13 +10757,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the ext data ID of a title."] -#[doc = "# Arguments"] -#[doc = "`extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] -#[doc = "`mediatype` - Media type of the title."] -#[doc = "`titleID` - ID of the title."] -#[doc = ""] - + #[doc = "Gets the ext data ID of a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `extDataId` - Pointer to output the ext data ID to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - ID of the title."] + #[doc = ""] pub fn AM_GetTitleExtDataId( extDataId: *mut u64_, mediatype: FS_MediaType, @@ -10886,13 +10773,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an AM_TitleEntry instance for a CIA file."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type that this CIA would be installed to."] -#[doc = "`titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] -#[doc = "`fileHandle` - Handle of the CIA file."] -#[doc = ""] - + #[doc = "Gets an AM_TitleEntry instance for a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type that this CIA would be installed to."] + #[doc = "* `titleEntry` - Pointer to write the AM_TitleEntry instance to. [Direction: In, Out]"] + #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaFileInfo( mediatype: FS_MediaType, titleEntry: *mut AM_TitleEntry, @@ -10901,53 +10789,58 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the SMDH icon data of a CIA file."] -#[doc = "# Arguments"] -#[doc = "`icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] -#[doc = "`fileHandle` - Handle of the CIA file."] -#[doc = ""] - + #[doc = "Gets the SMDH icon data of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `icon` - Buffer to store the icon data in. Must be of size 0x36C0 bytes."] + #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the title ID dependency list of a CIA file."] -#[doc = "# Arguments"] -#[doc = "`dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] -#[doc = "`fileHandle` - Handle of the CIA file."] -#[doc = ""] - + #[doc = "Gets the title ID dependency list of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dependencies` - Buffer to store dependency title IDs in. Must be of size 0x300 bytes."] + #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the meta section offset of a CIA file."] -#[doc = "# Arguments"] -#[doc = "`metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] -#[doc = "`fileHandle` - Handle of the CIA file."] -#[doc = ""] - + #[doc = "Gets the meta section offset of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `metaOffset` - Pointer to output the meta section offset to. [Direction: In, Out]"] + #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the core version of a CIA file."] -#[doc = "# Arguments"] -#[doc = "`coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] -#[doc = "`fileHandle` - Handle of the CIA file."] -#[doc = ""] - + #[doc = "Gets the core version of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coreVersion` - Pointer to output the core version to. [Direction: In, Out]"] + #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the free space, in bytes, required to install a CIA file."] -#[doc = "# Arguments"] -#[doc = "`requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] -#[doc = "`mediaType` - Media type to check free space needed to install to."] -#[doc = "`fileHandle` - Handle of the CIA file."] -#[doc = ""] - + #[doc = "Gets the free space, in bytes, required to install a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `requiredSpace` - Pointer to output the required free space to. [Direction: In, Out]"] + #[doc = "* `mediaType` - Media type to check free space needed to install to."] + #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaRequiredSpace( requiredSpace: *mut u64_, mediaType: FS_MediaType, @@ -10956,13 +10849,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the full meta section of a CIA file."] -#[doc = "# Arguments"] -#[doc = "`meta` - Buffer to store the meta section in."] -#[doc = "`size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] -#[doc = "`fileHandle` - Handle of the CIA file."] -#[doc = ""] - + #[doc = "Gets the full meta section of a CIA file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `meta` - Buffer to store the meta section in."] + #[doc = "* `size` - Size of the buffer. Must be greater than or equal to the actual section data's size."] + #[doc = "* `fileHandle` - Handle of the CIA file."] + #[doc = ""] pub fn AM_GetCiaMetaSection( meta: *mut ::libc::c_void, size: u32_, @@ -10971,101 +10865,106 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes the external (SD) title database."] -#[doc = "# Arguments"] -#[doc = "`overwrite` - Overwrites the database if it already exists."] -#[doc = ""] - + #[doc = "Initializes the external (SD) title database."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `overwrite` - Overwrites the database if it already exists."] + #[doc = ""] pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Queries whether the external title database is available."] -#[doc = "# Arguments"] -#[doc = "`available` - Pointer to output the availability status to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Queries whether the external title database is available."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `available` - Pointer to output the availability status to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_QueryAvailableExternalTitleDatabase(available: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Begins installing a ticket."] -#[doc = "# Arguments"] -#[doc = "`ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Begins installing a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketHandle` - Pointer to output a handle to write ticket data to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_InstallTicketBegin(ticketHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts installing a ticket."] -#[doc = "# Arguments"] -#[doc = "`ticketHandle` - Handle of the installation to abort."] -#[doc = ""] - + #[doc = "Aborts installing a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketHandle` - Handle of the installation to abort."] + #[doc = ""] pub fn AM_InstallTicketAbort(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing a ticket."] -#[doc = "# Arguments"] -#[doc = "`ticketHandle` - Handle of the installation to finalize."] -#[doc = ""] - + #[doc = "Finishes installing a ticket."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ticketHandle` - Handle of the installation to finalize."] + #[doc = ""] pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Begins installing a title."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Destination to install to."] -#[doc = "`titleId` - ID of the title to install."] -#[doc = "`unk` - Unknown. (usually false)"] -#[doc = ""] - + #[doc = "Begins installing a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Destination to install to."] + #[doc = "* `titleId` - ID of the title to install."] + #[doc = "* `unk` - Unknown. (usually false)"] + #[doc = ""] pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Stops installing a title, generally to be resumed later."] -#[doc = ""] - + #[doc = "Stops installing a title, generally to be resumed later."] + #[doc = ""] pub fn AM_InstallTitleStop() -> Result; } extern "C" { #[must_use] -#[doc = "Resumes installing a title."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Destination to install to."] -#[doc = "`titleId` - ID of the title to install."] -#[doc = ""] - + #[doc = "Resumes installing a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Destination to install to."] + #[doc = "* `titleId` - ID of the title to install."] + #[doc = ""] pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts installing a title."] -#[doc = ""] - + #[doc = "Aborts installing a title."] + #[doc = ""] pub fn AM_InstallTitleAbort() -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing a title."] -#[doc = ""] - + #[doc = "Finishes installing a title."] + #[doc = ""] pub fn AM_InstallTitleFinish() -> Result; } extern "C" { #[must_use] -#[doc = "Commits installed titles."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Location of the titles to finalize."] -#[doc = "`titleCount` - Number of titles to finalize."] -#[doc = "`temp` - Whether the titles being finalized are in the temporary database."] -#[doc = "`titleIds` - Title IDs to finalize."] -#[doc = ""] - + #[doc = "Commits installed titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Location of the titles to finalize."] + #[doc = "* `titleCount` - Number of titles to finalize."] + #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] + #[doc = "* `titleIds` - Title IDs to finalize."] + #[doc = ""] pub fn AM_CommitImportTitles( mediaType: FS_MediaType, titleCount: u32_, @@ -11075,70 +10974,77 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Begins installing a TMD."] -#[doc = "# Arguments"] -#[doc = "`tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Begins installing a TMD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tmdHandle` - Pointer to output a handle to write TMD data to. [Direction: In, Out]"] + #[doc = ""] pub fn AM_InstallTmdBegin(tmdHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Aborts installing a TMD."] -#[doc = "# Arguments"] -#[doc = "`tmdHandle` - Handle of the installation to abort."] -#[doc = ""] - + #[doc = "Aborts installing a TMD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tmdHandle` - Handle of the installation to abort."] + #[doc = ""] pub fn AM_InstallTmdAbort(tmdHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing a TMD."] -#[doc = "# Arguments"] -#[doc = "`tmdHandle` - Handle of the installation to finalize."] -#[doc = "`unk` - Unknown. (usually true)"] -#[doc = ""] - + #[doc = "Finishes installing a TMD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tmdHandle` - Handle of the installation to finalize."] + #[doc = "* `unk` - Unknown. (usually true)"] + #[doc = ""] pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares to import title contents."] -#[doc = "# Arguments"] -#[doc = "`contentCount` - Number of contents to be imported."] -#[doc = "`contentIndices` - Indices of the contents to be imported."] -#[doc = ""] - + #[doc = "Prepares to import title contents."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentCount` - Number of contents to be imported."] + #[doc = "* `contentIndices` - Indices of the contents to be imported."] + #[doc = ""] pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Begins installing title content."] -#[doc = "# Arguments"] -#[doc = "`contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] -#[doc = "`index` - Index of the content to install."] -#[doc = ""] - + #[doc = "Begins installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] + #[doc = "* `index` - Index of the content to install."] + #[doc = ""] pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Stops installing title content, generally to be resumed later."] -#[doc = "# Arguments"] -#[doc = "`contentHandle` - Handle of the installation to abort."] -#[doc = ""] - + #[doc = "Stops installing title content, generally to be resumed later."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Handle of the installation to abort."] + #[doc = ""] pub fn AM_InstallContentStop(contentHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Resumes installing title content."] -#[doc = "# Arguments"] -#[doc = "`contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] -#[doc = "`resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] -#[doc = "`index` - Index of the content to install."] -#[doc = ""] - + #[doc = "Resumes installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Pointer to output a handle to write content data to. [Direction: In, Out]"] + #[doc = "* `resumeOffset` - Pointer to write the offset to resume content installation at to. [Direction: In, Out]"] + #[doc = "* `index` - Index of the content to install."] + #[doc = ""] pub fn AM_InstallContentResume( contentHandle: *mut Handle, resumeOffset: *mut u64_, @@ -11147,36 +11053,39 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Cancels installing title content."] -#[doc = "# Arguments"] -#[doc = "`contentHandle` - Handle of the installation to finalize."] -#[doc = ""] - + #[doc = "Cancels installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Handle of the installation to finalize."] + #[doc = ""] pub fn AM_InstallContentCancel(contentHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Finishes installing title content."] -#[doc = "# Arguments"] -#[doc = "`contentHandle` - Handle of the installation to finalize."] -#[doc = ""] - + #[doc = "Finishes installing title content."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentHandle` - Handle of the installation to finalize."] + #[doc = ""] pub fn AM_InstallContentFinish(contentHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Imports up to four certificates into the ticket certificate chain."] -#[doc = "# Arguments"] -#[doc = "`cert1Size` - Size of the first certificate."] -#[doc = "`cert1` - Data of the first certificate."] -#[doc = "`cert2Size` - Size of the second certificate."] -#[doc = "`cert2` - Data of the second certificate."] -#[doc = "`cert3Size` - Size of the third certificate."] -#[doc = "`cert3` - Data of the third certificate."] -#[doc = "`cert4Size` - Size of the fourth certificate."] -#[doc = "`cert4` - Data of the fourth certificate."] -#[doc = ""] - + #[doc = "Imports up to four certificates into the ticket certificate chain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cert1Size` - Size of the first certificate."] + #[doc = "* `cert1` - Data of the first certificate."] + #[doc = "* `cert2Size` - Size of the second certificate."] + #[doc = "* `cert2` - Data of the second certificate."] + #[doc = "* `cert3Size` - Size of the third certificate."] + #[doc = "* `cert3` - Data of the third certificate."] + #[doc = "* `cert4Size` - Size of the fourth certificate."] + #[doc = "* `cert4` - Data of the fourth certificate."] + #[doc = ""] pub fn AM_ImportCertificates( cert1Size: u32_, cert1: *mut ::libc::c_void, @@ -11190,24 +11099,26 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Imports a certificate into the ticket certificate chain."] -#[doc = "# Arguments"] -#[doc = "`certSize` - Size of the certificate."] -#[doc = "`cert` - Data of the certificate."] -#[doc = ""] - + #[doc = "Imports a certificate into the ticket certificate chain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `certSize` - Size of the certificate."] + #[doc = "* `cert` - Data of the certificate."] + #[doc = ""] pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Commits installed titles, and updates FIRM if necessary."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Location of the titles to finalize."] -#[doc = "`titleCount` - Number of titles to finalize."] -#[doc = "`temp` - Whether the titles being finalized are in the temporary database."] -#[doc = "`titleIds` - Title IDs to finalize."] -#[doc = ""] - + #[doc = "Commits installed titles, and updates FIRM if necessary."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Location of the titles to finalize."] + #[doc = "* `titleCount` - Number of titles to finalize."] + #[doc = "* `temp` - Whether the titles being finalized are in the temporary database."] + #[doc = "* `titleIds` - Title IDs to finalize."] + #[doc = ""] pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto( mediaType: FS_MediaType, titleCount: u32_, @@ -11217,43 +11128,42 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Resets play count of all installed demos by deleting their launch info."] -#[doc = ""] - + #[doc = "Resets play count of all installed demos by deleting their launch info."] + #[doc = ""] pub fn AM_DeleteAllDemoLaunchInfos() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes temporary titles."] -#[doc = ""] - + #[doc = "Deletes temporary titles."] + #[doc = ""] pub fn AM_DeleteAllTemporaryTitles() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all expired titles."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Media type to delete from."] -#[doc = ""] - + #[doc = "Deletes all expired titles."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Media type to delete from."] + #[doc = ""] pub fn AM_DeleteAllExpiredTitles(mediatype: FS_MediaType) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all TWL titles."] -#[doc = ""] - + #[doc = "Deletes all TWL titles."] + #[doc = ""] pub fn AM_DeleteAllTwlTitles() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the number of content index installed under the specified DLC title."] -#[doc = "# Arguments"] -#[doc = "`count` - Pointer to output the number of content indices to. [Direction: In, Out]"] -#[doc = "`mediatype` - Media type of the title."] -#[doc = "`titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] -#[doc = ""] - + #[doc = "Gets the number of content index installed under the specified DLC title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Pointer to output the number of content indices to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - Title ID to retrieve the count for (high-id is 0x0004008C)."] + #[doc = ""] pub fn AMAPP_GetDLCContentInfoCount( count: *mut u32_, mediatype: FS_MediaType, @@ -11262,16 +11172,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets content infos installed under the specified DLC title."] -#[doc = "# Arguments"] -#[doc = "`contentInfoRead` - Pointer to output the number of content infos read to. [Direction: In, Out]"] -#[doc = "`mediatype` - Media type of the title."] -#[doc = "`titleID` - Title ID to retrieve the content infos for (high-id is 0x0004008C)."] -#[doc = "`contentInfoCount` - Number of content infos to retrieve."] -#[doc = "`offset` - Offset from the first content index the count starts at."] -#[doc = "`contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Gets content infos installed under the specified DLC title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `contentInfoRead` - Pointer to output the number of content infos read to. [Direction: In, Out]"] + #[doc = "* `mediatype` - Media type of the title."] + #[doc = "* `titleID` - Title ID to retrieve the content infos for (high-id is 0x0004008C)."] + #[doc = "* `contentInfoCount` - Number of content infos to retrieve."] + #[doc = "* `offset` - Offset from the first content index the count starts at."] + #[doc = "* `contentInfos` - Pointer to output the content infos read to. [Direction: In, Out]"] + #[doc = ""] pub fn AMAPP_ListDLCContentInfos( contentInfoRead: *mut u32_, mediatype: FS_MediaType, @@ -11283,31 +11194,32 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes AMPXI."] -#[doc = "# Arguments"] -#[doc = "`servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] -#[doc = ""] - + #[doc = "Initializes AMPXI."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `servhandle` - Optional service session handle to use for AMPXI, if zero srvGetServiceHandle() will be used."] + #[doc = ""] pub fn ampxiInit(servhandle: Handle) -> Result; } extern "C" { -#[doc = "Exits AMPXI."] -#[doc = ""] - + #[doc = "Exits AMPXI."] + #[doc = ""] pub fn ampxiExit(); } extern "C" { #[must_use] -#[doc = "Writes a TWL save-file to NAND. "] -#[doc = "# Arguments"] -#[doc = "`titleid` - ID of the TWL title."] -#[doc = "`buffer` - Savedata buffer ptr."] -#[doc = "`size` - Size of the savedata buffer."] -#[doc = "`image_filepos` - Filepos to use for writing the data to the NAND savedata file."] -#[doc = "`section_type` - "] -#[doc = "`operation` - "] -#[doc = ""] - + #[doc = "Writes a TWL save-file to NAND. "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the TWL title."] + #[doc = "* `buffer` - Savedata buffer ptr."] + #[doc = "* `size` - Size of the savedata buffer."] + #[doc = "* `image_filepos` - Filepos to use for writing the data to the NAND savedata file."] + #[doc = "* `section_type` - "] + #[doc = "* `operation` - "] + #[doc = ""] pub fn AMPXI_WriteTWLSavedata( titleid: u64_, buffer: *mut u8_, @@ -11319,15 +11231,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Finalizes title installation. "] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Mediatype of the titles to finalize."] -#[doc = "`db` - Which title database to use."] -#[doc = "`size` - Size of the savedata buffer."] -#[doc = "`titlecount` - Total titles."] -#[doc = "`tidlist` - List of titleIDs."] -#[doc = ""] - + #[doc = "Finalizes title installation. "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Mediatype of the titles to finalize."] + #[doc = "* `db` - Which title database to use."] + #[doc = "* `size` - Size of the savedata buffer."] + #[doc = "* `titlecount` - Total titles."] + #[doc = "* `tidlist` - List of titleIDs."] + #[doc = ""] pub fn AMPXI_InstallTitlesFinish( mediaType: FS_MediaType, db: u8_, @@ -11339,143 +11252,116 @@ pub const APPID_NONE: NS_APPID = 0; #[doc = "Home Menu"] #[doc = ""] - pub const APPID_HOMEMENU: NS_APPID = 257; #[doc = "Camera applet"] #[doc = ""] - pub const APPID_CAMERA: NS_APPID = 272; #[doc = "Friends List applet"] #[doc = ""] - pub const APPID_FRIENDS_LIST: NS_APPID = 274; #[doc = "Game Notes applet"] #[doc = ""] - pub const APPID_GAME_NOTES: NS_APPID = 275; #[doc = "Internet Browser"] #[doc = ""] - pub const APPID_WEB: NS_APPID = 276; #[doc = "Instruction Manual applet"] #[doc = ""] - pub const APPID_INSTRUCTION_MANUAL: NS_APPID = 277; #[doc = "Notifications applet"] #[doc = ""] - pub const APPID_NOTIFICATIONS: NS_APPID = 278; #[doc = "Miiverse applet (olv)"] #[doc = ""] - pub const APPID_MIIVERSE: NS_APPID = 279; #[doc = "Miiverse posting applet (solv3)"] #[doc = ""] - pub const APPID_MIIVERSE_POSTING: NS_APPID = 280; #[doc = "Amiibo settings applet (cabinet)"] #[doc = ""] - pub const APPID_AMIIBO_SETTINGS: NS_APPID = 281; #[doc = "Application"] #[doc = ""] - pub const APPID_APPLICATION: NS_APPID = 768; #[doc = "eShop (tiger)"] #[doc = ""] - pub const APPID_ESHOP: NS_APPID = 769; #[doc = "Software Keyboard"] #[doc = ""] - pub const APPID_SOFTWARE_KEYBOARD: NS_APPID = 1025; #[doc = "appletEd"] #[doc = ""] - pub const APPID_APPLETED: NS_APPID = 1026; #[doc = "PNOTE_AP"] #[doc = ""] - pub const APPID_PNOTE_AP: NS_APPID = 1028; #[doc = "SNOTE_AP"] #[doc = ""] - pub const APPID_SNOTE_AP: NS_APPID = 1029; #[doc = "error"] #[doc = ""] - pub const APPID_ERROR: NS_APPID = 1030; #[doc = "mint"] #[doc = ""] - pub const APPID_MINT: NS_APPID = 1031; #[doc = "extrapad"] #[doc = ""] - pub const APPID_EXTRAPAD: NS_APPID = 1032; #[doc = "memolib"] #[doc = ""] - pub const APPID_MEMOLIB: NS_APPID = 1033; #[doc = "NS Application IDs."] +#[doc = ""] #[doc = "Retrieved from "] #[doc = ""] - pub type NS_APPID = ::libc::c_uint; #[doc = "No position specified."] #[doc = ""] - pub const APTPOS_NONE: APT_AppletPos = -1; #[doc = "Application."] #[doc = ""] - pub const APTPOS_APP: APT_AppletPos = 0; #[doc = "Application library (?)."] #[doc = ""] - pub const APTPOS_APPLIB: APT_AppletPos = 1; #[doc = "System applet."] #[doc = ""] - pub const APTPOS_SYS: APT_AppletPos = 2; #[doc = "System library (?)."] #[doc = ""] - pub const APTPOS_SYSLIB: APT_AppletPos = 3; #[doc = "Resident applet."] #[doc = ""] - pub const APTPOS_RESIDENT: APT_AppletPos = 4; #[doc = "APT applet position."] #[doc = ""] - pub type APT_AppletPos = ::libc::c_int; pub type APT_AppletAttr = u8_; pub const APTREPLY_REJECT: APT_QueryReply = 0; @@ -11484,171 +11370,137 @@ pub const APTREPLY_LATER: APT_QueryReply = 2; #[doc = "APT query reply."] #[doc = ""] - pub type APT_QueryReply = ::libc::c_uint; #[doc = "No signal received."] #[doc = ""] - pub const APTSIGNAL_NONE: APT_Signal = 0; #[doc = "HOME button pressed."] #[doc = ""] - pub const APTSIGNAL_HOMEBUTTON: APT_Signal = 1; #[doc = "HOME button pressed (again?)."] #[doc = ""] - pub const APTSIGNAL_HOMEBUTTON2: APT_Signal = 2; #[doc = "Prepare to enter sleep mode."] #[doc = ""] - pub const APTSIGNAL_SLEEP_QUERY: APT_Signal = 3; #[doc = "Triggered when ptm:s GetShellStatus() returns 5."] #[doc = ""] - pub const APTSIGNAL_SLEEP_CANCEL: APT_Signal = 4; #[doc = "Enter sleep mode."] #[doc = ""] - pub const APTSIGNAL_SLEEP_ENTER: APT_Signal = 5; #[doc = "Wake from sleep mode."] #[doc = ""] - pub const APTSIGNAL_SLEEP_WAKEUP: APT_Signal = 6; #[doc = "Shutdown."] #[doc = ""] - pub const APTSIGNAL_SHUTDOWN: APT_Signal = 7; #[doc = "POWER button pressed."] #[doc = ""] - pub const APTSIGNAL_POWERBUTTON: APT_Signal = 8; #[doc = "POWER button cleared (?)."] #[doc = ""] - pub const APTSIGNAL_POWERBUTTON2: APT_Signal = 9; #[doc = "System sleeping (?)."] #[doc = ""] - pub const APTSIGNAL_TRY_SLEEP: APT_Signal = 10; #[doc = "Order to close (such as when an error happens?)."] #[doc = ""] - pub const APTSIGNAL_ORDERTOCLOSE: APT_Signal = 11; #[doc = "APT signals."] #[doc = ""] - pub type APT_Signal = ::libc::c_uint; #[doc = "No command received."] #[doc = ""] - pub const APTCMD_NONE: APT_Command = 0; #[doc = "Applet should wake up."] #[doc = ""] - pub const APTCMD_WAKEUP: APT_Command = 1; #[doc = "Source applet sent us a parameter."] #[doc = ""] - pub const APTCMD_REQUEST: APT_Command = 2; #[doc = "Target applet replied to our parameter."] #[doc = ""] - pub const APTCMD_RESPONSE: APT_Command = 3; #[doc = "Exit (??)"] #[doc = ""] - pub const APTCMD_EXIT: APT_Command = 4; #[doc = "Message (??)"] #[doc = ""] - pub const APTCMD_MESSAGE: APT_Command = 5; #[doc = "HOME button pressed once."] #[doc = ""] - pub const APTCMD_HOMEBUTTON_ONCE: APT_Command = 6; #[doc = "HOME button pressed twice (double-pressed)."] #[doc = ""] - pub const APTCMD_HOMEBUTTON_TWICE: APT_Command = 7; #[doc = "DSP should sleep (manual DSP rights related?)."] #[doc = ""] - pub const APTCMD_DSP_SLEEP: APT_Command = 8; #[doc = "DSP should wake up (manual DSP rights related?)."] #[doc = ""] - pub const APTCMD_DSP_WAKEUP: APT_Command = 9; #[doc = "Applet wakes up due to a different applet exiting."] #[doc = ""] - pub const APTCMD_WAKEUP_EXIT: APT_Command = 10; #[doc = "Applet wakes up after being paused through HOME menu."] #[doc = ""] - pub const APTCMD_WAKEUP_PAUSE: APT_Command = 11; #[doc = "Applet wakes up due to being cancelled."] #[doc = ""] - pub const APTCMD_WAKEUP_CANCEL: APT_Command = 12; #[doc = "Applet wakes up due to all applets being cancelled."] #[doc = ""] - pub const APTCMD_WAKEUP_CANCELALL: APT_Command = 13; #[doc = "Applet wakes up due to POWER button being pressed (?)."] #[doc = ""] - pub const APTCMD_WAKEUP_POWERBUTTON: APT_Command = 14; #[doc = "Applet wakes up and is instructed to jump to HOME menu (?)."] #[doc = ""] - pub const APTCMD_WAKEUP_JUMPTOHOME: APT_Command = 15; #[doc = "Request for sysapplet (?)."] #[doc = ""] - pub const APTCMD_SYSAPPLET_REQUEST: APT_Command = 16; #[doc = "Applet wakes up and is instructed to launch another applet (?)."] #[doc = ""] - pub const APTCMD_WAKEUP_LAUNCHAPP: APT_Command = 17; #[doc = "APT commands."] #[doc = ""] - pub type APT_Command = ::libc::c_uint; #[doc = "APT capture buffer information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct aptCaptureBufInfo { @@ -11667,61 +11519,49 @@ pub struct aptCaptureBufInfo__bindgen_ty_1 { #[doc = "App suspended."] #[doc = ""] - pub const APTHOOK_ONSUSPEND: APT_HookType = 0; #[doc = "App restored."] #[doc = ""] - pub const APTHOOK_ONRESTORE: APT_HookType = 1; #[doc = "App sleeping."] #[doc = ""] - pub const APTHOOK_ONSLEEP: APT_HookType = 2; #[doc = "App waking up."] #[doc = ""] - pub const APTHOOK_ONWAKEUP: APT_HookType = 3; #[doc = "App exiting."] #[doc = ""] - pub const APTHOOK_ONEXIT: APT_HookType = 4; #[doc = "Number of APT hook types."] #[doc = ""] - pub const APTHOOK_COUNT: APT_HookType = 5; #[doc = "APT hook types."] #[doc = ""] - pub type APT_HookType = ::libc::c_uint; #[doc = "APT hook function."] #[doc = ""] - pub type aptHookFn = ::core::option::Option; #[doc = "APT hook cookie."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_aptHookCookie { -#[doc = "Next cookie."] -#[doc = ""] - + #[doc = "Next cookie."] + #[doc = ""] pub next: *mut tag_aptHookCookie, -#[doc = "Hook callback."] -#[doc = ""] - + #[doc = "Hook callback."] + #[doc = ""] pub callback: aptHookFn, -#[doc = "Callback parameter."] -#[doc = ""] - + #[doc = "Callback parameter."] + #[doc = ""] pub param: *mut ::libc::c_void, } impl Default for tag_aptHookCookie { @@ -11736,12 +11576,10 @@ impl Default for tag_aptHookCookie { #[doc = "APT hook cookie."] #[doc = ""] - pub type aptHookCookie = tag_aptHookCookie; #[doc = "APT message callback."] #[doc = ""] - pub type aptMessageCb = ::core::option::Option< unsafe extern "C" fn( user: *mut ::libc::c_void, @@ -11752,130 +11590,124 @@ pub type aptMessageCb = ::core::option::Option< >; extern "C" { #[must_use] -#[doc = "Initializes APT."] -#[doc = ""] - + #[doc = "Initializes APT."] + #[doc = ""] pub fn aptInit() -> Result; } extern "C" { -#[doc = "Exits APT."] -#[doc = ""] - + #[doc = "Exits APT."] + #[doc = ""] pub fn aptExit(); } extern "C" { #[must_use] -#[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] -#[doc = "# Arguments"] -#[doc = "`aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] -#[doc = ""] - + #[doc = "Sends an APT command through IPC, taking care of locking, opening and closing an APT session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `aptcmdbuf` - Pointer to command buffer (should have capacity for at least 16 words)."] + #[doc = ""] pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result; } extern "C" { -#[doc = "Returns true if the application is currently in the foreground."] -#[doc = ""] - + #[doc = "Returns true if the application is currently in the foreground."] + #[doc = ""] pub fn aptIsActive() -> bool; } extern "C" { -#[doc = "Returns true if the system has told the application to close."] -#[doc = ""] - + #[doc = "Returns true if the system has told the application to close."] + #[doc = ""] pub fn aptShouldClose() -> bool; } extern "C" { -#[doc = "Returns true if the system can enter sleep mode while the application is active."] -#[doc = ""] - + #[doc = "Returns true if the system can enter sleep mode while the application is active."] + #[doc = ""] pub fn aptIsSleepAllowed() -> bool; } extern "C" { -#[doc = "Configures whether the system can enter sleep mode while the application is active."] -#[doc = ""] - + #[doc = "Configures whether the system can enter sleep mode while the application is active."] + #[doc = ""] pub fn aptSetSleepAllowed(allowed: bool); } extern "C" { -#[doc = "Handles incoming sleep mode requests."] -#[doc = ""] - + #[doc = "Handles incoming sleep mode requests."] + #[doc = ""] pub fn aptHandleSleep(); } extern "C" { -#[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] -#[doc = ""] - + #[doc = "Returns true if the user can press the HOME button to jump back to the HOME menu while the application is active."] + #[doc = ""] pub fn aptIsHomeAllowed() -> bool; } extern "C" { -#[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] -#[doc = ""] - + #[doc = "Configures whether the user can press the HOME button to jump back to the HOME menu while the application is active."] + #[doc = ""] pub fn aptSetHomeAllowed(allowed: bool); } extern "C" { -#[doc = "Returns true if the system requires the application to jump back to the HOME menu."] -#[doc = ""] - + #[doc = "Returns true if the system requires the application to jump back to the HOME menu."] + #[doc = ""] pub fn aptShouldJumpToHome() -> bool; } extern "C" { -#[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by [`aptSetHomeAllowed`] (use this to show a \"no HOME allowed\" icon)."] -#[doc = ""] - + #[doc = "Returns true if there is an incoming HOME button press rejected by the policy set by [`aptSetHomeAllowed`] (use this to show a \"no HOME allowed\" icon)."] + #[doc = ""] pub fn aptCheckHomePressRejected() -> bool; } extern "C" { -#[doc = "Jumps back to the HOME menu."] -#[doc = ""] - + #[doc = "Jumps back to the HOME menu."] + #[doc = ""] pub fn aptJumpToHomeMenu(); } extern "C" { -#[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] -#[doc = "Returns:"] -#[doc = "true if the application should keep running, false otherwise (see [`aptShouldClose)`]"] -#[doc = ""] - + #[doc = "Main function which handles sleep mode and HOME/power buttons - call this at the beginning of every frame."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* true if the application should keep running, false otherwise (see [`aptShouldClose)`]"] + #[doc = ""] pub fn aptMainLoop() -> bool; } extern "C" { -#[doc = "Sets up an APT status hook."] -#[doc = "# Arguments"] -#[doc = "`cookie` - Hook cookie to use."] -#[doc = "`callback` - Function to call when APT's status changes."] -#[doc = "`param` - User-defined parameter to pass to the callback."] -#[doc = ""] - + #[doc = "Sets up an APT status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to use."] + #[doc = "* `callback` - Function to call when APT's status changes."] + #[doc = "* `param` - User-defined parameter to pass to the callback."] + #[doc = ""] pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut ::libc::c_void); } extern "C" { -#[doc = "Removes an APT status hook."] -#[doc = "# Arguments"] -#[doc = "`cookie` - Hook cookie to remove."] -#[doc = ""] - + #[doc = "Removes an APT status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to remove."] + #[doc = ""] pub fn aptUnhook(cookie: *mut aptHookCookie); } extern "C" { -#[doc = "Sets the function to be called when an APT message from another applet is received."] -#[doc = "# Arguments"] -#[doc = "`callback` - Callback function."] -#[doc = "`user` - User-defined data to be passed to the callback."] -#[doc = ""] - + #[doc = "Sets the function to be called when an APT message from another applet is received."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `callback` - Callback function."] + #[doc = "* `user` - User-defined data to be passed to the callback."] + #[doc = ""] pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut ::libc::c_void); } extern "C" { -#[doc = "Launches a library applet."] -#[doc = "# Arguments"] -#[doc = "`appId` - ID of the applet to launch."] -#[doc = "`buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] -#[doc = "`bufsize` - Size of the buffer."] -#[doc = "`handle` - Handle to pass to the library applet."] -#[doc = ""] - + #[doc = "Launches a library applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appId` - ID of the applet to launch."] + #[doc = "* `buf` - Input/output buffer that contains launch parameters on entry and result data on exit."] + #[doc = "* `bufsize` - Size of the buffer."] + #[doc = "* `handle` - Handle to pass to the library applet."] + #[doc = ""] pub fn aptLaunchLibraryApplet( appId: NS_APPID, buf: *mut ::libc::c_void, @@ -11884,46 +11716,47 @@ extern "C" { ); } extern "C" { -#[doc = "Clears the chainloader state."] -#[doc = ""] - + #[doc = "Clears the chainloader state."] + #[doc = ""] pub fn aptClearChainloader(); } extern "C" { -#[doc = "Configures the chainloader to launch a specific application."] -#[doc = "# Arguments"] -#[doc = "`programID` - ID of the program to chainload to."] -#[doc = "`mediatype` - Media type of the program to chainload to."] -#[doc = ""] - + #[doc = "Configures the chainloader to launch a specific application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programID` - ID of the program to chainload to."] + #[doc = "* `mediatype` - Media type of the program to chainload to."] + #[doc = ""] pub fn aptSetChainloader(programID: u64_, mediatype: u8_); } extern "C" { -#[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] -#[doc = ""] - + #[doc = "Configures the chainloader to relaunch the current application (i.e. soft-reset)"] + #[doc = ""] pub fn aptSetChainloaderToSelf(); } extern "C" { #[must_use] -#[doc = "Gets an APT lock handle."] -#[doc = "# Arguments"] -#[doc = "`flags` - Flags to use."] -#[doc = "`lockHandle` - Pointer to output the lock handle to."] -#[doc = ""] - + #[doc = "Gets an APT lock handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to use."] + #[doc = "* `lockHandle` - Pointer to output the lock handle to."] + #[doc = ""] pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes an application's registration with APT."] -#[doc = "# Arguments"] -#[doc = "`appId` - ID of the application."] -#[doc = "`attr` - Attributes of the application."] -#[doc = "`signalEvent` - Pointer to output the signal event handle to."] -#[doc = "`resumeEvent` - Pointer to output the resume event handle to."] -#[doc = ""] - + #[doc = "Initializes an application's registration with APT."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appId` - ID of the application."] + #[doc = "* `attr` - Attributes of the application."] + #[doc = "* `signalEvent` - Pointer to output the signal event handle to."] + #[doc = "* `resumeEvent` - Pointer to output the resume event handle to."] + #[doc = ""] pub fn APT_Initialize( appId: NS_APPID, attr: APT_AppletAttr, @@ -11933,40 +11766,42 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Terminates an application's registration with APT."] -#[doc = "# Arguments"] -#[doc = "`appID` - ID of the application."] -#[doc = ""] - + #[doc = "Terminates an application's registration with APT."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = ""] pub fn APT_Finalize(appId: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Asynchronously resets the hardware."] -#[doc = ""] - + #[doc = "Asynchronously resets the hardware."] + #[doc = ""] pub fn APT_HardwareResetAsync() -> Result; } extern "C" { #[must_use] -#[doc = "Enables APT."] -#[doc = "# Arguments"] -#[doc = "`attr` - Attributes of the application."] -#[doc = ""] - + #[doc = "Enables APT."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `attr` - Attributes of the application."] + #[doc = ""] pub fn APT_Enable(attr: APT_AppletAttr) -> Result; } extern "C" { #[must_use] -#[doc = "Gets applet management info."] -#[doc = "# Arguments"] -#[doc = "`inpos` - Requested applet position."] -#[doc = "`outpos` - Pointer to output the position of the current applet to."] -#[doc = "`req_appid` - Pointer to output the AppID of the applet at the requested position to."] -#[doc = "`menu_appid` - Pointer to output the HOME menu AppID to."] -#[doc = "`active_appid` - Pointer to output the AppID of the currently active applet to."] -#[doc = ""] - + #[doc = "Gets applet management info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inpos` - Requested applet position."] + #[doc = "* `outpos` - Pointer to output the position of the current applet to."] + #[doc = "* `req_appid` - Pointer to output the AppID of the applet at the requested position to."] + #[doc = "* `menu_appid` - Pointer to output the HOME menu AppID to."] + #[doc = "* `active_appid` - Pointer to output the AppID of the currently active applet to."] + #[doc = ""] pub fn APT_GetAppletManInfo( inpos: APT_AppletPos, outpos: *mut APT_AppletPos, @@ -11977,16 +11812,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an applet's information."] -#[doc = "# Arguments"] -#[doc = "`appID` - AppID of the applet."] -#[doc = "`pProgramID` - Pointer to output the program ID to."] -#[doc = "`pMediaType` - Pointer to output the media type to."] -#[doc = "`pRegistered` - Pointer to output the registration status to."] -#[doc = "`pLoadState` - Pointer to output the load state to."] -#[doc = "`pAttributes` - Pointer to output the applet atrributes to."] -#[doc = ""] - + #[doc = "Gets an applet's information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet."] + #[doc = "* `pProgramID` - Pointer to output the program ID to."] + #[doc = "* `pMediaType` - Pointer to output the media type to."] + #[doc = "* `pRegistered` - Pointer to output the registration status to."] + #[doc = "* `pLoadState` - Pointer to output the load state to."] + #[doc = "* `pAttributes` - Pointer to output the applet atrributes to."] + #[doc = ""] pub fn APT_GetAppletInfo( appID: NS_APPID, pProgramID: *mut u64_, @@ -11998,47 +11834,50 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an applet's program information."] -#[doc = "Flags:"] -#[doc = "- 0x01: Use AM_ListTitles with NAND media type."] -#[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] -#[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] -#[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] -#[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] -#[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the applet."] -#[doc = "`flags` - Flags to use when retreiving the information."] -#[doc = "`titleversion` - Pointer to output the applet's title version to."] -#[doc = ""] - + #[doc = "Gets an applet's program information."] + #[doc = ""] + #[doc = "Flags:"] + #[doc = "- 0x01: Use AM_ListTitles with NAND media type."] + #[doc = "- 0x02: Use AM_ListTitles with SDMC media type."] + #[doc = "- 0x04: Use AM_ListTitles with GAMECARD media type."] + #[doc = "- 0x10: Input ID is an app ID. Must be set if 0x20 is not."] + #[doc = "- 0x20: Input ID is a program ID. Must be set if 0x10 is not."] + #[doc = "- 0x100: Sets program ID high to 0x00040000, else it is 0x00040010. Only used when 0x20 is set."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the applet."] + #[doc = "* `flags` - Flags to use when retreiving the information."] + #[doc = "* `titleversion` - Pointer to output the applet's title version to."] + #[doc = ""] pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current application's program ID."] -#[doc = "# Arguments"] -#[doc = "`pProgramID` - Pointer to output the program ID to."] -#[doc = ""] - + #[doc = "Gets the current application's program ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pProgramID` - Pointer to output the program ID to."] + #[doc = ""] pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares to jump to the home menu."] -#[doc = ""] - + #[doc = "Prepares to jump to the home menu."] + #[doc = ""] pub fn APT_PrepareToJumpToHomeMenu() -> Result; } extern "C" { #[must_use] -#[doc = "Jumps to the home menu."] -#[doc = "# Arguments"] -#[doc = "`param` - Parameters to jump with."] -#[doc = "`Size` - of the parameter buffer."] -#[doc = "`handle` - Handle to pass."] -#[doc = ""] - + #[doc = "Jumps to the home menu."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameters to jump with."] + #[doc = "* `Size` - of the parameter buffer."] + #[doc = "* `handle` - Handle to pass."] + #[doc = ""] pub fn APT_JumpToHomeMenu( param: *const ::libc::c_void, paramSize: size_t, @@ -12047,22 +11886,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Prepares to jump to an application."] -#[doc = "# Arguments"] -#[doc = "`exiting` - Specifies whether the applet is exiting."] -#[doc = ""] - + #[doc = "Prepares to jump to an application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exiting` - Specifies whether the applet is exiting."] + #[doc = ""] pub fn APT_PrepareToJumpToApplication(exiting: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Jumps to an application."] -#[doc = "# Arguments"] -#[doc = "`param` - Parameters to jump with."] -#[doc = "`Size` - of the parameter buffer."] -#[doc = "`handle` - Handle to pass."] -#[doc = ""] - + #[doc = "Jumps to an application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameters to jump with."] + #[doc = "* `Size` - of the parameter buffer."] + #[doc = "* `handle` - Handle to pass."] + #[doc = ""] pub fn APT_JumpToApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -12071,54 +11912,60 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets whether an application is registered."] -#[doc = "# Arguments"] -#[doc = "`appID` - ID of the application."] -#[doc = "`out` - Pointer to output the registration state to."] -#[doc = ""] - + #[doc = "Gets whether an application is registered."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = "* `out` - Pointer to output the registration state to."] + #[doc = ""] pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Inquires as to whether a signal has been received."] -#[doc = "# Arguments"] -#[doc = "`appID` - ID of the application."] -#[doc = "`signalType` - Pointer to output the signal type to."] -#[doc = ""] - + #[doc = "Inquires as to whether a signal has been received."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = "* `signalType` - Pointer to output the signal type to."] + #[doc = ""] pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result; } extern "C" { #[must_use] -#[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] -#[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] -#[doc = "# Arguments"] -#[doc = "`wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] -#[doc = ""] - + #[doc = "Requests to enter sleep mode, and later sets wake events if allowed to."] + #[doc = ""] + #[doc = "and \"shell opened\", \"shell closed\" and \"HOME button pressed\" for the MCU interrupts part."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `wakeEvents` - The wake events. Limited to \"shell\" (bit 1) for the PDN wake events part"] + #[doc = ""] pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result; } extern "C" { #[must_use] -#[doc = "Notifies an application to wait."] -#[doc = "# Arguments"] -#[doc = "`appID` - ID of the application."] -#[doc = ""] - + #[doc = "Notifies an application to wait."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = ""] pub fn APT_NotifyToWait(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Calls an applet utility function."] -#[doc = "# Arguments"] -#[doc = "`id` - Utility function to call."] -#[doc = "`out` - Pointer to write output data to."] -#[doc = "`outSize` - Size of the output buffer."] -#[doc = "`in` - Pointer to the input data."] -#[doc = "`inSize` - Size of the input buffer."] -#[doc = ""] - + #[doc = "Calls an applet utility function."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - Utility function to call."] + #[doc = "* `out` - Pointer to write output data to."] + #[doc = "* `outSize` - Size of the output buffer."] + #[doc = "* `in` - Pointer to the input data."] + #[doc = "* `inSize` - Size of the input buffer."] + #[doc = ""] pub fn APT_AppletUtility( id: ::libc::c_int, out: *mut ::libc::c_void, @@ -12129,53 +11976,56 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sleeps if shell is closed (?)."] -#[doc = ""] - + #[doc = "Sleeps if shell is closed (?)."] + #[doc = ""] pub fn APT_SleepIfShellClosed() -> Result; } extern "C" { #[must_use] -#[doc = "Locks a transition (?)."] -#[doc = "# Arguments"] -#[doc = "`transition` - Transition ID."] -#[doc = "`flag` - Flag (?)"] -#[doc = ""] - + #[doc = "Locks a transition (?)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transition` - Transition ID."] + #[doc = "* `flag` - Flag (?)"] + #[doc = ""] pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Tries to lock a transition (?)."] -#[doc = "# Arguments"] -#[doc = "`transition` - Transition ID."] -#[doc = "`succeeded` - Pointer to output whether the lock was successfully applied."] -#[doc = ""] - + #[doc = "Tries to lock a transition (?)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transition` - Transition ID."] + #[doc = "* `succeeded` - Pointer to output whether the lock was successfully applied."] + #[doc = ""] pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Unlocks a transition (?)."] -#[doc = "# Arguments"] -#[doc = "`transition` - Transition ID."] -#[doc = ""] - + #[doc = "Unlocks a transition (?)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transition` - Transition ID."] + #[doc = ""] pub fn APT_UnlockTransition(transition: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Glances at a receieved parameter without removing it from the queue."] -#[doc = "# Arguments"] -#[doc = "`appID` - AppID of the application."] -#[doc = "`buffer` - Buffer to receive to."] -#[doc = "`bufferSize` - Size of the buffer."] -#[doc = "`sender` - Pointer to output the sender's AppID to."] -#[doc = "`command` - Pointer to output the command ID to."] -#[doc = "`actualSize` - Pointer to output the actual received data size to."] -#[doc = "`parameter` - Pointer to output the parameter handle to."] -#[doc = ""] - + #[doc = "Glances at a receieved parameter without removing it from the queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the application."] + #[doc = "* `buffer` - Buffer to receive to."] + #[doc = "* `bufferSize` - Size of the buffer."] + #[doc = "* `sender` - Pointer to output the sender's AppID to."] + #[doc = "* `command` - Pointer to output the command ID to."] + #[doc = "* `actualSize` - Pointer to output the actual received data size to."] + #[doc = "* `parameter` - Pointer to output the parameter handle to."] + #[doc = ""] pub fn APT_GlanceParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -12188,17 +12038,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Receives a parameter."] -#[doc = "# Arguments"] -#[doc = "`appID` - AppID of the application."] -#[doc = "`buffer` - Buffer to receive to."] -#[doc = "`bufferSize` - Size of the buffer."] -#[doc = "`sender` - Pointer to output the sender's AppID to."] -#[doc = "`command` - Pointer to output the command ID to."] -#[doc = "`actualSize` - Pointer to output the actual received data size to."] -#[doc = "`parameter` - Pointer to output the parameter handle to."] -#[doc = ""] - + #[doc = "Receives a parameter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the application."] + #[doc = "* `buffer` - Buffer to receive to."] + #[doc = "* `bufferSize` - Size of the buffer."] + #[doc = "* `sender` - Pointer to output the sender's AppID to."] + #[doc = "* `command` - Pointer to output the command ID to."] + #[doc = "* `actualSize` - Pointer to output the actual received data size to."] + #[doc = "* `parameter` - Pointer to output the parameter handle to."] + #[doc = ""] pub fn APT_ReceiveParameter( appID: NS_APPID, buffer: *mut ::libc::c_void, @@ -12211,16 +12062,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends a parameter."] -#[doc = "# Arguments"] -#[doc = "`source` - AppID of the source application."] -#[doc = "`dest` - AppID of the destination application."] -#[doc = "`command` - Command to send."] -#[doc = "`buffer` - Buffer to send."] -#[doc = "`bufferSize` - Size of the buffer."] -#[doc = "`parameter` - Parameter handle to pass."] -#[doc = ""] - + #[doc = "Sends a parameter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `source` - AppID of the source application."] + #[doc = "* `dest` - AppID of the destination application."] + #[doc = "* `command` - Command to send."] + #[doc = "* `buffer` - Buffer to send."] + #[doc = "* `bufferSize` - Size of the buffer."] + #[doc = "* `parameter` - Parameter handle to pass."] + #[doc = ""] pub fn APT_SendParameter( source: NS_APPID, dest: NS_APPID, @@ -12232,61 +12084,67 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] -#[doc = "# Arguments"] -#[doc = "`source` - AppID of the source application (use APPID_NONE to disable the check)."] -#[doc = "`dest` - AppID of the destination application (use APPID_NONE to disable the check)."] -#[doc = "`success` - Pointer to output true if a parameter was cancelled, or false otherwise."] -#[doc = ""] - + #[doc = "Cancels a parameter which matches the specified source and dest AppIDs."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `source` - AppID of the source application (use APPID_NONE to disable the check)."] + #[doc = "* `dest` - AppID of the destination application (use APPID_NONE to disable the check)."] + #[doc = "* `success` - Pointer to output true if a parameter was cancelled, or false otherwise."] + #[doc = ""] pub fn APT_CancelParameter(source: NS_APPID, dest: NS_APPID, success: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sends capture buffer information."] -#[doc = "# Arguments"] -#[doc = "`captureBuf` - Capture buffer information to send."] -#[doc = ""] - + #[doc = "Sends capture buffer information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `captureBuf` - Capture buffer information to send."] + #[doc = ""] pub fn APT_SendCaptureBufferInfo(captureBuf: *const aptCaptureBufInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Replies to a sleep query."] -#[doc = "# Arguments"] -#[doc = "`appID` - ID of the application."] -#[doc = "`reply` - Query reply value."] -#[doc = ""] - + #[doc = "Replies to a sleep query."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = "* `reply` - Query reply value."] + #[doc = ""] pub fn APT_ReplySleepQuery(appID: NS_APPID, reply: APT_QueryReply) -> Result; } extern "C" { #[must_use] -#[doc = "Replies that a sleep notification has been completed."] -#[doc = "# Arguments"] -#[doc = "`appID` - ID of the application."] -#[doc = ""] - + #[doc = "Replies that a sleep notification has been completed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - ID of the application."] + #[doc = ""] pub fn APT_ReplySleepNotificationComplete(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares to close the application."] -#[doc = "# Arguments"] -#[doc = "`cancelPreload` - Whether applet preloads should be cancelled."] -#[doc = ""] - + #[doc = "Prepares to close the application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cancelPreload` - Whether applet preloads should be cancelled."] + #[doc = ""] pub fn APT_PrepareToCloseApplication(cancelPreload: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Closes the application."] -#[doc = "# Arguments"] -#[doc = "`param` - Parameters to close with."] -#[doc = "`paramSize` - Size of param."] -#[doc = "`handle` - Handle to pass."] -#[doc = ""] - + #[doc = "Closes the application."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameters to close with."] + #[doc = "* `paramSize` - Size of param."] + #[doc = "* `handle` - Handle to pass."] + #[doc = ""] pub fn APT_CloseApplication( param: *const ::libc::c_void, paramSize: size_t, @@ -12295,51 +12153,56 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the application's CPU time limit."] -#[doc = "# Arguments"] -#[doc = "`percent` - CPU time limit percentage to set."] -#[doc = ""] - + #[doc = "Sets the application's CPU time limit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `percent` - CPU time limit percentage to set."] + #[doc = ""] pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the application's CPU time limit."] -#[doc = "# Arguments"] -#[doc = "`percent` - Pointer to output the CPU time limit percentage to."] -#[doc = ""] - + #[doc = "Gets the application's CPU time limit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `percent` - Pointer to output the CPU time limit percentage to."] + #[doc = ""] pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks whether the system is a New 3DS."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the New 3DS flag to."] -#[doc = ""] - + #[doc = "Checks whether the system is a New 3DS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the New 3DS flag to."] + #[doc = ""] pub fn APT_CheckNew3DS(out: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Prepares for an applicaton jump."] -#[doc = "# Arguments"] -#[doc = "`flags` - Flags to use."] -#[doc = "`programID` - ID of the program to jump to."] -#[doc = "`mediatype` - Media type of the program to jump to."] -#[doc = ""] - + #[doc = "Prepares for an applicaton jump."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to use."] + #[doc = "* `programID` - ID of the program to jump to."] + #[doc = "* `mediatype` - Media type of the program to jump to."] + #[doc = ""] pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Performs an application jump."] -#[doc = "# Arguments"] -#[doc = "`param` - Parameter buffer."] -#[doc = "`paramSize` - Size of parameter buffer."] -#[doc = "`hmac` - HMAC buffer (should be 0x20 bytes long)."] -#[doc = ""] - + #[doc = "Performs an application jump."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameter buffer."] + #[doc = "* `paramSize` - Size of parameter buffer."] + #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] + #[doc = ""] pub fn APT_DoApplicationJump( param: *const ::libc::c_void, paramSize: size_t, @@ -12348,23 +12211,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Prepares to start a library applet."] -#[doc = "# Arguments"] -#[doc = "`appID` - AppID of the applet to start."] -#[doc = ""] - + #[doc = "Prepares to start a library applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to start."] + #[doc = ""] pub fn APT_PrepareToStartLibraryApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Starts a library applet."] -#[doc = "# Arguments"] -#[doc = "`appID` - AppID of the applet to launch."] -#[doc = "`param` - Buffer containing applet parameters."] -#[doc = "`paramsize` - Size of the buffer."] -#[doc = "`handle` - Handle to pass to the applet."] -#[doc = ""] - + #[doc = "Starts a library applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to launch."] + #[doc = "* `param` - Buffer containing applet parameters."] + #[doc = "* `paramsize` - Size of the buffer."] + #[doc = "* `handle` - Handle to pass to the applet."] + #[doc = ""] pub fn APT_StartLibraryApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -12374,23 +12239,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Prepares to start a system applet."] -#[doc = "# Arguments"] -#[doc = "`appID` - AppID of the applet to start."] -#[doc = ""] - + #[doc = "Prepares to start a system applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to start."] + #[doc = ""] pub fn APT_PrepareToStartSystemApplet(appID: NS_APPID) -> Result; } extern "C" { #[must_use] -#[doc = "Starts a system applet."] -#[doc = "# Arguments"] -#[doc = "`appID` - AppID of the applet to launch."] -#[doc = "`param` - Buffer containing applet parameters."] -#[doc = "`paramSize` - Size of the parameter buffer."] -#[doc = "`handle` - Handle to pass to the applet."] -#[doc = ""] - + #[doc = "Starts a system applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appID` - AppID of the applet to launch."] + #[doc = "* `param` - Buffer containing applet parameters."] + #[doc = "* `paramSize` - Size of the parameter buffer."] + #[doc = "* `handle` - Handle to pass to the applet."] + #[doc = ""] pub fn APT_StartSystemApplet( appID: NS_APPID, param: *const ::libc::c_void, @@ -12400,22 +12267,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] -#[doc = ""] - + #[doc = "mapAddr Pointer to write the mapping address of the system font memory block to."] + #[doc = ""] pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Receives the deliver (launch) argument"] -#[doc = "# Arguments"] -#[doc = "`param` - Parameter buffer."] -#[doc = "`paramSize` - Size of parameter buffer."] -#[doc = "`hmac` - HMAC buffer (should be 0x20 bytes long)."] -#[doc = "`sender` - Pointer to output the sender's AppID to."] -#[doc = "`received` - Pointer to output whether an argument was received to."] -#[doc = ""] - + #[doc = "Receives the deliver (launch) argument"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `param` - Parameter buffer."] + #[doc = "* `paramSize` - Size of parameter buffer."] + #[doc = "* `hmac` - HMAC buffer (should be 0x20 bytes long)."] + #[doc = "* `sender` - Pointer to output the sender's AppID to."] + #[doc = "* `received` - Pointer to output whether an argument was received to."] + #[doc = ""] pub fn APT_ReceiveDeliverArg( param: *const ::libc::c_void, paramSize: size_t, @@ -12426,7 +12293,6 @@ extern "C" { } #[doc = "BOSS context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bossContext { @@ -12463,110 +12329,111 @@ pub const BOSSTASKSTATUS_ERROR: bossTaskStatus = 7; #[doc = "BOSS task status."] #[doc = ""] - pub type bossTaskStatus = ::libc::c_uint; pub const bossNsDataHeaderInfoType_ContentSize: bossNsDataHeaderInfoTypes = 3; #[doc = "Type values for bossGetNsDataHeaderInfo()."] #[doc = ""] - pub type bossNsDataHeaderInfoTypes = ::libc::c_uint; pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSizes = 4; #[doc = "Size of the output data for bossGetNsDataHeaderInfo()."] #[doc = ""] - pub type bossNsDataHeaderInfoTypeSizes = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes BOSS."] -#[doc = "# Arguments"] -#[doc = "`programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] -#[doc = "`force_user` - When true, just use bossU instead of trying to initialize with bossP first."] -#[doc = ""] - + #[doc = "Initializes BOSS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programID` - programID to use, 0 for the current process. Only used when BOSSP is available without *hax payload."] + #[doc = "* `force_user` - When true, just use bossU instead of trying to initialize with bossP first."] + #[doc = ""] pub fn bossInit(programID: u64_, force_user: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] -#[doc = "# Arguments"] -#[doc = "`programID` - programID to use, 0 for the current process."] -#[doc = ""] - + #[doc = "Run the InitializeSession service cmd. This is mainly for changing the programID associated with the current BOSS session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programID` - programID to use, 0 for the current process."] + #[doc = ""] pub fn bossReinit(programID: u64_) -> Result; } extern "C" { -#[doc = "Exits BOSS."] -#[doc = ""] - + #[doc = "Exits BOSS."] + #[doc = ""] pub fn bossExit(); } extern "C" { -#[doc = "Returns the BOSS session handle."] -#[doc = ""] - + #[doc = "Returns the BOSS session handle."] + #[doc = ""] pub fn bossGetSessionHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Set the content data storage location."] -#[doc = "# Arguments"] -#[doc = "`extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] -#[doc = "`boss_size` - Probably the max size in the extdata which BOSS can use."] -#[doc = "`mediaType` - Roughly the same as FS mediatype."] -#[doc = ""] - + #[doc = "Set the content data storage location."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `extdataID` - u64 extdataID, must have the high word set to the shared-extdata value when it's for NAND."] + #[doc = "* `boss_size` - Probably the max size in the extdata which BOSS can use."] + #[doc = "* `mediaType` - Roughly the same as FS mediatype."] + #[doc = ""] pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] -#[doc = ""] - + #[doc = "Unregister the content data storage location, which includes unregistering the BOSS-session programID with BOSS."] + #[doc = ""] pub fn bossUnregisterStorage() -> Result; } extern "C" { #[must_use] -#[doc = "Register a task."] -#[doc = "# Arguments"] -#[doc = "`taskID` - BOSS taskID."] -#[doc = "`unk0` - Unknown, usually zero."] -#[doc = "`unk1` - Unknown, usually zero."] -#[doc = ""] - + #[doc = "Register a task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = "* `unk0` - Unknown, usually zero."] + #[doc = "* `unk1` - Unknown, usually zero."] + #[doc = ""] pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Send a property."] -#[doc = "# Arguments"] -#[doc = "`PropertyID` - PropertyID"] -#[doc = "`buf` - Input buffer data."] -#[doc = "`size` - Buffer size."] -#[doc = ""] - + #[doc = "Send a property."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `PropertyID` - PropertyID"] + #[doc = "* `buf` - Input buffer data."] + #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the content file for the specified NsDataId."] -#[doc = "# Arguments"] -#[doc = "`NsDataId` - NsDataId"] -#[doc = ""] - + #[doc = "Deletes the content file for the specified NsDataId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NsDataId` - NsDataId"] + #[doc = ""] pub fn bossDeleteNsData(NsDataId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets header info for the specified NsDataId."] -#[doc = "# Arguments"] -#[doc = "`NsDataId` - NsDataId"] -#[doc = "`type` - Type of data to load."] -#[doc = "`buffer` - Output buffer."] -#[doc = "`size` - Output buffer size."] -#[doc = ""] - + #[doc = "Gets header info for the specified NsDataId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NsDataId` - NsDataId"] + #[doc = "* `type` - Type of data to load."] + #[doc = "* `buffer` - Output buffer."] + #[doc = "* `size` - Output buffer size."] + #[doc = ""] pub fn bossGetNsDataHeaderInfo( NsDataId: u32_, type_: u8_, @@ -12576,16 +12443,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads data from the content for the specified NsDataId."] -#[doc = "# Arguments"] -#[doc = "`NsDataId` - NsDataId"] -#[doc = "`offset` - Offset in the content."] -#[doc = "`buffer` - Output buffer."] -#[doc = "`size` - Output buffer size."] -#[doc = "`transfer_total` - Optional output actual read size, can be NULL."] -#[doc = "`unk_out` - Optional unknown output, can be NULL."] -#[doc = ""] - + #[doc = "Reads data from the content for the specified NsDataId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NsDataId` - NsDataId"] + #[doc = "* `offset` - Offset in the content."] + #[doc = "* `buffer` - Output buffer."] + #[doc = "* `size` - Output buffer size."] + #[doc = "* `transfer_total` - Optional output actual read size, can be NULL."] + #[doc = "* `unk_out` - Optional unknown output, can be NULL."] + #[doc = ""] pub fn bossReadNsData( NsDataId: u32_, offset: u64_, @@ -12597,43 +12465,47 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Starts a task soon after running this command."] -#[doc = "# Arguments"] -#[doc = "`taskID` - BOSS taskID."] -#[doc = ""] - + #[doc = "Starts a task soon after running this command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = ""] pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Similar to bossStartTaskImmediate?"] -#[doc = "# Arguments"] -#[doc = "`taskID` - BOSS taskID."] -#[doc = ""] - + #[doc = "Similar to bossStartTaskImmediate?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = ""] pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] -#[doc = "# Arguments"] -#[doc = "`taskID` - BOSS taskID."] -#[doc = "`unk` - Unknown, usually zero?"] -#[doc = ""] - + #[doc = "Deletes a task by using CancelTask and UnregisterTask internally."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = "* `unk` - Unknown, usually zero?"] + #[doc = ""] pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns task state."] -#[doc = "# Arguments"] -#[doc = "`taskID` - BOSS taskID."] -#[doc = "`inval` - Unknown, normally 0?"] -#[doc = "`status` - Output status, see bossTaskStatus."] -#[doc = "`out1` - Output field."] -#[doc = "`out2` - Output field."] -#[doc = ""] - + #[doc = "Returns task state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = "* `inval` - Unknown, normally 0?"] + #[doc = "* `status` - Output status, see bossTaskStatus."] + #[doc = "* `out1` - Output field."] + #[doc = "* `out2` - Output field."] + #[doc = ""] pub fn bossGetTaskState( taskID: *const ::libc::c_char, inval: s8, @@ -12644,21 +12516,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This loads the current state of PropertyID 0x0 for the specified task."] -#[doc = "# Arguments"] -#[doc = "`taskID` - BOSS taskID."] -#[doc = ""] - + #[doc = "This loads the current state of PropertyID 0x0 for the specified task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `taskID` - BOSS taskID."] + #[doc = ""] pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result; } extern "C" { -#[doc = "Setup a BOSS context with the default config."] -#[doc = "# Arguments"] -#[doc = "`bossContext` - BOSS context."] -#[doc = "`seconds_interval` - Interval in seconds for running the task automatically."] -#[doc = "`url` - Task URL."] -#[doc = ""] - + #[doc = "Setup a BOSS context with the default config."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bossContext` - BOSS context."] + #[doc = "* `seconds_interval` - Interval in seconds for running the task automatically."] + #[doc = "* `url` - Task URL."] + #[doc = ""] pub fn bossSetupContextDefault( ctx: *mut bossContext, seconds_interval: u32_, @@ -12667,212 +12541,182 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends the config stored in the context. Used before registering a task."] -#[doc = "# Arguments"] -#[doc = "`bossContext` - BOSS context."] -#[doc = ""] - + #[doc = "Sends the config stored in the context. Used before registering a task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bossContext` - BOSS context."] + #[doc = ""] pub fn bossSendContextConfig(ctx: *mut bossContext) -> Result; } #[doc = "8-bit per component, planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P."] #[doc = ""] - pub const INPUT_YUV422_INDIV_8: Y2RU_InputFormat = 0; #[doc = "8-bit per component, planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples).\\n Usually named YUV420P."] #[doc = ""] - pub const INPUT_YUV420_INDIV_8: Y2RU_InputFormat = 1; #[doc = "16-bit per component, planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples).\\n Usually named YUV422P16."] #[doc = ""] - pub const INPUT_YUV422_INDIV_16: Y2RU_InputFormat = 2; #[doc = "16-bit per component, planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples).\\n Usually named YUV420P16."] #[doc = ""] - pub const INPUT_YUV420_INDIV_16: Y2RU_InputFormat = 3; #[doc = "8-bit per component, packed YUV 4:2:2, 16bpp, (Y0 Cb Y1 Cr).\\n Usually named YUYV422."] #[doc = ""] - pub const INPUT_YUV422_BATCH: Y2RU_InputFormat = 4; #[doc = "Input color formats"] +#[doc = ""] #[doc = "For the 16-bit per component formats, bits 15-8 are padding and 7-0 contains the value."] #[doc = ""] - pub type Y2RU_InputFormat = ::libc::c_uint; #[doc = "32-bit RGBA8888. The alpha component is the 8-bit value set by [`Y2RU_SetAlpha`]"] #[doc = ""] - pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0; #[doc = "24-bit RGB888."] #[doc = ""] - pub const OUTPUT_RGB_24: Y2RU_OutputFormat = 1; #[doc = "16-bit RGBA5551. The alpha bit is the 7th bit of the alpha value set by [`Y2RU_SetAlpha`]"] #[doc = ""] - pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2; #[doc = "16-bit RGB565."] #[doc = ""] - pub const OUTPUT_RGB_16_565: Y2RU_OutputFormat = 3; #[doc = "Output color formats"] +#[doc = ""] #[doc = "Those are the same as the framebuffer and GPU texture formats."] #[doc = ""] - pub type Y2RU_OutputFormat = ::libc::c_uint; #[doc = "No rotation."] #[doc = ""] - pub const ROTATION_NONE: Y2RU_Rotation = 0; #[doc = "Clockwise 90 degrees."] #[doc = ""] - pub const ROTATION_CLOCKWISE_90: Y2RU_Rotation = 1; #[doc = "Clockwise 180 degrees."] #[doc = ""] - pub const ROTATION_CLOCKWISE_180: Y2RU_Rotation = 2; #[doc = "Clockwise 270 degrees."] #[doc = ""] - pub const ROTATION_CLOCKWISE_270: Y2RU_Rotation = 3; #[doc = "Rotation to be applied to the output."] #[doc = ""] - pub type Y2RU_Rotation = ::libc::c_uint; #[doc = "The result buffer will be laid out in linear format, the usual way."] #[doc = ""] - pub const BLOCK_LINE: Y2RU_BlockAlignment = 0; #[doc = "The result will be stored as 8x8 blocks in Z-order.\\n Useful for textures since it is the format used by the PICA200."] #[doc = ""] - pub const BLOCK_8_BY_8: Y2RU_BlockAlignment = 1; #[doc = "Block alignment of output"] +#[doc = ""] #[doc = "Defines the way the output will be laid out in memory."] #[doc = ""] - pub type Y2RU_BlockAlignment = ::libc::c_uint; #[doc = "Coefficients of the YUV->RGB conversion formula."] +#[doc = ""] #[doc = "A set of coefficients configuring the RGB to YUV conversion. Coefficients 0-4 are unsigned 2.8"] #[doc = "fixed pointer numbers representing entries on the conversion matrix, while coefficient 5-7 are"] #[doc = "signed 11.5 fixed point numbers added as offsets to the RGB result."] #[doc = "The overall conversion process formula is:"] #[doc = "```"] +#[doc = ""] #[doc = "R = trunc((rgb_Y * Y + r_V * V) + 0.75 + r_offset)"] #[doc = "G = trunc((rgb_Y * Y - g_U * U - g_V * V) + 0.75 + g_offset)"] #[doc = "B = trunc((rgb_Y * Y + b_U * U ) + 0.75 + b_offset)"] #[doc = "```"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_ColorCoefficients { -#[doc = "RGB per unit Y."] -#[doc = ""] - + #[doc = "RGB per unit Y."] + #[doc = ""] pub rgb_Y: u16_, -#[doc = "Red per unit V."] -#[doc = ""] - + #[doc = "Red per unit V."] + #[doc = ""] pub r_V: u16_, -#[doc = "Green per unit V."] -#[doc = ""] - + #[doc = "Green per unit V."] + #[doc = ""] pub g_V: u16_, -#[doc = "Green per unit U."] -#[doc = ""] - + #[doc = "Green per unit U."] + #[doc = ""] pub g_U: u16_, -#[doc = "Blue per unit U."] -#[doc = ""] - + #[doc = "Blue per unit U."] + #[doc = ""] pub b_U: u16_, -#[doc = "Red offset."] -#[doc = ""] - + #[doc = "Red offset."] + #[doc = ""] pub r_offset: u16_, -#[doc = "Green offset."] -#[doc = ""] - + #[doc = "Green offset."] + #[doc = ""] pub g_offset: u16_, -#[doc = "Blue offset."] -#[doc = ""] - + #[doc = "Blue offset."] + #[doc = ""] pub b_offset: u16_, } #[doc = "Coefficients from the ITU-R BT.601 standard with PC ranges."] #[doc = ""] - pub const COEFFICIENT_ITU_R_BT_601: Y2RU_StandardCoefficient = 0; #[doc = "Coefficients from the ITU-R BT.709 standard with PC ranges."] #[doc = ""] - pub const COEFFICIENT_ITU_R_BT_709: Y2RU_StandardCoefficient = 1; #[doc = "Coefficients from the ITU-R BT.601 standard with TV ranges."] #[doc = ""] - pub const COEFFICIENT_ITU_R_BT_601_SCALING: Y2RU_StandardCoefficient = 2; #[doc = "Coefficients from the ITU-R BT.709 standard with TV ranges."] #[doc = ""] - pub const COEFFICIENT_ITU_R_BT_709_SCALING: Y2RU_StandardCoefficient = 3; #[doc = "Preset conversion coefficients based on ITU standards for the YUV->RGB formula."] +#[doc = ""] #[doc = "For more details refer to [`Y2RU_ColorCoefficients`]"] #[doc = ""] - pub type Y2RU_StandardCoefficient = ::libc::c_uint; #[doc = "Structure used to configure all parameters at once."] +#[doc = ""] #[doc = "You can send a batch of configuration parameters using this structure and [`Y2RU_SetConversionParams`]"] #[doc = ""] - #[repr(C)] #[repr(align(4))] #[derive(Debug, Copy, Clone)] pub struct Y2RU_ConversionParams { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -#[doc = "Value passed to [`Y2RU_SetInputLineWidth`]"] -#[doc = ""] - + #[doc = "Value passed to [`Y2RU_SetInputLineWidth`]"] + #[doc = ""] pub input_line_width: s16, -#[doc = "Value passed to [`Y2RU_SetInputLines`]"] -#[doc = ""] - + #[doc = "Value passed to [`Y2RU_SetInputLines`]"] + #[doc = ""] pub input_lines: s16, pub _bitfield_align_2: [u8; 0], pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>, -#[doc = "Unused."] -#[doc = ""] - + #[doc = "Unused."] + #[doc = ""] pub unused: u8_, -#[doc = "Value passed to [`Y2RU_SetAlpha`]"] -#[doc = ""] - + #[doc = "Value passed to [`Y2RU_SetAlpha`]"] + #[doc = ""] pub alpha: u16_, } impl Default for Y2RU_ConversionParams { @@ -12980,290 +12824,313 @@ impl Y2RU_ConversionParams { } #[doc = "Dithering weights."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Y2RU_DitheringWeightParams { -#[doc = "Weight 0 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 0 for even X, even Y."] + #[doc = ""] pub w0_xEven_yEven: u16_, -#[doc = "Weight 0 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 0 for odd X, even Y."] + #[doc = ""] pub w0_xOdd_yEven: u16_, -#[doc = "Weight 0 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 0 for even X, odd Y."] + #[doc = ""] pub w0_xEven_yOdd: u16_, -#[doc = "Weight 0 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 0 for odd X, odd Y."] + #[doc = ""] pub w0_xOdd_yOdd: u16_, -#[doc = "Weight 1 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 1 for even X, even Y."] + #[doc = ""] pub w1_xEven_yEven: u16_, -#[doc = "Weight 1 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 1 for odd X, even Y."] + #[doc = ""] pub w1_xOdd_yEven: u16_, -#[doc = "Weight 1 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 1 for even X, odd Y."] + #[doc = ""] pub w1_xEven_yOdd: u16_, -#[doc = "Weight 1 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 1 for odd X, odd Y."] + #[doc = ""] pub w1_xOdd_yOdd: u16_, -#[doc = "Weight 2 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 2 for even X, even Y."] + #[doc = ""] pub w2_xEven_yEven: u16_, -#[doc = "Weight 2 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 2 for odd X, even Y."] + #[doc = ""] pub w2_xOdd_yEven: u16_, -#[doc = "Weight 2 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 2 for even X, odd Y."] + #[doc = ""] pub w2_xEven_yOdd: u16_, -#[doc = "Weight 2 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 2 for odd X, odd Y."] + #[doc = ""] pub w2_xOdd_yOdd: u16_, -#[doc = "Weight 3 for even X, even Y."] -#[doc = ""] - + #[doc = "Weight 3 for even X, even Y."] + #[doc = ""] pub w3_xEven_yEven: u16_, -#[doc = "Weight 3 for odd X, even Y."] -#[doc = ""] - + #[doc = "Weight 3 for odd X, even Y."] + #[doc = ""] pub w3_xOdd_yEven: u16_, -#[doc = "Weight 3 for even X, odd Y."] -#[doc = ""] - + #[doc = "Weight 3 for even X, odd Y."] + #[doc = ""] pub w3_xEven_yOdd: u16_, -#[doc = "Weight 3 for odd X, odd Y."] -#[doc = ""] - + #[doc = "Weight 3 for odd X, odd Y."] + #[doc = ""] pub w3_xOdd_yOdd: u16_, } extern "C" { #[must_use] -#[doc = "Initializes the y2r service."] -#[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] -#[doc = ""] - + #[doc = "Initializes the y2r service."] + #[doc = ""] + #[doc = "This will internally get the handle of the service, and on success call Y2RU_DriverInitialize."] + #[doc = ""] pub fn y2rInit() -> Result; } extern "C" { -#[doc = "Closes the y2r service."] -#[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] -#[doc = ""] - + #[doc = "Closes the y2r service."] + #[doc = ""] + #[doc = "This will internally call Y2RU_DriverFinalize and close the handle of the service."] + #[doc = ""] pub fn y2rExit(); } extern "C" { #[must_use] -#[doc = "Used to configure the input format."] -#[doc = "# Arguments"] -#[doc = "`format` - Input format to use."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the input format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Input format to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetInputFormat(format: Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured input format."] -#[doc = "# Arguments"] -#[doc = "`format` - Pointer to output the input format to."] -#[doc = ""] - + #[doc = "Gets the configured input format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Pointer to output the input format to."] + #[doc = ""] pub fn Y2RU_GetInputFormat(format: *mut Y2RU_InputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the output format."] -#[doc = "# Arguments"] -#[doc = "`format` - Output format to use."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the output format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Output format to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetOutputFormat(format: Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured output format."] -#[doc = "# Arguments"] -#[doc = "`format` - Pointer to output the output format to."] -#[doc = ""] - + #[doc = "Gets the configured output format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `format` - Pointer to output the output format to."] + #[doc = ""] pub fn Y2RU_GetOutputFormat(format: *mut Y2RU_OutputFormat) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the rotation of the output."] -#[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] -#[doc = "# Arguments"] -#[doc = "`rotation` - Rotation to use."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the rotation of the output."] + #[doc = ""] + #[doc = "It seems to apply the rotation per batch of 8 lines, so the output will be (height/8) images of size 8 x width."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rotation` - Rotation to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetRotation(rotation: Y2RU_Rotation) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured rotation."] -#[doc = "# Arguments"] -#[doc = "`rotation` - Pointer to output the rotation to."] -#[doc = ""] - + #[doc = "Gets the configured rotation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rotation` - Pointer to output the rotation to."] + #[doc = ""] pub fn Y2RU_GetRotation(rotation: *mut Y2RU_Rotation) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the alignment of the output buffer."] -#[doc = "# Arguments"] -#[doc = "`alignment` - Alignment to use."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the alignment of the output buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alignment` - Alignment to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetBlockAlignment(alignment: Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured alignment."] -#[doc = "# Arguments"] -#[doc = "`alignment` - Pointer to output the alignment to."] -#[doc = ""] - + #[doc = "Gets the configured alignment."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alignment` - Pointer to output the alignment to."] + #[doc = ""] pub fn Y2RU_GetBlockAlignment(alignment: *mut Y2RU_BlockAlignment) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to use spacial dithering."] -#[doc = "# Arguments"] -#[doc = "`enable` - Whether to use spacial dithering."] -#[doc = ""] - + #[doc = "Sets whether to use spacial dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to use spacial dithering."] + #[doc = ""] pub fn Y2RU_SetSpacialDithering(enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether to use spacial dithering."] -#[doc = "# Arguments"] -#[doc = "`enable` - Pointer to output the spacial dithering state to."] -#[doc = ""] - + #[doc = "Gets whether to use spacial dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pointer to output the spacial dithering state to."] + #[doc = ""] pub fn Y2RU_GetSpacialDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to use temporal dithering."] -#[doc = "# Arguments"] -#[doc = "`enable` - Whether to use temporal dithering."] -#[doc = ""] - + #[doc = "Sets whether to use temporal dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to use temporal dithering."] + #[doc = ""] pub fn Y2RU_SetTemporalDithering(enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether to use temporal dithering."] -#[doc = "# Arguments"] -#[doc = "`enable` - Pointer to output the temporal dithering state to."] -#[doc = ""] - + #[doc = "Gets whether to use temporal dithering."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Pointer to output the temporal dithering state to."] + #[doc = ""] pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the width of the image."] -#[doc = "# Arguments"] -#[doc = "`line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the width of the image."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `line_width` - Width of the image in pixels. Must be a multiple of 8, up to 1024."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured input line width."] -#[doc = "# Arguments"] -#[doc = "`line_width` - Pointer to output the line width to."] -#[doc = ""] - + #[doc = "Gets the configured input line width."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `line_width` - Pointer to output the line width to."] + #[doc = ""] pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the height of the image."] -#[doc = "A multiple of 8 seems to be preferred."] -#[doc = "If using the [`BLOCK_8_BY_8`] mode, it must be a multiple of 8."] -#[doc = "# Arguments"] -#[doc = "`num_lines` - Number of lines to be converted."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the height of the image."] + #[doc = ""] + #[doc = "A multiple of 8 seems to be preferred."] + #[doc = "If using the [`BLOCK_8_BY_8`] mode, it must be a multiple of 8."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num_lines` - Number of lines to be converted."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured number of input lines."] -#[doc = "# Arguments"] -#[doc = "`num_lines` - Pointer to output the input lines to."] -#[doc = ""] - + #[doc = "Gets the configured number of input lines."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num_lines` - Pointer to output the input lines to."] + #[doc = ""] pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the color conversion formula."] -#[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] -#[doc = "# Arguments"] -#[doc = "`coefficients` - Coefficients to use."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the color conversion formula."] + #[doc = ""] + #[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficients` - Coefficients to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured color coefficients."] -#[doc = "# Arguments"] -#[doc = "`num_lines` - Pointer to output the coefficients to."] -#[doc = ""] - + #[doc = "Gets the configured color coefficients."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num_lines` - Pointer to output the coefficients to."] + #[doc = ""] pub fn Y2RU_GetCoefficients(coefficients: *mut Y2RU_ColorCoefficients) -> Result; } extern "C" { #[must_use] -#[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] -#[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] -#[doc = "# Arguments"] -#[doc = "`coefficient` - Standard coefficient to use."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the color conversion formula with ITU stantards coefficients."] + #[doc = ""] + #[doc = "See [`Y2RU_ColorCoefficients`] for more information about the coefficients."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficient` - Standard coefficient to use."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetStandardCoefficient(coefficient: Y2RU_StandardCoefficient) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the color coefficient parameters of a standard coefficient."] -#[doc = "# Arguments"] -#[doc = "`coefficients` - Pointer to output the coefficients to."] -#[doc = "`standardCoeff` - Standard coefficient to check."] -#[doc = ""] - + #[doc = "Gets the color coefficient parameters of a standard coefficient."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficients` - Pointer to output the coefficients to."] + #[doc = "* `standardCoeff` - Standard coefficient to check."] + #[doc = ""] pub fn Y2RU_GetStandardCoefficient( coefficients: *mut Y2RU_ColorCoefficients, standardCoeff: Y2RU_StandardCoefficient, @@ -13271,75 +13138,92 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Used to configure the alpha value of the output."] -#[doc = "# Arguments"] -#[doc = "`alpha` - 8-bit value to be used for the output when the format requires it."] -#[doc = "# Notes"] -#[doc = "Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] -#[doc = ""] - + #[doc = "Used to configure the alpha value of the output."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alpha` - 8-bit value to be used for the output when the format requires it."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Prefer using [`Y2RU_SetConversionParams`] if you have to set multiple parameters."] + #[doc = ""] pub fn Y2RU_SetAlpha(alpha: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured output alpha value."] -#[doc = "# Arguments"] -#[doc = "`alpha` - Pointer to output the alpha value to."] -#[doc = ""] - + #[doc = "Gets the configured output alpha value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `alpha` - Pointer to output the alpha value to."] + #[doc = ""] pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Used to enable the end of conversion interrupt."] -#[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] -#[doc = "This interrupt will then be used to fire an event. See [`Y2RU_GetTransferEndEvent`]"] -#[doc = "By default the interrupt is enabled."] -#[doc = "# Arguments"] -#[doc = "`should_interrupt` - Enables the interrupt if true, disable it if false."] -#[doc = "# Notes"] -#[doc = "It seems that the event can be fired too soon in some cases, depending the transfer_unit size.\\n Please see the note at [`Y2RU_SetReceiving`]"] -#[doc = ""] - + #[doc = "Used to enable the end of conversion interrupt."] + #[doc = ""] + #[doc = "It is possible to fire an interrupt when the conversion is finished, and that the DMA is done copying the data."] + #[doc = "This interrupt will then be used to fire an event. See [`Y2RU_GetTransferEndEvent`]"] + #[doc = "By default the interrupt is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `should_interrupt` - Enables the interrupt if true, disable it if false."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* It seems that the event can be fired too soon in some cases, depending the transfer_unit size.\\n Please see the note at [`Y2RU_SetReceiving`]"] + #[doc = ""] pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the transfer end interrupt is enabled."] -#[doc = "# Arguments"] -#[doc = "`should_interrupt` - Pointer to output the interrupt state to."] -#[doc = ""] - + #[doc = "Gets whether the transfer end interrupt is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `should_interrupt` - Pointer to output the interrupt state to."] + #[doc = ""] pub fn Y2RU_GetTransferEndInterrupt(should_interrupt: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an handle to the end of conversion event."] -#[doc = "To enable this event you have to use ```"] -#[doc = "```"] -#[doc = "The event will be triggered when the corresponding interrupt is fired."] -#[doc = "# Arguments"] -#[doc = "`end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] -#[doc = "# Notes"] -#[doc = "It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."] -#[doc = ""] - + #[doc = "Gets an handle to the end of conversion event."] + #[doc = ""] + #[doc = "To enable this event you have to use ```"] + #[doc = "```"] + #[doc = "The event will be triggered when the corresponding interrupt is fired."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."] + #[doc = ""] pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Configures the Y plane buffer."] -#[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] -#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] -#[doc = "**Warning!**"] -#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] -#[doc = "# Arguments"] -#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "`image_size` - The total size of the data buffer."] -#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] -#[doc = ""] - + #[doc = "Configures the Y plane buffer."] + #[doc = ""] + #[doc = "This specifies the Y data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingY( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13349,18 +13233,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the U plane buffer."] -#[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] -#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] -#[doc = "**Warning!**"] -#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] -#[doc = "# Arguments"] -#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "`image_size` - The total size of the data buffer."] -#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] -#[doc = ""] - + #[doc = "Configures the U plane buffer."] + #[doc = ""] + #[doc = "This specifies the U data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingU( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13370,18 +13258,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the V plane buffer."] -#[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] -#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] -#[doc = "**Warning!**"] -#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] -#[doc = "# Arguments"] -#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "`image_size` - The total size of the data buffer."] -#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] -#[doc = ""] - + #[doc = "Configures the V plane buffer."] + #[doc = ""] + #[doc = "This specifies the V data buffer for the planar input formats (INPUT_YUV42*_INDIV_*)."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13391,18 +13283,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the YUYV source buffer."] -#[doc = "This specifies the YUYV data buffer for the packed input format [`INPUT_YUV422_BATCH`]"] -#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] -#[doc = "**Warning!**"] -#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] -#[doc = "# Arguments"] -#[doc = "`src_buf` - A pointer to the beginning of your Y data buffer."] -#[doc = "`image_size` - The total size of the data buffer."] -#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] -#[doc = ""] - + #[doc = "Configures the YUYV source buffer."] + #[doc = ""] + #[doc = "This specifies the YUYV data buffer for the packed input format [`INPUT_YUV422_BATCH`]"] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your Y data buffer."] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] pub fn Y2RU_SetSendingYUYV( src_buf: *const ::libc::c_void, image_size: u32_, @@ -13412,24 +13308,31 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the destination buffer."] -#[doc = "This specifies the destination buffer of the conversion."] -#[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] -#[doc = "The buffer does NOT need to be allocated in the linear heap."] -#[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] -#[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] -#[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] -#[doc = "**Warning!**"] -#[doc = "transfer_unit+transfer_gap must be less than 32768 (0x8000)"] -#[doc = "# Arguments"] -#[doc = "`src_buf` - A pointer to the beginning of your destination buffer in FCRAM"] -#[doc = "`image_size` - The total size of the data buffer."] -#[doc = "`transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] -#[doc = "`transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] -#[doc = "# Notes"] -#[doc = "Setting a transfer_unit of 4 or 8 lines seems to bring the best results in terms of speed for a 400x240 image."] -#[doc = ""] - + #[doc = "Configures the destination buffer."] + #[doc = ""] + #[doc = "This specifies the destination buffer of the conversion."] + #[doc = "The actual transfer will only happen after calling [`Y2RU_StartConversion`]"] + #[doc = "The buffer does NOT need to be allocated in the linear heap."] + #[doc = "It seems that depending on the size of the image and of the transfer unit,\\n"] + #[doc = "it is possible for the end of conversion interrupt to be triggered right after the conversion began.\\n"] + #[doc = "One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it."] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* transfer_unit+transfer_gap must be less than 32768 (0x8000)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src_buf` - A pointer to the beginning of your destination buffer in FCRAM"] + #[doc = "* `image_size` - The total size of the data buffer."] + #[doc = "* `transfer_unit` - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size."] + #[doc = "* `transfer_gap` - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "*"] + #[doc = "* Setting a transfer_unit of 4 or 8 lines seems to bring the best results in terms of speed for a 400x240 image."] + #[doc = ""] pub fn Y2RU_SetReceiving( dst_buf: *mut ::libc::c_void, image_size: u32_, @@ -13439,398 +13342,357 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the Y buffer."] -#[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with [`Y2RU_SetSendingY`]"] -#[doc = "# Arguments"] -#[doc = "`is_done` - Pointer to the boolean that will hold the result."] -#[doc = ""] - + #[doc = "Checks if the DMA has finished sending the Y buffer."] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the Y plane, false otherwise. To be used with [`Y2RU_SetSendingY`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingY(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the U buffer."] -#[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with [`Y2RU_SetSendingU`]"] -#[doc = "# Arguments"] -#[doc = "`is_done` - Pointer to the boolean that will hold the result."] -#[doc = ""] - + #[doc = "Checks if the DMA has finished sending the U buffer."] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the U plane, false otherwise. To be used with [`Y2RU_SetSendingU`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingU(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the V buffer."] -#[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with [`Y2RU_SetSendingV`]"] -#[doc = "# Arguments"] -#[doc = "`is_done` - Pointer to the boolean that will hold the result."] -#[doc = ""] - + #[doc = "Checks if the DMA has finished sending the V buffer."] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the V plane, false otherwise. To be used with [`Y2RU_SetSendingV`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the YUYV buffer."] -#[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with [`Y2RU_SetSendingYUYV`]"] -#[doc = "# Arguments"] -#[doc = "`is_done` - Pointer to the boolean that will hold the result."] -#[doc = ""] - + #[doc = "Checks if the DMA has finished sending the YUYV buffer."] + #[doc = ""] + #[doc = "True if the DMA has finished transferring the YUYV buffer, false otherwise. To be used with [`Y2RU_SetSendingYUYV`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneSendingYUYV(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the DMA has finished sending the converted result."] -#[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] -#[doc = "# Arguments"] -#[doc = "`is_done` - Pointer to the boolean that will hold the result."] -#[doc = ""] - + #[doc = "Checks if the DMA has finished sending the converted result."] + #[doc = ""] + #[doc = "True if the DMA has finished transferring data to your destination buffer, false otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_done` - Pointer to the boolean that will hold the result."] + #[doc = ""] pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Configures the dithering weight parameters."] -#[doc = "# Arguments"] -#[doc = "`params` - Dithering weight parameters to use."] -#[doc = ""] - + #[doc = "Configures the dithering weight parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `params` - Dithering weight parameters to use."] + #[doc = ""] pub fn Y2RU_SetDitheringWeightParams(params: *const Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the configured dithering weight parameters."] -#[doc = "# Arguments"] -#[doc = "`params` - Pointer to output the dithering weight parameters to."] -#[doc = ""] - + #[doc = "Gets the configured dithering weight parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `params` - Pointer to output the dithering weight parameters to."] + #[doc = ""] pub fn Y2RU_GetDitheringWeightParams(params: *mut Y2RU_DitheringWeightParams) -> Result; } extern "C" { #[must_use] -#[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] -#[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] -#[doc = "# Arguments"] -#[doc = "`params` - Conversion parameters to set."] -#[doc = ""] - + #[doc = "Sets all of the parameters of Y2RU_ConversionParams at once."] + #[doc = ""] + #[doc = "Faster than calling the individual value through Y2R_Set* because only one system call is made."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `params` - Conversion parameters to set."] + #[doc = ""] pub fn Y2RU_SetConversionParams(params: *const Y2RU_ConversionParams) -> Result; } extern "C" { #[must_use] -#[doc = "Starts the conversion process"] -#[doc = ""] - + #[doc = "Starts the conversion process"] + #[doc = ""] pub fn Y2RU_StartConversion() -> Result; } extern "C" { #[must_use] -#[doc = "Cancels the conversion"] -#[doc = ""] - + #[doc = "Cancels the conversion"] + #[doc = ""] pub fn Y2RU_StopConversion() -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the conversion and DMA transfer are finished."] -#[doc = "This can have the same problems as the event and interrupt. See [`Y2RU_SetTransferEndInterrupt`]"] -#[doc = "# Arguments"] -#[doc = "`is_busy` - Pointer to output the busy state to."] -#[doc = ""] - + #[doc = "Checks if the conversion and DMA transfer are finished."] + #[doc = ""] + #[doc = "This can have the same problems as the event and interrupt. See [`Y2RU_SetTransferEndInterrupt`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_busy` - Pointer to output the busy state to."] + #[doc = ""] pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Checks whether Y2R is ready to be used."] -#[doc = "# Arguments"] -#[doc = "`ping` - Pointer to output the ready status to."] -#[doc = ""] - + #[doc = "Checks whether Y2R is ready to be used."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ping` - Pointer to output the ready status to."] + #[doc = ""] pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the Y2R driver."] -#[doc = ""] - + #[doc = "Initializes the Y2R driver."] + #[doc = ""] pub fn Y2RU_DriverInitialize() -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the Y2R driver."] -#[doc = ""] - + #[doc = "Terminates the Y2R driver."] + #[doc = ""] pub fn Y2RU_DriverFinalize() -> Result; } #[doc = "No port."] #[doc = ""] - pub const PORT_NONE: _bindgen_ty_15 = 0; #[doc = "CAM1 port."] #[doc = ""] - pub const PORT_CAM1: _bindgen_ty_15 = 1; #[doc = "CAM2 port."] #[doc = ""] - pub const PORT_CAM2: _bindgen_ty_15 = 2; #[doc = "Both ports."] #[doc = ""] - pub const PORT_BOTH: _bindgen_ty_15 = 3; #[doc = "Camera connection target ports."] #[doc = ""] - pub type _bindgen_ty_15 = ::libc::c_uint; #[doc = "No camera."] #[doc = ""] - pub const SELECT_NONE: _bindgen_ty_16 = 0; #[doc = "Outer camera 1."] #[doc = ""] - pub const SELECT_OUT1: _bindgen_ty_16 = 1; #[doc = "Inner camera 1."] #[doc = ""] - pub const SELECT_IN1: _bindgen_ty_16 = 2; #[doc = "Outer camera 2."] #[doc = ""] - pub const SELECT_OUT2: _bindgen_ty_16 = 4; #[doc = "Outer camera 1 and inner camera 1."] #[doc = ""] - pub const SELECT_IN1_OUT1: _bindgen_ty_16 = 3; #[doc = "Both outer cameras."] #[doc = ""] - pub const SELECT_OUT1_OUT2: _bindgen_ty_16 = 5; #[doc = "Inner camera 1 and outer camera 2."] #[doc = ""] - pub const SELECT_IN1_OUT2: _bindgen_ty_16 = 6; #[doc = "All cameras."] #[doc = ""] - pub const SELECT_ALL: _bindgen_ty_16 = 7; #[doc = "Camera combinations."] #[doc = ""] - pub type _bindgen_ty_16 = ::libc::c_uint; #[doc = "No context."] #[doc = ""] - pub const CONTEXT_NONE: CAMU_Context = 0; #[doc = "Context A."] #[doc = ""] - pub const CONTEXT_A: CAMU_Context = 1; #[doc = "Context B."] #[doc = ""] - pub const CONTEXT_B: CAMU_Context = 2; #[doc = "Both contexts."] #[doc = ""] - pub const CONTEXT_BOTH: CAMU_Context = 3; #[doc = "Camera contexts."] #[doc = ""] - pub type CAMU_Context = ::libc::c_uint; #[doc = "No flip."] #[doc = ""] - pub const FLIP_NONE: CAMU_Flip = 0; #[doc = "Horizontal flip."] #[doc = ""] - pub const FLIP_HORIZONTAL: CAMU_Flip = 1; #[doc = "Vertical flip."] #[doc = ""] - pub const FLIP_VERTICAL: CAMU_Flip = 2; #[doc = "Reverse flip."] #[doc = ""] - pub const FLIP_REVERSE: CAMU_Flip = 3; #[doc = "Ways to flip the camera image."] #[doc = ""] - pub type CAMU_Flip = ::libc::c_uint; #[doc = "VGA size. (640x480)"] #[doc = ""] - pub const SIZE_VGA: CAMU_Size = 0; #[doc = "QVGA size. (320x240)"] #[doc = ""] - pub const SIZE_QVGA: CAMU_Size = 1; #[doc = "QQVGA size. (160x120)"] #[doc = ""] - pub const SIZE_QQVGA: CAMU_Size = 2; #[doc = "CIF size. (352x288)"] #[doc = ""] - pub const SIZE_CIF: CAMU_Size = 3; #[doc = "QCIF size. (176x144)"] #[doc = ""] - pub const SIZE_QCIF: CAMU_Size = 4; #[doc = "DS LCD size. (256x192)"] #[doc = ""] - pub const SIZE_DS_LCD: CAMU_Size = 5; #[doc = "DS LCD x4 size. (512x384)"] #[doc = ""] - pub const SIZE_DS_LCDx4: CAMU_Size = 6; #[doc = "CTR Top LCD size. (400x240)"] #[doc = ""] - pub const SIZE_CTR_TOP_LCD: CAMU_Size = 7; #[doc = "CTR Bottom LCD size. (320x240)"] #[doc = ""] - pub const SIZE_CTR_BOTTOM_LCD: CAMU_Size = 1; #[doc = "Camera image resolutions."] #[doc = ""] - pub type CAMU_Size = ::libc::c_uint; #[doc = "15 FPS."] #[doc = ""] - pub const FRAME_RATE_15: CAMU_FrameRate = 0; #[doc = "15-5 FPS."] #[doc = ""] - pub const FRAME_RATE_15_TO_5: CAMU_FrameRate = 1; #[doc = "15-2 FPS."] #[doc = ""] - pub const FRAME_RATE_15_TO_2: CAMU_FrameRate = 2; #[doc = "10 FPS."] #[doc = ""] - pub const FRAME_RATE_10: CAMU_FrameRate = 3; #[doc = "8.5 FPS."] #[doc = ""] - pub const FRAME_RATE_8_5: CAMU_FrameRate = 4; #[doc = "5 FPS."] #[doc = ""] - pub const FRAME_RATE_5: CAMU_FrameRate = 5; #[doc = "20 FPS."] #[doc = ""] - pub const FRAME_RATE_20: CAMU_FrameRate = 6; #[doc = "20-5 FPS."] #[doc = ""] - pub const FRAME_RATE_20_TO_5: CAMU_FrameRate = 7; #[doc = "30 FPS."] #[doc = ""] - pub const FRAME_RATE_30: CAMU_FrameRate = 8; #[doc = "30-5 FPS."] #[doc = ""] - pub const FRAME_RATE_30_TO_5: CAMU_FrameRate = 9; #[doc = "15-10 FPS."] #[doc = ""] - pub const FRAME_RATE_15_TO_10: CAMU_FrameRate = 10; #[doc = "20-10 FPS."] #[doc = ""] - pub const FRAME_RATE_20_TO_10: CAMU_FrameRate = 11; #[doc = "30-10 FPS."] #[doc = ""] - pub const FRAME_RATE_30_TO_10: CAMU_FrameRate = 12; #[doc = "Camera capture frame rates."] #[doc = ""] - pub type CAMU_FrameRate = ::libc::c_uint; #[doc = "Auto white balance."] #[doc = ""] - pub const WHITE_BALANCE_AUTO: CAMU_WhiteBalance = 0; #[doc = "3200K white balance."] #[doc = ""] - pub const WHITE_BALANCE_3200K: CAMU_WhiteBalance = 1; #[doc = "4150K white balance."] #[doc = ""] - pub const WHITE_BALANCE_4150K: CAMU_WhiteBalance = 2; #[doc = "5200K white balance."] #[doc = ""] - pub const WHITE_BALANCE_5200K: CAMU_WhiteBalance = 3; #[doc = "6000K white balance."] #[doc = ""] - pub const WHITE_BALANCE_6000K: CAMU_WhiteBalance = 4; #[doc = "7000K white balance."] #[doc = ""] - pub const WHITE_BALANCE_7000K: CAMU_WhiteBalance = 5; pub const WHITE_BALANCE_NORMAL: CAMU_WhiteBalance = 0; pub const WHITE_BALANCE_TUNGSTEN: CAMU_WhiteBalance = 1; @@ -13842,580 +13704,478 @@ pub const WHITE_BALANCE_SHADE: CAMU_WhiteBalance = 5; #[doc = "Camera white balance modes."] #[doc = ""] - pub type CAMU_WhiteBalance = ::libc::c_uint; #[doc = "Normal mode."] #[doc = ""] - pub const PHOTO_MODE_NORMAL: CAMU_PhotoMode = 0; #[doc = "Portrait mode."] #[doc = ""] - pub const PHOTO_MODE_PORTRAIT: CAMU_PhotoMode = 1; #[doc = "Landscape mode."] #[doc = ""] - pub const PHOTO_MODE_LANDSCAPE: CAMU_PhotoMode = 2; #[doc = "Night mode."] #[doc = ""] - pub const PHOTO_MODE_NIGHTVIEW: CAMU_PhotoMode = 3; #[doc = "Letter mode."] #[doc = ""] - pub const PHOTO_MODE_LETTER: CAMU_PhotoMode = 4; #[doc = "Camera photo modes."] #[doc = ""] - pub type CAMU_PhotoMode = ::libc::c_uint; #[doc = "No effects."] #[doc = ""] - pub const EFFECT_NONE: CAMU_Effect = 0; #[doc = "Mono effect."] #[doc = ""] - pub const EFFECT_MONO: CAMU_Effect = 1; #[doc = "Sepia effect."] #[doc = ""] - pub const EFFECT_SEPIA: CAMU_Effect = 2; #[doc = "Negative effect."] #[doc = ""] - pub const EFFECT_NEGATIVE: CAMU_Effect = 3; #[doc = "Negative film effect."] #[doc = ""] - pub const EFFECT_NEGAFILM: CAMU_Effect = 4; #[doc = "Sepia effect."] #[doc = ""] - pub const EFFECT_SEPIA01: CAMU_Effect = 5; #[doc = "Camera special effects."] #[doc = ""] - pub type CAMU_Effect = ::libc::c_uint; #[doc = "Pattern 1."] #[doc = ""] - pub const CONTRAST_PATTERN_01: CAMU_Contrast = 0; #[doc = "Pattern 2."] #[doc = ""] - pub const CONTRAST_PATTERN_02: CAMU_Contrast = 1; #[doc = "Pattern 3."] #[doc = ""] - pub const CONTRAST_PATTERN_03: CAMU_Contrast = 2; #[doc = "Pattern 4."] #[doc = ""] - pub const CONTRAST_PATTERN_04: CAMU_Contrast = 3; #[doc = "Pattern 5."] #[doc = ""] - pub const CONTRAST_PATTERN_05: CAMU_Contrast = 4; #[doc = "Pattern 6."] #[doc = ""] - pub const CONTRAST_PATTERN_06: CAMU_Contrast = 5; #[doc = "Pattern 7."] #[doc = ""] - pub const CONTRAST_PATTERN_07: CAMU_Contrast = 6; #[doc = "Pattern 8."] #[doc = ""] - pub const CONTRAST_PATTERN_08: CAMU_Contrast = 7; #[doc = "Pattern 9."] #[doc = ""] - pub const CONTRAST_PATTERN_09: CAMU_Contrast = 8; #[doc = "Pattern 10."] #[doc = ""] - pub const CONTRAST_PATTERN_10: CAMU_Contrast = 9; #[doc = "Pattern 11."] #[doc = ""] - pub const CONTRAST_PATTERN_11: CAMU_Contrast = 10; #[doc = "Low contrast. (5)"] #[doc = ""] - pub const CONTRAST_LOW: CAMU_Contrast = 4; #[doc = "Normal contrast. (6)"] #[doc = ""] - pub const CONTRAST_NORMAL: CAMU_Contrast = 5; #[doc = "High contrast. (7)"] #[doc = ""] - pub const CONTRAST_HIGH: CAMU_Contrast = 6; #[doc = "Camera contrast patterns."] #[doc = ""] - pub type CAMU_Contrast = ::libc::c_uint; #[doc = "No lens correction."] #[doc = ""] - pub const LENS_CORRECTION_OFF: CAMU_LensCorrection = 0; #[doc = "Edge-to-center brightness ratio of 70."] #[doc = ""] - pub const LENS_CORRECTION_ON_70: CAMU_LensCorrection = 1; #[doc = "Edge-to-center brightness ratio of 90."] #[doc = ""] - pub const LENS_CORRECTION_ON_90: CAMU_LensCorrection = 2; #[doc = "Dark lens correction. (OFF)"] #[doc = ""] - pub const LENS_CORRECTION_DARK: CAMU_LensCorrection = 0; #[doc = "Normal lens correction. (70)"] #[doc = ""] - pub const LENS_CORRECTION_NORMAL: CAMU_LensCorrection = 1; #[doc = "Bright lens correction. (90)"] #[doc = ""] - pub const LENS_CORRECTION_BRIGHT: CAMU_LensCorrection = 2; #[doc = "Camera lens correction modes."] #[doc = ""] - pub type CAMU_LensCorrection = ::libc::c_uint; #[doc = "YUV422"] #[doc = ""] - pub const OUTPUT_YUV_422: CAMU_OutputFormat = 0; #[doc = "RGB565"] #[doc = ""] - pub const OUTPUT_RGB_565: CAMU_OutputFormat = 1; #[doc = "Camera image output formats."] #[doc = ""] - pub type CAMU_OutputFormat = ::libc::c_uint; #[doc = "Normal shutter sound."] #[doc = ""] - pub const SHUTTER_SOUND_TYPE_NORMAL: CAMU_ShutterSoundType = 0; #[doc = "Shutter sound to begin a movie."] #[doc = ""] - pub const SHUTTER_SOUND_TYPE_MOVIE: CAMU_ShutterSoundType = 1; #[doc = "Shutter sound to end a movie."] #[doc = ""] - pub const SHUTTER_SOUND_TYPE_MOVIE_END: CAMU_ShutterSoundType = 2; #[doc = "Camera shutter sounds."] #[doc = ""] - pub type CAMU_ShutterSoundType = ::libc::c_uint; #[doc = "Image quality calibration data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_ImageQualityCalibrationData { -#[doc = "Auto exposure base target brightness."] -#[doc = ""] - + #[doc = "Auto exposure base target brightness."] + #[doc = ""] pub aeBaseTarget: s16, -#[doc = "Left color correction matrix red normalization coefficient."] -#[doc = ""] - + #[doc = "Left color correction matrix red normalization coefficient."] + #[doc = ""] pub kRL: s16, -#[doc = "Left color correction matrix green normalization coefficient."] -#[doc = ""] - + #[doc = "Left color correction matrix green normalization coefficient."] + #[doc = ""] pub kGL: s16, -#[doc = "Left color correction matrix blue normalization coefficient."] -#[doc = ""] - + #[doc = "Left color correction matrix blue normalization coefficient."] + #[doc = ""] pub kBL: s16, -#[doc = "Color correction matrix position."] -#[doc = ""] - + #[doc = "Color correction matrix position."] + #[doc = ""] pub ccmPosition: s16, -#[doc = "Right camera, left color correction matrix red/green gain."] -#[doc = ""] - + #[doc = "Right camera, left color correction matrix red/green gain."] + #[doc = ""] pub awbCcmL9Right: u16_, -#[doc = "Left camera, left color correction matrix red/green gain."] -#[doc = ""] - + #[doc = "Left camera, left color correction matrix red/green gain."] + #[doc = ""] pub awbCcmL9Left: u16_, -#[doc = "Right camera, left color correction matrix blue/green gain."] -#[doc = ""] - + #[doc = "Right camera, left color correction matrix blue/green gain."] + #[doc = ""] pub awbCcmL10Right: u16_, -#[doc = "Left camera, left color correction matrix blue/green gain."] -#[doc = ""] - + #[doc = "Left camera, left color correction matrix blue/green gain."] + #[doc = ""] pub awbCcmL10Left: u16_, -#[doc = "Right camera, color correction matrix position threshold."] -#[doc = ""] - + #[doc = "Right camera, color correction matrix position threshold."] + #[doc = ""] pub awbX0Right: u16_, -#[doc = "Left camera, color correction matrix position threshold."] -#[doc = ""] - + #[doc = "Left camera, color correction matrix position threshold."] + #[doc = ""] pub awbX0Left: u16_, } #[doc = "Stereo camera calibration data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_StereoCameraCalibrationData { -#[doc = "#bool Whether the X and Y rotation data is valid."] -#[doc = ""] - + #[doc = "#bool Whether the X and Y rotation data is valid."] + #[doc = ""] pub isValidRotationXY: u8_, -#[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] -#[doc = ""] - + #[doc = "Padding. (Aligns isValidRotationXY to 4 bytes)"] + #[doc = ""] pub padding: [u8_; 3usize], -#[doc = "Scale to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Scale to match the left camera image with the right."] + #[doc = ""] pub scale: f32, -#[doc = "Z axis rotation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Z axis rotation to match the left camera image with the right."] + #[doc = ""] pub rotationZ: f32, -#[doc = "X axis translation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "X axis translation to match the left camera image with the right."] + #[doc = ""] pub translationX: f32, -#[doc = "Y axis translation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Y axis translation to match the left camera image with the right."] + #[doc = ""] pub translationY: f32, -#[doc = "X axis rotation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "X axis rotation to match the left camera image with the right."] + #[doc = ""] pub rotationX: f32, -#[doc = "Y axis rotation to match the left camera image with the right."] -#[doc = ""] - + #[doc = "Y axis rotation to match the left camera image with the right."] + #[doc = ""] pub rotationY: f32, -#[doc = "Right camera angle of view."] -#[doc = ""] - + #[doc = "Right camera angle of view."] + #[doc = ""] pub angleOfViewRight: f32, -#[doc = "Left camera angle of view."] -#[doc = ""] - + #[doc = "Left camera angle of view."] + #[doc = ""] pub angleOfViewLeft: f32, -#[doc = "Distance between cameras and measurement chart."] -#[doc = ""] - + #[doc = "Distance between cameras and measurement chart."] + #[doc = ""] pub distanceToChart: f32, -#[doc = "Distance between left and right cameras."] -#[doc = ""] - + #[doc = "Distance between left and right cameras."] + #[doc = ""] pub distanceCameras: f32, -#[doc = "Image width."] -#[doc = ""] - + #[doc = "Image width."] + #[doc = ""] pub imageWidth: s16, -#[doc = "Image height."] -#[doc = ""] - + #[doc = "Image height."] + #[doc = ""] pub imageHeight: s16, -#[doc = "Reserved for future use. (unused)"] -#[doc = ""] - + #[doc = "Reserved for future use. (unused)"] + #[doc = ""] pub reserved: [u8_; 16usize], } #[doc = "Batch camera configuration for use without a context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterCameraSelect { -#[doc = "Selected camera."] -#[doc = ""] - + #[doc = "Selected camera."] + #[doc = ""] pub camera: u8_, -#[doc = "Camera exposure."] -#[doc = ""] - + #[doc = "Camera exposure."] + #[doc = ""] pub exposure: s8, -#[doc = "#CAMU_WhiteBalance Camera white balance."] -#[doc = ""] - + #[doc = "#CAMU_WhiteBalance Camera white balance."] + #[doc = ""] pub whiteBalance: u8_, -#[doc = "Camera sharpness."] -#[doc = ""] - + #[doc = "Camera sharpness."] + #[doc = ""] pub sharpness: s8, -#[doc = "#bool Whether to automatically determine the proper exposure."] -#[doc = ""] - + #[doc = "#bool Whether to automatically determine the proper exposure."] + #[doc = ""] pub autoExposureOn: u8_, -#[doc = "#bool Whether to automatically determine the white balance mode."] -#[doc = ""] - + #[doc = "#bool Whether to automatically determine the white balance mode."] + #[doc = ""] pub autoWhiteBalanceOn: u8_, -#[doc = "#CAMU_FrameRate Camera frame rate."] -#[doc = ""] - + #[doc = "#CAMU_FrameRate Camera frame rate."] + #[doc = ""] pub frameRate: u8_, -#[doc = "#CAMU_PhotoMode Camera photo mode."] -#[doc = ""] - + #[doc = "#CAMU_PhotoMode Camera photo mode."] + #[doc = ""] pub photoMode: u8_, -#[doc = "#CAMU_Contrast Camera contrast."] -#[doc = ""] - + #[doc = "#CAMU_Contrast Camera contrast."] + #[doc = ""] pub contrast: u8_, -#[doc = "#CAMU_LensCorrection Camera lens correction."] -#[doc = ""] - + #[doc = "#CAMU_LensCorrection Camera lens correction."] + #[doc = ""] pub lensCorrection: u8_, -#[doc = "#bool Whether to enable the camera's noise filter."] -#[doc = ""] - + #[doc = "#bool Whether to enable the camera's noise filter."] + #[doc = ""] pub noiseFilterOn: u8_, -#[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] -#[doc = ""] - + #[doc = "Padding. (Aligns last 3 fields to 4 bytes)"] + #[doc = ""] pub padding: u8_, -#[doc = "X of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "X of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowX: s16, -#[doc = "Y of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "Y of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowY: s16, -#[doc = "Width of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "Width of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowWidth: s16, -#[doc = "Height of the region to use for auto exposure."] -#[doc = ""] - + #[doc = "Height of the region to use for auto exposure."] + #[doc = ""] pub autoExposureWindowHeight: s16, -#[doc = "X of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "X of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowX: s16, -#[doc = "Y of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "Y of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowY: s16, -#[doc = "Width of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "Width of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowWidth: s16, -#[doc = "Height of the region to use for auto white balance."] -#[doc = ""] - + #[doc = "Height of the region to use for auto white balance."] + #[doc = ""] pub autoWhiteBalanceWindowHeight: s16, } #[doc = "Batch camera configuration for use with a context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContext { -#[doc = "Selected camera."] -#[doc = ""] - + #[doc = "Selected camera."] + #[doc = ""] pub camera: u8_, -#[doc = "#CAMU_Context Selected context."] -#[doc = ""] - + #[doc = "#CAMU_Context Selected context."] + #[doc = ""] pub context: u8_, -#[doc = "#CAMU_Flip Camera image flip mode."] -#[doc = ""] - + #[doc = "#CAMU_Flip Camera image flip mode."] + #[doc = ""] pub flip: u8_, -#[doc = "#CAMU_Effect Camera image special effects."] -#[doc = ""] - + #[doc = "#CAMU_Effect Camera image special effects."] + #[doc = ""] pub effect: u8_, -#[doc = "#CAMU_Size Camera image resolution."] -#[doc = ""] - + #[doc = "#CAMU_Size Camera image resolution."] + #[doc = ""] pub size: u8_, } #[doc = "Batch camera configuration for use with a context and with detailed size information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CAMU_PackageParameterContextDetail { -#[doc = "Selected camera."] -#[doc = ""] - + #[doc = "Selected camera."] + #[doc = ""] pub camera: u8_, -#[doc = "#CAMU_Context Selected context."] -#[doc = ""] - + #[doc = "#CAMU_Context Selected context."] + #[doc = ""] pub context: u8_, -#[doc = "#CAMU_Flip Camera image flip mode."] -#[doc = ""] - + #[doc = "#CAMU_Flip Camera image flip mode."] + #[doc = ""] pub flip: u8_, -#[doc = "#CAMU_Effect Camera image special effects."] -#[doc = ""] - + #[doc = "#CAMU_Effect Camera image special effects."] + #[doc = ""] pub effect: u8_, -#[doc = "Image width."] -#[doc = ""] - + #[doc = "Image width."] + #[doc = ""] pub width: s16, -#[doc = "Image height."] -#[doc = ""] - + #[doc = "Image height."] + #[doc = ""] pub height: s16, -#[doc = "First crop point X."] -#[doc = ""] - + #[doc = "First crop point X."] + #[doc = ""] pub cropX0: s16, -#[doc = "First crop point Y."] -#[doc = ""] - + #[doc = "First crop point Y."] + #[doc = ""] pub cropY0: s16, -#[doc = "Second crop point X."] -#[doc = ""] - + #[doc = "Second crop point X."] + #[doc = ""] pub cropX1: s16, -#[doc = "Second crop point Y."] -#[doc = ""] - + #[doc = "Second crop point Y."] + #[doc = ""] pub cropY1: s16, } extern "C" { #[must_use] -#[doc = "Initializes the cam service."] -#[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] -#[doc = ""] - + #[doc = "Initializes the cam service."] + #[doc = ""] + #[doc = "This will internally get the handle of the service, and on success call CAMU_DriverInitialize."] + #[doc = ""] pub fn camInit() -> Result; } extern "C" { -#[doc = "Closes the cam service."] -#[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] -#[doc = ""] - + #[doc = "Closes the cam service."] + #[doc = ""] + #[doc = "This will internally call CAMU_DriverFinalize and close the handle of the service."] + #[doc = ""] pub fn camExit(); } extern "C" { #[must_use] -#[doc = "Begins capture on the specified camera port."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to begin capture on."] -#[doc = ""] - + #[doc = "Begins capture on the specified camera port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to begin capture on."] + #[doc = ""] pub fn CAMU_StartCapture(port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates capture on the specified camera port."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to terminate capture on."] -#[doc = ""] - + #[doc = "Terminates capture on the specified camera port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to terminate capture on."] + #[doc = ""] pub fn CAMU_StopCapture(port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the specified camera port is busy."] -#[doc = "# Arguments"] -#[doc = "`busy` - Pointer to output the busy state to."] -#[doc = "`port` - Port to check."] -#[doc = ""] - + #[doc = "Gets whether the specified camera port is busy."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `busy` - Pointer to output the busy state to."] + #[doc = "* `port` - Port to check."] + #[doc = ""] pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the buffer and error flags of the specified camera port."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to clear."] -#[doc = ""] - + #[doc = "Clears the buffer and error flags of the specified camera port."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to clear."] + #[doc = ""] pub fn CAMU_ClearBuffer(port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a handle to the event signaled on vsync interrupts."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to output the event handle to."] -#[doc = "`port` - Port to use."] -#[doc = ""] - + #[doc = "Gets a handle to the event signaled on vsync interrupts."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the event handle to."] + #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a handle to the event signaled on camera buffer errors."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to output the event handle to."] -#[doc = "`port` - Port to use."] -#[doc = ""] - + #[doc = "Gets a handle to the event signaled on camera buffer errors."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the event handle to."] + #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates the process of receiving a camera frame."] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to output the completion event handle to."] -#[doc = "`dst` - Buffer to write data to."] -#[doc = "`port` - Port to receive from."] -#[doc = "`imageSize` - Size of the image to receive."] -#[doc = "`transferUnit` - Transfer unit to use when receiving."] -#[doc = ""] - + #[doc = "Initiates the process of receiving a camera frame."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to output the completion event handle to."] + #[doc = "* `dst` - Buffer to write data to."] + #[doc = "* `port` - Port to receive from."] + #[doc = "* `imageSize` - Size of the image to receive."] + #[doc = "* `transferUnit` - Transfer unit to use when receiving."] + #[doc = ""] pub fn CAMU_SetReceiving( event: *mut Handle, dst: *mut ::libc::c_void, @@ -14426,101 +14186,110 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets whether the specified camera port has finished receiving image data."] -#[doc = "# Arguments"] -#[doc = "`finishedReceiving` - Pointer to output the receiving status to."] -#[doc = "`port` - Port to check."] -#[doc = ""] - + #[doc = "Gets whether the specified camera port has finished receiving image data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `finishedReceiving` - Pointer to output the receiving status to."] + #[doc = "* `port` - Port to check."] + #[doc = ""] pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the number of lines to transfer into an image buffer."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to use."] -#[doc = "`lines` - Lines to transfer."] -#[doc = "`width` - Width of the image."] -#[doc = "`height` - Height of the image."] -#[doc = ""] - + #[doc = "Sets the number of lines to transfer into an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `lines` - Lines to transfer."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the maximum number of lines that can be saved to an image buffer."] -#[doc = "# Arguments"] -#[doc = "`maxLines` - Pointer to write the maximum number of lines to."] -#[doc = "`width` - Width of the image."] -#[doc = "`height` - Height of the image."] -#[doc = ""] - + #[doc = "Gets the maximum number of lines that can be saved to an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `maxLines` - Pointer to write the maximum number of lines to."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the number of bytes to transfer into an image buffer."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to use."] -#[doc = "`bytes` - Bytes to transfer."] -#[doc = "`width` - Width of the image."] -#[doc = "`height` - Height of the image."] -#[doc = ""] - + #[doc = "Sets the number of bytes to transfer into an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `bytes` - Bytes to transfer."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the number of bytes to transfer into an image buffer."] -#[doc = "# Arguments"] -#[doc = "`transferBytes` - Pointer to write the number of bytes to."] -#[doc = "`port` - Port to use."] -#[doc = ""] - + #[doc = "Gets the number of bytes to transfer into an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transferBytes` - Pointer to write the number of bytes to."] + #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] -#[doc = "# Arguments"] -#[doc = "`maxBytes` - Pointer to write the maximum number of bytes to."] -#[doc = "`width` - Width of the image."] -#[doc = "`height` - Height of the image."] -#[doc = ""] - + #[doc = "Gets the maximum number of bytes that can be saved to an image buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `maxBytes` - Pointer to write the maximum number of bytes to."] + #[doc = "* `width` - Width of the image."] + #[doc = "* `height` - Height of the image."] + #[doc = ""] pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether image trimming is enabled."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to use."] -#[doc = "`trimming` - Whether image trimming is enabled."] -#[doc = ""] - + #[doc = "Sets whether image trimming is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `trimming` - Whether image trimming is enabled."] + #[doc = ""] pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether image trimming is enabled."] -#[doc = "# Arguments"] -#[doc = "`trimming` - Pointer to output the trim state to."] -#[doc = "`port` - Port to use."] -#[doc = ""] - + #[doc = "Gets whether image trimming is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `trimming` - Pointer to output the trim state to."] + #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the parameters used for trimming images."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to use."] -#[doc = "`xStart` - Start X coordinate."] -#[doc = "`yStart` - Start Y coordinate."] -#[doc = "`xEnd` - End X coordinate."] -#[doc = "`yEnd` - End Y coordinate."] -#[doc = ""] - + #[doc = "Sets the parameters used for trimming images."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `xStart` - Start X coordinate."] + #[doc = "* `yStart` - Start Y coordinate."] + #[doc = "* `xEnd` - End X coordinate."] + #[doc = "* `yEnd` - End Y coordinate."] + #[doc = ""] pub fn CAMU_SetTrimmingParams( port: u32_, xStart: s16, @@ -14531,15 +14300,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the parameters used for trimming images."] -#[doc = "# Arguments"] -#[doc = "`xStart` - Pointer to write the start X coordinate to."] -#[doc = "`yStart` - Pointer to write the start Y coordinate to."] -#[doc = "`xEnd` - Pointer to write the end X coordinate to."] -#[doc = "`yEnd` - Pointer to write the end Y coordinate to."] -#[doc = "`port` - Port to use."] -#[doc = ""] - + #[doc = "Gets the parameters used for trimming images."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `xStart` - Pointer to write the start X coordinate to."] + #[doc = "* `yStart` - Pointer to write the start Y coordinate to."] + #[doc = "* `xEnd` - Pointer to write the end X coordinate to."] + #[doc = "* `yEnd` - Pointer to write the end Y coordinate to."] + #[doc = "* `port` - Port to use."] + #[doc = ""] pub fn CAMU_GetTrimmingParams( xStart: *mut s16, yStart: *mut s16, @@ -14550,15 +14320,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the parameters used for trimming images, relative to the center of the image."] -#[doc = "# Arguments"] -#[doc = "`port` - Port to use."] -#[doc = "`trimWidth` - Trim width."] -#[doc = "`trimHeight` - Trim height."] -#[doc = "`camWidth` - Camera width."] -#[doc = "`camHeight` - Camera height."] -#[doc = ""] - + #[doc = "Sets the parameters used for trimming images, relative to the center of the image."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `port` - Port to use."] + #[doc = "* `trimWidth` - Trim width."] + #[doc = "* `trimHeight` - Trim height."] + #[doc = "* `camWidth` - Camera width."] + #[doc = "* `camHeight` - Camera height."] + #[doc = ""] pub fn CAMU_SetTrimmingParamsCenter( port: u32_, trimWidth: s16, @@ -14569,52 +14340,58 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Activates the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = ""] - + #[doc = "Activates the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = ""] pub fn CAMU_Activate(select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Switches the specified camera's active context."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`context` - Context to use."] -#[doc = ""] - + #[doc = "Switches the specified camera's active context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the exposure value of the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`exposure` - Exposure value to use."] -#[doc = ""] - + #[doc = "Sets the exposure value of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `exposure` - Exposure value to use."] + #[doc = ""] pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the white balance mode of the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`whiteBalance` - White balance mode to use."] -#[doc = ""] - + #[doc = "Sets the white balance mode of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `whiteBalance` - White balance mode to use."] + #[doc = ""] pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the white balance mode of the specified camera."] -#[doc = "TODO: Explain \"without base up\"?"] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`whiteBalance` - White balance mode to use."] -#[doc = ""] - + #[doc = "Sets the white balance mode of the specified camera."] + #[doc = ""] + #[doc = "TODO: Explain \"without base up\"?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `whiteBalance` - White balance mode to use."] + #[doc = ""] pub fn CAMU_SetWhiteBalanceWithoutBaseUp( select: u32_, whiteBalance: CAMU_WhiteBalance, @@ -14622,79 +14399,86 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the sharpness of the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`sharpness` - Sharpness to use."] -#[doc = ""] - + #[doc = "Sets the sharpness of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `sharpness` - Sharpness to use."] + #[doc = ""] pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether auto exposure is enabled on the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`autoWhiteBalance` - Whether auto exposure is enabled."] -#[doc = ""] - + #[doc = "Sets whether auto exposure is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `autoWhiteBalance` - Whether auto exposure is enabled."] + #[doc = ""] pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether auto exposure is enabled on the specified camera."] -#[doc = "# Arguments"] -#[doc = "`autoExposure` - Pointer to output the auto exposure state to."] -#[doc = "`select` - Camera to use."] -#[doc = ""] - + #[doc = "Gets whether auto exposure is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `autoExposure` - Pointer to output the auto exposure state to."] + #[doc = "* `select` - Camera to use."] + #[doc = ""] pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether auto white balance is enabled on the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`autoWhiteBalance` - Whether auto white balance is enabled."] -#[doc = ""] - + #[doc = "Sets whether auto white balance is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `autoWhiteBalance` - Whether auto white balance is enabled."] + #[doc = ""] pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether auto white balance is enabled on the specified camera."] -#[doc = "# Arguments"] -#[doc = "`autoWhiteBalance` - Pointer to output the auto white balance state to."] -#[doc = "`select` - Camera to use."] -#[doc = ""] - + #[doc = "Gets whether auto white balance is enabled on the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `autoWhiteBalance` - Pointer to output the auto white balance state to."] + #[doc = "* `select` - Camera to use."] + #[doc = ""] pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Flips the image of the specified camera in the specified context."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`flip` - Flip mode to use."] -#[doc = "`context` - Context to use."] -#[doc = ""] - + #[doc = "Flips the image of the specified camera in the specified context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `flip` - Flip mode to use."] + #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the image resolution of the given camera in the given context, in detail."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`width` - Width to use."] -#[doc = "`height` - Height to use."] -#[doc = "`cropX0` - First crop point X."] -#[doc = "`cropY0` - First crop point Y."] -#[doc = "`cropX1` - Second crop point X."] -#[doc = "`cropY1` - Second crop point Y."] -#[doc = "`context` - Context to use."] -#[doc = ""] - + #[doc = "Sets the image resolution of the given camera in the given context, in detail."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `width` - Width to use."] + #[doc = "* `height` - Height to use."] + #[doc = "* `cropX0` - First crop point X."] + #[doc = "* `cropY0` - First crop point Y."] + #[doc = "* `cropX1` - Second crop point X."] + #[doc = "* `cropY1` - Second crop point Y."] + #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetDetailSize( select: u32_, width: s16, @@ -14708,75 +14492,82 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the image resolution of the given camera in the given context."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`size` - Size to use."] -#[doc = "`context` - Context to use."] -#[doc = ""] - + #[doc = "Sets the image resolution of the given camera in the given context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `size` - Size to use."] + #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the frame rate of the given camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`frameRate` - Frame rate to use."] -#[doc = ""] - + #[doc = "Sets the frame rate of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `frameRate` - Frame rate to use."] + #[doc = ""] pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the photo mode of the given camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`photoMode` - Photo mode to use."] -#[doc = ""] - + #[doc = "Sets the photo mode of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `photoMode` - Photo mode to use."] + #[doc = ""] pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the special effects of the given camera in the given context."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`effect` - Effect to use."] -#[doc = "`context` - Context to use."] -#[doc = ""] - + #[doc = "Sets the special effects of the given camera in the given context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `effect` - Effect to use."] + #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the contrast mode of the given camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`contrast` - Contrast mode to use."] -#[doc = ""] - + #[doc = "Sets the contrast mode of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `contrast` - Contrast mode to use."] + #[doc = ""] pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the lens correction mode of the given camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`lensCorrection` - Lens correction mode to use."] -#[doc = ""] - + #[doc = "Sets the lens correction mode of the given camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `lensCorrection` - Lens correction mode to use."] + #[doc = ""] pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the output format of the given camera in the given context."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`format` - Format to output."] -#[doc = "`context` - Context to use."] -#[doc = ""] - + #[doc = "Sets the output format of the given camera in the given context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `format` - Format to output."] + #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn CAMU_SetOutputFormat( select: u32_, format: CAMU_OutputFormat, @@ -14785,15 +14576,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the region to base auto exposure off of for the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`x` - X of the region."] -#[doc = "`y` - Y of the region."] -#[doc = "`width` - Width of the region."] -#[doc = "`height` - Height of the region."] -#[doc = ""] - + #[doc = "Sets the region to base auto exposure off of for the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `x` - X of the region."] + #[doc = "* `y` - Y of the region."] + #[doc = "* `width` - Width of the region."] + #[doc = "* `height` - Height of the region."] + #[doc = ""] pub fn CAMU_SetAutoExposureWindow( select: u32_, x: s16, @@ -14804,15 +14596,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the region to base auto white balance off of for the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`x` - X of the region."] -#[doc = "`y` - Y of the region."] -#[doc = "`width` - Width of the region."] -#[doc = "`height` - Height of the region."] -#[doc = ""] - + #[doc = "Sets the region to base auto white balance off of for the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `x` - X of the region."] + #[doc = "* `y` - Y of the region."] + #[doc = "* `width` - Width of the region."] + #[doc = "* `height` - Height of the region."] + #[doc = ""] pub fn CAMU_SetAutoWhiteBalanceWindow( select: u32_, x: s16, @@ -14823,894 +14616,855 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets whether the specified camera's noise filter is enabled."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to use."] -#[doc = "`noiseFilter` - Whether the noise filter is enabled."] -#[doc = ""] - + #[doc = "Sets whether the specified camera's noise filter is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to use."] + #[doc = "* `noiseFilter` - Whether the noise filter is enabled."] + #[doc = ""] pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Synchronizes the specified cameras' vsync timing."] -#[doc = "# Arguments"] -#[doc = "`select1` - First camera."] -#[doc = "`select2` - Second camera."] -#[doc = ""] - + #[doc = "Synchronizes the specified cameras' vsync timing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select1` - First camera."] + #[doc = "* `select2` - Second camera."] + #[doc = ""] pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] -#[doc = "# Arguments"] -#[doc = "`timing` - Pointer to write timing data to. (size \"past sizeof(s64)\")"] -#[doc = "`port` - Port to use."] -#[doc = "`past` - Number of past timings to retrieve."] -#[doc = ""] - + #[doc = "Gets the vsync timing record of the specified camera for the specified number of signals."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timing` - Pointer to write timing data to. (size \"past * sizeof(s64)\")"] + #[doc = "* `port` - Port to use."] + #[doc = "* `past` - Number of past timings to retrieve."] + #[doc = ""] pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the specified camera's stereo camera calibration data."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to output the stereo camera data to."] -#[doc = ""] - + #[doc = "Gets the specified camera's stereo camera calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the stereo camera data to."] + #[doc = ""] pub fn CAMU_GetStereoCameraCalibrationData( data: *mut CAMU_StereoCameraCalibrationData, ) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the specified camera's stereo camera calibration data."] -#[doc = "# Arguments"] -#[doc = "`data` - Data to set."] -#[doc = ""] - + #[doc = "Sets the specified camera's stereo camera calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Data to set."] + #[doc = ""] pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to the specified I2C register of the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to write to."] -#[doc = "`addr` - Address to write to."] -#[doc = "`data` - Data to write."] -#[doc = ""] - + #[doc = "Writes to the specified I2C register of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to write to."] + #[doc = "* `addr` - Address to write to."] + #[doc = "* `data` - Data to write."] + #[doc = ""] pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to the specified MCU variable of the specified camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to write to."] -#[doc = "`addr` - Address to write to."] -#[doc = "`data` - Data to write."] -#[doc = ""] - + #[doc = "Writes to the specified MCU variable of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to write to."] + #[doc = "* `addr` - Address to write to."] + #[doc = "* `data` - Data to write."] + #[doc = ""] pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Reads the specified I2C register of the specified camera."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to read data to."] -#[doc = "`select` - Camera to read from."] -#[doc = "`addr` - Address to read."] -#[doc = ""] - + #[doc = "Reads the specified I2C register of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to read data to."] + #[doc = "* `select` - Camera to read from."] + #[doc = "* `addr` - Address to read."] + #[doc = ""] pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Reads the specified MCU variable of the specified camera."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to read data to."] -#[doc = "`select` - Camera to read from."] -#[doc = "`addr` - Address to read."] -#[doc = ""] - + #[doc = "Reads the specified MCU variable of the specified camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to read data to."] + #[doc = "* `select` - Camera to read from."] + #[doc = "* `addr` - Address to read."] + #[doc = ""] pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the specified camera's image quality calibration data."] -#[doc = "# Arguments"] -#[doc = "`data` - Data to set."] -#[doc = ""] - + #[doc = "Sets the specified camera's image quality calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Data to set."] + #[doc = ""] pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the specified camera's image quality calibration data."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to write the quality data to."] -#[doc = ""] - + #[doc = "Gets the specified camera's image quality calibration data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to write the quality data to."] + #[doc = ""] pub fn CAMU_GetImageQualityCalibrationData( data: *mut CAMU_ImageQualityCalibrationData, ) -> Result; } extern "C" { #[must_use] -#[doc = "Configures a camera with pre-packaged configuration data without a context."] -#[doc = "# Arguments"] -#[doc = "`Parameter` - to use."] -#[doc = ""] - + #[doc = "Configures a camera with pre-packaged configuration data without a context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Parameter` - to use."] + #[doc = ""] pub fn CAMU_SetPackageParameterWithoutContext( param: CAMU_PackageParameterCameraSelect, ) -> Result; } extern "C" { #[must_use] -#[doc = "Configures a camera with pre-packaged configuration data with a context."] -#[doc = "# Arguments"] -#[doc = "`Parameter` - to use."] -#[doc = ""] - + #[doc = "Configures a camera with pre-packaged configuration data with a context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Parameter` - to use."] + #[doc = ""] pub fn CAMU_SetPackageParameterWithContext(param: CAMU_PackageParameterContext) -> Result; } extern "C" { #[must_use] -#[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] -#[doc = "# Arguments"] -#[doc = "`Parameter` - to use."] -#[doc = ""] - + #[doc = "Configures a camera with pre-packaged configuration data without a context and extra resolution details."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Parameter` - to use."] + #[doc = ""] pub fn CAMU_SetPackageParameterWithContextDetail( param: CAMU_PackageParameterContextDetail, ) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the Y2R coefficient applied to image data by the camera."] -#[doc = "# Arguments"] -#[doc = "`coefficient` - Pointer to output the Y2R coefficient to."] -#[doc = ""] - + #[doc = "Gets the Y2R coefficient applied to image data by the camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coefficient` - Pointer to output the Y2R coefficient to."] + #[doc = ""] pub fn CAMU_GetSuitableY2rStandardCoefficient( coefficient: *mut Y2RU_StandardCoefficient, ) -> Result; } extern "C" { #[must_use] -#[doc = "Plays the specified shutter sound."] -#[doc = "# Arguments"] -#[doc = "`sound` - Shutter sound to play."] -#[doc = ""] - + #[doc = "Plays the specified shutter sound."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sound` - Shutter sound to play."] + #[doc = ""] pub fn CAMU_PlayShutterSound(sound: CAMU_ShutterSoundType) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the camera driver."] -#[doc = ""] - + #[doc = "Initializes the camera driver."] + #[doc = ""] pub fn CAMU_DriverInitialize() -> Result; } extern "C" { #[must_use] -#[doc = "Finalizes the camera driver."] -#[doc = ""] - + #[doc = "Finalizes the camera driver."] + #[doc = ""] pub fn CAMU_DriverFinalize() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current activated camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Pointer to output the current activated camera to."] -#[doc = ""] - + #[doc = "Gets the current activated camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Pointer to output the current activated camera to."] + #[doc = ""] pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current sleep camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Pointer to output the current sleep camera to."] -#[doc = ""] - + #[doc = "Gets the current sleep camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Pointer to output the current sleep camera to."] + #[doc = ""] pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current sleep camera."] -#[doc = "# Arguments"] -#[doc = "`select` - Camera to set."] -#[doc = ""] - + #[doc = "Sets the current sleep camera."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `select` - Camera to set."] + #[doc = ""] pub fn CAMU_SetSleepCamera(select: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] -#[doc = "# Arguments"] -#[doc = "`brightnessSynchronization` - Whether to enable brightness synchronization."] -#[doc = ""] - + #[doc = "Sets whether to enable synchronization of left and right camera brightnesses."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `brightnessSynchronization` - Whether to enable brightness synchronization."] + #[doc = ""] pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes CFGNOR."] -#[doc = "# Arguments"] -#[doc = "`value` - Unknown, usually 1."] -#[doc = ""] - + #[doc = "Initializes CFGNOR."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Unknown, usually 1."] + #[doc = ""] pub fn cfgnorInit(value: u8_) -> Result; } extern "C" { -#[doc = "Exits CFGNOR"] -#[doc = ""] - + #[doc = "Exits CFGNOR"] + #[doc = ""] pub fn cfgnorExit(); } extern "C" { #[must_use] -#[doc = "Dumps the NOR flash."] -#[doc = "# Arguments"] -#[doc = "`buf` - Buffer to dump to."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Dumps the NOR flash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to dump to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the NOR flash."] -#[doc = "# Arguments"] -#[doc = "`buf` - Buffer to write from."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Writes the NOR flash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to write from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CFGNOR session."] -#[doc = "# Arguments"] -#[doc = "`value` - Unknown, usually 1."] -#[doc = ""] - + #[doc = "Initializes the CFGNOR session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Unknown, usually 1."] + #[doc = ""] pub fn CFGNOR_Initialize(value: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Shuts down the CFGNOR session."] -#[doc = ""] - + #[doc = "Shuts down the CFGNOR session."] + #[doc = ""] pub fn CFGNOR_Shutdown() -> Result; } extern "C" { #[must_use] -#[doc = "Reads data from NOR."] -#[doc = "# Arguments"] -#[doc = "`offset` - Offset to read from."] -#[doc = "`buf` - Buffer to read data to."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Reads data from NOR."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `buf` - Buffer to read data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes data to NOR."] -#[doc = "# Arguments"] -#[doc = "`offset` - Offset to write to."] -#[doc = "`buf` - Buffer to write data from."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Writes data to NOR."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `buf` - Buffer to write data from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result; } #[doc = "Japan"] #[doc = ""] - pub const CFG_REGION_JPN: CFG_Region = 0; #[doc = "USA"] #[doc = ""] - pub const CFG_REGION_USA: CFG_Region = 1; #[doc = "Europe"] #[doc = ""] - pub const CFG_REGION_EUR: CFG_Region = 2; #[doc = "Australia"] #[doc = ""] - pub const CFG_REGION_AUS: CFG_Region = 3; #[doc = "China"] #[doc = ""] - pub const CFG_REGION_CHN: CFG_Region = 4; #[doc = "Korea"] #[doc = ""] - pub const CFG_REGION_KOR: CFG_Region = 5; #[doc = "Taiwan"] #[doc = ""] - pub const CFG_REGION_TWN: CFG_Region = 6; #[doc = "Configuration region values."] #[doc = ""] - pub type CFG_Region = ::libc::c_uint; #[doc = "Japanese"] #[doc = ""] - pub const CFG_LANGUAGE_JP: CFG_Language = 0; #[doc = "English"] #[doc = ""] - pub const CFG_LANGUAGE_EN: CFG_Language = 1; #[doc = "French"] #[doc = ""] - pub const CFG_LANGUAGE_FR: CFG_Language = 2; #[doc = "German"] #[doc = ""] - pub const CFG_LANGUAGE_DE: CFG_Language = 3; #[doc = "Italian"] #[doc = ""] - pub const CFG_LANGUAGE_IT: CFG_Language = 4; #[doc = "Spanish"] #[doc = ""] - pub const CFG_LANGUAGE_ES: CFG_Language = 5; #[doc = "Simplified Chinese"] #[doc = ""] - pub const CFG_LANGUAGE_ZH: CFG_Language = 6; #[doc = "Korean"] #[doc = ""] - pub const CFG_LANGUAGE_KO: CFG_Language = 7; #[doc = "Dutch"] #[doc = ""] - pub const CFG_LANGUAGE_NL: CFG_Language = 8; #[doc = "Portugese"] #[doc = ""] - pub const CFG_LANGUAGE_PT: CFG_Language = 9; #[doc = "Russian"] #[doc = ""] - pub const CFG_LANGUAGE_RU: CFG_Language = 10; #[doc = "Traditional Chinese"] #[doc = ""] - pub const CFG_LANGUAGE_TW: CFG_Language = 11; #[doc = "Configuration language values."] #[doc = ""] - pub type CFG_Language = ::libc::c_uint; #[doc = "Old 3DS (CTR)"] #[doc = ""] - pub const CFG_MODEL_3DS: CFG_SystemModel = 0; #[doc = "Old 3DS XL (SPR)"] #[doc = ""] - pub const CFG_MODEL_3DSXL: CFG_SystemModel = 1; #[doc = "New 3DS (KTR)"] #[doc = ""] - pub const CFG_MODEL_N3DS: CFG_SystemModel = 2; #[doc = "Old 2DS (FTR)"] #[doc = ""] - pub const CFG_MODEL_2DS: CFG_SystemModel = 3; #[doc = "New 3DS XL (RED)"] #[doc = ""] - pub const CFG_MODEL_N3DSXL: CFG_SystemModel = 4; #[doc = "New 2DS XL (JAN)"] #[doc = ""] - pub const CFG_MODEL_N2DSXL: CFG_SystemModel = 5; pub type CFG_SystemModel = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes CFGU."] -#[doc = ""] - + #[doc = "Initializes CFGU."] + #[doc = ""] pub fn cfguInit() -> Result; } extern "C" { -#[doc = "Exits CFGU."] -#[doc = ""] - + #[doc = "Exits CFGU."] + #[doc = ""] pub fn cfguExit(); } extern "C" { #[must_use] -#[doc = "Gets the system's region from secure info."] -#[doc = "# Arguments"] -#[doc = "`region` - Pointer to output the region to. (see [`CFG_Region)`]"] -#[doc = ""] - + #[doc = "Gets the system's region from secure info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `region` - Pointer to output the region to. (see [`CFG_Region)`]"] + #[doc = ""] pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Generates a console-unique hash."] -#[doc = "# Arguments"] -#[doc = "`appIDSalt` - Salt to use."] -#[doc = "`hash` - Pointer to output the hash to."] -#[doc = ""] - + #[doc = "Generates a console-unique hash."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `appIDSalt` - Salt to use."] + #[doc = "* `hash` - Pointer to output the hash to."] + #[doc = ""] pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the system's region is Canada or USA."] -#[doc = "# Arguments"] -#[doc = "`value` - Pointer to output the result to. (0 = no, 1 = yes)"] -#[doc = ""] - + #[doc = "Gets whether the system's region is Canada or USA."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Pointer to output the result to. (0 = no, 1 = yes)"] + #[doc = ""] pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's model."] -#[doc = "# Arguments"] -#[doc = "`model` - Pointer to output the model to. (see [`CFG_SystemModel)`]"] -#[doc = ""] - + #[doc = "Gets the system's model."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `model` - Pointer to output the model to. (see [`CFG_SystemModel)`]"] + #[doc = ""] pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the system is a 2DS."] -#[doc = "# Arguments"] -#[doc = "`value` - Pointer to output the result to. (0 = yes, 1 = no)"] -#[doc = ""] - + #[doc = "Gets whether the system is a 2DS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Pointer to output the result to. (0 = yes, 1 = no)"] + #[doc = ""] pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a string representing a country code."] -#[doc = "# Arguments"] -#[doc = "`code` - Country code to use."] -#[doc = "`string` - Pointer to output the string to."] -#[doc = ""] - + #[doc = "Gets a string representing a country code."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `code` - Country code to use."] + #[doc = "* `string` - Pointer to output the string to."] + #[doc = ""] pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a country code ID from its string."] -#[doc = "# Arguments"] -#[doc = "`string` - String to use."] -#[doc = "`code` - Pointer to output the country code to."] -#[doc = ""] - + #[doc = "Gets a country code ID from its string."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `string` - String to use."] + #[doc = "* `code` - Pointer to output the country code to."] + #[doc = ""] pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if NFC (code name: fangate) is supported."] -#[doc = "# Arguments"] -#[doc = "`isSupported` - pointer to the output the result to."] -#[doc = ""] - + #[doc = "Checks if NFC (code name: fangate) is supported."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `isSupported` - pointer to the output the result to."] + #[doc = ""] pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a config info block with flags = 2."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the data to retrieve."] -#[doc = "`blkID` - ID of the block to retrieve."] -#[doc = "`outData` - Pointer to write the block data to."] -#[doc = ""] - + #[doc = "Gets a config info block with flags = 2."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `outData` - Pointer to write the block data to."] + #[doc = ""] pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a config info block with flags = 4."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the data to retrieve."] -#[doc = "`blkID` - ID of the block to retrieve."] -#[doc = "`outData` - Pointer to write the block data to."] -#[doc = ""] - + #[doc = "Gets a config info block with flags = 4."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `outData` - Pointer to write the block data to."] + #[doc = ""] pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Gets a config info block with flags = 8."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the data to retrieve."] -#[doc = "`blkID` - ID of the block to retrieve."] -#[doc = "`outData` - Pointer to write the block data to."] -#[doc = ""] - + #[doc = "Gets a config info block with flags = 8."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `outData` - Pointer to write the block data to."] + #[doc = ""] pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a config info block with flags = 4."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the data to retrieve."] -#[doc = "`blkID` - ID of the block to retrieve."] -#[doc = "`inData` - Pointer to block data to write."] -#[doc = ""] - + #[doc = "Sets a config info block with flags = 4."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `inData` - Pointer to block data to write."] + #[doc = ""] pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a config info block with flags = 8."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the data to retrieve."] -#[doc = "`blkID` - ID of the block to retrieve."] -#[doc = "`inData` - Pointer to block data to write."] -#[doc = ""] - + #[doc = "Sets a config info block with flags = 8."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to retrieve."] + #[doc = "* `blkID` - ID of the block to retrieve."] + #[doc = "* `inData` - Pointer to block data to write."] + #[doc = ""] pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the CFG buffer in memory to the savegame in NAND."] -#[doc = ""] - + #[doc = "Writes the CFG buffer in memory to the savegame in NAND."] + #[doc = ""] pub fn CFG_UpdateConfigSavegame() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's language."] -#[doc = "# Arguments"] -#[doc = "`language` - Pointer to write the language to. (see [`CFG_Language)`]"] -#[doc = ""] - + #[doc = "Gets the system's language."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `language` - Pointer to write the language to. (see [`CFG_Language)`]"] + #[doc = ""] pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] -#[doc = ""] - + #[doc = "Deletes the NAND LocalFriendCodeSeed file, then recreates it using the LocalFriendCodeSeed data stored in memory."] + #[doc = ""] pub fn CFGI_RestoreLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] -#[doc = ""] - + #[doc = "Deletes the NAND SecureInfo file, then recreates it using the SecureInfo data stored in memory."] + #[doc = ""] pub fn CFGI_RestoreSecureInfo() -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] -#[doc = ""] - + #[doc = "Deletes the \"config\" file stored in the NAND Config_Savegame."] + #[doc = ""] pub fn CFGI_DeleteConfigSavefile() -> Result; } extern "C" { #[must_use] -#[doc = "Formats Config_Savegame."] -#[doc = ""] - + #[doc = "Formats Config_Savegame."] + #[doc = ""] pub fn CFGI_FormatConfig() -> Result; } extern "C" { #[must_use] -#[doc = "Clears parental controls"] -#[doc = ""] - + #[doc = "Clears parental controls"] + #[doc = ""] pub fn CFGI_ClearParentalControls() -> Result; } extern "C" { #[must_use] -#[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] -#[doc = ""] - + #[doc = "Verifies the RSA signature for the LocalFriendCodeSeed data already stored in memory."] + #[doc = ""] pub fn CFGI_VerifySigLocalFriendCodeSeed() -> Result; } extern "C" { #[must_use] -#[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] -#[doc = ""] - + #[doc = "Verifies the RSA signature for the SecureInfo data already stored in memory."] + #[doc = ""] pub fn CFGI_VerifySigSecureInfo() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's serial number."] -#[doc = "# Arguments"] -#[doc = "`serial` - Pointer to output the serial to. (This is normally 0xF)"] -#[doc = ""] - + #[doc = "Gets the system's serial number."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `serial` - Pointer to output the serial to. (This is normally 0xF)"] + #[doc = ""] pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] -#[doc = ""] - + #[doc = "Gets the 0x110-byte buffer containing the data for the LocalFriendCodeSeed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x110-bytes)"] + #[doc = ""] pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 64-bit local friend code seed."] -#[doc = "# Arguments"] -#[doc = "`seed` - Pointer to write the friend code seed to."] -#[doc = ""] - + #[doc = "Gets the 64-bit local friend code seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to write the friend code seed to."] + #[doc = ""] pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 0x11-byte data following the SecureInfo signature."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] -#[doc = ""] - + #[doc = "Gets the 0x11-byte data following the SecureInfo signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x11-bytes)"] + #[doc = ""] pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] -#[doc = "# Arguments"] -#[doc = "`data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] -#[doc = ""] - + #[doc = "Gets the 0x100-byte RSA-2048 SecureInfo signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `data` - Pointer to output the buffer. (The size must be at least 0x100-bytes)"] + #[doc = ""] pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result; } #[doc = "PCM8"] #[doc = ""] - pub const CSND_ENCODING_PCM8: _bindgen_ty_17 = 0; #[doc = "PCM16"] #[doc = ""] - pub const CSND_ENCODING_PCM16: _bindgen_ty_17 = 1; #[doc = "IMA-ADPCM"] #[doc = ""] - pub const CSND_ENCODING_ADPCM: _bindgen_ty_17 = 2; #[doc = "PSG (Similar to DS?)"] #[doc = ""] - pub const CSND_ENCODING_PSG: _bindgen_ty_17 = 3; #[doc = "CSND encodings."] #[doc = ""] - pub type _bindgen_ty_17 = ::libc::c_uint; #[doc = "Manual loop."] #[doc = ""] - pub const CSND_LOOPMODE_MANUAL: _bindgen_ty_18 = 0; #[doc = "Normal loop."] #[doc = ""] - pub const CSND_LOOPMODE_NORMAL: _bindgen_ty_18 = 1; #[doc = "Do not loop."] #[doc = ""] - pub const CSND_LOOPMODE_ONESHOT: _bindgen_ty_18 = 2; #[doc = "Don't reload."] #[doc = ""] - pub const CSND_LOOPMODE_NORELOAD: _bindgen_ty_18 = 3; #[doc = "CSND loop modes."] #[doc = ""] - pub type _bindgen_ty_18 = ::libc::c_uint; #[doc = "Linear interpolation."] #[doc = ""] - pub const SOUND_LINEAR_INTERP: _bindgen_ty_19 = 64; #[doc = "Repeat the sound."] #[doc = ""] - pub const SOUND_REPEAT: _bindgen_ty_19 = 1024; #[doc = "Play the sound once."] #[doc = ""] - pub const SOUND_ONE_SHOT: _bindgen_ty_19 = 2048; #[doc = "PCM8"] #[doc = ""] - pub const SOUND_FORMAT_8BIT: _bindgen_ty_19 = 0; #[doc = "PCM16"] #[doc = ""] - pub const SOUND_FORMAT_16BIT: _bindgen_ty_19 = 4096; #[doc = "ADPCM"] #[doc = ""] - pub const SOUND_FORMAT_ADPCM: _bindgen_ty_19 = 8192; #[doc = "PSG"] #[doc = ""] - pub const SOUND_FORMAT_PSG: _bindgen_ty_19 = 12288; #[doc = "Enable sound."] #[doc = ""] - pub const SOUND_ENABLE: _bindgen_ty_19 = 16384; #[doc = "Sound flags."] #[doc = ""] - pub type _bindgen_ty_19 = ::libc::c_uint; #[doc = "Repeat capture."] #[doc = ""] - pub const CAPTURE_REPEAT: _bindgen_ty_20 = 0; #[doc = "Capture once."] #[doc = ""] - pub const CAPTURE_ONE_SHOT: _bindgen_ty_20 = 1; #[doc = "PCM16"] #[doc = ""] - pub const CAPTURE_FORMAT_16BIT: _bindgen_ty_20 = 0; #[doc = "PCM8"] #[doc = ""] - pub const CAPTURE_FORMAT_8BIT: _bindgen_ty_20 = 2; #[doc = "Enable capture."] #[doc = ""] - pub const CAPTURE_ENABLE: _bindgen_ty_20 = 32768; #[doc = "Capture modes."] #[doc = ""] - pub type _bindgen_ty_20 = ::libc::c_uint; #[doc = "0.0% duty cycle"] #[doc = ""] - pub const DutyCycle_0: CSND_DutyCycle = 7; #[doc = "12.5% duty cycle"] #[doc = ""] - pub const DutyCycle_12: CSND_DutyCycle = 0; #[doc = "25.0% duty cycle"] #[doc = ""] - pub const DutyCycle_25: CSND_DutyCycle = 1; #[doc = "37.5% duty cycle"] #[doc = ""] - pub const DutyCycle_37: CSND_DutyCycle = 2; #[doc = "50.0% duty cycle"] #[doc = ""] - pub const DutyCycle_50: CSND_DutyCycle = 3; #[doc = "62.5% duty cycle"] #[doc = ""] - pub const DutyCycle_62: CSND_DutyCycle = 4; #[doc = "75.0% duty cycle"] #[doc = ""] - pub const DutyCycle_75: CSND_DutyCycle = 5; #[doc = "87.5% duty cycle"] #[doc = ""] - pub const DutyCycle_87: CSND_DutyCycle = 6; #[doc = "Duty cycles for a PSG channel."] #[doc = ""] - pub type CSND_DutyCycle = ::libc::c_uint; #[doc = "Channel info."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub union CSND_ChnInfo { -#[doc = "Raw values."] -#[doc = ""] - + #[doc = "Raw values."] + #[doc = ""] pub value: [u32_; 3usize], pub __bindgen_anon_1: CSND_ChnInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_ChnInfo__bindgen_ty_1 { -#[doc = "Channel active."] -#[doc = ""] - + #[doc = "Channel active."] + #[doc = ""] pub active: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad1: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad2: u16_, -#[doc = "Current ADPCM sample."] -#[doc = ""] - + #[doc = "Current ADPCM sample."] + #[doc = ""] pub adpcmSample: s16, -#[doc = "Current ADPCM index."] -#[doc = ""] - + #[doc = "Current ADPCM index."] + #[doc = ""] pub adpcmIndex: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad3: u8_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknownZero: u32_, } impl Default for CSND_ChnInfo { @@ -15724,34 +15478,28 @@ impl Default for CSND_ChnInfo { } #[doc = "Capture info."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub union CSND_CapInfo { -#[doc = "Raw values."] -#[doc = ""] - + #[doc = "Raw values."] + #[doc = ""] pub value: [u32_; 2usize], pub __bindgen_anon_1: CSND_CapInfo__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CSND_CapInfo__bindgen_ty_1 { -#[doc = "Capture active."] -#[doc = ""] - + #[doc = "Capture active."] + #[doc = ""] pub active: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad1: u8_, -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub _pad2: u16_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unknownZero: u32_, } impl Default for CSND_CapInfo { @@ -15764,222 +15512,238 @@ impl Default for CSND_CapInfo { } } extern "C" { -#[doc = "CSND shared memory."] -#[doc = ""] - + #[doc = "CSND shared memory."] + #[doc = ""] pub static mut csndSharedMem: *mut vu32; } extern "C" { -#[doc = "CSND shared memory size."] -#[doc = ""] - + #[doc = "CSND shared memory size."] + #[doc = ""] pub static mut csndSharedMemSize: u32_; } extern "C" { -#[doc = "Bitmask of channels that are allowed for usage."] -#[doc = ""] - + #[doc = "Bitmask of channels that are allowed for usage."] + #[doc = ""] pub static mut csndChannels: u32_; } extern "C" { #[must_use] -#[doc = "Acquires a capture unit."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Pointer to output the capture unit to."] -#[doc = ""] - + #[doc = "Acquires a capture unit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Pointer to output the capture unit to."] + #[doc = ""] pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Releases a capture unit."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to release."] -#[doc = ""] - + #[doc = "Releases a capture unit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to release."] + #[doc = ""] pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes the data cache of a memory region."] -#[doc = "# Arguments"] -#[doc = "`adr` - Address of the memory region."] -#[doc = "`size` - Size of the memory region."] -#[doc = ""] - + #[doc = "Flushes the data cache of a memory region."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address of the memory region."] + #[doc = "* `size` - Size of the memory region."] + #[doc = ""] pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Stores the data cache of a memory region."] -#[doc = "# Arguments"] -#[doc = "`adr` - Address of the memory region."] -#[doc = "`size` - Size of the memory region."] -#[doc = ""] - + #[doc = "Stores the data cache of a memory region."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address of the memory region."] + #[doc = "* `size` - Size of the memory region."] + #[doc = ""] pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates the data cache of a memory region."] -#[doc = "# Arguments"] -#[doc = "`adr` - Address of the memory region."] -#[doc = "`size` - Size of the memory region."] -#[doc = ""] - + #[doc = "Invalidates the data cache of a memory region."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `adr` - Address of the memory region."] + #[doc = "* `size` - Size of the memory region."] + #[doc = ""] pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Resets CSND."] -#[doc = "Note: Currently breaks sound, don't use for now!"] -#[doc = ""] - + #[doc = "Resets CSND."] + #[doc = ""] + #[doc = "Note: Currently breaks sound, don't use for now!"] + #[doc = ""] pub fn CSND_Reset() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes CSND."] -#[doc = ""] - + #[doc = "Initializes CSND."] + #[doc = ""] pub fn csndInit() -> Result; } extern "C" { -#[doc = "Exits CSND."] -#[doc = ""] - + #[doc = "Exits CSND."] + #[doc = ""] pub fn csndExit(); } extern "C" { -#[doc = "Adds a command to the list, returning a buffer to write arguments to."] -#[doc = "Returns:"] -#[doc = "A buffer to write command arguments to."] -#[doc = "# Arguments"] -#[doc = "`cmdid` - ID of the command to add."] -#[doc = ""] - + #[doc = "Adds a command to the list, returning a buffer to write arguments to."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A buffer to write command arguments to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cmdid` - ID of the command to add."] + #[doc = ""] pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32_; } extern "C" { -#[doc = "Adds a command to the list, copying its arguments from a buffer."] -#[doc = "# Arguments"] -#[doc = "`cmdid` - ID of the command to add."] -#[doc = "`cmdparams` - Buffer containing the command's parameters."] -#[doc = ""] - + #[doc = "Adds a command to the list, copying its arguments from a buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cmdid` - ID of the command to add."] + #[doc = "* `cmdparams` - Buffer containing the command's parameters."] + #[doc = ""] pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_); } extern "C" { #[must_use] -#[doc = "Executes pending CSND commands."] -#[doc = "# Arguments"] -#[doc = "`waitDone` - Whether to wait until the commands have finished executing."] -#[doc = ""] - + #[doc = "Executes pending CSND commands."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `waitDone` - Whether to wait until the commands have finished executing."] + #[doc = ""] pub fn csndExecCmds(waitDone: bool) -> Result; } extern "C" { -#[doc = "Sets a channel's play state, resetting registers on stop."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`value` - Play state to set."] -#[doc = ""] - + #[doc = "Sets a channel's play state, resetting registers on stop."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Play state to set."] + #[doc = ""] pub fn CSND_SetPlayStateR(channel: u32_, value: u32_); } extern "C" { -#[doc = "Sets a channel's play state."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`value` - Play state to set."] -#[doc = ""] - + #[doc = "Sets a channel's play state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Play state to set."] + #[doc = ""] pub fn CSND_SetPlayState(channel: u32_, value: u32_); } extern "C" { -#[doc = "Sets a channel's encoding."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`value` - Encoding to set."] -#[doc = ""] - + #[doc = "Sets a channel's encoding."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Encoding to set."] + #[doc = ""] pub fn CSND_SetEncoding(channel: u32_, value: u32_); } extern "C" { -#[doc = "Sets the data of a channel's block."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`block` - Block to set."] -#[doc = "`physaddr` - Physical address to set the block to."] -#[doc = "`size` - Size of the block."] -#[doc = ""] - + #[doc = "Sets the data of a channel's block."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `block` - Block to set."] + #[doc = "* `physaddr` - Physical address to set the block to."] + #[doc = "* `size` - Size of the block."] + #[doc = ""] pub fn CSND_SetBlock(channel: u32_, block: ::libc::c_int, physaddr: u32_, size: u32_); } extern "C" { -#[doc = "Sets whether to loop a channel."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`value` - Whether to loop the channel."] -#[doc = ""] - + #[doc = "Sets whether to loop a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `value` - Whether to loop the channel."] + #[doc = ""] pub fn CSND_SetLooping(channel: u32_, value: u32_); } extern "C" { -#[doc = "Sets bit 7 of a channel."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`set` - Value to set."] -#[doc = ""] - + #[doc = "Sets bit 7 of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `set` - Value to set."] + #[doc = ""] pub fn CSND_SetBit7(channel: u32_, set: bool); } extern "C" { -#[doc = "Sets whether a channel should use interpolation."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`interp` - Whether to use interpolation."] -#[doc = ""] - + #[doc = "Sets whether a channel should use interpolation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `interp` - Whether to use interpolation."] + #[doc = ""] pub fn CSND_SetInterp(channel: u32_, interp: bool); } extern "C" { -#[doc = "Sets a channel's duty."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`duty` - Duty to set."] -#[doc = ""] - + #[doc = "Sets a channel's duty."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `duty` - Duty to set."] + #[doc = ""] pub fn CSND_SetDuty(channel: u32_, duty: CSND_DutyCycle); } extern "C" { -#[doc = "Sets a channel's timer."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`timer` - Timer to set."] -#[doc = ""] - + #[doc = "Sets a channel's timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `timer` - Timer to set."] + #[doc = ""] pub fn CSND_SetTimer(channel: u32_, timer: u32_); } extern "C" { -#[doc = "Sets a channel's volume."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`chnVolumes` - Channel volume data to set."] -#[doc = "`capVolumes` - Capture volume data to set."] -#[doc = ""] - + #[doc = "Sets a channel's volume."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `chnVolumes` - Channel volume data to set."] + #[doc = "* `capVolumes` - Capture volume data to set."] + #[doc = ""] pub fn CSND_SetVol(channel: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { -#[doc = "Sets a channel's ADPCM state."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`block` - Current block."] -#[doc = "`sample` - Current sample."] -#[doc = "`index` - Current index."] -#[doc = ""] - + #[doc = "Sets a channel's ADPCM state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `block` - Current block."] + #[doc = "* `sample` - Current sample."] + #[doc = "* `index` - Current index."] + #[doc = ""] pub fn CSND_SetAdpcmState( channel: u32_, block: ::libc::c_int, @@ -15988,25 +15752,27 @@ extern "C" { ); } extern "C" { -#[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to use."] -#[doc = "`reload` - Whether to reload ADPCM data."] -#[doc = ""] - + #[doc = "Sets a whether channel's ADPCM data should be reloaded when the second block is played."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to use."] + #[doc = "* `reload` - Whether to reload ADPCM data."] + #[doc = ""] pub fn CSND_SetAdpcmReload(channel: u32_, reload: bool); } extern "C" { -#[doc = "Sets CSND's channel registers."] -#[doc = "# Arguments"] -#[doc = "`flags` - Flags to set."] -#[doc = "`physaddr0` - Physical address of the first buffer to play."] -#[doc = "`physaddr1` - Physical address of the second buffer to play."] -#[doc = "`totalbytesize` - Total size of the data to play."] -#[doc = "`chnVolumes` - Channel volume data."] -#[doc = "`capVolumes` - Capture volume data."] -#[doc = ""] - + #[doc = "Sets CSND's channel registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to set."] + #[doc = "* `physaddr0` - Physical address of the first buffer to play."] + #[doc = "* `physaddr1` - Physical address of the second buffer to play."] + #[doc = "* `totalbytesize` - Total size of the data to play."] + #[doc = "* `chnVolumes` - Channel volume data."] + #[doc = "* `capVolumes` - Capture volume data."] + #[doc = ""] pub fn CSND_SetChnRegs( flags: u32_, physaddr0: u32_, @@ -16017,14 +15783,15 @@ extern "C" { ); } extern "C" { -#[doc = "Sets CSND's PSG channel registers."] -#[doc = "# Arguments"] -#[doc = "`flags` - Flags to set."] -#[doc = "`chnVolumes` - Channel volume data."] -#[doc = "`capVolumes` - Capture volume data."] -#[doc = "`duty` - Duty value to set."] -#[doc = ""] - + #[doc = "Sets CSND's PSG channel registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to set."] + #[doc = "* `chnVolumes` - Channel volume data."] + #[doc = "* `capVolumes` - Capture volume data."] + #[doc = "* `duty` - Duty value to set."] + #[doc = ""] pub fn CSND_SetChnRegsPSG( flags: u32_, chnVolumes: u32_, @@ -16033,114 +15800,126 @@ extern "C" { ); } extern "C" { -#[doc = "Sets CSND's noise channel registers."] -#[doc = "# Arguments"] -#[doc = "`flags` - Flags to set."] -#[doc = "`chnVolumes` - Channel volume data."] -#[doc = "`capVolumes` - Capture volume data."] -#[doc = ""] - + #[doc = "Sets CSND's noise channel registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flags` - Flags to set."] + #[doc = "* `chnVolumes` - Channel volume data."] + #[doc = "* `capVolumes` - Capture volume data."] + #[doc = ""] pub fn CSND_SetChnRegsNoise(flags: u32_, chnVolumes: u32_, capVolumes: u32_); } extern "C" { -#[doc = "Sets whether a capture unit is enabled."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to use."] -#[doc = "`enable` - Whether to enable the capture unit."] -#[doc = ""] - + #[doc = "Sets whether a capture unit is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `enable` - Whether to enable the capture unit."] + #[doc = ""] pub fn CSND_CapEnable(capUnit: u32_, enable: bool); } extern "C" { -#[doc = "Sets whether a capture unit should repeat."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to use."] -#[doc = "`repeat` - Whether the capture unit should repeat."] -#[doc = ""] - + #[doc = "Sets whether a capture unit should repeat."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `repeat` - Whether the capture unit should repeat."] + #[doc = ""] pub fn CSND_CapSetRepeat(capUnit: u32_, repeat: bool); } extern "C" { -#[doc = "Sets a capture unit's format."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to use."] -#[doc = "`eightbit` - Format to use."] -#[doc = ""] - + #[doc = "Sets a capture unit's format."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `eightbit` - Format to use."] + #[doc = ""] pub fn CSND_CapSetFormat(capUnit: u32_, eightbit: bool); } extern "C" { -#[doc = "Sets a capture unit's second bit."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to use."] -#[doc = "`set` - Value to set."] -#[doc = ""] - + #[doc = "Sets a capture unit's second bit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `set` - Value to set."] + #[doc = ""] pub fn CSND_CapSetBit2(capUnit: u32_, set: bool); } extern "C" { -#[doc = "Sets a capture unit's timer."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to use."] -#[doc = "`timer` - Timer to set."] -#[doc = ""] - + #[doc = "Sets a capture unit's timer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `timer` - Timer to set."] + #[doc = ""] pub fn CSND_CapSetTimer(capUnit: u32_, timer: u32_); } extern "C" { -#[doc = "Sets a capture unit's buffer."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to use."] -#[doc = "`addr` - Buffer address to use."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Sets a capture unit's buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `addr` - Buffer address to use."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn CSND_CapSetBuffer(capUnit: u32_, addr: u32_, size: u32_); } extern "C" { -#[doc = "Sets a capture unit's capture registers."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to use."] -#[doc = "`flags` - Capture unit flags."] -#[doc = "`addr` - Capture unit buffer address."] -#[doc = "`size` - Buffer size."] -#[doc = ""] - + #[doc = "Sets a capture unit's capture registers."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to use."] + #[doc = "* `flags` - Capture unit flags."] + #[doc = "* `addr` - Capture unit buffer address."] + #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_); } extern "C" { #[must_use] -#[doc = "Sets up DSP flags."] -#[doc = "# Arguments"] -#[doc = "`waitDone` - Whether to wait for completion."] -#[doc = ""] - + #[doc = "Sets up DSP flags."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `waitDone` - Whether to wait for completion."] + #[doc = ""] pub fn CSND_SetDspFlags(waitDone: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Updates CSND information."] -#[doc = "# Arguments"] -#[doc = "`waitDone` - Whether to wait for completion."] -#[doc = ""] - + #[doc = "Updates CSND information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `waitDone` - Whether to wait for completion."] + #[doc = ""] pub fn CSND_UpdateInfo(waitDone: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Plays a sound."] -#[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] -#[doc = "# Arguments"] -#[doc = "`chn` - Channel to play the sound on."] -#[doc = "`flags` - Flags containing information about the sound."] -#[doc = "`sampleRate` - Sample rate of the sound."] -#[doc = "`vol` - The volume, ranges from 0.0 to 1.0 included."] -#[doc = "`pan` - The pan, ranges from -1.0 to 1.0 included."] -#[doc = "`data0` - First block of sound data."] -#[doc = "`data1` - Second block of sound data. This is the block that will be looped over."] -#[doc = "`size` - Size of the sound data."] -#[doc = ""] - + #[doc = "Plays a sound."] + #[doc = ""] + #[doc = "In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `chn` - Channel to play the sound on."] + #[doc = "* `flags` - Flags containing information about the sound."] + #[doc = "* `sampleRate` - Sample rate of the sound."] + #[doc = "* `vol` - The volume, ranges from 0.0 to 1.0 included."] + #[doc = "* `pan` - The pan, ranges from -1.0 to 1.0 included."] + #[doc = "* `data0` - First block of sound data."] + #[doc = "* `data1` - Second block of sound data. This is the block that will be looped over."] + #[doc = "* `size` - Size of the sound data."] + #[doc = ""] pub fn csndPlaySound( chn: ::libc::c_int, flags: u32_, @@ -16153,105 +15932,107 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Gets CSND's DSP flags."] -#[doc = "Note: Requires previous CSND_UpdateInfo()"] -#[doc = "# Arguments"] -#[doc = "`outSemFlags` - Pointer to write semaphore flags to."] -#[doc = "`outIrqFlags` - Pointer to write interrupt flags to."] -#[doc = ""] - + #[doc = "Gets CSND's DSP flags."] + #[doc = ""] + #[doc = "Note: Requires previous CSND_UpdateInfo()"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outSemFlags` - Pointer to write semaphore flags to."] + #[doc = "* `outIrqFlags` - Pointer to write interrupt flags to."] + #[doc = ""] pub fn csndGetDspFlags(outSemFlags: *mut u32_, outIrqFlags: *mut u32_); } extern "C" { -#[doc = "Gets a channel's information."] -#[doc = "Note: Requires previous CSND_UpdateInfo()"] -#[doc = "Returns:"] -#[doc = "The channel's information."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to get information for."] -#[doc = ""] - + #[doc = "Gets a channel's information."] + #[doc = ""] + #[doc = "Note: Requires previous CSND_UpdateInfo()"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The channel's information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to get information for."] + #[doc = ""] pub fn csndGetChnInfo(channel: u32_) -> *mut CSND_ChnInfo; } extern "C" { -#[doc = "Gets a capture unit's information."] -#[doc = "Note: Requires previous CSND_UpdateInfo()"] -#[doc = "Returns:"] -#[doc = "The capture unit's information."] -#[doc = "# Arguments"] -#[doc = "`capUnit` - Capture unit to get information for."] -#[doc = ""] - + #[doc = "Gets a capture unit's information."] + #[doc = ""] + #[doc = "Note: Requires previous CSND_UpdateInfo()"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The capture unit's information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capUnit` - Capture unit to get information for."] + #[doc = ""] pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo; } extern "C" { #[must_use] -#[doc = "Gets a channel's state."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to get the state of."] -#[doc = "`out` - Pointer to output channel information to."] -#[doc = ""] - + #[doc = "Gets a channel's state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to get the state of."] + #[doc = "* `out` - Pointer to output channel information to."] + #[doc = ""] pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether a channel is playing."] -#[doc = "# Arguments"] -#[doc = "`channel` - Channel to check."] -#[doc = "`status` - Pointer to output the channel status to."] -#[doc = ""] - + #[doc = "Gets whether a channel is playing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Channel to check."] + #[doc = "* `status` - Pointer to output the channel status to."] + #[doc = ""] pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result; } #[doc = "Pipe interrupt."] #[doc = ""] - pub const DSP_INTERRUPT_PIPE: DSP_InterruptType = 2; #[doc = "DSP interrupt types."] #[doc = ""] - pub type DSP_InterruptType = ::libc::c_uint; #[doc = "DSP is going to sleep."] #[doc = ""] - pub const DSPHOOK_ONSLEEP: DSP_HookType = 0; #[doc = "DSP is waking up."] #[doc = ""] - pub const DSPHOOK_ONWAKEUP: DSP_HookType = 1; #[doc = "DSP was sleeping and the app was cancelled."] #[doc = ""] - pub const DSPHOOK_ONCANCEL: DSP_HookType = 2; #[doc = "DSP hook types."] #[doc = ""] - pub type DSP_HookType = ::libc::c_uint; #[doc = "DSP hook function."] #[doc = ""] - pub type dspHookFn = ::core::option::Option; #[doc = "DSP hook cookie."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_dspHookCookie { -#[doc = "Next cookie."] -#[doc = ""] - + #[doc = "Next cookie."] + #[doc = ""] pub next: *mut tag_dspHookCookie, -#[doc = "Hook callback."] -#[doc = ""] - + #[doc = "Hook callback."] + #[doc = ""] pub callback: dspHookFn, } impl Default for tag_dspHookCookie { @@ -16266,122 +16047,136 @@ impl Default for tag_dspHookCookie { #[doc = "DSP hook cookie."] #[doc = ""] - pub type dspHookCookie = tag_dspHookCookie; extern "C" { #[must_use] -#[doc = "Initializes the dsp service."] -#[doc = "Call this before calling any DSP_* function."] -#[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] -#[doc = "# Notes"] -#[doc = "This will also unload any previously loaded DSP binary."] -#[doc = ""] - + #[doc = "Initializes the dsp service."] + #[doc = ""] + #[doc = "Call this before calling any DSP_* function."] + #[doc = "It is done this way since you have to provide your binary when the 3DS leaves sleep mode anyway."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This will also unload any previously loaded DSP binary."] + #[doc = ""] pub fn dspInit() -> Result; } extern "C" { -#[doc = "Closes the dsp service."] -#[doc = "# Notes"] -#[doc = "This will also unload the DSP binary."] -#[doc = ""] - + #[doc = "Closes the dsp service."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This will also unload the DSP binary."] + #[doc = ""] pub fn dspExit(); } extern "C" { -#[doc = "Returns true if a component is loaded, false otherwise."] -#[doc = ""] - + #[doc = "Returns true if a component is loaded, false otherwise."] + #[doc = ""] pub fn dspIsComponentLoaded() -> bool; } extern "C" { -#[doc = "Sets up a DSP status hook."] -#[doc = "# Arguments"] -#[doc = "`cookie` - Hook cookie to use."] -#[doc = "`callback` - Function to call when DSP's status changes."] -#[doc = ""] - + #[doc = "Sets up a DSP status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to use."] + #[doc = "* `callback` - Function to call when DSP's status changes."] + #[doc = ""] pub fn dspHook(cookie: *mut dspHookCookie, callback: dspHookFn); } extern "C" { -#[doc = "Removes a DSP status hook."] -#[doc = "# Arguments"] -#[doc = "`cookie` - Hook cookie to remove."] -#[doc = ""] - + #[doc = "Removes a DSP status hook."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cookie` - Hook cookie to remove."] + #[doc = ""] pub fn dspUnhook(cookie: *mut dspHookCookie); } extern "C" { #[must_use] -#[doc = "Checks if a headphone is inserted."] -#[doc = "# Arguments"] -#[doc = "`is_inserted` - Pointer to output the insertion status to."] -#[doc = ""] - + #[doc = "Checks if a headphone is inserted."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `is_inserted` - Pointer to output the insertion status to."] + #[doc = ""] pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Flushes the cache"] -#[doc = "Flushes the cache for the specified memory range and invalidates the cache"] -#[doc = "# Arguments"] -#[doc = "`address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] -#[doc = "`size` - Size of the memory range to flush"] -#[doc = ""] - + #[doc = "Flushes the cache"] + #[doc = ""] + #[doc = "Flushes the cache for the specified memory range and invalidates the cache"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Beginning of the memory range to flush, inside the Linear or DSP memory regions"] + #[doc = "* `size` - Size of the memory range to flush"] + #[doc = ""] pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates the cache"] -#[doc = "Invalidates the cache for the specified memory range"] -#[doc = "# Arguments"] -#[doc = "`address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] -#[doc = "`size` - Size of the memory range to flush"] -#[doc = ""] - + #[doc = "Invalidates the cache"] + #[doc = ""] + #[doc = "Invalidates the cache for the specified memory range"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Beginning of the memory range to invalidate, inside the Linear or DSP memory regions"] + #[doc = "* `size` - Size of the memory range to flush"] + #[doc = ""] pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Retrieves the handle of the DSP semaphore."] -#[doc = "# Arguments"] -#[doc = "`semaphore` - Pointer to output the semaphore to."] -#[doc = ""] - + #[doc = "Retrieves the handle of the DSP semaphore."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `semaphore` - Pointer to output the semaphore to."] + #[doc = ""] pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the DSP hardware semaphore value."] -#[doc = "# Arguments"] -#[doc = "`value` - Value to set."] -#[doc = ""] - + #[doc = "Sets the DSP hardware semaphore value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Value to set."] + #[doc = ""] pub fn DSP_SetSemaphore(value: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Masks the DSP hardware semaphore value."] -#[doc = "# Arguments"] -#[doc = "`mask` - Mask to apply."] -#[doc = ""] - + #[doc = "Masks the DSP hardware semaphore value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mask` - Mask to apply."] + #[doc = ""] pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Loads a DSP binary and starts the DSP"] -#[doc = "# Arguments"] -#[doc = "`component` - The program file address in memory"] -#[doc = "`size` - The size of the program"] -#[doc = "`prog_mask` - DSP memory block related ? Default is 0xff."] -#[doc = "`data_mask` - DSP memory block related ? Default is 0xff."] -#[doc = "`is_loaded` - Indicates if the DSP was succesfully loaded."] -#[doc = "# Notes"] -#[doc = "The binary must be signed (http://3dbrew.org/wiki/DSP_Binary)"] -#[doc = "Seems to be called when the 3ds leaves the Sleep mode"] -#[doc = ""] - + #[doc = "Loads a DSP binary and starts the DSP"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `component` - The program file address in memory"] + #[doc = "* `size` - The size of the program"] + #[doc = "* `prog_mask` - DSP memory block related ? Default is 0xff."] + #[doc = "* `data_mask` - DSP memory block related ? Default is 0xff."] + #[doc = "* `is_loaded` - Indicates if the DSP was succesfully loaded."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The binary must be signed (http://3dbrew.org/wiki/DSP_Binary)"] + #[doc = "* Seems to be called when the 3ds leaves the Sleep mode"] + #[doc = ""] pub fn DSP_LoadComponent( component: *const ::libc::c_void, size: u32_, @@ -16392,35 +16187,38 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Stops the DSP by unloading the binary."] -#[doc = ""] - + #[doc = "Stops the DSP by unloading the binary."] + #[doc = ""] pub fn DSP_UnloadComponent() -> Result; } extern "C" { #[must_use] -#[doc = "Registers an event handle with the DSP through IPC"] -#[doc = "# Arguments"] -#[doc = "`handle` - Event handle to register."] -#[doc = "`interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] -#[doc = "`channel` - The pipe channel. Usual value is 2"] -#[doc = "# Notes"] -#[doc = "It is possible that interrupt are inverted"] -#[doc = ""] - + #[doc = "Registers an event handle with the DSP through IPC"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Event handle to register."] + #[doc = "* `interrupt` - The type of interrupt that will trigger the event. Usual value is DSP_INTERRUPT_PIPE."] + #[doc = "* `channel` - The pipe channel. Usual value is 2"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* It is possible that interrupt are inverted"] + #[doc = ""] pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Reads a pipe if possible."] -#[doc = "# Arguments"] -#[doc = "`channel` - unknown. Usually 2"] -#[doc = "`peer` - unknown. Usually 0"] -#[doc = "`buffer` - The buffer that will store the values read from the pipe"] -#[doc = "`length` - Length of the buffer"] -#[doc = "`length_read` - Number of bytes read by the command"] -#[doc = ""] - + #[doc = "Reads a pipe if possible."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - unknown. Usually 2"] + #[doc = "* `peer` - unknown. Usually 0"] + #[doc = "* `buffer` - The buffer that will store the values read from the pipe"] + #[doc = "* `length` - Length of the buffer"] + #[doc = "* `length_read` - Number of bytes read by the command"] + #[doc = ""] pub fn DSP_ReadPipeIfPossible( channel: u32_, peer: u32_, @@ -16431,13 +16229,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a pipe."] -#[doc = "# Arguments"] -#[doc = "`channel` - unknown. Usually 2"] -#[doc = "`buffer` - The message to send to the DSP process"] -#[doc = "`length` - Length of the message"] -#[doc = ""] - + #[doc = "Writes to a pipe."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - unknown. Usually 2"] + #[doc = "* `buffer` - The message to send to the DSP process"] + #[doc = "* `length` - Length of the message"] + #[doc = ""] pub fn DSP_WriteProcessPipe( channel: u32_, buffer: *const ::libc::c_void, @@ -16446,12 +16245,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Converts a DSP memory address to a virtual address usable by the process."] -#[doc = "# Arguments"] -#[doc = "`dsp_address` - Address to convert."] -#[doc = "`arm_address` - Pointer to output the converted address to."] -#[doc = ""] - + #[doc = "Converts a DSP memory address to a virtual address usable by the process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dsp_address` - Address to convert."] + #[doc = "* `arm_address` - Pointer to output the converted address to."] + #[doc = ""] pub fn DSP_ConvertProcessAddressFromDspDram( dsp_address: u32_, arm_address: *mut u32_, @@ -16459,46 +16259,54 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads a DSP register"] -#[doc = "# Arguments"] -#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "`value` - Pointer to read the register value to."] -#[doc = ""] - + #[doc = "Reads a DSP register"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `value` - Pointer to read the register value to."] + #[doc = ""] pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if you can read a DSP register"] -#[doc = "**Warning!**"] -#[doc = "This call might hang if the data is not ready. See [`DSP_SendDataIsEmpty`]"] -#[doc = "# Arguments"] -#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "`is_ready` - Pointer to write the ready status to."] -#[doc = ""] - + #[doc = "Checks if you can read a DSP register"] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* This call might hang if the data is not ready. See [`DSP_SendDataIsEmpty`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `is_ready` - Pointer to write the ready status to."] + #[doc = ""] pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Writes to a DSP register"] -#[doc = "**Warning!**"] -#[doc = "This call might hang if the SendData is not empty. See [`DSP_SendDataIsEmpty`]"] -#[doc = "# Arguments"] -#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "`value` - Value to write."] -#[doc = ""] - + #[doc = "Writes to a DSP register"] + #[doc = ""] + #[doc = "**Warning!**"] + #[doc = ""] + #[doc = "* This call might hang if the SendData is not empty. See [`DSP_SendDataIsEmpty`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `value` - Value to write."] + #[doc = ""] pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if you can write to a DSP register ?"] -#[doc = "# Arguments"] -#[doc = "`regNo` - Offset of the hardware register, base address is 0x1EC40000"] -#[doc = "`is_empty` - Pointer to write the empty status to."] -#[doc = ""] - + #[doc = "Checks if you can write to a DSP register ?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `regNo` - Offset of the hardware register, base address is 0x1EC40000"] + #[doc = "* `is_empty` - Pointer to write the empty status to."] + #[doc = ""] pub fn DSP_SendDataIsEmpty(regNo: u16_, is_empty: *mut bool) -> Result; } pub type FSPXI_Archive = u64_; @@ -16506,15 +16314,16 @@ pub type FSPXI_File = u64_; pub type FSPXI_Directory = u64_; extern "C" { #[must_use] -#[doc = "Opens a file."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the file handle to."] -#[doc = "`archive` - Archive containing the file."] -#[doc = "`path` - Path of the file."] -#[doc = "`flags` - Flags to open the file with."] -#[doc = "`attributes` - Attributes of the file."] -#[doc = ""] - + #[doc = "Opens a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the file handle to."] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `flags` - Flags to open the file with."] + #[doc = "* `attributes` - Attributes of the file."] + #[doc = ""] pub fn FSPXI_OpenFile( serviceHandle: Handle, out: *mut FSPXI_File, @@ -16526,25 +16335,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a file."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive containing the file."] -#[doc = "`path` - Path of the file."] -#[doc = ""] - + #[doc = "Deletes a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the file."] + #[doc = "* `path` - Path of the file."] + #[doc = ""] pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path) -> Result; } extern "C" { #[must_use] -#[doc = "Renames a file."] -#[doc = "# Arguments"] -#[doc = "`srcArchive` - Archive containing the source file."] -#[doc = "`srcPath` - Path of the source file."] -#[doc = "`dstArchive` - Archive containing the destination file."] -#[doc = "`dstPath` - Path of the destination file."] -#[doc = ""] - + #[doc = "Renames a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source file."] + #[doc = "* `srcPath` - Path of the source file."] + #[doc = "* `dstArchive` - Archive containing the destination file."] + #[doc = "* `dstPath` - Path of the destination file."] + #[doc = ""] pub fn FSPXI_RenameFile( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -16555,12 +16366,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Deletes a directory."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive containing the directory."] -#[doc = "`path` - Path of the directory."] -#[doc = ""] - + #[doc = "Deletes a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSPXI_DeleteDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16569,14 +16381,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a file."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to create the file in."] -#[doc = "`path` - Path of the file."] -#[doc = "`attributes` - Attributes of the file."] -#[doc = "`size` - Size of the file."] -#[doc = ""] - + #[doc = "Creates a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the file in."] + #[doc = "* `path` - Path of the file."] + #[doc = "* `attributes` - Attributes of the file."] + #[doc = "* `size` - Size of the file."] + #[doc = ""] pub fn FSPXI_CreateFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16587,13 +16400,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates a directory."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to create the directory in."] -#[doc = "`path` - Path of the directory."] -#[doc = "`attributes` - Attributes of the directory."] -#[doc = ""] - + #[doc = "Creates a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to create the directory in."] + #[doc = "* `path` - Path of the directory."] + #[doc = "* `attributes` - Attributes of the directory."] + #[doc = ""] pub fn FSPXI_CreateDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16603,14 +16417,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Renames a directory."] -#[doc = "# Arguments"] -#[doc = "`srcArchive` - Archive containing the source directory."] -#[doc = "`srcPath` - Path of the source directory."] -#[doc = "`dstArchive` - Archive containing the destination directory."] -#[doc = "`dstPath` - Path of the destination directory."] -#[doc = ""] - + #[doc = "Renames a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `srcArchive` - Archive containing the source directory."] + #[doc = "* `srcPath` - Path of the source directory."] + #[doc = "* `dstArchive` - Archive containing the destination directory."] + #[doc = "* `dstPath` - Path of the destination directory."] + #[doc = ""] pub fn FSPXI_RenameDirectory( serviceHandle: Handle, srcArchive: FSPXI_Archive, @@ -16621,13 +16436,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a directory."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the directory handle to."] -#[doc = "`archive` - Archive containing the directory."] -#[doc = "`path` - Path of the directory."] -#[doc = ""] - + #[doc = "Opens a directory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the directory handle to."] + #[doc = "* `archive` - Archive containing the directory."] + #[doc = "* `path` - Path of the directory."] + #[doc = ""] pub fn FSPXI_OpenDirectory( serviceHandle: Handle, out: *mut FSPXI_Directory, @@ -16637,15 +16453,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a file."] -#[doc = "# Arguments"] -#[doc = "`file` - File to read from."] -#[doc = "`bytesRead` - Pointer to output the number of read bytes to."] -#[doc = "`offset` - Offset to read from."] -#[doc = "`buffer` - Buffer to read to."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Reads from a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to read from."] + #[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `buffer` - Buffer to read to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn FSPXI_ReadFile( serviceHandle: Handle, file: FSPXI_File, @@ -16657,13 +16474,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Calculate SHA256 of a file."] -#[doc = "# Arguments"] -#[doc = "`file` - File to calculate the hash of."] -#[doc = "`buffer` - Buffer to output the hash to."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Calculate SHA256 of a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to calculate the hash of."] + #[doc = "* `buffer` - Buffer to output the hash to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn FSPXI_CalculateFileHashSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -16673,16 +16491,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Writes to a file."] -#[doc = "# Arguments"] -#[doc = "`file` - File to write to."] -#[doc = "`bytesWritten` - Pointer to output the number of bytes written to."] -#[doc = "`offset` - Offset to write to."] -#[doc = "`buffer` - Buffer to write from."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`flags` - Flags to use when writing."] -#[doc = ""] - + #[doc = "Writes to a file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to write to."] + #[doc = "* `bytesWritten` - Pointer to output the number of bytes written to."] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `buffer` - Buffer to write from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `flags` - Flags to use when writing."] + #[doc = ""] pub fn FSPXI_WriteFile( serviceHandle: Handle, file: FSPXI_File, @@ -16695,15 +16514,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Calculates the MAC used in a DISA/DIFF header?"] -#[doc = "# Arguments"] -#[doc = "`file` - Unsure"] -#[doc = "`inBuffer` - 0x100-byte DISA/DIFF input buffer."] -#[doc = "`inSize` - Size of inBuffer."] -#[doc = "`outBuffer` - Buffer to write MAC to."] -#[doc = "`outSize` - Size of outBuffer."] -#[doc = ""] - + #[doc = "Calculates the MAC used in a DISA/DIFF header?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - Unsure"] + #[doc = "* `inBuffer` - 0x100-byte DISA/DIFF input buffer."] + #[doc = "* `inSize` - Size of inBuffer."] + #[doc = "* `outBuffer` - Buffer to write MAC to."] + #[doc = "* `outSize` - Size of outBuffer."] + #[doc = ""] pub fn FSPXI_CalcSavegameMAC( serviceHandle: Handle, file: FSPXI_File, @@ -16715,43 +16535,47 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get size of a file"] -#[doc = "# Arguments"] -#[doc = "`file` - File to get the size of."] -#[doc = "`size` - Pointer to output size to."] -#[doc = ""] - + #[doc = "Get size of a file"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to get the size of."] + #[doc = "* `size` - Pointer to output size to."] + #[doc = ""] pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Set size of a file"] -#[doc = "# Arguments"] -#[doc = "`file` - File to set the size of"] -#[doc = "`size` - Size to set the file to"] -#[doc = ""] - + #[doc = "Set size of a file"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to set the size of"] + #[doc = "* `size` - Size to set the file to"] + #[doc = ""] pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Close a file"] -#[doc = "# Arguments"] -#[doc = "`file` - File to close"] -#[doc = ""] - + #[doc = "Close a file"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to close"] + #[doc = ""] pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result; } extern "C" { #[must_use] -#[doc = "Reads one or more directory entries."] -#[doc = "# Arguments"] -#[doc = "`directory` - Directory to read from."] -#[doc = "`entriesRead` - Pointer to output the number of entries read to."] -#[doc = "`entryCount` - Number of entries to read."] -#[doc = "`entryOut` - Pointer to output directory entries to."] -#[doc = ""] - + #[doc = "Reads one or more directory entries."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `directory` - Directory to read from."] + #[doc = "* `entriesRead` - Pointer to output the number of entries read to."] + #[doc = "* `entryCount` - Number of entries to read."] + #[doc = "* `entryOut` - Pointer to output directory entries to."] + #[doc = ""] pub fn FSPXI_ReadDirectory( serviceHandle: Handle, directory: FSPXI_Directory, @@ -16762,22 +16586,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Close a directory"] -#[doc = "# Arguments"] -#[doc = "`directory` - Directory to close."] -#[doc = ""] - + #[doc = "Close a directory"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `directory` - Directory to close."] + #[doc = ""] pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result; } extern "C" { #[must_use] -#[doc = "Opens an archive."] -#[doc = "# Arguments"] -#[doc = "`archive` - Pointer to output the opened archive to."] -#[doc = "`id` - ID of the archive."] -#[doc = "`path` - Path of the archive."] -#[doc = ""] - + #[doc = "Opens an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Pointer to output the opened archive to."] + #[doc = "* `id` - ID of the archive."] + #[doc = "* `path` - Path of the archive."] + #[doc = ""] pub fn FSPXI_OpenArchive( serviceHandle: Handle, archive: *mut FSPXI_Archive, @@ -16787,13 +16613,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks if the archive contains a file at path."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to check."] -#[doc = "`out` - Pointer to output existence to."] -#[doc = "`path` - Path to check for file"] -#[doc = ""] - + #[doc = "Checks if the archive contains a file at path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to check."] + #[doc = "* `out` - Pointer to output existence to."] + #[doc = "* `path` - Path to check for file"] + #[doc = ""] pub fn FSPXI_HasFile( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16803,13 +16630,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks if the archive contains a directory at path."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to check."] -#[doc = "`out` - Pointer to output existence to."] -#[doc = "`path` - Path to check for directory"] -#[doc = ""] - + #[doc = "Checks if the archive contains a directory at path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to check."] + #[doc = "* `out` - Pointer to output existence to."] + #[doc = "* `path` - Path to check for directory"] + #[doc = ""] pub fn FSPXI_HasDirectory( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16819,33 +16647,38 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Commits an archive's save data."] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to commit."] -#[doc = "`id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] -#[doc = "# Notes"] -#[doc = "Unsure why id is sent. This appears to be the default action for FSUSER_ControlArchive, with every action other than 0 and 0x789D being sent to this command."] -#[doc = ""] - + #[doc = "Commits an archive's save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to commit."] + #[doc = "* `id` - Archive action sent by FSUSER_ControlArchive. Must not be 0 or 0x789D"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Unsure why id is sent. This appears to be the default action for FSUSER_ControlArchive, with every action other than 0 and 0x789D being sent to this command."] + #[doc = ""] pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Close an archive"] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive to close."] -#[doc = ""] - + #[doc = "Close an archive"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive to close."] + #[doc = ""] pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result; } extern "C" { #[must_use] -#[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] -#[doc = "# Arguments"] -#[doc = "`archive` - Archive handle to check validity of."] -#[doc = "`out` - Pointer to output validity to."] -#[doc = ""] - + #[doc = "Unknown 0x17. Appears to be an \"is archive handle valid\" command?"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - Archive handle to check validity of."] + #[doc = "* `out` - Pointer to output validity to."] + #[doc = ""] pub fn FSPXI_Unknown0x17( serviceHandle: Handle, archive: FSPXI_Archive, @@ -16854,20 +16687,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the inserted card type."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the card type to."] -#[doc = ""] - + #[doc = "Gets the inserted card type."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the card type to."] + #[doc = ""] pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC archive resource information."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the archive resource information to."] -#[doc = ""] - + #[doc = "Gets the SDMC archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSPXI_GetSdmcArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -16875,11 +16710,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the NAND archive resource information."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the archive resource information to."] -#[doc = ""] - + #[doc = "Gets the NAND archive resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the archive resource information to."] + #[doc = ""] pub fn FSPXI_GetNandArchiveResource( serviceHandle: Handle, out: *mut FS_ArchiveResource, @@ -16887,156 +16723,169 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the error code from the SDMC FatFS driver"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the error code to"] -#[doc = ""] - + #[doc = "Gets the error code from the SDMC FatFS driver"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the error code to"] + #[doc = ""] pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether PXIFS0 detects the SD"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the detection status to"] -#[doc = ""] - + #[doc = "Gets whether PXIFS0 detects the SD"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the detection status to"] + #[doc = ""] pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether PXIFS0 can write to the SD"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the writable status to"] -#[doc = ""] - + #[doc = "Gets whether PXIFS0 can write to the SD"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the writable status to"] + #[doc = ""] pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC CID"] -#[doc = "# Arguments"] -#[doc = "`out` - Buffer to output the CID to."] -#[doc = "`size` - Size of buffer."] -#[doc = ""] - + #[doc = "Gets the SDMC CID"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the CID to."] + #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND CID"] -#[doc = "# Arguments"] -#[doc = "`out` - Buffer to output the CID to."] -#[doc = "`size` - Size of buffer."] -#[doc = ""] - + #[doc = "Gets the NAND CID"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the CID to."] + #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC speed info"] -#[doc = "# Arguments"] -#[doc = "`out` - Buffer to output the speed info to."] -#[doc = ""] - + #[doc = "Gets the SDMC speed info"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the speed info to."] + #[doc = ""] pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND speed info"] -#[doc = "# Arguments"] -#[doc = "`out` - Buffer to output the speed info to."] -#[doc = ""] - + #[doc = "Gets the NAND speed info"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the speed info to."] + #[doc = ""] pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut FS_SdMmcSpeedInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the SDMC log"] -#[doc = "# Arguments"] -#[doc = "`out` - Buffer to output the log to."] -#[doc = "`size` - Size of buffer."] -#[doc = ""] - + #[doc = "Gets the SDMC log"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the log to."] + #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the NAND log"] -#[doc = "# Arguments"] -#[doc = "`out` - Buffer to output the log to."] -#[doc = "`size` - Size of buffer."] -#[doc = ""] - + #[doc = "Gets the NAND log"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Buffer to output the log to."] + #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the SDMC log"] -#[doc = ""] - + #[doc = "Clears the SDMC log"] + #[doc = ""] pub fn FSPXI_ClearSdmcLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Clears the NAND log"] -#[doc = ""] - + #[doc = "Clears the NAND log"] + #[doc = ""] pub fn FSPXI_ClearNandLog(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether a card is inserted."] -#[doc = "# Arguments"] -#[doc = "`inserted` - Pointer to output the insertion status to."] -#[doc = ""] - + #[doc = "Gets whether a card is inserted."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inserted` - Pointer to output the insertion status to."] + #[doc = ""] pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers on the card slot."] -#[doc = "# Arguments"] -#[doc = "`status` - Pointer to output the power status to."] -#[doc = ""] - + #[doc = "Powers on the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Powers off the card slot."] -#[doc = "# Arguments"] -#[doc = "`status` - Pointer to output the power status to."] -#[doc = ""] - + #[doc = "Powers off the card slot."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the card's power status."] -#[doc = "# Arguments"] -#[doc = "`status` - Pointer to output the power status to."] -#[doc = ""] - + #[doc = "Gets the card's power status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `status` - Pointer to output the power status to."] + #[doc = ""] pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct command."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = ""] pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct command with an address."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct command with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSPXI_CardNorDirectCommandWithAddress( serviceHandle: Handle, commandId: u8_, @@ -17045,13 +16894,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`size` - Size of the output buffer."] -#[doc = "`output` - Output buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectRead( serviceHandle: Handle, commandId: u8_, @@ -17061,14 +16911,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct read with an address."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the output buffer."] -#[doc = "`output` - Output buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct read with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectReadWithAddress( serviceHandle: Handle, commandId: u8_, @@ -17079,15 +16930,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`size` - Size of the input buffer."] -#[doc = "`output` - Input buffer."] -#[doc = "# Notes"] -#[doc = "Stubbed in latest firmware, since ?.?.?"] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct write."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Stubbed in latest firmware, since ?.?.?"] + #[doc = ""] pub fn FSPXI_CardNorDirectWrite( serviceHandle: Handle, commandId: u8_, @@ -17097,14 +16951,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct write with an address."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the input buffer."] -#[doc = "`input` - Input buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct write with an address."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `input` - Input buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectWriteWithAddress( serviceHandle: Handle, commandId: u8_, @@ -17115,14 +16970,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR 4xIO direct read."] -#[doc = "# Arguments"] -#[doc = "`commandId` - ID of the command."] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the output buffer."] -#[doc = "`output` - Output buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR 4xIO direct read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `commandId` - ID of the command."] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the output buffer."] + #[doc = "* `output` - Output buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectRead_4xIO( serviceHandle: Handle, commandId: u8_, @@ -17133,13 +16989,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct CPU write without verify."] -#[doc = "# Arguments"] -#[doc = "`address` - Address to provide."] -#[doc = "`size` - Size of the input buffer."] -#[doc = "`output` - Input buffer."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct CPU write without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `output` - Input buffer."] + #[doc = ""] pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify( serviceHandle: Handle, address: u32_, @@ -17149,11 +17006,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Executes a CARDNOR direct sector erase without verify."] -#[doc = "# Arguments"] -#[doc = "`address` - Address to provide."] -#[doc = ""] - + #[doc = "Executes a CARDNOR direct sector erase without verify."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `address` - Address to provide."] + #[doc = ""] pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify( serviceHandle: Handle, address: u32_, @@ -17161,12 +17019,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets an NCCH's product info"] -#[doc = "# Arguments"] -#[doc = "`info` - Pointer to output the product info to."] -#[doc = "`archive` - Open NCCH content archive"] -#[doc = ""] - + #[doc = "Gets an NCCH's product info"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Pointer to output the product info to."] + #[doc = "* `archive` - Open NCCH content archive"] + #[doc = ""] pub fn FSPXI_GetProductInfo( serviceHandle: Handle, info: *mut FS_ProductInfo, @@ -17175,61 +17034,67 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI baud rate."] -#[doc = "# Arguments"] -#[doc = "`baudRate` - Baud rate to set."] -#[doc = ""] - + #[doc = "Sets the CARDSPI baud rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `baudRate` - Baud rate to set."] + #[doc = ""] pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the CARDSPI bus mode."] -#[doc = "# Arguments"] -#[doc = "`busMode` - Bus mode to set."] -#[doc = ""] - + #[doc = "Sets the CARDSPI bus mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `busMode` - Bus mode to set."] + #[doc = ""] pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result; } extern "C" { #[must_use] -#[doc = "Sends initialization info to ARM9"] -#[doc = "# Arguments"] -#[doc = "`unk` - FS sends *(0x1FF81086)"] -#[doc = ""] - + #[doc = "Sends initialization info to ARM9"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk` - FS sends *(0x1FF81086)"] + #[doc = ""] pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates ext save data."] -#[doc = "# Arguments"] -#[doc = "`info` - Info of the save data."] -#[doc = ""] - + #[doc = "Creates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes ext save data."] -#[doc = "# Arguments"] -#[doc = "`info` - Info of the save data."] -#[doc = ""] - + #[doc = "Deletes ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Info of the save data."] + #[doc = ""] pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Enumerates ext save data."] -#[doc = "# Arguments"] -#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "`idsSize` - Size of the IDs buffer."] -#[doc = "`mediaType` - Media type to enumerate over."] -#[doc = "`idSize` - Size of each ID element."] -#[doc = "`shared` - Whether to enumerate shared ext save data."] -#[doc = "`ids` - Pointer to output IDs to."] -#[doc = ""] - + #[doc = "Enumerates ext save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `mediaType` - Media type to enumerate over."] + #[doc = "* `idSize` - Size of each ID element."] + #[doc = "* `shared` - Whether to enumerate shared ext save data."] + #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSPXI_EnumerateExtSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -17242,14 +17107,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a special content's index."] -#[doc = "# Arguments"] -#[doc = "`index` - Pointer to output the index to."] -#[doc = "`mediaType` - Media type of the special content."] -#[doc = "`programId` - Program ID owning the special content."] -#[doc = "`type` - Type of special content."] -#[doc = ""] - + #[doc = "Gets a special content's index."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `index` - Pointer to output the index to."] + #[doc = "* `mediaType` - Media type of the special content."] + #[doc = "* `programId` - Program ID owning the special content."] + #[doc = "* `type` - Type of special content."] + #[doc = ""] pub fn FSPXI_GetSpecialContentIndex( serviceHandle: Handle, index: *mut u16_, @@ -17260,13 +17126,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy ROM header of a program."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Media type of the program."] -#[doc = "`programId` - ID of the program."] -#[doc = "`header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] -#[doc = ""] - + #[doc = "Gets the legacy ROM header of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy ROM header to. (size = 0x3B4)"] + #[doc = ""] pub fn FSPXI_GetLegacyRomHeader( serviceHandle: Handle, mediaType: FS_MediaType, @@ -17276,14 +17143,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy banner data of a program."] -#[doc = "# Arguments"] -#[doc = "`mediaType` - Media type of the program."] -#[doc = "`programId` - ID of the program."] -#[doc = "`banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] -#[doc = "`unk` - Unknown. Always 1?"] -#[doc = ""] - + #[doc = "Gets the legacy banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `banner` - Pointer to output the legacy banner data to. (size = 0x23C0)"] + #[doc = "* `unk` - Unknown. Always 1?"] + #[doc = ""] pub fn FSPXI_GetLegacyBannerData( serviceHandle: Handle, mediaType: FS_MediaType, @@ -17294,59 +17162,58 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Formats the CARDNOR device."] -#[doc = "# Arguments"] -#[doc = "`unk` - Unknown. Transaction?"] -#[doc = ""] - + #[doc = "Formats the CARDNOR device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk` - Unknown. Transaction?"] + #[doc = ""] pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes the 3DS SDMC root."] -#[doc = ""] - + #[doc = "Deletes the 3DS SDMC root."] + #[doc = ""] pub fn FSPXI_DeleteSdmcRoot(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Deletes all ext save data on the NAND."] -#[doc = ""] - + #[doc = "Deletes all ext save data on the NAND."] + #[doc = ""] pub fn FSPXI_DeleteAllExtSaveDataOnNand(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes the CTR file system."] -#[doc = ""] - + #[doc = "Initializes the CTR file system."] + #[doc = ""] pub fn FSPXI_InitializeCtrFilesystem(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Creates the FS seed."] -#[doc = ""] - + #[doc = "Creates the FS seed."] + #[doc = ""] pub fn FSPXI_CreateSeed(serviceHandle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the CTR SDMC root path."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to output the root path to."] -#[doc = "`length` - Length of the output buffer in bytes."] -#[doc = ""] - + #[doc = "Gets the CTR SDMC root path."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to output the root path to."] + #[doc = "* `length` - Length of the output buffer in bytes."] + #[doc = ""] pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an archive's resource information."] -#[doc = "# Arguments"] -#[doc = "`archiveResource` - Pointer to output the archive resource information to."] -#[doc = "`mediaType` - System media type to check."] -#[doc = ""] - + #[doc = "Gets an archive's resource information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archiveResource` - Pointer to output the archive resource information to."] + #[doc = "* `mediaType` - System media type to check."] + #[doc = ""] pub fn FSPXI_GetArchiveResource( serviceHandle: Handle, archiveResource: *mut FS_ArchiveResource, @@ -17355,11 +17222,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Exports the integrity verification seed."] -#[doc = "# Arguments"] -#[doc = "`seed` - Pointer to output the seed to."] -#[doc = ""] - + #[doc = "Exports the integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to output the seed to."] + #[doc = ""] pub fn FSPXI_ExportIntegrityVerificationSeed( serviceHandle: Handle, seed: *mut FS_IntegrityVerificationSeed, @@ -17367,11 +17235,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Imports an integrity verification seed."] -#[doc = "# Arguments"] -#[doc = "`seed` - Seed to import."] -#[doc = ""] - + #[doc = "Imports an integrity verification seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Seed to import."] + #[doc = ""] pub fn FSPXI_ImportIntegrityVerificationSeed( serviceHandle: Handle, seed: *const FS_IntegrityVerificationSeed, @@ -17379,14 +17248,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the legacy sub banner data of a program."] -#[doc = "# Arguments"] -#[doc = "`bannerSize` - Size of the banner."] -#[doc = "`mediaType` - Media type of the program."] -#[doc = "`programId` - ID of the program."] -#[doc = "`header` - Pointer to output the legacy sub banner data to."] -#[doc = ""] - + #[doc = "Gets the legacy sub banner data of a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bannerSize` - Size of the banner."] + #[doc = "* `mediaType` - Media type of the program."] + #[doc = "* `programId` - ID of the program."] + #[doc = "* `header` - Pointer to output the legacy sub banner data to."] + #[doc = ""] pub fn FSPXI_GetLegacySubBannerData( serviceHandle: Handle, bannerSize: u32_, @@ -17397,12 +17267,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] -#[doc = "# Arguments"] -#[doc = "`buf` - Buffer to output random bytes to."] -#[doc = "`size` - Size of buffer."] -#[doc = ""] - + #[doc = "Generates random bytes. Uses same code as PSPXI_GenerateRandomBytes"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to output random bytes to."] + #[doc = "* `size` - Size of buffer."] + #[doc = ""] pub fn FSPXI_GenerateRandomBytes( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -17411,14 +17282,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the last modified time of a file in an archive."] -#[doc = "# Arguments"] -#[doc = "`archive` - The archive that contains the file."] -#[doc = "`out` - The pointer to write the timestamp to."] -#[doc = "`path` - The UTF-16 path of the file."] -#[doc = "`size` - The size of the path."] -#[doc = ""] - + #[doc = "Gets the last modified time of a file in an archive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `archive` - The archive that contains the file."] + #[doc = "* `out` - The pointer to write the timestamp to."] + #[doc = "* `path` - The UTF-16 path of the file."] + #[doc = "* `size` - The size of the path."] + #[doc = ""] pub fn FSPXI_GetFileLastModified( serviceHandle: Handle, archive: FSPXI_Archive, @@ -17429,14 +17301,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads from a special file."] -#[doc = "# Arguments"] -#[doc = "`bytesRead` - Pointer to output the number of bytes read to."] -#[doc = "`fileOffset` - Offset of the file."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`data` - Buffer to read to."] -#[doc = ""] - + #[doc = "Reads from a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes read to."] + #[doc = "* `fileOffset` - Offset of the file."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `data` - Buffer to read to."] + #[doc = ""] pub fn FSPXI_ReadSpecialFile( serviceHandle: Handle, bytesRead: *mut u32_, @@ -17447,20 +17320,22 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the size of a special file."] -#[doc = "# Arguments"] -#[doc = "`fileSize` - Pointer to output the size to."] -#[doc = ""] - + #[doc = "Gets the size of a special file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `fileSize` - Pointer to output the size to."] + #[doc = ""] pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Initiates a device move as the source device."] -#[doc = "# Arguments"] -#[doc = "`context` - Pointer to output the context to."] -#[doc = ""] - + #[doc = "Initiates a device move as the source device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Pointer to output the context to."] + #[doc = ""] pub fn FSPXI_StartDeviceMoveAsSource( serviceHandle: Handle, context: *mut FS_DeviceMoveContext, @@ -17468,12 +17343,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initiates a device move as the destination device."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`clear` - Whether to clear the device's data first."] -#[doc = ""] - + #[doc = "Initiates a device move as the destination device."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `clear` - Whether to clear the device's data first."] + #[doc = ""] pub fn FSPXI_StartDeviceMoveAsDestination( serviceHandle: Handle, context: FS_DeviceMoveContext, @@ -17482,18 +17358,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads data and stores SHA256 hashes of blocks"] -#[doc = "# Arguments"] -#[doc = "`file` - File to read from."] -#[doc = "`bytesRead` - Pointer to output the number of read bytes to."] -#[doc = "`offset` - Offset to read from."] -#[doc = "`readBuffer` - Pointer to store read data in."] -#[doc = "`readBufferSize` - Size of readBuffer."] -#[doc = "`hashtable` - Pointer to store SHA256 hashes in."] -#[doc = "`hashtableSize` - Size of hashtable."] -#[doc = "`unk` - Unknown. Always 0x00001000? Possibly block size?"] -#[doc = ""] - + #[doc = "Reads data and stores SHA256 hashes of blocks"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to read from."] + #[doc = "* `bytesRead` - Pointer to output the number of read bytes to."] + #[doc = "* `offset` - Offset to read from."] + #[doc = "* `readBuffer` - Pointer to store read data in."] + #[doc = "* `readBufferSize` - Size of readBuffer."] + #[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] + #[doc = "* `hashtableSize` - Size of hashtable."] + #[doc = "* `unk` - Unknown. Always 0x00001000? Possibly block size?"] + #[doc = ""] pub fn FSPXI_ReadFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -17508,19 +17385,20 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] -#[doc = "# Arguments"] -#[doc = "`file` - File to write to."] -#[doc = "`bytesWritten` - Pointer to output the number of written bytes to."] -#[doc = "`offset` - Offset to write to."] -#[doc = "`writeBuffer` - Buffer to write from."] -#[doc = "`writeBufferSize` - Size of writeBuffer."] -#[doc = "`hashtable` - Pointer to store SHA256 hashes in."] -#[doc = "`hashtableSize` - Size of hashtable"] -#[doc = "`unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] -#[doc = "`unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] -#[doc = ""] - + #[doc = "Assumedly writes data and stores SHA256 hashes of blocks"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `file` - File to write to."] + #[doc = "* `bytesWritten` - Pointer to output the number of written bytes to."] + #[doc = "* `offset` - Offset to write to."] + #[doc = "* `writeBuffer` - Buffer to write from."] + #[doc = "* `writeBufferSize` - Size of writeBuffer."] + #[doc = "* `hashtable` - Pointer to store SHA256 hashes in."] + #[doc = "* `hashtableSize` - Size of hashtable"] + #[doc = "* `unk1` - Unknown. Might match with ReadFileSHA256's unknown?"] + #[doc = "* `unk2` - Unknown. Might match with ReadFileSHA256's unknown?"] + #[doc = ""] pub fn FSPXI_WriteFileSHA256( serviceHandle: Handle, file: FSPXI_File, @@ -17536,40 +17414,44 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures CTRCARD latency emulation."] -#[doc = "# Arguments"] -#[doc = "`latency` - Latency to apply."] -#[doc = ""] - + #[doc = "Configures CTRCARD latency emulation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `latency` - Latency to apply."] + #[doc = ""] pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the file system priority."] -#[doc = "# Arguments"] -#[doc = "`priority` - Priority to set."] -#[doc = ""] - + #[doc = "Sets the file system priority."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `priority` - Priority to set."] + #[doc = ""] pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Toggles cleaning up invalid save data."] -#[doc = "# Arguments"] -#[doc = "`enable` - Whether to enable cleaning up invalid save data."] -#[doc = ""] - + #[doc = "Toggles cleaning up invalid save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enable` - Whether to enable cleaning up invalid save data."] + #[doc = ""] pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Enumerates system save data."] -#[doc = "# Arguments"] -#[doc = "`idsWritten` - Pointer to output the number of IDs written to."] -#[doc = "`idsSize` - Size of the IDs buffer."] -#[doc = "`ids` - Pointer to output IDs to."] -#[doc = ""] - + #[doc = "Enumerates system save data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `idsWritten` - Pointer to output the number of IDs written to."] + #[doc = "* `idsSize` - Size of the IDs buffer."] + #[doc = "* `ids` - Pointer to output IDs to."] + #[doc = ""] pub fn FSPXI_EnumerateSystemSaveData( serviceHandle: Handle, idsWritten: *mut u32_, @@ -17579,13 +17461,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads the NAND report."] -#[doc = "# Arguments"] -#[doc = "`unk` - Unknown"] -#[doc = "`buffer` - Buffer to write the report to."] -#[doc = "`size` - Size of buffer"] -#[doc = ""] - + #[doc = "Reads the NAND report."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk` - Unknown"] + #[doc = "* `buffer` - Buffer to write the report to."] + #[doc = "* `size` - Size of buffer"] + #[doc = ""] pub fn FSPXI_ReadNandReport( serviceHandle: Handle, buffer: *mut ::libc::c_void, @@ -17595,11 +17478,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unknown command 0x56"] -#[doc = "# Notes"] -#[doc = "Called by FSUSER_ControlArchive with ArchiveAction 0x789D"] -#[doc = ""] - + #[doc = "Unknown command 0x56"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Called by FSUSER_ControlArchive with ArchiveAction 0x789D"] + #[doc = ""] pub fn FSPXI_Unknown0x56( serviceHandle: Handle, out: *mut u32_, @@ -17609,35 +17493,35 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes fs:REG."] -#[doc = ""] - + #[doc = "Initializes fs:REG."] + #[doc = ""] pub fn fsRegInit() -> Result; } extern "C" { -#[doc = "Exits fs:REG."] -#[doc = ""] - + #[doc = "Exits fs:REG."] + #[doc = ""] pub fn fsRegExit(); } extern "C" { -#[doc = "Gets the current fs:REG session handle."] -#[doc = "Returns:"] -#[doc = "The current fs:REG session handle."] -#[doc = ""] - + #[doc = "Gets the current fs:REG session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current fs:REG session handle."] + #[doc = ""] pub fn fsRegGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Registers a program's storage information."] -#[doc = "# Arguments"] -#[doc = "`pid` - The Process ID of the program."] -#[doc = "`programHandle` - The program handle."] -#[doc = "`programInfo` - Information about the program."] -#[doc = "`storageInfo` - Storage information to register."] -#[doc = ""] - + #[doc = "Registers a program's storage information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - The Process ID of the program."] + #[doc = "* `programHandle` - The program handle."] + #[doc = "* `programInfo` - Information about the program."] + #[doc = "* `storageInfo` - Storage information to register."] + #[doc = ""] pub fn FSREG_Register( pid: u32_, programHandle: u64_, @@ -17647,22 +17531,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters a program's storage information."] -#[doc = "# Arguments"] -#[doc = "`pid` - The Process ID of the program."] -#[doc = ""] - + #[doc = "Unregisters a program's storage information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - The Process ID of the program."] + #[doc = ""] pub fn FSREG_Unregister(pid: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] -#[doc = "# Arguments"] -#[doc = "`exheaderInfos[out]` - Pointer to the output exheader information set(s)."] -#[doc = "`maxNumEntries` - The maximum number of entries."] -#[doc = "`programHandle` - The program handle."] -#[doc = ""] - + #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set(s)."] + #[doc = "* `maxNumEntries` - The maximum number of entries."] + #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn FSREG_GetProgramInfo( exheaderInfos: *mut ExHeader_Info, maxNumEntries: u32_, @@ -17671,12 +17557,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Loads a program."] -#[doc = "# Arguments"] -#[doc = "`programHandle[out]` - Pointer to the output the program handle to."] -#[doc = "`programInfo` - Information about the program to load."] -#[doc = ""] - + #[doc = "Loads a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] + #[doc = "* `programInfo` - Information about the program to load."] + #[doc = ""] pub fn FSREG_LoadProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -17684,25 +17571,26 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unloads a program."] -#[doc = "# Arguments"] -#[doc = "`programHandle` - The program handle."] -#[doc = ""] - + #[doc = "Unloads a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if a program has been loaded by fs:REG."] -#[doc = "# Arguments"] -#[doc = "`programHandle` - The program handle."] -#[doc = ""] - + #[doc = "Checks if a program has been loaded by fs:REG."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result; } #[doc = "Shared Mii struct"] #[doc = ""] - #[repr(C)] #[repr(align(1))] pub struct MiiData { @@ -17710,7 +17598,6 @@ pub struct MiiData { } #[doc = "Mii options"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_1 { @@ -17791,7 +17678,6 @@ impl MiiData__bindgen_ty_1 { } #[doc = "Mii position in Mii selector or Mii maker"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_2 { @@ -17837,7 +17723,6 @@ impl MiiData__bindgen_ty_2 { } #[doc = "Console Identity"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_3 { @@ -17886,7 +17771,6 @@ impl MiiData__bindgen_ty_3 { } #[doc = "Mii details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -17984,7 +17868,6 @@ impl MiiData__bindgen_ty_4 { } #[doc = "Face style"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_5 { @@ -18049,7 +17932,6 @@ impl MiiData__bindgen_ty_5 { } #[doc = "Face details"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_6 { @@ -18095,7 +17977,6 @@ impl MiiData__bindgen_ty_6 { } #[doc = "Hair details"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct MiiData__bindgen_ty_7 { @@ -18141,7 +18022,6 @@ impl MiiData__bindgen_ty_7 { } #[doc = "Eye details"] #[doc = ""] - #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -18271,7 +18151,6 @@ impl MiiData__bindgen_ty_8 { } #[doc = "Eyebrow details"] #[doc = ""] - #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone)] @@ -18417,7 +18296,6 @@ impl MiiData__bindgen_ty_9 { } #[doc = "Nose details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18483,7 +18361,6 @@ impl MiiData__bindgen_ty_10 { } #[doc = "Mouth details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18565,7 +18442,6 @@ impl MiiData__bindgen_ty_11 { } #[doc = "Mustache details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18631,7 +18507,6 @@ impl MiiData__bindgen_ty_12 { } #[doc = "Beard details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18713,7 +18588,6 @@ impl MiiData__bindgen_ty_13 { } #[doc = "Glasses details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18795,7 +18669,6 @@ impl MiiData__bindgen_ty_14 { } #[doc = "Mole details"] #[doc = ""] - #[repr(C)] #[repr(align(2))] #[derive(Debug, Default, Copy, Clone)] @@ -18886,7 +18759,6 @@ impl Default for MiiData { } #[doc = "Friend key data"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendKey { @@ -18896,7 +18768,6 @@ pub struct FriendKey { } #[doc = "Friend Title data"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct TitleData { @@ -18906,35 +18777,28 @@ pub struct TitleData { } #[doc = "Friend profile data"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct FriendProfile { -#[doc = "The region code for the hardware."] -#[doc = ""] - + #[doc = "The region code for the hardware."] + #[doc = ""] pub region: u8_, -#[doc = "Country code."] -#[doc = ""] - + #[doc = "Country code."] + #[doc = ""] pub country: u8_, -#[doc = "Area code."] -#[doc = ""] - + #[doc = "Area code."] + #[doc = ""] pub area: u8_, -#[doc = "Language code."] -#[doc = ""] - + #[doc = "Language code."] + #[doc = ""] pub language: u8_, -#[doc = "Platform code."] -#[doc = ""] - + #[doc = "Platform code."] + #[doc = ""] pub platform: u8_, pub padding: u32_, } #[doc = "Game Description structure"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct GameDescription { @@ -18952,7 +18816,6 @@ impl Default for GameDescription { } #[doc = "Friend Notification Event structure"] #[doc = ""] - #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationEvent { @@ -18964,124 +18827,115 @@ pub struct NotificationEvent { #[doc = "Self went online"] #[doc = ""] - pub const USER_WENT_ONLINE: NotificationTypes = 1; #[doc = "Self went offline"] #[doc = ""] - pub const USER_WENT_OFFLINE: NotificationTypes = 2; #[doc = "Friend Went Online"] #[doc = ""] - pub const FRIEND_WENT_ONLINE: NotificationTypes = 3; #[doc = "Friend Presence changed"] #[doc = ""] - pub const FRIEND_UPDATED_PRESENCE: NotificationTypes = 4; #[doc = "Friend Mii changed"] #[doc = ""] - pub const FRIEND_UPDATED_MII: NotificationTypes = 5; #[doc = "Friend Profile changed"] #[doc = ""] - pub const FRIEND_UPDATED_PROFILE: NotificationTypes = 6; #[doc = "Friend went offline"] #[doc = ""] - pub const FRIEND_WENT_OFFLINE: NotificationTypes = 7; #[doc = "Friend registered self as friend"] #[doc = ""] - pub const FRIEND_REGISTERED_USER: NotificationTypes = 8; #[doc = "Friend Sent invitation"] #[doc = ""] - pub const FRIEND_SENT_INVITATION: NotificationTypes = 9; #[doc = "Enum to use with FRD_GetNotificationEvent"] #[doc = ""] - pub type NotificationTypes = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes FRD service."] -#[doc = ""] - + #[doc = "Initializes FRD service."] + #[doc = ""] pub fn frdInit() -> Result; } extern "C" { -#[doc = "Exists FRD."] -#[doc = ""] - + #[doc = "Exists FRD."] + #[doc = ""] pub fn frdExit(); } extern "C" { -#[doc = "Get FRD handle."] -#[doc = ""] - + #[doc = "Get FRD handle."] + #[doc = ""] pub fn frdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the login status of the current user."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to write the current user's login status to."] -#[doc = ""] - + #[doc = "Gets the login status of the current user."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the current user's login status to."] + #[doc = ""] pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the online status of the current user."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to write the current user's online status to."] -#[doc = ""] - + #[doc = "Gets the online status of the current user."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the current user's online status to."] + #[doc = ""] pub fn FRDU_IsOnline(state: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Logs out of Nintendo's friend server."] -#[doc = ""] - + #[doc = "Logs out of Nintendo's friend server."] + #[doc = ""] pub fn FRD_Logout() -> Result; } extern "C" { #[must_use] -#[doc = "Log in to Nintendo's friend server."] -#[doc = "# Arguments"] -#[doc = "`event` - Event to signal when Login is done."] -#[doc = ""] - + #[doc = "Log in to Nintendo's friend server."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Event to signal when Login is done."] + #[doc = ""] pub fn FRD_Login(event: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's friend key."] -#[doc = "# Arguments"] -#[doc = "`key` - Pointer to write the current user's friend key to."] -#[doc = ""] - + #[doc = "Gets the current user's friend key."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `key` - Pointer to write the current user's friend key to."] + #[doc = ""] pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's privacy information."] -#[doc = "# Arguments"] -#[doc = "`isPublicMode` - Determines whether friends are notified of the current user's online status."] -#[doc = "`isShowGameName` - Determines whether friends are notified of the application that the current user is running."] -#[doc = "`isShowPlayedGame` - Determiens whether to display the current user's game history."] -#[doc = ""] - + #[doc = "Gets the current user's privacy information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `isPublicMode` - Determines whether friends are notified of the current user's online status."] + #[doc = "* `isShowGameName` - Determines whether friends are notified of the application that the current user is running."] + #[doc = "* `isShowPlayedGame` - Determiens whether to display the current user's game history."] + #[doc = ""] pub fn FRD_GetMyPreference( isPublicMode: *mut bool, isShowGameName: *mut bool, @@ -19090,70 +18944,77 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the current user's profile information."] -#[doc = "# Arguments"] -#[doc = "`profile` - Pointer to write the current user's profile information to."] -#[doc = ""] - + #[doc = "Gets the current user's profile information."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `profile` - Pointer to write the current user's profile information to."] + #[doc = ""] pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's screen name."] -#[doc = "# Arguments"] -#[doc = "`name` - Pointer to write the current user's screen name to."] -#[doc = "`max_size` - Max size of the screen name."] -#[doc = ""] - + #[doc = "Gets the current user's screen name."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Pointer to write the current user's screen name to."] + #[doc = "* `max_size` - Max size of the screen name."] + #[doc = ""] pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's Mii data."] -#[doc = "# Arguments"] -#[doc = "`mii` - Pointer to write the current user's mii data to."] -#[doc = ""] - + #[doc = "Gets the current user's Mii data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mii` - Pointer to write the current user's mii data to."] + #[doc = ""] pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's playing game."] -#[doc = "# Arguments"] -#[doc = "`titleId` - Pointer to write the current user's playing game to."] -#[doc = ""] - + #[doc = "Gets the current user's playing game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Pointer to write the current user's playing game to."] + #[doc = ""] pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's favourite game."] -#[doc = "# Arguments"] -#[doc = "`titleId` - Pointer to write the title ID of current user's favourite game to."] -#[doc = ""] - + #[doc = "Gets the current user's favourite game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Pointer to write the title ID of current user's favourite game to."] + #[doc = ""] pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's comment on their friend profile."] -#[doc = "# Arguments"] -#[doc = "`comment` - Pointer to write the current user's comment to."] -#[doc = "`max_size` - Max size of the comment."] -#[doc = ""] - + #[doc = "Gets the current user's comment on their friend profile."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `comment` - Pointer to write the current user's comment to."] + #[doc = "* `max_size` - Max size of the comment."] + #[doc = ""] pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current user's friend key list."] -#[doc = "# Arguments"] -#[doc = "`friendKeyList` - Pointer to write the friend key list to."] -#[doc = "`num` - Stores the number of friend keys obtained."] -#[doc = "`offset` - The index of the friend key to start with."] -#[doc = "`size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] -#[doc = ""] - + #[doc = "Gets the current user's friend key list."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendKeyList` - Pointer to write the friend key list to."] + #[doc = "* `num` - Stores the number of friend keys obtained."] + #[doc = "* `offset` - The index of the friend key to start with."] + #[doc = "* `size` - Size of the friend key list. (FRIEND_LIST_SIZE)"] + #[doc = ""] pub fn FRD_GetFriendKeyList( friendKeyList: *mut FriendKey, num: *mut u32_, @@ -19163,13 +19024,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the current user's friends' Mii data."] -#[doc = "# Arguments"] -#[doc = "`miiDataList` - Pointer to write Mii data to."] -#[doc = "`friendKeyList` - Pointer to FriendKeys."] -#[doc = "`size` - Number of Friendkeys."] -#[doc = ""] - + #[doc = "Gets the current user's friends' Mii data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `miiDataList` - Pointer to write Mii data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys."] + #[doc = "* `size` - Number of Friendkeys."] + #[doc = ""] pub fn FRD_GetFriendMii( miiDataList: *mut MiiData, friendKeyList: *const FriendKey, @@ -19178,13 +19040,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get the current user's friends' profile data."] -#[doc = "# Arguments"] -#[doc = "`profile` - Pointer to write profile data to."] -#[doc = "`friendKeyList` - Pointer to FriendKeys."] -#[doc = "`size` - Number of FriendKeys."] -#[doc = ""] - + #[doc = "Get the current user's friends' profile data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `profile` - Pointer to write profile data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys."] + #[doc = "* `size` - Number of FriendKeys."] + #[doc = ""] pub fn FRD_GetFriendProfile( profile: *mut FriendProfile, friendKeyList: *const FriendKey, @@ -19193,13 +19056,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get the current user's friends' playing game."] -#[doc = "# Arguments"] -#[doc = "`desc` - Pointer to write Game Description data to."] -#[doc = "`friendKeyList` - Pointer to FriendKeys,"] -#[doc = "`size` - Number Of FriendKeys."] -#[doc = ""] - + #[doc = "Get the current user's friends' playing game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `desc` - Pointer to write Game Description data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] + #[doc = "* `size` - Number Of FriendKeys."] + #[doc = ""] pub fn FRD_GetFriendPlayingGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -19208,13 +19072,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Get the current user's friends' favourite game."] -#[doc = "# Arguments"] -#[doc = "`desc` - Pointer to write Game Description data to."] -#[doc = "`friendKeyList` - Pointer to FriendKeys,"] -#[doc = "`count` - Number Of FriendKeys."] -#[doc = ""] - + #[doc = "Get the current user's friends' favourite game."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `desc` - Pointer to write Game Description data to."] + #[doc = "* `friendKeyList` - Pointer to FriendKeys,"] + #[doc = "* `count` - Number Of FriendKeys."] + #[doc = ""] pub fn FRD_GetFriendFavouriteGame( desc: *mut GameDescription, friendKeyList: *const FriendKey, @@ -19223,41 +19088,45 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets whether a friend key is included in the current user's friend list."] -#[doc = "# Arguments"] -#[doc = "`friendKeyList` - Pointer to a list of friend keys."] -#[doc = "`isFromList` - Pointer to a write the friendship status to."] -#[doc = ""] - + #[doc = "Gets whether a friend key is included in the current user's friend list."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendKeyList` - Pointer to a list of friend keys."] + #[doc = "* `isFromList` - Pointer to a write the friendship status to."] + #[doc = ""] pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Updates the game mode description string."] -#[doc = "# Arguments"] -#[doc = "`desc` - Pointer to write the game mode description to."] -#[doc = ""] - + #[doc = "Updates the game mode description string."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `desc` - Pointer to write the game mode description to."] + #[doc = ""] pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Event which is signaled when friend login states change."] -#[doc = "# Arguments"] -#[doc = "`event` - event which will be signaled."] -#[doc = ""] - + #[doc = "Event which is signaled when friend login states change."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - event which will be signaled."] + #[doc = ""] pub fn FRD_AttachToEventNotification(event: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Get Latest Event Notification"] -#[doc = "# Arguments"] -#[doc = "`event` - Pointer to write recieved notification event struct to."] -#[doc = "`count` - Number of events"] -#[doc = "`recievedNotifCount` - Number of notification reccieved."] -#[doc = ""] - + #[doc = "Get Latest Event Notification"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Pointer to write recieved notification event struct to."] + #[doc = "* `count` - Number of events"] + #[doc = "* `recievedNotifCount` - Number of notification reccieved."] + #[doc = ""] pub fn FRD_GetEventNotification( event: *mut NotificationEvent, count: u32_, @@ -19266,567 +19135,535 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Returns the friend code using the given principal ID."] -#[doc = "# Arguments"] -#[doc = "`principalId` - The principal ID being used."] -#[doc = "`friendCode` - Pointer to write the friend code to."] -#[doc = ""] - + #[doc = "Returns the friend code using the given principal ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `principalId` - The principal ID being used."] + #[doc = "* `friendCode` - Pointer to write the friend code to."] + #[doc = ""] pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the principal ID using the given friend code."] -#[doc = "# Arguments"] -#[doc = "`friendCode` - The friend code being used."] -#[doc = "`principalId` - Pointer to write the principal ID to."] -#[doc = ""] - + #[doc = "Returns the principal ID using the given friend code."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendCode` - The friend code being used."] + #[doc = "* `principalId` - Pointer to write the principal ID to."] + #[doc = ""] pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if the friend code is valid."] -#[doc = "# Arguments"] -#[doc = "`friendCode` - The friend code being used."] -#[doc = "`isValid` - Pointer to write the validity of the friend code to."] -#[doc = ""] - + #[doc = "Checks if the friend code is valid."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `friendCode` - The friend code being used."] + #[doc = "* `isValid` - Pointer to write the validity of the friend code to."] + #[doc = ""] pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the Friend API to use a specific SDK version."] -#[doc = "# Arguments"] -#[doc = "`sdkVer` - The SDK version needed to be used."] -#[doc = ""] - + #[doc = "Sets the Friend API to use a specific SDK version."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sdkVer` - The SDK version needed to be used."] + #[doc = ""] pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Add a Friend online."] -#[doc = "# Arguments"] -#[doc = "`event` - Event signaled when friend is registered."] -#[doc = "`principalId` - PrincipalId of the friend to add."] -#[doc = ""] - + #[doc = "Add a Friend online."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `event` - Event signaled when friend is registered."] + #[doc = "* `principalId` - PrincipalId of the friend to add."] + #[doc = ""] pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Remove a Friend."] -#[doc = "# Arguments"] -#[doc = "`principalId` - PrinipalId of the friend code to remove."] -#[doc = "`localFriendCode` - LocalFriendCode of the friend code to remove."] -#[doc = ""] - + #[doc = "Remove a Friend."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `principalId` - PrinipalId of the friend code to remove."] + #[doc = "* `localFriendCode` - LocalFriendCode of the friend code to remove."] + #[doc = ""] pub fn FRD_RemoveFriend(principalId: u32_, localFriendCode: u64_) -> Result; } #[doc = "Top screen."] #[doc = ""] - pub const GSPLCD_SCREEN_TOP: _bindgen_ty_21 = 1; #[doc = "Bottom screen."] #[doc = ""] - pub const GSPLCD_SCREEN_BOTTOM: _bindgen_ty_21 = 2; #[doc = "Both screens."] #[doc = ""] - pub const GSPLCD_SCREEN_BOTH: _bindgen_ty_21 = 3; #[doc = "LCD screens."] #[doc = ""] - pub type _bindgen_ty_21 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes GSPLCD."] -#[doc = ""] - + #[doc = "Initializes GSPLCD."] + #[doc = ""] pub fn gspLcdInit() -> Result; } extern "C" { -#[doc = "Exits GSPLCD."] -#[doc = ""] - + #[doc = "Exits GSPLCD."] + #[doc = ""] pub fn gspLcdExit(); } extern "C" { -#[doc = "Gets a pointer to the current gsp::Lcd session handle."] -#[doc = "Returns:"] -#[doc = "A pointer to the current gsp::Lcd session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current gsp::Lcd session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current gsp::Lcd session handle."] + #[doc = ""] pub fn gspLcdGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Powers on both backlights."] -#[doc = ""] - + #[doc = "Powers on both backlights."] + #[doc = ""] pub fn GSPLCD_PowerOnAllBacklights() -> Result; } extern "C" { #[must_use] -#[doc = "Powers off both backlights."] -#[doc = ""] - + #[doc = "Powers off both backlights."] + #[doc = ""] pub fn GSPLCD_PowerOffAllBacklights() -> Result; } extern "C" { #[must_use] -#[doc = "Powers on the backlight."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen to power on."] -#[doc = ""] - + #[doc = "Powers on the backlight."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to power on."] + #[doc = ""] pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Powers off the backlight."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen to power off."] -#[doc = ""] - + #[doc = "Powers off the backlight."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to power off."] + #[doc = ""] pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets 3D_LEDSTATE to the input state value."] -#[doc = "# Arguments"] -#[doc = "`disable` - False = 3D LED enable, true = 3D LED disable."] -#[doc = ""] - + #[doc = "Sets 3D_LEDSTATE to the input state value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `disable` - False = 3D LED enable, true = 3D LED disable."] + #[doc = ""] pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] -#[doc = "# Arguments"] -#[doc = "`vendor` - Pointer to output the screen vendors to."] -#[doc = ""] - + #[doc = "Gets the LCD screens' vendors. Stubbed on old 3ds."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vendor` - Pointer to output the screen vendors to."] + #[doc = ""] pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen to get the brightness value of."] -#[doc = "`brightness` - Brightness value returned."] -#[doc = ""] - + #[doc = "Gets the LCD screens' brightness. Stubbed on old 3ds."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to get the brightness value of."] + #[doc = "* `brightness` - Brightness value returned."] + #[doc = ""] pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the LCD screens' brightness."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen to set the brightness value of."] -#[doc = "`brightness` - Brightness value set."] -#[doc = ""] - + #[doc = "Sets the LCD screens' brightness."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to set the brightness value of."] + #[doc = "* `brightness` - Brightness value set."] + #[doc = ""] pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the LCD screens' raw brightness."] -#[doc = "# Arguments"] -#[doc = "`screen` - Screen to set the brightness value of."] -#[doc = "`brightness` - Brightness value set."] -#[doc = ""] - + #[doc = "Sets the LCD screens' raw brightness."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `screen` - Screen to set the brightness value of."] + #[doc = "* `brightness` - Brightness value set."] + #[doc = ""] pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result; } #[doc = "A"] #[doc = ""] - pub const KEY_A: _bindgen_ty_22 = 1; #[doc = "B"] #[doc = ""] - pub const KEY_B: _bindgen_ty_22 = 2; #[doc = "Select"] #[doc = ""] - pub const KEY_SELECT: _bindgen_ty_22 = 4; #[doc = "Start"] #[doc = ""] - pub const KEY_START: _bindgen_ty_22 = 8; #[doc = "D-Pad Right"] #[doc = ""] - pub const KEY_DRIGHT: _bindgen_ty_22 = 16; #[doc = "D-Pad Left"] #[doc = ""] - pub const KEY_DLEFT: _bindgen_ty_22 = 32; #[doc = "D-Pad Up"] #[doc = ""] - pub const KEY_DUP: _bindgen_ty_22 = 64; #[doc = "D-Pad Down"] #[doc = ""] - pub const KEY_DDOWN: _bindgen_ty_22 = 128; #[doc = "R"] #[doc = ""] - pub const KEY_R: _bindgen_ty_22 = 256; #[doc = "L"] #[doc = ""] - pub const KEY_L: _bindgen_ty_22 = 512; #[doc = "X"] #[doc = ""] - pub const KEY_X: _bindgen_ty_22 = 1024; #[doc = "Y"] #[doc = ""] - pub const KEY_Y: _bindgen_ty_22 = 2048; #[doc = "ZL (New 3DS only)"] #[doc = ""] - pub const KEY_ZL: _bindgen_ty_22 = 16384; #[doc = "ZR (New 3DS only)"] #[doc = ""] - pub const KEY_ZR: _bindgen_ty_22 = 32768; #[doc = "Touch (Not actually provided by HID)"] #[doc = ""] - pub const KEY_TOUCH: _bindgen_ty_22 = 1048576; #[doc = "C-Stick Right (New 3DS only)"] #[doc = ""] - pub const KEY_CSTICK_RIGHT: _bindgen_ty_22 = 16777216; #[doc = "C-Stick Left (New 3DS only)"] #[doc = ""] - pub const KEY_CSTICK_LEFT: _bindgen_ty_22 = 33554432; #[doc = "C-Stick Up (New 3DS only)"] #[doc = ""] - pub const KEY_CSTICK_UP: _bindgen_ty_22 = 67108864; #[doc = "C-Stick Down (New 3DS only)"] #[doc = ""] - pub const KEY_CSTICK_DOWN: _bindgen_ty_22 = 134217728; #[doc = "Circle Pad Right"] #[doc = ""] - pub const KEY_CPAD_RIGHT: _bindgen_ty_22 = 268435456; #[doc = "Circle Pad Left"] #[doc = ""] - pub const KEY_CPAD_LEFT: _bindgen_ty_22 = 536870912; #[doc = "Circle Pad Up"] #[doc = ""] - pub const KEY_CPAD_UP: _bindgen_ty_22 = 1073741824; #[doc = "Circle Pad Down"] #[doc = ""] - pub const KEY_CPAD_DOWN: _bindgen_ty_22 = 2147483648; #[doc = "D-Pad Up or Circle Pad Up"] #[doc = ""] - pub const KEY_UP: _bindgen_ty_22 = 1073741888; #[doc = "D-Pad Down or Circle Pad Down"] #[doc = ""] - pub const KEY_DOWN: _bindgen_ty_22 = 2147483776; #[doc = "D-Pad Left or Circle Pad Left"] #[doc = ""] - pub const KEY_LEFT: _bindgen_ty_22 = 536870944; #[doc = "D-Pad Right or Circle Pad Right"] #[doc = ""] - pub const KEY_RIGHT: _bindgen_ty_22 = 268435472; #[doc = "Key values."] #[doc = ""] - pub type _bindgen_ty_22 = ::libc::c_uint; #[doc = "Touch position."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct touchPosition { -#[doc = "Touch X"] -#[doc = ""] - + #[doc = "Touch X"] + #[doc = ""] pub px: u16_, -#[doc = "Touch Y"] -#[doc = ""] - + #[doc = "Touch Y"] + #[doc = ""] pub py: u16_, } #[doc = "Circle Pad position."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct circlePosition { -#[doc = "Pad X"] -#[doc = ""] - + #[doc = "Pad X"] + #[doc = ""] pub dx: s16, -#[doc = "Pad Y"] -#[doc = ""] - + #[doc = "Pad Y"] + #[doc = ""] pub dy: s16, } #[doc = "Accelerometer vector."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct accelVector { -#[doc = "Accelerometer X"] -#[doc = ""] - + #[doc = "Accelerometer X"] + #[doc = ""] pub x: s16, -#[doc = "Accelerometer Y"] -#[doc = ""] - + #[doc = "Accelerometer Y"] + #[doc = ""] pub y: s16, -#[doc = "Accelerometer Z"] -#[doc = ""] - + #[doc = "Accelerometer Z"] + #[doc = ""] pub z: s16, } #[doc = "Gyroscope angular rate."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct angularRate { -#[doc = "Roll"] -#[doc = ""] - + #[doc = "Roll"] + #[doc = ""] pub x: s16, -#[doc = "Yaw"] -#[doc = ""] - + #[doc = "Yaw"] + #[doc = ""] pub z: s16, -#[doc = "Pitch"] -#[doc = ""] - + #[doc = "Pitch"] + #[doc = ""] pub y: s16, } #[doc = "Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was updated."] #[doc = ""] - pub const HIDEVENT_PAD0: HID_Event = 0; #[doc = "Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was updated."] #[doc = ""] - pub const HIDEVENT_PAD1: HID_Event = 1; #[doc = "Event signaled by HID-module, when the sharedmem accelerometer state was updated."] #[doc = ""] - pub const HIDEVENT_Accel: HID_Event = 2; #[doc = "Event signaled by HID-module, when the sharedmem gyroscope state was updated."] #[doc = ""] - pub const HIDEVENT_Gyro: HID_Event = 3; #[doc = "Event signaled by HID-module, when the sharedmem DebugPad state was updated."] #[doc = ""] - pub const HIDEVENT_DebugPad: HID_Event = 4; #[doc = "Used to know how many events there are."] #[doc = ""] - pub const HIDEVENT_MAX: HID_Event = 5; #[doc = "HID events."] #[doc = ""] - pub type HID_Event = ::libc::c_uint; extern "C" { -#[doc = "HID shared memory handle."] -#[doc = ""] - + #[doc = "HID shared memory handle."] + #[doc = ""] pub static mut hidMemHandle: Handle; } extern "C" { -#[doc = "HID shared memory."] -#[doc = ""] - + #[doc = "HID shared memory."] + #[doc = ""] pub static mut hidSharedMem: *mut vu32; } extern "C" { #[must_use] -#[doc = "Initializes HID."] -#[doc = ""] - + #[doc = "Initializes HID."] + #[doc = ""] pub fn hidInit() -> Result; } extern "C" { -#[doc = "Exits HID."] -#[doc = ""] - + #[doc = "Exits HID."] + #[doc = ""] pub fn hidExit(); } extern "C" { -#[doc = "Sets the key repeat parameters for [`hidKeysRepeat`]"] -#[doc = "# Arguments"] -#[doc = "`delay` - Initial delay."] -#[doc = "`interval` - Repeat interval."] -#[doc = ""] - + #[doc = "Sets the key repeat parameters for [`hidKeysRepeat`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `delay` - Initial delay."] + #[doc = "* `interval` - Repeat interval."] + #[doc = ""] pub fn hidSetRepeatParameters(delay: u32_, interval: u32_); } extern "C" { -#[doc = "Scans HID for input data."] -#[doc = ""] - + #[doc = "Scans HID for input data."] + #[doc = ""] pub fn hidScanInput(); } extern "C" { -#[doc = "Returns a bitmask of held buttons."] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = "Returns:"] -#[doc = "32-bit bitmask of held buttons (1+ frames)."] -#[doc = ""] - + #[doc = "Returns a bitmask of held buttons."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of held buttons (1+ frames)."] + #[doc = ""] pub fn hidKeysHeld() -> u32_; } extern "C" { -#[doc = "Returns a bitmask of newly pressed buttons, this frame."] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = "Returns:"] -#[doc = "32-bit bitmask of newly pressed buttons."] -#[doc = ""] - + #[doc = "Returns a bitmask of newly pressed buttons, this frame."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of newly pressed buttons."] + #[doc = ""] pub fn hidKeysDown() -> u32_; } extern "C" { -#[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = "Returns:"] -#[doc = "32-bit bitmask of newly pressed or repeated buttons."] -#[doc = ""] - + #[doc = "Returns a bitmask of newly pressed or repeated buttons, this frame."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of newly pressed or repeated buttons."] + #[doc = ""] pub fn hidKeysDownRepeat() -> u32_; } extern "C" { -#[doc = "Returns a bitmask of newly released buttons, this frame."] -#[doc = "Individual buttons can be extracted using binary AND."] -#[doc = "Returns:"] -#[doc = "32-bit bitmask of newly released buttons."] -#[doc = ""] - + #[doc = "Returns a bitmask of newly released buttons, this frame."] + #[doc = ""] + #[doc = "Individual buttons can be extracted using binary AND."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 32-bit bitmask of newly released buttons."] + #[doc = ""] pub fn hidKeysUp() -> u32_; } extern "C" { -#[doc = "Reads the current touch position."] -#[doc = "# Arguments"] -#[doc = "`pos` - Pointer to output the touch position to."] -#[doc = ""] - + #[doc = "Reads the current touch position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Pointer to output the touch position to."] + #[doc = ""] pub fn hidTouchRead(pos: *mut touchPosition); } extern "C" { -#[doc = "Reads the current circle pad position."] -#[doc = "# Arguments"] -#[doc = "`pos` - Pointer to output the circle pad position to."] -#[doc = ""] - + #[doc = "Reads the current circle pad position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Pointer to output the circle pad position to."] + #[doc = ""] pub fn hidCircleRead(pos: *mut circlePosition); } extern "C" { -#[doc = "Reads the current accelerometer data."] -#[doc = "# Arguments"] -#[doc = "`vector` - Pointer to output the accelerometer data to."] -#[doc = ""] - + #[doc = "Reads the current accelerometer data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `vector` - Pointer to output the accelerometer data to."] + #[doc = ""] pub fn hidAccelRead(vector: *mut accelVector); } extern "C" { -#[doc = "Reads the current gyroscope data."] -#[doc = "# Arguments"] -#[doc = "`rate` - Pointer to output the gyroscope data to."] -#[doc = ""] - + #[doc = "Reads the current gyroscope data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `rate` - Pointer to output the gyroscope data to."] + #[doc = ""] pub fn hidGyroRead(rate: *mut angularRate); } extern "C" { -#[doc = "Waits for an HID event."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the event."] -#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] -#[doc = ""] - + #[doc = "Waits for an HID event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the event."] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = ""] pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool); } extern "C" { #[must_use] -#[doc = "Waits for any HID or IRRST event."] -#[doc = "# Arguments"] -#[doc = "`nextEvents` - Whether to discard the current events and wait for the next events."] -#[doc = "`cancelEvent` - Optional additional handle to wait on, otherwise 0."] -#[doc = "`timeout` - Timeout."] -#[doc = ""] - + #[doc = "Waits for any HID or IRRST event."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nextEvents` - Whether to discard the current events and wait for the next events."] + #[doc = "* `cancelEvent` - Optional additional handle to wait on, otherwise 0."] + #[doc = "* `timeout` - Timeout."] + #[doc = ""] pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the handles for HID operation."] -#[doc = "# Arguments"] -#[doc = "`outMemHandle` - Pointer to output the shared memory handle to."] -#[doc = "`eventpad0` - Pointer to output the pad 0 event handle to."] -#[doc = "`eventpad1` - Pointer to output the pad 1 event handle to."] -#[doc = "`eventaccel` - Pointer to output the accelerometer event handle to."] -#[doc = "`eventgyro` - Pointer to output the gyroscope event handle to."] -#[doc = "`eventdebugpad` - Pointer to output the debug pad event handle to."] -#[doc = ""] - + #[doc = "Gets the handles for HID operation."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMemHandle` - Pointer to output the shared memory handle to."] + #[doc = "* `eventpad0` - Pointer to output the pad 0 event handle to."] + #[doc = "* `eventpad1` - Pointer to output the pad 1 event handle to."] + #[doc = "* `eventaccel` - Pointer to output the accelerometer event handle to."] + #[doc = "* `eventgyro` - Pointer to output the gyroscope event handle to."] + #[doc = "* `eventdebugpad` - Pointer to output the debug pad event handle to."] + #[doc = ""] pub fn HIDUSER_GetHandles( outMemHandle: *mut Handle, eventpad0: *mut Handle, @@ -19838,151 +19675,144 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Enables the accelerometer."] -#[doc = ""] - + #[doc = "Enables the accelerometer."] + #[doc = ""] pub fn HIDUSER_EnableAccelerometer() -> Result; } extern "C" { #[must_use] -#[doc = "Disables the accelerometer."] -#[doc = ""] - + #[doc = "Disables the accelerometer."] + #[doc = ""] pub fn HIDUSER_DisableAccelerometer() -> Result; } extern "C" { #[must_use] -#[doc = "Enables the gyroscope."] -#[doc = ""] - + #[doc = "Enables the gyroscope."] + #[doc = ""] pub fn HIDUSER_EnableGyroscope() -> Result; } extern "C" { #[must_use] -#[doc = "Disables the gyroscope."] -#[doc = ""] - + #[doc = "Disables the gyroscope."] + #[doc = ""] pub fn HIDUSER_DisableGyroscope() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the gyroscope raw to dps coefficient."] -#[doc = "# Arguments"] -#[doc = "`coeff` - Pointer to output the coefficient to."] -#[doc = ""] - + #[doc = "Gets the gyroscope raw to dps coefficient."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coeff` - Pointer to output the coefficient to."] + #[doc = ""] pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current volume slider value. (0-63)"] -#[doc = "# Arguments"] -#[doc = "`volume` - Pointer to write the volume slider value to."] -#[doc = ""] - + #[doc = "Gets the current volume slider value. (0-63)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `volume` - Pointer to write the volume slider value to."] + #[doc = ""] pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result; } extern "C" { -#[doc = "IRRST's shared memory handle."] -#[doc = ""] - + #[doc = "IRRST's shared memory handle."] + #[doc = ""] pub static mut irrstMemHandle: Handle; } extern "C" { -#[doc = "IRRST's shared memory."] -#[doc = ""] - + #[doc = "IRRST's shared memory."] + #[doc = ""] pub static mut irrstSharedMem: *mut vu32; } extern "C" { -#[doc = "IRRST's state update event"] -#[doc = ""] - + #[doc = "IRRST's state update event"] + #[doc = ""] pub static mut irrstEvent: Handle; } extern "C" { #[must_use] -#[doc = "Initializes IRRST."] -#[doc = ""] - + #[doc = "Initializes IRRST."] + #[doc = ""] pub fn irrstInit() -> Result; } extern "C" { -#[doc = "Exits IRRST."] -#[doc = ""] - + #[doc = "Exits IRRST."] + #[doc = ""] pub fn irrstExit(); } extern "C" { -#[doc = "Scans IRRST for input."] -#[doc = ""] - + #[doc = "Scans IRRST for input."] + #[doc = ""] pub fn irrstScanInput(); } extern "C" { -#[doc = "Gets IRRST's held keys."] -#[doc = "Returns:"] -#[doc = "IRRST's held keys."] -#[doc = ""] - + #[doc = "Gets IRRST's held keys."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* IRRST's held keys."] + #[doc = ""] pub fn irrstKeysHeld() -> u32_; } extern "C" { -#[doc = "Reads the current c-stick position."] -#[doc = "# Arguments"] -#[doc = "`pos` - Pointer to output the current c-stick position to."] -#[doc = ""] - + #[doc = "Reads the current c-stick position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Pointer to output the current c-stick position to."] + #[doc = ""] pub fn irrstCstickRead(pos: *mut circlePosition); } extern "C" { -#[doc = "Waits for the IRRST input event to trigger."] -#[doc = "# Arguments"] -#[doc = "`nextEvent` - Whether to discard the current event and wait until the next event."] -#[doc = ""] - + #[doc = "Waits for the IRRST input event to trigger."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nextEvent` - Whether to discard the current event and wait until the next event."] + #[doc = ""] pub fn irrstWaitForEvent(nextEvent: bool); } extern "C" { #[must_use] -#[doc = "Gets the shared memory and event handles for IRRST."] -#[doc = "# Arguments"] -#[doc = "`outMemHandle` - Pointer to write the shared memory handle to."] -#[doc = "`outEventHandle` - Pointer to write the event handle to."] -#[doc = ""] - + #[doc = "Gets the shared memory and event handles for IRRST."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMemHandle` - Pointer to write the shared memory handle to."] + #[doc = "* `outEventHandle` - Pointer to write the event handle to."] + #[doc = ""] pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes IRRST."] -#[doc = "# Arguments"] -#[doc = "`unk1` - Unknown."] -#[doc = "`unk2` - Unknown."] -#[doc = ""] - + #[doc = "Initializes IRRST."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk1` - Unknown."] + #[doc = "* `unk2` - Unknown."] + #[doc = ""] pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Shuts down IRRST."] -#[doc = ""] - + #[doc = "Shuts down IRRST."] + #[doc = ""] pub fn IRRST_Shutdown() -> Result; } #[doc = "sslc context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct sslcContext { -#[doc = "Service handle."] -#[doc = ""] - + #[doc = "Service handle."] + #[doc = ""] pub servhandle: Handle, -#[doc = "SSLC handle."] -#[doc = ""] - + #[doc = "SSLC handle."] + #[doc = ""] pub sslchandle: u32_, pub sharedmem_handle: Handle, } @@ -20006,48 +19836,48 @@ pub const SSLCOPT_TLSv10: _bindgen_ty_23 = 2048; #[doc = "sslc options. "] #[doc = ""] - pub type _bindgen_ty_23 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] -#[doc = ""] - + #[doc = "Initializes SSLC. Normally session_handle should be 0. When non-zero this will use the specified handle for the main-service-session without using the Initialize command, instead of using srvGetServiceHandle."] + #[doc = ""] pub fn sslcInit(session_handle: Handle) -> Result; } extern "C" { -#[doc = "Exits SSLC."] -#[doc = ""] - + #[doc = "Exits SSLC."] + #[doc = ""] pub fn sslcExit(); } extern "C" { #[must_use] -#[doc = "Creates a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - Output contexthandle."] -#[doc = ""] - + #[doc = "Creates a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Destroys a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain contexthandle."] -#[doc = ""] - + #[doc = "Destroys a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain contexthandle."] + #[doc = ""] pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a trusted RootCA cert to a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "`cert` - Pointer to the DER cert."] -#[doc = "`certsize` - Size of the DER cert."] -#[doc = ""] - + #[doc = "Adds a trusted RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert` - Pointer to the DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = ""] pub fn sslcAddTrustedRootCA( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -20057,13 +19887,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default RootCA cert to a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "`certID` - ID of the cert to add."] -#[doc = "`cert_contexthandle` - Optional, the cert contexthandle can be written here."] -#[doc = ""] - + #[doc = "Adds a default RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `certID` - ID of the cert to add."] + #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] + #[doc = ""] pub fn sslcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -20072,12 +19903,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Removes the specified cert from the RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "`cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] -#[doc = ""] - + #[doc = "Removes the specified cert from the RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the RootCertChain."] + #[doc = ""] pub fn sslcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -20085,31 +19917,34 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Creates an unknown CertChain."] -#[doc = "# Arguments"] -#[doc = "`CertChain_contexthandle` - Output contexthandle."] -#[doc = ""] - + #[doc = "Creates an unknown CertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Destroys a CertChain from sslcCreate8CertChain()."] -#[doc = "# Arguments"] -#[doc = "`CertChain_contexthandle` - CertChain contexthandle."] -#[doc = ""] - + #[doc = "Destroys a CertChain from sslcCreate8CertChain()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain contexthandle."] + #[doc = ""] pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] -#[doc = "# Arguments"] -#[doc = "`CertChain_contexthandle` - CertChain to use."] -#[doc = "`cert` - Pointer to the cert."] -#[doc = "`certsize` - Size of the cert."] -#[doc = ""] - + #[doc = "Adds a cert to a CertChain from sslcCreate8CertChain()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain to use."] + #[doc = "* `cert` - Pointer to the cert."] + #[doc = "* `certsize` - Size of the cert."] + #[doc = ""] pub fn sslc8CertChainAddCert( CertChain_contexthandle: u32_, cert: *const u8_, @@ -20119,13 +19954,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] -#[doc = "# Arguments"] -#[doc = "`CertChain_contexthandle` - CertChain to use."] -#[doc = "`certID` - ID of the cert to add."] -#[doc = "`cert_contexthandle` - Optional, the cert contexthandle can be written here."] -#[doc = ""] - + #[doc = "Adds a default cert to a CertChain from sslcCreate8CertChain(). Not actually usable since no certIDs are implemented in SSL-module for this."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain to use."] + #[doc = "* `certID` - ID of the cert to add."] + #[doc = "* `cert_contexthandle` - Optional, the cert contexthandle can be written here."] + #[doc = ""] pub fn sslc8CertChainAddDefaultCert( CertChain_contexthandle: u32_, certID: u8_, @@ -20134,12 +19970,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] -#[doc = "# Arguments"] -#[doc = "`CertChain_contexthandle` - CertChain to use."] -#[doc = "`cert_contexthandle` - Cert contexthandle to remove from the CertChain."] -#[doc = ""] - + #[doc = "Removes the specified cert from the CertChain from sslcCreate8CertChain()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `CertChain_contexthandle` - CertChain to use."] + #[doc = "* `cert_contexthandle` - Cert contexthandle to remove from the CertChain."] + #[doc = ""] pub fn sslc8CertChainRemoveCert( CertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -20147,15 +19984,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a new ClientCert-context."] -#[doc = "# Arguments"] -#[doc = "`cert` - Pointer to the DER cert."] -#[doc = "`certsize` - Size of the DER cert."] -#[doc = "`key` - Pointer to the DER key."] -#[doc = "`keysize` - Size of the DER key."] -#[doc = "`ClientCert_contexthandle` - Output contexthandle."] -#[doc = ""] - + #[doc = "Opens a new ClientCert-context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cert` - Pointer to the DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `key` - Pointer to the DER key."] + #[doc = "* `keysize` - Size of the DER key."] + #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -20166,12 +20004,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a ClientCert-context with a default certID."] -#[doc = "# Arguments"] -#[doc = "`certID` - ID of the ClientCert to use."] -#[doc = "`ClientCert_contexthandle` - Output contexthandle."] -#[doc = ""] - + #[doc = "Opens a ClientCert-context with a default certID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `certID` - ID of the ClientCert to use."] + #[doc = "* `ClientCert_contexthandle` - Output contexthandle."] + #[doc = ""] pub fn sslcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -20179,40 +20018,42 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes the specified ClientCert-context."] -#[doc = "# Arguments"] -#[doc = "`ClientCert_contexthandle` - ClientCert-context to use."] -#[doc = ""] - + #[doc = "Closes the specified ClientCert-context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ClientCert_contexthandle` - ClientCert-context to use."] + #[doc = ""] pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "This uses ps:ps SeedRNG internally."] -#[doc = ""] - + #[doc = "This uses ps:ps SeedRNG internally."] + #[doc = ""] pub fn sslcSeedRNG() -> Result; } extern "C" { #[must_use] -#[doc = "This uses ps:ps GenerateRandomData internally."] -#[doc = "# Arguments"] -#[doc = "`buf` - Output buffer."] -#[doc = "`size` - Output size."] -#[doc = ""] - + #[doc = "This uses ps:ps GenerateRandomData internally."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Output buffer."] + #[doc = "* `size` - Output size."] + #[doc = ""] pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a sslc context."] -#[doc = "# Arguments"] -#[doc = "`context` - sslc context."] -#[doc = "`sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] -#[doc = "`input_opt` - Input sslc options bitmask."] -#[doc = "`hostname` - Server hostname."] -#[doc = ""] - + #[doc = "Creates a sslc context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - sslc context."] + #[doc = "* `sockfd` - Socket fd, this code automatically uses the required SOC command before using the actual sslc command."] + #[doc = "* `input_opt` - Input sslc options bitmask."] + #[doc = "* `hostname` - Server hostname."] + #[doc = ""] pub fn sslcCreateContext( context: *mut sslcContext, sockfd: ::libc::c_int, @@ -20286,17 +20127,14 @@ extern "C" { } #[doc = "HTTP context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct httpcContext { -#[doc = "Service handle."] -#[doc = ""] - + #[doc = "Service handle."] + #[doc = ""] pub servhandle: Handle, -#[doc = "HTTP handle."] -#[doc = ""] - + #[doc = "HTTP handle."] + #[doc = ""] pub httphandle: u32_, } pub const HTTPC_METHOD_GET: HTTPC_RequestMethod = 1; @@ -20307,52 +20145,46 @@ pub const HTTPC_METHOD_DELETE: HTTPC_RequestMethod = 5; #[doc = "HTTP request method."] #[doc = ""] - pub type HTTPC_RequestMethod = ::libc::c_uint; #[doc = "Request in progress."] #[doc = ""] - pub const HTTPC_STATUS_REQUEST_IN_PROGRESS: HTTPC_RequestStatus = 5; #[doc = "Download ready."] #[doc = ""] - pub const HTTPC_STATUS_DOWNLOAD_READY: HTTPC_RequestStatus = 7; #[doc = "HTTP request status."] #[doc = ""] - pub type HTTPC_RequestStatus = ::libc::c_uint; pub const HTTPC_KEEPALIVE_DISABLED: HTTPC_KeepAlive = 0; pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1; #[doc = "HTTP KeepAlive option."] #[doc = ""] - pub type HTTPC_KeepAlive = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] -#[doc = ""] - + #[doc = "Initializes HTTPC. For HTTP GET the sharedmem_size can be zero. The sharedmem contains data which will be later uploaded for HTTP POST. sharedmem_size should be aligned to 0x1000-bytes."] + #[doc = ""] pub fn httpcInit(sharedmem_size: u32_) -> Result; } extern "C" { -#[doc = "Exits HTTPC."] -#[doc = ""] - + #[doc = "Exits HTTPC."] + #[doc = ""] pub fn httpcExit(); } extern "C" { #[must_use] -#[doc = "Opens a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to open."] -#[doc = "`url` - URL to connect to."] -#[doc = "`use_defaultproxy` - Whether the default proxy should be used (0 for default)"] -#[doc = ""] - + #[doc = "Opens a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to open."] + #[doc = "* `url` - URL to connect to."] + #[doc = "* `use_defaultproxy` - Whether the default proxy should be used (0 for default)"] + #[doc = ""] pub fn httpcOpenContext( context: *mut httpcContext, method: HTTPC_RequestMethod, @@ -20362,31 +20194,34 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to close."] -#[doc = ""] - + #[doc = "Closes a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to close."] + #[doc = ""] pub fn httpcCloseContext(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels a HTTP connection."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to close."] -#[doc = ""] - + #[doc = "Cancels a HTTP connection."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to close."] + #[doc = ""] pub fn httpcCancelConnection(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a request header field to a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`name` - Name of the field."] -#[doc = "`value` - Value of the field."] -#[doc = ""] - + #[doc = "Adds a request header field to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - Value of the field."] + #[doc = ""] pub fn httpcAddRequestHeaderField( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20395,13 +20230,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a POST form field to a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`name` - Name of the field."] -#[doc = "`value` - Value of the field."] -#[doc = ""] - + #[doc = "Adds a POST form field to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - Value of the field."] + #[doc = ""] pub fn httpcAddPostDataAscii( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20410,14 +20246,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a POST form field with binary data to a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`name` - Name of the field."] -#[doc = "`value` - The binary data to pass as a value."] -#[doc = "`len` - Length of the binary data which has been passed."] -#[doc = ""] - + #[doc = "Adds a POST form field with binary data to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - The binary data to pass as a value."] + #[doc = "* `len` - Length of the binary data which has been passed."] + #[doc = ""] pub fn httpcAddPostDataBinary( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20427,45 +20264,49 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a POST body to a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`data` - The data to be passed as raw into the body of the post request."] -#[doc = "`len` - Length of data passed by data param."] -#[doc = ""] - + #[doc = "Adds a POST body to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `data` - The data to be passed as raw into the body of the post request."] + #[doc = "* `len` - Length of data passed by data param."] + #[doc = ""] pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Begins a HTTP request."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = ""] - + #[doc = "Begins a HTTP request."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = ""] pub fn httpcBeginRequest(context: *mut httpcContext) -> Result; } extern "C" { #[must_use] -#[doc = "Receives data from a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`buffer` - Buffer to receive data to."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Receives data from a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `buffer` - Buffer to receive data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Receives data from a HTTP context with a timeout value."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`buffer` - Buffer to receive data to."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`timeout` - Maximum time in nanoseconds to wait for a reply."] -#[doc = ""] - + #[doc = "Receives data from a HTTP context with a timeout value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `buffer` - Buffer to receive data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] + #[doc = ""] pub fn httpcReceiveDataTimeout( context: *mut httpcContext, buffer: *mut u8_, @@ -20475,12 +20316,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the request state of a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`out` - Pointer to output the HTTP request state to."] -#[doc = ""] - + #[doc = "Gets the request state of a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `out` - Pointer to output the HTTP request state to."] + #[doc = ""] pub fn httpcGetRequestState( context: *mut httpcContext, out: *mut HTTPC_RequestStatus, @@ -20488,13 +20330,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the download size state of a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`downloadedsize` - Pointer to output the downloaded size to."] -#[doc = "`contentsize` - Pointer to output the total content size to."] -#[doc = ""] - + #[doc = "Gets the download size state of a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `downloadedsize` - Pointer to output the downloaded size to."] + #[doc = "* `contentsize` - Pointer to output the total content size to."] + #[doc = ""] pub fn httpcGetDownloadSizeState( context: *mut httpcContext, downloadedsize: *mut u32_, @@ -20503,23 +20346,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the response code of the HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to get the response code of."] -#[doc = "`out` - Pointer to write the response code to."] -#[doc = ""] - + #[doc = "Gets the response code of the HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to get the response code of."] + #[doc = "* `out` - Pointer to write the response code to."] + #[doc = ""] pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the response code of the HTTP context with a timeout value."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to get the response code of."] -#[doc = "`out` - Pointer to write the response code to."] -#[doc = "`timeout` - Maximum time in nanoseconds to wait for a reply."] -#[doc = ""] - + #[doc = "Gets the response code of the HTTP context with a timeout value."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to get the response code of."] + #[doc = "* `out` - Pointer to write the response code to."] + #[doc = "* `timeout` - Maximum time in nanoseconds to wait for a reply."] + #[doc = ""] pub fn httpcGetResponseStatusCodeTimeout( context: *mut httpcContext, out: *mut u32_, @@ -20528,14 +20373,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a response header field from a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`name` - Name of the field."] -#[doc = "`value` - Pointer to output the value of the field to."] -#[doc = "`valuebuf_maxsize` - Maximum size of the value buffer."] -#[doc = ""] - + #[doc = "Gets a response header field from a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `name` - Name of the field."] + #[doc = "* `value` - Pointer to output the value of the field to."] + #[doc = "* `valuebuf_maxsize` - Maximum size of the value buffer."] + #[doc = ""] pub fn httpcGetResponseHeader( context: *mut httpcContext, name: *const ::libc::c_char, @@ -20545,13 +20391,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a trusted RootCA cert to a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`cert` - Pointer to DER cert."] -#[doc = "`certsize` - Size of the DER cert."] -#[doc = ""] - + #[doc = "Adds a trusted RootCA cert to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = ""] pub fn httpcAddTrustedRootCA( context: *mut httpcContext, cert: *const u8_, @@ -20560,22 +20407,24 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default RootCA cert to a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`certID` - ID of the cert to add, see sslc.h."] -#[doc = ""] - + #[doc = "Adds a default RootCA cert to a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = ""] pub fn httpcAddDefaultCert(context: *mut httpcContext, certID: SSLC_DefaultRootCert) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the RootCertChain for a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] -#[doc = ""] - + #[doc = "Sets the RootCertChain for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `RootCertChain_contexthandle` - Contexthandle for the RootCertChain."] + #[doc = ""] pub fn httpcSelectRootCertChain( context: *mut httpcContext, RootCertChain_contexthandle: u32_, @@ -20583,15 +20432,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the ClientCert for a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`cert` - Pointer to DER cert."] -#[doc = "`certsize` - Size of the DER cert."] -#[doc = "`privk` - Pointer to the DER private key."] -#[doc = "`privk_size` - Size of the privk."] -#[doc = ""] - + #[doc = "Sets the ClientCert for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `privk` - Pointer to the DER private key."] + #[doc = "* `privk_size` - Size of the privk."] + #[doc = ""] pub fn httpcSetClientCert( context: *mut httpcContext, cert: *const u8_, @@ -20602,12 +20452,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the default clientcert for a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`certID` - ID of the cert to add, see sslc.h."] -#[doc = ""] - + #[doc = "Sets the default clientcert for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = ""] pub fn httpcSetClientCertDefault( context: *mut httpcContext, certID: SSLC_DefaultClientCert, @@ -20615,12 +20466,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the ClientCert contexthandle for a HTTP context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to use."] -#[doc = "`ClientCert_contexthandle` - Contexthandle for the ClientCert."] -#[doc = ""] - + #[doc = "Sets the ClientCert contexthandle for a HTTP context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to use."] + #[doc = "* `ClientCert_contexthandle` - Contexthandle for the ClientCert."] + #[doc = ""] pub fn httpcSetClientCertContext( context: *mut httpcContext, ClientCert_contexthandle: u32_, @@ -20628,54 +20480,61 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets SSL options for the context."] -#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] -#[doc = "# Arguments"] -#[doc = "`context` - Context to set flags on."] -#[doc = "`options` - SSL option flags."] -#[doc = ""] - + #[doc = "Sets SSL options for the context."] + #[doc = ""] + #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to set flags on."] + #[doc = "* `options` - SSL option flags."] + #[doc = ""] pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the SSL options which will be cleared for the context."] -#[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] -#[doc = "# Arguments"] -#[doc = "`context` - Context to clear flags on."] -#[doc = "`options` - SSL option flags."] -#[doc = ""] - + #[doc = "Sets the SSL options which will be cleared for the context."] + #[doc = ""] + #[doc = "The HTTPC SSL option bits are the same as those defined in sslc.h"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to clear flags on."] + #[doc = "* `options` - SSL option flags."] + #[doc = ""] pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - Output RootCertChain contexthandle."] -#[doc = ""] - + #[doc = "Creates a RootCertChain. Up to 2 RootCertChains can be created under this user-process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - Output RootCertChain contexthandle."] + #[doc = ""] pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Destroy a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = ""] - + #[doc = "Destroy a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = ""] pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Adds a RootCA cert to a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "`cert` - Pointer to DER cert."] -#[doc = "`certsize` - Size of the DER cert."] -#[doc = "`cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] -#[doc = ""] - + #[doc = "Adds a RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] + #[doc = ""] pub fn httpcRootCertChainAddCert( RootCertChain_contexthandle: u32_, cert: *const u8_, @@ -20685,13 +20544,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adds a default RootCA cert to a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "`certID` - ID of the cert to add, see sslc.h."] -#[doc = "`cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] -#[doc = ""] - + #[doc = "Adds a default RootCA cert to a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = "* `cert_contexthandle` - Optional output ptr for the cert contexthandle(this can be NULL)."] + #[doc = ""] pub fn httpcRootCertChainAddDefaultCert( RootCertChain_contexthandle: u32_, certID: SSLC_DefaultRootCert, @@ -20700,12 +20560,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Removes a cert from a RootCertChain."] -#[doc = "# Arguments"] -#[doc = "`RootCertChain_contexthandle` - RootCertChain to use."] -#[doc = "`cert_contexthandle` - Contexthandle of the cert to remove."] -#[doc = ""] - + #[doc = "Removes a cert from a RootCertChain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `RootCertChain_contexthandle` - RootCertChain to use."] + #[doc = "* `cert_contexthandle` - Contexthandle of the cert to remove."] + #[doc = ""] pub fn httpcRootCertChainRemoveCert( RootCertChain_contexthandle: u32_, cert_contexthandle: u32_, @@ -20713,15 +20574,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] -#[doc = "# Arguments"] -#[doc = "`cert` - Pointer to DER cert."] -#[doc = "`certsize` - Size of the DER cert."] -#[doc = "`privk` - Pointer to the DER private key."] -#[doc = "`privk_size` - Size of the privk."] -#[doc = "`ClientCert_contexthandle` - Output ClientCert context handle."] -#[doc = ""] - + #[doc = "Opens a ClientCert-context. Up to 2 ClientCert-contexts can be open under this user-process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cert` - Pointer to DER cert."] + #[doc = "* `certsize` - Size of the DER cert."] + #[doc = "* `privk` - Pointer to the DER private key."] + #[doc = "* `privk_size` - Size of the privk."] + #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] + #[doc = ""] pub fn httpcOpenClientCertContext( cert: *const u8_, certsize: u32_, @@ -20732,12 +20594,13 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] -#[doc = "# Arguments"] -#[doc = "`certID` - ID of the cert to add, see sslc.h."] -#[doc = "`ClientCert_contexthandle` - Output ClientCert context handle."] -#[doc = ""] - + #[doc = "Opens a ClientCert-context with a default clientclient. Up to 2 ClientCert-contexts can be open under this user-process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `certID` - ID of the cert to add, see sslc.h."] + #[doc = "* `ClientCert_contexthandle` - Output ClientCert context handle."] + #[doc = ""] pub fn httpcOpenDefaultClientCertContext( certID: SSLC_DefaultClientCert, ClientCert_contexthandle: *mut u32_, @@ -20745,24 +20608,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Closes a ClientCert context."] -#[doc = "# Arguments"] -#[doc = "`ClientCert_contexthandle` - ClientCert context to use."] -#[doc = ""] - + #[doc = "Closes a ClientCert context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ClientCert_contexthandle` - ClientCert context to use."] + #[doc = ""] pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Downloads data from the HTTP context into a buffer."] -#[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to download data from."] -#[doc = "`buffer` - Buffer to write data to."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`downloadedsize` - Pointer to write the size of the downloaded data to."] -#[doc = ""] - + #[doc = "Downloads data from the HTTP context into a buffer."] + #[doc = ""] + #[doc = "The *entire* content must be downloaded before using httpcCloseContext(), otherwise httpcCloseContext() will hang."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to download data from."] + #[doc = "* `buffer` - Buffer to write data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `downloadedsize` - Pointer to write the size of the downloaded data to."] + #[doc = ""] pub fn httpcDownloadData( context: *mut httpcContext, buffer: *mut u8_, @@ -20772,17 +20638,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets Keep-Alive for the context."] -#[doc = "# Arguments"] -#[doc = "`context` - Context to set the KeepAlive flag on."] -#[doc = "`option` - HTTPC_KeepAlive option."] -#[doc = ""] - + #[doc = "Sets Keep-Alive for the context."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context` - Context to set the KeepAlive flag on."] + #[doc = "* `option` - HTTPC_KeepAlive option."] + #[doc = ""] pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result; } #[doc = "Node info struct."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct udsNodeInfo { @@ -20826,7 +20692,6 @@ impl Default for udsNodeInfo { } #[doc = "Connection status struct."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct udsConnectionStatus { @@ -20841,7 +20706,6 @@ pub struct udsConnectionStatus { } #[doc = "Network struct stored as big-endian."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct udsNetworkStruct { @@ -20883,7 +20747,6 @@ pub struct udsBindContext { } #[doc = "General NWM input structure used for AP scanning."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nwmScanInputStruct { @@ -20905,7 +20768,6 @@ impl Default for nwmScanInputStruct { } #[doc = "General NWM output structure from AP scanning."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyHeader { @@ -20915,7 +20777,6 @@ pub struct nwmBeaconDataReplyHeader { } #[doc = "General NWM output structure from AP scanning, for each entry."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct nwmBeaconDataReplyEntry { @@ -20931,7 +20792,6 @@ pub struct nwmBeaconDataReplyEntry { } #[doc = "Output structure generated from host scanning output."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct udsNetworkScanInfo { @@ -20961,28 +20821,29 @@ pub const UDSCONTYPE_Spectator: udsConnectionType = 2; pub type udsConnectionType = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes UDS."] -#[doc = "# Arguments"] -#[doc = "`sharedmem_size` - This must be 0x1000-byte aligned."] -#[doc = "`username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] -#[doc = ""] - + #[doc = "Initializes UDS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sharedmem_size` - This must be 0x1000-byte aligned."] + #[doc = "* `username` - Optional custom UTF-8 username(converted to UTF-16 internally) that other nodes on the UDS network can use. If not set the username from system-config is used. Max len is 10 characters without NUL-terminator."] + #[doc = ""] pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result; } extern "C" { -#[doc = "Exits UDS."] -#[doc = ""] - + #[doc = "Exits UDS."] + #[doc = ""] pub fn udsExit(); } extern "C" { #[must_use] -#[doc = "Generates a NodeInfo struct with data loaded from system-config."] -#[doc = "# Arguments"] -#[doc = "`nodeinfo` - Output NodeInfo struct."] -#[doc = "`username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] -#[doc = ""] - + #[doc = "Generates a NodeInfo struct with data loaded from system-config."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nodeinfo` - Output NodeInfo struct."] + #[doc = "* `username` - If set, this is the UTF-8 string to convert for use in the struct. Max len is 10 characters without NUL-terminator."] + #[doc = ""] pub fn udsGenerateNodeInfo( nodeinfo: *mut udsNodeInfo, username: *const ::libc::c_char, @@ -20990,34 +20851,37 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] -#[doc = "# Arguments"] -#[doc = "`nodeinfo` - Input NodeInfo struct."] -#[doc = "`username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] -#[doc = ""] - + #[doc = "Loads the UTF-16 username stored in the input NodeInfo struct, converted to UTF-8."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nodeinfo` - Input NodeInfo struct."] + #[doc = "* `username` - This is the output UTF-8 string. Max len is 10 characters without NUL-terminator."] + #[doc = ""] pub fn udsGetNodeInfoUsername( nodeinfo: *const udsNodeInfo, username: *mut ::libc::c_char, ) -> Result; } extern "C" { -#[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] -#[doc = "# Arguments"] -#[doc = "`nodeinfo` - Input NodeInfo struct."] -#[doc = ""] - + #[doc = "Checks whether a NodeInfo struct was initialized by NWM-module(not any output from udsGenerateNodeInfo())."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nodeinfo` - Input NodeInfo struct."] + #[doc = ""] pub fn udsCheckNodeInfoInitialized(nodeinfo: *const udsNodeInfo) -> bool; } extern "C" { -#[doc = "Generates a default NetworkStruct for creating networks."] -#[doc = "# Arguments"] -#[doc = "`network` - The output struct."] -#[doc = "`wlancommID` - Unique local-WLAN communications ID for each application."] -#[doc = "`id8` - Additional ID that can be used by the application for different types of networks."] -#[doc = "`max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] -#[doc = ""] - + #[doc = "Generates a default NetworkStruct for creating networks."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `network` - The output struct."] + #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] + #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] + #[doc = "* `max_nodes` - Maximum number of nodes(devices) that can be connected to the network, including the host."] + #[doc = ""] pub fn udsGenerateDefaultNetworkStruct( network: *mut udsNetworkStruct, wlancommID: u32_, @@ -21027,15 +20891,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Scans for networks via beacon-scanning."] -#[doc = "# Arguments"] -#[doc = "`outbuf` - Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] -#[doc = "`maxsize` - Max size of the buffer."] -#[doc = "`wlancommID` - Unique local-WLAN communications ID for each application."] -#[doc = "`id8` - Additional ID that can be used by the application for different types of networks."] -#[doc = "`host_macaddress` - When set, this code will only return network info from the specified host MAC address."] -#[doc = ""] - + #[doc = "Scans for networks via beacon-scanning."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outbuf` - Buffer which will be used by the beacon-scanning command and for the data parsing afterwards. Normally there's no need to use the contents of this buffer once this function returns."] + #[doc = "* `maxsize` - Max size of the buffer."] + #[doc = "* `wlancommID` - Unique local-WLAN communications ID for each application."] + #[doc = "* `id8` - Additional ID that can be used by the application for different types of networks."] + #[doc = "* `host_macaddress` - When set, this code will only return network info from the specified host MAC address."] + #[doc = ""] pub fn udsScanBeacons( outbuf: *mut ::libc::c_void, maxsize: size_t, @@ -21049,23 +20914,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] -#[doc = "# Arguments"] -#[doc = "`buf` - Appdata buffer."] -#[doc = "`size` - Size of the input appdata."] -#[doc = ""] - + #[doc = "This can be used by the host to set the appdata contained in the broadcasted beacons."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Appdata buffer."] + #[doc = "* `size` - Size of the input appdata."] + #[doc = ""] pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] -#[doc = "# Arguments"] -#[doc = "`buf` - Appdata buffer."] -#[doc = "`size` - Max size of the output buffer."] -#[doc = "`actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] -#[doc = ""] - + #[doc = "This can be used while on a network(host/client) to get the appdata from the current beacon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Appdata buffer."] + #[doc = "* `size` - Max size of the output buffer."] + #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] + #[doc = ""] pub fn udsGetApplicationData( buf: *mut ::libc::c_void, size: size_t, @@ -21074,13 +20941,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] -#[doc = "# Arguments"] -#[doc = "`buf` - Appdata buffer."] -#[doc = "`size` - Max size of the output buffer."] -#[doc = "`actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] -#[doc = ""] - + #[doc = "This can be used with a NetworkStruct, from udsScanBeacons() mainly, for getting the appdata."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Appdata buffer."] + #[doc = "* `size` - Max size of the output buffer."] + #[doc = "* `actual_size` - If set, the actual size of the appdata written into the buffer is stored here."] + #[doc = ""] pub fn udsGetNetworkStructApplicationData( network: *const udsNetworkStruct, buf: *mut ::libc::c_void, @@ -21090,15 +20958,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Create a bind."] -#[doc = "# Arguments"] -#[doc = "`bindcontext` - The output bind context."] -#[doc = "`NetworkNodeID` - This is the NetworkNodeID which this bind can receive data from."] -#[doc = "`spectator` - False for a regular bind, true for a spectator."] -#[doc = "`data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] -#[doc = "`recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] -#[doc = ""] - + #[doc = "Create a bind."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - The output bind context."] + #[doc = "* `NetworkNodeID` - This is the NetworkNodeID which this bind can receive data from."] + #[doc = "* `spectator` - False for a regular bind, true for a spectator."] + #[doc = "* `data_channel` - This is an arbitrary value to use for data-frame filtering. This bind will only receive data frames which contain a matching data_channel value, which was specified by udsSendTo(). The data_channel must be non-zero."] + #[doc = "* `recv_buffer_size` - Size of the buffer under sharedmem used for temporarily storing received data-frames which are then loaded by udsPullPacket(). The system requires this to be >=0x5F4. UDS_DEFAULT_RECVBUFSIZE can be used for this."] + #[doc = ""] pub fn udsBind( bindcontext: *mut udsBindContext, NetworkNodeID: u16_, @@ -21109,23 +20978,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Remove a bind."] -#[doc = "# Arguments"] -#[doc = "`bindcontext` - The bind context."] -#[doc = ""] - + #[doc = "Remove a bind."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - The bind context."] + #[doc = ""] pub fn udsUnbind(bindcontext: *mut udsBindContext) -> Result; } extern "C" { -#[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] -#[doc = "Returns:"] -#[doc = "Always true. However if wait=false, this will return false if the event wasn't signaled."] -#[doc = "# Arguments"] -#[doc = "`bindcontext` - The bind context."] -#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] -#[doc = "`wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] -#[doc = ""] - + #[doc = "Waits for the bind event to occur, or checks if the event was signaled. This event is signaled every time new data is available via udsPullPacket()."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Always true. However if wait=false, this will return false if the event wasn't signaled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - The bind context."] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] + #[doc = ""] pub fn udsWaitDataAvailable( bindcontext: *const udsBindContext, nextEvent: bool, @@ -21134,15 +21007,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] -#[doc = "# Arguments"] -#[doc = "`bindcontext` - Bind context."] -#[doc = "`buf` - Output receive buffer."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] -#[doc = "`src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] -#[doc = ""] - + #[doc = "Receives data over the network. This data is loaded from the recv_buffer setup by udsBind(). When a node disconnects, this will still return data from that node until there's no more frames from that node in the recv_buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bindcontext` - Bind context."] + #[doc = "* `buf` - Output receive buffer."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `actual_size` - If set, the actual size written into the output buffer is stored here. This is zero when no data was received."] + #[doc = "* `src_NetworkNodeID` - If set, the source NetworkNodeID is written here. This is zero when no data was received."] + #[doc = ""] pub fn udsPullPacket( bindcontext: *const udsBindContext, buf: *mut ::libc::c_void, @@ -21153,15 +21027,16 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sends data over the network."] -#[doc = "# Arguments"] -#[doc = "`dst_NetworkNodeID` - Destination NetworkNodeID."] -#[doc = "`data_channel` - See udsBind()."] -#[doc = "`flags` - Send flags, see the UDS_SENDFLAG enum values."] -#[doc = "`buf` - Input send buffer."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Sends data over the network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dst_NetworkNodeID` - Destination NetworkNodeID."] + #[doc = "* `data_channel` - See udsBind()."] + #[doc = "* `flags` - Send flags, see the UDS_SENDFLAG enum values."] + #[doc = "* `buf` - Input send buffer."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn udsSendTo( dst_NetworkNodeID: u16_, data_channel: u8_, @@ -21172,25 +21047,27 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the wifi channel currently being used."] -#[doc = "# Arguments"] -#[doc = "`channel` - Output channel."] -#[doc = ""] - + #[doc = "Gets the wifi channel currently being used."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `channel` - Output channel."] + #[doc = ""] pub fn udsGetChannel(channel: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Starts hosting a new network."] -#[doc = "# Arguments"] -#[doc = "`network` - The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] -#[doc = "`passphrase` - Raw input passphrase buffer."] -#[doc = "`passphrase_size` - Size of the passphrase buffer."] -#[doc = "`context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] -#[doc = "`data_channel` - This is the data_channel value which will be passed to udsBind() internally."] -#[doc = "`recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] -#[doc = ""] - + #[doc = "Starts hosting a new network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `network` - The NetworkStruct, you can use udsGenerateDefaultNetworkStruct() for generating this."] + #[doc = "* `passphrase` - Raw input passphrase buffer."] + #[doc = "* `passphrase_size` - Size of the passphrase buffer."] + #[doc = "* `context` - Optional output bind context which will be created for this host, with NetworkNodeID=UDS_BROADCAST_NETWORKNODEID."] + #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] + #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] + #[doc = ""] pub fn udsCreateNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -21202,18 +21079,19 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Connect to a network."] -#[doc = "# Arguments"] -#[doc = "`network` - The NetworkStruct, you can use udsScanBeacons() for this."] -#[doc = "`passphrase` - Raw input passphrase buffer."] -#[doc = "`passphrase_size` - Size of the passphrase buffer."] -#[doc = "`context` - Optional output bind context which will be created for this host."] -#[doc = "`recv_NetworkNodeID` - This is the NetworkNodeID passed to udsBind() internally."] -#[doc = "`connection_type` - Type of connection, see the udsConnectionType enum values."] -#[doc = "`data_channel` - This is the data_channel value which will be passed to udsBind() internally."] -#[doc = "`recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] -#[doc = ""] - + #[doc = "Connect to a network."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `network` - The NetworkStruct, you can use udsScanBeacons() for this."] + #[doc = "* `passphrase` - Raw input passphrase buffer."] + #[doc = "* `passphrase_size` - Size of the passphrase buffer."] + #[doc = "* `context` - Optional output bind context which will be created for this host."] + #[doc = "* `recv_NetworkNodeID` - This is the NetworkNodeID passed to udsBind() internally."] + #[doc = "* `connection_type` - Type of connection, see the udsConnectionType enum values."] + #[doc = "* `data_channel` - This is the data_channel value which will be passed to udsBind() internally."] + #[doc = "* `recv_buffer_size` - This is the recv_buffer_size value which will be passed to udsBind() internally."] + #[doc = ""] pub fn udsConnectNetwork( network: *const udsNetworkStruct, passphrase: *const ::libc::c_void, @@ -21227,90 +21105,94 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Stop hosting the network."] -#[doc = ""] - + #[doc = "Stop hosting the network."] + #[doc = ""] pub fn udsDestroyNetwork() -> Result; } extern "C" { #[must_use] -#[doc = "Disconnect this client device from the network."] -#[doc = ""] - + #[doc = "Disconnect this client device from the network."] + #[doc = ""] pub fn udsDisconnectNetwork() -> Result; } extern "C" { #[must_use] -#[doc = "This can be used by the host to force-disconnect client(s)."] -#[doc = "# Arguments"] -#[doc = "`NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] -#[doc = ""] - + #[doc = "This can be used by the host to force-disconnect client(s)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NetworkNodeID` - Target NetworkNodeID. UDS_BROADCAST_NETWORKNODEID can be used to disconnect all clients."] + #[doc = ""] pub fn udsEjectClient(NetworkNodeID: u16_) -> Result; } extern "C" { #[must_use] -#[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] -#[doc = ""] - + #[doc = "This can be used by the host to force-disconnect the spectators. Afterwards new spectators will not be allowed to connect until udsAllowSpectators() is used."] + #[doc = ""] pub fn udsEjectSpectator() -> Result; } extern "C" { #[must_use] -#[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] -#[doc = "# Arguments"] -#[doc = "`bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] -#[doc = "`flag` - When false, bit-clear, otherwise bit-set."] -#[doc = ""] - + #[doc = "This can be used by the host to update the network attributes. If bitmask 0x4 is clear in the input bitmask, this clears that bit in the value before actually writing the value into state. Normally you should use the below wrapper functions."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bitmask` - Bitmask to clear/set in the attributes. See the UDSNETATTR enum values."] + #[doc = "* `flag` - When false, bit-clear, otherwise bit-set."] + #[doc = ""] pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result; } extern "C" { #[must_use] -#[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] -#[doc = "# Arguments"] -#[doc = "`block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] -#[doc = "`clients` - When true, (un)block regular clients."] -#[doc = "`flag` - When true, update UDSNETATTR_x4. Normally this should be false."] -#[doc = ""] - + #[doc = "This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `block` - When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear)."] + #[doc = "* `clients` - When true, (un)block regular clients."] + #[doc = "* `flag` - When true, update UDSNETATTR_x4. Normally this should be false."] + #[doc = ""] pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result; } extern "C" { #[must_use] -#[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] -#[doc = ""] - + #[doc = "This uses udsUpdateNetworkAttribute() for unblocking new spectator connections to this host. See udsEjectSpectator() for blocking new spectators."] + #[doc = ""] pub fn udsAllowSpectators() -> Result; } extern "C" { #[must_use] -#[doc = "This loads the current ConnectionStatus struct."] -#[doc = "# Arguments"] -#[doc = "`output` - Output ConnectionStatus struct."] -#[doc = ""] - + #[doc = "This loads the current ConnectionStatus struct."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `output` - Output ConnectionStatus struct."] + #[doc = ""] pub fn udsGetConnectionStatus(output: *mut udsConnectionStatus) -> Result; } extern "C" { -#[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] -#[doc = "Returns:"] -#[doc = "Always true. However if wait=false, this will return false if the event wasn't signaled."] -#[doc = "# Arguments"] -#[doc = "`nextEvent` - Whether to discard the current event and wait for the next event."] -#[doc = "`wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] -#[doc = ""] - + #[doc = "Waits for the ConnectionStatus event to occur, or checks if the event was signaled. This event is signaled when the data from udsGetConnectionStatus() was updated internally."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Always true. However if wait=false, this will return false if the event wasn't signaled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `nextEvent` - Whether to discard the current event and wait for the next event."] + #[doc = "* `wait` - When true this will not return until the event is signaled. When false this checks if the event was signaled without waiting for it."] + #[doc = ""] pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool; } extern "C" { #[must_use] -#[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] -#[doc = "# Arguments"] -#[doc = "`NetworkNodeID` - Target NetworkNodeID."] -#[doc = "`output` - Output NodeInfo struct."] -#[doc = ""] - + #[doc = "This loads a NodeInfo struct for the specified NetworkNodeID. The broadcast alias can't be used with this."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `NetworkNodeID` - Target NetworkNodeID."] + #[doc = "* `output` - Output NodeInfo struct."] + #[doc = ""] pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result; } pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0; @@ -21321,7 +21203,6 @@ pub const NDM_EXCLUSIVE_STATE_STREETPASS_DATA: ndmExclusiveState = 4; #[doc = "Exclusive states."] #[doc = ""] - pub type ndmExclusiveState = ::libc::c_uint; pub const NDM_STATE_INITIAL: ndmState = 0; pub const NDM_STATE_SUSPENDED: ndmState = 1; @@ -21338,7 +21219,6 @@ pub const NDM_STATE_CEC_SUSPENDING: ndmState = 11; #[doc = "Current states."] #[doc = ""] - pub type ndmState = ::libc::c_uint; pub const NDM_DAEMON_CEC: ndmDaemon = 0; pub const NDM_DAEMON_BOSS: ndmDaemon = 1; @@ -21355,7 +21235,6 @@ pub const NDM_DAEMON_MASK_DEFAULT: ndmDaemonMask = 9; #[doc = "Used to specify multiple daemons."] #[doc = ""] - pub type ndmDaemonMask = ::libc::c_uint; pub const NDM_DAEMON_STATUS_BUSY: ndmDaemonStatus = 0; pub const NDM_DAEMON_STATUS_IDLE: ndmDaemonStatus = 1; @@ -21364,325 +21243,299 @@ pub const NDM_DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3; pub type ndmDaemonStatus = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes ndmu."] -#[doc = ""] - + #[doc = "Initializes ndmu."] + #[doc = ""] pub fn ndmuInit() -> Result; } extern "C" { -#[doc = "Exits ndmu."] -#[doc = ""] - + #[doc = "Exits ndmu."] + #[doc = ""] pub fn ndmuExit(); } extern "C" { #[must_use] -#[doc = "Sets the network daemon to an exclusive state."] -#[doc = "# Arguments"] -#[doc = "`state` - State specified in the ndmExclusiveState enumerator."] -#[doc = ""] - + #[doc = "Sets the network daemon to an exclusive state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - State specified in the ndmExclusiveState enumerator."] + #[doc = ""] pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels an exclusive state for the network daemon."] -#[doc = ""] - + #[doc = "Cancels an exclusive state for the network daemon."] + #[doc = ""] pub fn NDMU_LeaveExclusiveState() -> Result; } extern "C" { #[must_use] -#[doc = "Returns the exclusive state for the network daemon."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to write the exclsuive state to."] -#[doc = ""] - + #[doc = "Returns the exclusive state for the network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the exclsuive state to."] + #[doc = ""] pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result; } extern "C" { #[must_use] -#[doc = "Locks the exclusive state."] -#[doc = ""] - + #[doc = "Locks the exclusive state."] + #[doc = ""] pub fn NDMU_LockState() -> Result; } extern "C" { #[must_use] -#[doc = "Unlocks the exclusive state."] -#[doc = ""] - + #[doc = "Unlocks the exclusive state."] + #[doc = ""] pub fn NDMU_UnlockState() -> Result; } extern "C" { #[must_use] -#[doc = "Suspends network daemon."] -#[doc = "# Arguments"] -#[doc = "`mask` - The specified daemon."] -#[doc = ""] - + #[doc = "Suspends network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mask` - The specified daemon."] + #[doc = ""] pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] -#[doc = "Resumes network daemon."] -#[doc = "# Arguments"] -#[doc = "`mask` - The specified daemon."] -#[doc = ""] - + #[doc = "Resumes network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mask` - The specified daemon."] + #[doc = ""] pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result; } extern "C" { #[must_use] -#[doc = "Suspends scheduling for all network daemons."] -#[doc = "# Arguments"] -#[doc = "`flag` - 0 = Wait for completion, 1 = Perform in background."] -#[doc = ""] - + #[doc = "Suspends scheduling for all network daemons."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `flag` - 0 = Wait for completion, 1 = Perform in background."] + #[doc = ""] pub fn NDMU_SuspendScheduler(flag: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Resumes daemon scheduling."] -#[doc = ""] - + #[doc = "Resumes daemon scheduling."] + #[doc = ""] pub fn NDMU_ResumeScheduler() -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current state for the network daemon."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to write the current state to."] -#[doc = ""] - + #[doc = "Returns the current state for the network daemon."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the current state to."] + #[doc = ""] pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the daemon state."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to write the daemons state to."] -#[doc = ""] - + #[doc = "Returns the daemon state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write the daemons state to."] + #[doc = ""] pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the scan interval."] -#[doc = "# Arguments"] -#[doc = "`interval` - Value to set the scan interval to."] -#[doc = ""] - + #[doc = "Sets the scan interval."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Value to set the scan interval to."] + #[doc = ""] pub fn NDMU_SetScanInterval(interval: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the scan interval."] -#[doc = "# Arguments"] -#[doc = "`interval` - Pointer to write the interval value to."] -#[doc = ""] - + #[doc = "Returns the scan interval."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Pointer to write the interval value to."] + #[doc = ""] pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the retry interval."] -#[doc = "# Arguments"] -#[doc = "`interval` - Pointer to write the interval value to."] -#[doc = ""] - + #[doc = "Returns the retry interval."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Pointer to write the interval value to."] + #[doc = ""] pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Reverts network daemon to defaults."] -#[doc = ""] - + #[doc = "Reverts network daemon to defaults."] + #[doc = ""] pub fn NDMU_ResetDaemons() -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current default daemon bit mask."] -#[doc = "# Arguments"] -#[doc = "`interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] -#[doc = ""] - + #[doc = "Gets the current default daemon bit mask."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `interval` - Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)"] + #[doc = ""] pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result; } extern "C" { #[must_use] -#[doc = "Clears half awake mac filter."] -#[doc = ""] - + #[doc = "Clears half awake mac filter."] + #[doc = ""] pub fn NDMU_ClearMacFilter() -> Result; } #[doc = "Initial installation"] #[doc = ""] - pub const IM_DEFAULT: NIM_InstallationMode = 0; #[doc = "Unknown"] #[doc = ""] - pub const IM_UNKNOWN1: NIM_InstallationMode = 1; #[doc = "Unknown"] #[doc = ""] - pub const IM_UNKNOWN2: NIM_InstallationMode = 2; #[doc = "Reinstall currently installed title; use this if the title is already installed (including updates)"] #[doc = ""] - pub const IM_REINSTALL: NIM_InstallationMode = 3; #[doc = "Mode that NIM downloads/installs a title with."] #[doc = ""] - pub type NIM_InstallationMode = ::libc::c_uint; #[doc = "Download not yet initialized"] #[doc = ""] - pub const DS_NOT_INITIALIZED: NIM_DownloadState = 0; #[doc = "Download initialized"] #[doc = ""] - pub const DS_INITIALIZED: NIM_DownloadState = 1; #[doc = "Downloading and installing TMD"] #[doc = ""] - pub const DS_DOWNLOAD_TMD: NIM_DownloadState = 2; #[doc = "Initializing save data"] #[doc = ""] - pub const DS_PREPARE_SAVE_DATA: NIM_DownloadState = 3; #[doc = "Downloading and installing contents"] #[doc = ""] - pub const DS_DOWNLOAD_CONTENTS: NIM_DownloadState = 4; #[doc = "Waiting before calling AM_CommitImportTitles"] #[doc = ""] - pub const DS_WAIT_COMMIT: NIM_DownloadState = 5; #[doc = "Running AM_CommitImportTitles"] #[doc = ""] - pub const DS_COMMITTING: NIM_DownloadState = 6; #[doc = "Title installation finished"] #[doc = ""] - pub const DS_FINISHED: NIM_DownloadState = 7; #[doc = "(unknown error regarding title version)"] #[doc = ""] - pub const DS_VERSION_ERROR: NIM_DownloadState = 8; #[doc = "Creating the .ctx file?"] #[doc = ""] - pub const DS_CREATE_CONTEXT: NIM_DownloadState = 9; #[doc = "Irrecoverable error encountered (e.g. out of space)"] #[doc = ""] - pub const DS_CANNOT_RECOVER: NIM_DownloadState = 10; #[doc = "Invalid state"] #[doc = ""] - pub const DS_INVALID: NIM_DownloadState = 11; #[doc = "Current state of a NIM download/installation."] #[doc = ""] - pub type NIM_DownloadState = ::libc::c_uint; #[doc = "Input configuration for NIM download/installation tasks."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleConfig { -#[doc = "Title ID"] -#[doc = ""] - + #[doc = "Title ID"] + #[doc = ""] pub titleId: u64_, -#[doc = "Title version"] -#[doc = ""] - + #[doc = "Title version"] + #[doc = ""] pub version: u32_, -#[doc = "Always 0"] -#[doc = ""] - + #[doc = "Always 0"] + #[doc = ""] pub unknown_0: u32_, -#[doc = "Age for the HOME Menu parental controls"] -#[doc = ""] - + #[doc = "Age for the HOME Menu parental controls"] + #[doc = ""] pub ratingAge: u8_, -#[doc = "Media type, see [`FS_MediaType`] enum"] -#[doc = ""] - + #[doc = "Media type, see [`FS_MediaType`] enum"] + #[doc = ""] pub mediaType: u8_, -#[doc = "Padding"] -#[doc = ""] - + #[doc = "Padding"] + #[doc = ""] pub padding: [u8_; 2usize], -#[doc = "Unknown input, seems to be always 0"] -#[doc = ""] - + #[doc = "Unknown input, seems to be always 0"] + #[doc = ""] pub unknown_1: u32_, } #[doc = "Output struct for NIM downloads/installations in progress."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NIM_TitleProgress { -#[doc = "State, see NIM_DownloadState enum"] -#[doc = ""] - + #[doc = "State, see NIM_DownloadState enum"] + #[doc = ""] pub state: u32_, -#[doc = "Last result code in NIM"] -#[doc = ""] - + #[doc = "Last result code in NIM"] + #[doc = ""] pub lastResult: Result, -#[doc = "Amount of bytes that have been downloaded"] -#[doc = ""] - + #[doc = "Amount of bytes that have been downloaded"] + #[doc = ""] pub downloadedSize: u64_, -#[doc = "Amount of bytes that need to be downloaded in total"] -#[doc = ""] - + #[doc = "Amount of bytes that need to be downloaded in total"] + #[doc = ""] pub totalSize: u64_, } extern "C" { #[must_use] -#[doc = "Initializes nim:s. This uses networking and is blocking."] -#[doc = "# Arguments"] -#[doc = "`buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] -#[doc = "`buffer_len` - Length of the passed buffer."] -#[doc = ""] - + #[doc = "Initializes nim:s. This uses networking and is blocking."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] + #[doc = "* `buffer_len` - Length of the passed buffer."] + #[doc = ""] pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] -#[doc = "# Arguments"] -#[doc = "`buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] -#[doc = "`buffer_len` - Length of the passed buffer."] -#[doc = "`TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use [`nimsInit`] instead."] -#[doc = ""] - + #[doc = "Initializes nim:s with the given TIN. This uses networking and is blocking."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buffer` - A buffer for internal use. It must be at least 0x20000 bytes long."] + #[doc = "* `buffer_len` - Length of the passed buffer."] + #[doc = "* `TIN` - The TIN to initialize nim:s with. If you do not know what a TIN is or why you would want to change it, use [`nimsInit`] instead."] + #[doc = ""] pub fn nimsInitWithTIN( buffer: *mut ::libc::c_void, buffer_len: size_t, @@ -21690,46 +21543,47 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Exits nim:s."] -#[doc = ""] - + #[doc = "Exits nim:s."] + #[doc = ""] pub fn nimsExit(); } extern "C" { -#[doc = "Gets the current nim:s session handle."] -#[doc = ""] - + #[doc = "Gets the current nim:s session handle."] + #[doc = ""] pub fn nimsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Sets an attribute."] -#[doc = "# Arguments"] -#[doc = "`attr` - Name of the attribute."] -#[doc = "`val` - Value of the attribute."] -#[doc = ""] - + #[doc = "Sets an attribute."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `attr` - Name of the attribute."] + #[doc = "* `val` - Value of the attribute."] + #[doc = ""] pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Checks if nim wants a system update."] -#[doc = "# Arguments"] -#[doc = "`want_update` - Set to true if a system update is required. Can be NULL."] -#[doc = ""] - + #[doc = "Checks if nim wants a system update."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `want_update` - Set to true if a system update is required. Can be NULL."] + #[doc = ""] pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result; } extern "C" { -#[doc = "Makes a TitleConfig struct for use with [`NIMS_RegisterTask`] [`NIMS_StartDownload`] or [`NIMS_StartDownloadSimple`]"] -#[doc = "# Arguments"] -#[doc = "`cfg` - Struct to initialize."] -#[doc = "`titleId` - Title ID to download and install."] -#[doc = "`version` - Version of the title to download and install."] -#[doc = "`ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] -#[doc = "`mediaType` - Media type of the title to download and install."] -#[doc = ""] - + #[doc = "Makes a TitleConfig struct for use with [`NIMS_RegisterTask`] [`NIMS_StartDownload`] or [`NIMS_StartDownloadSimple`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Struct to initialize."] + #[doc = "* `titleId` - Title ID to download and install."] + #[doc = "* `version` - Version of the title to download and install."] + #[doc = "* `ratingAge` - Age for which the title is aged; used by parental controls in HOME Menu."] + #[doc = "* `mediaType` - Media type of the title to download and install."] + #[doc = ""] pub fn NIMS_MakeTitleConfig( cfg: *mut NIM_TitleConfig, titleId: u64_, @@ -21740,13 +21594,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] -#[doc = "# Arguments"] -#[doc = "`cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] -#[doc = "`name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] -#[doc = "`maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] -#[doc = ""] - + #[doc = "Registers a background download task with NIM. These are processed in sleep mode only."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] + #[doc = "* `name` - Name of the title in UTF-8. Will be displayed on the HOME Menu. Maximum 73 characters."] + #[doc = "* `maker` - Name of the maker/publisher in UTF-8. Will be displayed on the HOME Menu. Maximum 37 characters."] + #[doc = ""] pub fn NIMS_RegisterTask( cfg: *const NIM_TitleConfig, name: *const ::libc::c_char, @@ -21755,56 +21610,60 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Checks whether a background download task for the given title is registered with NIM."] -#[doc = "# Arguments"] -#[doc = "`titleId` - Title ID to check for."] -#[doc = "`registered` - Whether there is a background download task registered."] -#[doc = ""] - + #[doc = "Checks whether a background download task for the given title is registered with NIM."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Title ID to check for."] + #[doc = "* `registered` - Whether there is a background download task registered."] + #[doc = ""] pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Unregisters a background download task."] -#[doc = "# Arguments"] -#[doc = "`titleId` - Title ID whose background download task to cancel."] -#[doc = ""] - + #[doc = "Unregisters a background download task."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Title ID whose background download task to cancel."] + #[doc = ""] pub fn NIMS_UnregisterTask(titleId: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Starts an active download with NIM. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] -#[doc = "# Arguments"] -#[doc = "`cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] -#[doc = "`mode` - The installation mode to use. See [`NIM_InstallationMode`]"] -#[doc = ""] - + #[doc = "Starts an active download with NIM. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] + #[doc = "* `mode` - The installation mode to use. See [`NIM_InstallationMode`]"] + #[doc = ""] pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result; } extern "C" { #[must_use] -#[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] -#[doc = "# Arguments"] -#[doc = "`cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] -#[doc = ""] - + #[doc = "Starts an active download with NIM with default installation mode; cannot reinstall titles. Progress can be checked with [`NIMS_GetProcess`] Do not exit the process while a download is in progress without calling [`NIMS_CancelDownload`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cfg` - Title config to use. See [`NIMS_MakeTitleConfig`]"] + #[doc = ""] pub fn NIMS_StartDownloadSimple(cfg: *const NIM_TitleConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Checks the status of the current active download."] -#[doc = "# Arguments"] -#[doc = "`tp` - Title progress struct to write to. See [`NIM_TitleProgress`]"] -#[doc = ""] - + #[doc = "Checks the status of the current active download."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tp` - Title progress struct to write to. See [`NIM_TitleProgress`]"] + #[doc = ""] pub fn NIMS_GetProgress(tp: *mut NIM_TitleProgress) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels the current active download with NIM."] -#[doc = ""] - + #[doc = "Cancels the current active download with NIM."] + #[doc = ""] pub fn NIMS_CancelDownload() -> Result; } extern "C" { @@ -21816,60 +21675,65 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Turns wireless on or off."] -#[doc = "# Arguments"] -#[doc = "`enableWifi` - True enables it, false disables it."] -#[doc = ""] - + #[doc = "Turns wireless on or off."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `enableWifi` - True enables it, false disables it."] + #[doc = ""] pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes IRU."] -#[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] -#[doc = "# Arguments"] -#[doc = "`sharedmem_addr` - Address of the shared memory block to use."] -#[doc = "`sharedmem_size` - Size of the shared memory block."] -#[doc = ""] - + #[doc = "Initializes IRU."] + #[doc = ""] + #[doc = "The permissions for the specified memory is set to RO. This memory must be already mapped."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sharedmem_addr` - Address of the shared memory block to use."] + #[doc = "* `sharedmem_size` - Size of the shared memory block."] + #[doc = ""] pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result; } extern "C" { -#[doc = "Shuts down IRU."] -#[doc = ""] - + #[doc = "Shuts down IRU."] + #[doc = ""] pub fn iruExit(); } extern "C" { -#[doc = "Gets the IRU service handle."] -#[doc = "Returns:"] -#[doc = "The IRU service handle."] -#[doc = ""] - + #[doc = "Gets the IRU service handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The IRU service handle."] + #[doc = ""] pub fn iruGetServHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Sends IR data."] -#[doc = "# Arguments"] -#[doc = "`buf` - Buffer to send data from."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`wait` - Whether to wait for the data to be sent."] -#[doc = ""] - + #[doc = "Sends IR data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to send data from."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `wait` - Whether to wait for the data to be sent."] + #[doc = ""] pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Receives IR data."] -#[doc = "# Arguments"] -#[doc = "`buf` - Buffer to receive data to."] -#[doc = "`size` - Size of the buffer."] -#[doc = "`flag` - Flags to receive data with."] -#[doc = "`transfercount` - Pointer to output the number of bytes read to."] -#[doc = "`wait` - Whether to wait for the data to be received."] -#[doc = ""] - + #[doc = "Receives IR data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to receive data to."] + #[doc = "* `size` - Size of the buffer."] + #[doc = "* `flag` - Flags to receive data with."] + #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] + #[doc = "* `wait` - Whether to wait for the data to be received."] + #[doc = ""] pub fn iruRecvData( buf: *mut u8_, size: u32_, @@ -21880,165 +21744,170 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes the IR session."] -#[doc = ""] - + #[doc = "Initializes the IR session."] + #[doc = ""] pub fn IRU_Initialize() -> Result; } extern "C" { #[must_use] -#[doc = "Shuts down the IR session."] -#[doc = ""] - + #[doc = "Shuts down the IR session."] + #[doc = ""] pub fn IRU_Shutdown() -> Result; } extern "C" { #[must_use] -#[doc = "Begins sending data."] -#[doc = "# Arguments"] -#[doc = "`buf` - Buffer to send."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Begins sending data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Buffer to send."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for a send operation to complete."] -#[doc = ""] - + #[doc = "Waits for a send operation to complete."] + #[doc = ""] pub fn IRU_WaitSendTransfer() -> Result; } extern "C" { #[must_use] -#[doc = "Begins receiving data."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the data to receive."] -#[doc = "`flag` - Flags to use when receiving."] -#[doc = ""] - + #[doc = "Begins receiving data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data to receive."] + #[doc = "* `flag` - Flags to use when receiving."] + #[doc = ""] pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Waits for a receive operation to complete."] -#[doc = "# Arguments"] -#[doc = "`transfercount` - Pointer to output the number of bytes read to."] -#[doc = ""] - + #[doc = "Waits for a receive operation to complete."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `transfercount` - Pointer to output the number of bytes read to."] + #[doc = ""] pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the IR bit rate."] -#[doc = "# Arguments"] -#[doc = "`value` - Bit rate to set."] -#[doc = ""] - + #[doc = "Sets the IR bit rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Bit rate to set."] + #[doc = ""] pub fn IRU_SetBitRate(value: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the IR bit rate."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the bit rate to."] -#[doc = ""] - + #[doc = "Gets the IR bit rate."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the bit rate to."] + #[doc = ""] pub fn IRU_GetBitRate(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the IR LED state."] -#[doc = "# Arguments"] -#[doc = "`value` - IR LED state to set."] -#[doc = ""] - + #[doc = "Sets the IR LED state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - IR LED state to set."] + #[doc = ""] pub fn IRU_SetIRLEDState(value: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the IR LED state."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the IR LED state to."] -#[doc = ""] - + #[doc = "Gets the IR LED state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the IR LED state to."] + #[doc = ""] pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes NS."] -#[doc = ""] - + #[doc = "Initializes NS."] + #[doc = ""] pub fn nsInit() -> Result; } extern "C" { -#[doc = "Exits NS."] -#[doc = ""] - + #[doc = "Exits NS."] + #[doc = ""] pub fn nsExit(); } extern "C" { #[must_use] -#[doc = "Launches a title and the required firmware (only if necessary)."] -#[doc = "# Arguments"] -#[doc = "`titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] -#[doc = ""] - + #[doc = "Launches a title and the required firmware (only if necessary)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings."] + #[doc = ""] pub fn NS_LaunchFIRM(titleid: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Launches a title."] -#[doc = "# Arguments"] -#[doc = "`titleid` - ID of the title to launch, or 0 for gamecard."] -#[doc = "`launch_flags` - Flags used when launching the title."] -#[doc = "`procid` - Pointer to write the process ID of the launched title to."] -#[doc = ""] - + #[doc = "Launches a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to launch, or 0 for gamecard."] + #[doc = "* `launch_flags` - Flags used when launching the title."] + #[doc = "* `procid` - Pointer to write the process ID of the launched title to."] + #[doc = ""] pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the application from which this function is called"] -#[doc = ""] - + #[doc = "Terminates the application from which this function is called"] + #[doc = ""] pub fn NS_TerminateTitle() -> Result; } extern "C" { #[must_use] -#[doc = "Launches a title and the required firmware."] -#[doc = "# Arguments"] -#[doc = "`titleid` - ID of the title to launch, 0 for gamecard."] -#[doc = "`flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] -#[doc = ""] - + #[doc = "Launches a title and the required firmware."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to launch, 0 for gamecard."] + #[doc = "* `flags` - Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields."] + #[doc = ""] pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Reboots to a title."] -#[doc = "# Arguments"] -#[doc = "`mediatype` - Mediatype of the title."] -#[doc = "`titleid` - ID of the title to launch."] -#[doc = ""] - + #[doc = "Reboots to a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mediatype` - Mediatype of the title."] + #[doc = "* `titleid` - ID of the title to launch."] + #[doc = ""] pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the process with the specified titleid."] -#[doc = "# Arguments"] -#[doc = "`titleid` - ID of the title to terminate."] -#[doc = "`timeout` - Timeout in nanoseconds. Pass 0 if not required."] -#[doc = ""] - + #[doc = "Terminates the process with the specified titleid."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleid` - ID of the title to terminate."] + #[doc = "* `timeout` - Timeout in nanoseconds. Pass 0 if not required."] + #[doc = ""] pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Reboots the system"] -#[doc = ""] - + #[doc = "Reboots the system"] + #[doc = ""] pub fn NS_RebootSystem() -> Result; } pub const PMLAUNCHFLAG_NORMAL_APPLICATION: _bindgen_ty_26 = 1; @@ -22049,59 +21918,57 @@ pub const PMLAUNCHFLAG_TERMINATION_NOTIFICATION_MASK: _bindgen_ty_26 = 240; #[doc = "Forces the usage of the O3DS system mode app memory setting even if N3DS system mode is not \"Legacy\". Dev4 and Dev5 not supported. N3DS only."] #[doc = ""] - pub const PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM: _bindgen_ty_26 = 256; #[doc = "In conjunction with the above, forces the 96MB app memory setting. N3DS only."] #[doc = ""] - pub const PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM: _bindgen_ty_26 = 512; pub const PMLAUNCHFLAG_USE_UPDATE_TITLE: _bindgen_ty_26 = 65536; #[doc = "Launch flags for PM launch commands."] #[doc = ""] - pub type _bindgen_ty_26 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes pm:app."] -#[doc = ""] - + #[doc = "Initializes pm:app."] + #[doc = ""] pub fn pmAppInit() -> Result; } extern "C" { -#[doc = "Exits pm:app."] -#[doc = ""] - + #[doc = "Exits pm:app."] + #[doc = ""] pub fn pmAppExit(); } extern "C" { -#[doc = "Gets the current pm:app session handle."] -#[doc = "Returns:"] -#[doc = "The current pm:app session handle."] -#[doc = ""] - + #[doc = "Gets the current pm:app session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current pm:app session handle."] + #[doc = ""] pub fn pmAppGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Launches a title."] -#[doc = "# Arguments"] -#[doc = "`programInfo` - Program information of the title."] -#[doc = "`launchFlags` - Flags to launch the title with."] -#[doc = ""] - + #[doc = "Launches a title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Launches a title, applying patches."] -#[doc = "# Arguments"] -#[doc = "`programInfo` - Program information of the title."] -#[doc = "`programInfoUpdate` - Program information of the update title."] -#[doc = "`launchFlags` - Flags to launch the title with."] -#[doc = ""] - + #[doc = "Launches a title, applying patches."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `programInfoUpdate` - Program information of the update title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMAPP_LaunchTitleUpdate( programInfo: *const FS_ProgramInfo, programInfoUpdate: *const FS_ProgramInfo, @@ -22110,13 +21977,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] -#[doc = "# Arguments"] -#[doc = "`outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] -#[doc = "`outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] -#[doc = "`programInfo` - Program information of the title."] -#[doc = ""] - + #[doc = "Gets a title's ExHeader Arm11CoreInfo and SystemInfo flags."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outCoreInfo` - Pointer to write the ExHeader Arm11CoreInfo to. [Direction: In, Out]"] + #[doc = "* `outSiFlags` - Pointer to write the ExHeader SystemInfo flags to. [Direction: In, Out]"] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = ""] pub fn PMAPP_GetTitleExheaderFlags( outCoreInfo: *mut ExHeader_Arm11CoreInfo, outSiFlags: *mut ExHeader_SystemInfoFlags, @@ -22125,33 +21993,36 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets the current FIRM launch parameters."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the FIRM launch parameter buffer."] -#[doc = "`in` - Buffer to retrieve the launch parameters from."] -#[doc = ""] - + #[doc = "Sets the current FIRM launch parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the FIRM launch parameter buffer."] + #[doc = "* `in` - Buffer to retrieve the launch parameters from."] + #[doc = ""] pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the current FIRM launch parameters."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the FIRM launch parameter buffer."] -#[doc = "`out` - Buffer to write the launch parameters to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Gets the current FIRM launch parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the FIRM launch parameter buffer."] + #[doc = "* `out` - Buffer to write the launch parameters to. [Direction: In, Out]"] + #[doc = ""] pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current FIRM launch parameters."] -#[doc = "# Arguments"] -#[doc = "`firmTidLow` - Low Title ID of the FIRM title to launch."] -#[doc = "`size` - Size of the FIRM launch parameter buffer."] -#[doc = "`in` - Buffer to retrieve the launch parameters from."] -#[doc = ""] - + #[doc = "Sets the current FIRM launch parameters."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `firmTidLow` - Low Title ID of the FIRM title to launch."] + #[doc = "* `size` - Size of the FIRM launch parameter buffer."] + #[doc = "* `in` - Buffer to retrieve the launch parameters from."] + #[doc = ""] pub fn PMAPP_LaunchFIRMSetParams( firmTidLow: u32_, size: u32_, @@ -22160,102 +22031,112 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] -#[doc = "# Arguments"] -#[doc = "`timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] -#[doc = ""] - + #[doc = "Terminate most processes, to prepare for a reboot or a shutdown."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout` - Time limit in ns for process termination, after which the remaining processes are killed."] + #[doc = ""] pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the current Application"] -#[doc = "# Arguments"] -#[doc = "`timeout` - Timeout in nanoseconds"] -#[doc = ""] - + #[doc = "Terminates the current Application"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout` - Timeout in nanoseconds"] + #[doc = ""] pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the processes having the specified titleId."] -#[doc = "# Arguments"] -#[doc = "`titleId` - Title ID of the processes to terminate"] -#[doc = "`timeout` - Timeout in nanoseconds"] -#[doc = ""] - + #[doc = "Terminates the processes having the specified titleId."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `titleId` - Title ID of the processes to terminate"] + #[doc = "* `timeout` - Timeout in nanoseconds"] + #[doc = ""] pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Terminates the specified process"] -#[doc = "# Arguments"] -#[doc = "`pid` - Process-ID of the process to terminate"] -#[doc = "`timeout` - Timeout in nanoseconds"] -#[doc = ""] - + #[doc = "Terminates the specified process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - Process-ID of the process to terminate"] + #[doc = "* `timeout` - Timeout in nanoseconds"] + #[doc = ""] pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Unregisters a process"] -#[doc = "# Arguments"] -#[doc = "`tid` - TitleID of the process to unregister"] -#[doc = ""] - + #[doc = "Unregisters a process"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tid` - TitleID of the process to unregister"] + #[doc = ""] pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the APPLICATION cputime reslimit."] -#[doc = "# Arguments"] -#[doc = "`cpuTime` - Reslimit value."] -#[doc = "# Notes"] -#[doc = "cpuTime can be no higher than reslimitdesc[0] & 0x7F in exheader (or 80 if the latter is 0)."] -#[doc = ""] - + #[doc = "Sets the APPLICATION cputime reslimit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cpuTime` - Reslimit value."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* cpuTime can be no higher than reslimitdesc[0] & 0x7F in exheader (or 80 if the latter is 0)."] + #[doc = ""] pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the APPLICATION cputime reslimit."] -#[doc = "# Arguments"] -#[doc = "`cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Gets the APPLICATION cputime reslimit."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cpuTime` - Pointer to write the reslimit value to. [Direction: In, Out]"] + #[doc = ""] pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes pm:dbg."] -#[doc = ""] - + #[doc = "Initializes pm:dbg."] + #[doc = ""] pub fn pmDbgInit() -> Result; } extern "C" { -#[doc = "Exits pm:dbg."] -#[doc = ""] - + #[doc = "Exits pm:dbg."] + #[doc = ""] pub fn pmDbgExit(); } extern "C" { -#[doc = "Gets the current pm:dbg session handle."] -#[doc = "Returns:"] -#[doc = "The current pm:dbg session handle."] -#[doc = ""] - + #[doc = "Gets the current pm:dbg session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current pm:dbg session handle."] + #[doc = ""] pub fn pmDbgGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] -#[doc = "If another process was enqueued, this just calls [`RunQueuedProcess`] instead."] -#[doc = "# Arguments"] -#[doc = "`Pointer` - to output the debug handle to. [Direction: In, Out]"] -#[doc = "`programInfo` - Program information of the title."] -#[doc = "`launchFlags` - Flags to launch the title with."] -#[doc = ""] - + #[doc = "Enqueues an application for debug after setting cpuTime to 0, and returns a debug handle to it."] + #[doc = ""] + #[doc = "If another process was enqueued, this just calls [`RunQueuedProcess`] instead."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMDBG_LaunchAppDebug( outDebug: *mut Handle, programInfo: *const FS_ProgramInfo, @@ -22264,116 +22145,99 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Launches an application for debug after setting cpuTime to 0."] -#[doc = "# Arguments"] -#[doc = "`programInfo` - Program information of the title."] -#[doc = "`launchFlags` - Flags to launch the title with."] -#[doc = ""] - + #[doc = "Launches an application for debug after setting cpuTime to 0."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programInfo` - Program information of the title."] + #[doc = "* `launchFlags` - Flags to launch the title with."] + #[doc = ""] pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Runs the queued process and returns a debug handle to it."] -#[doc = "# Arguments"] -#[doc = "`Pointer` - to output the debug handle to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Runs the queued process and returns a debug handle to it."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `Pointer` - to output the debug handle to. [Direction: In, Out]"] + #[doc = ""] pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result; } #[doc = "CBC encryption."] #[doc = ""] - pub const PS_ALGORITHM_CBC_ENC: PS_AESAlgorithm = 0; #[doc = "CBC decryption."] #[doc = ""] - pub const PS_ALGORITHM_CBC_DEC: PS_AESAlgorithm = 1; #[doc = "CTR encryption."] #[doc = ""] - pub const PS_ALGORITHM_CTR_ENC: PS_AESAlgorithm = 2; #[doc = "CTR decryption(same as PS_ALGORITHM_CTR_ENC)."] #[doc = ""] - pub const PS_ALGORITHM_CTR_DEC: PS_AESAlgorithm = 3; #[doc = "CCM encryption."] #[doc = ""] - pub const PS_ALGORITHM_CCM_ENC: PS_AESAlgorithm = 4; #[doc = "CCM decryption."] #[doc = ""] - pub const PS_ALGORITHM_CCM_DEC: PS_AESAlgorithm = 5; #[doc = "PS AES algorithms."] #[doc = ""] - pub type PS_AESAlgorithm = ::libc::c_uint; #[doc = "Key slot 0x0D."] #[doc = ""] - pub const PS_KEYSLOT_0D: PS_AESKeyType = 0; #[doc = "Key slot 0x2D."] #[doc = ""] - pub const PS_KEYSLOT_2D: PS_AESKeyType = 1; #[doc = "Key slot 0x31."] #[doc = ""] - pub const PS_KEYSLOT_31: PS_AESKeyType = 2; #[doc = "Key slot 0x38."] #[doc = ""] - pub const PS_KEYSLOT_38: PS_AESKeyType = 3; #[doc = "Key slot 0x32."] #[doc = ""] - pub const PS_KEYSLOT_32: PS_AESKeyType = 4; #[doc = "Key slot 0x39. (DLP)"] #[doc = ""] - pub const PS_KEYSLOT_39_DLP: PS_AESKeyType = 5; #[doc = "Key slot 0x2E."] #[doc = ""] - pub const PS_KEYSLOT_2E: PS_AESKeyType = 6; #[doc = "Invalid key slot."] #[doc = ""] - pub const PS_KEYSLOT_INVALID: PS_AESKeyType = 7; #[doc = "Key slot 0x36."] #[doc = ""] - pub const PS_KEYSLOT_36: PS_AESKeyType = 8; #[doc = "Key slot 0x39. (NFC)"] #[doc = ""] - pub const PS_KEYSLOT_39_NFC: PS_AESKeyType = 9; #[doc = "PS key slots."] #[doc = ""] - pub type PS_AESKeyType = ::libc::c_uint; #[doc = "RSA context."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct psRSAContext { @@ -22393,52 +22257,52 @@ impl Default for psRSAContext { } extern "C" { #[must_use] -#[doc = "Initializes PS."] -#[doc = ""] - + #[doc = "Initializes PS."] + #[doc = ""] pub fn psInit() -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PS with the specified session handle."] -#[doc = "# Arguments"] -#[doc = "`handle` - Session handle."] -#[doc = ""] - + #[doc = "Initializes PS with the specified session handle."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Session handle."] + #[doc = ""] pub fn psInitHandle(handle: Handle) -> Result; } extern "C" { -#[doc = "Exits PS."] -#[doc = ""] - + #[doc = "Exits PS."] + #[doc = ""] pub fn psExit(); } extern "C" { -#[doc = "Returns the PS session handle."] -#[doc = ""] - + #[doc = "Returns the PS session handle."] + #[doc = ""] pub fn psGetSessionHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Signs a RSA signature."] -#[doc = "# Arguments"] -#[doc = "`hash` - SHA256 hash to sign."] -#[doc = "`ctx` - RSA context."] -#[doc = "`signature` - RSA signature."] -#[doc = ""] - + #[doc = "Signs a RSA signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `hash` - SHA256 hash to sign."] + #[doc = "* `ctx` - RSA context."] + #[doc = "* `signature` - RSA signature."] + #[doc = ""] pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Verifies a RSA signature."] -#[doc = "# Arguments"] -#[doc = "`hash` - SHA256 hash to compare with."] -#[doc = "`ctx` - RSA context."] -#[doc = "`signature` - RSA signature."] -#[doc = ""] - + #[doc = "Verifies a RSA signature."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `hash` - SHA256 hash to compare with."] + #[doc = "* `ctx` - RSA context."] + #[doc = "* `signature` - RSA signature."] + #[doc = ""] pub fn PS_VerifyRsaSha256( hash: *mut u8_, ctx: *mut psRSAContext, @@ -22447,16 +22311,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the data."] -#[doc = "`in` - Input buffer."] -#[doc = "`out` - Output buffer."] -#[doc = "`aes_algo` - AES algorithm to use."] -#[doc = "`key_type` - Key type to use."] -#[doc = "`iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] -#[doc = ""] - + #[doc = "Encrypts/Decrypts AES data. Does not support AES CCM."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the data."] + #[doc = "* `in` - Input buffer."] + #[doc = "* `out` - Output buffer."] + #[doc = "* `aes_algo` - AES algorithm to use."] + #[doc = "* `key_type` - Key type to use."] + #[doc = "* `iv` - Pointer to the CTR/IV. The output CTR/IV is also written here."] + #[doc = ""] pub fn PS_EncryptDecryptAes( size: u32_, in_: *mut u8_, @@ -22468,21 +22333,23 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Encrypts/Decrypts signed AES CCM data."] -#[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] -#[doc = "# Arguments"] -#[doc = "`in` - Input buffer."] -#[doc = "`in_size` - Size of the input buffer. Must include MAC size when decrypting."] -#[doc = "`out` - Output buffer."] -#[doc = "`out_size` - Size of the output buffer. Must include MAC size when encrypting."] -#[doc = "`data_len` - Length of the data to be encrypted/decrypted."] -#[doc = "`mac_data_len` - Length of the MAC data."] -#[doc = "`mac_len` - Length of the MAC."] -#[doc = "`aes_algo` - AES algorithm to use."] -#[doc = "`key_type` - Key type to use."] -#[doc = "`nonce` - Pointer to the nonce."] -#[doc = ""] - + #[doc = "Encrypts/Decrypts signed AES CCM data."] + #[doc = ""] + #[doc = "When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `in` - Input buffer."] + #[doc = "* `in_size` - Size of the input buffer. Must include MAC size when decrypting."] + #[doc = "* `out` - Output buffer."] + #[doc = "* `out_size` - Size of the output buffer. Must include MAC size when encrypting."] + #[doc = "* `data_len` - Length of the data to be encrypted/decrypted."] + #[doc = "* `mac_data_len` - Length of the MAC data."] + #[doc = "* `mac_len` - Length of the MAC."] + #[doc = "* `aes_algo` - AES algorithm to use."] + #[doc = "* `key_type` - Key type to use."] + #[doc = "* `nonce` - Pointer to the nonce."] + #[doc = ""] pub fn PS_EncryptSignDecryptVerifyAesCcm( in_: *mut u8_, in_size: u32_, @@ -22498,456 +22365,446 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the 64-bit console friend code seed."] -#[doc = "# Arguments"] -#[doc = "`seed` - Pointer to write the friend code seed to."] -#[doc = ""] - + #[doc = "Gets the 64-bit console friend code seed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `seed` - Pointer to write the friend code seed to."] + #[doc = ""] pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the 32-bit device ID."] -#[doc = "# Arguments"] -#[doc = "`device_id` - Pointer to write the device ID to."] -#[doc = ""] - + #[doc = "Gets the 32-bit device ID."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `device_id` - Pointer to write the device ID to."] + #[doc = ""] pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Generates cryptographically secure random bytes."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to the buffer to write the bytes to."] -#[doc = "`len` - Number of bytes to write."] -#[doc = ""] - + #[doc = "Generates cryptographically secure random bytes."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to the buffer to write the bytes to."] + #[doc = "* `len` - Number of bytes to write."] + #[doc = ""] pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PTMU."] -#[doc = ""] - + #[doc = "Initializes PTMU."] + #[doc = ""] pub fn ptmuInit() -> Result; } extern "C" { -#[doc = "Exits PTMU."] -#[doc = ""] - + #[doc = "Exits PTMU."] + #[doc = ""] pub fn ptmuExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:u session handle."] -#[doc = "Returns:"] -#[doc = "A pointer to the current ptm:u session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:u session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:u session handle."] + #[doc = ""] pub fn ptmuGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the system's current shell state."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] -#[doc = ""] - + #[doc = "Gets the system's current shell state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current shell state to. (0 = closed, 1 = open)"] + #[doc = ""] pub fn PTMU_GetShellState(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's current battery level."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the current battery level to. (0-5)"] -#[doc = ""] - + #[doc = "Gets the system's current battery level."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current battery level to. (0-5)"] + #[doc = ""] pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's current battery charge state."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] -#[doc = ""] - + #[doc = "Gets the system's current battery charge state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)"] + #[doc = ""] pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the system's current pedometer state."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] -#[doc = ""] - + #[doc = "Gets the system's current pedometer state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)"] + #[doc = ""] pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the pedometer's total step count."] -#[doc = "# Arguments"] -#[doc = "`steps` - Pointer to write the total step count to."] -#[doc = ""] - + #[doc = "Gets the pedometer's total step count."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `steps` - Pointer to write the total step count to."] + #[doc = ""] pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the adapter is plugged in or not"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the adapter state to."] -#[doc = ""] - + #[doc = "Gets whether the adapter is plugged in or not"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the adapter state to."] + #[doc = ""] pub fn PTMU_GetAdapterState(out: *mut bool) -> Result; } #[doc = "PDN wake events and MCU interrupts to select, combined with those of other processes"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmWakeEvents { -#[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] -#[doc = ""] - + #[doc = "Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically."] + #[doc = ""] pub pdn_wake_events: u32_, -#[doc = "MCU interrupts to check when a MCU wake event happens."] -#[doc = ""] - + #[doc = "MCU interrupts to check when a MCU wake event happens."] + #[doc = ""] pub mcu_interupt_mask: u32_, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct PtmSleepConfig { -#[doc = "Wake events for which the system should fully wake up."] -#[doc = ""] - + #[doc = "Wake events for which the system should fully wake up."] + #[doc = ""] pub exit_sleep_events: PtmWakeEvents, -#[doc = "Wake events for which the system should return to sleep."] -#[doc = ""] - + #[doc = "Wake events for which the system should return to sleep."] + #[doc = ""] pub continue_sleep_events: PtmWakeEvents, } #[doc = "[`PTMSYSM_RequestSleep`] has been called (ack = 3)"] #[doc = ""] - pub const PTMNOTIFID_SLEEP_REQUESTED: _bindgen_ty_27 = 257; #[doc = "The sleep request has been denied by [`PTMSYSM_ReplyToSleepQuery(true)`] (no ack required)."] #[doc = ""] - pub const PTMNOTIFID_SLEEP_DENIED: _bindgen_ty_27 = 258; #[doc = "The sleep request has been allowed by [`PTMSYSM_ReplyToSleepQuery(false)`] (ack = 1)."] #[doc = ""] - pub const PTMNOTIFID_SLEEP_ALLOWED: _bindgen_ty_27 = 259; #[doc = "All processes not having \"RunnableOnSleep\" have been paused & the system is about to go to sleep (ack = 0)."] #[doc = ""] - pub const PTMNOTIFID_GOING_TO_SLEEP: _bindgen_ty_27 = 260; #[doc = "The system has been woken up, and the paused processes are about to be unpaused (ack = 1)."] #[doc = ""] - pub const PTMNOTIFID_FULLY_WAKING_UP: _bindgen_ty_27 = 261; #[doc = "The system is fully awake (no ack required)."] #[doc = ""] - pub const PTMNOTIFID_FULLY_AWAKE: _bindgen_ty_27 = 262; #[doc = "The system has been woken up but is about to go to sleep again (ack = 2)."] #[doc = ""] - pub const PTMNOTIFID_HALF_AWAKE: _bindgen_ty_27 = 263; #[doc = "The system is about to power off or reboot."] #[doc = ""] - pub const PTMNOTIFID_SHUTDOWN: _bindgen_ty_27 = 264; #[doc = "The battery level has reached 5% or below."] #[doc = ""] - pub const PTMNOTIFID_BATTERY_VERY_LOW: _bindgen_ty_27 = 529; #[doc = "The battery level has reached 10% or below."] #[doc = ""] - pub const PTMNOTIFID_BATTERY_LOW: _bindgen_ty_27 = 530; pub type _bindgen_ty_27 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes ptm:sysm."] -#[doc = ""] - + #[doc = "Initializes ptm:sysm."] + #[doc = ""] pub fn ptmSysmInit() -> Result; } extern "C" { -#[doc = "Exits ptm:sysm."] -#[doc = ""] - + #[doc = "Exits ptm:sysm."] + #[doc = ""] pub fn ptmSysmExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:sysm session handle."] -#[doc = "Returns:"] -#[doc = "A pointer to the current ptm:sysm session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:sysm session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:sysm session handle."] + #[doc = ""] pub fn ptmSysmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Requests to enter sleep mode."] -#[doc = ""] - + #[doc = "Requests to enter sleep mode."] + #[doc = ""] pub fn PTMSYSM_RequestSleep() -> Result; } extern "C" { #[must_use] -#[doc = "Accepts or denies the incoming sleep mode request."] -#[doc = "# Arguments"] -#[doc = "`deny` - Whether or not to deny the sleep request."] -#[doc = "# Notes"] -#[doc = "If deny = false, this is equivalent to calling [`PTMSYSM_NotifySleepPreparationComplete(3)`]"] -#[doc = ""] - + #[doc = "Accepts or denies the incoming sleep mode request."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `deny` - Whether or not to deny the sleep request."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If deny = false, this is equivalent to calling [`PTMSYSM_NotifySleepPreparationComplete(3)`]"] + #[doc = ""] pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] -#[doc = "# Arguments"] -#[doc = "`ackValue` - Use [`ptmSysmGetNotificationAckValue`]"] -#[doc = "# Notes"] -#[doc = "[`PTMNOTIFID_SLEEP_DENIED`] and [`PTMNOTIFID_FULLY_AWAKE`] don't require this."] -#[doc = ""] - + #[doc = "Acknowledges the current sleep notification and advance the internal sleep mode FSM. All subscribers must reply."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ackValue` - Use [`ptmSysmGetNotificationAckValue`]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* [`PTMNOTIFID_SLEEP_DENIED`] and [`PTMNOTIFID_FULLY_AWAKE`] don't require this."] + #[doc = ""] pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] -#[doc = "# Arguments"] -#[doc = "`sleepConfig` - Pointer to the two sets of wake events."] -#[doc = "# Notes"] -#[doc = "Can only be called just before acknowledging [`PTMNOTIFID_GOING_TO_SLEEP`] or [`PTMNOTIFID_HALF_AWAKE`]"] -#[doc = ""] - + #[doc = "Sets the wake events (two sets: when to fully wake up and when to return to sleep)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sleepConfig` - Pointer to the two sets of wake events."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Can only be called just before acknowledging [`PTMNOTIFID_GOING_TO_SLEEP`] or [`PTMNOTIFID_HALF_AWAKE`]"] + #[doc = ""] pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] -#[doc = "# Arguments"] -#[doc = "`sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] -#[doc = ""] - + #[doc = "Gets the wake reason (only the first applicable wake event is taken into account)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sleepConfig` - Pointer to the two sets of wake events. Only the relevant set will be filled."] + #[doc = ""] pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] -#[doc = ""] - + #[doc = "Cancels the \"half-awake\" state and fully wakes up the 3DS after some delay."] + #[doc = ""] pub fn PTMSYSM_Awaken() -> Result; } extern "C" { #[must_use] -#[doc = "Sets the user time by updating the user time offset."] -#[doc = "# Arguments"] -#[doc = "`msY2k` - The number of milliseconds since 01/01/2000."] -#[doc = ""] - + #[doc = "Sets the user time by updating the user time offset."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + #[doc = ""] pub fn PTMSYSM_SetUserTime(msY2k: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] -#[doc = ""] - + #[doc = "Invalidates the \"system time\" (cfg block 0x30002)"] + #[doc = ""] pub fn PTMSYSM_InvalidateSystemTime() -> Result; } extern "C" { #[must_use] -#[doc = "Reads the time and date coming from the RTC and converts the result."] -#[doc = "# Arguments"] -#[doc = "`outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Reads the time and date coming from the RTC and converts the result."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] + #[doc = ""] pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the time and date coming to the RTC, after conversion."] -#[doc = "# Arguments"] -#[doc = "`msY2k` - The number of milliseconds since 01/01/2000."] -#[doc = ""] - + #[doc = "Writes the time and date coming to the RTC, after conversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + #[doc = ""] pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result; } extern "C" { #[must_use] -#[doc = "Returns 1 if it's a New 3DS, otherwise 0."] -#[doc = ""] - + #[doc = "Returns 1 if it's a New 3DS, otherwise 0."] + #[doc = ""] pub fn PTMSYSM_CheckNew3DS() -> Result; } extern "C" { #[must_use] -#[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] -#[doc = "# Arguments"] -#[doc = "`value` - Bit0: enable higher clock, Bit1: enable L2 cache."] -#[doc = ""] - + #[doc = "Configures the New 3DS' CPU clock speed and L2 cache."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `value` - Bit0: enable higher clock, Bit1: enable L2 cache."] + #[doc = ""] pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Trigger a hardware system shutdown via the MCU."] -#[doc = "# Arguments"] -#[doc = "`timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] -#[doc = ""] - + #[doc = "Trigger a hardware system shutdown via the MCU."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] + #[doc = ""] pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Trigger a hardware system reboot via the MCU."] -#[doc = "# Arguments"] -#[doc = "`timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] -#[doc = ""] - + #[doc = "Trigger a hardware system reboot via the MCU."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `timeout:` - timeout passed to PMApp:ShutdownAsync (PrepareForReboot)."] + #[doc = ""] pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PTMGETS."] -#[doc = ""] - + #[doc = "Initializes PTMGETS."] + #[doc = ""] pub fn ptmGetsInit() -> Result; } extern "C" { -#[doc = "Exits PTMGETS."] -#[doc = ""] - + #[doc = "Exits PTMGETS."] + #[doc = ""] pub fn ptmGetsExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:gets session handle."] -#[doc = "Returns:"] -#[doc = "A pointer to the current ptm:gets session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:gets session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:gets session handle."] + #[doc = ""] pub fn ptmGetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Gets the system time."] -#[doc = "# Arguments"] -#[doc = "`outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] -#[doc = ""] - + #[doc = "Gets the system time."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `outMsY2k` - The pointer to write the number of milliseconds since 01/01/2000 to. [Direction: In, Out]"] + #[doc = ""] pub fn PTMGETS_GetSystemTime(outMsY2k: *mut s64) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes PTMSETS."] -#[doc = ""] - + #[doc = "Initializes PTMSETS."] + #[doc = ""] pub fn ptmSetsInit() -> Result; } extern "C" { -#[doc = "Exits PTMSETS."] -#[doc = ""] - + #[doc = "Exits PTMSETS."] + #[doc = ""] pub fn ptmSetsExit(); } extern "C" { -#[doc = "Gets a pointer to the current ptm:sets session handle."] -#[doc = "Returns:"] -#[doc = "A pointer to the current ptm:sets session handle."] -#[doc = ""] - + #[doc = "Gets a pointer to the current ptm:sets session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* A pointer to the current ptm:sets session handle."] + #[doc = ""] pub fn ptmSetsGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Sets the system time."] -#[doc = "# Arguments"] -#[doc = "`msY2k` - The number of milliseconds since 01/01/2000."] -#[doc = ""] - + #[doc = "Sets the system time."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `msY2k` - The number of milliseconds since 01/01/2000."] + #[doc = ""] pub fn PTMSETS_SetSystemTime(msY2k: s64) -> Result; } #[doc = "Do not wait."] #[doc = ""] - pub const WAIT_NONE: PXIDEV_WaitType = 0; #[doc = "Sleep for the specified number of nanoseconds."] #[doc = ""] - pub const WAIT_SLEEP: PXIDEV_WaitType = 1; #[doc = "Wait for IREQ, return if timeout."] #[doc = ""] - pub const WAIT_IREQ_RETURN: PXIDEV_WaitType = 2; #[doc = "Wait for IREQ, continue if timeout."] #[doc = ""] - pub const WAIT_IREQ_CONTINUE: PXIDEV_WaitType = 3; #[doc = "Card SPI wait operation type."] #[doc = ""] - pub type PXIDEV_WaitType = ::libc::c_uint; #[doc = "Do not deassert."] #[doc = ""] - pub const DEASSERT_NONE: PXIDEV_DeassertType = 0; #[doc = "Deassert before waiting."] #[doc = ""] - pub const DEASSERT_BEFORE_WAIT: PXIDEV_DeassertType = 1; #[doc = "Deassert after waiting."] #[doc = ""] - pub const DEASSERT_AFTER_WAIT: PXIDEV_DeassertType = 2; #[doc = "Card SPI register deassertion type."] #[doc = ""] - pub type PXIDEV_DeassertType = ::libc::c_uint; #[doc = "Card SPI transfer buffer."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PXIDEV_SPIBuffer { -#[doc = "Data pointer."] -#[doc = ""] - + #[doc = "Data pointer."] + #[doc = ""] pub ptr: *mut ::libc::c_void, -#[doc = "Data size."] -#[doc = ""] - + #[doc = "Data size."] + #[doc = ""] pub size: u32_, -#[doc = "Transfer options. See [`pxiDevMakeTransferOption`]"] -#[doc = ""] - + #[doc = "Transfer options. See [`pxiDevMakeTransferOption`]"] + #[doc = ""] pub transferOption: u8_, -#[doc = "Wait operation. See [`pxiDevMakeWaitOperation`]"] -#[doc = ""] - + #[doc = "Wait operation. See [`pxiDevMakeWaitOperation`]"] + #[doc = ""] pub waitOperation: u64_, } impl Default for PXIDEV_SPIBuffer { @@ -22961,29 +22818,28 @@ impl Default for PXIDEV_SPIBuffer { } extern "C" { #[must_use] -#[doc = "Initializes pxi:dev."] -#[doc = ""] - + #[doc = "Initializes pxi:dev."] + #[doc = ""] pub fn pxiDevInit() -> Result; } extern "C" { -#[doc = "Shuts down pxi:dev."] -#[doc = ""] - + #[doc = "Shuts down pxi:dev."] + #[doc = ""] pub fn pxiDevExit(); } extern "C" { #[must_use] -#[doc = "Performs multiple card SPI writes and reads."] -#[doc = "# Arguments"] -#[doc = "`header` - Header to lead the transfers with. Must be, at most, 8 bytes in size."] -#[doc = "`writeBuffer1` - Buffer to make first transfer from."] -#[doc = "`readBuffer1` - Buffer to receive first response to."] -#[doc = "`writeBuffer2` - Buffer to make second transfer from."] -#[doc = "`readBuffer2` - Buffer to receive second response to."] -#[doc = "`footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] -#[doc = ""] - + #[doc = "Performs multiple card SPI writes and reads."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `header` - Header to lead the transfers with. Must be, at most, 8 bytes in size."] + #[doc = "* `writeBuffer1` - Buffer to make first transfer from."] + #[doc = "* `readBuffer1` - Buffer to receive first response to."] + #[doc = "* `writeBuffer2` - Buffer to make second transfer from."] + #[doc = "* `readBuffer2` - Buffer to receive second response to."] + #[doc = "* `footer` - Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused."] + #[doc = ""] pub fn PXIDEV_SPIMultiWriteRead( header: *mut PXIDEV_SPIBuffer, writeBuffer1: *mut PXIDEV_SPIBuffer, @@ -22995,14 +22851,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Performs a single card SPI write and read."] -#[doc = "# Arguments"] -#[doc = "`bytesRead` - Pointer to output the number of bytes received to."] -#[doc = "`initialWaitOperation` - Wait operation to perform before transferring data."] -#[doc = "`writeBuffer` - Buffer to transfer data from."] -#[doc = "`readBuffer` - Buffer to receive data to."] -#[doc = ""] - + #[doc = "Performs a single card SPI write and read."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `bytesRead` - Pointer to output the number of bytes received to."] + #[doc = "* `initialWaitOperation` - Wait operation to perform before transferring data."] + #[doc = "* `writeBuffer` - Buffer to transfer data from."] + #[doc = "* `readBuffer` - Buffer to receive data to."] + #[doc = ""] pub fn PXIDEV_SPIWriteRead( bytesRead: *mut u32_, initialWaitOperation: u64_, @@ -23012,44 +22869,45 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes PxiPM."] -#[doc = ""] - + #[doc = "Initializes PxiPM."] + #[doc = ""] pub fn pxiPmInit() -> Result; } extern "C" { -#[doc = "Exits PxiPM."] -#[doc = ""] - + #[doc = "Exits PxiPM."] + #[doc = ""] pub fn pxiPmExit(); } extern "C" { -#[doc = "Gets the current PxiPM session handle."] -#[doc = "Returns:"] -#[doc = "The current PxiPM session handle."] -#[doc = ""] - + #[doc = "Gets the current PxiPM session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current PxiPM session handle."] + #[doc = ""] pub fn pxiPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] -#[doc = "# Arguments"] -#[doc = "`exheaderInfos[out]` - Pointer to the output exheader information set."] -#[doc = "`programHandle` - The program handle."] -#[doc = ""] - + #[doc = "Retrives the exheader information set(s) (SCI+ACI) about a program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exheaderInfos[out]` - Pointer to the output exheader information set."] + #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Loads a program and registers it to Process9."] -#[doc = "# Arguments"] -#[doc = "`programHandle[out]` - Pointer to the output the program handle to."] -#[doc = "`programInfo` - Information about the program to load."] -#[doc = "`updateInfo` - Information about the program update to load."] -#[doc = ""] - + #[doc = "Loads a program and registers it to Process9."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle[out]` - Pointer to the output the program handle to."] + #[doc = "* `programInfo` - Information about the program to load."] + #[doc = "* `updateInfo` - Information about the program update to load."] + #[doc = ""] pub fn PXIPM_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -23058,11 +22916,12 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unloads a program and unregisters it from Process9."] -#[doc = "# Arguments"] -#[doc = "`programHandle` - The program handle."] -#[doc = ""] - + #[doc = "Unloads a program and unregisters it from Process9."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The program handle."] + #[doc = ""] pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result; } #[repr(C)] @@ -23825,203 +23684,173 @@ pub struct ip_mreq { #[doc = "The mac address of the interface (u32 mac[6])"] #[doc = ""] - pub const NETOPT_MAC_ADDRESS: NetworkOpt = 4100; #[doc = "The ARP table [`SOCU_ARPTableEntry`]"] #[doc = ""] - pub const NETOPT_ARP_TABLE: NetworkOpt = 12290; #[doc = "The current IP setup [`SOCU_IPInfo`]"] #[doc = ""] - pub const NETOPT_IP_INFO: NetworkOpt = 16387; #[doc = "The value of the IP MTU (u32)"] #[doc = ""] - pub const NETOPT_IP_MTU: NetworkOpt = 16388; #[doc = "The routing table [`SOCU_RoutingTableEntry`]"] #[doc = ""] - pub const NETOPT_ROUTING_TABLE: NetworkOpt = 16390; #[doc = "The number of sockets in the UDP table (u32)"] #[doc = ""] - pub const NETOPT_UDP_NUMBER: NetworkOpt = 32770; #[doc = "The table of opened UDP sockets [`SOCU_UDPTableEntry`]"] #[doc = ""] - pub const NETOPT_UDP_TABLE: NetworkOpt = 32771; #[doc = "The number of sockets in the TCP table (u32)"] #[doc = ""] - pub const NETOPT_TCP_NUMBER: NetworkOpt = 36866; #[doc = "The table of opened TCP sockets [`SOCU_TCPTableEntry`]"] #[doc = ""] - pub const NETOPT_TCP_TABLE: NetworkOpt = 36867; #[doc = "The table of the DNS servers [`SOCU_DNSTableEntry`] -- Returns a buffer of size 336 but only 2 entries are set ?"] #[doc = ""] - pub const NETOPT_DNS_TABLE: NetworkOpt = 45059; #[doc = "The DHCP lease time remaining, in seconds"] #[doc = ""] - pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153; #[doc = "Options to be used with [`SOCU_GetNetworkOpt`]"] #[doc = ""] - pub type NetworkOpt = ::libc::c_uint; #[doc = "One entry of the ARP table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_ARP_TABLE`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_ARPTableEntry { pub unk0: u32_, -#[doc = "The IPv4 address associated to the entry"] -#[doc = ""] - + #[doc = "The IPv4 address associated to the entry"] + #[doc = ""] pub ip: in_addr, -#[doc = "The MAC address of associated to the entry"] -#[doc = ""] - + #[doc = "The MAC address of associated to the entry"] + #[doc = ""] pub mac: [u8_; 6usize], pub padding: [u8_; 2usize], } #[doc = "Structure returned by [`SOCU_GetNetworkOpt`] when using [`NETOPT_IP_INFO`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_IPInfo { -#[doc = "Current IPv4 address"] -#[doc = ""] - + #[doc = "Current IPv4 address"] + #[doc = ""] pub ip: in_addr, -#[doc = "Current network mask"] -#[doc = ""] - + #[doc = "Current network mask"] + #[doc = ""] pub netmask: in_addr, -#[doc = "Current network broadcast address"] -#[doc = ""] - + #[doc = "Current network broadcast address"] + #[doc = ""] pub broadcast: in_addr, } #[doc = "One entry of the routing table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_ROUTING_TABLE`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_RoutingTableEntry { -#[doc = "Destination IP address of the route"] -#[doc = ""] - + #[doc = "Destination IP address of the route"] + #[doc = ""] pub dest_ip: in_addr, -#[doc = "Mask used for this route"] -#[doc = ""] - + #[doc = "Mask used for this route"] + #[doc = ""] pub netmask: in_addr, -#[doc = "Gateway address to reach the network"] -#[doc = ""] - + #[doc = "Gateway address to reach the network"] + #[doc = ""] pub gateway: in_addr, -#[doc = "Linux netstat flags [`ROUTING_FLAG_G`]"] -#[doc = ""] - + #[doc = "Linux netstat flags [`ROUTING_FLAG_G`]"] + #[doc = ""] pub flags: u32_, -#[doc = "number of milliseconds since 1st Jan 1900 00:00."] -#[doc = ""] - + #[doc = "number of milliseconds since 1st Jan 1900 00:00."] + #[doc = ""] pub time: u64_, } #[doc = "One entry of the UDP sockets table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_UDP_TABLE`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_UDPTableEntry { -#[doc = "Local address information"] -#[doc = ""] - + #[doc = "Local address information"] + #[doc = ""] pub local: sockaddr_storage, -#[doc = "Remote address information"] -#[doc = ""] - + #[doc = "Remote address information"] + #[doc = ""] pub remote: sockaddr_storage, } #[doc = "One entry of the TCP sockets table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_TCP_TABLE`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_TCPTableEntry { -#[doc = "[`TCP`] states defines"] -#[doc = ""] - + #[doc = "[`TCP`] states defines"] + #[doc = ""] pub state: u32_, -#[doc = "Local address information"] -#[doc = ""] - + #[doc = "Local address information"] + #[doc = ""] pub local: sockaddr_storage, -#[doc = "Remote address information"] -#[doc = ""] - + #[doc = "Remote address information"] + #[doc = ""] pub remote: sockaddr_storage, } #[doc = "One entry of the DNS servers table retrieved by using [`SOCU_GetNetworkOpt`] and [`NETOPT_DNS_TABLE`]"] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SOCU_DNSTableEntry { pub family: u32_, -#[doc = "Family of the address of the DNS server"] -#[doc = ""] - + #[doc = "Family of the address of the DNS server"] + #[doc = ""] pub ip: in_addr, -#[doc = "IP of the DNS server"] -#[doc = ""] - + #[doc = "IP of the DNS server"] + #[doc = ""] pub padding: [u8_; 12usize], } extern "C" { #[must_use] -#[doc = "Initializes the SOC service."] -#[doc = "# Arguments"] -#[doc = "`context_addr` - Address of a page-aligned (0x1000) buffer to be used."] -#[doc = "`context_size` - Size of the buffer, a multiple of 0x1000."] -#[doc = "# Notes"] -#[doc = "The specified context buffer can no longer be accessed by the process which called this function, since the userland permissions for this block are set to no-access."] -#[doc = ""] - + #[doc = "Initializes the SOC service."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `context_addr` - Address of a page-aligned (0x1000) buffer to be used."] + #[doc = "* `context_size` - Size of the buffer, a multiple of 0x1000."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The specified context buffer can no longer be accessed by the process which called this function, since the userland permissions for this block are set to no-access."] + #[doc = ""] pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Closes the soc service."] -#[doc = "# Notes"] -#[doc = "You need to call this in order to be able to use the buffer again."] -#[doc = ""] - + #[doc = "Closes the soc service."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* You need to call this in order to be able to use the buffer again."] + #[doc = ""] pub fn socExit() -> Result; } extern "C" { -#[doc = "Gets the system's host ID."] -#[doc = "Returns:"] -#[doc = "The system's host ID."] -#[doc = ""] - + #[doc = "Gets the system's host ID."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The system's host ID."] + #[doc = ""] pub fn gethostid() -> ::libc::c_long; } extern "C" { @@ -24034,16 +23863,19 @@ extern "C" { pub fn SOCU_CloseSockets() -> ::libc::c_int; } extern "C" { -#[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] -#[doc = "Returns:"] -#[doc = "0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] -#[doc = "# Arguments"] -#[doc = "`level` - Only value allowed seems to be [`SOL_CONFIG`]"] -#[doc = "`optname` - The option to be retrieved"] -#[doc = "`optval` - Will contain the output of the command"] -#[doc = "`optlen` - Size of the optval buffer, will be updated to hold the size of the output"] -#[doc = ""] - + #[doc = "Retrieves information from the network configuration. Similar to getsockopt()."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* 0 if successful. -1 if failed, and errno will be set accordingly. Can also return a system error code."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Only value allowed seems to be [`SOL_CONFIG`]"] + #[doc = "* `optname` - The option to be retrieved"] + #[doc = "* `optval` - Will contain the output of the command"] + #[doc = "* `optlen` - Size of the optval buffer, will be updated to hold the size of the output"] + #[doc = ""] pub fn SOCU_GetNetworkOpt( level: ::libc::c_int, optname: NetworkOpt, @@ -24052,11 +23884,12 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { -#[doc = "Gets the system's IP address, netmask, and subnet broadcast"] -#[doc = "Returns:"] -#[doc = "error"] -#[doc = ""] - + #[doc = "Gets the system's IP address, netmask, and subnet broadcast"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* error"] + #[doc = ""] pub fn SOCU_GetIPInfo( ip: *mut in_addr, netmask: *mut in_addr, @@ -24064,125 +23897,121 @@ extern "C" { ) -> ::libc::c_int; } extern "C" { -#[doc = "Adds a global socket."] -#[doc = "Returns:"] -#[doc = "error"] -#[doc = "# Arguments"] -#[doc = "`sockfd` - The socket fd."] -#[doc = ""] - + #[doc = "Adds a global socket."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* error"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sockfd` - The socket fd."] + #[doc = ""] pub fn SOCU_AddGlobalSocket(sockfd: ::libc::c_int) -> ::libc::c_int; } #[doc = "Unsigned 8-bit PCM."] #[doc = ""] - pub const MICU_ENCODING_PCM8: MICU_Encoding = 0; #[doc = "Unsigned 16-bit PCM."] #[doc = ""] - pub const MICU_ENCODING_PCM16: MICU_Encoding = 1; #[doc = "Signed 8-bit PCM."] #[doc = ""] - pub const MICU_ENCODING_PCM8_SIGNED: MICU_Encoding = 2; #[doc = "Signed 16-bit PCM."] #[doc = ""] - pub const MICU_ENCODING_PCM16_SIGNED: MICU_Encoding = 3; #[doc = "Microphone audio encodings."] #[doc = ""] - pub type MICU_Encoding = ::libc::c_uint; #[doc = "32728.498 Hz"] #[doc = ""] - pub const MICU_SAMPLE_RATE_32730: MICU_SampleRate = 0; #[doc = "16364.479 Hz"] #[doc = ""] - pub const MICU_SAMPLE_RATE_16360: MICU_SampleRate = 1; #[doc = "10909.499 Hz"] #[doc = ""] - pub const MICU_SAMPLE_RATE_10910: MICU_SampleRate = 2; #[doc = "8182.1245 Hz"] #[doc = ""] - pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3; #[doc = "Microphone audio sampling rates."] #[doc = ""] - pub type MICU_SampleRate = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes MIC."] -#[doc = "# Arguments"] -#[doc = "`size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] -#[doc = "`handle` - Size of the shared memory buffer."] -#[doc = ""] - + #[doc = "Initializes MIC."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Shared memory buffer to write audio data to. Must be aligned to 0x1000 bytes."] + #[doc = "* `handle` - Size of the shared memory buffer."] + #[doc = ""] pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result; } extern "C" { -#[doc = "Exits MIC."] -#[doc = ""] - + #[doc = "Exits MIC."] + #[doc = ""] pub fn micExit(); } extern "C" { -#[doc = "Gets the size of the sample data area within the shared memory buffer."] -#[doc = "Returns:"] -#[doc = "The sample data's size."] -#[doc = ""] - + #[doc = "Gets the size of the sample data area within the shared memory buffer."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The sample data's size."] + #[doc = ""] pub fn micGetSampleDataSize() -> u32_; } extern "C" { -#[doc = "Gets the offset within the shared memory buffer of the last sample written."] -#[doc = "Returns:"] -#[doc = "The last sample's offset."] -#[doc = ""] - + #[doc = "Gets the offset within the shared memory buffer of the last sample written."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The last sample's offset."] + #[doc = ""] pub fn micGetLastSampleOffset() -> u32_; } extern "C" { #[must_use] -#[doc = "Maps MIC shared memory."] -#[doc = "# Arguments"] -#[doc = "`size` - Size of the shared memory."] -#[doc = "`handle` - Handle of the shared memory."] -#[doc = ""] - + #[doc = "Maps MIC shared memory."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `size` - Size of the shared memory."] + #[doc = "* `handle` - Handle of the shared memory."] + #[doc = ""] pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Unmaps MIC shared memory."] -#[doc = ""] - + #[doc = "Unmaps MIC shared memory."] + #[doc = ""] pub fn MICU_UnmapSharedMem() -> Result; } extern "C" { #[must_use] -#[doc = "Begins sampling microphone input."] -#[doc = "# Arguments"] -#[doc = "`encoding` - Encoding of outputted audio."] -#[doc = "`sampleRate` - Sample rate of outputted audio."] -#[doc = "`sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] -#[doc = "`sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] -#[doc = "`loop` - Whether to loop back to the beginning of the buffer when the end is reached."] -#[doc = ""] - + #[doc = "Begins sampling microphone input."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `encoding` - Encoding of outputted audio."] + #[doc = "* `sampleRate` - Sample rate of outputted audio."] + #[doc = "* `sharedMemAudioOffset` - Offset to write audio data to in the shared memory buffer."] + #[doc = "* `sharedMemAudioSize` - Size of audio data to write to the shared memory buffer. This should be at most \"bufferSize - 4\"."] + #[doc = "* `loop` - Whether to loop back to the beginning of the buffer when the end is reached."] + #[doc = ""] pub fn MICU_StartSampling( encoding: MICU_Encoding, sampleRate: MICU_SampleRate, @@ -24193,256 +24022,230 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Adjusts the configuration of the current sampling session."] -#[doc = "# Arguments"] -#[doc = "`sampleRate` - Sample rate of outputted audio."] -#[doc = ""] - + #[doc = "Adjusts the configuration of the current sampling session."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sampleRate` - Sample rate of outputted audio."] + #[doc = ""] pub fn MICU_AdjustSampling(sampleRate: MICU_SampleRate) -> Result; } extern "C" { #[must_use] -#[doc = "Stops sampling microphone input."] -#[doc = ""] - + #[doc = "Stops sampling microphone input."] + #[doc = ""] pub fn MICU_StopSampling() -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether microphone input is currently being sampled."] -#[doc = "# Arguments"] -#[doc = "`sampling` - Pointer to output the sampling state to."] -#[doc = ""] - + #[doc = "Gets whether microphone input is currently being sampled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sampling` - Pointer to output the sampling state to."] + #[doc = ""] pub fn MICU_IsSampling(sampling: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets an event handle triggered when the shared memory buffer is full."] -#[doc = "# Arguments"] -#[doc = "`handle` - Pointer to output the event handle to."] -#[doc = ""] - + #[doc = "Gets an event handle triggered when the shared memory buffer is full."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `handle` - Pointer to output the event handle to."] + #[doc = ""] pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the microphone's gain."] -#[doc = "# Arguments"] -#[doc = "`gain` - Gain to set."] -#[doc = ""] - + #[doc = "Sets the microphone's gain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `gain` - Gain to set."] + #[doc = ""] pub fn MICU_SetGain(gain: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the microphone's gain."] -#[doc = "# Arguments"] -#[doc = "`gain` - Pointer to output the current gain to."] -#[doc = ""] - + #[doc = "Gets the microphone's gain."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `gain` - Pointer to output the current gain to."] + #[doc = ""] pub fn MICU_GetGain(gain: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether the microphone is powered on."] -#[doc = "# Arguments"] -#[doc = "`power` - Whether the microphone is powered on."] -#[doc = ""] - + #[doc = "Sets whether the microphone is powered on."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `power` - Whether the microphone is powered on."] + #[doc = ""] pub fn MICU_SetPower(power: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether the microphone is powered on."] -#[doc = "# Arguments"] -#[doc = "`power` - Pointer to output the power state to."] -#[doc = ""] - + #[doc = "Gets whether the microphone is powered on."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `power` - Pointer to output the power state to."] + #[doc = ""] pub fn MICU_GetPower(power: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to clamp microphone input."] -#[doc = "# Arguments"] -#[doc = "`clamp` - Whether to clamp microphone input."] -#[doc = ""] - + #[doc = "Sets whether to clamp microphone input."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `clamp` - Whether to clamp microphone input."] + #[doc = ""] pub fn MICU_SetClamp(clamp: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Gets whether to clamp microphone input."] -#[doc = "# Arguments"] -#[doc = "`clamp` - Pointer to output the clamp state to."] -#[doc = ""] - + #[doc = "Gets whether to clamp microphone input."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `clamp` - Pointer to output the clamp state to."] + #[doc = ""] pub fn MICU_GetClamp(clamp: *mut bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets whether to allow sampling when the shell is closed."] -#[doc = "# Arguments"] -#[doc = "`allowShellClosed` - Whether to allow sampling when the shell is closed."] -#[doc = ""] - + #[doc = "Sets whether to allow sampling when the shell is closed."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `allowShellClosed` - Whether to allow sampling when the shell is closed."] + #[doc = ""] pub fn MICU_SetAllowShellClosed(allowShellClosed: bool) -> Result; } #[doc = "Converting color formats."] #[doc = ""] - pub const MVDMODE_COLORFORMATCONV: MVDSTD_Mode = 0; #[doc = "Processing video."] #[doc = ""] - pub const MVDMODE_VIDEOPROCESSING: MVDSTD_Mode = 1; #[doc = "Processing mode."] #[doc = ""] - pub type MVDSTD_Mode = ::libc::c_uint; #[doc = "YUYV422"] #[doc = ""] - pub const MVD_INPUT_YUYV422: MVDSTD_InputFormat = 65537; #[doc = "H264"] #[doc = ""] - pub const MVD_INPUT_H264: MVDSTD_InputFormat = 131073; #[doc = "Input format."] #[doc = ""] - pub type MVDSTD_InputFormat = ::libc::c_uint; #[doc = "YUYV422"] #[doc = ""] - pub const MVD_OUTPUT_YUYV422: MVDSTD_OutputFormat = 65537; #[doc = "BGR565"] #[doc = ""] - pub const MVD_OUTPUT_BGR565: MVDSTD_OutputFormat = 262146; #[doc = "RGB565"] #[doc = ""] - pub const MVD_OUTPUT_RGB565: MVDSTD_OutputFormat = 262148; #[doc = "Output format."] #[doc = ""] - pub type MVDSTD_OutputFormat = ::libc::c_uint; #[doc = "Processing configuration."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct MVDSTD_Config { -#[doc = "Input type."] -#[doc = ""] - + #[doc = "Input type."] + #[doc = ""] pub input_type: MVDSTD_InputFormat, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x04: u32_, -#[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] -#[doc = ""] - + #[doc = "Unknown. Referred to as \"H264 range\" in SKATER."] + #[doc = ""] pub unk_x08: u32_, -#[doc = "Input width."] -#[doc = ""] - + #[doc = "Input width."] + #[doc = ""] pub inwidth: u32_, -#[doc = "Input height."] -#[doc = ""] - + #[doc = "Input height."] + #[doc = ""] pub inheight: u32_, -#[doc = "Physical address of color conversion input data."] -#[doc = ""] - + #[doc = "Physical address of color conversion input data."] + #[doc = ""] pub physaddr_colorconv_indata: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk0: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk1: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk2: u32_, -#[doc = "Physical address used with color conversion."] -#[doc = ""] - + #[doc = "Physical address used with color conversion."] + #[doc = ""] pub physaddr_colorconv_unk3: u32_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x28: [u32_; 6usize], -#[doc = "Enables cropping with the input image when non-zero via the following 4 words."] -#[doc = ""] - + #[doc = "Enables cropping with the input image when non-zero via the following 4 words."] + #[doc = ""] 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_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x54: u32_, -#[doc = "Output type."] -#[doc = ""] - + #[doc = "Output type."] + #[doc = ""] pub output_type: MVDSTD_OutputFormat, -#[doc = "Output width."] -#[doc = ""] - + #[doc = "Output width."] + #[doc = ""] pub outwidth: u32_, -#[doc = "Output height."] -#[doc = ""] - + #[doc = "Output height."] + #[doc = ""] pub outheight: u32_, -#[doc = "Physical address of output data."] -#[doc = ""] - + #[doc = "Physical address of output data."] + #[doc = ""] pub physaddr_outdata0: u32_, -#[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] -#[doc = ""] - + #[doc = "Additional physical address for output data, only used when the output format type is value 0x00020001."] + #[doc = ""] pub physaddr_outdata1: u32_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk_x6c: [u32_; 38usize], -#[doc = "This enables using the following 4 words when non-zero."] -#[doc = ""] - + #[doc = "This enables using the following 4 words when non-zero."] + #[doc = ""] pub flag_x104: u32_, -#[doc = "Output X position in the output buffer."] -#[doc = ""] - + #[doc = "Output X position in the output buffer."] + #[doc = ""] pub output_x_pos: u32_, -#[doc = "Same as above except for the Y pos."] -#[doc = ""] - + #[doc = "Same as above except for the Y pos."] + #[doc = ""] pub output_y_pos: u32_, -#[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] -#[doc = ""] - + #[doc = "Used for aligning the output width when larger than the output width. Overrides the output width when smaller than the output width."] + #[doc = ""] pub output_width_override: u32_, -#[doc = "Same as output_width_override except for the output height."] -#[doc = ""] - + #[doc = "Same as output_width_override except for the output height."] + #[doc = ""] pub output_height_override: u32_, pub unk_x118: u32_, } @@ -24494,7 +24297,6 @@ impl Default for MVDSTD_OutputBuffersEntryList { } #[doc = "This can be used to override the default input values for MVDSTD commands during initialization with video-processing. The default for these fields are all-zero, except for cmd1b_inval which is 1. See also here: "] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct MVDSTD_InitStruct { @@ -24506,15 +24308,16 @@ pub struct MVDSTD_InitStruct { } extern "C" { #[must_use] -#[doc = "Initializes MVDSTD."] -#[doc = "# Arguments"] -#[doc = "`mode` - Mode to initialize MVDSTD to."] -#[doc = "`input_type` - Type of input to process."] -#[doc = "`output_type` - Type of output to produce."] -#[doc = "`size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] -#[doc = "`initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] -#[doc = ""] - + #[doc = "Initializes MVDSTD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Mode to initialize MVDSTD to."] + #[doc = "* `input_type` - Type of input to process."] + #[doc = "* `output_type` - Type of output to produce."] + #[doc = "* `size` - Size of the work buffer, MVD_DEFAULT_WORKBUF_SIZE can be used for this. Only used when type == MVDMODE_VIDEOPROCESSING."] + #[doc = "* `initstruct` - Optional MVDSTD_InitStruct, this should be NULL normally."] + #[doc = ""] pub fn mvdstdInit( mode: MVDSTD_Mode, input_type: MVDSTD_InputFormat, @@ -24524,24 +24327,24 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Shuts down MVDSTD."] -#[doc = ""] - + #[doc = "Shuts down MVDSTD."] + #[doc = ""] pub fn mvdstdExit(); } extern "C" { -#[doc = "Generates a default MVDSTD configuration."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to output the generated config to."] -#[doc = "`input_width` - Input width."] -#[doc = "`input_height` - Input height."] -#[doc = "`output_width` - Output width."] -#[doc = "`output_height` - Output height."] -#[doc = "`vaddr_colorconv_indata` - Virtual address of the color conversion input data."] -#[doc = "`vaddr_outdata0` - Virtual address of the output data."] -#[doc = "`vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] -#[doc = ""] - + #[doc = "Generates a default MVDSTD configuration."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to output the generated config to."] + #[doc = "* `input_width` - Input width."] + #[doc = "* `input_height` - Input height."] + #[doc = "* `output_width` - Output width."] + #[doc = "* `output_height` - Output height."] + #[doc = "* `vaddr_colorconv_indata` - Virtual address of the color conversion input data."] + #[doc = "* `vaddr_outdata0` - Virtual address of the output data."] + #[doc = "* `vaddr_outdata1` - Additional virtual address for output data, only used when the output format type is value 0x00020001."] + #[doc = ""] pub fn mvdstdGenerateDefaultConfig( config: *mut MVDSTD_Config, input_width: u32_, @@ -24555,23 +24358,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Run color-format-conversion."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to the configuration to use."] -#[doc = ""] - + #[doc = "Run color-format-conversion."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to the configuration to use."] + #[doc = ""] pub fn mvdstdConvertImage(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] -#[doc = "Processes a video frame(specifically a NAL-unit)."] -#[doc = "# Arguments"] -#[doc = "`inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] -#[doc = "`size` - Size of the input buffer."] -#[doc = "`flag` - See here regarding this input flag: "] -#[doc = "`out` - Optional output MVDSTD_ProcessNALUnitOut structure."] -#[doc = ""] - + #[doc = "Processes a video frame(specifically a NAL-unit)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inbuf_vaddr` - Input NAL-unit starting with the 3-byte \"00 00 01\" prefix. Must be located in linearmem."] + #[doc = "* `size` - Size of the input buffer."] + #[doc = "* `flag` - See here regarding this input flag: "] + #[doc = "* `out` - Optional output MVDSTD_ProcessNALUnitOut structure."] + #[doc = ""] pub fn mvdstdProcessVideoFrame( inbuf_vaddr: *mut ::libc::c_void, size: size_t, @@ -24581,31 +24386,34 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Renders the video frame."] -#[doc = "# Arguments"] -#[doc = "`config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] -#[doc = "`wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] -#[doc = ""] - + #[doc = "Renders the video frame."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Optional pointer to the configuration to use. When NULL, MVDSTD_SetConfig() should have been used previously for this video."] + #[doc = "* `wait` - When true, wait for rendering to finish. When false, you can manually call this function repeatedly until it stops returning MVD_STATUS_BUSY."] + #[doc = ""] pub fn mvdstdRenderVideoFrame(config: *mut MVDSTD_Config, wait: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the current configuration of MVDSTD."] -#[doc = "# Arguments"] -#[doc = "`config` - Pointer to the configuration to set."] -#[doc = ""] - + #[doc = "Sets the current configuration of MVDSTD."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `config` - Pointer to the configuration to set."] + #[doc = ""] pub fn MVDSTD_SetConfig(config: *mut MVDSTD_Config) -> Result; } extern "C" { #[must_use] -#[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: "] -#[doc = "# Arguments"] -#[doc = "`entrylist` - Input entrylist."] -#[doc = "`bufsize` - Size of each buffer from the entrylist."] -#[doc = ""] - + #[doc = "New3DS Internet Browser doesn't use this. Once done, rendered frames will be written to the output buffers specified by the entrylist instead of the output specified by configuration. See here: "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `entrylist` - Input entrylist."] + #[doc = "* `bufsize` - Size of each buffer from the entrylist."] + #[doc = ""] pub fn mvdstdSetupOutputBuffers( entrylist: *mut MVDSTD_OutputBuffersEntryList, bufsize: u32_, @@ -24613,14 +24421,15 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: "] -#[doc = "# Arguments"] -#[doc = "`cur_outdata0` - Linearmem vaddr. The current outdata0 for this entry must match this value."] -#[doc = "`cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] -#[doc = "`new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] -#[doc = "`new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] -#[doc = ""] - + #[doc = "New3DS Internet Browser doesn't use this. This overrides the entry0 output buffers originally setup by mvdstdSetupOutputBuffers(). See also here: "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cur_outdata0` - Linearmem vaddr. The current outdata0 for this entry must match this value."] + #[doc = "* `cur_outdata1` - Linearmem vaddr. The current outdata1 for this entry must match this value."] + #[doc = "* `new_outdata0` - Linearmem vaddr. This is the new address to use for outaddr0."] + #[doc = "* `new_outdata1` - Linearmem vaddr. This is the new address to use for outaddr1."] + #[doc = ""] pub fn mvdstdOverrideOutputBuffers( cur_outdata0: *mut ::libc::c_void, cur_outdata1: *mut ::libc::c_void, @@ -24632,55 +24441,45 @@ pub const NFC_OpType_1: NFC_OpType = 1; #[doc = "Unknown."] #[doc = ""] - pub const NFC_OpType_NFCTag: NFC_OpType = 2; #[doc = "This is the default."] #[doc = ""] - pub const NFC_OpType_RawNFC: NFC_OpType = 3; #[doc = "NFC operation type."] #[doc = ""] - pub type NFC_OpType = ::libc::c_uint; pub const NFC_TagState_Uninitialized: NFC_TagState = 0; #[doc = "nfcInit() was not used yet."] #[doc = ""] - pub const NFC_TagState_ScanningStopped: NFC_TagState = 1; #[doc = "Not currently scanning for NFC tags. Set by nfcStopScanning() and nfcInit(), when successful."] #[doc = ""] - pub const NFC_TagState_Scanning: NFC_TagState = 2; #[doc = "Currently scanning for NFC tags. Set by nfcStartScanning() when successful."] #[doc = ""] - pub const NFC_TagState_InRange: NFC_TagState = 3; #[doc = "NFC tag is in range. The state automatically changes to this when the state was previously value 2, without using any NFC service commands."] #[doc = ""] - pub const NFC_TagState_OutOfRange: NFC_TagState = 4; #[doc = "NFC tag is now out of range, where the NFC tag was previously in range. This occurs automatically without using any NFC service commands. Once this state is entered, it won't automatically change to anything else when the tag is moved in range again. Hence, if you want to keep doing tag scanning after this, you must stop+start scanning."] #[doc = ""] - pub const NFC_TagState_DataReady: NFC_TagState = 5; pub type NFC_TagState = ::libc::c_uint; pub const NFC_amiiboFlag_Setup: _bindgen_ty_28 = 16; #[doc = "This indicates that the amiibo was setup with amiibo Settings. nfcGetAmiiboSettings() will return an all-zero struct when this is not set."] #[doc = ""] - pub const NFC_amiiboFlag_AppDataSetup: _bindgen_ty_28 = 32; #[doc = "Bit4-7 are always clear with nfcGetAmiiboSettings() due to \"& 0xF\"."] #[doc = ""] - pub type _bindgen_ty_28 = ::libc::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -24702,7 +24501,6 @@ impl Default for NFC_TagInfo { } #[doc = "AmiiboSettings structure, see also here: "] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboSettings { @@ -24730,7 +24528,6 @@ impl Default for NFC_AmiiboSettings { } #[doc = "AmiiboConfig structure, see also here: "] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AmiiboConfig { @@ -24739,21 +24536,17 @@ pub struct NFC_AmiiboConfig { pub lastwritedate_day: u8_, pub write_counter: u16_, pub characterID: [u8_; 3usize], -#[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] -#[doc = ""] - + #[doc = "the first element is the collection ID, the second the character in this collection, the third the variant"] + #[doc = ""] pub series: u8_, -#[doc = "ID of the series"] -#[doc = ""] - + #[doc = "ID of the series"] + #[doc = ""] pub amiiboID: u16_, -#[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] -#[doc = ""] - + #[doc = "ID shared by all exact same amiibo. Some amiibo are only distinguished by this one like regular SMB Series Mario and the gold one"] + #[doc = ""] pub type_: u8_, -#[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] -#[doc = ""] - + #[doc = "Type of amiibo 0 = figure, 1 = card, 2 = plush"] + #[doc = ""] pub pagex4_byte3: u8_, pub appdata_size: u16_, @@ -24770,7 +24563,6 @@ impl Default for NFC_AmiiboConfig { } #[doc = "Used by nfcInitializeWriteAppData() internally, see also here: "] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NFC_AppDataInitStruct { @@ -24788,7 +24580,6 @@ impl Default for NFC_AppDataInitStruct { } #[doc = "Used by nfcWriteAppData() internally, see also: "] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NFC_AppDataWriteStruct { @@ -24798,99 +24589,101 @@ pub struct NFC_AppDataWriteStruct { } extern "C" { #[must_use] -#[doc = "Initializes NFC."] -#[doc = "# Arguments"] -#[doc = "`type` - See the NFC_OpType enum."] -#[doc = ""] - + #[doc = "Initializes NFC."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `type` - See the NFC_OpType enum."] + #[doc = ""] pub fn nfcInit(type_: NFC_OpType) -> Result; } extern "C" { -#[doc = "Shuts down NFC."] -#[doc = ""] - + #[doc = "Shuts down NFC."] + #[doc = ""] pub fn nfcExit(); } extern "C" { -#[doc = "Gets the NFC service handle."] -#[doc = "Returns:"] -#[doc = "The NFC service handle."] -#[doc = ""] - + #[doc = "Gets the NFC service handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The NFC service handle."] + #[doc = ""] pub fn nfcGetSessionHandle() -> Handle; } extern "C" { #[must_use] -#[doc = "Starts scanning for NFC tags."] -#[doc = "# Arguments"] -#[doc = "`inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] -#[doc = ""] - + #[doc = "Starts scanning for NFC tags."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inval` - Unknown. See NFC_STARTSCAN_DEFAULTINPUT."] + #[doc = ""] pub fn nfcStartScanning(inval: u16_) -> Result; } extern "C" { -#[doc = "Stops scanning for NFC tags."] -#[doc = ""] - + #[doc = "Stops scanning for NFC tags."] + #[doc = ""] pub fn nfcStopScanning(); } extern "C" { #[must_use] -#[doc = "Read amiibo NFC data and load in memory."] -#[doc = ""] - + #[doc = "Read amiibo NFC data and load in memory."] + #[doc = ""] pub fn nfcLoadAmiiboData() -> Result; } extern "C" { #[must_use] -#[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] -#[doc = ""] - + #[doc = "If the tagstate is valid(NFC_TagState_DataReady or 6), it then sets the current tagstate to NFC_TagState_InRange."] + #[doc = ""] pub fn nfcResetTagScanState() -> Result; } extern "C" { #[must_use] -#[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] -#[doc = ""] - + #[doc = "This writes the amiibo data stored in memory to the actual amiibo data storage(which is normally the NFC data pages). This can only be used if NFC_LoadAmiiboData() was used previously."] + #[doc = ""] pub fn nfcUpdateStoredAmiiboData() -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current NFC tag state."] -#[doc = "# Arguments"] -#[doc = "`state` - Pointer to write NFC tag state."] -#[doc = ""] - + #[doc = "Returns the current NFC tag state."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - Pointer to write NFC tag state."] + #[doc = ""] pub fn nfcGetTagState(state: *mut NFC_TagState) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current TagInfo."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the output TagInfo."] -#[doc = ""] - + #[doc = "Returns the current TagInfo."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the output TagInfo."] + #[doc = ""] pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: "] -#[doc = "# Arguments"] -#[doc = "`amiibo_appid` - Amiibo AppID. See here: "] -#[doc = ""] - + #[doc = "Opens the appdata, when the amiibo appdata was previously initialized. This must be used before reading/writing the appdata. See also: "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amiibo_appid` - Amiibo AppID. See here: "] + #[doc = ""] pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] -#[doc = "# Arguments"] -#[doc = "`amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] -#[doc = "`buf` - Input buffer."] -#[doc = "`size` - Buffer size."] -#[doc = ""] - + #[doc = "This initializes the appdata using the specified input, when the appdata previously wasn't initialized. If the appdata is already initialized, you must first use the amiibo Settings applet menu option labeled \"Delete amiibo Game Data\". This automatically writes the amiibo data into the actual data storage(normally NFC data pages). See also nfcWriteAppData()."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amiibo_appid` - amiibo AppID. See also nfcOpenAppData()."] + #[doc = "* `buf` - Input buffer."] + #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn nfcInitializeWriteAppData( amiibo_appid: u32_, buf: *const ::libc::c_void, @@ -24899,23 +24692,25 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] -#[doc = "# Arguments"] -#[doc = "`buf` - Output buffer."] -#[doc = "`size` - Buffer size."] -#[doc = ""] - + #[doc = "Reads the appdata. The size must be >=0xD8-bytes, but the actual used size is hard-coded to 0xD8. Note that areas of appdata which were never written to by applications are uninitialized in this output buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Output buffer."] + #[doc = "* `size` - Buffer size."] + #[doc = ""] pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result; } extern "C" { #[must_use] -#[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: "] -#[doc = "# Arguments"] -#[doc = "`buf` - Input buffer."] -#[doc = "`size` - Buffer size."] -#[doc = "`taginfo` - TagInfo from nfcGetTagInfo()."] -#[doc = ""] - + #[doc = "Writes the appdata, after nfcOpenAppData() was used successfully. The size should be <=0xD8-bytes. See also: "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf` - Input buffer."] + #[doc = "* `size` - Buffer size."] + #[doc = "* `taginfo` - TagInfo from nfcGetTagInfo()."] + #[doc = ""] pub fn nfcWriteAppData( buf: *const ::libc::c_void, size: size_t, @@ -24924,44 +24719,48 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Returns the current AmiiboSettings."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the output AmiiboSettings."] -#[doc = ""] - + #[doc = "Returns the current AmiiboSettings."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the output AmiiboSettings."] + #[doc = ""] pub fn nfcGetAmiiboSettings(out: *mut NFC_AmiiboSettings) -> Result; } extern "C" { #[must_use] -#[doc = "Returns the current AmiiboConfig."] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the output AmiiboConfig."] -#[doc = ""] - + #[doc = "Returns the current AmiiboConfig."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the output AmiiboConfig."] + #[doc = ""] pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result; } extern "C" { #[must_use] -#[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: "] -#[doc = "# Arguments"] -#[doc = "`unk0` - Same as nfcStartScanning() input."] -#[doc = "`unk1` - Unknown."] -#[doc = ""] - + #[doc = "Starts scanning for NFC tags when initialized with NFC_OpType_RawNFC. See also: "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `unk0` - Same as nfcStartScanning() input."] + #[doc = "* `unk1` - Unknown."] + #[doc = ""] pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: "] -#[doc = "# Arguments"] -#[doc = "`inbuf` - Input buffer."] -#[doc = "`insize` - Size of the input buffer."] -#[doc = "`outbuf` - Output buffer."] -#[doc = "`outsize` - Size of the output buffer."] -#[doc = "`actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] -#[doc = "`microseconds` - Timing-related field in microseconds."] -#[doc = ""] - + #[doc = "This sends a raw NFC command to the tag. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange. See also: "] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inbuf` - Input buffer."] + #[doc = "* `insize` - Size of the input buffer."] + #[doc = "* `outbuf` - Output buffer."] + #[doc = "* `outsize` - Size of the output buffer."] + #[doc = "* `actual_transfer_size` - Optional output ptr to write the actual output-size to, can be NULL."] + #[doc = "* `microseconds` - Timing-related field in microseconds."] + #[doc = ""] pub fn nfcSendTagCommand( inbuf: *const ::libc::c_void, insize: size_t, @@ -24973,21 +24772,18 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] -#[doc = ""] - + #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] + #[doc = ""] pub fn nfcCmd21() -> Result; } extern "C" { #[must_use] -#[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] -#[doc = ""] - + #[doc = "Unknown. This can only be used when initialized with NFC_OpType_RawNFC, and when the TagState is NFC_TagState_InRange."] + #[doc = ""] pub fn nfcCmd22() -> Result; } #[doc = "Notification header data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct NotificationHeader { @@ -25006,30 +24802,29 @@ pub struct NotificationHeader { } extern "C" { #[must_use] -#[doc = "Initializes NEWS."] -#[doc = ""] - + #[doc = "Initializes NEWS."] + #[doc = ""] pub fn newsInit() -> Result; } extern "C" { -#[doc = "Exits NEWS."] -#[doc = ""] - + #[doc = "Exits NEWS."] + #[doc = ""] pub fn newsExit(); } extern "C" { #[must_use] -#[doc = "Adds a notification to the home menu Notifications applet."] -#[doc = "# Arguments"] -#[doc = "`title` - UTF-16 title of the notification."] -#[doc = "`titleLength` - Number of characters in the title, not including the null-terminator."] -#[doc = "`message` - UTF-16 message of the notification, or NULL for no message."] -#[doc = "`messageLength` - Number of characters in the message, not including the null-terminator."] -#[doc = "`image` - Data of the image to show in the notification, or NULL for no image."] -#[doc = "`imageSize` - Size of the image data in bytes."] -#[doc = "`jpeg` - Whether the image is a JPEG or not."] -#[doc = ""] - + #[doc = "Adds a notification to the home menu Notifications applet."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `title` - UTF-16 title of the notification."] + #[doc = "* `titleLength` - Number of characters in the title, not including the null-terminator."] + #[doc = "* `message` - UTF-16 message of the notification, or NULL for no message."] + #[doc = "* `messageLength` - Number of characters in the message, not including the null-terminator."] + #[doc = "* `image` - Data of the image to show in the notification, or NULL for no image."] + #[doc = "* `imageSize` - Size of the image data in bytes."] + #[doc = "* `jpeg` - Whether the image is a JPEG or not."] + #[doc = ""] pub fn NEWS_AddNotification( title: *const u16_, titleLength: u32_, @@ -25042,53 +24837,58 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets current total notifications number."] -#[doc = "# Arguments"] -#[doc = "`num` - Pointer where total number will be saved."] -#[doc = ""] - + #[doc = "Gets current total notifications number."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `num` - Pointer where total number will be saved."] + #[doc = ""] pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a custom header for a specific notification."] -#[doc = "# Arguments"] -#[doc = "`news_id` - Identification number of the notification."] -#[doc = "`header` - Pointer to notification header to set."] -#[doc = ""] - + #[doc = "Sets a custom header for a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `header` - Pointer to notification header to set."] + #[doc = ""] pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the header of a specific notification."] -#[doc = "# Arguments"] -#[doc = "`news_id` - Identification number of the notification."] -#[doc = "`header` - Pointer where header of the notification will be saved."] -#[doc = ""] - + #[doc = "Gets the header of a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `header` - Pointer where header of the notification will be saved."] + #[doc = ""] pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a custom message for a specific notification."] -#[doc = "# Arguments"] -#[doc = "`news_id` - Identification number of the notification."] -#[doc = "`message` - Pointer to UTF-16 message to set."] -#[doc = "`size` - Size of message to set."] -#[doc = ""] - + #[doc = "Sets a custom message for a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `message` - Pointer to UTF-16 message to set."] + #[doc = "* `size` - Size of message to set."] + #[doc = ""] pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the message of a specific notification."] -#[doc = "# Arguments"] -#[doc = "`news_id` - Identification number of the notification."] -#[doc = "`message` - Pointer where UTF-16 message of the notification will be saved."] -#[doc = "`size` - Pointer where size of the message data will be saved in bytes."] -#[doc = ""] - + #[doc = "Gets the message of a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `message` - Pointer where UTF-16 message of the notification will be saved."] + #[doc = "* `size` - Pointer where size of the message data will be saved in bytes."] + #[doc = ""] pub fn NEWS_GetNotificationMessage( news_id: u32_, message: *mut u16_, @@ -25097,13 +24897,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Sets a custom image for a specific notification."] -#[doc = "# Arguments"] -#[doc = "`news_id` - Identification number of the notification."] -#[doc = "`buffer` - Pointer to MPO image to set."] -#[doc = "`size` - Size of the MPO image to set."] -#[doc = ""] - + #[doc = "Sets a custom image for a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `buffer` - Pointer to MPO image to set."] + #[doc = "* `size` - Size of the MPO image to set."] + #[doc = ""] pub fn NEWS_SetNotificationImage( news_id: u32_, buffer: *const ::libc::c_void, @@ -25112,13 +24913,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the image of a specific notification."] -#[doc = "# Arguments"] -#[doc = "`news_id` - Identification number of the notification."] -#[doc = "`buffer` - Pointer where MPO image of the notification will be saved."] -#[doc = "`size` - Pointer where size of the image data will be saved in bytes."] -#[doc = ""] - + #[doc = "Gets the image of a specific notification."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `news_id` - Identification number of the notification."] + #[doc = "* `buffer` - Pointer where MPO image of the notification will be saved."] + #[doc = "* `size` - Pointer where size of the image data will be saved in bytes."] + #[doc = ""] pub fn NEWS_GetNotificationImage( news_id: u32_, buffer: *mut ::libc::c_void, @@ -25127,86 +24929,78 @@ extern "C" { } #[doc = "Head tracking coordinate pair."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfoCoord { -#[doc = "X coordinate."] -#[doc = ""] - + #[doc = "X coordinate."] + #[doc = ""] pub x: f32, -#[doc = "Y coordinate."] -#[doc = ""] - + #[doc = "Y coordinate."] + #[doc = ""] pub y: f32, } #[doc = "Head tracking info."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct QTM_HeadTrackingInfo { -#[doc = "Flags."] -#[doc = ""] - + #[doc = "Flags."] + #[doc = ""] pub flags: [u8_; 5usize], -#[doc = "Padding."] -#[doc = ""] - + #[doc = "Padding."] + #[doc = ""] pub padding: [u8_; 3usize], -#[doc = "Unknown. Not used by System_Settings."] -#[doc = ""] - + #[doc = "Unknown. Not used by System_Settings."] + #[doc = ""] pub floatdata_x08: f32, -#[doc = "Head coordinates."] -#[doc = ""] - + #[doc = "Head coordinates."] + #[doc = ""] pub coords0: [QTM_HeadTrackingInfoCoord; 4usize], -#[doc = "Unknown. Not used by System_Settings."] -#[doc = ""] - + #[doc = "Unknown. Not used by System_Settings."] + #[doc = ""] pub unk_x2c: [u32_; 5usize], } extern "C" { #[must_use] -#[doc = "Initializes QTM."] -#[doc = ""] - + #[doc = "Initializes QTM."] + #[doc = ""] pub fn qtmInit() -> Result; } extern "C" { -#[doc = "Exits QTM."] -#[doc = ""] - + #[doc = "Exits QTM."] + #[doc = ""] pub fn qtmExit(); } extern "C" { -#[doc = "Checks whether QTM is initialized."] -#[doc = "Returns:"] -#[doc = "Whether QTM is initialized."] -#[doc = ""] - + #[doc = "Checks whether QTM is initialized."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether QTM is initialized."] + #[doc = ""] pub fn qtmCheckInitialized() -> bool; } extern "C" { -#[doc = "Checks whether a head is fully detected."] -#[doc = "# Arguments"] -#[doc = "`info` - Tracking info to check."] -#[doc = ""] - + #[doc = "Checks whether a head is fully detected."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `info` - Tracking info to check."] + #[doc = ""] pub fn qtmCheckHeadFullyDetected(info: *mut QTM_HeadTrackingInfo) -> bool; } extern "C" { #[must_use] -#[doc = "Converts QTM coordinates to screen coordinates."] -#[doc = "# Arguments"] -#[doc = "`coord` - Coordinates to convert."] -#[doc = "`screen_width` - Width of the screen. Can be NULL to use the default value for the top screen."] -#[doc = "`screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] -#[doc = "`x` - Pointer to output the screen X coordinate to."] -#[doc = "`y` - Pointer to output the screen Y coordinate to."] -#[doc = ""] - + #[doc = "Converts QTM coordinates to screen coordinates."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `coord` - Coordinates to convert."] + #[doc = "* `screen_width` - Width of the screen. Can be NULL to use the default value for the top screen."] + #[doc = "* `screen_height` - Height of the screen. Can be NULL to use the default value for the top screen."] + #[doc = "* `x` - Pointer to output the screen X coordinate to."] + #[doc = "* `y` - Pointer to output the screen Y coordinate to."] + #[doc = ""] pub fn qtmConvertCoordToScreen( coord: *mut QTM_HeadTrackingInfoCoord, screen_width: *mut f32, @@ -25217,63 +25011,66 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets the current head tracking info."] -#[doc = "# Arguments"] -#[doc = "`val` - Normally 0."] -#[doc = "`out` - Pointer to write head tracking info to."] -#[doc = ""] - + #[doc = "Gets the current head tracking info."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `val` - Normally 0."] + #[doc = "* `out` - Pointer to write head tracking info to."] + #[doc = ""] pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes srv:pm and the service API."] -#[doc = ""] - + #[doc = "Initializes srv:pm and the service API."] + #[doc = ""] pub fn srvPmInit() -> Result; } extern "C" { -#[doc = "Exits srv:pm and the service API."] -#[doc = ""] - + #[doc = "Exits srv:pm and the service API."] + #[doc = ""] pub fn srvPmExit(); } extern "C" { -#[doc = "Gets the current srv:pm session handle."] -#[doc = "Returns:"] -#[doc = "The current srv:pm session handle."] -#[doc = ""] - + #[doc = "Gets the current srv:pm session handle."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The current srv:pm session handle."] + #[doc = ""] pub fn srvPmGetSessionHandle() -> *mut Handle; } extern "C" { #[must_use] -#[doc = "Publishes a notification to a process."] -#[doc = "# Arguments"] -#[doc = "`notificationId` - ID of the notification."] -#[doc = "`process` - Process to publish to."] -#[doc = ""] - + #[doc = "Publishes a notification to a process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = "* `process` - Process to publish to."] + #[doc = ""] pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result; } extern "C" { #[must_use] -#[doc = "Publishes a notification to all processes."] -#[doc = "# Arguments"] -#[doc = "`notificationId` - ID of the notification."] -#[doc = ""] - + #[doc = "Publishes a notification to all processes."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `notificationId` - ID of the notification."] + #[doc = ""] pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Registers a process with SRV."] -#[doc = "# Arguments"] -#[doc = "`pid` - ID of the process."] -#[doc = "`count` - Number of services within the service access control data."] -#[doc = "`serviceAccessControlList` - Service Access Control list."] -#[doc = ""] - + #[doc = "Registers a process with SRV."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - ID of the process."] + #[doc = "* `count` - Number of services within the service access control data."] + #[doc = "* `serviceAccessControlList` - Service Access Control list."] + #[doc = ""] pub fn SRVPM_RegisterProcess( pid: u32_, count: u32_, @@ -25282,45 +25079,46 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters a process with SRV."] -#[doc = "# Arguments"] -#[doc = "`pid` - ID of the process."] -#[doc = ""] - + #[doc = "Unregisters a process with SRV."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pid` - ID of the process."] + #[doc = ""] pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Initializes LOADER."] -#[doc = ""] - + #[doc = "Initializes LOADER."] + #[doc = ""] pub fn loaderInit() -> Result; } extern "C" { -#[doc = "Exits LOADER."] -#[doc = ""] - + #[doc = "Exits LOADER."] + #[doc = ""] pub fn loaderExit(); } extern "C" { #[must_use] -#[doc = "Loads a program and returns a process handle to the newly created process."] -#[doc = "# Arguments"] -#[doc = "`process` - Pointer to output the process handle to. [Direction: In, Out]"] -#[doc = "`programHandle` - The handle of the program to load."] -#[doc = ""] - + #[doc = "Loads a program and returns a process handle to the newly created process."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `process` - Pointer to output the process handle to. [Direction: In, Out]"] + #[doc = "* `programHandle` - The handle of the program to load."] + #[doc = ""] pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Registers a program (along with its update)."] -#[doc = "# Arguments"] -#[doc = "`programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] -#[doc = "`programInfo` - The program info."] -#[doc = "`programInfo` - The program update info."] -#[doc = ""] - + #[doc = "Registers a program (along with its update)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - Pointer to output the program handle to. [Direction: In, Out]"] + #[doc = "* `programInfo` - The program info."] + #[doc = "* `programInfo` - The program update info."] + #[doc = ""] pub fn LOADER_RegisterProgram( programHandle: *mut u64_, programInfo: *const FS_ProgramInfo, @@ -25329,269 +25127,255 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unregisters a program (along with its update)."] -#[doc = "# Arguments"] -#[doc = "`programHandle` - The handle of the program to unregister."] -#[doc = ""] - + #[doc = "Unregisters a program (along with its update)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `programHandle` - The handle of the program to unregister."] + #[doc = ""] pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result; } extern "C" { #[must_use] -#[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see [`ExHeader_Info)`]"] -#[doc = "# Arguments"] -#[doc = "`exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] -#[doc = "`programHandle` - The handle of the program to unregister"] -#[doc = ""] - + #[doc = "Retrives a program's main NCCH extended header info (SCI + ACI, see [`ExHeader_Info)`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `exheaderInfo` - Pointer to output the main NCCH extended header info. [Direction: In, Out]"] + #[doc = "* `programHandle` - The handle of the program to unregister"] + #[doc = ""] pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result; } #[doc = "The normal mode of the led"] #[doc = ""] - pub const LED_NORMAL: powerLedState = 1; #[doc = "The led pulses slowly as it does in the sleep mode"] #[doc = ""] - pub const LED_SLEEP_MODE: powerLedState = 2; #[doc = "Switch off power led"] #[doc = ""] - pub const LED_OFF: powerLedState = 3; #[doc = "Red state of the led"] #[doc = ""] - pub const LED_RED: powerLedState = 4; #[doc = "Blue state of the led"] #[doc = ""] - pub const LED_BLUE: powerLedState = 5; #[doc = "Blinking red state of power led and notification led"] #[doc = ""] - pub const LED_BLINK_RED: powerLedState = 6; pub type powerLedState = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Initializes mcuHwc."] -#[doc = ""] - + #[doc = "Initializes mcuHwc."] + #[doc = ""] pub fn mcuHwcInit() -> Result; } extern "C" { -#[doc = "Exits mcuHwc."] -#[doc = ""] - + #[doc = "Exits mcuHwc."] + #[doc = ""] pub fn mcuHwcExit(); } extern "C" { #[must_use] -#[doc = "Reads data from an i2c device3 register"] -#[doc = "# Arguments"] -#[doc = "`reg` - Register number. See for more info"] -#[doc = "`data` - Pointer to write the data to."] -#[doc = "`size` - Size of data to be read"] -#[doc = ""] - + #[doc = "Reads data from an i2c device3 register"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `reg` - Register number. See for more info"] + #[doc = "* `data` - Pointer to write the data to."] + #[doc = "* `size` - Size of data to be read"] + #[doc = ""] pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Writes data to a i2c device3 register"] -#[doc = "# Arguments"] -#[doc = "`reg` - Register number. See for more info"] -#[doc = "`data` - Pointer to write the data to."] -#[doc = "`size` - Size of data to be written"] -#[doc = ""] - + #[doc = "Writes data to a i2c device3 register"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `reg` - Register number. See for more info"] + #[doc = "* `data` - Pointer to write the data to."] + #[doc = "* `size` - Size of data to be written"] + #[doc = ""] pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the battery voltage"] -#[doc = "# Arguments"] -#[doc = "`voltage` - Pointer to write the battery voltage to."] -#[doc = ""] - + #[doc = "Gets the battery voltage"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `voltage` - Pointer to write the battery voltage to."] + #[doc = ""] pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the battery level"] -#[doc = "# Arguments"] -#[doc = "`level` - Pointer to write the current battery level to."] -#[doc = ""] - + #[doc = "Gets the battery level"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Pointer to write the current battery level to."] + #[doc = ""] pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the sound slider level"] -#[doc = "# Arguments"] -#[doc = "`level` - Pointer to write the slider level to."] -#[doc = ""] - + #[doc = "Gets the sound slider level"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Pointer to write the slider level to."] + #[doc = ""] pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Sets Wifi LED state"] -#[doc = "# Arguments"] -#[doc = "`state` - State of Wifi LED. (True/False)"] -#[doc = ""] - + #[doc = "Sets Wifi LED state"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - State of Wifi LED. (True/False)"] + #[doc = ""] pub fn MCUHWC_SetWifiLedState(state: bool) -> Result; } extern "C" { #[must_use] -#[doc = "Sets Power LED state"] -#[doc = "# Arguments"] -#[doc = "`state` - powerLedState State of power LED."] -#[doc = ""] - + #[doc = "Sets Power LED state"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `state` - powerLedState State of power LED."] + #[doc = ""] pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result; } extern "C" { #[must_use] -#[doc = "Gets 3d slider level"] -#[doc = "# Arguments"] -#[doc = "`level` - Pointer to write 3D slider level to."] -#[doc = ""] - + #[doc = "Gets 3d slider level"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `level` - Pointer to write 3D slider level to."] + #[doc = ""] pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the major MCU firmware version"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the major firmware version to."] -#[doc = ""] - + #[doc = "Gets the major MCU firmware version"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the major firmware version to."] + #[doc = ""] pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Gets the minor MCU firmware version"] -#[doc = "# Arguments"] -#[doc = "`out` - Pointer to write the minor firmware version to."] -#[doc = ""] - + #[doc = "Gets the minor MCU firmware version"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Pointer to write the minor firmware version to."] + #[doc = ""] pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result; } #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] #[doc = ""] - pub const GX_TRANSFER_FMT_RGBA8: GX_TRANSFER_FORMAT = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] #[doc = ""] - pub const GX_TRANSFER_FMT_RGB8: GX_TRANSFER_FORMAT = 1; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] #[doc = ""] - pub const GX_TRANSFER_FMT_RGB565: GX_TRANSFER_FORMAT = 2; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] #[doc = ""] - pub const GX_TRANSFER_FMT_RGB5A1: GX_TRANSFER_FORMAT = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] #[doc = ""] - pub const GX_TRANSFER_FMT_RGBA4: GX_TRANSFER_FORMAT = 4; #[doc = "Supported transfer pixel formats."] +#[doc = ""] #[doc = "[`GSPGPU_FramebufferFormat`]"] #[doc = ""] - pub type GX_TRANSFER_FORMAT = ::libc::c_uint; #[doc = "No anti-aliasing"] #[doc = ""] - pub const GX_TRANSFER_SCALE_NO: GX_TRANSFER_SCALE = 0; #[doc = "2x1 anti-aliasing"] #[doc = ""] - pub const GX_TRANSFER_SCALE_X: GX_TRANSFER_SCALE = 1; #[doc = "2x2 anti-aliasing"] #[doc = ""] - pub const GX_TRANSFER_SCALE_XY: GX_TRANSFER_SCALE = 2; #[doc = "Anti-aliasing modes"] +#[doc = ""] #[doc = "Please remember that the framebuffer is sideways."] #[doc = "Hence if you activate 2x1 anti-aliasing the destination dimensions are w = 240*2 and h = 400"] #[doc = ""] - pub type GX_TRANSFER_SCALE = ::libc::c_uint; #[doc = "Trigger the PPF event"] #[doc = ""] - pub const GX_FILL_TRIGGER: GX_FILL_CONTROL = 1; #[doc = "Indicates if the memory fill is complete. You should not use it when requesting a transfer."] #[doc = ""] - pub const GX_FILL_FINISHED: GX_FILL_CONTROL = 2; #[doc = "The buffer has a 16 bit per pixel depth"] #[doc = ""] - pub const GX_FILL_16BIT_DEPTH: GX_FILL_CONTROL = 0; #[doc = "The buffer has a 24 bit per pixel depth"] #[doc = ""] - pub const GX_FILL_24BIT_DEPTH: GX_FILL_CONTROL = 256; #[doc = "The buffer has a 32 bit per pixel depth"] #[doc = ""] - pub const GX_FILL_32BIT_DEPTH: GX_FILL_CONTROL = 512; #[doc = "GX transfer control flags"] #[doc = ""] - pub type GX_FILL_CONTROL = ::libc::c_uint; #[doc = "GX command entry"] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub union gxCmdEntry_s { -#[doc = "Raw command data"] -#[doc = ""] - + #[doc = "Raw command data"] + #[doc = ""] pub data: [u32_; 8usize], pub __bindgen_anon_1: gxCmdEntry_s__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct gxCmdEntry_s__bindgen_ty_1 { -#[doc = "Command type"] -#[doc = ""] - + #[doc = "Command type"] + #[doc = ""] pub type_: u8_, pub unk1: u8_, pub unk2: u8_, pub unk3: u8_, -#[doc = "Command arguments"] -#[doc = ""] - + #[doc = "Command arguments"] + #[doc = ""] pub args: [u32_; 7usize], } impl Default for gxCmdEntry_s { @@ -25605,37 +25389,29 @@ impl Default for gxCmdEntry_s { } #[doc = "GX command queue structure"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tag_gxCmdQueue_s { -#[doc = "Pointer to array of GX command entries"] -#[doc = ""] - + #[doc = "Pointer to array of GX command entries"] + #[doc = ""] pub entries: *mut gxCmdEntry_s, -#[doc = "Capacity of the command array"] -#[doc = ""] - + #[doc = "Capacity of the command array"] + #[doc = ""] pub maxEntries: u16_, -#[doc = "Number of commands in the queue"] -#[doc = ""] - + #[doc = "Number of commands in the queue"] + #[doc = ""] pub numEntries: u16_, -#[doc = "Index of the first pending command to be submitted to GX"] -#[doc = ""] - + #[doc = "Index of the first pending command to be submitted to GX"] + #[doc = ""] pub curEntry: u16_, -#[doc = "Number of commands completed by GX"] -#[doc = ""] - + #[doc = "Number of commands completed by GX"] + #[doc = ""] pub lastEntry: u16_, -#[doc = "User callback"] -#[doc = ""] - + #[doc = "User callback"] + #[doc = ""] pub callback: ::core::option::Option, -#[doc = "Data for user callback"] -#[doc = ""] - + #[doc = "Data for user callback"] + #[doc = ""] pub user: *mut ::libc::c_void, } impl Default for tag_gxCmdQueue_s { @@ -25650,96 +25426,106 @@ impl Default for tag_gxCmdQueue_s { #[doc = "GX command queue structure"] #[doc = ""] - pub type gxCmdQueue_s = tag_gxCmdQueue_s; extern "C" { -#[doc = "Clears a GX command queue."] -#[doc = "# Arguments"] -#[doc = "`queue` - The GX command queue."] -#[doc = ""] - + #[doc = "Clears a GX command queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] + #[doc = ""] pub fn gxCmdQueueClear(queue: *mut gxCmdQueue_s); } extern "C" { -#[doc = "Adds a command to a GX command queue."] -#[doc = "# Arguments"] -#[doc = "`queue` - The GX command queue."] -#[doc = "`entry` - The GX command to add."] -#[doc = ""] - + #[doc = "Adds a command to a GX command queue."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] + #[doc = "* `entry` - The GX command to add."] + #[doc = ""] pub fn gxCmdQueueAdd(queue: *mut gxCmdQueue_s, entry: *const gxCmdEntry_s); } extern "C" { -#[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] -#[doc = "# Arguments"] -#[doc = "`queue` - The GX command queue."] -#[doc = ""] - + #[doc = "Runs a GX command queue, causing it to begin processing incoming commands as they arrive."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] + #[doc = ""] pub fn gxCmdQueueRun(queue: *mut gxCmdQueue_s); } extern "C" { -#[doc = "Stops a GX command queue from processing incoming commands."] -#[doc = "# Arguments"] -#[doc = "`queue` - The GX command queue."] -#[doc = ""] - + #[doc = "Stops a GX command queue from processing incoming commands."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] + #[doc = ""] pub fn gxCmdQueueStop(queue: *mut gxCmdQueue_s); } extern "C" { -#[doc = "Waits for a GX command queue to finish executing pending commands."] -#[doc = "Returns:"] -#[doc = "false if timeout expired, true otherwise."] -#[doc = "# Arguments"] -#[doc = "`queue` - The GX command queue."] -#[doc = "`timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] -#[doc = ""] - + #[doc = "Waits for a GX command queue to finish executing pending commands."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* false if timeout expired, true otherwise."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue."] + #[doc = "* `timeout` - Optional timeout (in nanoseconds) to wait (specify -1 for no timeout)."] + #[doc = ""] pub fn gxCmdQueueWait(queue: *mut gxCmdQueue_s, timeout: s64) -> bool; } extern "C" { -#[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] -#[doc = "# Arguments"] -#[doc = "`queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] -#[doc = ""] - + #[doc = "Selects a command queue to which GX_* functions will add commands instead of immediately submitting them to GX."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `queue` - The GX command queue. (Pass NULL to remove the bound command queue)"] + #[doc = ""] pub fn GX_BindQueue(queue: *mut gxCmdQueue_s); } extern "C" { #[must_use] -#[doc = "Requests a DMA."] -#[doc = "# Arguments"] -#[doc = "`src` - Source to DMA from."] -#[doc = "`dst` - Destination to DMA to."] -#[doc = "`length` - Length of data to transfer."] -#[doc = ""] - + #[doc = "Requests a DMA."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `src` - Source to DMA from."] + #[doc = "* `dst` - Destination to DMA to."] + #[doc = "* `length` - Length of data to transfer."] + #[doc = ""] pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result; } extern "C" { #[must_use] -#[doc = "Processes a GPU command list."] -#[doc = "# Arguments"] -#[doc = "`buf0a` - Command list address."] -#[doc = "`buf0s` - Command list size."] -#[doc = "`flags` - Flags to process with."] -#[doc = ""] - + #[doc = "Processes a GPU command list."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf0a` - Command list address."] + #[doc = "* `buf0s` - Command list size."] + #[doc = "* `flags` - Flags to process with."] + #[doc = ""] pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Fills the memory of two buffers with the given values."] -#[doc = "# Arguments"] -#[doc = "`buf0a` - Start address of the first buffer."] -#[doc = "`buf0v` - Dimensions of the first buffer."] -#[doc = "`buf0e` - End address of the first buffer."] -#[doc = "`control0` - Value to fill the first buffer with."] -#[doc = "`buf1a` - Start address of the second buffer."] -#[doc = "`buf1v` - Dimensions of the second buffer."] -#[doc = "`buf1e` - End address of the second buffer."] -#[doc = "`control1` - Value to fill the second buffer with."] -#[doc = ""] - + #[doc = "Fills the memory of two buffers with the given values."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf0a` - Start address of the first buffer."] + #[doc = "* `buf0v` - Dimensions of the first buffer."] + #[doc = "* `buf0e` - End address of the first buffer."] + #[doc = "* `control0` - Value to fill the first buffer with."] + #[doc = "* `buf1a` - Start address of the second buffer."] + #[doc = "* `buf1v` - Dimensions of the second buffer."] + #[doc = "* `buf1e` - End address of the second buffer."] + #[doc = "* `control1` - Value to fill the second buffer with."] + #[doc = ""] pub fn GX_MemoryFill( buf0a: *mut u32_, buf0v: u32_, @@ -25753,17 +25539,20 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initiates a display transfer."] -#[doc = "# Arguments"] -#[doc = "`inadr` - Address of the input."] -#[doc = "`indim` - Dimensions of the input."] -#[doc = "`outadr` - Address of the output."] -#[doc = "`outdim` - Dimensions of the output."] -#[doc = "`flags` - Flags to transfer with."] -#[doc = "# Notes"] -#[doc = "The PPF event will be signaled on completion."] -#[doc = ""] - + #[doc = "Initiates a display transfer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inadr` - Address of the input."] + #[doc = "* `indim` - Dimensions of the input."] + #[doc = "* `outadr` - Address of the output."] + #[doc = "* `outdim` - Dimensions of the output."] + #[doc = "* `flags` - Flags to transfer with."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The PPF event will be signaled on completion."] + #[doc = ""] pub fn GX_DisplayTransfer( inadr: *mut u32_, indim: u32_, @@ -25774,18 +25563,21 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initiates a texture copy."] -#[doc = "# Arguments"] -#[doc = "`inadr` - Address of the input."] -#[doc = "`indim` - Dimensions of the input."] -#[doc = "`outadr` - Address of the output."] -#[doc = "`outdim` - Dimensions of the output."] -#[doc = "`size` - Size of the data to transfer."] -#[doc = "`flags` - Flags to transfer with."] -#[doc = "# Notes"] -#[doc = "The PPF event will be signaled on completion."] -#[doc = ""] - + #[doc = "Initiates a texture copy."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `inadr` - Address of the input."] + #[doc = "* `indim` - Dimensions of the input."] + #[doc = "* `outadr` - Address of the output."] + #[doc = "* `outdim` - Dimensions of the output."] + #[doc = "* `size` - Size of the data to transfer."] + #[doc = "* `flags` - Flags to transfer with."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The PPF event will be signaled on completion."] + #[doc = ""] pub fn GX_TextureCopy( inadr: *mut u32_, indim: u32_, @@ -25797,16 +25589,17 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] -#[doc = "# Arguments"] -#[doc = "`buf0a` - Address of the first buffer."] -#[doc = "`buf0s` - Size of the first buffer."] -#[doc = "`buf1a` - Address of the second buffer."] -#[doc = "`buf1s` - Size of the second buffer."] -#[doc = "`buf2a` - Address of the third buffer."] -#[doc = "`buf2s` - Size of the third buffer."] -#[doc = ""] - + #[doc = "Flushes the cache regions of three buffers. (This command cannot be queued in a GX command queue)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `buf0a` - Address of the first buffer."] + #[doc = "* `buf0s` - Size of the first buffer."] + #[doc = "* `buf1a` - Address of the second buffer."] + #[doc = "* `buf1s` - Size of the second buffer."] + #[doc = "* `buf2a` - Address of the third buffer."] + #[doc = "* `buf2s` - Size of the third buffer."] + #[doc = ""] pub fn GX_FlushCacheRegions( buf0a: *mut u32_, buf0s: u32_, @@ -25819,1630 +25612,1333 @@ extern "C" { #[doc = "Nearest-neighbor interpolation."] #[doc = ""] - pub const GPU_NEAREST: GPU_TEXTURE_FILTER_PARAM = 0; #[doc = "Linear interpolation."] #[doc = ""] - pub const GPU_LINEAR: GPU_TEXTURE_FILTER_PARAM = 1; #[doc = "Texture filters."] #[doc = ""] - pub type GPU_TEXTURE_FILTER_PARAM = ::libc::c_uint; #[doc = "Clamps to edge."] #[doc = ""] - pub const GPU_CLAMP_TO_EDGE: GPU_TEXTURE_WRAP_PARAM = 0; #[doc = "Clamps to border."] #[doc = ""] - pub const GPU_CLAMP_TO_BORDER: GPU_TEXTURE_WRAP_PARAM = 1; #[doc = "Repeats texture."] #[doc = ""] - pub const GPU_REPEAT: GPU_TEXTURE_WRAP_PARAM = 2; #[doc = "Repeats with mirrored texture."] #[doc = ""] - pub const GPU_MIRRORED_REPEAT: GPU_TEXTURE_WRAP_PARAM = 3; #[doc = "Texture wrap modes."] #[doc = ""] - pub type GPU_TEXTURE_WRAP_PARAM = ::libc::c_uint; #[doc = "2D texture"] #[doc = ""] - pub const GPU_TEX_2D: GPU_TEXTURE_MODE_PARAM = 0; #[doc = "Cube map"] #[doc = ""] - pub const GPU_TEX_CUBE_MAP: GPU_TEXTURE_MODE_PARAM = 1; #[doc = "2D Shadow texture"] #[doc = ""] - pub const GPU_TEX_SHADOW_2D: GPU_TEXTURE_MODE_PARAM = 2; #[doc = "Projection texture"] #[doc = ""] - pub const GPU_TEX_PROJECTION: GPU_TEXTURE_MODE_PARAM = 3; #[doc = "Shadow cube map"] #[doc = ""] - pub const GPU_TEX_SHADOW_CUBE: GPU_TEXTURE_MODE_PARAM = 4; #[doc = "Disabled"] #[doc = ""] - pub const GPU_TEX_DISABLED: GPU_TEXTURE_MODE_PARAM = 5; #[doc = "Texture modes."] #[doc = ""] - pub type GPU_TEXTURE_MODE_PARAM = ::libc::c_uint; #[doc = "Texture unit 0."] #[doc = ""] - pub const GPU_TEXUNIT0: GPU_TEXUNIT = 1; #[doc = "Texture unit 1."] #[doc = ""] - pub const GPU_TEXUNIT1: GPU_TEXUNIT = 2; #[doc = "Texture unit 2."] #[doc = ""] - pub const GPU_TEXUNIT2: GPU_TEXUNIT = 4; #[doc = "Supported texture units."] #[doc = ""] - pub type GPU_TEXUNIT = ::libc::c_uint; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] #[doc = ""] - pub const GPU_RGBA8: GPU_TEXCOLOR = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] #[doc = ""] - pub const GPU_RGB8: GPU_TEXCOLOR = 1; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] #[doc = ""] - pub const GPU_RGBA5551: GPU_TEXCOLOR = 2; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] #[doc = ""] - pub const GPU_RGB565: GPU_TEXCOLOR = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] #[doc = ""] - pub const GPU_RGBA4: GPU_TEXCOLOR = 4; #[doc = "8-bit Luminance + 8-bit Alpha"] #[doc = ""] - pub const GPU_LA8: GPU_TEXCOLOR = 5; #[doc = "8-bit Hi + 8-bit Lo"] #[doc = ""] - pub const GPU_HILO8: GPU_TEXCOLOR = 6; #[doc = "8-bit Luminance"] #[doc = ""] - pub const GPU_L8: GPU_TEXCOLOR = 7; #[doc = "8-bit Alpha"] #[doc = ""] - pub const GPU_A8: GPU_TEXCOLOR = 8; #[doc = "4-bit Luminance + 4-bit Alpha"] #[doc = ""] - pub const GPU_LA4: GPU_TEXCOLOR = 9; #[doc = "4-bit Luminance"] #[doc = ""] - pub const GPU_L4: GPU_TEXCOLOR = 10; #[doc = "4-bit Alpha"] #[doc = ""] - pub const GPU_A4: GPU_TEXCOLOR = 11; #[doc = "ETC1 texture compression"] #[doc = ""] - pub const GPU_ETC1: GPU_TEXCOLOR = 12; #[doc = "ETC1 texture compression + 4-bit Alpha"] #[doc = ""] - pub const GPU_ETC1A4: GPU_TEXCOLOR = 13; #[doc = "Supported texture formats."] #[doc = ""] - pub type GPU_TEXCOLOR = ::libc::c_uint; #[doc = "2D face"] #[doc = ""] - pub const GPU_TEXFACE_2D: GPU_TEXFACE = 0; #[doc = "+X face"] #[doc = ""] - pub const GPU_POSITIVE_X: GPU_TEXFACE = 0; #[doc = "-X face"] #[doc = ""] - pub const GPU_NEGATIVE_X: GPU_TEXFACE = 1; #[doc = "+Y face"] #[doc = ""] - pub const GPU_POSITIVE_Y: GPU_TEXFACE = 2; #[doc = "-Y face"] #[doc = ""] - pub const GPU_NEGATIVE_Y: GPU_TEXFACE = 3; #[doc = "+Z face"] #[doc = ""] - pub const GPU_POSITIVE_Z: GPU_TEXFACE = 4; #[doc = "-Z face"] #[doc = ""] - pub const GPU_NEGATIVE_Z: GPU_TEXFACE = 5; #[doc = "Texture faces."] #[doc = ""] - pub type GPU_TEXFACE = ::libc::c_uint; #[doc = "Clamp to zero."] #[doc = ""] - pub const GPU_PT_CLAMP_TO_ZERO: GPU_PROCTEX_CLAMP = 0; #[doc = "Clamp to edge."] #[doc = ""] - pub const GPU_PT_CLAMP_TO_EDGE: GPU_PROCTEX_CLAMP = 1; #[doc = "Symmetrical repeat."] #[doc = ""] - pub const GPU_PT_REPEAT: GPU_PROCTEX_CLAMP = 2; #[doc = "Mirrored repeat."] #[doc = ""] - pub const GPU_PT_MIRRORED_REPEAT: GPU_PROCTEX_CLAMP = 3; #[doc = "Pulse."] #[doc = ""] - pub const GPU_PT_PULSE: GPU_PROCTEX_CLAMP = 4; #[doc = "Procedural texture clamp modes."] #[doc = ""] - pub type GPU_PROCTEX_CLAMP = ::libc::c_uint; #[doc = "U"] #[doc = ""] - pub const GPU_PT_U: GPU_PROCTEX_MAPFUNC = 0; #[doc = "U2"] #[doc = ""] - pub const GPU_PT_U2: GPU_PROCTEX_MAPFUNC = 1; #[doc = "V"] #[doc = ""] - pub const GPU_PT_V: GPU_PROCTEX_MAPFUNC = 2; #[doc = "V2"] #[doc = ""] - pub const GPU_PT_V2: GPU_PROCTEX_MAPFUNC = 3; #[doc = "U+V"] #[doc = ""] - pub const GPU_PT_ADD: GPU_PROCTEX_MAPFUNC = 4; #[doc = "U2+V2"] #[doc = ""] - pub const GPU_PT_ADD2: GPU_PROCTEX_MAPFUNC = 5; #[doc = "sqrt(U2+V2)"] #[doc = ""] - pub const GPU_PT_SQRT2: GPU_PROCTEX_MAPFUNC = 6; #[doc = "min"] #[doc = ""] - pub const GPU_PT_MIN: GPU_PROCTEX_MAPFUNC = 7; #[doc = "max"] #[doc = ""] - pub const GPU_PT_MAX: GPU_PROCTEX_MAPFUNC = 8; #[doc = "rmax"] #[doc = ""] - pub const GPU_PT_RMAX: GPU_PROCTEX_MAPFUNC = 9; #[doc = "Procedural texture mapping functions."] #[doc = ""] - pub type GPU_PROCTEX_MAPFUNC = ::libc::c_uint; #[doc = "No shift."] #[doc = ""] - pub const GPU_PT_NONE: GPU_PROCTEX_SHIFT = 0; #[doc = "Odd shift."] #[doc = ""] - pub const GPU_PT_ODD: GPU_PROCTEX_SHIFT = 1; #[doc = "Even shift."] #[doc = ""] - pub const GPU_PT_EVEN: GPU_PROCTEX_SHIFT = 2; #[doc = "Procedural texture shift values."] #[doc = ""] - pub type GPU_PROCTEX_SHIFT = ::libc::c_uint; #[doc = "Nearest-neighbor"] #[doc = ""] - pub const GPU_PT_NEAREST: GPU_PROCTEX_FILTER = 0; #[doc = "Linear interpolation"] #[doc = ""] - pub const GPU_PT_LINEAR: GPU_PROCTEX_FILTER = 1; #[doc = "Nearest-neighbor with mipmap using nearest-neighbor"] #[doc = ""] - pub const GPU_PT_NEAREST_MIP_NEAREST: GPU_PROCTEX_FILTER = 2; #[doc = "Linear interpolation with mipmap using nearest-neighbor"] #[doc = ""] - pub const GPU_PT_LINEAR_MIP_NEAREST: GPU_PROCTEX_FILTER = 3; #[doc = "Nearest-neighbor with mipmap using linear interpolation"] #[doc = ""] - pub const GPU_PT_NEAREST_MIP_LINEAR: GPU_PROCTEX_FILTER = 4; #[doc = "Linear interpolation with mipmap using linear interpolation"] #[doc = ""] - pub const GPU_PT_LINEAR_MIP_LINEAR: GPU_PROCTEX_FILTER = 5; #[doc = "Procedural texture filter values."] #[doc = ""] - pub type GPU_PROCTEX_FILTER = ::libc::c_uint; #[doc = "Noise table"] #[doc = ""] - pub const GPU_LUT_NOISE: GPU_PROCTEX_LUTID = 0; #[doc = "RGB mapping function table"] #[doc = ""] - pub const GPU_LUT_RGBMAP: GPU_PROCTEX_LUTID = 2; #[doc = "Alpha mapping function table"] #[doc = ""] - pub const GPU_LUT_ALPHAMAP: GPU_PROCTEX_LUTID = 3; #[doc = "Color table"] #[doc = ""] - pub const GPU_LUT_COLOR: GPU_PROCTEX_LUTID = 4; #[doc = "Color difference table"] #[doc = ""] - pub const GPU_LUT_COLORDIF: GPU_PROCTEX_LUTID = 5; #[doc = "Procedural texture LUT IDs."] #[doc = ""] - pub type GPU_PROCTEX_LUTID = ::libc::c_uint; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha"] #[doc = ""] - pub const GPU_RB_RGBA8: GPU_COLORBUF = 0; #[doc = "8-bit Red + 8-bit Green + 8-bit Blue"] #[doc = ""] - pub const GPU_RB_RGB8: GPU_COLORBUF = 1; #[doc = "5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha"] #[doc = ""] - pub const GPU_RB_RGBA5551: GPU_COLORBUF = 2; #[doc = "5-bit Red + 6-bit Green + 5-bit Blue"] #[doc = ""] - pub const GPU_RB_RGB565: GPU_COLORBUF = 3; #[doc = "4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha"] #[doc = ""] - pub const GPU_RB_RGBA4: GPU_COLORBUF = 4; #[doc = "Supported color buffer formats."] #[doc = ""] - pub type GPU_COLORBUF = ::libc::c_uint; #[doc = "16-bit Depth"] #[doc = ""] - pub const GPU_RB_DEPTH16: GPU_DEPTHBUF = 0; #[doc = "24-bit Depth"] #[doc = ""] - pub const GPU_RB_DEPTH24: GPU_DEPTHBUF = 2; #[doc = "24-bit Depth + 8-bit Stencil"] #[doc = ""] - pub const GPU_RB_DEPTH24_STENCIL8: GPU_DEPTHBUF = 3; #[doc = "Supported depth buffer formats."] #[doc = ""] - pub type GPU_DEPTHBUF = ::libc::c_uint; #[doc = "Never pass."] #[doc = ""] - pub const GPU_NEVER: GPU_TESTFUNC = 0; #[doc = "Always pass."] #[doc = ""] - pub const GPU_ALWAYS: GPU_TESTFUNC = 1; #[doc = "Pass if equal."] #[doc = ""] - pub const GPU_EQUAL: GPU_TESTFUNC = 2; #[doc = "Pass if not equal."] #[doc = ""] - pub const GPU_NOTEQUAL: GPU_TESTFUNC = 3; #[doc = "Pass if less than."] #[doc = ""] - pub const GPU_LESS: GPU_TESTFUNC = 4; #[doc = "Pass if less than or equal."] #[doc = ""] - pub const GPU_LEQUAL: GPU_TESTFUNC = 5; #[doc = "Pass if greater than."] #[doc = ""] - pub const GPU_GREATER: GPU_TESTFUNC = 6; #[doc = "Pass if greater than or equal."] #[doc = ""] - pub const GPU_GEQUAL: GPU_TESTFUNC = 7; #[doc = "Test functions."] #[doc = ""] - pub type GPU_TESTFUNC = ::libc::c_uint; #[doc = "Pass if greater than or equal."] #[doc = ""] - pub const GPU_EARLYDEPTH_GEQUAL: GPU_EARLYDEPTHFUNC = 0; #[doc = "Pass if greater than."] #[doc = ""] - pub const GPU_EARLYDEPTH_GREATER: GPU_EARLYDEPTHFUNC = 1; #[doc = "Pass if less than or equal."] #[doc = ""] - pub const GPU_EARLYDEPTH_LEQUAL: GPU_EARLYDEPTHFUNC = 2; #[doc = "Pass if less than."] #[doc = ""] - pub const GPU_EARLYDEPTH_LESS: GPU_EARLYDEPTHFUNC = 3; #[doc = "Early depth test functions."] #[doc = ""] - pub type GPU_EARLYDEPTHFUNC = ::libc::c_uint; #[doc = "Never pass (0)."] #[doc = ""] - pub const GPU_GAS_NEVER: GPU_GASDEPTHFUNC = 0; #[doc = "Always pass (1)."] #[doc = ""] - pub const GPU_GAS_ALWAYS: GPU_GASDEPTHFUNC = 1; #[doc = "Pass if greater than (1-X)."] #[doc = ""] - pub const GPU_GAS_GREATER: GPU_GASDEPTHFUNC = 2; #[doc = "Pass if less than (X)."] #[doc = ""] - pub const GPU_GAS_LESS: GPU_GASDEPTHFUNC = 3; #[doc = "Gas depth functions."] #[doc = ""] - pub type GPU_GASDEPTHFUNC = ::libc::c_uint; #[doc = "Disable."] #[doc = ""] - pub const GPU_SCISSOR_DISABLE: GPU_SCISSORMODE = 0; #[doc = "Exclude pixels inside the scissor box."] #[doc = ""] - pub const GPU_SCISSOR_INVERT: GPU_SCISSORMODE = 1; #[doc = "Exclude pixels outside of the scissor box."] #[doc = ""] - pub const GPU_SCISSOR_NORMAL: GPU_SCISSORMODE = 3; #[doc = "Scissor test modes."] #[doc = ""] - pub type GPU_SCISSORMODE = ::libc::c_uint; #[doc = "Keep old value. (old_stencil)"] #[doc = ""] - pub const GPU_STENCIL_KEEP: GPU_STENCILOP = 0; #[doc = "Zero. (0)"] #[doc = ""] - pub const GPU_STENCIL_ZERO: GPU_STENCILOP = 1; #[doc = "Replace value. (ref)"] #[doc = ""] - pub const GPU_STENCIL_REPLACE: GPU_STENCILOP = 2; #[doc = "Increment value. (old_stencil + 1 saturated to [0, 255])"] #[doc = ""] - pub const GPU_STENCIL_INCR: GPU_STENCILOP = 3; #[doc = "Decrement value. (old_stencil - 1 saturated to [0, 255])"] #[doc = ""] - pub const GPU_STENCIL_DECR: GPU_STENCILOP = 4; #[doc = "Invert value. (~old_stencil)"] #[doc = ""] - pub const GPU_STENCIL_INVERT: GPU_STENCILOP = 5; #[doc = "Increment value. (old_stencil + 1)"] #[doc = ""] - pub const GPU_STENCIL_INCR_WRAP: GPU_STENCILOP = 6; #[doc = "Decrement value. (old_stencil - 1)"] #[doc = ""] - pub const GPU_STENCIL_DECR_WRAP: GPU_STENCILOP = 7; #[doc = "Stencil operations."] #[doc = ""] - pub type GPU_STENCILOP = ::libc::c_uint; #[doc = "Write red."] #[doc = ""] - pub const GPU_WRITE_RED: GPU_WRITEMASK = 1; #[doc = "Write green."] #[doc = ""] - pub const GPU_WRITE_GREEN: GPU_WRITEMASK = 2; #[doc = "Write blue."] #[doc = ""] - pub const GPU_WRITE_BLUE: GPU_WRITEMASK = 4; #[doc = "Write alpha."] #[doc = ""] - pub const GPU_WRITE_ALPHA: GPU_WRITEMASK = 8; #[doc = "Write depth."] #[doc = ""] - pub const GPU_WRITE_DEPTH: GPU_WRITEMASK = 16; #[doc = "Write all color components."] #[doc = ""] - pub const GPU_WRITE_COLOR: GPU_WRITEMASK = 15; #[doc = "Write all components."] #[doc = ""] - pub const GPU_WRITE_ALL: GPU_WRITEMASK = 31; #[doc = "Pixel write mask."] #[doc = ""] - pub type GPU_WRITEMASK = ::libc::c_uint; #[doc = "Add colors."] #[doc = ""] - pub const GPU_BLEND_ADD: GPU_BLENDEQUATION = 0; #[doc = "Subtract colors."] #[doc = ""] - pub const GPU_BLEND_SUBTRACT: GPU_BLENDEQUATION = 1; #[doc = "Reverse-subtract colors."] #[doc = ""] - pub const GPU_BLEND_REVERSE_SUBTRACT: GPU_BLENDEQUATION = 2; #[doc = "Use the minimum color."] #[doc = ""] - pub const GPU_BLEND_MIN: GPU_BLENDEQUATION = 3; #[doc = "Use the maximum color."] #[doc = ""] - pub const GPU_BLEND_MAX: GPU_BLENDEQUATION = 4; #[doc = "Blend modes."] #[doc = ""] - pub type GPU_BLENDEQUATION = ::libc::c_uint; #[doc = "Zero."] #[doc = ""] - pub const GPU_ZERO: GPU_BLENDFACTOR = 0; #[doc = "One."] #[doc = ""] - pub const GPU_ONE: GPU_BLENDFACTOR = 1; #[doc = "Source color."] #[doc = ""] - pub const GPU_SRC_COLOR: GPU_BLENDFACTOR = 2; #[doc = "Source color - 1."] #[doc = ""] - pub const GPU_ONE_MINUS_SRC_COLOR: GPU_BLENDFACTOR = 3; #[doc = "Destination color."] #[doc = ""] - pub const GPU_DST_COLOR: GPU_BLENDFACTOR = 4; #[doc = "Destination color - 1."] #[doc = ""] - pub const GPU_ONE_MINUS_DST_COLOR: GPU_BLENDFACTOR = 5; #[doc = "Source alpha."] #[doc = ""] - pub const GPU_SRC_ALPHA: GPU_BLENDFACTOR = 6; #[doc = "Source alpha - 1."] #[doc = ""] - pub const GPU_ONE_MINUS_SRC_ALPHA: GPU_BLENDFACTOR = 7; #[doc = "Destination alpha."] #[doc = ""] - pub const GPU_DST_ALPHA: GPU_BLENDFACTOR = 8; #[doc = "Destination alpha - 1."] #[doc = ""] - pub const GPU_ONE_MINUS_DST_ALPHA: GPU_BLENDFACTOR = 9; #[doc = "Constant color."] #[doc = ""] - pub const GPU_CONSTANT_COLOR: GPU_BLENDFACTOR = 10; #[doc = "Constant color - 1."] #[doc = ""] - pub const GPU_ONE_MINUS_CONSTANT_COLOR: GPU_BLENDFACTOR = 11; #[doc = "Constant alpha."] #[doc = ""] - pub const GPU_CONSTANT_ALPHA: GPU_BLENDFACTOR = 12; #[doc = "Constant alpha - 1."] #[doc = ""] - pub const GPU_ONE_MINUS_CONSTANT_ALPHA: GPU_BLENDFACTOR = 13; #[doc = "Saturated alpha."] #[doc = ""] - pub const GPU_SRC_ALPHA_SATURATE: GPU_BLENDFACTOR = 14; #[doc = "Blend factors."] #[doc = ""] - pub type GPU_BLENDFACTOR = ::libc::c_uint; #[doc = "Clear."] #[doc = ""] - pub const GPU_LOGICOP_CLEAR: GPU_LOGICOP = 0; #[doc = "Bitwise AND."] #[doc = ""] - pub const GPU_LOGICOP_AND: GPU_LOGICOP = 1; #[doc = "Reverse bitwise AND."] #[doc = ""] - pub const GPU_LOGICOP_AND_REVERSE: GPU_LOGICOP = 2; #[doc = "Copy."] #[doc = ""] - pub const GPU_LOGICOP_COPY: GPU_LOGICOP = 3; #[doc = "Set."] #[doc = ""] - pub const GPU_LOGICOP_SET: GPU_LOGICOP = 4; #[doc = "Inverted copy."] #[doc = ""] - pub const GPU_LOGICOP_COPY_INVERTED: GPU_LOGICOP = 5; #[doc = "No operation."] #[doc = ""] - pub const GPU_LOGICOP_NOOP: GPU_LOGICOP = 6; #[doc = "Invert."] #[doc = ""] - pub const GPU_LOGICOP_INVERT: GPU_LOGICOP = 7; #[doc = "Bitwise NAND."] #[doc = ""] - pub const GPU_LOGICOP_NAND: GPU_LOGICOP = 8; #[doc = "Bitwise OR."] #[doc = ""] - pub const GPU_LOGICOP_OR: GPU_LOGICOP = 9; #[doc = "Bitwise NOR."] #[doc = ""] - pub const GPU_LOGICOP_NOR: GPU_LOGICOP = 10; #[doc = "Bitwise XOR."] #[doc = ""] - pub const GPU_LOGICOP_XOR: GPU_LOGICOP = 11; #[doc = "Equivalent."] #[doc = ""] - pub const GPU_LOGICOP_EQUIV: GPU_LOGICOP = 12; #[doc = "Inverted bitwise AND."] #[doc = ""] - pub const GPU_LOGICOP_AND_INVERTED: GPU_LOGICOP = 13; #[doc = "Reverse bitwise OR."] #[doc = ""] - pub const GPU_LOGICOP_OR_REVERSE: GPU_LOGICOP = 14; #[doc = "Inverted bitwize OR."] #[doc = ""] - pub const GPU_LOGICOP_OR_INVERTED: GPU_LOGICOP = 15; #[doc = "Logical operations."] #[doc = ""] - pub type GPU_LOGICOP = ::libc::c_uint; #[doc = "OpenGL mode."] #[doc = ""] - pub const GPU_FRAGOPMODE_GL: GPU_FRAGOPMODE = 0; #[doc = "Gas mode (?)."] #[doc = ""] - pub const GPU_FRAGOPMODE_GAS_ACC: GPU_FRAGOPMODE = 1; #[doc = "Shadow mode (?)."] #[doc = ""] - pub const GPU_FRAGOPMODE_SHADOW: GPU_FRAGOPMODE = 3; #[doc = "Fragment operation modes."] #[doc = ""] - pub type GPU_FRAGOPMODE = ::libc::c_uint; #[doc = "8-bit byte."] #[doc = ""] - pub const GPU_BYTE: GPU_FORMATS = 0; #[doc = "8-bit unsigned byte."] #[doc = ""] - pub const GPU_UNSIGNED_BYTE: GPU_FORMATS = 1; #[doc = "16-bit short."] #[doc = ""] - pub const GPU_SHORT: GPU_FORMATS = 2; #[doc = "32-bit float."] #[doc = ""] - pub const GPU_FLOAT: GPU_FORMATS = 3; #[doc = "Supported component formats."] #[doc = ""] - pub type GPU_FORMATS = ::libc::c_uint; #[doc = "Disabled."] #[doc = ""] - pub const GPU_CULL_NONE: GPU_CULLMODE = 0; #[doc = "Front, counter-clockwise."] #[doc = ""] - pub const GPU_CULL_FRONT_CCW: GPU_CULLMODE = 1; #[doc = "Back, counter-clockwise."] #[doc = ""] - pub const GPU_CULL_BACK_CCW: GPU_CULLMODE = 2; #[doc = "Cull modes."] #[doc = ""] - pub type GPU_CULLMODE = ::libc::c_uint; #[doc = "Primary color."] #[doc = ""] - pub const GPU_PRIMARY_COLOR: GPU_TEVSRC = 0; #[doc = "Primary fragment color."] #[doc = ""] - pub const GPU_FRAGMENT_PRIMARY_COLOR: GPU_TEVSRC = 1; #[doc = "Secondary fragment color."] #[doc = ""] - pub const GPU_FRAGMENT_SECONDARY_COLOR: GPU_TEVSRC = 2; #[doc = "Texture unit 0."] #[doc = ""] - pub const GPU_TEXTURE0: GPU_TEVSRC = 3; #[doc = "Texture unit 1."] #[doc = ""] - pub const GPU_TEXTURE1: GPU_TEVSRC = 4; #[doc = "Texture unit 2."] #[doc = ""] - pub const GPU_TEXTURE2: GPU_TEVSRC = 5; #[doc = "Texture unit 3."] #[doc = ""] - pub const GPU_TEXTURE3: GPU_TEVSRC = 6; #[doc = "Previous buffer."] #[doc = ""] - pub const GPU_PREVIOUS_BUFFER: GPU_TEVSRC = 13; #[doc = "Constant value."] #[doc = ""] - pub const GPU_CONSTANT: GPU_TEVSRC = 14; #[doc = "Previous value."] #[doc = ""] - pub const GPU_PREVIOUS: GPU_TEVSRC = 15; #[doc = "Texture combiner sources."] #[doc = ""] - pub type GPU_TEVSRC = ::libc::c_uint; #[doc = "Source color."] #[doc = ""] - pub const GPU_TEVOP_RGB_SRC_COLOR: GPU_TEVOP_RGB = 0; #[doc = "Source color - 1."] #[doc = ""] - pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR: GPU_TEVOP_RGB = 1; #[doc = "Source alpha."] #[doc = ""] - pub const GPU_TEVOP_RGB_SRC_ALPHA: GPU_TEVOP_RGB = 2; #[doc = "Source alpha - 1."] #[doc = ""] - pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_RGB = 3; #[doc = "Source red."] #[doc = ""] - pub const GPU_TEVOP_RGB_SRC_R: GPU_TEVOP_RGB = 4; #[doc = "Source red - 1."] #[doc = ""] - pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_R: GPU_TEVOP_RGB = 5; #[doc = "Unknown."] #[doc = ""] - pub const GPU_TEVOP_RGB_0x06: GPU_TEVOP_RGB = 6; #[doc = "Unknown."] #[doc = ""] - pub const GPU_TEVOP_RGB_0x07: GPU_TEVOP_RGB = 7; #[doc = "Source green."] #[doc = ""] - pub const GPU_TEVOP_RGB_SRC_G: GPU_TEVOP_RGB = 8; #[doc = "Source green - 1."] #[doc = ""] - pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_G: GPU_TEVOP_RGB = 9; #[doc = "Unknown."] #[doc = ""] - pub const GPU_TEVOP_RGB_0x0A: GPU_TEVOP_RGB = 10; #[doc = "Unknown."] #[doc = ""] - pub const GPU_TEVOP_RGB_0x0B: GPU_TEVOP_RGB = 11; #[doc = "Source blue."] #[doc = ""] - pub const GPU_TEVOP_RGB_SRC_B: GPU_TEVOP_RGB = 12; #[doc = "Source blue - 1."] #[doc = ""] - pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_B: GPU_TEVOP_RGB = 13; #[doc = "Unknown."] #[doc = ""] - pub const GPU_TEVOP_RGB_0x0E: GPU_TEVOP_RGB = 14; #[doc = "Unknown."] #[doc = ""] - pub const GPU_TEVOP_RGB_0x0F: GPU_TEVOP_RGB = 15; #[doc = "Texture RGB combiner operands."] #[doc = ""] - pub type GPU_TEVOP_RGB = ::libc::c_uint; #[doc = "Source alpha."] #[doc = ""] - pub const GPU_TEVOP_A_SRC_ALPHA: GPU_TEVOP_A = 0; #[doc = "Source alpha - 1."] #[doc = ""] - pub const GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_A = 1; #[doc = "Source red."] #[doc = ""] - pub const GPU_TEVOP_A_SRC_R: GPU_TEVOP_A = 2; #[doc = "Source red - 1."] #[doc = ""] - pub const GPU_TEVOP_A_ONE_MINUS_SRC_R: GPU_TEVOP_A = 3; #[doc = "Source green."] #[doc = ""] - pub const GPU_TEVOP_A_SRC_G: GPU_TEVOP_A = 4; #[doc = "Source green - 1."] #[doc = ""] - pub const GPU_TEVOP_A_ONE_MINUS_SRC_G: GPU_TEVOP_A = 5; #[doc = "Source blue."] #[doc = ""] - pub const GPU_TEVOP_A_SRC_B: GPU_TEVOP_A = 6; #[doc = "Source blue - 1."] #[doc = ""] - pub const GPU_TEVOP_A_ONE_MINUS_SRC_B: GPU_TEVOP_A = 7; #[doc = "Texture Alpha combiner operands."] #[doc = ""] - pub type GPU_TEVOP_A = ::libc::c_uint; #[doc = "Replace."] #[doc = ""] - pub const GPU_REPLACE: GPU_COMBINEFUNC = 0; #[doc = "Modulate."] #[doc = ""] - pub const GPU_MODULATE: GPU_COMBINEFUNC = 1; #[doc = "Add."] #[doc = ""] - pub const GPU_ADD: GPU_COMBINEFUNC = 2; #[doc = "Signed add."] #[doc = ""] - pub const GPU_ADD_SIGNED: GPU_COMBINEFUNC = 3; #[doc = "Interpolate."] #[doc = ""] - pub const GPU_INTERPOLATE: GPU_COMBINEFUNC = 4; #[doc = "Subtract."] #[doc = ""] - pub const GPU_SUBTRACT: GPU_COMBINEFUNC = 5; #[doc = "Dot3. RGB only."] #[doc = ""] - pub const GPU_DOT3_RGB: GPU_COMBINEFUNC = 6; #[doc = "Multiply then add."] #[doc = ""] - pub const GPU_MULTIPLY_ADD: GPU_COMBINEFUNC = 8; #[doc = "Add then multiply."] #[doc = ""] - pub const GPU_ADD_MULTIPLY: GPU_COMBINEFUNC = 9; #[doc = "Texture combiner functions."] #[doc = ""] - pub type GPU_COMBINEFUNC = ::libc::c_uint; #[doc = "1x"] #[doc = ""] - pub const GPU_TEVSCALE_1: GPU_TEVSCALE = 0; #[doc = "2x"] #[doc = ""] - pub const GPU_TEVSCALE_2: GPU_TEVSCALE = 1; #[doc = "4x"] #[doc = ""] - pub const GPU_TEVSCALE_4: GPU_TEVSCALE = 2; #[doc = "Texture scale factors."] #[doc = ""] - pub type GPU_TEVSCALE = ::libc::c_uint; #[doc = "None."] #[doc = ""] - pub const GPU_NO_FRESNEL: GPU_FRESNELSEL = 0; #[doc = "Primary alpha."] #[doc = ""] - pub const GPU_PRI_ALPHA_FRESNEL: GPU_FRESNELSEL = 1; #[doc = "Secondary alpha."] #[doc = ""] - pub const GPU_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 2; #[doc = "Primary and secondary alpha."] #[doc = ""] - pub const GPU_PRI_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 3; #[doc = "Fresnel options."] #[doc = ""] - pub type GPU_FRESNELSEL = ::libc::c_uint; #[doc = "Disabled."] #[doc = ""] - pub const GPU_BUMP_NOT_USED: GPU_BUMPMODE = 0; #[doc = "Bump as bump mapping."] #[doc = ""] - pub const GPU_BUMP_AS_BUMP: GPU_BUMPMODE = 1; #[doc = "Bump as tangent/normal mapping."] #[doc = ""] - pub const GPU_BUMP_AS_TANG: GPU_BUMPMODE = 2; #[doc = "Bump map modes."] #[doc = ""] - pub type GPU_BUMPMODE = ::libc::c_uint; #[doc = "D0 LUT."] #[doc = ""] - pub const GPU_LUT_D0: GPU_LIGHTLUTID = 0; #[doc = "D1 LUT."] #[doc = ""] - pub const GPU_LUT_D1: GPU_LIGHTLUTID = 1; #[doc = "Spotlight LUT."] #[doc = ""] - pub const GPU_LUT_SP: GPU_LIGHTLUTID = 2; #[doc = "Fresnel LUT."] #[doc = ""] - pub const GPU_LUT_FR: GPU_LIGHTLUTID = 3; #[doc = "Reflection-Blue LUT."] #[doc = ""] - pub const GPU_LUT_RB: GPU_LIGHTLUTID = 4; #[doc = "Reflection-Green LUT."] #[doc = ""] - pub const GPU_LUT_RG: GPU_LIGHTLUTID = 5; #[doc = "Reflection-Red LUT."] #[doc = ""] - pub const GPU_LUT_RR: GPU_LIGHTLUTID = 6; #[doc = "Distance attenuation LUT."] #[doc = ""] - pub const GPU_LUT_DA: GPU_LIGHTLUTID = 7; #[doc = "LUT IDs."] #[doc = ""] - pub type GPU_LIGHTLUTID = ::libc::c_uint; #[doc = "Normal*HalfVector"] #[doc = ""] - pub const GPU_LUTINPUT_NH: GPU_LIGHTLUTINPUT = 0; #[doc = "View*HalfVector"] #[doc = ""] - pub const GPU_LUTINPUT_VH: GPU_LIGHTLUTINPUT = 1; #[doc = "Normal*View"] #[doc = ""] - pub const GPU_LUTINPUT_NV: GPU_LIGHTLUTINPUT = 2; #[doc = "LightVector*Normal"] #[doc = ""] - pub const GPU_LUTINPUT_LN: GPU_LIGHTLUTINPUT = 3; #[doc = "-LightVector*SpotlightVector"] #[doc = ""] - pub const GPU_LUTINPUT_SP: GPU_LIGHTLUTINPUT = 4; #[doc = "cosine of phi"] #[doc = ""] - pub const GPU_LUTINPUT_CP: GPU_LIGHTLUTINPUT = 5; #[doc = "LUT inputs."] #[doc = ""] - pub type GPU_LIGHTLUTINPUT = ::libc::c_uint; #[doc = "1x scale."] #[doc = ""] - pub const GPU_LUTSCALER_1x: GPU_LIGHTLUTSCALER = 0; #[doc = "2x scale."] #[doc = ""] - pub const GPU_LUTSCALER_2x: GPU_LIGHTLUTSCALER = 1; #[doc = "4x scale."] #[doc = ""] - pub const GPU_LUTSCALER_4x: GPU_LIGHTLUTSCALER = 2; #[doc = "8x scale."] #[doc = ""] - pub const GPU_LUTSCALER_8x: GPU_LIGHTLUTSCALER = 3; #[doc = "0.25x scale."] #[doc = ""] - pub const GPU_LUTSCALER_0_25x: GPU_LIGHTLUTSCALER = 6; #[doc = "0.5x scale."] #[doc = ""] - pub const GPU_LUTSCALER_0_5x: GPU_LIGHTLUTSCALER = 7; #[doc = "LUT scalers."] #[doc = ""] - pub type GPU_LIGHTLUTSCALER = ::libc::c_uint; #[doc = "LUTs that are common to all lights."] #[doc = ""] - pub const GPU_LUTSELECT_COMMON: GPU_LIGHTLUTSELECT = 0; #[doc = "Spotlight LUT."] #[doc = ""] - pub const GPU_LUTSELECT_SP: GPU_LIGHTLUTSELECT = 1; #[doc = "Distance attenuation LUT."] #[doc = ""] - pub const GPU_LUTSELECT_DA: GPU_LIGHTLUTSELECT = 2; #[doc = "LUT selection."] #[doc = ""] - pub type GPU_LIGHTLUTSELECT = ::libc::c_uint; #[doc = "Fog/Gas unit disabled."] #[doc = ""] - pub const GPU_NO_FOG: GPU_FOGMODE = 0; #[doc = "Fog/Gas unit configured in Fog mode."] #[doc = ""] - pub const GPU_FOG: GPU_FOGMODE = 5; #[doc = "Fog/Gas unit configured in Gas mode."] #[doc = ""] - pub const GPU_GAS: GPU_FOGMODE = 7; #[doc = "Fog modes."] #[doc = ""] - pub type GPU_FOGMODE = ::libc::c_uint; #[doc = "Plain density."] #[doc = ""] - pub const GPU_PLAIN_DENSITY: GPU_GASMODE = 0; #[doc = "Depth density."] #[doc = ""] - pub const GPU_DEPTH_DENSITY: GPU_GASMODE = 1; #[doc = "Gas shading density source values."] #[doc = ""] - pub type GPU_GASMODE = ::libc::c_uint; #[doc = "Gas density used as input."] #[doc = ""] - pub const GPU_GAS_DENSITY: GPU_GASLUTINPUT = 0; #[doc = "Light factor used as input."] #[doc = ""] - pub const GPU_GAS_LIGHT_FACTOR: GPU_GASLUTINPUT = 1; #[doc = "Gas color LUT inputs."] #[doc = ""] - pub type GPU_GASLUTINPUT = ::libc::c_uint; #[doc = "Triangles."] #[doc = ""] - pub const GPU_TRIANGLES: GPU_Primitive_t = 0; #[doc = "Triangle strip."] #[doc = ""] - pub const GPU_TRIANGLE_STRIP: GPU_Primitive_t = 256; #[doc = "Triangle fan."] #[doc = ""] - pub const GPU_TRIANGLE_FAN: GPU_Primitive_t = 512; #[doc = "Geometry shader primitive."] #[doc = ""] - pub const GPU_GEOMETRY_PRIM: GPU_Primitive_t = 768; #[doc = "Supported primitives."] #[doc = ""] - pub type GPU_Primitive_t = ::libc::c_uint; #[doc = "Vertex shader."] #[doc = ""] - pub const GPU_VERTEX_SHADER: GPU_SHADER_TYPE = 0; #[doc = "Geometry shader."] #[doc = ""] - pub const GPU_GEOMETRY_SHADER: GPU_SHADER_TYPE = 1; #[doc = "Shader types."] #[doc = ""] - pub type GPU_SHADER_TYPE = ::libc::c_uint; extern "C" { -#[doc = "GPU command buffer."] -#[doc = ""] - + #[doc = "GPU command buffer."] + #[doc = ""] pub static mut gpuCmdBuf: *mut u32_; } extern "C" { -#[doc = "GPU command buffer size."] -#[doc = ""] - + #[doc = "GPU command buffer size."] + #[doc = ""] pub static mut gpuCmdBufSize: u32_; } extern "C" { -#[doc = "GPU command buffer offset."] -#[doc = ""] - + #[doc = "GPU command buffer offset."] + #[doc = ""] pub static mut gpuCmdBufOffset: u32_; } extern "C" { -#[doc = "Adds raw GPU commands to the current command buffer."] -#[doc = "# Arguments"] -#[doc = "`cmd` - Buffer containing commands to add."] -#[doc = "`size` - Size of the buffer."] -#[doc = ""] - + #[doc = "Adds raw GPU commands to the current command buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `cmd` - Buffer containing commands to add."] + #[doc = "* `size` - Size of the buffer."] + #[doc = ""] pub fn GPUCMD_AddRawCommands(cmd: *const u32_, size: u32_); } extern "C" { -#[doc = "Adds a GPU command to the current command buffer."] -#[doc = "# Arguments"] -#[doc = "`header` - Header of the command."] -#[doc = "`param` - Parameters of the command."] -#[doc = "`paramlength` - Size of the parameter buffer."] -#[doc = ""] - + #[doc = "Adds a GPU command to the current command buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `header` - Header of the command."] + #[doc = "* `param` - Parameters of the command."] + #[doc = "* `paramlength` - Size of the parameter buffer."] + #[doc = ""] pub fn GPUCMD_Add(header: u32_, param: *const u32_, paramlength: u32_); } extern "C" { -#[doc = "Splits the current GPU command buffer."] -#[doc = "# Arguments"] -#[doc = "`addr` - Pointer to output the command buffer to."] -#[doc = "`size` - Pointer to output the size (in words) of the command buffer to."] -#[doc = ""] - + #[doc = "Splits the current GPU command buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `addr` - Pointer to output the command buffer to."] + #[doc = "* `size` - Pointer to output the size (in words) of the command buffer to."] + #[doc = ""] pub fn GPUCMD_Split(addr: *mut *mut u32_, size: *mut u32_); } extern "C" { -#[doc = "Converts a 32-bit float to a 16-bit float."] -#[doc = "Returns:"] -#[doc = "The converted float."] -#[doc = "# Arguments"] -#[doc = "`f` - Float to convert."] -#[doc = ""] - + #[doc = "Converts a 32-bit float to a 16-bit float."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof16(f: f32) -> u32_; } extern "C" { -#[doc = "Converts a 32-bit float to a 20-bit float."] -#[doc = "Returns:"] -#[doc = "The converted float."] -#[doc = "# Arguments"] -#[doc = "`f` - Float to convert."] -#[doc = ""] - + #[doc = "Converts a 32-bit float to a 20-bit float."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof20(f: f32) -> u32_; } extern "C" { -#[doc = "Converts a 32-bit float to a 24-bit float."] -#[doc = "Returns:"] -#[doc = "The converted float."] -#[doc = "# Arguments"] -#[doc = "`f` - Float to convert."] -#[doc = ""] - + #[doc = "Converts a 32-bit float to a 24-bit float."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof24(f: f32) -> u32_; } extern "C" { -#[doc = "Converts a 32-bit float to a 31-bit float."] -#[doc = "Returns:"] -#[doc = "The converted float."] -#[doc = "# Arguments"] -#[doc = "`f` - Float to convert."] -#[doc = ""] - + #[doc = "Converts a 32-bit float to a 31-bit float."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The converted float."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `f` - Float to convert."] + #[doc = ""] pub fn f32tof31(f: f32) -> u32_; } #[doc = "Vertex shader."] #[doc = ""] - pub const VERTEX_SHDR: DVLE_type = 0; #[doc = "Geometry shader."] #[doc = ""] - pub const GEOMETRY_SHDR: DVLE_type = 1; #[doc = "DVLE type."] #[doc = ""] - pub type DVLE_type = ::libc::c_uint; #[doc = "Bool."] #[doc = ""] - pub const DVLE_CONST_BOOL: DVLE_constantType = 0; #[doc = "Unsigned 8-bit integer."] #[doc = ""] - pub const DVLE_CONST_u8: DVLE_constantType = 1; #[doc = "24-bit float."] #[doc = ""] - pub const DVLE_CONST_FLOAT24: DVLE_constantType = 2; #[doc = "Constant type."] #[doc = ""] - pub type DVLE_constantType = ::libc::c_uint; #[doc = "Position."] #[doc = ""] - pub const RESULT_POSITION: DVLE_outputAttribute_t = 0; #[doc = "Normal Quaternion."] #[doc = ""] - pub const RESULT_NORMALQUAT: DVLE_outputAttribute_t = 1; #[doc = "Color."] #[doc = ""] - pub const RESULT_COLOR: DVLE_outputAttribute_t = 2; #[doc = "Texture coordinate 0."] #[doc = ""] - pub const RESULT_TEXCOORD0: DVLE_outputAttribute_t = 3; #[doc = "Texture coordinate 0 W."] #[doc = ""] - pub const RESULT_TEXCOORD0W: DVLE_outputAttribute_t = 4; #[doc = "Texture coordinate 1."] #[doc = ""] - pub const RESULT_TEXCOORD1: DVLE_outputAttribute_t = 5; #[doc = "Texture coordinate 2."] #[doc = ""] - pub const RESULT_TEXCOORD2: DVLE_outputAttribute_t = 6; #[doc = "View."] #[doc = ""] - pub const RESULT_VIEW: DVLE_outputAttribute_t = 8; #[doc = "Dummy attribute (used as passthrough for geometry shader input)."] #[doc = ""] - pub const RESULT_DUMMY: DVLE_outputAttribute_t = 9; #[doc = "Output attribute."] #[doc = ""] - pub type DVLE_outputAttribute_t = ::libc::c_uint; #[doc = "Point processing mode."] #[doc = ""] - pub const GSH_POINT: DVLE_geoShaderMode = 0; #[doc = "Variable-size primitive processing mode."] #[doc = ""] - pub const GSH_VARIABLE_PRIM: DVLE_geoShaderMode = 1; #[doc = "Fixed-size primitive processing mode."] #[doc = ""] - pub const GSH_FIXED_PRIM: DVLE_geoShaderMode = 2; #[doc = "Geometry shader operation modes."] #[doc = ""] - pub type DVLE_geoShaderMode = ::libc::c_uint; #[doc = "DVLP data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLP_s { -#[doc = "Code size."] -#[doc = ""] - + #[doc = "Code size."] + #[doc = ""] pub codeSize: u32_, -#[doc = "Code data."] -#[doc = ""] - + #[doc = "Code data."] + #[doc = ""] pub codeData: *mut u32_, -#[doc = "Operand description size."] -#[doc = ""] - + #[doc = "Operand description size."] + #[doc = ""] pub opdescSize: u32_, -#[doc = "Operand description data."] -#[doc = ""] - + #[doc = "Operand description data."] + #[doc = ""] pub opcdescData: *mut u32_, } impl Default for DVLP_s { @@ -27456,150 +26952,116 @@ impl Default for DVLP_s { } #[doc = "DVLE constant entry data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_constEntry_s { -#[doc = "Constant type. See [`DVLE_constantType`]"] -#[doc = ""] - + #[doc = "Constant type. See [`DVLE_constantType`]"] + #[doc = ""] pub type_: u16_, -#[doc = "Constant ID."] -#[doc = ""] - + #[doc = "Constant ID."] + #[doc = ""] pub id: u16_, -#[doc = "Constant data."] -#[doc = ""] - + #[doc = "Constant data."] + #[doc = ""] pub data: [u32_; 4usize], } #[doc = "DVLE output entry data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_outEntry_s { -#[doc = "Output type. See [`DVLE_outputAttribute_t`]"] -#[doc = ""] - + #[doc = "Output type. See [`DVLE_outputAttribute_t`]"] + #[doc = ""] pub type_: u16_, -#[doc = "Output register ID."] -#[doc = ""] - + #[doc = "Output register ID."] + #[doc = ""] pub regID: u16_, -#[doc = "Output mask."] -#[doc = ""] - + #[doc = "Output mask."] + #[doc = ""] pub mask: u8_, -#[doc = "Unknown."] -#[doc = ""] - + #[doc = "Unknown."] + #[doc = ""] pub unk: [u8_; 3usize], } #[doc = "DVLE uniform entry data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct DVLE_uniformEntry_s { -#[doc = "Symbol offset."] -#[doc = ""] - + #[doc = "Symbol offset."] + #[doc = ""] pub symbolOffset: u32_, -#[doc = "Start register."] -#[doc = ""] - + #[doc = "Start register."] + #[doc = ""] pub startReg: u16_, -#[doc = "End register."] -#[doc = ""] - + #[doc = "End register."] + #[doc = ""] pub endReg: u16_, } #[doc = "DVLE data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLE_s { -#[doc = "DVLE type."] -#[doc = ""] - + #[doc = "DVLE type."] + #[doc = ""] pub type_: DVLE_type, -#[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] -#[doc = ""] - + #[doc = "true = merge vertex/geometry shader outmaps ('dummy' output attribute is present)."] + #[doc = ""] pub mergeOutmaps: bool, -#[doc = "Geometry shader operation mode."] -#[doc = ""] - + #[doc = "Geometry shader operation mode."] + #[doc = ""] pub gshMode: DVLE_geoShaderMode, -#[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] -#[doc = ""] - + #[doc = "Starting float uniform register number for storing the fixed-size primitive vertex array."] + #[doc = ""] pub gshFixedVtxStart: u8_, -#[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] -#[doc = ""] - + #[doc = "Number of fully-defined vertices in the variable-size primitive vertex array."] + #[doc = ""] pub gshVariableVtxNum: u8_, -#[doc = "Number of vertices in the fixed-size primitive vertex array."] -#[doc = ""] - + #[doc = "Number of vertices in the fixed-size primitive vertex array."] + #[doc = ""] pub gshFixedVtxNum: u8_, -#[doc = "Contained DVLPs."] -#[doc = ""] - + #[doc = "Contained DVLPs."] + #[doc = ""] pub dvlp: *mut DVLP_s, -#[doc = "Offset of the start of the main function."] -#[doc = ""] - + #[doc = "Offset of the start of the main function."] + #[doc = ""] pub mainOffset: u32_, -#[doc = "Offset of the end of the main function."] -#[doc = ""] - + #[doc = "Offset of the end of the main function."] + #[doc = ""] pub endmainOffset: u32_, -#[doc = "Constant table size."] -#[doc = ""] - + #[doc = "Constant table size."] + #[doc = ""] pub constTableSize: u32_, -#[doc = "Constant table data."] -#[doc = ""] - + #[doc = "Constant table data."] + #[doc = ""] pub constTableData: *mut DVLE_constEntry_s, -#[doc = "Output table size."] -#[doc = ""] - + #[doc = "Output table size."] + #[doc = ""] pub outTableSize: u32_, -#[doc = "Output table data."] -#[doc = ""] - + #[doc = "Output table data."] + #[doc = ""] pub outTableData: *mut DVLE_outEntry_s, -#[doc = "Uniform table size."] -#[doc = ""] - + #[doc = "Uniform table size."] + #[doc = ""] pub uniformTableSize: u32_, -#[doc = "Uniform table data."] -#[doc = ""] - + #[doc = "Uniform table data."] + #[doc = ""] pub uniformTableData: *mut DVLE_uniformEntry_s, -#[doc = "Symbol table data."] -#[doc = ""] - + #[doc = "Symbol table data."] + #[doc = ""] pub symbolTableData: *mut ::libc::c_char, -#[doc = "Output map mask."] -#[doc = ""] - + #[doc = "Output map mask."] + #[doc = ""] pub outmapMask: u8_, -#[doc = "Output map data."] -#[doc = ""] - + #[doc = "Output map data."] + #[doc = ""] pub outmapData: [u32_; 8usize], -#[doc = "Output map mode."] -#[doc = ""] - + #[doc = "Output map mode."] + #[doc = ""] pub outmapMode: u32_, -#[doc = "Output map attribute clock."] -#[doc = ""] - + #[doc = "Output map attribute clock."] + #[doc = ""] pub outmapClock: u32_, } impl Default for DVLE_s { @@ -27613,21 +27075,17 @@ impl Default for DVLE_s { } #[doc = "DVLB data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DVLB_s { -#[doc = "DVLE count."] -#[doc = ""] - + #[doc = "DVLE count."] + #[doc = ""] pub numDVLE: u32_, -#[doc = "Primary DVLP."] -#[doc = ""] - + #[doc = "Primary DVLP."] + #[doc = ""] pub DVLP: DVLP_s, -#[doc = "Contained DVLE."] -#[doc = ""] - + #[doc = "Contained DVLE."] + #[doc = ""] pub DVLE: *mut DVLE_s, } impl Default for DVLB_s { @@ -27640,91 +27098,88 @@ impl Default for DVLB_s { } } extern "C" { -#[doc = "Parses a shader binary."] -#[doc = "Returns:"] -#[doc = "The parsed shader binary."] -#[doc = "# Arguments"] -#[doc = "`shbinData` - Shader binary data."] -#[doc = "`shbinSize` - Shader binary size."] -#[doc = ""] - + #[doc = "Parses a shader binary."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The parsed shader binary."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `shbinData` - Shader binary data."] + #[doc = "* `shbinSize` - Shader binary size."] + #[doc = ""] pub fn DVLB_ParseFile(shbinData: *mut u32_, shbinSize: u32_) -> *mut DVLB_s; } extern "C" { -#[doc = "Frees shader binary data."] -#[doc = "# Arguments"] -#[doc = "`dvlb` - DVLB to free."] -#[doc = ""] - + #[doc = "Frees shader binary data."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dvlb` - DVLB to free."] + #[doc = ""] pub fn DVLB_Free(dvlb: *mut DVLB_s); } extern "C" { -#[doc = "Gets a uniform register index from a shader."] -#[doc = "Returns:"] -#[doc = "The uniform register index."] -#[doc = "# Arguments"] -#[doc = "`dvle` - Shader to get the register from."] -#[doc = "`name` - Name of the register."] -#[doc = ""] - + #[doc = "Gets a uniform register index from a shader."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The uniform register index."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dvle` - Shader to get the register from."] + #[doc = "* `name` - Name of the register."] + #[doc = ""] pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const ::libc::c_char) -> s8; } extern "C" { -#[doc = "Generates a shader output map."] -#[doc = "# Arguments"] -#[doc = "`dvle` - Shader to generate an output map for."] -#[doc = ""] - + #[doc = "Generates a shader output map."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `dvle` - Shader to generate an output map for."] + #[doc = ""] pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s); } #[doc = "24-bit float uniforms."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct float24Uniform_s { -#[doc = "Uniform ID."] -#[doc = ""] - + #[doc = "Uniform ID."] + #[doc = ""] pub id: u32_, -#[doc = "Uniform data."] -#[doc = ""] - + #[doc = "Uniform data."] + #[doc = ""] pub data: [u32_; 3usize], } #[doc = "Describes an instance of either a vertex or geometry shader."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderInstance_s { -#[doc = "Shader DVLE."] -#[doc = ""] - + #[doc = "Shader DVLE."] + #[doc = ""] pub dvle: *mut DVLE_s, -#[doc = "Boolean uniforms."] -#[doc = ""] - + #[doc = "Boolean uniforms."] + #[doc = ""] pub boolUniforms: u16_, -#[doc = "Used boolean uniform mask."] -#[doc = ""] - + #[doc = "Used boolean uniform mask."] + #[doc = ""] pub boolUniformMask: u16_, -#[doc = "Integer uniforms."] -#[doc = ""] - + #[doc = "Integer uniforms."] + #[doc = ""] pub intUniforms: [u32_; 4usize], -#[doc = "24-bit float uniforms."] -#[doc = ""] - + #[doc = "24-bit float uniforms."] + #[doc = ""] pub float24Uniforms: *mut float24Uniform_s, -#[doc = "Used integer uniform mask."] -#[doc = ""] - + #[doc = "Used integer uniform mask."] + #[doc = ""] pub intUniformMask: u8_, -#[doc = "Float uniform count."] -#[doc = ""] - + #[doc = "Float uniform count."] + #[doc = ""] pub numFloat24Uniforms: u8_, } impl Default for shaderInstance_s { @@ -27738,25 +27193,20 @@ impl Default for shaderInstance_s { } #[doc = "Describes an instance of a full shader program."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct shaderProgram_s { -#[doc = "Vertex shader."] -#[doc = ""] - + #[doc = "Vertex shader."] + #[doc = ""] pub vertexShader: *mut shaderInstance_s, -#[doc = "Geometry shader."] -#[doc = ""] - + #[doc = "Geometry shader."] + #[doc = ""] pub geometryShader: *mut shaderInstance_s, -#[doc = "Geometry shader input permutation."] -#[doc = ""] - + #[doc = "Geometry shader input permutation."] + #[doc = ""] pub geoShaderInputPermutation: [u32_; 2usize], -#[doc = "Geometry shader input stride."] -#[doc = ""] - + #[doc = "Geometry shader input stride."] + #[doc = ""] pub geoShaderInputStride: u8_, } impl Default for shaderProgram_s { @@ -27770,32 +27220,35 @@ impl Default for shaderProgram_s { } extern "C" { #[must_use] -#[doc = "Initializes a shader instance."] -#[doc = "# Arguments"] -#[doc = "`si` - Shader instance to initialize."] -#[doc = "`dvle` - DVLE to initialize the shader instance with."] -#[doc = ""] - + #[doc = "Initializes a shader instance."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to initialize."] + #[doc = "* `dvle` - DVLE to initialize the shader instance with."] + #[doc = ""] pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] -#[doc = "Frees a shader instance."] -#[doc = "# Arguments"] -#[doc = "`si` - Shader instance to free."] -#[doc = ""] - + #[doc = "Frees a shader instance."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to free."] + #[doc = ""] pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { #[must_use] -#[doc = "Sets a bool uniform of a shader."] -#[doc = "# Arguments"] -#[doc = "`si` - Shader instance to use."] -#[doc = "`id` - ID of the bool uniform."] -#[doc = "`value` - Value to set."] -#[doc = ""] - + #[doc = "Sets a bool uniform of a shader."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to use."] + #[doc = "* `id` - ID of the bool uniform."] + #[doc = "* `value` - Value to set."] + #[doc = ""] pub fn shaderInstanceSetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -27804,13 +27257,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Gets a bool uniform of a shader."] -#[doc = "# Arguments"] -#[doc = "`si` - Shader instance to use."] -#[doc = "`id` - ID of the bool uniform."] -#[doc = "`value` - Pointer to output the value to."] -#[doc = ""] - + #[doc = "Gets a bool uniform of a shader."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to use."] + #[doc = "* `id` - ID of the bool uniform."] + #[doc = "* `value` - Pointer to output the value to."] + #[doc = ""] pub fn shaderInstanceGetBool( si: *mut shaderInstance_s, id: ::libc::c_int, @@ -27818,12 +27272,13 @@ extern "C" { ) -> Result; } extern "C" { -#[doc = "Gets the location of a shader's uniform."] -#[doc = "# Arguments"] -#[doc = "`si` - Shader instance to use."] -#[doc = "`name` - Name of the uniform."] -#[doc = ""] - + #[doc = "Gets the location of a shader's uniform."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `si` - Shader instance to use."] + #[doc = "* `name` - Name of the uniform."] + #[doc = ""] pub fn shaderInstanceGetUniformLocation( si: *mut shaderInstance_s, name: *const ::libc::c_char, @@ -27831,51 +27286,56 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes a shader program."] -#[doc = "# Arguments"] -#[doc = "`sp` - Shader program to initialize."] -#[doc = ""] - + #[doc = "Initializes a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to initialize."] + #[doc = ""] pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] -#[doc = "Frees a shader program."] -#[doc = "# Arguments"] -#[doc = "`sp` - Shader program to free."] -#[doc = ""] - + #[doc = "Frees a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to free."] + #[doc = ""] pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the vertex shader of a shader program."] -#[doc = "# Arguments"] -#[doc = "`sp` - Shader program to use."] -#[doc = "`dvle` - Vertex shader to set."] -#[doc = ""] - + #[doc = "Sets the vertex shader of a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `dvle` - Vertex shader to set."] + #[doc = ""] pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result; } extern "C" { #[must_use] -#[doc = "Sets the geometry shader of a shader program."] -#[doc = "# Arguments"] -#[doc = "`sp` - Shader program to use."] -#[doc = "`dvle` - Geometry shader to set."] -#[doc = "`stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] -#[doc = ""] - + #[doc = "Sets the geometry shader of a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `dvle` - Geometry shader to set."] + #[doc = "* `stride` - Input stride of the shader (pass 0 to match the number of outputs of the vertex shader)."] + #[doc = ""] pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result; } extern "C" { #[must_use] -#[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] -#[doc = "# Arguments"] -#[doc = "`sp` - Shader program to use."] -#[doc = "`permutation` - Attribute permutation to use."] -#[doc = ""] - + #[doc = "Configures the permutation of the input attributes of the geometry shader of a shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `permutation` - Attribute permutation to use."] + #[doc = ""] pub fn shaderProgramSetGshInputPermutation( sp: *mut shaderProgram_s, permutation: u64_, @@ -27883,13 +27343,14 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Configures the shader units to use the specified shader program."] -#[doc = "# Arguments"] -#[doc = "`sp` - Shader program to use."] -#[doc = "`sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] -#[doc = "`sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] -#[doc = ""] - + #[doc = "Configures the shader units to use the specified shader program."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = "* `sendVshCode` - When true, the vertex shader's code and operand descriptors are uploaded."] + #[doc = "* `sendGshCode` - When true, the geometry shader's code and operand descriptors are uploaded."] + #[doc = ""] pub fn shaderProgramConfigure( sp: *mut shaderProgram_s, sendVshCode: bool, @@ -27898,160 +27359,135 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] -#[doc = "# Arguments"] -#[doc = "`sp` - Shader program to use."] -#[doc = ""] - + #[doc = "Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `sp` - Shader program to use."] + #[doc = ""] pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result; } #[doc = "Mono sound"] #[doc = ""] - pub const NDSP_OUTPUT_MONO: ndspOutputMode = 0; #[doc = "Stereo sound"] #[doc = ""] - pub const NDSP_OUTPUT_STEREO: ndspOutputMode = 1; #[doc = "3D Surround sound"] #[doc = ""] - pub const NDSP_OUTPUT_SURROUND: ndspOutputMode = 2; #[doc = "# Data types"] +#[doc = ""] #[doc = "Sound output modes."] #[doc = ""] - pub type ndspOutputMode = ::libc::c_uint; - +#[doc = "\"Normal\" clipping mode (?)"] +#[doc = ""] pub const NDSP_CLIP_NORMAL: ndspClippingMode = 0; - +#[doc = "\"Soft\" clipping mode (?)"] +#[doc = ""] pub const NDSP_CLIP_SOFT: ndspClippingMode = 1; pub type ndspClippingMode = ::libc::c_uint; #[doc = "; #[doc = "Auxiliary output callback function. (data = User provided data, nsamples = Number of samples, samples = Sample data)"] #[doc = ""] - pub type ndspAuxCallback = ::core::option::Option< unsafe extern "C" fn( data: *mut ::libc::c_void, @@ -28089,15 +27523,17 @@ pub type ndspAuxCallback = ::core::option::Option< ), >; extern "C" { -#[doc = "# Initialization and basic operations"] -#[doc = "Sets up the DSP component."] -#[doc = "# Arguments"] -#[doc = "`binary` - DSP binary to load."] -#[doc = "`size` - Size of the DSP binary."] -#[doc = "`progMask` - Program RAM block mask to load the binary to."] -#[doc = "`dataMask` - Data RAM block mask to load the binary to."] -#[doc = ""] - + #[doc = "# Initialization and basic operations"] + #[doc = ""] + #[doc = "Sets up the DSP component."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `binary` - DSP binary to load."] + #[doc = "* `size` - Size of the DSP binary."] + #[doc = "* `progMask` - Program RAM block mask to load the binary to."] + #[doc = "* `dataMask` - Data RAM block mask to load the binary to."] + #[doc = ""] pub fn ndspUseComponent( binary: *const ::libc::c_void, size: u32_, @@ -28107,144 +27543,160 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Initializes NDSP."] -#[doc = ""] - + #[doc = "Initializes NDSP."] + #[doc = ""] pub fn ndspInit() -> Result; } extern "C" { -#[doc = "Exits NDSP."] -#[doc = ""] - + #[doc = "Exits NDSP."] + #[doc = ""] pub fn ndspExit(); } extern "C" { -#[doc = "Gets the number of dropped sound frames."] -#[doc = "Returns:"] -#[doc = "The number of dropped sound frames."] -#[doc = ""] - + #[doc = "Gets the number of dropped sound frames."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The number of dropped sound frames."] + #[doc = ""] pub fn ndspGetDroppedFrames() -> u32_; } extern "C" { -#[doc = "Gets the total sound frame count."] -#[doc = "Returns:"] -#[doc = "The total sound frame count."] -#[doc = ""] - + #[doc = "Gets the total sound frame count."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The total sound frame count."] + #[doc = ""] pub fn ndspGetFrameCount() -> u32_; } extern "C" { -#[doc = "# General parameters"] -#[doc = "Sets the master volume."] -#[doc = "# Arguments"] -#[doc = "`volume` - Volume to set. Defaults to 1.0f."] -#[doc = ""] - + #[doc = "# General parameters"] + #[doc = ""] + #[doc = "Sets the master volume."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `volume` - Volume to set. Defaults to 1.0f."] + #[doc = ""] pub fn ndspSetMasterVol(volume: f32); } extern "C" { -#[doc = "Sets the output mode."] -#[doc = "# Arguments"] -#[doc = "`mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] -#[doc = ""] - + #[doc = "Sets the output mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Output mode to set. Defaults to NDSP_OUTPUT_STEREO."] + #[doc = ""] pub fn ndspSetOutputMode(mode: ndspOutputMode); } extern "C" { -#[doc = "Sets the clipping mode."] -#[doc = "# Arguments"] -#[doc = "`mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] -#[doc = ""] - + #[doc = "Sets the clipping mode."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `mode` - Clipping mode to set. Defaults to NDSP_CLIP_SOFT."] + #[doc = ""] pub fn ndspSetClippingMode(mode: ndspClippingMode); } extern "C" { -#[doc = "Sets the output count."] -#[doc = "# Arguments"] -#[doc = "`count` - Output count to set. Defaults to 2."] -#[doc = ""] - + #[doc = "Sets the output count."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `count` - Output count to set. Defaults to 2."] + #[doc = ""] pub fn ndspSetOutputCount(count: ::libc::c_int); } extern "C" { -#[doc = "Sets the wave buffer to capture audio to."] -#[doc = "# Arguments"] -#[doc = "`capture` - Wave buffer to capture to."] -#[doc = ""] - + #[doc = "Sets the wave buffer to capture audio to."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `capture` - Wave buffer to capture to."] + #[doc = ""] pub fn ndspSetCapture(capture: *mut ndspWaveBuf); } extern "C" { -#[doc = "Sets the sound frame callback."] -#[doc = "# Arguments"] -#[doc = "`callback` - Callback to set."] -#[doc = "`data` - User-defined data to pass to the callback."] -#[doc = ""] - + #[doc = "Sets the sound frame callback."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `callback` - Callback to set."] + #[doc = "* `data` - User-defined data to pass to the callback."] + #[doc = ""] pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void); } extern "C" { -#[doc = "# Surround"] -#[doc = "Sets the surround sound depth."] -#[doc = "# Arguments"] -#[doc = "`depth` - Depth to set. Defaults to 0x7FFF."] -#[doc = ""] - + #[doc = "# Surround"] + #[doc = ""] + #[doc = "Sets the surround sound depth."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `depth` - Depth to set. Defaults to 0x7FFF."] + #[doc = ""] pub fn ndspSurroundSetDepth(depth: u16_); } extern "C" { -#[doc = "Sets the surround sound position."] -#[doc = "# Arguments"] -#[doc = "`pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] -#[doc = ""] - + #[doc = "Sets the surround sound position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `pos` - Position to set. Defaults to NDSP_SPKPOS_SQUARE."] + #[doc = ""] pub fn ndspSurroundSetPos(pos: ndspSpeakerPos); } extern "C" { -#[doc = "Sets the surround sound rear ratio."] -#[doc = "# Arguments"] -#[doc = "`ratio` - Rear ratio to set. Defaults to 0x8000."] -#[doc = ""] - + #[doc = "Sets the surround sound rear ratio."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `ratio` - Rear ratio to set. Defaults to 0x8000."] + #[doc = ""] pub fn ndspSurroundSetRearRatio(ratio: u16_); } extern "C" { -#[doc = "# Auxiliary output"] -#[doc = "Configures whether an auxiliary output is enabled."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the auxiliary output."] -#[doc = "`enable` - Whether to enable the auxiliary output."] -#[doc = ""] - + #[doc = "# Auxiliary output"] + #[doc = ""] + #[doc = "Configures whether an auxiliary output is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `enable` - Whether to enable the auxiliary output."] + #[doc = ""] pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { -#[doc = "Configures whether an auxiliary output should use front bypass."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the auxiliary output."] -#[doc = "`bypass` - Whether to use front bypass."] -#[doc = ""] - + #[doc = "Configures whether an auxiliary output should use front bypass."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `bypass` - Whether to use front bypass."] + #[doc = ""] pub fn ndspAuxSetFrontBypass(id: ::libc::c_int, bypass: bool); } extern "C" { -#[doc = "Sets the volume of an auxiliary output."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the auxiliary output."] -#[doc = "`volume` - Volume to set."] -#[doc = ""] - + #[doc = "Sets the volume of an auxiliary output."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `volume` - Volume to set."] + #[doc = ""] pub fn ndspAuxSetVolume(id: ::libc::c_int, volume: f32); } extern "C" { -#[doc = "Sets the callback of an auxiliary output."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the auxiliary output."] -#[doc = "`callback` - Callback to set."] -#[doc = "`data` - User-defined data to pass to the callback."] -#[doc = ""] - + #[doc = "Sets the callback of an auxiliary output."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the auxiliary output."] + #[doc = "* `callback` - Callback to set."] + #[doc = "* `data` - User-defined data to pass to the callback."] + #[doc = ""] pub fn ndspAuxSetCallback( id: ::libc::c_int, callback: ndspAuxCallback, @@ -28254,254 +27706,267 @@ extern "C" { #[doc = "PCM8"] #[doc = ""] - pub const NDSP_ENCODING_PCM8: _bindgen_ty_30 = 0; #[doc = "PCM16"] #[doc = ""] - pub const NDSP_ENCODING_PCM16: _bindgen_ty_30 = 1; #[doc = "DSPADPCM (GameCube format)"] #[doc = ""] - pub const NDSP_ENCODING_ADPCM: _bindgen_ty_30 = 2; #[doc = "# Data types"] +#[doc = ""] #[doc = "Supported sample encodings."] #[doc = ""] - pub type _bindgen_ty_30 = ::libc::c_uint; #[doc = "Buffer contains Mono PCM8."] #[doc = ""] - pub const NDSP_FORMAT_MONO_PCM8: _bindgen_ty_31 = 1; #[doc = "Buffer contains Mono PCM16."] #[doc = ""] - pub const NDSP_FORMAT_MONO_PCM16: _bindgen_ty_31 = 5; #[doc = "Buffer contains Mono ADPCM."] #[doc = ""] - pub const NDSP_FORMAT_MONO_ADPCM: _bindgen_ty_31 = 9; #[doc = "Buffer contains Stereo PCM8."] #[doc = ""] - pub const NDSP_FORMAT_STEREO_PCM8: _bindgen_ty_31 = 2; #[doc = "Buffer contains Stereo PCM16."] #[doc = ""] - pub const NDSP_FORMAT_STEREO_PCM16: _bindgen_ty_31 = 6; #[doc = "(Alias) Buffer contains Mono PCM8."] #[doc = ""] - pub const NDSP_FORMAT_PCM8: _bindgen_ty_31 = 1; #[doc = "(Alias) Buffer contains Mono PCM16."] #[doc = ""] - pub const NDSP_FORMAT_PCM16: _bindgen_ty_31 = 5; #[doc = "(Alias) Buffer contains Mono ADPCM."] #[doc = ""] - pub const NDSP_FORMAT_ADPCM: _bindgen_ty_31 = 9; #[doc = "Front bypass."] #[doc = ""] - pub const NDSP_FRONT_BYPASS: _bindgen_ty_31 = 16; #[doc = "(?) Unknown, under research"] #[doc = ""] - pub const NDSP_3D_SURROUND_PREPROCESSED: _bindgen_ty_31 = 64; #[doc = "Channel format flags for use with ndspChnSetFormat."] #[doc = ""] - pub type _bindgen_ty_31 = ::libc::c_uint; #[doc = "Polyphase interpolation"] #[doc = ""] - pub const NDSP_INTERP_POLYPHASE: ndspInterpType = 0; #[doc = "Linear interpolation"] #[doc = ""] - pub const NDSP_INTERP_LINEAR: ndspInterpType = 1; #[doc = "No interpolation"] #[doc = ""] - pub const NDSP_INTERP_NONE: ndspInterpType = 2; #[doc = "Interpolation types."] #[doc = ""] - pub type ndspInterpType = ::libc::c_uint; extern "C" { -#[doc = "# Basic channel operation"] -#[doc = "Resets a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "# Basic channel operation"] + #[doc = ""] + #[doc = "Resets a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnReset(id: ::libc::c_int); } extern "C" { -#[doc = "Initializes the parameters of a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "Initializes the parameters of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnInitParams(id: ::libc::c_int); } extern "C" { -#[doc = "Checks whether a channel is currently playing."] -#[doc = "Returns:"] -#[doc = "Whether the channel is currently playing."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "Checks whether a channel is currently playing."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether the channel is currently playing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool; } extern "C" { -#[doc = "Gets the current sample position of a channel."] -#[doc = "Returns:"] -#[doc = "The channel's sample position."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "Gets the current sample position of a channel."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The channel's sample position."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32_; } extern "C" { -#[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] -#[doc = "Returns:"] -#[doc = "The sequence ID of the wave buffer."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "Gets the sequence ID of the wave buffer that is currently playing in a channel."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The sequence ID of the wave buffer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16_; } extern "C" { -#[doc = "Checks whether a channel is currently paused."] -#[doc = "Returns:"] -#[doc = "Whether the channel is currently paused."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "Checks whether a channel is currently paused."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Whether the channel is currently paused."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool; } extern "C" { -#[doc = "Sets the pause status of a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`paused` - Whether the channel is to be paused (true) or unpaused (false)."] -#[doc = ""] - + #[doc = "Sets the pause status of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `paused` - Whether the channel is to be paused (true) or unpaused (false)."] + #[doc = ""] pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool); } extern "C" { -#[doc = "# Configuration"] -#[doc = "Sets the format of a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`format` - Format to use."] -#[doc = ""] - + #[doc = "# Configuration"] + #[doc = ""] + #[doc = "Sets the format of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `format` - Format to use."] + #[doc = ""] pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16_); } extern "C" { -#[doc = "Sets the interpolation type of a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`type` - Interpolation type to use."] -#[doc = ""] - + #[doc = "Sets the interpolation type of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `type` - Interpolation type to use."] + #[doc = ""] pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType); } extern "C" { -#[doc = "Sets the sample rate of a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`rate` - Sample rate to use."] -#[doc = ""] - + #[doc = "Sets the sample rate of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `rate` - Sample rate to use."] + #[doc = ""] pub fn ndspChnSetRate(id: ::libc::c_int, rate: f32); } extern "C" { -#[doc = "Sets the mix parameters (volumes) of a channel."] -#[doc = "- 0: Front left volume."] -#[doc = "- 1: Front right volume."] -#[doc = "- 2: Back left volume:"] -#[doc = "- 3: Back right volume:"] -#[doc = "- 4..7: Same as 0..3, but for auxiliary output 0."] -#[doc = "- 8..11: Same as 0..3, but for auxiliary output 1."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`mix` - Mix parameters to use. Working hypothesis:"] -#[doc = ""] - + #[doc = "Sets the mix parameters (volumes) of a channel."] + #[doc = ""] + #[doc = "- 0: Front left volume."] + #[doc = "- 1: Front right volume."] + #[doc = "- 2: Back left volume:"] + #[doc = "- 3: Back right volume:"] + #[doc = "- 4..7: Same as 0..3, but for auxiliary output 0."] + #[doc = "- 8..11: Same as 0..3, but for auxiliary output 1."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `mix` - Mix parameters to use. Working hypothesis:"] + #[doc = ""] pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32); } extern "C" { -#[doc = "Sets the DSPADPCM coefficients of a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`coefs` - DSPADPCM coefficients to use."] -#[doc = ""] - + #[doc = "Sets the DSPADPCM coefficients of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `coefs` - DSPADPCM coefficients to use."] + #[doc = ""] pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16_); } extern "C" { -#[doc = "# Wave buffers"] -#[doc = "Clears the wave buffer queue of a channel and stops playback."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "# Wave buffers"] + #[doc = ""] + #[doc = "Clears the wave buffer queue of a channel and stops playback."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnWaveBufClear(id: ::libc::c_int); } extern "C" { -#[doc = "Adds a wave buffer to the wave buffer queue of a channel."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`buf` - Wave buffer to add."] -#[doc = "# Notes"] -#[doc = "If the channel's wave buffer queue was empty before the use of this function, playback is started."] -#[doc = ""] - + #[doc = "Adds a wave buffer to the wave buffer queue of a channel."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `buf` - Wave buffer to add."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* If the channel's wave buffer queue was empty before the use of this function, playback is started."] + #[doc = ""] pub fn ndspChnWaveBufAdd(id: ::libc::c_int, buf: *mut ndspWaveBuf); } extern "C" { -#[doc = "# IIR filters"] -#[doc = "Configures whether the IIR monopole filter of a channel is enabled."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`enable` - Whether to enable the IIR monopole filter."] -#[doc = ""] - + #[doc = "# IIR filters"] + #[doc = ""] + #[doc = "Configures whether the IIR monopole filter of a channel is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `enable` - Whether to enable the IIR monopole filter."] + #[doc = ""] pub fn ndspChnIirMonoSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { -#[doc = "Manually sets up the parameters on monopole filter"] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`enable` - Whether to enable the IIR monopole filter."] -#[doc = ""] - + #[doc = "Manually sets up the parameters on monopole filter"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `enable` - Whether to enable the IIR monopole filter."] + #[doc = ""] pub fn ndspChnIirMonoSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -28510,38 +27975,42 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`f0` - Low pass cut-off frequency."] -#[doc = ""] - + #[doc = "Sets the monopole to be a low pass filter. (Note: This is a lower-quality filter than the biquad one.)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Low pass cut-off frequency."] + #[doc = ""] pub fn ndspChnIirMonoSetParamsLowPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { -#[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`f0` - High pass cut-off frequency."] -#[doc = ""] - + #[doc = "Sets the monopole to be a high pass filter. (Note: This is a lower-quality filter than the biquad one.)"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - High pass cut-off frequency."] + #[doc = ""] pub fn ndspChnIirMonoSetParamsHighPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { -#[doc = "Configures whether the IIR biquad filter of a channel is enabled."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`enable` - Whether to enable the IIR biquad filter."] -#[doc = ""] - + #[doc = "Configures whether the IIR biquad filter of a channel is enabled."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `enable` - Whether to enable the IIR biquad filter."] + #[doc = ""] pub fn ndspChnIirBiquadSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { -#[doc = "Manually sets up the parameters of the biquad filter"] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = ""] - + #[doc = "Manually sets up the parameters of the biquad filter"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsCustomFilter( id: ::libc::c_int, a0: f32, @@ -28553,54 +28022,59 @@ extern "C" { ) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a low pass filter."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`f0` - Low pass cut-off frequency."] -#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] -#[doc = ""] - + #[doc = "Sets the biquad to be a low pass filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Low pass cut-off frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a high pass filter."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`f0` - High pass cut-off frequency."] -#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] -#[doc = ""] - + #[doc = "Sets the biquad to be a high pass filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - High pass cut-off frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a band pass filter."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`f0` - Mid-frequency."] -#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] -#[doc = ""] - + #[doc = "Sets the biquad to be a band pass filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Mid-frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a notch filter."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`f0` - Notch frequency."] -#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] -#[doc = ""] - + #[doc = "Sets the biquad to be a notch filter."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Notch frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsNotchFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { -#[doc = "Sets the biquad to be a peaking equalizer."] -#[doc = "# Arguments"] -#[doc = "`id` - ID of the channel (0..23)."] -#[doc = "`f0` - Central frequency."] -#[doc = "`Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] -#[doc = "`gain` - Amount of gain (raw value = 10 ^ dB/40)"] -#[doc = ""] - + #[doc = "Sets the biquad to be a peaking equalizer."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `id` - ID of the channel (0..23)."] + #[doc = "* `f0` - Central frequency."] + #[doc = "* `Q` - \"Quality factor\", typically should be sqrt(2)/2 (i.e. 0.7071)."] + #[doc = "* `gain` - Amount of gain (raw value = 10 ^ dB/40)"] + #[doc = ""] pub fn ndspChnIirBiquadSetParamsPeakingEqualizer( id: ::libc::c_int, f0: f32, @@ -28611,311 +28085,249 @@ extern "C" { #[doc = "Normal keyboard with several pages (QWERTY/accents/symbol/mobile)"] #[doc = ""] - pub const SWKBD_TYPE_NORMAL: SwkbdType = 0; #[doc = "QWERTY keyboard only."] #[doc = ""] - pub const SWKBD_TYPE_QWERTY: SwkbdType = 1; #[doc = "Number pad."] #[doc = ""] - pub const SWKBD_TYPE_NUMPAD: SwkbdType = 2; #[doc = "On JPN systems, a text keyboard without Japanese input capabilities, otherwise same as SWKBD_TYPE_NORMAL."] #[doc = ""] - pub const SWKBD_TYPE_WESTERN: SwkbdType = 3; #[doc = "Keyboard types."] #[doc = ""] - pub type SwkbdType = ::libc::c_uint; #[doc = "All inputs are accepted."] #[doc = ""] - pub const SWKBD_ANYTHING: SwkbdValidInput = 0; #[doc = "Empty inputs are not accepted."] #[doc = ""] - pub const SWKBD_NOTEMPTY: SwkbdValidInput = 1; #[doc = "Empty or blank inputs (consisting solely of whitespace) are not accepted."] #[doc = ""] - pub const SWKBD_NOTEMPTY_NOTBLANK: SwkbdValidInput = 2; pub const SWKBD_NOTBLANK_NOTEMPTY: SwkbdValidInput = 2; #[doc = "Blank inputs (consisting solely of whitespace) are not accepted, but empty inputs are."] #[doc = ""] - pub const SWKBD_NOTBLANK: SwkbdValidInput = 3; #[doc = "The input must have a fixed length (specified by maxTextLength in swkbdInit)."] #[doc = ""] - pub const SWKBD_FIXEDLEN: SwkbdValidInput = 4; #[doc = "Accepted input types."] #[doc = ""] - pub type SwkbdValidInput = ::libc::c_uint; #[doc = "Left button (usually Cancel)"] #[doc = ""] - pub const SWKBD_BUTTON_LEFT: SwkbdButton = 0; #[doc = "Middle button (usually I Forgot)"] #[doc = ""] - pub const SWKBD_BUTTON_MIDDLE: SwkbdButton = 1; #[doc = "Right button (usually OK)"] #[doc = ""] - pub const SWKBD_BUTTON_RIGHT: SwkbdButton = 2; pub const SWKBD_BUTTON_CONFIRM: SwkbdButton = 2; #[doc = "No button (returned by swkbdInputText in special cases)"] #[doc = ""] - pub const SWKBD_BUTTON_NONE: SwkbdButton = 3; #[doc = "Keyboard dialog buttons."] #[doc = ""] - pub type SwkbdButton = ::libc::c_uint; #[doc = "Characters are not concealed."] #[doc = ""] - pub const SWKBD_PASSWORD_NONE: SwkbdPasswordMode = 0; #[doc = "Characters are concealed immediately."] #[doc = ""] - pub const SWKBD_PASSWORD_HIDE: SwkbdPasswordMode = 1; #[doc = "Characters are concealed a second after they've been typed."] #[doc = ""] - pub const SWKBD_PASSWORD_HIDE_DELAY: SwkbdPasswordMode = 2; #[doc = "Keyboard password modes."] #[doc = ""] - pub type SwkbdPasswordMode = ::libc::c_uint; #[doc = "Disallow the use of more than a certain number of digits (0 or more)"] #[doc = ""] - pub const SWKBD_FILTER_DIGITS: _bindgen_ty_32 = 1; #[doc = "Disallow the use of the @ sign."] #[doc = ""] - pub const SWKBD_FILTER_AT: _bindgen_ty_32 = 2; #[doc = "Disallow the use of the % sign."] #[doc = ""] - pub const SWKBD_FILTER_PERCENT: _bindgen_ty_32 = 4; #[doc = "Disallow the use of the \\ sign."] #[doc = ""] - pub const SWKBD_FILTER_BACKSLASH: _bindgen_ty_32 = 8; #[doc = "Disallow profanity using Nintendo's profanity filter."] #[doc = ""] - pub const SWKBD_FILTER_PROFANITY: _bindgen_ty_32 = 16; #[doc = "Use a callback in order to check the input."] #[doc = ""] - pub const SWKBD_FILTER_CALLBACK: _bindgen_ty_32 = 32; #[doc = "Keyboard input filtering flags."] #[doc = ""] - pub type _bindgen_ty_32 = ::libc::c_uint; #[doc = "Parental PIN mode."] #[doc = ""] - pub const SWKBD_PARENTAL: _bindgen_ty_33 = 1; #[doc = "Darken the top screen when the keyboard is shown."] #[doc = ""] - pub const SWKBD_DARKEN_TOP_SCREEN: _bindgen_ty_33 = 2; #[doc = "Enable predictive input (necessary for Kanji input in JPN systems)."] #[doc = ""] - pub const SWKBD_PREDICTIVE_INPUT: _bindgen_ty_33 = 4; #[doc = "Enable multiline input."] #[doc = ""] - pub const SWKBD_MULTILINE: _bindgen_ty_33 = 8; #[doc = "Enable fixed-width mode."] #[doc = ""] - pub const SWKBD_FIXED_WIDTH: _bindgen_ty_33 = 16; #[doc = "Allow the usage of the HOME button."] #[doc = ""] - pub const SWKBD_ALLOW_HOME: _bindgen_ty_33 = 32; #[doc = "Allow the usage of a software-reset combination."] #[doc = ""] - pub const SWKBD_ALLOW_RESET: _bindgen_ty_33 = 64; #[doc = "Allow the usage of the POWER button."] #[doc = ""] - pub const SWKBD_ALLOW_POWER: _bindgen_ty_33 = 128; #[doc = "Default to the QWERTY page when the keyboard is shown."] #[doc = ""] - pub const SWKBD_DEFAULT_QWERTY: _bindgen_ty_33 = 512; #[doc = "Keyboard features."] #[doc = ""] - pub type _bindgen_ty_33 = ::libc::c_uint; #[doc = "Specifies that the input is valid."] #[doc = ""] - pub const SWKBD_CALLBACK_OK: SwkbdCallbackResult = 0; #[doc = "Displays an error message, then closes the keyboard."] #[doc = ""] - pub const SWKBD_CALLBACK_CLOSE: SwkbdCallbackResult = 1; #[doc = "Displays an error message and continues displaying the keyboard."] #[doc = ""] - pub const SWKBD_CALLBACK_CONTINUE: SwkbdCallbackResult = 2; #[doc = "Keyboard filter callback return values."] #[doc = ""] - pub type SwkbdCallbackResult = ::libc::c_uint; #[doc = "Dummy/unused."] #[doc = ""] - pub const SWKBD_NONE: SwkbdResult = -1; #[doc = "Invalid parameters to swkbd."] #[doc = ""] - pub const SWKBD_INVALID_INPUT: SwkbdResult = -2; #[doc = "Out of memory."] #[doc = ""] - pub const SWKBD_OUTOFMEM: SwkbdResult = -3; #[doc = "The button was clicked in 1-button dialogs."] #[doc = ""] - pub const SWKBD_D0_CLICK: SwkbdResult = 0; #[doc = "The left button was clicked in 2-button dialogs."] #[doc = ""] - pub const SWKBD_D1_CLICK0: SwkbdResult = 1; #[doc = "The right button was clicked in 2-button dialogs."] #[doc = ""] - pub const SWKBD_D1_CLICK1: SwkbdResult = 2; #[doc = "The left button was clicked in 3-button dialogs."] #[doc = ""] - pub const SWKBD_D2_CLICK0: SwkbdResult = 3; #[doc = "The middle button was clicked in 3-button dialogs."] #[doc = ""] - pub const SWKBD_D2_CLICK1: SwkbdResult = 4; #[doc = "The right button was clicked in 3-button dialogs."] #[doc = ""] - pub const SWKBD_D2_CLICK2: SwkbdResult = 5; #[doc = "The HOME button was pressed."] #[doc = ""] - pub const SWKBD_HOMEPRESSED: SwkbdResult = 10; #[doc = "The soft-reset key combination was pressed."] #[doc = ""] - pub const SWKBD_RESETPRESSED: SwkbdResult = 11; #[doc = "The POWER button was pressed."] #[doc = ""] - pub const SWKBD_POWERPRESSED: SwkbdResult = 12; #[doc = "The parental PIN was verified successfully."] #[doc = ""] - pub const SWKBD_PARENTAL_OK: SwkbdResult = 20; #[doc = "The parental PIN was incorrect."] #[doc = ""] - pub const SWKBD_PARENTAL_FAIL: SwkbdResult = 21; #[doc = "The filter callback returned SWKBD_CALLBACK_CLOSE."] #[doc = ""] - pub const SWKBD_BANNED_INPUT: SwkbdResult = 30; #[doc = "Keyboard return values."] #[doc = ""] - pub type SwkbdResult = ::libc::c_int; #[doc = "Keyboard dictionary word for predictive input."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdDictWord { -#[doc = "Reading of the word (that is, the string that needs to be typed)."] -#[doc = ""] - + #[doc = "Reading of the word (that is, the string that needs to be typed)."] + #[doc = ""] pub reading: [u16_; 41usize], -#[doc = "Spelling of the word."] -#[doc = ""] - + #[doc = "Spelling of the word."] + #[doc = ""] pub word: [u16_; 41usize], -#[doc = "Language the word applies to."] -#[doc = ""] - + #[doc = "Language the word applies to."] + #[doc = ""] pub language: u8_, -#[doc = "Specifies if the word applies to all languages."] -#[doc = ""] - + #[doc = "Specifies if the word applies to all languages."] + #[doc = ""] pub all_languages: bool, } impl Default for SwkbdDictWord { @@ -28930,7 +28342,6 @@ impl Default for SwkbdDictWord { #[doc = "Keyboard filter callback function."] #[doc = ""] - pub type SwkbdCallbackFn = ::core::option::Option< unsafe extern "C" fn( user: *mut ::libc::c_void, @@ -28941,7 +28352,6 @@ pub type SwkbdCallbackFn = ::core::option::Option< >; #[doc = "Keyboard status data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct SwkbdStatusData { @@ -28949,7 +28359,6 @@ pub struct SwkbdStatusData { } #[doc = "Keyboard predictive input learning data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdLearningData { @@ -28966,7 +28375,6 @@ impl Default for SwkbdLearningData { } #[doc = "Internal libctru book-keeping structure for software keyboards."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwkbdExtra { @@ -28988,7 +28396,6 @@ impl Default for SwkbdExtra { } #[doc = "Software keyboard parameter structure, it shouldn't be modified directly."] #[doc = ""] - #[repr(C)] #[derive(Copy, Clone)] pub struct SwkbdState { @@ -29057,14 +28464,15 @@ impl Default for SwkbdState { } } extern "C" { -#[doc = "Initializes software keyboard status."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`type` - Keyboard type."] -#[doc = "`numButtons` - Number of dialog buttons to display (1, 2 or 3)."] -#[doc = "`maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] -#[doc = ""] - + #[doc = "Initializes software keyboard status."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `type` - Keyboard type."] + #[doc = "* `numButtons` - Number of dialog buttons to display (1, 2 or 3)."] + #[doc = "* `maxTextLength` - Maximum number of UTF-16 code units that input text can have (or -1 to let libctru use a big default)."] + #[doc = ""] pub fn swkbdInit( swkbd: *mut SwkbdState, type_: SwkbdType, @@ -29073,32 +28481,35 @@ extern "C" { ); } extern "C" { -#[doc = "Specifies which special features are enabled in a software keyboard."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`features` - Feature bitmask."] -#[doc = ""] - + #[doc = "Specifies which special features are enabled in a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `features` - Feature bitmask."] + #[doc = ""] pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32_); } extern "C" { -#[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`text` - Hint text."] -#[doc = ""] - + #[doc = "Sets the hint text of a software keyboard (that is, the help text that is displayed when the textbox is empty)."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `text` - Hint text."] + #[doc = ""] pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { -#[doc = "Configures a dialog button in a software keyboard."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`button` - Specifies which button to configure."] -#[doc = "`text` - Button text."] -#[doc = "`submit` - Specifies whether pushing the button will submit the text or discard it."] -#[doc = ""] - + #[doc = "Configures a dialog button in a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `button` - Specifies which button to configure."] + #[doc = "* `text` - Button text."] + #[doc = "* `submit` - Specifies whether pushing the button will submit the text or discard it."] + #[doc = ""] pub fn swkbdSetButton( swkbd: *mut SwkbdState, button: SwkbdButton, @@ -29107,22 +28518,24 @@ extern "C" { ); } extern "C" { -#[doc = "Sets the initial text that a software keyboard will display on launch."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`text` - Initial text."] -#[doc = ""] - + #[doc = "Sets the initial text that a software keyboard will display on launch."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `text` - Initial text."] + #[doc = ""] pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { -#[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] -#[doc = "# Arguments"] -#[doc = "`word` - Pointer to dictionary word structure."] -#[doc = "`reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] -#[doc = "`text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] -#[doc = ""] - + #[doc = "Configures a word in a predictive dictionary for use with a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `word` - Pointer to dictionary word structure."] + #[doc = "* `reading` - Reading of the word, that is, the sequence of characters that need to be typed to trigger the word in the predictive input system."] + #[doc = "* `text` - Spelling of the word, that is, the actual characters that will be produced when the user decides to select the word."] + #[doc = ""] pub fn swkbdSetDictWord( word: *mut SwkbdDictWord, reading: *const ::libc::c_char, @@ -29130,13 +28543,14 @@ extern "C" { ); } extern "C" { -#[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`dict` - Pointer to dictionary words."] -#[doc = "`wordCount` - Number of words in the dictionary."] -#[doc = ""] - + #[doc = "Sets the custom word dictionary to be used with the predictive input system of a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `dict` - Pointer to dictionary words."] + #[doc = "* `wordCount` - Number of words in the dictionary."] + #[doc = ""] pub fn swkbdSetDictionary( swkbd: *mut SwkbdState, dict: *const SwkbdDictWord, @@ -29144,14 +28558,15 @@ extern "C" { ); } extern "C" { -#[doc = "Configures software keyboard internal status management."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] -#[doc = "`in` - Specifies whether the data should be read from the structure when the keyboard is launched."] -#[doc = "`out` - Specifies whether the data should be written to the structure when the keyboard is closed."] -#[doc = ""] - + #[doc = "Configures software keyboard internal status management."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `data` - Pointer to internal status structure (can be in, out or both depending on the other parameters)."] + #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] + #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] + #[doc = ""] pub fn swkbdSetStatusData( swkbd: *mut SwkbdState, data: *mut SwkbdStatusData, @@ -29160,14 +28575,15 @@ extern "C" { ); } extern "C" { -#[doc = "Configures software keyboard predictive input learning data management."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] -#[doc = "`in` - Specifies whether the data should be read from the structure when the keyboard is launched."] -#[doc = "`out` - Specifies whether the data should be written to the structure when the keyboard is closed."] -#[doc = ""] - + #[doc = "Configures software keyboard predictive input learning data management."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `data` - Pointer to learning data structure (can be in, out or both depending on the other parameters)."] + #[doc = "* `in` - Specifies whether the data should be read from the structure when the keyboard is launched."] + #[doc = "* `out` - Specifies whether the data should be written to the structure when the keyboard is closed."] + #[doc = ""] pub fn swkbdSetLearningData( swkbd: *mut SwkbdState, data: *mut SwkbdLearningData, @@ -29176,13 +28592,14 @@ extern "C" { ); } extern "C" { -#[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`callback` - Filter callback function."] -#[doc = "`user` - Custom data to be passed to the callback function."] -#[doc = ""] - + #[doc = "Configures a custom function to be used to check the validity of input when it is submitted in a software keyboard."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `callback` - Filter callback function."] + #[doc = "* `user` - Custom data to be passed to the callback function."] + #[doc = ""] pub fn swkbdSetFilterCallback( swkbd: *mut SwkbdState, callback: SwkbdCallbackFn, @@ -29190,15 +28607,18 @@ extern "C" { ); } extern "C" { -#[doc = "Launches a software keyboard in order to input text."] -#[doc = "Returns:"] -#[doc = "The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] -#[doc = "# Arguments"] -#[doc = "`swkbd` - Pointer to swkbd state."] -#[doc = "`buf` - Pointer to output buffer which will hold the inputted text."] -#[doc = "`bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] -#[doc = ""] - + #[doc = "Launches a software keyboard in order to input text."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* The identifier of the dialog button that was pressed, or SWKBD_BUTTON_NONE if a different condition was triggered - in that case use swkbdGetResult to check the condition."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `swkbd` - Pointer to swkbd state."] + #[doc = "* `buf` - Pointer to output buffer which will hold the inputted text."] + #[doc = "* `bufsize` - Maximum number of UTF-8 code units that the buffer can hold (including null terminator)."] + #[doc = ""] pub fn swkbdInputText( swkbd: *mut SwkbdState, buf: *mut ::libc::c_char, @@ -29208,68 +28628,55 @@ extern "C" { #[doc = "checksum` is the same as the one computed from `returnbuf`"] -#[doc = "# Arguments"] -#[doc = "`returnbuf` - Buffer filled by Mii selector applet"] -#[doc = ""] - + #[doc = "Verifies that the Mii data returned from the applet matches its"] + #[doc = ""] + #[doc = "checksum"] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* `true` if `returnbuf->checksum` is the same as the one computed from `returnbuf`"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `returnbuf` - Buffer filled by Mii selector applet"] + #[doc = ""] pub fn miiSelectorChecksumIsValid(returnbuf: *const MiiSelectorReturn) -> bool; } #[doc = "Open directory struct"] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct archive_dir_t { pub magic: u32_, pub fd: Handle, -#[doc = "CTRU handle"] -#[doc = ""] - + #[doc = "CTRU handle"] + #[doc = ""] pub index: ssize_t, -#[doc = "Current entry index"] -#[doc = ""] - + #[doc = "Current entry index"] + #[doc = ""] pub size: size_t, -#[doc = "Current batch size"] -#[doc = ""] - + #[doc = "Current batch size"] + #[doc = ""] pub entry_data: [FS_DirectoryEntry; 32usize], } impl Default for archive_dir_t { @@ -29635,17 +29045,15 @@ impl Default for archive_dir_t { } extern "C" { #[must_use] -#[doc = "Mounts the SD"] -#[doc = ""] - + #[doc = "Mounts the SD"] + #[doc = ""] pub fn archiveMountSdmc() -> Result; } extern "C" { #[must_use] -#[doc = "Mounts and opens an archive as deviceName"] -#[doc = "Returns either an archive open error code, or -1 for generic failure"] -#[doc = ""] - + #[doc = "Mounts and opens an archive as deviceName"] + #[doc = "Returns either an archive open error code, or -1 for generic failure"] + #[doc = ""] pub fn archiveMount( archiveID: FS_ArchiveID, archivePath: FS_Path, @@ -29654,193 +29062,169 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] -#[doc = "Returns -1 if the specified device is not found"] -#[doc = ""] - + #[doc = "Uses FSUSER_ControlArchive with control action ARCHIVE_ACTION_COMMIT_SAVE_DATA on the opened archive. Not done automatically at unmount."] + #[doc = "Returns -1 if the specified device is not found"] + #[doc = ""] pub fn archiveCommitSaveData(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Unmounts the specified device, closing its archive in the process"] -#[doc = "Returns -1 if the specified device was not found"] -#[doc = ""] - + #[doc = "Unmounts the specified device, closing its archive in the process"] + #[doc = "Returns -1 if the specified device was not found"] + #[doc = ""] pub fn archiveUnmount(deviceName: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Unmounts all devices and cleans up any resources used by the driver"] -#[doc = ""] - + #[doc = "Unmounts all devices and cleans up any resources used by the driver"] + #[doc = ""] pub fn archiveUnmountAll() -> Result; } extern "C" { #[must_use] -#[doc = "Get a file's mtime"] -#[doc = ""] - + #[doc = "Get a file's mtime"] + #[doc = ""] pub fn archive_getmtime(name: *const ::libc::c_char, mtime: *mut u64_) -> Result; } #[doc = "RomFS header."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct romfs_header { -#[doc = "Size of the header."] -#[doc = ""] - + #[doc = "Size of the header."] + #[doc = ""] pub headerSize: u32_, -#[doc = "Offset of the directory hash table."] -#[doc = ""] - + #[doc = "Offset of the directory hash table."] + #[doc = ""] pub dirHashTableOff: u32_, -#[doc = "Size of the directory hash table."] -#[doc = ""] - + #[doc = "Size of the directory hash table."] + #[doc = ""] pub dirHashTableSize: u32_, -#[doc = "Offset of the directory table."] -#[doc = ""] - + #[doc = "Offset of the directory table."] + #[doc = ""] pub dirTableOff: u32_, -#[doc = "Size of the directory table."] -#[doc = ""] - + #[doc = "Size of the directory table."] + #[doc = ""] pub dirTableSize: u32_, -#[doc = "Offset of the file hash table."] -#[doc = ""] - + #[doc = "Offset of the file hash table."] + #[doc = ""] pub fileHashTableOff: u32_, -#[doc = "Size of the file hash table."] -#[doc = ""] - + #[doc = "Size of the file hash table."] + #[doc = ""] pub fileHashTableSize: u32_, -#[doc = "Offset of the file table."] -#[doc = ""] - + #[doc = "Offset of the file table."] + #[doc = ""] pub fileTableOff: u32_, -#[doc = "Size of the file table."] -#[doc = ""] - + #[doc = "Size of the file table."] + #[doc = ""] pub fileTableSize: u32_, -#[doc = "Offset of the file data."] -#[doc = ""] - + #[doc = "Offset of the file data."] + #[doc = ""] pub fileDataOff: u32_, } #[doc = "RomFS directory."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default)] pub struct romfs_dir { -#[doc = "Offset of the parent directory."] -#[doc = ""] - + #[doc = "Offset of the parent directory."] + #[doc = ""] pub parent: u32_, -#[doc = "Offset of the next sibling directory."] -#[doc = ""] - + #[doc = "Offset of the next sibling directory."] + #[doc = ""] pub sibling: u32_, -#[doc = "Offset of the first child directory."] -#[doc = ""] - + #[doc = "Offset of the first child directory."] + #[doc = ""] pub childDir: u32_, -#[doc = "Offset of the first file."] -#[doc = ""] - + #[doc = "Offset of the first file."] + #[doc = ""] pub childFile: u32_, -#[doc = "Directory hash table pointer."] -#[doc = ""] - + #[doc = "Directory hash table pointer."] + #[doc = ""] pub nextHash: u32_, -#[doc = "Name length."] -#[doc = ""] - + #[doc = "Name length."] + #[doc = ""] pub nameLen: u32_, -#[doc = "Name. (UTF-16)"] -#[doc = ""] - + #[doc = "Name. (UTF-16)"] + #[doc = ""] pub name: __IncompleteArrayField, } #[doc = "RomFS file."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default)] pub struct romfs_file { -#[doc = "Offset of the parent directory."] -#[doc = ""] - + #[doc = "Offset of the parent directory."] + #[doc = ""] pub parent: u32_, -#[doc = "Offset of the next sibling file."] -#[doc = ""] - + #[doc = "Offset of the next sibling file."] + #[doc = ""] pub sibling: u32_, -#[doc = "Offset of the file's data."] -#[doc = ""] - + #[doc = "Offset of the file's data."] + #[doc = ""] pub dataOff: u64_, -#[doc = "Length of the file's data."] -#[doc = ""] - + #[doc = "Length of the file's data."] + #[doc = ""] pub dataSize: u64_, -#[doc = "File hash table pointer."] -#[doc = ""] - + #[doc = "File hash table pointer."] + #[doc = ""] pub nextHash: u32_, -#[doc = "Name length."] -#[doc = ""] - + #[doc = "Name length."] + #[doc = ""] pub nameLen: u32_, -#[doc = "Name. (UTF-16)"] -#[doc = ""] - + #[doc = "Name. (UTF-16)"] + #[doc = ""] pub name: __IncompleteArrayField, } extern "C" { #[must_use] -#[doc = "Mounts the Application's RomFS."] -#[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] -#[doc = "If on the other hand it's an NCCH, it behaves identically to [`romfsMountFromCurrentProcess`]"] -#[doc = "# Arguments"] -#[doc = "`name` - Device mount name."] -#[doc = "# Notes"] -#[doc = "This function is intended to be used to access one's own RomFS."] -#[doc = ""] - + #[doc = "Mounts the Application's RomFS."] + #[doc = ""] + #[doc = "If the application is running as 3DSX, it mounts the embedded RomFS section inside the 3DSX."] + #[doc = "If on the other hand it's an NCCH, it behaves identically to [`romfsMountFromCurrentProcess`]"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Device mount name."] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* This function is intended to be used to access one's own RomFS."] + #[doc = ""] pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Mounts RomFS from an open file."] -#[doc = "# Arguments"] -#[doc = "`fd` - FSFILE handle of the RomFS image."] -#[doc = "`offset` - Offset of the RomFS within the file."] -#[doc = "`name` - Device mount name."] -#[doc = ""] - + #[doc = "Mounts RomFS from an open file."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `fd` - FSFILE handle of the RomFS image."] + #[doc = "* `offset` - Offset of the RomFS within the file."] + #[doc = "* `name` - Device mount name."] + #[doc = ""] pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Mounts RomFS using the current process host program RomFS."] -#[doc = "# Arguments"] -#[doc = "`name` - Device mount name."] -#[doc = ""] - + #[doc = "Mounts RomFS using the current process host program RomFS."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `name` - Device mount name."] + #[doc = ""] pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result; } extern "C" { #[must_use] -#[doc = "Mounts RomFS from the specified title."] -#[doc = "# Arguments"] -#[doc = "`tid` - Title ID"] -#[doc = "`mediatype` - Mediatype"] -#[doc = "`name` - Device mount name."] -#[doc = ""] - + #[doc = "Mounts RomFS from the specified title."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `tid` - Title ID"] + #[doc = "* `mediatype` - Mediatype"] + #[doc = "* `name` - Device mount name."] + #[doc = ""] pub fn romfsMountFromTitle( tid: u64_, mediatype: FS_MediaType, @@ -29849,83 +29233,65 @@ extern "C" { } extern "C" { #[must_use] -#[doc = "Unmounts the RomFS device."] -#[doc = ""] - + #[doc = "Unmounts the RomFS device."] + #[doc = ""] pub fn romfsUnmount(name: *const ::libc::c_char) -> Result; } #[doc = "Character width information structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct charWidthInfo_s { -#[doc = "Horizontal offset to draw the glyph with."] -#[doc = ""] - + #[doc = "Horizontal offset to draw the glyph with."] + #[doc = ""] pub left: s8, -#[doc = "Width of the glyph."] -#[doc = ""] - + #[doc = "Width of the glyph."] + #[doc = ""] pub glyphWidth: u8_, -#[doc = "Width of the character, that is, horizontal distance to advance."] -#[doc = ""] - + #[doc = "Width of the character, that is, horizontal distance to advance."] + #[doc = ""] pub charWidth: u8_, } #[doc = "Font texture sheet information."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct TGLP_s { -#[doc = "Width of a glyph cell."] -#[doc = ""] - + #[doc = "Width of a glyph cell."] + #[doc = ""] pub cellWidth: u8_, -#[doc = "Height of a glyph cell."] -#[doc = ""] - + #[doc = "Height of a glyph cell."] + #[doc = ""] pub cellHeight: u8_, -#[doc = "Vertical position of the baseline."] -#[doc = ""] - + #[doc = "Vertical position of the baseline."] + #[doc = ""] pub baselinePos: u8_, -#[doc = "Maximum character width."] -#[doc = ""] - + #[doc = "Maximum character width."] + #[doc = ""] pub maxCharWidth: u8_, -#[doc = "Size in bytes of a texture sheet."] -#[doc = ""] - + #[doc = "Size in bytes of a texture sheet."] + #[doc = ""] pub sheetSize: u32_, -#[doc = "Number of texture sheets."] -#[doc = ""] - + #[doc = "Number of texture sheets."] + #[doc = ""] pub nSheets: u16_, -#[doc = "GPU texture format (GPU_TEXCOLOR)."] -#[doc = ""] - + #[doc = "GPU texture format (GPU_TEXCOLOR)."] + #[doc = ""] pub sheetFmt: u16_, -#[doc = "Number of glyphs per row per sheet."] -#[doc = ""] - + #[doc = "Number of glyphs per row per sheet."] + #[doc = ""] pub nRows: u16_, -#[doc = "Number of glyph rows per sheet."] -#[doc = ""] - + #[doc = "Number of glyph rows per sheet."] + #[doc = ""] pub nLines: u16_, -#[doc = "Texture sheet width."] -#[doc = ""] - + #[doc = "Texture sheet width."] + #[doc = ""] pub sheetWidth: u16_, -#[doc = "Texture sheet height."] -#[doc = ""] - + #[doc = "Texture sheet height."] + #[doc = ""] pub sheetHeight: u16_, -#[doc = "Pointer to texture sheet data."] -#[doc = ""] - + #[doc = "Pointer to texture sheet data."] + #[doc = ""] pub sheetData: *mut u8_, } impl Default for TGLP_s { @@ -29940,29 +29306,23 @@ impl Default for TGLP_s { #[doc = "Font character width information block structure."] #[doc = ""] - pub type CWDH_s = tag_CWDH_s; #[doc = "Font character width information block structure."] #[doc = ""] - #[repr(C)] #[derive(Debug)] pub struct tag_CWDH_s { -#[doc = "First Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "First Unicode codepoint the block applies to."] + #[doc = ""] pub startIndex: u16_, -#[doc = "Last Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "Last Unicode codepoint the block applies to."] + #[doc = ""] pub endIndex: u16_, -#[doc = "Pointer to the next block."] -#[doc = ""] - + #[doc = "Pointer to the next block."] + #[doc = ""] pub next: *mut CWDH_s, -#[doc = "Table of character width information structures."] -#[doc = ""] - + #[doc = "Table of character width information structures."] + #[doc = ""] pub widths: __IncompleteArrayField, } impl Default for tag_CWDH_s { @@ -29977,90 +29337,73 @@ impl Default for tag_CWDH_s { #[doc = "Identity mapping."] #[doc = ""] - pub const CMAP_TYPE_DIRECT: _bindgen_ty_36 = 0; #[doc = "Mapping using a table."] #[doc = ""] - pub const CMAP_TYPE_TABLE: _bindgen_ty_36 = 1; #[doc = "Mapping using a list of mapped characters."] #[doc = ""] - pub const CMAP_TYPE_SCAN: _bindgen_ty_36 = 2; #[doc = "Font character map methods."] #[doc = ""] - pub type _bindgen_ty_36 = ::libc::c_uint; #[doc = "Font character map structure."] #[doc = ""] - pub type CMAP_s = tag_CMAP_s; #[doc = "Font character map structure."] #[doc = ""] - #[repr(C)] pub struct tag_CMAP_s { -#[doc = "First Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "First Unicode codepoint the block applies to."] + #[doc = ""] pub codeBegin: u16_, -#[doc = "Last Unicode codepoint the block applies to."] -#[doc = ""] - + #[doc = "Last Unicode codepoint the block applies to."] + #[doc = ""] pub codeEnd: u16_, -#[doc = "Mapping method."] -#[doc = ""] - + #[doc = "Mapping method."] + #[doc = ""] pub mappingMethod: u16_, pub reserved: u16_, -#[doc = "Pointer to the next map."] -#[doc = ""] - + #[doc = "Pointer to the next map."] + #[doc = ""] 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 { -#[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] -#[doc = ""] - + #[doc = "For CMAP_TYPE_DIRECT: index of the first glyph."] + #[doc = ""] pub indexOffset: __BindgenUnionField, -#[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] -#[doc = ""] - + #[doc = "For CMAP_TYPE_TABLE: table of glyph indices."] + #[doc = ""] pub indexTable: __BindgenUnionField<[u16_; 0usize]>, pub __bindgen_anon_1: __BindgenUnionField, pub bindgen_union_field: u16, } #[doc = "For CMAP_TYPE_SCAN: Mapping data."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1 { -#[doc = "Number of pairs."] -#[doc = ""] - + #[doc = "Number of pairs."] + #[doc = ""] pub nScanEntries: u16_, pub scanEntries: __IncompleteArrayField, } #[doc = "Mapping pairs."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { -#[doc = "Unicode codepoint."] -#[doc = ""] - + #[doc = "Unicode codepoint."] + #[doc = ""] pub code: u16_, -#[doc = "Mapped glyph index."] -#[doc = ""] - + #[doc = "Mapped glyph index."] + #[doc = ""] pub glyphIndex: u16_, } impl Default for tag_CMAP_s__bindgen_ty_1 { @@ -30083,61 +29426,47 @@ impl Default for tag_CMAP_s { } #[doc = "Font information structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FINF_s { -#[doc = "Signature (FINF)."] -#[doc = ""] - + #[doc = "Signature (FINF)."] + #[doc = ""] pub signature: u32_, -#[doc = "Section size."] -#[doc = ""] - + #[doc = "Section size."] + #[doc = ""] pub sectionSize: u32_, -#[doc = "Font type"] -#[doc = ""] - + #[doc = "Font type"] + #[doc = ""] pub fontType: u8_, -#[doc = "Line feed vertical distance."] -#[doc = ""] - + #[doc = "Line feed vertical distance."] + #[doc = ""] pub lineFeed: u8_, -#[doc = "Glyph index of the replacement character."] -#[doc = ""] - + #[doc = "Glyph index of the replacement character."] + #[doc = ""] pub alterCharIndex: u16_, -#[doc = "Default character width information."] -#[doc = ""] - + #[doc = "Default character width information."] + #[doc = ""] pub defaultWidth: charWidthInfo_s, -#[doc = "Font encoding (?)"] -#[doc = ""] - + #[doc = "Font encoding (?)"] + #[doc = ""] pub encoding: u8_, -#[doc = "Pointer to texture sheet information."] -#[doc = ""] - + #[doc = "Pointer to texture sheet information."] + #[doc = ""] pub tglp: *mut TGLP_s, -#[doc = "Pointer to the first character width information block."] -#[doc = ""] - + #[doc = "Pointer to the first character width information block."] + #[doc = ""] pub cwdh: *mut CWDH_s, -#[doc = "Pointer to the first character map."] -#[doc = ""] - + #[doc = "Pointer to the first character map."] + #[doc = ""] pub cmap: *mut CMAP_s, -#[doc = "Font height."] -#[doc = ""] - + #[doc = "Font height."] + #[doc = ""] pub height: u8_, -#[doc = "Font width."] -#[doc = ""] - + #[doc = "Font width."] + #[doc = ""] pub width: u8_, -#[doc = "Font ascent."] -#[doc = ""] - + #[doc = "Font ascent."] + #[doc = ""] pub ascent: u8_, pub padding: u8_, } @@ -30152,37 +29481,29 @@ impl Default for FINF_s { } #[doc = "Font structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CFNT_s { -#[doc = "Signature (CFNU)."] -#[doc = ""] - + #[doc = "Signature (CFNU)."] + #[doc = ""] pub signature: u32_, -#[doc = "Endianness constant (0xFEFF)."] -#[doc = ""] - + #[doc = "Endianness constant (0xFEFF)."] + #[doc = ""] pub endianness: u16_, -#[doc = "Header size."] -#[doc = ""] - + #[doc = "Header size."] + #[doc = ""] pub headerSize: u16_, -#[doc = "Format version."] -#[doc = ""] - + #[doc = "Format version."] + #[doc = ""] pub version: u32_, -#[doc = "File size."] -#[doc = ""] - + #[doc = "File size."] + #[doc = ""] pub fileSize: u32_, -#[doc = "Number of blocks."] -#[doc = ""] - + #[doc = "Number of blocks."] + #[doc = ""] pub nBlocks: u32_, -#[doc = "Font information."] -#[doc = ""] - + #[doc = "Font information."] + #[doc = ""] pub finf: FINF_s, } impl Default for CFNT_s { @@ -30196,32 +29517,26 @@ impl Default for CFNT_s { } #[doc = "Font glyph position structure."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s { -#[doc = "Texture sheet index to use to render the glyph."] -#[doc = ""] - + #[doc = "Texture sheet index to use to render the glyph."] + #[doc = ""] pub sheetIndex: ::libc::c_int, -#[doc = "Horizontal offset to draw the glyph width."] -#[doc = ""] - + #[doc = "Horizontal offset to draw the glyph width."] + #[doc = ""] pub xOffset: f32, -#[doc = "Horizontal distance to advance after drawing the glyph."] -#[doc = ""] - + #[doc = "Horizontal distance to advance after drawing the glyph."] + #[doc = ""] pub xAdvance: f32, -#[doc = "Glyph width."] -#[doc = ""] - + #[doc = "Glyph width."] + #[doc = ""] pub width: f32, pub texcoord: fontGlyphPos_s__bindgen_ty_1, pub vtxcoord: fontGlyphPos_s__bindgen_ty_2, } #[doc = "Texture coordinates to use to render the glyph."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_1 { @@ -30232,7 +29547,6 @@ pub struct fontGlyphPos_s__bindgen_ty_1 { } #[doc = "Vertex coordinates to use to render the glyph."] #[doc = ""] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_2 { @@ -30244,72 +29558,73 @@ pub struct fontGlyphPos_s__bindgen_ty_2 { #[doc = "Calculates vertex coordinates in addition to texture coordinates."] #[doc = ""] - pub const GLYPH_POS_CALC_VTXCOORD: _bindgen_ty_37 = 1; #[doc = "Position the glyph at the baseline instead of at the top-left corner."] #[doc = ""] - pub const GLYPH_POS_AT_BASELINE: _bindgen_ty_37 = 2; #[doc = "Indicates that the Y axis points up instead of down."] #[doc = ""] - pub const GLYPH_POS_Y_POINTS_UP: _bindgen_ty_37 = 4; #[doc = "Flags for use with fontCalcGlyphPos."] #[doc = ""] - pub type _bindgen_ty_37 = ::libc::c_uint; extern "C" { #[must_use] -#[doc = "Ensures the shared system font is mapped."] -#[doc = ""] - + #[doc = "Ensures the shared system font is mapped."] + #[doc = ""] pub fn fontEnsureMapped() -> Result; } extern "C" { -#[doc = "Fixes the pointers internal to a just-loaded font"] -#[doc = "# Arguments"] -#[doc = "`font` - Font to fix"] -#[doc = "# Notes"] -#[doc = "Should never be run on the system font, and only once on any other font."] -#[doc = ""] - + #[doc = "Fixes the pointers internal to a just-loaded font"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `font` - Font to fix"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* Should never be run on the system font, and only once on any other font."] + #[doc = ""] pub fn fontFixPointers(font: *mut CFNT_s); } extern "C" { -#[doc = "Retrieves the glyph index of the specified Unicode codepoint."] -#[doc = "# Arguments"] -#[doc = "`font` - Pointer to font structure. If NULL, the shared system font is used."] -#[doc = "`codePoint` - Unicode codepoint."] -#[doc = ""] - + #[doc = "Retrieves the glyph index of the specified Unicode codepoint."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] + #[doc = "* `codePoint` - Unicode codepoint."] + #[doc = ""] pub fn fontGlyphIndexFromCodePoint(font: *mut CFNT_s, codePoint: u32_) -> ::libc::c_int; } extern "C" { -#[doc = "Retrieves character width information of the specified glyph."] -#[doc = "# Arguments"] -#[doc = "`font` - Pointer to font structure. If NULL, the shared system font is used."] -#[doc = "`glyphIndex` - Index of the glyph."] -#[doc = ""] - + #[doc = "Retrieves character width information of the specified glyph."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] + #[doc = "* `glyphIndex` - Index of the glyph."] + #[doc = ""] pub fn fontGetCharWidthInfo( font: *mut CFNT_s, glyphIndex: ::libc::c_int, ) -> *mut charWidthInfo_s; } extern "C" { -#[doc = "Calculates position information for the specified glyph."] -#[doc = "# Arguments"] -#[doc = "`out` - Output structure in which to write the information."] -#[doc = "`font` - Pointer to font structure. If NULL, the shared system font is used."] -#[doc = "`glyphIndex` - Index of the glyph."] -#[doc = "`flags` - Calculation flags (see GLYPH_POS_flags)."] -#[doc = "`scaleX` - Scale factor to apply horizontally."] -#[doc = "`scaleY` - Scale factor to apply vertically."] -#[doc = ""] - + #[doc = "Calculates position information for the specified glyph."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `out` - Output structure in which to write the information."] + #[doc = "* `font` - Pointer to font structure. If NULL, the shared system font is used."] + #[doc = "* `glyphIndex` - Index of the glyph."] + #[doc = "* `flags` - Calculation flags (see GLYPH_POS_* flags)."] + #[doc = "* `scaleX` - Scale factor to apply horizontally."] + #[doc = "* `scaleY` - Scale factor to apply vertically."] + #[doc = ""] pub fn fontCalcGlyphPos( out: *mut fontGlyphPos_s, font: *mut CFNT_s, @@ -30347,21 +29662,25 @@ extern "C" { pub fn gdbHioDevSystem(command: *const ::libc::c_char) -> ::libc::c_int; } extern "C" { -#[doc = "Address of the host connected through 3dslink"] -#[doc = ""] - + #[doc = "Address of the host connected through 3dslink"] + #[doc = ""] pub static mut __3dslink_host: in_addr; } extern "C" { -#[doc = "Connects to the 3dslink host, setting up an output stream."] -#[doc = "Returns:"] -#[doc = "Socket fd on success, negative number on failure."] -#[doc = "# Arguments"] -#[doc = "`redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] -#[doc = "`redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] -#[doc = "# Notes"] -#[doc = "The socket should be closed with close() during application cleanup."] -#[doc = ""] - + #[doc = "Connects to the 3dslink host, setting up an output stream."] + #[doc = ""] + #[doc = "Returns:"] + #[doc = ""] + #[doc = "* Socket fd on success, negative number on failure."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `redirStdout` - Whether to redirect stdout to nxlink output. [Direction: In]"] + #[doc = "* `redirStderr` - Whether to redirect stderr to nxlink output. [Direction: In]"] + #[doc = ""] + #[doc = "# Notes"] + #[doc = ""] + #[doc = "* The socket should be closed with close() during application cleanup."] + #[doc = ""] pub fn link3dsConnectToHost(redirStdout: bool, redirStderr: bool) -> ::libc::c_int; } From 6cf43bd974344a1c56f9c09b0076454c56deebfb Mon Sep 17 00:00:00 2001 From: Meziu <55318903+Meziu@users.noreply.github.com> Date: Wed, 19 Oct 2022 07:30:28 +0200 Subject: [PATCH 22/57] Update manifest with current repo links --- Cargo.toml | 2 +- ctru-rs/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d7694bc..0d8eaac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] members = ["ctru-rs", "ctru-sys", "ctru-sys/docstring-to-rustdoc"] -[patch.'https://github.com/Meziu/ctru-rs'] +[patch.'https://github.com/rust3ds/ctru-rs'] # Make sure all dependencies use the local ctru-sys package ctru-sys = { path = "ctru-sys" } diff --git a/ctru-rs/Cargo.toml b/ctru-rs/Cargo.toml index 3c90be8..e1372e0 100644 --- a/ctru-rs/Cargo.toml +++ b/ctru-rs/Cargo.toml @@ -14,8 +14,8 @@ name = "ctru" cfg-if = "1.0" ctru-sys = { path = "../ctru-sys", version = "0.4" } const-zero = "0.1.0" -linker-fix-3ds = { git = "https://github.com/Meziu/rust-linker-fix-3ds.git" } -pthread-3ds = { git = "https://github.com/Meziu/pthread-3ds.git" } +linker-fix-3ds = { git = "https://github.com/rust3ds/rust-linker-fix-3ds.git" } +pthread-3ds = { git = "https://github.com/rust3ds/pthread-3ds.git" } libc = "0.2.121" bitflags = "1.0.0" widestring = "0.2.2" From fad7cd95b34eedd3d1e12e8c7d9f18580f7020a4 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Wed, 19 Oct 2022 07:43:50 +0200 Subject: [PATCH 23/57] Fixed dependencies --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 96ceecb..9722c7c 100644 --- a/README.md +++ b/README.md @@ -37,4 +37,3 @@ applies to every file in the tree, unless otherwise noted. Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses. See [LICENSE-APACHE](https://github.com/rust-lang/rust/blob/master/LICENSE-APACHE), [LICENSE-MIT](https://github.com/rust-lang/rust/blob/master/LICENSE-MIT), and [COPYRIGHT](https://github.com/rust-lang/rust/blob/master/COPYRIGHT) for details. - From 088ff85cff51fe0b88c31b4fd99aab7f6760eb05 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Thu, 20 Oct 2022 17:40:48 +0200 Subject: [PATCH 24/57] use ``ctru_sys::Result`` instead of ``i32`` --- ctru-rs/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 3a702a4..650ab7a 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -9,7 +9,7 @@ pub type Result = ::std::result::Result; #[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord)] #[repr(transparent)] -pub(crate) struct ResultCode(pub i32); +pub(crate) struct ResultCode(pub ctru_sys::Result); impl Try for ResultCode { type Output = (); From 32db2c6dbe2ad594fc84c5ba4be666bf08338fd3 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Thu, 20 Oct 2022 21:28:54 +0200 Subject: [PATCH 25/57] Initial mii selector implementation --- ctru-rs/src/applets/mii_selector.rs | 166 ++++++++++++++++++++++++++++ ctru-rs/src/applets/mod.rs | 1 + 2 files changed, 167 insertions(+) create mode 100644 ctru-rs/src/applets/mii_selector.rs diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs new file mode 100644 index 0000000..a54729a --- /dev/null +++ b/ctru-rs/src/applets/mii_selector.rs @@ -0,0 +1,166 @@ +use std::ffi::{CString}; +use bitflags::bitflags; + +#[derive(Debug, Clone)] +pub enum MiiConfigIndex { + Index(u32), + All, +} + +#[derive(Debug, Clone)] +pub enum MiiType { + Guest { + index: u32, + name: String, + }, + User, +} + +bitflags! { + pub struct Options: u32 { + const MII_SELECTOR_CANCEL = ctru_sys::MIISELECTOR_CANCEL; + const MII_SELECTOR_GUESTS = ctru_sys::MIISELECTOR_GUESTS; + const MII_SELECTOR_TOP = ctru_sys::MIISELECTOR_TOP; + const MII_SELECTOR_GUEST_START = ctru_sys::MIISELECTOR_GUESTSTART; + } +} + +pub struct MiiSelector { + config: Box, +} + +pub struct MiiSelectorReturn { + raw_return: Box, + pub is_mii_selected: bool, + pub mii_type: MiiType, + pub checksum: u16, +} + +impl MiiSelector { + pub fn init() -> Self { + let mut config = Box::::default(); + unsafe { ctru_sys::miiSelectorInit(config.as_mut()); } + Self { config } + } + + pub fn set_title(&mut self, text: &str) { + // This can only fail if the text contains NUL bytes in the string... which seems + // unlikely and is documented + let c_text = CString::new(text).expect("Cstring::new failed"); + unsafe { ctru_sys::miiSelectorSetTitle(self.config.as_mut(), c_text.as_ptr()); } + } + + pub fn set_options(&mut self, options: Options) { + unsafe { ctru_sys::miiSelectorSetOptions(self.config.as_mut(), options.bits) } + } + + pub fn whitelist_guest_mii(&mut self, mii_index: MiiConfigIndex) { + match mii_index { + MiiConfigIndex::Index(i) => { + unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), i) } + } + MiiConfigIndex::All => { + unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), ctru_sys::MIISELECTOR_GUESTMII_SLOTS) } + } + } + } + + pub fn blacklist_guest_mii(&mut self, mii_index: MiiConfigIndex) { + match mii_index { + MiiConfigIndex::Index(i) => { + unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), i) } + } + MiiConfigIndex::All => { + unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), ctru_sys::MIISELECTOR_GUESTMII_SLOTS) } + } + } + } + + pub fn whitelist_user_mii(&mut self, mii_index: MiiConfigIndex) { + match mii_index { + MiiConfigIndex::Index(i) => { + unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), i) } + } + MiiConfigIndex::All => { + unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), ctru_sys::MIISELECTOR_USERMII_SLOTS) } + } + } + } + + pub fn blacklist_user_mii(&mut self, mii_index: MiiConfigIndex) { + match mii_index { + MiiConfigIndex::Index(i) => { + unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), i) } + } + MiiConfigIndex::All => { + unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), ctru_sys::MIISELECTOR_USERMII_SLOTS) } + } + } + } + + // This function is static inline in libctru + // https://github.com/devkitPro/libctru/blob/af5321c78ee5c72a55b526fd2ed0d95ca1c05af9/libctru/include/3ds/applets/miiselector.h#L155 + pub fn set_initial_index(&mut self, index: u32) { + self.config.initial_index = index + } + + pub fn launch(&mut self) -> MiiSelectorReturn { + let mut return_val = Box::::default(); + unsafe { + ctru_sys::miiSelectorLaunch(self.config.as_mut(), return_val.as_mut()) + } + + return_val.into() + } +} + +impl MiiSelectorReturn { + pub fn name(&self) -> String { + let mut tmp = [0u8; 36]; + unsafe { ctru_sys::miiSelectorReturnGetName(self.raw_return.as_ref(), tmp.as_mut_ptr(), 36) } + + let len = unsafe { libc::strlen(tmp.as_ptr()) }; + let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp[..len]) }; + + utf8.to_owned() + } + + pub fn author(&self) -> String { + let mut tmp = [0u8; 30]; + unsafe { ctru_sys::miiSelectorReturnGetName(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) } + let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp) }; + + utf8.to_owned() + } + + pub fn valid_checksum(&self) -> bool { + unsafe { ctru_sys::miiSelectorChecksumIsValid(self.raw_return.as_ref()) } + } +} + +impl From> for MiiSelectorReturn { + fn from(ret: Box) -> Self { + let checksum = ret.checksum; + let no_mii_selected = ret.no_mii_selected; + let guest_mii_index_clone = ret.guest_mii_index; + let mut guest_mii_name = ret.guest_mii_name; + + MiiSelectorReturn { + raw_return: ret, + is_mii_selected: no_mii_selected == 0, + mii_type: if guest_mii_index_clone != 0xFFFFFFFF { + MiiType::Guest { + index: guest_mii_index_clone, + name: { + let utf16_be = &mut guest_mii_name; + utf16_be.reverse(); + String::from_utf16(utf16_be.as_slice()).unwrap() + }, + } + } else { + MiiType::User + }, + checksum, + } + } +} \ No newline at end of file diff --git a/ctru-rs/src/applets/mod.rs b/ctru-rs/src/applets/mod.rs index 73469a3..47eec73 100644 --- a/ctru-rs/src/applets/mod.rs +++ b/ctru-rs/src/applets/mod.rs @@ -1 +1,2 @@ pub mod swkbd; +pub mod mii_selector; \ No newline at end of file From b33411f8ac52ef19770e61fb410ac1f11c330ab1 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Thu, 20 Oct 2022 22:16:58 +0200 Subject: [PATCH 26/57] Fix bug with author and impl ``From`` for ``MiiConfigIndex`` --- ctru-rs/src/applets/mii_selector.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index a54729a..599a480 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -127,8 +127,10 @@ impl MiiSelectorReturn { pub fn author(&self) -> String { let mut tmp = [0u8; 30]; - unsafe { ctru_sys::miiSelectorReturnGetName(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) } - let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp) }; + unsafe { ctru_sys::miiSelectorReturnGetAuthor(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) } + + let len = unsafe { libc::strlen(tmp.as_ptr()) }; + let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp[..len]) }; utf8.to_owned() } @@ -163,4 +165,10 @@ impl From> for MiiSelectorReturn { checksum, } } +} + +impl From for MiiConfigIndex { + fn from(v: u32) -> Self { + Self::Index(v) + } } \ No newline at end of file From 4b435614b4b5f340ae5246f9fe33b042cd3aebb3 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Thu, 20 Oct 2022 22:17:52 +0200 Subject: [PATCH 27/57] Add ``mii_selector`` example --- ctru-rs/examples/mii_selector.rs | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ctru-rs/examples/mii_selector.rs diff --git a/ctru-rs/examples/mii_selector.rs b/ctru-rs/examples/mii_selector.rs new file mode 100644 index 0000000..a9d8779 --- /dev/null +++ b/ctru-rs/examples/mii_selector.rs @@ -0,0 +1,41 @@ +use ctru::applets::mii_selector::MiiSelector; +use ctru::prelude::*; + +fn main() { + ctru::init(); + + let gfx = Gfx::init().expect("Couldn't obtain GFX controller"); + let hid = Hid::init().expect("Couldn't obtain HID controller"); + let apt = Apt::init().expect("Couldn't obtain APT controller"); + let _console = Console::init(gfx.top_screen.borrow_mut()); + + let mut mii_selector = MiiSelector::init(); + mii_selector.set_initial_index(3); + mii_selector.blacklist_user_mii(0.into()); + mii_selector.set_title("Great Mii Selector!"); + + let result = mii_selector.launch(); + + println!("\x1b[0;0HIs Mii selected?: {:?}", result.is_mii_selected); + println!("\x1b[2;0HValid checksum?: {:?}", result.valid_checksum()); + println!("\x1b[4;0HMii type: {:?}", result.mii_type); + println!("\x1b[6;0HMii checksum: {:?}", result.checksum); + println!("\x1b[8;0HName: {:?}", result.name()); + println!("\x1b[12;0HAuthor: {:?}", result.author()); + + // Main loop + while apt.main_loop() { + //Scan all the inputs. This should be done once for each frame + hid.scan_input(); + + if hid.keys_down().contains(KeyPad::KEY_START) { + break; + } + // Flush and swap framebuffers + gfx.flush_buffers(); + gfx.swap_buffers(); + + //Wait for VBlank + gfx.wait_for_vblank(); + } +} \ No newline at end of file From de51d97d1ca5427dc978b05bd8336ca3ee686984 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Thu, 20 Oct 2022 23:13:27 +0200 Subject: [PATCH 28/57] Cargo fmt --- ctru-rs/examples/mii_selector.rs | 2 +- ctru-rs/src/applets/mii_selector.rs | 89 +++++++++++++++++------------ ctru-rs/src/applets/mod.rs | 2 +- 3 files changed, 54 insertions(+), 39 deletions(-) diff --git a/ctru-rs/examples/mii_selector.rs b/ctru-rs/examples/mii_selector.rs index a9d8779..40c774e 100644 --- a/ctru-rs/examples/mii_selector.rs +++ b/ctru-rs/examples/mii_selector.rs @@ -38,4 +38,4 @@ fn main() { //Wait for VBlank gfx.wait_for_vblank(); } -} \ No newline at end of file +} diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index 599a480..634cd88 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -1,5 +1,5 @@ -use std::ffi::{CString}; use bitflags::bitflags; +use std::ffi::CString; #[derive(Debug, Clone)] pub enum MiiConfigIndex { @@ -9,10 +9,7 @@ pub enum MiiConfigIndex { #[derive(Debug, Clone)] pub enum MiiType { - Guest { - index: u32, - name: String, - }, + Guest { index: u32, name: String }, User, } @@ -39,7 +36,9 @@ pub struct MiiSelectorReturn { impl MiiSelector { pub fn init() -> Self { let mut config = Box::::default(); - unsafe { ctru_sys::miiSelectorInit(config.as_mut()); } + unsafe { + ctru_sys::miiSelectorInit(config.as_mut()); + } Self { config } } @@ -47,7 +46,9 @@ impl MiiSelector { // This can only fail if the text contains NUL bytes in the string... which seems // unlikely and is documented let c_text = CString::new(text).expect("Cstring::new failed"); - unsafe { ctru_sys::miiSelectorSetTitle(self.config.as_mut(), c_text.as_ptr()); } + unsafe { + ctru_sys::miiSelectorSetTitle(self.config.as_mut(), c_text.as_ptr()); + } } pub fn set_options(&mut self, options: Options) { @@ -56,45 +57,57 @@ impl MiiSelector { pub fn whitelist_guest_mii(&mut self, mii_index: MiiConfigIndex) { match mii_index { - MiiConfigIndex::Index(i) => { - unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), i) } - } - MiiConfigIndex::All => { - unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), ctru_sys::MIISELECTOR_GUESTMII_SLOTS) } - } + MiiConfigIndex::Index(i) => unsafe { + ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), i) + }, + MiiConfigIndex::All => unsafe { + ctru_sys::miiSelectorWhitelistGuestMii( + self.config.as_mut(), + ctru_sys::MIISELECTOR_GUESTMII_SLOTS, + ) + }, } } pub fn blacklist_guest_mii(&mut self, mii_index: MiiConfigIndex) { match mii_index { - MiiConfigIndex::Index(i) => { - unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), i) } - } - MiiConfigIndex::All => { - unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), ctru_sys::MIISELECTOR_GUESTMII_SLOTS) } - } + MiiConfigIndex::Index(i) => unsafe { + ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), i) + }, + MiiConfigIndex::All => unsafe { + ctru_sys::miiSelectorBlacklistGuestMii( + self.config.as_mut(), + ctru_sys::MIISELECTOR_GUESTMII_SLOTS, + ) + }, } } pub fn whitelist_user_mii(&mut self, mii_index: MiiConfigIndex) { match mii_index { - MiiConfigIndex::Index(i) => { - unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), i) } - } - MiiConfigIndex::All => { - unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), ctru_sys::MIISELECTOR_USERMII_SLOTS) } - } + MiiConfigIndex::Index(i) => unsafe { + ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), i) + }, + MiiConfigIndex::All => unsafe { + ctru_sys::miiSelectorWhitelistUserMii( + self.config.as_mut(), + ctru_sys::MIISELECTOR_USERMII_SLOTS, + ) + }, } } pub fn blacklist_user_mii(&mut self, mii_index: MiiConfigIndex) { match mii_index { - MiiConfigIndex::Index(i) => { - unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), i) } - } - MiiConfigIndex::All => { - unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), ctru_sys::MIISELECTOR_USERMII_SLOTS) } - } + MiiConfigIndex::Index(i) => unsafe { + ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), i) + }, + MiiConfigIndex::All => unsafe { + ctru_sys::miiSelectorBlacklistUserMii( + self.config.as_mut(), + ctru_sys::MIISELECTOR_USERMII_SLOTS, + ) + }, } } @@ -106,9 +119,7 @@ impl MiiSelector { pub fn launch(&mut self) -> MiiSelectorReturn { let mut return_val = Box::::default(); - unsafe { - ctru_sys::miiSelectorLaunch(self.config.as_mut(), return_val.as_mut()) - } + unsafe { ctru_sys::miiSelectorLaunch(self.config.as_mut(), return_val.as_mut()) } return_val.into() } @@ -117,7 +128,9 @@ impl MiiSelector { impl MiiSelectorReturn { pub fn name(&self) -> String { let mut tmp = [0u8; 36]; - unsafe { ctru_sys::miiSelectorReturnGetName(self.raw_return.as_ref(), tmp.as_mut_ptr(), 36) } + unsafe { + ctru_sys::miiSelectorReturnGetName(self.raw_return.as_ref(), tmp.as_mut_ptr(), 36) + } let len = unsafe { libc::strlen(tmp.as_ptr()) }; let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp[..len]) }; @@ -127,7 +140,9 @@ impl MiiSelectorReturn { pub fn author(&self) -> String { let mut tmp = [0u8; 30]; - unsafe { ctru_sys::miiSelectorReturnGetAuthor(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) } + unsafe { + ctru_sys::miiSelectorReturnGetAuthor(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) + } let len = unsafe { libc::strlen(tmp.as_ptr()) }; let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp[..len]) }; @@ -171,4 +186,4 @@ impl From for MiiConfigIndex { fn from(v: u32) -> Self { Self::Index(v) } -} \ No newline at end of file +} diff --git a/ctru-rs/src/applets/mod.rs b/ctru-rs/src/applets/mod.rs index 47eec73..f5813ad 100644 --- a/ctru-rs/src/applets/mod.rs +++ b/ctru-rs/src/applets/mod.rs @@ -1,2 +1,2 @@ +pub mod mii_selector; pub mod swkbd; -pub mod mii_selector; \ No newline at end of file From 3c9bd8f2febb0d94141a1e9db236a01538a25470 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Fri, 21 Oct 2022 19:59:41 +0200 Subject: [PATCH 29/57] Implement MiiData parsing --- ctru-rs/src/applets/mii_selector.rs | 4 + ctru-rs/src/lib.rs | 1 + ctru-rs/src/mii.rs | 435 ++++++++++++++++++++++++++++ 3 files changed, 440 insertions(+) create mode 100644 ctru-rs/src/mii.rs diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index 634cd88..dc88bde 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -1,5 +1,6 @@ use bitflags::bitflags; use std::ffi::CString; +use crate::mii::MiiData; #[derive(Debug, Clone)] pub enum MiiConfigIndex { @@ -28,6 +29,7 @@ pub struct MiiSelector { pub struct MiiSelectorReturn { raw_return: Box, + pub mii_data: MiiData, pub is_mii_selected: bool, pub mii_type: MiiType, pub checksum: u16, @@ -158,12 +160,14 @@ impl MiiSelectorReturn { impl From> for MiiSelectorReturn { fn from(ret: Box) -> Self { let checksum = ret.checksum; + let raw_mii_data = ret.mii._bindgen_opaque_blob.clone(); let no_mii_selected = ret.no_mii_selected; let guest_mii_index_clone = ret.guest_mii_index; let mut guest_mii_name = ret.guest_mii_name; MiiSelectorReturn { raw_return: ret, + mii_data: raw_mii_data.into(), is_mii_selected: no_mii_selected == 0, mii_type: if guest_mii_index_clone != 0xFFFFFFFF { MiiType::Guest { diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index 264d0ef..20282c6 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -78,6 +78,7 @@ pub mod error; pub mod gfx; pub mod prelude; pub mod services; +pub mod mii; cfg_if::cfg_if! { if #[cfg(all(feature = "romfs", romfs_exists))] { diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs new file mode 100644 index 0000000..b211d76 --- /dev/null +++ b/ctru-rs/src/mii.rs @@ -0,0 +1,435 @@ +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum RegionLock { + NoLock, + Japan, + USA, + Europe, +} + +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum Charset { + JapanUSAEurope, + China, + Korea, + Taiwan, +} + +#[derive(Clone, Debug)] +pub struct MiiDataOptions { + pub is_copying_allowed: bool, + pub is_profanity_flag_enabled: bool, + pub region_lock: RegionLock, + pub charset: Charset, +} + +#[derive(Clone, Debug)] +pub struct SelectorPosition { + pub page_index: u8, + pub slot_index: u8, +} + +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum OriginConsole { + ConsoleWii, + ConsoleDSi, + Console3DS, + ConsoleWiiUSwitch +} + +#[derive(Clone, Debug)] +pub struct ConsoleIdentity { + pub origin_console: OriginConsole, +} + +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum MiiSex { + Male, + Female, +} + +#[derive(Clone, Debug)] +pub struct Details { + pub sex: MiiSex, + pub birthday_month: u8, + pub birthday_day: u8, + pub shirt_color: u8, + pub is_favorite: bool, +} + +#[derive(Clone, Debug)] +pub struct FaceStyle { + pub is_sharing_enabled: bool, + pub shape: u8, + pub skin_color: u8, +} + +#[derive(Clone, Debug)] +pub struct FaceDetails { + pub wrinkles: u8, + pub makeup: u8, +} + +#[derive(Clone, Debug)] +pub struct HairDetails { + pub color: u8, + pub is_flipped: bool, +} + +#[derive(Clone, Debug)] +pub struct EyeDetails { + pub style: u8, + pub color: u8, + pub scale: u8, + pub y_scale: u8, + pub rotation: u8, + pub x_spacing: u8, + pub y_position: u8, +} + +#[derive(Clone, Debug)] +pub struct EyebrowDetails { + pub style: u8, + pub color: u8, + pub scale: u8, + pub y_scale: u8, + pub rotation: u8, + pub x_spacing: u8, + pub y_position: u8, +} + +#[derive(Clone, Debug)] +pub struct NoseDetails { + pub style: u8, + pub scale: u8, + pub y_position: u8, +} + +#[derive(Clone, Debug)] +pub struct MouthDetails { + pub style: u8, + pub color: u8, + pub scale: u8, + pub y_scale: u8, +} + +#[derive(Clone, Debug)] +pub struct MustacheDetails { + pub mouth_y_position: u8, + pub mustache_style: u8, +} + +#[derive(Clone, Debug)] +pub struct BeardDetails { + pub style: u8, + pub color: u8, + pub scale: u8, + pub y_position: u8, +} + +#[derive(Clone, Debug)] +pub struct GlassDetails { + pub style: u8, + pub color: u8, + pub scale: u8, + pub y_position: u8, +} + +#[derive(Clone, Debug)] +pub struct MoleDetails { + pub is_enabled: bool, + pub scale: u8, + pub x_position: u8, + pub y_position: u8, +} + +#[derive(Clone, Debug)] +pub struct MiiData { + pub mii_options: MiiDataOptions, + pub mii_selector_position: SelectorPosition, + pub mii_console_identity: ConsoleIdentity, + + pub system_id: [u8; 8], + pub mac_address: [u8; 6], + + pub mii_details: Details, + pub mii_name: String, + + pub height: u8, + pub width: u8, + + pub face_style: FaceStyle, + pub face_details: FaceDetails, + + pub hair_style: u8, + + pub hair_details: HairDetails, + pub eye_details: EyeDetails, + pub eyebrow_details: EyebrowDetails, + pub nose_details: NoseDetails, + pub mouth_details: MouthDetails, + pub mustache_details: MustacheDetails, + pub beard_details: BeardDetails, + pub glass_details: GlassDetails, + pub mole_details: MoleDetails, + + pub author_name: String, +} + +impl From<[u8; 92]> for MiiData { + fn from(raw_mii_data: [u8; 92]) -> Self { + // Source for the representation and what each thing means: https://www.3dbrew.org/wiki/Mii + let raw_options = vec_bit(raw_mii_data[0x1]); + let raw_position = vec_bit(raw_mii_data[0x2]); + let raw_device = vec_bit(raw_mii_data[0x3]); + let system_id = [raw_mii_data[0x4], raw_mii_data[0x5], raw_mii_data[0x6], raw_mii_data[0x7], raw_mii_data[0x8], raw_mii_data[0x9], raw_mii_data[0xA], raw_mii_data[0xB]]; + let creator_mac = [raw_mii_data[0x10], raw_mii_data[0x11], raw_mii_data[0x12], raw_mii_data[0x13], raw_mii_data[0x14], raw_mii_data[0x15]]; + let raw_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x18, 0x19]).try_into().unwrap(); + let raw_utf16_name = &raw_mii_data.as_slice()[0x1A..0x2D]; + let height = raw_mii_data[0x2E]; + let width = raw_mii_data[0x2F]; + let raw_face_style = vec_bit(raw_mii_data[0x30]); + let raw_face_details = vec_bit(raw_mii_data[0x31]); + let hair_style = raw_mii_data[0x32]; + let raw_hair_details = vec_bit(raw_mii_data[0x33]); + let raw_eye_details: [bool; 32] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x34, 0x35, 0x36, 0x37]).try_into().unwrap(); + let raw_eyebrow_details: [bool; 32] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x38, 0x39, 0x3A, 0x3B]).try_into().unwrap(); + let raw_nose_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3C, 0x3D]).try_into().unwrap(); + let raw_mouth_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3E, 0x3F]).try_into().unwrap(); + let raw_mustache_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x40, 0x41]).try_into().unwrap(); + let raw_beard_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x42, 0x42]).try_into().unwrap(); + let raw_glass_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x44, 0x45]).try_into().unwrap(); + let raw_mole_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x46, 0x47]).try_into().unwrap(); + let raw_utf16_author = &raw_mii_data.as_slice()[0x48..0x5C]; + + let mii_name = utf16_byte_pairs_to_string(raw_utf16_name); + let author_name = utf16_byte_pairs_to_string(raw_utf16_author); + + let options = MiiDataOptions { + is_copying_allowed: *raw_options.first().unwrap(), + is_profanity_flag_enabled: *raw_options.get(1).unwrap(), + region_lock: { + let first_bit = raw_options[3]; + let second_bit = raw_options[2]; + if !first_bit && !second_bit { // 0b00 + RegionLock::NoLock + } else if !first_bit && second_bit { // 0b01 + RegionLock::Japan + } else if first_bit && !second_bit { // 0b10 + RegionLock::USA + } else { + RegionLock::Europe + } + }, + charset: { + let first_bit = raw_options[5]; + let second_bit = raw_options[4]; + if !first_bit && !second_bit { // 0b00 + Charset::JapanUSAEurope + } else if !first_bit && second_bit { // 0b01 + Charset::China + } else if first_bit && !second_bit { // 0b10 + Charset::Korea + } else { + Charset::Taiwan + } + }, + }; + + let position = SelectorPosition { + page_index: partial_vec_to_u8_with_reverse(&raw_position[0..3]), + //page_index: vec_bit_to_u8([false, false, false, false, raw_position[3], raw_position[2], raw_position[1], raw_position[0]]), + slot_index: partial_vec_to_u8_with_reverse(&raw_position[4..7]) + }; + + let device = ConsoleIdentity { + origin_console: { + let first_bit = raw_device[6]; + let second_bit = raw_device[5]; + let third_bit = raw_device[4]; + + if !first_bit && !second_bit && third_bit { + OriginConsole::ConsoleWii + } else if !first_bit && second_bit && !third_bit { + OriginConsole::ConsoleDSi + } else if !first_bit && second_bit && third_bit { + OriginConsole::Console3DS + } else { + OriginConsole::ConsoleWiiUSwitch + } + } + }; + + let details = Details { + sex: { + let first_bit = raw_details[0]; + if first_bit { + MiiSex::Female + } else { + MiiSex::Male + } + }, + birthday_month: partial_vec_to_u8_with_reverse(&raw_details[1..4]), + birthday_day: partial_vec_to_u8_with_reverse(&raw_details[5..9]), + shirt_color: partial_vec_to_u8_with_reverse(&raw_details[10..13]), + is_favorite: raw_details[14], + }; + + let face_style = FaceStyle { + is_sharing_enabled: !raw_face_style[1], + shape: partial_vec_to_u8_with_reverse(&raw_face_style[1..4]), + skin_color: partial_vec_to_u8_with_reverse(&raw_face_style[5..7]), + }; + + let face_details = FaceDetails { + wrinkles: partial_vec_to_u8_with_reverse(&raw_face_details[0..3]), + makeup: partial_vec_to_u8_with_reverse(&raw_face_details[4..7]), + }; + + let hair_details = HairDetails { + color: partial_vec_to_u8_with_reverse(&raw_hair_details[0..2]), + is_flipped: raw_hair_details[3], + }; + + let eye_details = EyeDetails { + style: partial_vec_to_u8_with_reverse(&raw_eye_details[0..5]), + color: partial_vec_to_u8_with_reverse(&raw_eye_details[6..8]), + scale: partial_vec_to_u8_with_reverse(&raw_eye_details[9..12]), + y_scale: partial_vec_to_u8_with_reverse(&raw_eye_details[13..15]), + rotation: partial_vec_to_u8_with_reverse(&raw_eye_details[16..20]), + x_spacing: partial_vec_to_u8_with_reverse(&raw_eye_details[21..24]), + y_position: partial_vec_to_u8_with_reverse(&raw_eye_details[25..29]), + }; + + let eyebrow_details = EyebrowDetails { + style: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[0..4]), + color: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[5..7]), + scale: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[8..11]), + y_scale: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[12..14]), + rotation: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[16..19]), + x_spacing: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[21..24]), + y_position: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[25..29]), + }; + + let nose_details = NoseDetails { + style: partial_vec_to_u8_with_reverse(&raw_nose_details[0..4]), + scale: partial_vec_to_u8_with_reverse(&raw_nose_details[5..8]), + y_position: partial_vec_to_u8_with_reverse(&raw_nose_details[9..13]), + }; + + let mouth_details = MouthDetails { + style: partial_vec_to_u8_with_reverse(&raw_mouth_details[0..5]), + color: partial_vec_to_u8_with_reverse(&raw_mouth_details[6..8]), + scale: partial_vec_to_u8_with_reverse(&raw_mouth_details[9..12]), + y_scale: partial_vec_to_u8_with_reverse(&raw_mouth_details[13..15]), + }; + + let mustache_details = MustacheDetails { + mouth_y_position: partial_vec_to_u8_with_reverse(&raw_mustache_details[0..4]), + mustache_style: partial_vec_to_u8_with_reverse(&raw_mustache_details[5..7]), + }; + + let beard_details = BeardDetails { + style: partial_vec_to_u8_with_reverse(&raw_beard_details[0..2]), + color: partial_vec_to_u8_with_reverse(&raw_beard_details[3..5]), + scale: partial_vec_to_u8_with_reverse(&raw_beard_details[6..9]), + y_position: partial_vec_to_u8_with_reverse(&raw_beard_details[10..14]), + }; + + let glass_details = GlassDetails { + style: partial_vec_to_u8_with_reverse(&raw_glass_details[0..3]), + color: partial_vec_to_u8_with_reverse(&raw_glass_details[4..6]), + scale: partial_vec_to_u8_with_reverse(&raw_glass_details[7..10]), + y_position: partial_vec_to_u8_with_reverse(&raw_glass_details[11..15]), + }; + + let mole_details = MoleDetails { + is_enabled: raw_mole_details[0], + scale: partial_vec_to_u8_with_reverse(&raw_mole_details[1..4]), + x_position: partial_vec_to_u8_with_reverse(&raw_mole_details[5..9]), + y_position: partial_vec_to_u8_with_reverse(&raw_mole_details[10..14]), + }; + + MiiData { + mii_options: options, + mii_selector_position: position, + mii_console_identity: device, + system_id, + mac_address: creator_mac, + mii_details: details, + mii_name, + height, + width, + face_style, + face_details, + hair_style, + hair_details, + eye_details, + eyebrow_details, + nose_details, + mouth_details, + mustache_details, + beard_details, + glass_details, + mole_details, + author_name, + } + } +} + +// Methods to handle "_bits_", ``bitvec`` cannot compile to 32-bit targets, so I had to create a few +// helper methods + +/// Transforms a u8 into a [bool; 8] +fn vec_bit(data: u8) -> [bool; 8] { + (0..8) + .map(|i| (data & (1 << i)) != 0) + .collect::>() + .try_into() + .unwrap() +} + +/// Transforms a [bool; 8] into an u8 +fn vec_bit_to_u8(data: [bool; 8]) -> u8 { + let mut result: u8 = 0; + data + .map(|v| if v { 1_u8 } else { 0_u8 }) + .iter() + .for_each(|&bit| { + result <<= 1; + result ^= bit; + }); + result +} + +/// The reverse allows to write things on a more _humane_ way, but return a LE u8 +fn partial_vec_to_u8_with_reverse(data: &[bool]) -> u8 { + let leading_zeroes_to_add = 8 - data.len(); + let leading_zeroes = vec![false; leading_zeroes_to_add]; + let mut val = [data, leading_zeroes.as_slice()].concat(); + val.reverse(); + vec_bit_to_u8(val.try_into().unwrap()) +} + +/// UTF-16 Strings are give in pairs of bytes (u8), this converts them into an _actual_ string +fn utf16_byte_pairs_to_string(data: &[u8]) -> String { + let raw_utf16_composed = data + .chunks(2) + .collect::>() + .iter() + .map(|v| { + u16::from_le_bytes([*v.get(0).unwrap_or(&0), *v.get(1).unwrap_or(&0)]) + }) + .collect::>(); + + String::from_utf16(raw_utf16_composed.as_slice()).unwrap().replace("\0", "") +} + +/// Gets the values from the slice and concatenates them +fn get_and_concat_vec_bit(data: &[u8], get_values: &[usize]) -> Vec { + get_values.iter() + .map(|v| { + vec_bit(data[*v]) + }) + .collect::>() + .concat() +} \ No newline at end of file From e6cc659ba3f7f6285a42c529fe8cffad8ebaab89 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Fri, 21 Oct 2022 20:00:10 +0200 Subject: [PATCH 30/57] Rename Mii Selector example --- ctru-rs/examples/{mii_selector.rs => mii-selector.rs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ctru-rs/examples/{mii_selector.rs => mii-selector.rs} (100%) diff --git a/ctru-rs/examples/mii_selector.rs b/ctru-rs/examples/mii-selector.rs similarity index 100% rename from ctru-rs/examples/mii_selector.rs rename to ctru-rs/examples/mii-selector.rs From 19ebd494d39506cef81f09f02fb24a56607c54ed Mon Sep 17 00:00:00 2001 From: TechiePi Date: Fri, 21 Oct 2022 20:02:03 +0200 Subject: [PATCH 31/57] Add MiiData example --- ctru-rs/examples/mii-selector.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ctru-rs/examples/mii-selector.rs b/ctru-rs/examples/mii-selector.rs index 40c774e..ade3164 100644 --- a/ctru-rs/examples/mii-selector.rs +++ b/ctru-rs/examples/mii-selector.rs @@ -17,11 +17,12 @@ fn main() { let result = mii_selector.launch(); println!("\x1b[0;0HIs Mii selected?: {:?}", result.is_mii_selected); - println!("\x1b[2;0HValid checksum?: {:?}", result.valid_checksum()); - println!("\x1b[4;0HMii type: {:?}", result.mii_type); - println!("\x1b[6;0HMii checksum: {:?}", result.checksum); - println!("\x1b[8;0HName: {:?}", result.name()); - println!("\x1b[12;0HAuthor: {:?}", result.author()); + println!("\x1b[1;0HValid checksum?: {:?}", result.valid_checksum()); + println!("\x1b[2;0HMii type: {:?}", result.mii_type); + println!("\x1b[3;0HMii checksum: {:?}", result.checksum); + println!("\x1b[4;0HName: {:?}", result.name()); + println!("\x1b[5;0HAuthor: {:?}", result.author()); + println!("\x1b[5;0HDoes it have moles?: {:?}", result.mii_data.mole_details.is_enabled); // Main loop while apt.main_loop() { From 0a6654aa55b81cb04ab07a3cf47925e3e1d2f3fe Mon Sep 17 00:00:00 2001 From: TechiePi Date: Fri, 21 Oct 2022 20:02:52 +0200 Subject: [PATCH 32/57] Clippy --- ctru-rs/src/applets/mii_selector.rs | 2 +- ctru-rs/src/mii.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index dc88bde..9a4a860 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -160,7 +160,7 @@ impl MiiSelectorReturn { impl From> for MiiSelectorReturn { fn from(ret: Box) -> Self { let checksum = ret.checksum; - let raw_mii_data = ret.mii._bindgen_opaque_blob.clone(); + let raw_mii_data = ret.mii._bindgen_opaque_blob; let no_mii_selected = ret.no_mii_selected; let guest_mii_index_clone = ret.guest_mii_index; let mut guest_mii_name = ret.guest_mii_name; diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index b211d76..f3b75ee 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -417,11 +417,11 @@ fn utf16_byte_pairs_to_string(data: &[u8]) -> String { .collect::>() .iter() .map(|v| { - u16::from_le_bytes([*v.get(0).unwrap_or(&0), *v.get(1).unwrap_or(&0)]) + u16::from_le_bytes([*v.first().unwrap_or(&0), *v.get(1).unwrap_or(&0)]) }) .collect::>(); - String::from_utf16(raw_utf16_composed.as_slice()).unwrap().replace("\0", "") + String::from_utf16(raw_utf16_composed.as_slice()).unwrap().replace('\0', "") } /// Gets the values from the slice and concatenates them From 1dbb576651a80e580a21a7d6137de2cb640dbf82 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Fri, 21 Oct 2022 20:04:06 +0200 Subject: [PATCH 33/57] Remove comment --- ctru-rs/src/mii.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index f3b75ee..daaf173 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -237,7 +237,6 @@ impl From<[u8; 92]> for MiiData { let position = SelectorPosition { page_index: partial_vec_to_u8_with_reverse(&raw_position[0..3]), - //page_index: vec_bit_to_u8([false, false, false, false, raw_position[3], raw_position[2], raw_position[1], raw_position[0]]), slot_index: partial_vec_to_u8_with_reverse(&raw_position[4..7]) }; From 4b99e92b19b691929e814e6ebb60c59484a35ea2 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Fri, 21 Oct 2022 21:57:05 +0200 Subject: [PATCH 34/57] Cargo fmt & clippy --- ctru-rs/examples/mii-selector.rs | 5 +- ctru-rs/src/applets/mii_selector.rs | 2 +- ctru-rs/src/lib.rs | 2 +- ctru-rs/src/mii.rs | 117 +++++++++++++++++++--------- 4 files changed, 87 insertions(+), 39 deletions(-) diff --git a/ctru-rs/examples/mii-selector.rs b/ctru-rs/examples/mii-selector.rs index ade3164..92075ed 100644 --- a/ctru-rs/examples/mii-selector.rs +++ b/ctru-rs/examples/mii-selector.rs @@ -22,7 +22,10 @@ fn main() { println!("\x1b[3;0HMii checksum: {:?}", result.checksum); println!("\x1b[4;0HName: {:?}", result.name()); println!("\x1b[5;0HAuthor: {:?}", result.author()); - println!("\x1b[5;0HDoes it have moles?: {:?}", result.mii_data.mole_details.is_enabled); + println!( + "\x1b[5;0HDoes it have moles?: {:?}", + result.mii_data.mole_details.is_enabled + ); // Main loop while apt.main_loop() { diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index 9a4a860..82bebd8 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -1,6 +1,6 @@ +use crate::mii::MiiData; use bitflags::bitflags; use std::ffi::CString; -use crate::mii::MiiData; #[derive(Debug, Clone)] pub enum MiiConfigIndex { diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index 20282c6..f461822 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -76,9 +76,9 @@ pub mod applets; pub mod console; pub mod error; pub mod gfx; +pub mod mii; pub mod prelude; pub mod services; -pub mod mii; cfg_if::cfg_if! { if #[cfg(all(feature = "romfs", romfs_exists))] { diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index daaf173..b944843 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -33,7 +33,7 @@ pub enum OriginConsole { ConsoleWii, ConsoleDSi, Console3DS, - ConsoleWiiUSwitch + ConsoleWiiUSwitch, } #[derive(Clone, Debug)] @@ -181,9 +181,28 @@ impl From<[u8; 92]> for MiiData { let raw_options = vec_bit(raw_mii_data[0x1]); let raw_position = vec_bit(raw_mii_data[0x2]); let raw_device = vec_bit(raw_mii_data[0x3]); - let system_id = [raw_mii_data[0x4], raw_mii_data[0x5], raw_mii_data[0x6], raw_mii_data[0x7], raw_mii_data[0x8], raw_mii_data[0x9], raw_mii_data[0xA], raw_mii_data[0xB]]; - let creator_mac = [raw_mii_data[0x10], raw_mii_data[0x11], raw_mii_data[0x12], raw_mii_data[0x13], raw_mii_data[0x14], raw_mii_data[0x15]]; - let raw_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x18, 0x19]).try_into().unwrap(); + let system_id = [ + raw_mii_data[0x4], + raw_mii_data[0x5], + raw_mii_data[0x6], + raw_mii_data[0x7], + raw_mii_data[0x8], + raw_mii_data[0x9], + raw_mii_data[0xA], + raw_mii_data[0xB], + ]; + let creator_mac = [ + raw_mii_data[0x10], + raw_mii_data[0x11], + raw_mii_data[0x12], + raw_mii_data[0x13], + raw_mii_data[0x14], + raw_mii_data[0x15], + ]; + let raw_details: [bool; 16] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x18, 0x19]) + .try_into() + .unwrap(); let raw_utf16_name = &raw_mii_data.as_slice()[0x1A..0x2D]; let height = raw_mii_data[0x2E]; let width = raw_mii_data[0x2F]; @@ -191,14 +210,38 @@ impl From<[u8; 92]> for MiiData { let raw_face_details = vec_bit(raw_mii_data[0x31]); let hair_style = raw_mii_data[0x32]; let raw_hair_details = vec_bit(raw_mii_data[0x33]); - let raw_eye_details: [bool; 32] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x34, 0x35, 0x36, 0x37]).try_into().unwrap(); - let raw_eyebrow_details: [bool; 32] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x38, 0x39, 0x3A, 0x3B]).try_into().unwrap(); - let raw_nose_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3C, 0x3D]).try_into().unwrap(); - let raw_mouth_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3E, 0x3F]).try_into().unwrap(); - let raw_mustache_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x40, 0x41]).try_into().unwrap(); - let raw_beard_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x42, 0x42]).try_into().unwrap(); - let raw_glass_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x44, 0x45]).try_into().unwrap(); - let raw_mole_details: [bool; 16] = get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x46, 0x47]).try_into().unwrap(); + let raw_eye_details: [bool; 32] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x34, 0x35, 0x36, 0x37]) + .try_into() + .unwrap(); + let raw_eyebrow_details: [bool; 32] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x38, 0x39, 0x3A, 0x3B]) + .try_into() + .unwrap(); + let raw_nose_details: [bool; 16] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3C, 0x3D]) + .try_into() + .unwrap(); + let raw_mouth_details: [bool; 16] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3E, 0x3F]) + .try_into() + .unwrap(); + let raw_mustache_details: [bool; 16] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x40, 0x41]) + .try_into() + .unwrap(); + let raw_beard_details: [bool; 16] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x42, 0x42]) + .try_into() + .unwrap(); + let raw_glass_details: [bool; 16] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x44, 0x45]) + .try_into() + .unwrap(); + let raw_mole_details: [bool; 16] = + get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x46, 0x47]) + .try_into() + .unwrap(); let raw_utf16_author = &raw_mii_data.as_slice()[0x48..0x5C]; let mii_name = utf16_byte_pairs_to_string(raw_utf16_name); @@ -210,11 +253,14 @@ impl From<[u8; 92]> for MiiData { region_lock: { let first_bit = raw_options[3]; let second_bit = raw_options[2]; - if !first_bit && !second_bit { // 0b00 + if !first_bit && !second_bit { + // 0b00 RegionLock::NoLock - } else if !first_bit && second_bit { // 0b01 + } else if !first_bit && second_bit { + // 0b01 RegionLock::Japan - } else if first_bit && !second_bit { // 0b10 + } else if first_bit && !second_bit { + // 0b10 RegionLock::USA } else { RegionLock::Europe @@ -223,11 +269,14 @@ impl From<[u8; 92]> for MiiData { charset: { let first_bit = raw_options[5]; let second_bit = raw_options[4]; - if !first_bit && !second_bit { // 0b00 + if !first_bit && !second_bit { + // 0b00 Charset::JapanUSAEurope - } else if !first_bit && second_bit { // 0b01 + } else if !first_bit && second_bit { + // 0b01 Charset::China - } else if first_bit && !second_bit { // 0b10 + } else if first_bit && !second_bit { + // 0b10 Charset::Korea } else { Charset::Taiwan @@ -237,7 +286,7 @@ impl From<[u8; 92]> for MiiData { let position = SelectorPosition { page_index: partial_vec_to_u8_with_reverse(&raw_position[0..3]), - slot_index: partial_vec_to_u8_with_reverse(&raw_position[4..7]) + slot_index: partial_vec_to_u8_with_reverse(&raw_position[4..7]), }; let device = ConsoleIdentity { @@ -255,7 +304,7 @@ impl From<[u8; 92]> for MiiData { } else { OriginConsole::ConsoleWiiUSwitch } - } + }, }; let details = Details { @@ -390,13 +439,10 @@ fn vec_bit(data: u8) -> [bool; 8] { /// Transforms a [bool; 8] into an u8 fn vec_bit_to_u8(data: [bool; 8]) -> u8 { let mut result: u8 = 0; - data - .map(|v| if v { 1_u8 } else { 0_u8 }) - .iter() - .for_each(|&bit| { - result <<= 1; - result ^= bit; - }); + data.map(u8::from).iter().for_each(|&bit| { + result <<= 1; + result ^= bit; + }); result } @@ -415,20 +461,19 @@ fn utf16_byte_pairs_to_string(data: &[u8]) -> String { .chunks(2) .collect::>() .iter() - .map(|v| { - u16::from_le_bytes([*v.first().unwrap_or(&0), *v.get(1).unwrap_or(&0)]) - }) + .map(|v| u16::from_le_bytes([*v.first().unwrap_or(&0), *v.get(1).unwrap_or(&0)])) .collect::>(); - String::from_utf16(raw_utf16_composed.as_slice()).unwrap().replace('\0', "") + String::from_utf16(raw_utf16_composed.as_slice()) + .unwrap() + .replace('\0', "") } /// Gets the values from the slice and concatenates them fn get_and_concat_vec_bit(data: &[u8], get_values: &[usize]) -> Vec { - get_values.iter() - .map(|v| { - vec_bit(data[*v]) - }) + get_values + .iter() + .map(|v| vec_bit(data[*v])) .collect::>() .concat() -} \ No newline at end of file +} From 1d92f0f48cc398f336bc7bb7df75b463c1742e97 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 23 Oct 2022 15:46:20 +0200 Subject: [PATCH 35/57] Apply suggestions --- ctru-rs/src/mii.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index b944843..d990434 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -1,6 +1,6 @@ #[derive(Clone, Debug, Eq, PartialEq)] pub enum RegionLock { - NoLock, + None, Japan, USA, Europe, From fe0d03cbb7c043d375e5a15a87ac4d417e048b75 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 23 Oct 2022 16:56:58 +0200 Subject: [PATCH 36/57] Fix Mii Selector example --- ctru-rs/examples/mii-selector.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/examples/mii-selector.rs b/ctru-rs/examples/mii-selector.rs index 92075ed..2732cdb 100644 --- a/ctru-rs/examples/mii-selector.rs +++ b/ctru-rs/examples/mii-selector.rs @@ -23,7 +23,7 @@ fn main() { println!("\x1b[4;0HName: {:?}", result.name()); println!("\x1b[5;0HAuthor: {:?}", result.author()); println!( - "\x1b[5;0HDoes it have moles?: {:?}", + "\x1b[6;0HDoes the Mii have moles?: {:?}", result.mii_data.mole_details.is_enabled ); From be87134b4077d5b4f2dc557c9ae10dfff0fe99a1 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Sun, 23 Oct 2022 17:04:44 +0200 Subject: [PATCH 37/57] Fix ``RegionLock::None`` refactor --- ctru-rs/src/mii.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index d990434..396cee1 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -255,7 +255,7 @@ impl From<[u8; 92]> for MiiData { let second_bit = raw_options[2]; if !first_bit && !second_bit { // 0b00 - RegionLock::NoLock + RegionLock::None } else if !first_bit && second_bit { // 0b01 RegionLock::Japan From 7ca152a02a797b4cc67abfe7fab39a96767e89de Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 02:40:10 +0200 Subject: [PATCH 38/57] Apply some suggestions --- ctru-rs/src/applets/mii_selector.rs | 114 ++++++------------ ctru-rs/src/mii.rs | 174 ++++++++++++---------------- 2 files changed, 106 insertions(+), 182 deletions(-) diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index 82bebd8..9602a35 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -28,13 +28,16 @@ pub struct MiiSelector { } pub struct MiiSelectorReturn { - raw_return: Box, pub mii_data: MiiData, pub is_mii_selected: bool, pub mii_type: MiiType, pub checksum: u16, } +pub enum MiiLaunchError { + InvalidChecksum, +} + impl MiiSelector { pub fn init() -> Self { let mut config = Box::::default(); @@ -47,7 +50,7 @@ impl MiiSelector { pub fn set_title(&mut self, text: &str) { // This can only fail if the text contains NUL bytes in the string... which seems // unlikely and is documented - let c_text = CString::new(text).expect("Cstring::new failed"); + let c_text = CString::new(text).expect("Failed to convert the title text into a CString"); unsafe { ctru_sys::miiSelectorSetTitle(self.config.as_mut(), c_text.as_ptr()); } @@ -58,59 +61,39 @@ impl MiiSelector { } pub fn whitelist_guest_mii(&mut self, mii_index: MiiConfigIndex) { - match mii_index { - MiiConfigIndex::Index(i) => unsafe { - ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), i) - }, - MiiConfigIndex::All => unsafe { - ctru_sys::miiSelectorWhitelistGuestMii( - self.config.as_mut(), - ctru_sys::MIISELECTOR_GUESTMII_SLOTS, - ) - }, - } + let index = match mii_index { + MiiConfigIndex::Index(i) => i, + MiiConfigIndex::All => ctru_sys::MIISELECTOR_GUESTMII_SLOTS, + }; + + unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), index) } } pub fn blacklist_guest_mii(&mut self, mii_index: MiiConfigIndex) { - match mii_index { - MiiConfigIndex::Index(i) => unsafe { - ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), i) - }, - MiiConfigIndex::All => unsafe { - ctru_sys::miiSelectorBlacklistGuestMii( - self.config.as_mut(), - ctru_sys::MIISELECTOR_GUESTMII_SLOTS, - ) - }, - } + let index = match mii_index { + MiiConfigIndex::Index(i) => i, + MiiConfigIndex::All => ctru_sys::MIISELECTOR_GUESTMII_SLOTS, + }; + + unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), index) } } pub fn whitelist_user_mii(&mut self, mii_index: MiiConfigIndex) { - match mii_index { - MiiConfigIndex::Index(i) => unsafe { - ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), i) - }, - MiiConfigIndex::All => unsafe { - ctru_sys::miiSelectorWhitelistUserMii( - self.config.as_mut(), - ctru_sys::MIISELECTOR_USERMII_SLOTS, - ) - }, - } + let index = match mii_index { + MiiConfigIndex::Index(i) => i, + MiiConfigIndex::All => ctru_sys::MIISELECTOR_USERMII_SLOTS, + }; + + unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), index) } } pub fn blacklist_user_mii(&mut self, mii_index: MiiConfigIndex) { - match mii_index { - MiiConfigIndex::Index(i) => unsafe { - ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), i) - }, - MiiConfigIndex::All => unsafe { - ctru_sys::miiSelectorBlacklistUserMii( - self.config.as_mut(), - ctru_sys::MIISELECTOR_USERMII_SLOTS, - ) - }, - } + let index = match mii_index { + MiiConfigIndex::Index(i) => i, + MiiConfigIndex::All => ctru_sys::MIISELECTOR_USERMII_SLOTS, + }; + + unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), index) } } // This function is static inline in libctru @@ -119,54 +102,27 @@ impl MiiSelector { self.config.initial_index = index } - pub fn launch(&mut self) -> MiiSelectorReturn { + pub fn launch(&mut self) -> Result { let mut return_val = Box::::default(); unsafe { ctru_sys::miiSelectorLaunch(self.config.as_mut(), return_val.as_mut()) } - return_val.into() - } -} - -impl MiiSelectorReturn { - pub fn name(&self) -> String { - let mut tmp = [0u8; 36]; - unsafe { - ctru_sys::miiSelectorReturnGetName(self.raw_return.as_ref(), tmp.as_mut_ptr(), 36) - } - - let len = unsafe { libc::strlen(tmp.as_ptr()) }; - let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp[..len]) }; - - utf8.to_owned() - } - - pub fn author(&self) -> String { - let mut tmp = [0u8; 30]; - unsafe { - ctru_sys::miiSelectorReturnGetAuthor(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) + if unsafe { ctru_sys::miiSelectorChecksumIsValid(return_val.as_mut()) } { + Ok(return_val.into()) + } else { + Err(MiiLaunchError::InvalidChecksum) } - - let len = unsafe { libc::strlen(tmp.as_ptr()) }; - let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp[..len]) }; - - utf8.to_owned() - } - - pub fn valid_checksum(&self) -> bool { - unsafe { ctru_sys::miiSelectorChecksumIsValid(self.raw_return.as_ref()) } } } impl From> for MiiSelectorReturn { fn from(ret: Box) -> Self { let checksum = ret.checksum; - let raw_mii_data = ret.mii._bindgen_opaque_blob; + let raw_mii_data = ret.mii; let no_mii_selected = ret.no_mii_selected; let guest_mii_index_clone = ret.guest_mii_index; let mut guest_mii_name = ret.guest_mii_name; MiiSelectorReturn { - raw_return: ret, mii_data: raw_mii_data.into(), is_mii_selected: no_mii_selected == 0, mii_type: if guest_mii_index_clone != 0xFFFFFFFF { diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index 396cee1..c966b92 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -1,4 +1,4 @@ -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum RegionLock { None, Japan, @@ -6,7 +6,7 @@ pub enum RegionLock { Europe, } -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Charset { JapanUSAEurope, China, @@ -14,7 +14,7 @@ pub enum Charset { Taiwan, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct MiiDataOptions { pub is_copying_allowed: bool, pub is_profanity_flag_enabled: bool, @@ -22,13 +22,13 @@ pub struct MiiDataOptions { pub charset: Charset, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct SelectorPosition { pub page_index: u8, pub slot_index: u8, } -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum OriginConsole { ConsoleWii, ConsoleDSi, @@ -36,18 +36,18 @@ pub enum OriginConsole { ConsoleWiiUSwitch, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct ConsoleIdentity { pub origin_console: OriginConsole, } -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum MiiSex { Male, Female, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct Details { pub sex: MiiSex, pub birthday_month: u8, @@ -56,26 +56,26 @@ pub struct Details { pub is_favorite: bool, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct FaceStyle { pub is_sharing_enabled: bool, pub shape: u8, pub skin_color: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct FaceDetails { pub wrinkles: u8, pub makeup: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct HairDetails { pub color: u8, pub is_flipped: bool, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct EyeDetails { pub style: u8, pub color: u8, @@ -86,7 +86,7 @@ pub struct EyeDetails { pub y_position: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct EyebrowDetails { pub style: u8, pub color: u8, @@ -97,14 +97,14 @@ pub struct EyebrowDetails { pub y_position: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct NoseDetails { pub style: u8, pub scale: u8, pub y_position: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct MouthDetails { pub style: u8, pub color: u8, @@ -112,13 +112,13 @@ pub struct MouthDetails { pub y_scale: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct MustacheDetails { pub mouth_y_position: u8, pub mustache_style: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct BeardDetails { pub style: u8, pub color: u8, @@ -126,7 +126,7 @@ pub struct BeardDetails { pub y_position: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct GlassDetails { pub style: u8, pub color: u8, @@ -134,7 +134,7 @@ pub struct GlassDetails { pub y_position: u8, } -#[derive(Clone, Debug)] +#[derive(Copy, Clone, Debug)] pub struct MoleDetails { pub is_enabled: bool, pub scale: u8, @@ -144,15 +144,15 @@ pub struct MoleDetails { #[derive(Clone, Debug)] pub struct MiiData { - pub mii_options: MiiDataOptions, - pub mii_selector_position: SelectorPosition, - pub mii_console_identity: ConsoleIdentity, + pub options: MiiDataOptions, + pub selector_position: SelectorPosition, + pub console_identity: ConsoleIdentity, pub system_id: [u8; 8], pub mac_address: [u8; 6], - pub mii_details: Details, - pub mii_name: String, + pub details: Details, + pub name: String, pub height: u8, pub width: u8, @@ -175,8 +175,9 @@ pub struct MiiData { pub author_name: String, } -impl From<[u8; 92]> for MiiData { - fn from(raw_mii_data: [u8; 92]) -> Self { +impl From for MiiData { + fn from(mii_data: ctru_sys::MiiData) -> Self { + let raw_mii_data = mii_data._bindgen_opaque_blob; // Source for the representation and what each thing means: https://www.3dbrew.org/wiki/Mii let raw_options = vec_bit(raw_mii_data[0x1]); let raw_position = vec_bit(raw_mii_data[0x2]); @@ -200,10 +201,10 @@ impl From<[u8; 92]> for MiiData { raw_mii_data[0x15], ]; let raw_details: [bool; 16] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x18, 0x19]) + get_and_concat_vec_bit(&raw_mii_data, &[0x18, 0x19]) .try_into() .unwrap(); - let raw_utf16_name = &raw_mii_data.as_slice()[0x1A..0x2D]; + let raw_utf16_name = &raw_mii_data[0x1A..0x2D]; let height = raw_mii_data[0x2E]; let width = raw_mii_data[0x2F]; let raw_face_style = vec_bit(raw_mii_data[0x30]); @@ -211,75 +212,59 @@ impl From<[u8; 92]> for MiiData { let hair_style = raw_mii_data[0x32]; let raw_hair_details = vec_bit(raw_mii_data[0x33]); let raw_eye_details: [bool; 32] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x34, 0x35, 0x36, 0x37]) + get_and_concat_vec_bit(&raw_mii_data, &[0x34, 0x35, 0x36, 0x37]) .try_into() .unwrap(); let raw_eyebrow_details: [bool; 32] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x38, 0x39, 0x3A, 0x3B]) + get_and_concat_vec_bit(&raw_mii_data, &[0x38, 0x39, 0x3A, 0x3B]) .try_into() .unwrap(); let raw_nose_details: [bool; 16] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3C, 0x3D]) + get_and_concat_vec_bit(&raw_mii_data, &[0x3C, 0x3D]) .try_into() .unwrap(); let raw_mouth_details: [bool; 16] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x3E, 0x3F]) + get_and_concat_vec_bit(&raw_mii_data, &[0x3E, 0x3F]) .try_into() .unwrap(); let raw_mustache_details: [bool; 16] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x40, 0x41]) + get_and_concat_vec_bit(&raw_mii_data, &[0x40, 0x41]) .try_into() .unwrap(); let raw_beard_details: [bool; 16] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x42, 0x42]) + get_and_concat_vec_bit(&raw_mii_data, &[0x42, 0x42]) .try_into() .unwrap(); let raw_glass_details: [bool; 16] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x44, 0x45]) + get_and_concat_vec_bit(&raw_mii_data, &[0x44, 0x45]) .try_into() .unwrap(); let raw_mole_details: [bool; 16] = - get_and_concat_vec_bit(raw_mii_data.as_slice(), &[0x46, 0x47]) + get_and_concat_vec_bit(&raw_mii_data, &[0x46, 0x47]) .try_into() .unwrap(); - let raw_utf16_author = &raw_mii_data.as_slice()[0x48..0x5C]; + let raw_utf16_author = &raw_mii_data[0x48..0x5C]; let mii_name = utf16_byte_pairs_to_string(raw_utf16_name); let author_name = utf16_byte_pairs_to_string(raw_utf16_author); let options = MiiDataOptions { - is_copying_allowed: *raw_options.first().unwrap(), - is_profanity_flag_enabled: *raw_options.get(1).unwrap(), + is_copying_allowed: raw_options[0], + is_profanity_flag_enabled: raw_options[1], region_lock: { - let first_bit = raw_options[3]; - let second_bit = raw_options[2]; - if !first_bit && !second_bit { - // 0b00 - RegionLock::None - } else if !first_bit && second_bit { - // 0b01 - RegionLock::Japan - } else if first_bit && !second_bit { - // 0b10 - RegionLock::USA - } else { - RegionLock::Europe + match (raw_options[3], raw_options[2]) { + (false, false) => RegionLock::None, + (false, true) => RegionLock::Japan, + (true, false) => RegionLock::USA, + (true, true) => RegionLock::Europe, } }, charset: { - let first_bit = raw_options[5]; - let second_bit = raw_options[4]; - if !first_bit && !second_bit { - // 0b00 - Charset::JapanUSAEurope - } else if !first_bit && second_bit { - // 0b01 - Charset::China - } else if first_bit && !second_bit { - // 0b10 - Charset::Korea - } else { - Charset::Taiwan + match (raw_options[5], raw_options[4]) { + (false, false) => Charset::JapanUSAEurope, + (false, true) => Charset::China, + (true, false) => Charset::Korea, + (true, true) => Charset::Taiwan, } }, }; @@ -291,29 +276,20 @@ impl From<[u8; 92]> for MiiData { let device = ConsoleIdentity { origin_console: { - let first_bit = raw_device[6]; - let second_bit = raw_device[5]; - let third_bit = raw_device[4]; - - if !first_bit && !second_bit && third_bit { - OriginConsole::ConsoleWii - } else if !first_bit && second_bit && !third_bit { - OriginConsole::ConsoleDSi - } else if !first_bit && second_bit && third_bit { - OriginConsole::Console3DS - } else { - OriginConsole::ConsoleWiiUSwitch + match (raw_device[6], raw_device[5], raw_device[4]) { + (false, false, true) => OriginConsole::ConsoleWii, + (false, true, false) => OriginConsole::ConsoleDSi, + (false, true, true) => OriginConsole::Console3DS, + _ => OriginConsole::ConsoleWiiUSwitch, } }, }; let details = Details { sex: { - let first_bit = raw_details[0]; - if first_bit { - MiiSex::Female - } else { - MiiSex::Male + match raw_details[0] { + true => MiiSex::Female, + false => MiiSex::Male, } }, birthday_month: partial_vec_to_u8_with_reverse(&raw_details[1..4]), @@ -398,13 +374,13 @@ impl From<[u8; 92]> for MiiData { }; MiiData { - mii_options: options, - mii_selector_position: position, - mii_console_identity: device, + options: options, + selector_position: position, + console_identity: device, system_id, mac_address: creator_mac, - mii_details: details, - mii_name, + details: details, + name: mii_name, height, width, face_style, @@ -438,12 +414,9 @@ fn vec_bit(data: u8) -> [bool; 8] { /// Transforms a [bool; 8] into an u8 fn vec_bit_to_u8(data: [bool; 8]) -> u8 { - let mut result: u8 = 0; - data.map(u8::from).iter().for_each(|&bit| { - result <<= 1; - result ^= bit; - }); - result + data.into_iter().fold(0, |result, bit| { + (result << 1) ^ u8::from(bit) + }) } /// The reverse allows to write things on a more _humane_ way, but return a LE u8 @@ -458,22 +431,17 @@ fn partial_vec_to_u8_with_reverse(data: &[bool]) -> u8 { /// UTF-16 Strings are give in pairs of bytes (u8), this converts them into an _actual_ string fn utf16_byte_pairs_to_string(data: &[u8]) -> String { let raw_utf16_composed = data - .chunks(2) - .collect::>() - .iter() - .map(|v| u16::from_le_bytes([*v.first().unwrap_or(&0), *v.get(1).unwrap_or(&0)])) + .chunks_exact(2) + .map(|chunk| u16::from_le_bytes([chunk[0], chunk[1]])) .collect::>(); - String::from_utf16(raw_utf16_composed.as_slice()) - .unwrap() - .replace('\0', "") + String::from_utf16_lossy(raw_utf16_composed.as_slice()) } /// Gets the values from the slice and concatenates them fn get_and_concat_vec_bit(data: &[u8], get_values: &[usize]) -> Vec { get_values .iter() - .map(|v| vec_bit(data[*v])) - .collect::>() - .concat() + .flat_map(|v| vec_bit(data[*v])) + .collect() } From a9569b5e5ac4241407efa9d53be677aa380ab3a6 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 03:01:05 +0200 Subject: [PATCH 39/57] Improve ``mii-selector`` example and a few fixes --- ctru-rs/examples/mii-selector.rs | 17 ++++++++--------- ctru-rs/src/applets/mii_selector.rs | 3 +++ ctru-rs/src/mii.rs | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ctru-rs/examples/mii-selector.rs b/ctru-rs/examples/mii-selector.rs index 2732cdb..1b89532 100644 --- a/ctru-rs/examples/mii-selector.rs +++ b/ctru-rs/examples/mii-selector.rs @@ -14,16 +14,15 @@ fn main() { mii_selector.blacklist_user_mii(0.into()); mii_selector.set_title("Great Mii Selector!"); - let result = mii_selector.launch(); - - println!("\x1b[0;0HIs Mii selected?: {:?}", result.is_mii_selected); - println!("\x1b[1;0HValid checksum?: {:?}", result.valid_checksum()); - println!("\x1b[2;0HMii type: {:?}", result.mii_type); - println!("\x1b[3;0HMii checksum: {:?}", result.checksum); - println!("\x1b[4;0HName: {:?}", result.name()); - println!("\x1b[5;0HAuthor: {:?}", result.author()); + let result = mii_selector.launch().unwrap(); + + println!("Is Mii selected?: {:?}", result.is_mii_selected); + println!("Mii type: {:?}", result.mii_type); + println!("Mii checksum: {:?}", result.checksum); + println!("Name: {:?}", result.mii_data.name); + println!("Author: {:?}", result.mii_data.author_name); println!( - "\x1b[6;0HDoes the Mii have moles?: {:?}", + "Does the Mii have moles?: {:?}", result.mii_data.mole_details.is_enabled ); diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index 9602a35..d4fe6d1 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -23,10 +23,12 @@ bitflags! { } } +#[derive(Clone, Debug)] pub struct MiiSelector { config: Box, } +#[derive(Clone, Debug)] pub struct MiiSelectorReturn { pub mii_data: MiiData, pub is_mii_selected: bool, @@ -34,6 +36,7 @@ pub struct MiiSelectorReturn { pub checksum: u16, } +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum MiiLaunchError { InvalidChecksum, } diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index c966b92..b9d7285 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -435,7 +435,7 @@ fn utf16_byte_pairs_to_string(data: &[u8]) -> String { .map(|chunk| u16::from_le_bytes([chunk[0], chunk[1]])) .collect::>(); - String::from_utf16_lossy(raw_utf16_composed.as_slice()) + String::from_utf16_lossy(raw_utf16_composed.as_slice()).replace("\0", "") } /// Gets the values from the slice and concatenates them From d7a684363375eaf71fbc09b117b770c6a0f3ae9b Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 03:01:39 +0200 Subject: [PATCH 40/57] Clippy & cargo fmt --- ctru-rs/src/mii.rs | 65 +++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index b9d7285..565d181 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -200,10 +200,9 @@ impl From for MiiData { raw_mii_data[0x14], raw_mii_data[0x15], ]; - let raw_details: [bool; 16] = - get_and_concat_vec_bit(&raw_mii_data, &[0x18, 0x19]) - .try_into() - .unwrap(); + let raw_details: [bool; 16] = get_and_concat_vec_bit(&raw_mii_data, &[0x18, 0x19]) + .try_into() + .unwrap(); let raw_utf16_name = &raw_mii_data[0x1A..0x2D]; let height = raw_mii_data[0x2E]; let width = raw_mii_data[0x2F]; @@ -219,30 +218,24 @@ impl From for MiiData { get_and_concat_vec_bit(&raw_mii_data, &[0x38, 0x39, 0x3A, 0x3B]) .try_into() .unwrap(); - let raw_nose_details: [bool; 16] = - get_and_concat_vec_bit(&raw_mii_data, &[0x3C, 0x3D]) - .try_into() - .unwrap(); - let raw_mouth_details: [bool; 16] = - get_and_concat_vec_bit(&raw_mii_data, &[0x3E, 0x3F]) - .try_into() - .unwrap(); - let raw_mustache_details: [bool; 16] = - get_and_concat_vec_bit(&raw_mii_data, &[0x40, 0x41]) - .try_into() - .unwrap(); - let raw_beard_details: [bool; 16] = - get_and_concat_vec_bit(&raw_mii_data, &[0x42, 0x42]) - .try_into() - .unwrap(); - let raw_glass_details: [bool; 16] = - get_and_concat_vec_bit(&raw_mii_data, &[0x44, 0x45]) - .try_into() - .unwrap(); - let raw_mole_details: [bool; 16] = - get_and_concat_vec_bit(&raw_mii_data, &[0x46, 0x47]) - .try_into() - .unwrap(); + let raw_nose_details: [bool; 16] = get_and_concat_vec_bit(&raw_mii_data, &[0x3C, 0x3D]) + .try_into() + .unwrap(); + let raw_mouth_details: [bool; 16] = get_and_concat_vec_bit(&raw_mii_data, &[0x3E, 0x3F]) + .try_into() + .unwrap(); + let raw_mustache_details: [bool; 16] = get_and_concat_vec_bit(&raw_mii_data, &[0x40, 0x41]) + .try_into() + .unwrap(); + let raw_beard_details: [bool; 16] = get_and_concat_vec_bit(&raw_mii_data, &[0x42, 0x42]) + .try_into() + .unwrap(); + let raw_glass_details: [bool; 16] = get_and_concat_vec_bit(&raw_mii_data, &[0x44, 0x45]) + .try_into() + .unwrap(); + let raw_mole_details: [bool; 16] = get_and_concat_vec_bit(&raw_mii_data, &[0x46, 0x47]) + .try_into() + .unwrap(); let raw_utf16_author = &raw_mii_data[0x48..0x5C]; let mii_name = utf16_byte_pairs_to_string(raw_utf16_name); @@ -374,12 +367,12 @@ impl From for MiiData { }; MiiData { - options: options, + options, selector_position: position, console_identity: device, system_id, mac_address: creator_mac, - details: details, + details, name: mii_name, height, width, @@ -414,9 +407,8 @@ fn vec_bit(data: u8) -> [bool; 8] { /// Transforms a [bool; 8] into an u8 fn vec_bit_to_u8(data: [bool; 8]) -> u8 { - data.into_iter().fold(0, |result, bit| { - (result << 1) ^ u8::from(bit) - }) + data.into_iter() + .fold(0, |result, bit| (result << 1) ^ u8::from(bit)) } /// The reverse allows to write things on a more _humane_ way, but return a LE u8 @@ -435,13 +427,10 @@ fn utf16_byte_pairs_to_string(data: &[u8]) -> String { .map(|chunk| u16::from_le_bytes([chunk[0], chunk[1]])) .collect::>(); - String::from_utf16_lossy(raw_utf16_composed.as_slice()).replace("\0", "") + String::from_utf16_lossy(raw_utf16_composed.as_slice()).replace('\0', "") } /// Gets the values from the slice and concatenates them fn get_and_concat_vec_bit(data: &[u8], get_values: &[usize]) -> Vec { - get_values - .iter() - .flat_map(|v| vec_bit(data[*v])) - .collect() + get_values.iter().flat_map(|v| vec_bit(data[*v])).collect() } From dd5b9f72a6569173876d422e149811c83e7e1805 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 14:06:27 +0200 Subject: [PATCH 41/57] Fix issue related to endianness and improve wording --- ctru-rs/src/mii.rs | 92 +++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index 565d181..b969c78 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -263,8 +263,8 @@ impl From for MiiData { }; let position = SelectorPosition { - page_index: partial_vec_to_u8_with_reverse(&raw_position[0..3]), - slot_index: partial_vec_to_u8_with_reverse(&raw_position[4..7]), + page_index: partial_u8_bits_to_u8(&raw_position[0..3]), + slot_index: partial_u8_bits_to_u8(&raw_position[4..7]), }; let device = ConsoleIdentity { @@ -285,85 +285,85 @@ impl From for MiiData { false => MiiSex::Male, } }, - birthday_month: partial_vec_to_u8_with_reverse(&raw_details[1..4]), - birthday_day: partial_vec_to_u8_with_reverse(&raw_details[5..9]), - shirt_color: partial_vec_to_u8_with_reverse(&raw_details[10..13]), + birthday_month: partial_u8_bits_to_u8(&raw_details[1..4]), + birthday_day: partial_u8_bits_to_u8(&raw_details[5..9]), + shirt_color: partial_u8_bits_to_u8(&raw_details[10..13]), is_favorite: raw_details[14], }; let face_style = FaceStyle { is_sharing_enabled: !raw_face_style[1], - shape: partial_vec_to_u8_with_reverse(&raw_face_style[1..4]), - skin_color: partial_vec_to_u8_with_reverse(&raw_face_style[5..7]), + shape: partial_u8_bits_to_u8(&raw_face_style[1..4]), + skin_color: partial_u8_bits_to_u8(&raw_face_style[5..7]), }; let face_details = FaceDetails { - wrinkles: partial_vec_to_u8_with_reverse(&raw_face_details[0..3]), - makeup: partial_vec_to_u8_with_reverse(&raw_face_details[4..7]), + wrinkles: partial_u8_bits_to_u8(&raw_face_details[0..3]), + makeup: partial_u8_bits_to_u8(&raw_face_details[4..7]), }; let hair_details = HairDetails { - color: partial_vec_to_u8_with_reverse(&raw_hair_details[0..2]), + color: partial_u8_bits_to_u8(&raw_hair_details[0..2]), is_flipped: raw_hair_details[3], }; let eye_details = EyeDetails { - style: partial_vec_to_u8_with_reverse(&raw_eye_details[0..5]), - color: partial_vec_to_u8_with_reverse(&raw_eye_details[6..8]), - scale: partial_vec_to_u8_with_reverse(&raw_eye_details[9..12]), - y_scale: partial_vec_to_u8_with_reverse(&raw_eye_details[13..15]), - rotation: partial_vec_to_u8_with_reverse(&raw_eye_details[16..20]), - x_spacing: partial_vec_to_u8_with_reverse(&raw_eye_details[21..24]), - y_position: partial_vec_to_u8_with_reverse(&raw_eye_details[25..29]), + style: partial_u8_bits_to_u8(&raw_eye_details[0..5]), + color: partial_u8_bits_to_u8(&raw_eye_details[6..8]), + scale: partial_u8_bits_to_u8(&raw_eye_details[9..12]), + y_scale: partial_u8_bits_to_u8(&raw_eye_details[13..15]), + rotation: partial_u8_bits_to_u8(&raw_eye_details[16..20]), + x_spacing: partial_u8_bits_to_u8(&raw_eye_details[21..24]), + y_position: partial_u8_bits_to_u8(&raw_eye_details[25..29]), }; let eyebrow_details = EyebrowDetails { - style: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[0..4]), - color: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[5..7]), - scale: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[8..11]), - y_scale: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[12..14]), - rotation: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[16..19]), - x_spacing: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[21..24]), - y_position: partial_vec_to_u8_with_reverse(&raw_eyebrow_details[25..29]), + style: partial_u8_bits_to_u8(&raw_eyebrow_details[0..4]), + color: partial_u8_bits_to_u8(&raw_eyebrow_details[5..7]), + scale: partial_u8_bits_to_u8(&raw_eyebrow_details[8..11]), + y_scale: partial_u8_bits_to_u8(&raw_eyebrow_details[12..14]), + rotation: partial_u8_bits_to_u8(&raw_eyebrow_details[16..19]), + x_spacing: partial_u8_bits_to_u8(&raw_eyebrow_details[21..24]), + y_position: partial_u8_bits_to_u8(&raw_eyebrow_details[25..29]), }; let nose_details = NoseDetails { - style: partial_vec_to_u8_with_reverse(&raw_nose_details[0..4]), - scale: partial_vec_to_u8_with_reverse(&raw_nose_details[5..8]), - y_position: partial_vec_to_u8_with_reverse(&raw_nose_details[9..13]), + style: partial_u8_bits_to_u8(&raw_nose_details[0..4]), + scale: partial_u8_bits_to_u8(&raw_nose_details[5..8]), + y_position: partial_u8_bits_to_u8(&raw_nose_details[9..13]), }; let mouth_details = MouthDetails { - style: partial_vec_to_u8_with_reverse(&raw_mouth_details[0..5]), - color: partial_vec_to_u8_with_reverse(&raw_mouth_details[6..8]), - scale: partial_vec_to_u8_with_reverse(&raw_mouth_details[9..12]), - y_scale: partial_vec_to_u8_with_reverse(&raw_mouth_details[13..15]), + style: partial_u8_bits_to_u8(&raw_mouth_details[0..5]), + color: partial_u8_bits_to_u8(&raw_mouth_details[6..8]), + scale: partial_u8_bits_to_u8(&raw_mouth_details[9..12]), + y_scale: partial_u8_bits_to_u8(&raw_mouth_details[13..15]), }; let mustache_details = MustacheDetails { - mouth_y_position: partial_vec_to_u8_with_reverse(&raw_mustache_details[0..4]), - mustache_style: partial_vec_to_u8_with_reverse(&raw_mustache_details[5..7]), + mouth_y_position: partial_u8_bits_to_u8(&raw_mustache_details[0..4]), + mustache_style: partial_u8_bits_to_u8(&raw_mustache_details[5..7]), }; let beard_details = BeardDetails { - style: partial_vec_to_u8_with_reverse(&raw_beard_details[0..2]), - color: partial_vec_to_u8_with_reverse(&raw_beard_details[3..5]), - scale: partial_vec_to_u8_with_reverse(&raw_beard_details[6..9]), - y_position: partial_vec_to_u8_with_reverse(&raw_beard_details[10..14]), + style: partial_u8_bits_to_u8(&raw_beard_details[0..2]), + color: partial_u8_bits_to_u8(&raw_beard_details[3..5]), + scale: partial_u8_bits_to_u8(&raw_beard_details[6..9]), + y_position: partial_u8_bits_to_u8(&raw_beard_details[10..14]), }; let glass_details = GlassDetails { - style: partial_vec_to_u8_with_reverse(&raw_glass_details[0..3]), - color: partial_vec_to_u8_with_reverse(&raw_glass_details[4..6]), - scale: partial_vec_to_u8_with_reverse(&raw_glass_details[7..10]), - y_position: partial_vec_to_u8_with_reverse(&raw_glass_details[11..15]), + style: partial_u8_bits_to_u8(&raw_glass_details[0..3]), + color: partial_u8_bits_to_u8(&raw_glass_details[4..6]), + scale: partial_u8_bits_to_u8(&raw_glass_details[7..10]), + y_position: partial_u8_bits_to_u8(&raw_glass_details[11..15]), }; let mole_details = MoleDetails { is_enabled: raw_mole_details[0], - scale: partial_vec_to_u8_with_reverse(&raw_mole_details[1..4]), - x_position: partial_vec_to_u8_with_reverse(&raw_mole_details[5..9]), - y_position: partial_vec_to_u8_with_reverse(&raw_mole_details[10..14]), + scale: partial_u8_bits_to_u8(&raw_mole_details[1..4]), + x_position: partial_u8_bits_to_u8(&raw_mole_details[5..9]), + y_position: partial_u8_bits_to_u8(&raw_mole_details[10..14]), }; MiiData { @@ -411,12 +411,10 @@ fn vec_bit_to_u8(data: [bool; 8]) -> u8 { .fold(0, |result, bit| (result << 1) ^ u8::from(bit)) } -/// The reverse allows to write things on a more _humane_ way, but return a LE u8 -fn partial_vec_to_u8_with_reverse(data: &[bool]) -> u8 { +fn partial_u8_bits_to_u8(data: &[bool]) -> u8 { let leading_zeroes_to_add = 8 - data.len(); let leading_zeroes = vec![false; leading_zeroes_to_add]; let mut val = [data, leading_zeroes.as_slice()].concat(); - val.reverse(); vec_bit_to_u8(val.try_into().unwrap()) } From 91f65a0a558900fa45c7861a6f8fdabb0d21c646 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 14:12:07 +0200 Subject: [PATCH 42/57] Add docs --- ctru-rs/src/applets/mii_selector.rs | 41 +++++++++++++++++++++++++++-- ctru-rs/src/mii.rs | 33 +++++++++++++++++++++-- 2 files changed, 70 insertions(+), 4 deletions(-) diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index d4fe6d1..342b797 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -1,13 +1,20 @@ +//! Mii Selector applet +//! +//! This module contains the methods to launch the Mii Selector. + use crate::mii::MiiData; use bitflags::bitflags; use std::ffi::CString; +/// Index of a Mii used to configure some parameters of the Mii Selector +/// Can be either a single index, or _all_ Miis #[derive(Debug, Clone)] pub enum MiiConfigIndex { Index(u32), All, } +/// The type of a Mii with their respective data #[derive(Debug, Clone)] pub enum MiiType { Guest { index: u32, name: String }, @@ -15,19 +22,36 @@ pub enum MiiType { } bitflags! { + /// Options for the Mii Selector pub struct Options: u32 { + /// Show the cancel button const MII_SELECTOR_CANCEL = ctru_sys::MIISELECTOR_CANCEL; + /// Make guest Miis selectable const MII_SELECTOR_GUESTS = ctru_sys::MIISELECTOR_GUESTS; + /// Show on the top screen const MII_SELECTOR_TOP = ctru_sys::MIISELECTOR_TOP; + /// Start on the guest's page const MII_SELECTOR_GUEST_START = ctru_sys::MIISELECTOR_GUESTSTART; } } +/// An instance of the Mii Selector +/// +/// # Example +/// ``` +/// use ctru::applets::mii_selector::MiiSelector; +/// +/// let mut mii_selector = MiiSelector::init(); +/// mii_selector.set_title("Example Mii selector"); +/// +/// let result = mii_selector.launch().unwrap(); +/// ``` #[derive(Clone, Debug)] pub struct MiiSelector { config: Box, } +/// Return value from a MiiSelector's launch #[derive(Clone, Debug)] pub struct MiiSelectorReturn { pub mii_data: MiiData, @@ -36,12 +60,14 @@ pub struct MiiSelectorReturn { pub checksum: u16, } +/// Error type for the Mii selector #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum MiiLaunchError { InvalidChecksum, } impl MiiSelector { + /// Initializes a Mii Selector pub fn init() -> Self { let mut config = Box::::default(); unsafe { @@ -50,6 +76,7 @@ impl MiiSelector { Self { config } } + /// Set the title of the Mii Selector pub fn set_title(&mut self, text: &str) { // This can only fail if the text contains NUL bytes in the string... which seems // unlikely and is documented @@ -59,10 +86,12 @@ impl MiiSelector { } } + /// Set the options of the Mii Selector pub fn set_options(&mut self, options: Options) { unsafe { ctru_sys::miiSelectorSetOptions(self.config.as_mut(), options.bits) } } + /// Whitelist a guest Mii pub fn whitelist_guest_mii(&mut self, mii_index: MiiConfigIndex) { let index = match mii_index { MiiConfigIndex::Index(i) => i, @@ -72,6 +101,7 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), index) } } + /// Blacklist a guest Mii pub fn blacklist_guest_mii(&mut self, mii_index: MiiConfigIndex) { let index = match mii_index { MiiConfigIndex::Index(i) => i, @@ -81,6 +111,7 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), index) } } + /// Whitelist a user Mii pub fn whitelist_user_mii(&mut self, mii_index: MiiConfigIndex) { let index = match mii_index { MiiConfigIndex::Index(i) => i, @@ -90,6 +121,7 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), index) } } + /// Blacklist a user Mii pub fn blacklist_user_mii(&mut self, mii_index: MiiConfigIndex) { let index = match mii_index { MiiConfigIndex::Index(i) => i, @@ -99,12 +131,17 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), index) } } - // This function is static inline in libctru - // https://github.com/devkitPro/libctru/blob/af5321c78ee5c72a55b526fd2ed0d95ca1c05af9/libctru/include/3ds/applets/miiselector.h#L155 + + /// Set where the cursor will be. + /// If there's no Mii at that index, the cursor will start at the Mii with the index 0 pub fn set_initial_index(&mut self, index: u32) { + // This function is static inline in libctru + // https://github.com/devkitPro/libctru/blob/af5321c78ee5c72a55b526fd2ed0d95ca1c05af9/libctru/include/3ds/applets/miiselector.h#L155 self.config.initial_index = index } + /// Launch the Mii Selector. + /// Returns an error when the checksum of the Mii is invalid. pub fn launch(&mut self) -> Result { let mut return_val = Box::::default(); unsafe { ctru_sys::miiSelectorLaunch(self.config.as_mut(), return_val.as_mut()) } diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index b969c78..b40c836 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -1,3 +1,9 @@ +//! Mii Data +//! +//! This module contains the structs that represent all the data of a Mii. +//! This data is given by the [``MiiSelector``] + +/// Represents the region lock of the console #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum RegionLock { None, @@ -6,6 +12,7 @@ pub enum RegionLock { Europe, } +/// Represent the charset of the console #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Charset { JapanUSAEurope, @@ -14,6 +21,7 @@ pub enum Charset { Taiwan, } +/// Represents the options of the Mii #[derive(Copy, Clone, Debug)] pub struct MiiDataOptions { pub is_copying_allowed: bool, @@ -22,12 +30,14 @@ pub struct MiiDataOptions { pub charset: Charset, } +/// Represents the position that the Mii has on the selector #[derive(Copy, Clone, Debug)] pub struct SelectorPosition { pub page_index: u8, pub slot_index: u8, } +/// Represents the kind of origin console #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum OriginConsole { ConsoleWii, @@ -36,17 +46,20 @@ pub enum OriginConsole { ConsoleWiiUSwitch, } +/// Represents the identity of the origin console #[derive(Copy, Clone, Debug)] pub struct ConsoleIdentity { pub origin_console: OriginConsole, } +/// Represents the sex of the Mii #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum MiiSex { Male, Female, } +/// Represents the details of the Mii #[derive(Copy, Clone, Debug)] pub struct Details { pub sex: MiiSex, @@ -56,6 +69,7 @@ pub struct Details { pub is_favorite: bool, } +/// Represents the face style of the Mii #[derive(Copy, Clone, Debug)] pub struct FaceStyle { pub is_sharing_enabled: bool, @@ -63,18 +77,21 @@ pub struct FaceStyle { pub skin_color: u8, } +/// Represents the face details of the Mii #[derive(Copy, Clone, Debug)] pub struct FaceDetails { pub wrinkles: u8, pub makeup: u8, } +/// Represents the hair details of the Mii #[derive(Copy, Clone, Debug)] pub struct HairDetails { pub color: u8, pub is_flipped: bool, } +/// Represents the eye details of the Mii #[derive(Copy, Clone, Debug)] pub struct EyeDetails { pub style: u8, @@ -82,10 +99,12 @@ pub struct EyeDetails { pub scale: u8, pub y_scale: u8, pub rotation: u8, + /// Spacing between the eyes pub x_spacing: u8, pub y_position: u8, } +/// Represents the eyebrow details of the Mii #[derive(Copy, Clone, Debug)] pub struct EyebrowDetails { pub style: u8, @@ -93,10 +112,12 @@ pub struct EyebrowDetails { pub scale: u8, pub y_scale: u8, pub rotation: u8, + /// Spacing between the eyebrows pub x_spacing: u8, pub y_position: u8, } +/// Represents the details of the nose #[derive(Copy, Clone, Debug)] pub struct NoseDetails { pub style: u8, @@ -104,6 +125,7 @@ pub struct NoseDetails { pub y_position: u8, } +/// Represents the details of the mouth #[derive(Copy, Clone, Debug)] pub struct MouthDetails { pub style: u8, @@ -112,12 +134,14 @@ pub struct MouthDetails { pub y_scale: u8, } +/// Represents the details of the mustache #[derive(Copy, Clone, Debug)] pub struct MustacheDetails { pub mouth_y_position: u8, pub mustache_style: u8, } +/// Represents the details of the beard #[derive(Copy, Clone, Debug)] pub struct BeardDetails { pub style: u8, @@ -126,6 +150,7 @@ pub struct BeardDetails { pub y_position: u8, } +/// Represents the details of the glass #[derive(Copy, Clone, Debug)] pub struct GlassDetails { pub style: u8, @@ -134,6 +159,7 @@ pub struct GlassDetails { pub y_position: u8, } +/// Represents the details of the mole #[derive(Copy, Clone, Debug)] pub struct MoleDetails { pub is_enabled: bool, @@ -142,12 +168,14 @@ pub struct MoleDetails { pub y_position: u8, } +/// Represents all the data of a Mii #[derive(Clone, Debug)] pub struct MiiData { pub options: MiiDataOptions, pub selector_position: SelectorPosition, pub console_identity: ConsoleIdentity, + /// Unique system ID, not dependant on the MAC address pub system_id: [u8; 8], pub mac_address: [u8; 6], @@ -411,11 +439,12 @@ fn vec_bit_to_u8(data: [bool; 8]) -> u8 { .fold(0, |result, bit| (result << 1) ^ u8::from(bit)) } +/// Given a series of LE bits, they are filled until a full LE u8 is reached fn partial_u8_bits_to_u8(data: &[bool]) -> u8 { let leading_zeroes_to_add = 8 - data.len(); let leading_zeroes = vec![false; leading_zeroes_to_add]; - let mut val = [data, leading_zeroes.as_slice()].concat(); - vec_bit_to_u8(val.try_into().unwrap()) + + vec_bit_to_u8([data, &leading_zeroes].concat().try_into().unwrap()) } /// UTF-16 Strings are give in pairs of bytes (u8), this converts them into an _actual_ string From 441ab930cf9ca58fb8ea1185490a5507b8c47642 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 14:46:21 +0200 Subject: [PATCH 43/57] Document values sometimes not being straight forward --- ctru-rs/src/mii.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index b40c836..2c2f845 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -169,6 +169,9 @@ pub struct MoleDetails { } /// Represents all the data of a Mii +/// +/// Some values are not ordered _like_ the Mii Editor UI. The mapped values can be seen here: +/// #[derive(Clone, Debug)] pub struct MiiData { pub options: MiiDataOptions, From f8baff0819d1631b650c678b20ff590fac3e1650 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 14:48:29 +0200 Subject: [PATCH 44/57] Cargo fmt --- ctru-rs/src/applets/mii_selector.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index 342b797..c90e8ad 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -131,7 +131,6 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorBlacklistUserMii(self.config.as_mut(), index) } } - /// Set where the cursor will be. /// If there's no Mii at that index, the cursor will start at the Mii with the index 0 pub fn set_initial_index(&mut self, index: u32) { From 1310507fcb0886a29fc20c819ce8ee46ea40373d Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 14:51:30 +0200 Subject: [PATCH 45/57] Document ``set_title`` input and NUL bytes --- ctru-rs/src/applets/mii_selector.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index c90e8ad..3bbcedc 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -76,7 +76,9 @@ impl MiiSelector { Self { config } } - /// Set the title of the Mii Selector + /// Set the title of the Mii Selector. + /// + /// This function would panic if the given ``&str`` contains NUL bytes. pub fn set_title(&mut self, text: &str) { // This can only fail if the text contains NUL bytes in the string... which seems // unlikely and is documented From 4d88ba990112ad2a80bc76ec1929995fdb16f359 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 15:17:34 +0200 Subject: [PATCH 46/57] Fix rustdoc link --- ctru-rs/src/mii.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index 2c2f845..2f3fc51 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -1,7 +1,7 @@ //! Mii Data //! //! This module contains the structs that represent all the data of a Mii. -//! This data is given by the [``MiiSelector``] +//! This data is given by the [``MiiSelector``](crate::applets::mii_selector::MiiSelector) /// Represents the region lock of the console #[derive(Copy, Clone, Debug, Eq, PartialEq)] From 7c2440432acfcc1f6dfbc92e8d81a5651929ca9a Mon Sep 17 00:00:00 2001 From: TechiePi Date: Mon, 24 Oct 2022 18:19:20 +0200 Subject: [PATCH 47/57] Move some styles inside the their details struct for consistency --- ctru-rs/src/mii.rs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index 2f3fc51..85ac191 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -80,6 +80,7 @@ pub struct FaceStyle { /// Represents the face details of the Mii #[derive(Copy, Clone, Debug)] pub struct FaceDetails { + pub style: FaceStyle, pub wrinkles: u8, pub makeup: u8, } @@ -87,6 +88,7 @@ pub struct FaceDetails { /// Represents the hair details of the Mii #[derive(Copy, Clone, Debug)] pub struct HairDetails { + pub style: u8, pub color: u8, pub is_flipped: bool, } @@ -188,11 +190,7 @@ pub struct MiiData { pub height: u8, pub width: u8, - pub face_style: FaceStyle, pub face_details: FaceDetails, - - pub hair_style: u8, - pub hair_details: HairDetails, pub eye_details: EyeDetails, pub eyebrow_details: EyebrowDetails, @@ -239,7 +237,6 @@ impl From for MiiData { let width = raw_mii_data[0x2F]; let raw_face_style = vec_bit(raw_mii_data[0x30]); let raw_face_details = vec_bit(raw_mii_data[0x31]); - let hair_style = raw_mii_data[0x32]; let raw_hair_details = vec_bit(raw_mii_data[0x33]); let raw_eye_details: [bool; 32] = get_and_concat_vec_bit(&raw_mii_data, &[0x34, 0x35, 0x36, 0x37]) @@ -322,18 +319,18 @@ impl From for MiiData { is_favorite: raw_details[14], }; - let face_style = FaceStyle { - is_sharing_enabled: !raw_face_style[1], - shape: partial_u8_bits_to_u8(&raw_face_style[1..4]), - skin_color: partial_u8_bits_to_u8(&raw_face_style[5..7]), - }; - let face_details = FaceDetails { + style: FaceStyle { + is_sharing_enabled: !raw_face_style[1], + shape: partial_u8_bits_to_u8(&raw_face_style[1..4]), + skin_color: partial_u8_bits_to_u8(&raw_face_style[5..7]), + }, wrinkles: partial_u8_bits_to_u8(&raw_face_details[0..3]), makeup: partial_u8_bits_to_u8(&raw_face_details[4..7]), }; let hair_details = HairDetails { + style: raw_mii_data[0x32], color: partial_u8_bits_to_u8(&raw_hair_details[0..2]), is_flipped: raw_hair_details[3], }; @@ -407,9 +404,7 @@ impl From for MiiData { name: mii_name, height, width, - face_style, face_details, - hair_style, hair_details, eye_details, eyebrow_details, From 16f8de4376eff55ada9fc74393d0b562e92f08e2 Mon Sep 17 00:00:00 2001 From: TechiePi Date: Wed, 26 Oct 2022 17:05:23 +0200 Subject: [PATCH 48/57] Address comments - Make ``MiiSelectorReturn`` ``non_exhaustive`` - Remove ``checksum`` from ``MiiSelectorReturn`` - Change ``From`` impl for ``MiiSelectorReturn`` - Rename ``OriginConsole`` members - Fix ranges --- ctru-rs/examples/mii-selector.rs | 1 - ctru-rs/src/applets/mii_selector.rs | 10 ++- ctru-rs/src/mii.rs | 107 ++++++++++++++-------------- 3 files changed, 58 insertions(+), 60 deletions(-) diff --git a/ctru-rs/examples/mii-selector.rs b/ctru-rs/examples/mii-selector.rs index 1b89532..975fda0 100644 --- a/ctru-rs/examples/mii-selector.rs +++ b/ctru-rs/examples/mii-selector.rs @@ -18,7 +18,6 @@ fn main() { println!("Is Mii selected?: {:?}", result.is_mii_selected); println!("Mii type: {:?}", result.mii_type); - println!("Mii checksum: {:?}", result.checksum); println!("Name: {:?}", result.mii_data.name); println!("Author: {:?}", result.mii_data.author_name); println!( diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index 3bbcedc..fef106b 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -52,12 +52,12 @@ pub struct MiiSelector { } /// Return value from a MiiSelector's launch +#[non_exhaustive] #[derive(Clone, Debug)] pub struct MiiSelectorReturn { pub mii_data: MiiData, pub is_mii_selected: bool, pub mii_type: MiiType, - pub checksum: u16, } /// Error type for the Mii selector @@ -148,16 +148,15 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorLaunch(self.config.as_mut(), return_val.as_mut()) } if unsafe { ctru_sys::miiSelectorChecksumIsValid(return_val.as_mut()) } { - Ok(return_val.into()) + Ok((*return_val).into()) } else { Err(MiiLaunchError::InvalidChecksum) } } } -impl From> for MiiSelectorReturn { - fn from(ret: Box) -> Self { - let checksum = ret.checksum; +impl From for MiiSelectorReturn { + fn from(ret: ctru_sys::MiiSelectorReturn) -> Self { let raw_mii_data = ret.mii; let no_mii_selected = ret.no_mii_selected; let guest_mii_index_clone = ret.guest_mii_index; @@ -178,7 +177,6 @@ impl From> for MiiSelectorReturn { } else { MiiType::User }, - checksum, } } } diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index 85ac191..e4ebcb4 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -40,10 +40,11 @@ pub struct SelectorPosition { /// Represents the kind of origin console #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum OriginConsole { - ConsoleWii, - ConsoleDSi, - Console3DS, - ConsoleWiiUSwitch, + Wii, + DSi, + /// Both New 3DS and Old 3DS + N3DS, + WiiUSwitch, } /// Represents the identity of the origin console @@ -291,17 +292,17 @@ impl From for MiiData { }; let position = SelectorPosition { - page_index: partial_u8_bits_to_u8(&raw_position[0..3]), - slot_index: partial_u8_bits_to_u8(&raw_position[4..7]), + page_index: partial_u8_bits_to_u8(&raw_position[0..=3]), + slot_index: partial_u8_bits_to_u8(&raw_position[4..=7]), }; let device = ConsoleIdentity { origin_console: { match (raw_device[6], raw_device[5], raw_device[4]) { - (false, false, true) => OriginConsole::ConsoleWii, - (false, true, false) => OriginConsole::ConsoleDSi, - (false, true, true) => OriginConsole::Console3DS, - _ => OriginConsole::ConsoleWiiUSwitch, + (false, false, true) => OriginConsole::Wii, + (false, true, false) => OriginConsole::DSi, + (false, true, true) => OriginConsole::N3DS, + _ => OriginConsole::WiiUSwitch, } }, }; @@ -313,85 +314,85 @@ impl From for MiiData { false => MiiSex::Male, } }, - birthday_month: partial_u8_bits_to_u8(&raw_details[1..4]), - birthday_day: partial_u8_bits_to_u8(&raw_details[5..9]), - shirt_color: partial_u8_bits_to_u8(&raw_details[10..13]), + birthday_month: partial_u8_bits_to_u8(&raw_details[1..=4]), + birthday_day: partial_u8_bits_to_u8(&raw_details[5..=9]), + shirt_color: partial_u8_bits_to_u8(&raw_details[10..=13]), is_favorite: raw_details[14], }; let face_details = FaceDetails { style: FaceStyle { - is_sharing_enabled: !raw_face_style[1], - shape: partial_u8_bits_to_u8(&raw_face_style[1..4]), - skin_color: partial_u8_bits_to_u8(&raw_face_style[5..7]), + is_sharing_enabled: !raw_face_style[0], + shape: partial_u8_bits_to_u8(&raw_face_style[1..=4]), + skin_color: partial_u8_bits_to_u8(&raw_face_style[5..=7]), }, - wrinkles: partial_u8_bits_to_u8(&raw_face_details[0..3]), - makeup: partial_u8_bits_to_u8(&raw_face_details[4..7]), + wrinkles: partial_u8_bits_to_u8(&raw_face_details[0..=3]), + makeup: partial_u8_bits_to_u8(&raw_face_details[4..=7]), }; let hair_details = HairDetails { style: raw_mii_data[0x32], - color: partial_u8_bits_to_u8(&raw_hair_details[0..2]), + color: partial_u8_bits_to_u8(&raw_hair_details[0..=2]), is_flipped: raw_hair_details[3], }; let eye_details = EyeDetails { - style: partial_u8_bits_to_u8(&raw_eye_details[0..5]), - color: partial_u8_bits_to_u8(&raw_eye_details[6..8]), - scale: partial_u8_bits_to_u8(&raw_eye_details[9..12]), - y_scale: partial_u8_bits_to_u8(&raw_eye_details[13..15]), - rotation: partial_u8_bits_to_u8(&raw_eye_details[16..20]), - x_spacing: partial_u8_bits_to_u8(&raw_eye_details[21..24]), - y_position: partial_u8_bits_to_u8(&raw_eye_details[25..29]), + style: partial_u8_bits_to_u8(&raw_eye_details[0..=5]), + color: partial_u8_bits_to_u8(&raw_eye_details[6..=8]), + scale: partial_u8_bits_to_u8(&raw_eye_details[9..=12]), + y_scale: partial_u8_bits_to_u8(&raw_eye_details[13..=15]), + rotation: partial_u8_bits_to_u8(&raw_eye_details[16..=20]), + x_spacing: partial_u8_bits_to_u8(&raw_eye_details[21..=24]), + y_position: partial_u8_bits_to_u8(&raw_eye_details[25..=29]), }; let eyebrow_details = EyebrowDetails { - style: partial_u8_bits_to_u8(&raw_eyebrow_details[0..4]), - color: partial_u8_bits_to_u8(&raw_eyebrow_details[5..7]), - scale: partial_u8_bits_to_u8(&raw_eyebrow_details[8..11]), - y_scale: partial_u8_bits_to_u8(&raw_eyebrow_details[12..14]), - rotation: partial_u8_bits_to_u8(&raw_eyebrow_details[16..19]), - x_spacing: partial_u8_bits_to_u8(&raw_eyebrow_details[21..24]), - y_position: partial_u8_bits_to_u8(&raw_eyebrow_details[25..29]), + style: partial_u8_bits_to_u8(&raw_eyebrow_details[0..=4]), + color: partial_u8_bits_to_u8(&raw_eyebrow_details[5..=7]), + scale: partial_u8_bits_to_u8(&raw_eyebrow_details[8..=11]), + y_scale: partial_u8_bits_to_u8(&raw_eyebrow_details[12..=14]), + rotation: partial_u8_bits_to_u8(&raw_eyebrow_details[16..=19]), + x_spacing: partial_u8_bits_to_u8(&raw_eyebrow_details[21..=24]), + y_position: partial_u8_bits_to_u8(&raw_eyebrow_details[25..=29]), }; let nose_details = NoseDetails { - style: partial_u8_bits_to_u8(&raw_nose_details[0..4]), - scale: partial_u8_bits_to_u8(&raw_nose_details[5..8]), - y_position: partial_u8_bits_to_u8(&raw_nose_details[9..13]), + style: partial_u8_bits_to_u8(&raw_nose_details[0..=4]), + scale: partial_u8_bits_to_u8(&raw_nose_details[5..=8]), + y_position: partial_u8_bits_to_u8(&raw_nose_details[9..=13]), }; let mouth_details = MouthDetails { - style: partial_u8_bits_to_u8(&raw_mouth_details[0..5]), - color: partial_u8_bits_to_u8(&raw_mouth_details[6..8]), - scale: partial_u8_bits_to_u8(&raw_mouth_details[9..12]), - y_scale: partial_u8_bits_to_u8(&raw_mouth_details[13..15]), + style: partial_u8_bits_to_u8(&raw_mouth_details[0..=5]), + color: partial_u8_bits_to_u8(&raw_mouth_details[6..=8]), + scale: partial_u8_bits_to_u8(&raw_mouth_details[9..=12]), + y_scale: partial_u8_bits_to_u8(&raw_mouth_details[13..=15]), }; let mustache_details = MustacheDetails { - mouth_y_position: partial_u8_bits_to_u8(&raw_mustache_details[0..4]), - mustache_style: partial_u8_bits_to_u8(&raw_mustache_details[5..7]), + mouth_y_position: partial_u8_bits_to_u8(&raw_mustache_details[0..=4]), + mustache_style: partial_u8_bits_to_u8(&raw_mustache_details[5..=7]), }; let beard_details = BeardDetails { - style: partial_u8_bits_to_u8(&raw_beard_details[0..2]), - color: partial_u8_bits_to_u8(&raw_beard_details[3..5]), - scale: partial_u8_bits_to_u8(&raw_beard_details[6..9]), - y_position: partial_u8_bits_to_u8(&raw_beard_details[10..14]), + style: partial_u8_bits_to_u8(&raw_beard_details[0..=2]), + color: partial_u8_bits_to_u8(&raw_beard_details[3..=5]), + scale: partial_u8_bits_to_u8(&raw_beard_details[6..=9]), + y_position: partial_u8_bits_to_u8(&raw_beard_details[10..=14]), }; let glass_details = GlassDetails { - style: partial_u8_bits_to_u8(&raw_glass_details[0..3]), - color: partial_u8_bits_to_u8(&raw_glass_details[4..6]), - scale: partial_u8_bits_to_u8(&raw_glass_details[7..10]), - y_position: partial_u8_bits_to_u8(&raw_glass_details[11..15]), + style: partial_u8_bits_to_u8(&raw_glass_details[0..=3]), + color: partial_u8_bits_to_u8(&raw_glass_details[4..=6]), + scale: partial_u8_bits_to_u8(&raw_glass_details[7..=10]), + y_position: partial_u8_bits_to_u8(&raw_glass_details[11..=15]), }; let mole_details = MoleDetails { is_enabled: raw_mole_details[0], - scale: partial_u8_bits_to_u8(&raw_mole_details[1..4]), - x_position: partial_u8_bits_to_u8(&raw_mole_details[5..9]), - y_position: partial_u8_bits_to_u8(&raw_mole_details[10..14]), + scale: partial_u8_bits_to_u8(&raw_mole_details[1..=4]), + x_position: partial_u8_bits_to_u8(&raw_mole_details[5..=9]), + y_position: partial_u8_bits_to_u8(&raw_mole_details[10..=14]), }; MiiData { From accf99b2bb6ac264430f4f04e263fd27243e851a Mon Sep 17 00:00:00 2001 From: TechiePi Date: Wed, 26 Oct 2022 17:19:38 +0200 Subject: [PATCH 49/57] Apply cargo check suggestions Apply nightly lints I updated my toolchain to 1.66-nightly to fix all the files --- ctru-rs/build.rs | 2 +- ctru-rs/examples/file-explorer.rs | 14 +++++++------- ctru-rs/examples/hashmaps.rs | 2 +- ctru-rs/examples/network-sockets.rs | 10 +++++----- ctru-rs/examples/software-keyboard.rs | 2 +- ctru-rs/examples/time-rtc.rs | 4 ++-- ctru-rs/src/error.rs | 6 +++--- ctru-rs/src/services/fs.rs | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ctru-rs/build.rs b/ctru-rs/build.rs index ecdef33..f65d194 100644 --- a/ctru-rs/build.rs +++ b/ctru-rs/build.rs @@ -28,5 +28,5 @@ fn main() { println!("cargo:rustc-cfg=romfs_exists"); } - println!("cargo:rerun-if-changed={}", manifest_dir); + println!("cargo:rerun-if-changed={manifest_dir}"); } diff --git a/ctru-rs/examples/file-explorer.rs b/ctru-rs/examples/file-explorer.rs index ff6296f..1cff988 100644 --- a/ctru-rs/examples/file-explorer.rs +++ b/ctru-rs/examples/file-explorer.rs @@ -96,7 +96,7 @@ impl<'a> FileExplorer<'a> { } } Err(e) => { - println!("Failed to read {}: {}", self.path.display(), e) + println!("Failed to read {}: {e}", self.path.display()) } }; @@ -110,7 +110,7 @@ impl<'a> FileExplorer<'a> { for (i, entry) in dir_listing.enumerate() { match entry { Ok(entry) => { - println!("{:2} - {}", i, entry.file_name().to_string_lossy()); + println!("{i:2} - {}", entry.file_name().to_string_lossy()); self.entries.push(entry); if (i + 1) % 20 == 0 { @@ -118,7 +118,7 @@ impl<'a> FileExplorer<'a> { } } Err(e) => { - println!("{} - Error: {}", i, e); + println!("{i} - Error: {e}"); } } } @@ -132,7 +132,7 @@ impl<'a> FileExplorer<'a> { println!("{0:->80}", ""); } Err(err) => { - println!("Error reading file: {}", err); + println!("Error reading file: {err}"); } } } @@ -175,7 +175,7 @@ impl<'a> FileExplorer<'a> { unreachable!() } Err(e) => { - panic!("Error: {:?}", e) + panic!("Error: {e:?}") } } } @@ -184,7 +184,7 @@ impl<'a> FileExplorer<'a> { let next_path_index: usize = match next_path_index.parse() { Ok(index) => index, Err(e) => { - println!("Number parsing error: {}", e); + println!("Number parsing error: {e}"); return; } }; @@ -205,7 +205,7 @@ impl<'a> FileExplorer<'a> { fn set_exact_path(&mut self, new_path_str: String) { let new_path = Path::new(&new_path_str); if !new_path.is_dir() { - println!("Not a directory: {}", new_path_str); + println!("Not a directory: {new_path_str}"); return; } diff --git a/ctru-rs/examples/hashmaps.rs b/ctru-rs/examples/hashmaps.rs index 3218dc5..694752c 100644 --- a/ctru-rs/examples/hashmaps.rs +++ b/ctru-rs/examples/hashmaps.rs @@ -17,7 +17,7 @@ fn main() { map.insert("Another key?", 543); map.remove("A Key!"); - println!("{:#?}", map); + println!("{map:#?}"); while apt.main_loop() { gfx.flush_buffers(); diff --git a/ctru-rs/examples/network-sockets.rs b/ctru-rs/examples/network-sockets.rs index a0b64d0..89a1212 100644 --- a/ctru-rs/examples/network-sockets.rs +++ b/ctru-rs/examples/network-sockets.rs @@ -25,19 +25,19 @@ fn main() { match server.accept() { Ok((mut stream, socket_addr)) => { - println!("Got connection from {}", socket_addr); + println!("Got connection from {socket_addr}"); let mut buf = [0u8; 4096]; match stream.read(&mut buf) { Ok(_) => { let req_str = String::from_utf8_lossy(&buf); - println!("{}", req_str); + println!("{req_str}"); } Err(e) => { if e.kind() == io::ErrorKind::WouldBlock { println!("Note: Reading the connection returned ErrorKind::WouldBlock.") } else { - println!("Unable to read stream: {}", e) + println!("Unable to read stream: {e}") } } } @@ -45,7 +45,7 @@ fn main() { let response = b"HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\n\r\nHello world\r\n"; if let Err(e) = stream.write(response) { - println!("Error writing http response: {}", e); + println!("Error writing http response: {e}"); } stream.shutdown(Shutdown::Both).unwrap(); @@ -53,7 +53,7 @@ fn main() { Err(e) => match e.kind() { std::io::ErrorKind::WouldBlock => {} _ => { - println!("Error accepting connection: {}", e); + println!("Error accepting connection: {e}"); std::thread::sleep(Duration::from_secs(2)); } }, diff --git a/ctru-rs/examples/software-keyboard.rs b/ctru-rs/examples/software-keyboard.rs index b830811..888a157 100644 --- a/ctru-rs/examples/software-keyboard.rs +++ b/ctru-rs/examples/software-keyboard.rs @@ -29,7 +29,7 @@ fn main() { // Raise the software keyboard. You can perform different actions depending on which // software button the user pressed match keyboard.get_utf8(&mut text) { - Ok(Button::Right) => println!("You entered: {}", text), + Ok(Button::Right) => println!("You entered: {text}"), Ok(Button::Left) => println!("Cancelled"), Ok(Button::Middle) => println!("How did you even press this?"), Err(_) => println!("Oh noes, an error happened!"), diff --git a/ctru-rs/examples/time-rtc.rs b/ctru-rs/examples/time-rtc.rs index 1554a21..219abda 100644 --- a/ctru-rs/examples/time-rtc.rs +++ b/ctru-rs/examples/time-rtc.rs @@ -33,8 +33,8 @@ fn main() { let day = cur_time.day(); let year = cur_time.year(); - println!("\x1b[1;1H{:0>2}:{:0>2}:{:0>2}", hours, minutes, seconds); - println!("{} {} {} {}", weekday, month, day, year); + println!("\x1b[1;1H{hours:0>2}:{minutes:0>2}:{seconds:0>2}"); + println!("{weekday} {month} {day} {year}"); // Flush and swap framebuffers gfx.flush_buffers(); diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 650ab7a..5054ada 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -87,7 +87,7 @@ impl fmt::Debug for Error { match self { &Self::Os(err) => f .debug_struct("Error") - .field("raw", &format_args!("{:#08X}", err)) + .field("raw", &format_args!("{err:#08X}")) .field("description", &R_DESCRIPTION(err)) .field("module", &R_MODULE(err)) .field("summary", &R_SUMMARY(err)) @@ -106,8 +106,8 @@ impl fmt::Debug for Error { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - &Self::Os(err) => write!(f, "libctru result code: 0x{:08X}", err), - Self::Libc(err) => write!(f, "{}", err), + &Self::Os(err) => write!(f, "libctru result code: 0x{err:08X}"), + Self::Libc(err) => write!(f, "{err}"), Self::ServiceAlreadyActive => write!(f, "Service already active"), Self::OutputAlreadyRedirected => { write!(f, "output streams are already redirected to 3dslink") diff --git a/ctru-rs/src/services/fs.rs b/ctru-rs/src/services/fs.rs index d86cb55..64da9c3 100644 --- a/ctru-rs/src/services/fs.rs +++ b/ctru-rs/src/services/fs.rs @@ -669,7 +669,7 @@ impl<'a> DirEntry<'a> { /// The full path is created by joining the original path to `read_dir` /// with the filename of this entry. pub fn path(&self) -> PathBuf { - self.root.join(&self.file_name()) + self.root.join(self.file_name()) } /// Return the metadata for the file that this entry points at. From 01e9c7062972ba888d02f8ddb7bfd938039b560c Mon Sep 17 00:00:00 2001 From: TechiePi Date: Wed, 2 Nov 2022 21:20:46 +0100 Subject: [PATCH 50/57] Address comments --- ctru-rs/src/applets/mii_selector.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index fef106b..d324055 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -158,16 +158,14 @@ impl MiiSelector { impl From for MiiSelectorReturn { fn from(ret: ctru_sys::MiiSelectorReturn) -> Self { let raw_mii_data = ret.mii; - let no_mii_selected = ret.no_mii_selected; - let guest_mii_index_clone = ret.guest_mii_index; let mut guest_mii_name = ret.guest_mii_name; MiiSelectorReturn { mii_data: raw_mii_data.into(), - is_mii_selected: no_mii_selected == 0, - mii_type: if guest_mii_index_clone != 0xFFFFFFFF { + is_mii_selected: ret.no_mii_selected == 0, + mii_type: if ret.guest_mii_index != 0xFFFFFFFF { MiiType::Guest { - index: guest_mii_index_clone, + index: ret.guest_mii_index, name: { let utf16_be = &mut guest_mii_name; utf16_be.reverse(); From 42345d10a803396c532a6fb80b015ff49004f50e Mon Sep 17 00:00:00 2001 From: TechiePi Date: Wed, 9 Nov 2022 10:24:36 +0100 Subject: [PATCH 51/57] Rename a few variables and document skipped bits --- ctru-rs/src/mii.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index e4ebcb4..17cb9bf 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -175,6 +175,8 @@ pub struct MoleDetails { /// /// Some values are not ordered _like_ the Mii Editor UI. The mapped values can be seen here: /// +/// +/// This struct is returned by the [``MiiSelector``](crate::applets::mii_selector::MiiSelector) #[derive(Clone, Debug)] pub struct MiiData { pub options: MiiDataOptions, @@ -222,7 +224,7 @@ impl From for MiiData { raw_mii_data[0xA], raw_mii_data[0xB], ]; - let creator_mac = [ + let mac_address = [ raw_mii_data[0x10], raw_mii_data[0x11], raw_mii_data[0x12], @@ -267,7 +269,7 @@ impl From for MiiData { .unwrap(); let raw_utf16_author = &raw_mii_data[0x48..0x5C]; - let mii_name = utf16_byte_pairs_to_string(raw_utf16_name); + let name = utf16_byte_pairs_to_string(raw_utf16_name); let author_name = utf16_byte_pairs_to_string(raw_utf16_author); let options = MiiDataOptions { @@ -291,12 +293,12 @@ impl From for MiiData { }, }; - let position = SelectorPosition { + let selector_position = SelectorPosition { page_index: partial_u8_bits_to_u8(&raw_position[0..=3]), slot_index: partial_u8_bits_to_u8(&raw_position[4..=7]), }; - let device = ConsoleIdentity { + let console_identity = ConsoleIdentity { origin_console: { match (raw_device[6], raw_device[5], raw_device[4]) { (false, false, true) => OriginConsole::Wii, @@ -350,6 +352,8 @@ impl From for MiiData { style: partial_u8_bits_to_u8(&raw_eyebrow_details[0..=4]), color: partial_u8_bits_to_u8(&raw_eyebrow_details[5..=7]), scale: partial_u8_bits_to_u8(&raw_eyebrow_details[8..=11]), + // Bits are skipped here, following the 3dbrew wiki: + // https://www.3dbrew.org/wiki/Mii#Mii_format offset 0x38 y_scale: partial_u8_bits_to_u8(&raw_eyebrow_details[12..=14]), rotation: partial_u8_bits_to_u8(&raw_eyebrow_details[16..=19]), x_spacing: partial_u8_bits_to_u8(&raw_eyebrow_details[21..=24]), @@ -397,12 +401,12 @@ impl From for MiiData { MiiData { options, - selector_position: position, - console_identity: device, + selector_position, + console_identity, system_id, - mac_address: creator_mac, + mac_address, details, - name: mii_name, + name, height, width, face_details, From 39467960ef2c1f32d0d140347984e6470768fffc Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Tue, 22 Nov 2022 11:11:18 +0100 Subject: [PATCH 52/57] Add LINEAR allocator module --- ctru-rs/examples/linear-memory.rs | 43 +++++++++++++++++++++++++++++++ ctru-rs/src/lib.rs | 2 ++ ctru-rs/src/linear.rs | 38 +++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 ctru-rs/examples/linear-memory.rs create mode 100644 ctru-rs/src/linear.rs diff --git a/ctru-rs/examples/linear-memory.rs b/ctru-rs/examples/linear-memory.rs new file mode 100644 index 0000000..96ec554 --- /dev/null +++ b/ctru-rs/examples/linear-memory.rs @@ -0,0 +1,43 @@ +#![feature(allocator_api)] + +use ctru::prelude::*; +use ctru::linear::LinearAllocator; + +fn main() { + ctru::init(); + let gfx = Gfx::init().expect("Couldn't obtain GFX controller"); + let hid = Hid::init().expect("Couldn't obtain HID controller"); + let apt = Apt::init().expect("Couldn't obtain APT controller"); + let _console = Console::init(gfx.top_screen.borrow_mut()); + + let linear_space_before = LinearAllocator::free_space(); + + // Normal `Box` on the heap + let heap_box = Box::new(1492); + // `Box` living on the linear memory sector + let linear_box: Box:: = Box::new_in(2022, LinearAllocator); + + println!("This value is from the heap: {heap_box}"); + println!("This value is from the LINEAR memory: {linear_box}"); + + println!("\nLINEAR space free before allocation: {linear_space_before}"); + println!("LINEAR space free after allocation: {}", LinearAllocator::free_space()); + + println!("\x1b[29;16HPress Start to exit"); + + // Main loop + while apt.main_loop() { + //Scan all the inputs. This should be done once for each frame + hid.scan_input(); + + if hid.keys_down().contains(KeyPad::KEY_START) { + break; + } + // Flush and swap framebuffers + gfx.flush_buffers(); + gfx.swap_buffers(); + + //Wait for VBlank + gfx.wait_for_vblank(); + } +} diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index 264d0ef..35fdc0c 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -3,6 +3,7 @@ #![feature(test)] #![feature(custom_test_frameworks)] #![feature(try_trait_v2)] +#![feature(allocator_api)] #![test_runner(test_runner::run)] extern "C" fn services_deinit() { @@ -76,6 +77,7 @@ pub mod applets; pub mod console; pub mod error; pub mod gfx; +pub mod linear; pub mod prelude; pub mod services; diff --git a/ctru-rs/src/linear.rs b/ctru-rs/src/linear.rs new file mode 100644 index 0000000..88f65fe --- /dev/null +++ b/ctru-rs/src/linear.rs @@ -0,0 +1,38 @@ +//! Linear memory allocator +//! +//! Linear memory is a sector of the 3DS' RAM that binds virtual addresses exactly to the physical address. +//! As such, it is used for fast and safe memory sharing between services (and is especially needed for GPU and DSP). +//! +//! Resources:
+//!
+//! + +use std::alloc::Allocator; + +// Implementing an `std::alloc::Allocator` type is the best way to handle this case, since it gives +// us full control over the normal `std` implementations (like `Box`). The only issue is that this is another unstable feature to add. +// Sadly the linear memory allocator included in `libctru` doesn't implement `linearRealloc` at the time of these additions, +// but the default fallback of the `std` will take care of that for us. + +/// [`std::alloc::Allocator`] struct for LINEAR memory +pub struct LinearAllocator; + +impl LinearAllocator { + /// Returns the amount of free space left in the LINEAR sector + pub fn free_space() -> u32 { + unsafe { ctru_sys::linearSpaceFree() } + } +} + +unsafe impl Allocator for LinearAllocator { + fn allocate(&self, layout: std::alloc::Layout) -> Result, std::alloc::AllocError> { + let pointer = unsafe { ctru_sys::linearAlloc(layout.size() as u32) }; + let slice: &mut [u8] = unsafe { std::slice::from_raw_parts_mut(pointer as *mut u8, layout.size()) }; + + std::ptr::NonNull::new(slice).ok_or(std::alloc::AllocError) + } + + unsafe fn deallocate(&self, ptr: std::ptr::NonNull, _layout: std::alloc::Layout) { + unsafe { ctru_sys::linearFree(ptr.as_ptr() as *mut _) }; + } +} From be858ff6aeb30ddec03924257994d99a0e911d47 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Tue, 22 Nov 2022 11:29:07 +0100 Subject: [PATCH 53/57] Cargo fmt --- ctru-rs/examples/linear-memory.rs | 9 ++++++--- ctru-rs/src/linear.rs | 12 ++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ctru-rs/examples/linear-memory.rs b/ctru-rs/examples/linear-memory.rs index 96ec554..11d13d3 100644 --- a/ctru-rs/examples/linear-memory.rs +++ b/ctru-rs/examples/linear-memory.rs @@ -1,7 +1,7 @@ #![feature(allocator_api)] -use ctru::prelude::*; use ctru::linear::LinearAllocator; +use ctru::prelude::*; fn main() { ctru::init(); @@ -15,13 +15,16 @@ fn main() { // Normal `Box` on the heap let heap_box = Box::new(1492); // `Box` living on the linear memory sector - let linear_box: Box:: = Box::new_in(2022, LinearAllocator); + let linear_box: Box = Box::new_in(2022, LinearAllocator); println!("This value is from the heap: {heap_box}"); println!("This value is from the LINEAR memory: {linear_box}"); println!("\nLINEAR space free before allocation: {linear_space_before}"); - println!("LINEAR space free after allocation: {}", LinearAllocator::free_space()); + println!( + "LINEAR space free after allocation: {}", + LinearAllocator::free_space() + ); println!("\x1b[29;16HPress Start to exit"); diff --git a/ctru-rs/src/linear.rs b/ctru-rs/src/linear.rs index 88f65fe..507cacd 100644 --- a/ctru-rs/src/linear.rs +++ b/ctru-rs/src/linear.rs @@ -2,7 +2,7 @@ //! //! Linear memory is a sector of the 3DS' RAM that binds virtual addresses exactly to the physical address. //! As such, it is used for fast and safe memory sharing between services (and is especially needed for GPU and DSP). -//! +//! //! Resources:
//!
//! @@ -25,10 +25,14 @@ impl LinearAllocator { } unsafe impl Allocator for LinearAllocator { - fn allocate(&self, layout: std::alloc::Layout) -> Result, std::alloc::AllocError> { + fn allocate( + &self, + layout: std::alloc::Layout, + ) -> Result, std::alloc::AllocError> { let pointer = unsafe { ctru_sys::linearAlloc(layout.size() as u32) }; - let slice: &mut [u8] = unsafe { std::slice::from_raw_parts_mut(pointer as *mut u8, layout.size()) }; - + let slice: &mut [u8] = + unsafe { std::slice::from_raw_parts_mut(pointer as *mut u8, layout.size()) }; + std::ptr::NonNull::new(slice).ok_or(std::alloc::AllocError) } From e2dd1335d4b531af302ad49ffacb093005bc2ddc Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Tue, 22 Nov 2022 11:36:42 +0100 Subject: [PATCH 54/57] Fix issues of the CI --- ctru-rs/src/linear.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/src/linear.rs b/ctru-rs/src/linear.rs index 507cacd..8a68de6 100644 --- a/ctru-rs/src/linear.rs +++ b/ctru-rs/src/linear.rs @@ -37,6 +37,6 @@ unsafe impl Allocator for LinearAllocator { } unsafe fn deallocate(&self, ptr: std::ptr::NonNull, _layout: std::alloc::Layout) { - unsafe { ctru_sys::linearFree(ptr.as_ptr() as *mut _) }; + ctru_sys::linearFree(ptr.as_ptr() as *mut _); } } From 4d196760ee3aef866ea949253fd9547c80cba9cd Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Wed, 23 Nov 2022 16:24:34 +0100 Subject: [PATCH 55/57] Fix alignment and follow suggestions --- ctru-rs/src/lib.rs | 1 + ctru-rs/src/linear.rs | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ctru-rs/src/lib.rs b/ctru-rs/src/lib.rs index 8439531..490b268 100644 --- a/ctru-rs/src/lib.rs +++ b/ctru-rs/src/lib.rs @@ -4,6 +4,7 @@ #![feature(custom_test_frameworks)] #![feature(try_trait_v2)] #![feature(allocator_api)] +#![feature(nonnull_slice_from_raw_parts)] #![test_runner(test_runner::run)] extern "C" fn services_deinit() { diff --git a/ctru-rs/src/linear.rs b/ctru-rs/src/linear.rs index 8a68de6..b9ee0e4 100644 --- a/ctru-rs/src/linear.rs +++ b/ctru-rs/src/linear.rs @@ -7,7 +7,8 @@ //!
//! -use std::alloc::Allocator; +use std::alloc::{Allocator, AllocError, Layout}; +use std::ptr::NonNull; // Implementing an `std::alloc::Allocator` type is the best way to handle this case, since it gives // us full control over the normal `std` implementations (like `Box`). The only issue is that this is another unstable feature to add. @@ -15,6 +16,7 @@ use std::alloc::Allocator; // but the default fallback of the `std` will take care of that for us. /// [`std::alloc::Allocator`] struct for LINEAR memory +/// To use this struct the main crate must activate the `allocator_api` unstable feature. pub struct LinearAllocator; impl LinearAllocator { @@ -27,16 +29,16 @@ impl LinearAllocator { unsafe impl Allocator for LinearAllocator { fn allocate( &self, - layout: std::alloc::Layout, - ) -> Result, std::alloc::AllocError> { - let pointer = unsafe { ctru_sys::linearAlloc(layout.size() as u32) }; - let slice: &mut [u8] = - unsafe { std::slice::from_raw_parts_mut(pointer as *mut u8, layout.size()) }; + layout: Layout, + ) -> Result, AllocError> { + let pointer = unsafe { ctru_sys::linearMemAlign(layout.size() as u32, layout.align() as u32) }; - std::ptr::NonNull::new(slice).ok_or(std::alloc::AllocError) + NonNull::new(pointer.cast()) + .map(|ptr| NonNull::slice_from_raw_parts(ptr, layout.size())) + .ok_or(AllocError) } - unsafe fn deallocate(&self, ptr: std::ptr::NonNull, _layout: std::alloc::Layout) { + unsafe fn deallocate(&self, ptr: NonNull, _layout: Layout) { ctru_sys::linearFree(ptr.as_ptr() as *mut _); } } From c2c14b949b213456440779570b56914675c2f560 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Wed, 23 Nov 2022 16:27:06 +0100 Subject: [PATCH 56/57] Fixed deallocate types --- ctru-rs/src/linear.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctru-rs/src/linear.rs b/ctru-rs/src/linear.rs index b9ee0e4..a913f27 100644 --- a/ctru-rs/src/linear.rs +++ b/ctru-rs/src/linear.rs @@ -39,6 +39,6 @@ unsafe impl Allocator for LinearAllocator { } unsafe fn deallocate(&self, ptr: NonNull, _layout: Layout) { - ctru_sys::linearFree(ptr.as_ptr() as *mut _); + ctru_sys::linearFree(ptr.as_ptr().cast()); } } From 8594268fc2d77bce3d76228cd32a5e2d49fbaad5 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Wed, 23 Nov 2022 16:29:06 +0100 Subject: [PATCH 57/57] Cargo fmt --- ctru-rs/src/linear.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ctru-rs/src/linear.rs b/ctru-rs/src/linear.rs index a913f27..da91eb7 100644 --- a/ctru-rs/src/linear.rs +++ b/ctru-rs/src/linear.rs @@ -7,7 +7,7 @@ //!
//! -use std::alloc::{Allocator, AllocError, Layout}; +use std::alloc::{AllocError, Allocator, Layout}; use std::ptr::NonNull; // Implementing an `std::alloc::Allocator` type is the best way to handle this case, since it gives @@ -27,11 +27,9 @@ impl LinearAllocator { } unsafe impl Allocator for LinearAllocator { - fn allocate( - &self, - layout: Layout, - ) -> Result, AllocError> { - let pointer = unsafe { ctru_sys::linearMemAlign(layout.size() as u32, layout.align() as u32) }; + fn allocate(&self, layout: Layout) -> Result, AllocError> { + let pointer = + unsafe { ctru_sys::linearMemAlign(layout.size() as u32, layout.align() as u32) }; NonNull::new(pointer.cast()) .map(|ptr| NonNull::slice_from_raw_parts(ptr, layout.size()))