vitasdk
Documentation of the vitasdk
motion.h File Reference
#include <vitasdk/build_utils.h>
#include <psp2/types.h>

Go to the source code of this file.

Data Structures

struct  SceMotionState
 Returned motion state. More...
 
struct  SceMotionSensorState
 Returned motion sensor state. More...
 
struct  SceMotionDeviceLocation
 Returned location of both the accelerometer and gyroscope in mm. More...
 

Enumerations

enum  SceMotionMagFieldStability { SCE_MOTION_MAGFIELD_UNSTABLE = 0 , SCE_MOTION_MAGFIELD_UNUSED = 1 , SCE_MOTION_MAGFIELD_STABLE = 2 }
 
enum  SceMotionErrorCode {
  SCE_MOTION_ERROR_DATA_INVALID = 0x80360200 , SCE_MOTION_ERROR_READING = 0x80360201 , SCE_MOTION_ERROR_NON_INIT_ERR = 0x80360202 , SCE_MOTION_ERROR_STATE_INVALID = 0x80360203 ,
  SCE_MOTION_ERROR_CALIB_READ_FAIL = 0x80360204 , SCE_MOTION_ERROR_OUT_OF_BOUNDS = 0x80360205 , SCE_MOTION_ERROR_NOT_SAMPLING = 0x80360206 , SCE_MOTION_ERROR_ALREADY_SAMPLING = 0x80360207 ,
  SCE_MOTION_ERROR_MEM_IN_USE = 0x80360208
}
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0xF8, SceMotionState)
 
 VITASDK_BUILD_ASSERT_EQ (0x40, SceMotionSensorState)
 
 VITASDK_BUILD_ASSERT_EQ (0x30, SceMotionDeviceLocation)
 
int sceMotionGetState (SceMotionState *motionState)
 Gets the current motion state. More...
 
int sceMotionGetSensorState (SceMotionSensorState *sensorState, int numRecords)
 Gets the current motion sensor state. More...
 
int sceMotionGetDeviceLocation (SceMotionDeviceLocation *deviceLocation)
 Gets the location of the device's sensors in relation to its center point (in mm). More...
 
int sceMotionGetBasicOrientation (SceFVector3 *basicOrientation)
 Gets the basic orientation of the device in relation to gravity. More...
 
int sceMotionRotateYaw (float radians)
 Rotate the yaw axis. More...
 
int sceMotionGetTiltCorrection (void)
 Get Status of tilt correction. More...
 
int sceMotionSetTiltCorrection (int setValue)
 Activate/deactivate tilt correction. More...
 
int sceMotionGetDeadband (void)
 Get status of deadbanding. More...
 
int sceMotionSetDeadband (int setValue)
 Activate/deactivate deadbanding. More...
 
int sceMotionGetGyroBiasCorrection (void)
 Get status of gyroscope bias correction. More...
 
int sceMotionSetGyroBiasCorrection (int setValue)
 Activate/deactivate gyroscope bias correction. More...
 
int sceMotionSetAngleThreshold (float angle)
 Define the angle threshold for basic orientation. More...
 
float sceMotionGetAngleThreshold (void)
 Get the angle threshold for basic orientation. More...
 
int sceMotionReset (void)
 Set current orientation as origin. More...
 
int sceMotionMagnetometerOn (void)
 Start magnetometer sampling. More...
 
int sceMotionMagnetometerOff (void)
 Stop magnetometer sampling. More...
 
int sceMotionGetMagnetometerState (void)
 Get status of magnetometer sampling. More...
 
int sceMotionStartSampling (void)
 Start sampling. More...
 
int sceMotionStopSampling (void)
 Stop sampling. More...