summaryrefslogtreecommitdiff
path: root/include/user/ctrl.h
diff options
context:
space:
mode:
authorSunguk Lee2016-09-27 22:41:13 +0900
committerSunguk Lee2016-09-27 23:48:32 +0900
commit7f1828871707e9976235a0946187bbaae2efb520 (patch)
tree73910027f3cb7e57fa13f50fe5f5d283be7fdd64 /include/user/ctrl.h
parentAdd SceCtrlPortInfo structure (diff)
downloadvds-libraries-7f1828871707e9976235a0946187bbaae2efb520.tar.gz
Add sceCtrlGetBatteryInfo and update SceCtrlData
- Add function define - Update LT/RT field of SceCtrlData
Diffstat (limited to 'include/user/ctrl.h')
-rw-r--r--include/user/ctrl.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/user/ctrl.h b/include/user/ctrl.h
index 062329c..90eb4d8 100644
--- a/include/user/ctrl.h
+++ b/include/user/ctrl.h
@@ -70,7 +70,13 @@ typedef struct SceCtrlData {
/** Right analogue stick, Y axis. */
unsigned char ry;
/** Reserved. */
- uint8_t reserved[16];
+ uint8_t reserved0[4];
+ /** Left trigger (L2) */
+ unsigned char lt;
+ /** Right trigger (R2) */
+ unsigned char rt;
+ /** Reserved. */
+ uint8_t reserved1[10];
} SceCtrlData;
/** Structure to pass as argument to ::sceCtrlSetRapidFire */
@@ -229,6 +235,16 @@ int sceCtrlSetLightBar(int port, SceUInt8 r, SceUInt8 g, SceUInt8 b);
* @return 0, <0 on error
*/
int sceCtrlGetControllerPortInfo(SceCtrlPortInfo *info);
+
+/**
+ * Get controller battery information.
+ *
+ * @param[in] port - use 1 for the first paired controller, etc.
+ * @param[out] batt - battery level, between 0-5, 0xEE charging, 0xEF charged
+ *
+ * @return 0, <0 on error.
+ */
+int sceCtrlGetBatteryInfo(int port, SceUInt8 *batt);
#ifdef __cplusplus
}
#endif