OSSetPowerCallback

C Specification

#include <revolution/os.h>
typedef void (*OSPowerCallback)(void);
OSPowerCallback OSSetPowerCallback(OSPowerCallback callback);

Arguments

callback Pointer to the callback function called at time of power button input.

Return Values

Returns a pointer to a previously set callback function.

Description

Registers a one time power button callback. The callback function is called only once when the power button is pressed. The callback is then automatically unregistered. In principle, the application receiving the power button callback must execute shutdown procedures within a set amount of time.

Note:Because the power button callback is called in a state that prohibits interrupts, you should keep the process performed by the application as short as possible.

See Also

Reset Button Functions,

Revision History

08/10/2006 Initial version.


CONFIDENTIAL