summaryrefslogtreecommitdiff
path: root/include/user/motion.h
blob: 61ff756fad86b52969f6328a02c5ea3081cc2f2c (plain) (blame)
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
#ifndef _DOLCESDK_PSP2_MOTION_H_
#define _DOLCESDK_PSP2_MOTION_H_

#include_next <motion.h>

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
#endif	/* defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) */

/* Extended functions */

/*
 * Initialize libMotion for extended use
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionInitLibraryExt(void);

/*
 * Terminate libMotion for extended use
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionTermLibraryExt(void);

/*
 * Calculate and update the new motion states
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionGetStateExt(int port, SceMotionState *motionState);

/*
 * Retrieve the status of tilt correction filter settings
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionGetTiltCorrectionExt(int port, SceBool *getValue);

/*
 * Set the tilt correction filter settings
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionSetTiltCorrectionExt(int port, SceBool setValue);

/*
 * Retrieve the status of deadband filter mode
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionGetDeadbandExt(int port, SceBool *getValue);

/*
 * Set the deadbanding filter mode
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionSetDeadbandExt(int port, SceBool setValue);

/*
 * Reset the device posture and filter settings.
 * @retval  SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionResetExt(void);

/*
 * Begin sampling data.
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionStartSamplingExt(int port);

/*
 * Stop sampling data.
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionStopSamplingExt(int port);

/* Internal functions */

/*
 * Calculate and update the new motion states
 * @param *motionState : State Pointer to save data into
 * @retval SCE_OK success
 *			<SCE_OK Error
 */

int sceMotionGetStateInternal(SceMotionState *motionState);

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
}
#endif  /* defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) */

#endif /* _DOLCESDK_PSP2_MOTION_H_ */