PSP2SDK
dirty-f9e4f2d
The free SDK for PSP2
|
Header file which defines control related variables and functions. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | SceCtrlData |
struct | SceCtrlRapidFireRule |
Typedefs | |
typedef struct SceCtrlData | SceCtrlData |
typedef struct SceCtrlRapidFireRule | SceCtrlRapidFireRule |
Enumerations | |
enum | { SCE_CTRL_ERROR_INVALID_ARG = 0x80340001, SCE_CTRL_ERROR_PRIV_REQUIRED = 0x80340002, SCE_CTRL_ERROR_FATAL = 0x803400FF } |
enum | { PSP2_CTRL_SELECT = 0x000001, PSP2_CTRL_START = 0x000008, PSP2_CTRL_UP = 0x000010, PSP2_CTRL_RIGHT = 0x000020, PSP2_CTRL_DOWN = 0x000040, PSP2_CTRL_LEFT = 0x000080, PSP2_CTRL_LTRIGGER = 0x000100, PSP2_CTRL_RTRIGGER = 0x000200, PSP2_CTRL_TRIANGLE = 0x001000, PSP2_CTRL_CIRCLE = 0x002000, PSP2_CTRL_CROSS = 0x004000, PSP2_CTRL_SQUARE = 0x008000, PSP2_CTRL_ANY = 0x010000 } |
enum | { PSP2_CTRL_MODE_DIGITAL = 0, PSP2_CTRL_MODE_ANALOG, PSP2_CTRL_MODE_ANALOG_WIDE } |
Functions | |
int | sceCtrlSetSamplingMode (int mode) |
int | sceCtrlGetSamplingMode (int *pMode) |
int | sceCtrlPeekBufferPositive (int port, SceCtrlData *pad_data, int count) |
int | sceCtrlPeekBufferNegative (int port, SceCtrlData *pad_data, int count) |
int | sceCtrlReadBufferPositive (int port, SceCtrlData *pad_data, int count) |
int | sceCtrlReadBufferNegative (int port, SceCtrlData *pad_data, int count) |
int | sceCtrlSetRapidFire (int port, int idx, const SceCtrlRapidFireRule *pRule) |
int | sceCtrlClearRapidFire (int port, int idx) |
Header file which defines control related variables and functions.
Copyright (C) 2015 PSP2SDK Project
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
typedef struct SceCtrlData SceCtrlData |
Returned controller data
typedef struct SceCtrlRapidFireRule SceCtrlRapidFireRule |
Structure to pass as argument to sceCtrlSetRapidFire
anonymous enum |
Enumeration for the digital controller buttons.
anonymous enum |
Controller mode.
PSP2_CTRL_MODE_DIGITAL |
Digitial buttons only. |
PSP2_CTRL_MODE_ANALOG |
Digital buttons + Analog support. |
PSP2_CTRL_MODE_ANALOG_WIDE |
Same as PSP2_CTRL_MODE_ANALOG, but with larger range for analog sticks. |
int sceCtrlClearRapidFire | ( | int | port, |
int | idx | ||
) |
Clear rules for button rapid fire
[in] | port | - use 0. |
[in] | idx | - rule index between 0-15 |
int sceCtrlGetSamplingMode | ( | int * | pMode | ) |
Get the current controller mode.
[out] | pMode | - Return value, see ::CtrlMode. |
int sceCtrlPeekBufferNegative | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (polling, negative logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. |
int sceCtrlPeekBufferPositive | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (polling, positive logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. |
int sceCtrlReadBufferNegative | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (blocking, negative logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. |
int sceCtrlReadBufferPositive | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (blocking, positive logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. |
int sceCtrlSetRapidFire | ( | int | port, |
int | idx, | ||
const SceCtrlRapidFireRule * | pRule | ||
) |
Set rules for button rapid fire
[in] | port | - use 0. |
[in] | idx | - rule index between 0-15 |
[in] | pRule | - structure SceCtrlRapidFireRule. |
int sceCtrlSetSamplingMode | ( | int | mode | ) |
Set the controller mode.
[in] | mode | - One of ::CtrlMode. |