#[allow(unused_imports)]
use crate::psp2::types::*;
#[allow(unused_imports)]
use crate::psp2common::types::*;
#[allow(unused_imports)]
use crate::vitasdk::build_utils::*;
pub mod SceMotionMagFieldStability {
pub type Type = crate::ctypes::c_uint;
pub const SCE_MOTION_MAGFIELD_UNSTABLE: Type = 0;
pub const SCE_MOTION_MAGFIELD_UNUSED: Type = 1;
pub const SCE_MOTION_MAGFIELD_STABLE: Type = 2;
}
pub mod SceMotionErrorCode {
pub type Type = crate::ctypes::c_uint;
pub const SCE_MOTION_ERROR_DATA_INVALID: Type = 2151023104;
pub const SCE_MOTION_ERROR_READING: Type = 2151023105;
pub const SCE_MOTION_ERROR_NON_INIT_ERR: Type = 2151023106;
pub const SCE_MOTION_ERROR_STATE_INVALID: Type = 2151023107;
pub const SCE_MOTION_ERROR_CALIB_READ_FAIL: Type = 2151023108;
pub const SCE_MOTION_ERROR_OUT_OF_BOUNDS: Type = 2151023109;
pub const SCE_MOTION_ERROR_NOT_SAMPLING: Type = 2151023110;
pub const SCE_MOTION_ERROR_ALREADY_SAMPLING: Type = 2151023111;
pub const SCE_MOTION_ERROR_MEM_IN_USE: Type = 2151023112;
}
#[repr(C)]
pub struct SceMotionState {
pub timestamp: crate::ctypes::c_uint,
pub acceleration: SceFVector3,
pub angularVelocity: SceFVector3,
pub reserved1: [u8; 12usize],
pub deviceQuat: SceFQuaternion,
pub rotationMatrix: SceFMatrix4,
pub nedMatrix: SceFMatrix4,
pub reserved2: [u8; 4usize],
pub basicOrientation: SceFVector3,
pub hostTimestamp: SceULong64,
pub reserved3: [u8; 36usize],
pub magFieldStability: u8,
pub unknown: u8,
pub reserved4: [u8; 2usize],
}
#[repr(C)]
pub struct SceMotionSensorState {
pub accelerometer: SceFVector3,
pub gyro: SceFVector3,
pub reserved1: [u8; 12usize],
pub timestamp: crate::ctypes::c_uint,
pub counter: crate::ctypes::c_uint,
pub reserved2: [u8; 4usize],
pub hostTimestamp: SceULong64,
pub unknown: u8,
pub reserved3: [u8; 7usize],
}
#[repr(C)]
pub struct SceMotionDeviceLocation {
pub accelerometer: SceFVector3,
pub gyro: SceFVector3,
pub reserved: [u8; 24usize],
}
extern "C" {
pub fn sceMotionGetState(motionState: *mut SceMotionState) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetSensorState(
sensorState: *mut SceMotionSensorState,
numRecords: crate::ctypes::c_int,
) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetDeviceLocation(
deviceLocation: *mut SceMotionDeviceLocation,
) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetBasicOrientation(basicOrientation: *mut SceFVector3)
-> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionRotateYaw(radians: f32) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetTiltCorrection() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionSetTiltCorrection(setValue: crate::ctypes::c_int) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetDeadband() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionSetDeadband(setValue: crate::ctypes::c_int) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetGyroBiasCorrection() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionSetGyroBiasCorrection(setValue: crate::ctypes::c_int) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionSetAngleThreshold(angle: f32) -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetAngleThreshold() -> f32;
}
extern "C" {
pub fn sceMotionReset() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionMagnetometerOn() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionMagnetometerOff() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionGetMagnetometerState() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionStartSampling() -> crate::ctypes::c_int;
}
extern "C" {
pub fn sceMotionStopSampling() -> crate::ctypes::c_int;
}