ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
#include "tamtypes.h"
#include "timer.h"
#include "ee_regs.h"
#include "kernel.h"
#include "internal.h"
Go to the source code of this file.
Data Structures | |
struct | alarm |
Macros | |
#define | USER_MODE_DISPATCHER 0x00082000 |
#define | INTC_TIM3 12 |
#define | T3_COUNT_W ((vu32*)0xB0001800) |
#define | T3_MODE_W ((vu32*)0xB0001810) |
#define | T3_COMP_W ((vu32*)0xB0001820) |
Functions | |
static u32 | CalculateTimeDiff (u32 t1, u32 t2) |
static int | InsertAlarm (u32 now, u32 target) |
static s32 | SetAlarmInternal (u16 time, void(*callback)(s32 dispatch_id, u16 time, void *common), void *common) |
static void | SetupTIM3 (u16 ticks) |
s32 | ReleaseAlarm (s32 id) |
s32 | SetAlarm (u16 time, void(*callback)(s32 dispatch_id, u16 time, void *common), void *common) |
void | Intc12Handler (void) |
Variables | |
static int | AlarmCount = 0 |
static u64 | AlarmStatus = 0 |
static struct alarm | alarms [MAX_ALARMS] |
Definition at line 44 of file alarm.c.
Referenced by InsertAlarm(), and ReleaseAlarm().
Definition at line 49 of file alarm.c.
References AlarmCount, alarms, CalculateTimeDiff(), pos, alarm::target, and time.
Referenced by SetAlarmInternal().
void Intc12Handler | ( | void | ) |
Definition at line 167 of file alarm.c.
References AlarmCount, alarms, AlarmStatus, alarm::callback, ChangeGP(), alarm::common, ExitHandler, gp, alarm::gp, alarm::id, InvokeUserModeCallback(), SetGP(), SetupTIM3(), T3_MODE_W, alarm::target, Tn_MODE, and USER_MODE_DISPATCHER.
Definition at line 110 of file alarm.c.
References AlarmCount, alarms, AlarmStatus, CalculateTimeDiff(), EE_SYNC, alarm::id, INTC_TIM3, R_EE_I_STAT, result, SetupTIM3(), T3_COMP_W, T3_COUNT_W, T3_MODE_W, alarm::target, alarm::time, time, and Tn_MODE.
Referenced by WaitSemaTimeout().
Definition at line 149 of file alarm.c.
References alarm::callback, alarm::common, EE_SYNC, result, SetAlarmInternal(), and time.
|
static |
Definition at line 68 of file alarm.c.
References AlarmCount, alarms, AlarmStatus, alarm::callback, alarm::common, GetGP(), gp, alarm::gp, alarm::id, InsertAlarm(), MAX_ALARMS, pos, SetupTIM3(), T3_COUNT_W, alarm::target, alarm::time, and time.
Referenced by SetAlarm().
|
static |
Definition at line 159 of file alarm.c.
References EE_SYNC, T3_COMP_W, T3_MODE_W, and Tn_MODE.
Referenced by Intc12Handler(), ReleaseAlarm(), and SetAlarmInternal().
|
static |
Definition at line 24 of file alarm.c.
Referenced by InsertAlarm(), Intc12Handler(), ReleaseAlarm(), and SetAlarmInternal().
|
static |
Definition at line 25 of file alarm.c.
Referenced by InsertAlarm(), Intc12Handler(), ReleaseAlarm(), and SetAlarmInternal().
|
static |
Definition at line 25 of file alarm.c.
Referenced by Intc12Handler(), ReleaseAlarm(), and SetAlarmInternal().