vitasdk
Documentation of the vitasdk
systimer.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2KERN_SYSTIMER_H_
7 #define _PSP2KERN_SYSTIMER_H_
8 
9 #include <vitasdk/build_utils.h>
10 #include <psp2kern/types.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
18 
19 typedef void (*SceSysTimerCallback)(SceSysTimerId timer, void* pUserData);
20 
21 typedef enum SceSysTimerType {
25 
26 typedef enum SceSysTimerClockSource {
30 
47 
64 
101 int ksceKernelSysTimerSetHandler(SceSysTimerId timerId, SceSysTimerCallback callback, SceUInt32 targetCPU, void *pUserData);
102 
129 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 #endif
int ksceKernelSysTimerSetHandler(SceSysTimerId timerId, SceSysTimerCallback callback, SceUInt32 targetCPU, void *pUserData)
Set the interrupt callback handler for the timer.
void(* SceSysTimerCallback)(SceSysTimerId timer, void *pUserData)
Definition: systimer.h:19
int ksceKernelSysTimerFree(SceSysTimerId timerId)
Free an allocated system timer.
int ksceKernelSysTimerResetCount(SceSysTimerId timerId)
Reset the timer count.
SceSysTimerClockSource
Definition: systimer.h:26
int ksceKernelSysTimerSetClockSource(SceSysTimerId timerId, SceSysTimerClockSource clockSource, SceUInt8 prescaleFactor)
Configure the source clock signal for a timer.
int ksceKernelSysTimerStartCount(SceSysTimerId timerId)
Start a timer.
int ksceKernelSysTimerStopCount(SceSysTimerId timerId)
Stop a timer.
int ksceKernelSysTimerSetInterval(SceSysTimerId timerId, SceKernelSysClock interval)
Set the timer interval.
SceInt32 SceSysTimerId
Definition: systimer.h:16
SceSysTimerType
Definition: systimer.h:21
int ksceKernelSysTimerGetCount(SceSysTimerId timerId, SceKernelSysClock *pCount)
Get the timer count value.
int ksceKernelSysTimerSetCount(SceSysTimerId timerId, SceKernelSysClock count)
Set the timer count value.
SceSysTimerId ksceKernelSysTimerAlloc(SceSysTimerType timerType)
Allocate one of the system's timers.
VITASDK_BUILD_ASSERT_EQ(4, SceSysTimerId)
@ SCE_SYSTIMER_CLOCK_SOURCE_48MHZ
48MHz Frequency. Used by GpuEs4 and Threadmgr timers
Definition: systimer.h:28
@ SCE_SYSTIMER_CLOCK_SOURCE_SYS
190/222MHz Frequency. Controlled by kscePower[Get|Set]SysClockFrequency
Definition: systimer.h:27
@ SCE_SYSTIMER_TYPE_LONG
64-bit timer
Definition: systimer.h:22
@ SCE_SYSTIMER_TYPE_WORD
32-bit timer
Definition: systimer.h:23
int32_t SceInt32
Definition: types.h:44
uint32_t SceUInt32
Definition: types.h:45
SceUInt64 SceKernelSysClock
64-bit system clock type.
Definition: types.h:97
uint8_t SceUInt8
Definition: types.h:36