|
sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
|
Go to the source code of this file.
Classes | |
| struct | counter_struct_ |
| struct | timer_ee_global_struct_ |
Macros | |
| #define | TIMER_MODE_START 0x00000001 |
| #define | TIMER_MODE_HANDLER 0x00000002 |
| #define | PTR_TO_TIMER_ID(ptr_) |
| #define | TIMER_ID_TO_PTR(id_) |
| #define | TIMER_ID_IS_VALID(id_) |
| #define | COUNTER_COUNT 128 |
| #define | CLOCKS_GAP 0x200 |
Typedefs | |
| typedef struct timer_ee_global_struct_ | timer_ee_global_struct |
Functions | |
| struct counter_struct_ | __attribute__ ((aligned(64))) |
| void | ForTimer_InitAlarm (void) |
| void | SetT2 (volatile void *ptr, u32 val) |
| void | SetT2_COUNT (u32 val) |
| void | SetT2_MODE (u32 val) |
| void | SetT2_COMP (u32 val) |
| void | InsertAlarm_ForTimer (counter_struct_t *timer_link) |
| counter_struct_t * | UnlinkAlarm_ForTimer (counter_struct_t *timer_unlink) |
| s32 | TimerHandler_callback (s32 cause, void *arg, void *addr) |
| void | __attribute__ ((weak)) |
| s32 | GetTimerPreScaleFactor (void) |
| void | SetNextComp (u64 time_now) |
| u64 | iGetTimerSystemTime (void) |
| void | _ps2sdk_init_timer_impl (void) |
| void | _ps2sdk_deinit_timer_impl (void) |
| u64 | GetTimerSystemTime (void) |
| s32 | iAllocTimerCounter (void) |
| s32 | AllocTimerCounter (void) |
| s32 | iFreeTimerCounter (s32 id) |
| s32 | FreeTimerCounter (s32 id) |
| s32 | iGetTimerUsedUnusedCounters (u32 *used_counters, u32 *unused_counters) |
| s32 | GetTimerUsedUnusedCounters (u32 *used_counters, u32 *unused_counters) |
| s32 | iStartTimerCounter (s32 id) |
| s32 | StartTimerCounter (s32 id) |
| s32 | iStopTimerCounter (s32 id) |
| s32 | StopTimerCounter (s32 id) |
| u64 | SetTimerCount (s32 id, u64 timer_count) |
| u64 | iGetTimerBaseTime (s32 id) |
| u64 | GetTimerBaseTime (s32 id) |
| u64 | iGetTimerCount (s32 id) |
| u64 | GetTimerCount (s32 id) |
| s32 | iSetTimerHandler (s32 id, u64 scheduled_time, timer_alarm_handler_t callback_handler, void *arg) |
| s32 | SetTimerHandler (s32 id, u64 scheduled_time, timer_alarm_handler_t callback_handler, void *arg) |
| void | TimerBusClock2USec (u64 clocks, u32 *seconds_result, u32 *microseconds_result) |
| u64 | TimerUSec2BusClock (u32 seconds, u32 microseconds) |
| float | TimerBusClock2Freq (s64 clocks) |
| u64 | TimerFreq2BusClock (float timer_frequency) |
| u32 | cpu_ticks (void) |
Variables | |
| struct counter_struct_ * | timer_next |
| struct counter_struct_ * | timer_previous |
| vu32 | timer_key |
| u32 | timer_mode |
| u64 | timer_base_time |
| u64 | timer_base_count |
| u64 | timer_schedule |
| timer_alarm_handler_t | callback_handler |
| void * | gp_value |
| void * | callback_handler_arg |
| u32 | padding [3] |
| timer_ee_global_struct | g_Timer |
Some routines to do some timer work
Definition in file timer.c.
| #define PTR_TO_TIMER_ID | ( | ptr_ | ) |
| #define TIMER_ID_IS_VALID | ( | id_ | ) |
| #define TIMER_ID_TO_PTR | ( | id_ | ) |
| void __attribute__ | ( | (weak) | ) |
Init the timer
Start the interruption handler for getting the system time This function should be called at beginning of your program
Finish the timer
Stops the interruption handler for getting the system time This function should be called when ending your program
| u64 GetTimerSystemTime | ( | void | ) |
| s32 GetTimerUsedUnusedCounters | ( | u32 * | used_counters, |
| u32 * | unused_counters ) |
| u64 iGetTimerSystemTime | ( | void | ) |
| s32 iGetTimerUsedUnusedCounters | ( | u32 * | used_counters, |
| u32 * | unused_counters ) |
|
extern |
| s32 iSetTimerHandler | ( | s32 | id, |
| u64 | scheduled_time, | ||
| timer_alarm_handler_t | callback_handler, | ||
| void * | arg ) |
| s32 SetTimerHandler | ( | s32 | id, |
| u64 | scheduled_time, | ||
| timer_alarm_handler_t | callback_handler, | ||
| void * | arg ) |
| void TimerBusClock2USec | ( | u64 | clocks, |
| u32 * | seconds_result, | ||
| u32 * | microseconds_result ) |
|
extern |
|
extern |
| struct counter_struct_* timer_next |
| struct counter_struct_* timer_previous |