All Functions Modules Pages
power

Functions

BOOLEAN power.plugged ()
 Power supply cable connected. More...
 
NIL power.tick ()
 Keeps the console awake, avoiding entering to suspend mode. More...
 
NIL power.tick (NUMBER mode)
 It allows you to reset the timers of the console (suspension, screen, etc). More...
 
NUMBER power.usbcharging ()
 It allows to know if battery charging is enabled trough USB conection. More...
 
NIL power.usbcharging (NUMBER toggle)
 It allows to enable/disable battery charging for USB conection. More...
 
NUMBER power.timer ()
 Allows to know the time in which the display will turn off. More...
 
NIL power.display (NUMBER toggle)
 Allows to turn the display on/off. More...
 
NIL power.suspend ()
 Let console in stand-by mode. More...
 
NIL power.restart ()
 Restart the console. More...
 
NIL power.shutdown ()
 Shutdown console. More...
 

Detailed Description

Power supply functions.

Function Documentation

BOOLEAN power.plugged ( )

Power supply cable connected.

Returns
true/false Depending on whether the cable is connected.
NIL power.tick ( )

Keeps the console awake, avoiding entering to suspend mode.

Returns
Nothing.
NIL power.tick ( NUMBER  mode)

It allows you to reset the timers of the console (suspension, screen, etc).

Parameters
modeAny of the following ways:
  • __POWER_TICK_ALL (0), reset all timers.
  • __POWER_TICK_SUSPEND (1), restarts the timer suspension.
  • __POWER_TICK_OLED_OFF (4), restart the timer off screen.
  • __POWER_TICK_OLED_DIMMING (6), restart timer dimming the screen.
Returns
Nothing.
NUMBER power.usbcharging ( )

It allows to know if battery charging is enabled trough USB conection.

Returns
1/0 It will be 1 in case of success, otherwise 0.
NIL power.usbcharging ( NUMBER  toggle)

It allows to enable/disable battery charging for USB conection.

Parameters
toggleThe value 1 will turn it on, the value 0 will turn off.
Returns
Nothing.
NUMBER power.timer ( )

Allows to know the time in which the display will turn off.

Returns
The time in which the display will turn off.
NIL power.display ( NUMBER  toggle)

Allows to turn the display on/off.

Parameters
toggleThe value 1 will turn it on, the value 0 will turn the display off.
Returns
Nothing.
NIL power.suspend ( )

Let console in stand-by mode.

Returns
Nothing.
NIL power.restart ( )

Restart the console.

Returns
Nothing.
NIL power.shutdown ( )

Shutdown console.

Returns
Nothing.