Advertising (This ad goes away for registered users. You can Login or Register)

ksceLedSetMode function arguments findings

Open discussions on programming specifically for the PS Vita.
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Post Reply
User avatar
reprep
Posts: 1072
Joined: Tue Dec 17, 2013 4:38 pm

ksceLedSetMode function arguments findings

Post by reprep » Fri Apr 07, 2017 8:09 pm

Trying to find arguments of ksceLedSetMode function which i used for the plugin noled. viewtopic.php?f=116&t=48017

It is defined as "int ksceLedSetMode(int led, int mode, void *led_configuration);" https://wiki.henkaku.xyz/vita/ScePower

The function seems similar to sceLedSetMode function in PSP but LEDS are different, so trying to find the correct arguments for Vita. for psp: http://uofw.github.io/uofw/group__LED.html

Argument led:
2 seems to control the blue light on home button, by passing "ksceLedSetMode(2, 0, NULL); home button stops glowing till a next event lights it, by passing "ksceLedSetMode(2, 1, NULL); home button begins to glow, by passing "ksceLedSetMode(2, 2, NULL); home button blinks rapidly. Unfortunately i couldn't find the argument for red light on home button.

Argument "mode" seems same as PSP:
[spoiler]enum SceLedModes
The possible LED control commands.

Enumerator:
SCE_LED_MODE_OFF
Turn a LED OFF.

SCE_LED_MODE_ON
Turn a LED ON.

SCE_LED_MODE_BLINK
Set a blink event for a LED.

SCE_LED_MODE_SELECTIVE_EXEC
Register LED configuration commands and execute them. Its use is not recommended, as it is still not completely known how that mode works.[/spoiler]

led configuration seems same as PSP too, though i haven't messed with it. It needs confirmation:
http://uofw.github.io/uofw/structSceLed ... ation.html

ERROR CODES:

SCE_ERROR_INVALID_LED: Error code 0x803F0140 if led>7
SCE_ERROR_INVALID_MODE: Error code 0x803F0141 if mode>4 or ((mode == 4) && (led != 2))
Advertising
Last edited by reprep on Sun Apr 09, 2017 11:35 am, edited 1 time in total.

User avatar
noname120
Developer
Posts: 774
Joined: Thu Oct 07, 2010 4:29 pm

Re: ksceLedSetMode function arguments findings

Post by noname120 » Sat Apr 08, 2017 11:37 pm

Have you tried 1 or 0 for the first argument?
Advertising
Funny stuff
<yifanlu> I enjoy being loud and obnoxious
<yifanlu> rooting an android is like getting a hooker pregnant
<xerpi> I sometimes think I should leave all this stressing **** and be a farmer instead

User avatar
reprep
Posts: 1072
Joined: Tue Dec 17, 2013 4:38 pm

Re: ksceLedSetMode function arguments findings

Post by reprep » Sun Apr 09, 2017 6:34 am

noname120 wrote:Have you tried 1 or 0 for the first argument?
yup, nothing happens. Well to be honest, i haven't checked the led in game slot, it is rarely seen anyways. But 0, 1, 3, 4, 5, 6 and 7 (all other possible values for first argument) has no effects.

Post Reply

Return to “Programming and Security”