1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/* automatically generated by rust-bindgen 0.68.1 */

#[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;
}