sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
xtimrman.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16
17#ifndef __XTIMRMAN_H__
18#define __XTIMRMAN_H__
19
20#include <timrman.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26// The following was introduced in export version 1.2 (around SDK 2.0.5)
27
28#define TC_SYSCLOCK 1
29#define TC_PIXEL 2
30#define TC_HLINE 4
31
32extern int SetTimerHandler(int timid, unsigned long comparevalue, unsigned int (*timeuphandler)(void *userdata), void *common);
33extern int SetOverflowHandler(int timid, unsigned int (*handler)(void *userdata), void *common);
34extern int SetupHardTimer(int timid, int source, int mode, int prescale);
35extern int StartHardTimer(int timid);
36extern int StopHardTimer(int timid);
37
38#define xtimrman_IMPORTS_start DECLARE_IMPORT_TABLE(timrman, 1, 2)
39#define xtimrman_IMPORTS_end END_IMPORT_TABLE
40
41#define I_SetTimerHandler DECLARE_IMPORT(20, SetTimerHandler)
42#define I_SetOverflowHandler DECLARE_IMPORT(21, SetOverflowHandler)
43#define I_SetupHardTimer DECLARE_IMPORT(22, SetupHardTimer)
44#define I_StartHardTimer DECLARE_IMPORT(23, StartHardTimer)
45#define I_StopHardTimer DECLARE_IMPORT(24, StopHardTimer)
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif /* __XTIMRMAN_H__ */