ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
#include "libpwroff.h"
#include <errno.h>
#include <stdio.h>
#include <tamtypes.h>
#include <kernel.h>
#include <string.h>
#include <sifrpc.h>
#include <pwroff_rpc.h>
Go to the source code of this file.
Functions | |
static void * | PowerOff_ee_rpc_handler (int fnum, void *buffer, int len) |
static void | PowerOffThread (void *dat) |
int | poweroffInit (void) |
void | poweroffSetCallback (poweroff_callback cb, void *arg) |
void | poweroffShutdown (void) |
void | poweroffChangeThreadPriority (int priority) |
Variables | |
void * | _gp |
static poweroff_callback | poweroff_cb = NULL |
static void * | poweroff_data = NULL |
static u8 | poffThreadStack [512 *16] |
int | _iop_reboot_count |
static SifRpcClientData_t | cd0 |
static struct t_SifRpcDataQueue | cb_queue |
static struct t_SifRpcServerData | cb_srv |
static int | powerOffThreadId = -1 |
|
static |
Definition at line 34 of file poweroff.c.
References buffer, POFF_RPC_BUTTON, poweroff_cb, and poweroff_data.
Referenced by PowerOffThread().
void poweroffChangeThreadPriority | ( | int | priority | ) |
Definition at line 110 of file poweroff.c.
References ChangeThreadPriority(), and powerOffThreadId.
int poweroffInit | ( | void | ) |
Initializes the poweroff library. A service thread with a default priority of 0x70 will be created.
Definition at line 57 of file poweroff.c.
References _gp, _iop_reboot_count, ee_thread_t::attr, cb_queue, cb_srv, cd0, CreateThread(), DeleteThread(), ee_thread_t::func, ee_thread_t::gp_reg, ee_thread_t::initial_priority, nopdelay(), NULL, ee_thread_t::option, poffThreadStack, POWEROFF_THREAD_PRIORITY, PowerOffThread(), powerOffThreadId, PWROFF_ENABLE_AUTO_SHUTOFF, PWROFF_IRX, SifRpcClientData_t::server, SifBindRpc(), SifCallRpc(), SifRemoveRpc(), SifRemoveRpcQueue(), ee_thread_t::stack, ee_thread_t::stack_size, StartThread(), and TerminateThread().
Referenced by main(), poweroffSetCallback(), and poweroffShutdown().
void poweroffSetCallback | ( | poweroff_callback | cb, |
void * | arg | ||
) |
Definition at line 95 of file poweroff.c.
References poweroff_cb, poweroff_data, and poweroffInit().
Referenced by main().
void poweroffShutdown | ( | void | ) |
Definition at line 103 of file poweroff.c.
References cd0, NULL, poweroffInit(), PWROFF_SHUTDOWN, and SifCallRpc().
Referenced by poweroffCallback().
|
static |
Definition at line 48 of file poweroff.c.
References cb_queue, cb_srv, NULL, PowerOff_ee_rpc_handler(), powerOffThreadId, PWROFF_IRX, SifRegisterRpc(), SifRpcLoop(), and SifSetRpcQueue().
Referenced by poweroffInit().
|
extern |
Referenced by poweroffInit().
|
extern |
Referenced by poweroffInit().
|
static |
Definition at line 29 of file poweroff.c.
Referenced by poweroffInit(), and PowerOffThread().
|
static |
Definition at line 29 of file poweroff.c.
Referenced by poweroffInit(), and PowerOffThread().
|
static |
Definition at line 29 of file poweroff.c.
Referenced by poweroffInit(), and poweroffShutdown().
|
static |
Definition at line 26 of file poweroff.c.
Referenced by poweroffInit().
|
static |
Definition at line 23 of file poweroff.c.
Referenced by PowerOff_ee_rpc_handler(), and poweroffSetCallback().
|
static |
Definition at line 24 of file poweroff.c.
Referenced by PowerOff_ee_rpc_handler(), and poweroffSetCallback().
|
static |
Definition at line 32 of file poweroff.c.
Referenced by poweroffChangeThreadPriority(), poweroffInit(), and PowerOffThread().