diff options
-rw-r--r-- | include/user/ctrl.h | 18 | ||||
-rw-r--r-- | nids/360/SceCtrl.yml | 1 |
2 files changed, 18 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 diff --git a/nids/360/SceCtrl.yml b/nids/360/SceCtrl.yml index 4011476..ae1bcfd 100644 --- a/nids/360/SceCtrl.yml +++ b/nids/360/SceCtrl.yml @@ -7,6 +7,7 @@ modules: functions: sceCtrlClearRapidFire: 0xD8294C9C sceCtrlDisconnect: 0x16D26DC7 + sceCtrlGetBatteryInfo: 0x8F9B1CE5 sceCtrlGetButtonIntercept: 0x6FAFAD05 sceCtrlGetControllerPortInfo: 0x324F1B66 sceCtrlGetSamplingMode: 0xEC752AAF |