SceSystimer: Difference between revisions
(→Module) |
(Add description for all functions in 3.65) |
||
Line 1: | Line 1: | ||
Manages the '''sys'''tem '''timer'''s. This module wraps the [[Hardware Timers]] and add some functionalities, along with providing a consistent interface. | |||
== Module == | == Module == | ||
Line 5: | Line 7: | ||
! Version !! World !! Privilege | ! Version !! World !! Privilege | ||
|- | |- | ||
| | | 0.931-3.65 || Non-secure || Kernel | ||
|} | |} | ||
Line 16: | Line 18: | ||
! Version !! Name !! World !! Visibility !! NID | ! Version !! Name !! World !! Visibility !! NID | ||
|- | |- | ||
| | | 0.931-3.65 || [[SceSystimer#SceSystimerForDriver|SceSystimerForDriver]] || Non-secure || Kernel || 0xA47EB09A | ||
|} | |} | ||
== Types == | |||
<source lang="C"> | |||
#define SYSTIMER_TYPE_LONG 1 | |||
#define SYSTIMER_TYPE_WORD 2 | |||
typedef SceInt32 SceSystimerType; | |||
typedef SceInt32 SceSystimerId; | |||
typedef void (*SceSystimerCallback)(SceSystimerId timer, void* pUserData); | |||
</source> | |||
== SceSystimerForDriver == | == SceSystimerForDriver == | ||
Line 29: | Line 42: | ||
|} | |} | ||
<source lang="C">SceSystimerId sceKernelSysTimerAllocForDriver(SceSystimerType type);</source> | |||
=== SceSystimerForDriver_0450933B === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x0450933B | |||
|} | |||
Edit some bits (mask 0xFFF00700) of the timer's config register. Timer must not be counting. | |||
<source lang="C"> | |||
// if (a2 < 0x10), written to bits 0x00F00000 | |||
// else (a2 & 0x7) written to bits 0x00000700 and 0x2 written to bits 0x00F00000 | |||
// a3 written to bits 0xFF000000 | |||
SceInt32 SceSystimerForDriver_0450933B(SceSystimerId timer, SceUInt32 a2, SceUInt32 a3); | |||
</source> | |||
=== SceSystimerForDriver_1B14DFD6 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x1B14DFD6 | |||
|} | |||
Sets the timer's current counter value? | |||
<source lang="C">SceInt32 SceSystimerForDriver_1B14DFD6(SceSystimerId timer, SceKernelSysClock a2);</source> | |||
=== SceSystimerForDriver_59EBD22D === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x59EBD22D | |||
|} | |||
Start timer. | |||
<source lang="C">SceInt32 SceSystimerForDriver_59EBD22D(SceSystimerId timer);</source> | |||
=== SceSystimerForDriver_7DEBA6A5 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x7DEBA6A5 | |||
|} | |||
Reset timer? Sets current counter and accumulated counter to 0. | |||
<source lang="C">SceInt32 SceSystimerForDriver_7DEBA6A5(SceSystimerId timer);</source> | |||
=== SceSystimerForDriver_8358611F === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x8358611F | |||
|} | |||
<code>sceKernelSysTimerFree</code>? Stops timer if necessary. | |||
<source lang="C">SceInt32 SceSystimerForDriver_8358611F(SceSystimerId timer);</source> | |||
=== SceSystimerForDriver_85AAE0DD === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x85AAE0DD | |||
|} | |||
Get timer accumulated time (i.e. <code>*a2 = timer->currentCounter + (sum of counter of each time interrupt was triggered)</code>) | |||
<source lang="C">SceInt32 SceSystimerForDriver_85AAE0DD(SceSystimerId timer, SceKernelSysClock* a2);</source> | |||
=== SceSystimerForDriver_904DF737 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x904DF737 | |||
|} | |||
Edits some bits (mask 0x000F0080) of the timer's config register. Timer must not be counting. | |||
<source lang="C"> | |||
// a2 written to bits 0x000F0000 | |||
// a3 written to bit 0x00000080 | |||
// additionaly, config register is also |= 0x40 | |||
SceInt32 SceSystimerForDriver_904DF737(SceSystimerId timer, SceUInt32 a2, SceBool a3); | |||
</source> | |||
=== SceSystimerForDriver_963F7C0D === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0x963F7C0D | |||
|} | |||
Get timer counter (i.e. <code>*a2 = timer->currentCount</code>). | |||
<source lang="C">SceInt32 SceSystimerForDriver_963F7C0D(SceSystimerId timer, SceKernelSysClock* a2);</source> | |||
=== SceSystimerForDriver_A73351C1 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0xA73351C1 | |||
|} | |||
Set timer threshold? Timer must not be counting. | |||
<source lang="C">SceInt32 SceSystimerForDriver_A73351C1(SceSystimerId timer, SceKernelSysClock a2);</source> | |||
=== SceSystimerForDriver_BF8D42B0 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0xBF8D42B0 | |||
|} | |||
Stop timer. | |||
<source lang="C">SceInt32 SceSystimerForDriver_BF8D42B0(SceSystimerId timer);</source> | |||
=== SceSystimerForDriver_C34D7940 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0xC34D7940 | |||
|} | |||
Edits some bits (mask 0x0000F000) of the timer's config register. Timer must not be counting. | |||
<source lang="C"> | |||
// a2 written to bits 0x0000F000 | |||
// additionaly, config register is also |= 0x20 | |||
SceInt32 SceSystimerForDriver_C34D7940(SceSystimerId timer, SceUInt32 a2); | |||
</source> | |||
=== SceSystimerForDriver_CCCD1EE3 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0xCCCD1EE3 | |||
|} | |||
Set behaviour on interrupt. | |||
<source lang="C"> | |||
/* | |||
* cb will be invoked whenever the timer is interrupted - timer and pUserData arguments will be the same as provided to this function | |||
* cb will only be called if SceSystimerForDriver_A73351C1() has been called with non-zero argument (e.g. timer has a threshold) | |||
* cb can be NULL, in which case targetCPU will not be set | |||
* | |||
* targetCPU follows the same rules as sceKernelSetIntrTarget() - see SceKernelIntrMgr for more info | |||
*/ | |||
SceInt32 SceSystimerForDriver_CCCD1EE3(SceSystimerId timer, SceSystimerCallback cb, SceUInt32 targetCPU, void* pUserData); | |||
</source> | |||
=== SceSystimerForDriver_FD5F1742 === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 3.65 || 0xFD5F1742 | |||
|} | |||
Read some ?counter? from the timer. | |||
<source lang="C">SceInt32 SceSystimerForDriver_FD5F1742(SceSystimerId timer, SceKernelSysClock* a2);</source> | |||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Kernel]] | [[Category:Kernel]] |
Revision as of 22:11, 11 July 2022
Manages the system timers. This module wraps the Hardware Timers and add some functionalities, along with providing a consistent interface.
Module
Version | World | Privilege |
---|---|---|
0.931-3.65 | Non-secure | Kernel |
Libraries
Known NIDs
Version | Name | World | Visibility | NID |
---|---|---|---|---|
0.931-3.65 | SceSystimerForDriver | Non-secure | Kernel | 0xA47EB09A |
Types
#define SYSTIMER_TYPE_LONG 1 #define SYSTIMER_TYPE_WORD 2 typedef SceInt32 SceSystimerType; typedef SceInt32 SceSystimerId; typedef void (*SceSystimerCallback)(SceSystimerId timer, void* pUserData);
SceSystimerForDriver
sceKernelSysTimerAllocForDriver
Version | NID |
---|---|
0.990-3.60 | 0xE2B9D8E9 |
SceSystimerId sceKernelSysTimerAllocForDriver(SceSystimerType type);
SceSystimerForDriver_0450933B
Version | NID |
---|---|
3.65 | 0x0450933B |
Edit some bits (mask 0xFFF00700) of the timer's config register. Timer must not be counting.
// if (a2 < 0x10), written to bits 0x00F00000 // else (a2 & 0x7) written to bits 0x00000700 and 0x2 written to bits 0x00F00000 // a3 written to bits 0xFF000000 SceInt32 SceSystimerForDriver_0450933B(SceSystimerId timer, SceUInt32 a2, SceUInt32 a3);
SceSystimerForDriver_1B14DFD6
Version | NID |
---|---|
3.65 | 0x1B14DFD6 |
Sets the timer's current counter value?
SceInt32 SceSystimerForDriver_1B14DFD6(SceSystimerId timer, SceKernelSysClock a2);
SceSystimerForDriver_59EBD22D
Version | NID |
---|---|
3.65 | 0x59EBD22D |
Start timer.
SceInt32 SceSystimerForDriver_59EBD22D(SceSystimerId timer);
SceSystimerForDriver_7DEBA6A5
Version | NID |
---|---|
3.65 | 0x7DEBA6A5 |
Reset timer? Sets current counter and accumulated counter to 0.
SceInt32 SceSystimerForDriver_7DEBA6A5(SceSystimerId timer);
SceSystimerForDriver_8358611F
Version | NID |
---|---|
3.65 | 0x8358611F |
sceKernelSysTimerFree
? Stops timer if necessary.
SceInt32 SceSystimerForDriver_8358611F(SceSystimerId timer);
SceSystimerForDriver_85AAE0DD
Version | NID |
---|---|
3.65 | 0x85AAE0DD |
Get timer accumulated time (i.e. *a2 = timer->currentCounter + (sum of counter of each time interrupt was triggered)
)
SceInt32 SceSystimerForDriver_85AAE0DD(SceSystimerId timer, SceKernelSysClock* a2);
SceSystimerForDriver_904DF737
Version | NID |
---|---|
3.65 | 0x904DF737 |
Edits some bits (mask 0x000F0080) of the timer's config register. Timer must not be counting.
// a2 written to bits 0x000F0000 // a3 written to bit 0x00000080 // additionaly, config register is also |= 0x40 SceInt32 SceSystimerForDriver_904DF737(SceSystimerId timer, SceUInt32 a2, SceBool a3);
SceSystimerForDriver_963F7C0D
Version | NID |
---|---|
3.65 | 0x963F7C0D |
Get timer counter (i.e. *a2 = timer->currentCount
).
SceInt32 SceSystimerForDriver_963F7C0D(SceSystimerId timer, SceKernelSysClock* a2);
SceSystimerForDriver_A73351C1
Version | NID |
---|---|
3.65 | 0xA73351C1 |
Set timer threshold? Timer must not be counting.
SceInt32 SceSystimerForDriver_A73351C1(SceSystimerId timer, SceKernelSysClock a2);
SceSystimerForDriver_BF8D42B0
Version | NID |
---|---|
3.65 | 0xBF8D42B0 |
Stop timer.
SceInt32 SceSystimerForDriver_BF8D42B0(SceSystimerId timer);
SceSystimerForDriver_C34D7940
Version | NID |
---|---|
3.65 | 0xC34D7940 |
Edits some bits (mask 0x0000F000) of the timer's config register. Timer must not be counting.
// a2 written to bits 0x0000F000 // additionaly, config register is also |= 0x20 SceInt32 SceSystimerForDriver_C34D7940(SceSystimerId timer, SceUInt32 a2);
SceSystimerForDriver_CCCD1EE3
Version | NID |
---|---|
3.65 | 0xCCCD1EE3 |
Set behaviour on interrupt.
/* * cb will be invoked whenever the timer is interrupted - timer and pUserData arguments will be the same as provided to this function * cb will only be called if SceSystimerForDriver_A73351C1() has been called with non-zero argument (e.g. timer has a threshold) * cb can be NULL, in which case targetCPU will not be set * * targetCPU follows the same rules as sceKernelSetIntrTarget() - see SceKernelIntrMgr for more info */ SceInt32 SceSystimerForDriver_CCCD1EE3(SceSystimerId timer, SceSystimerCallback cb, SceUInt32 targetCPU, void* pUserData);
SceSystimerForDriver_FD5F1742
Version | NID |
---|---|
3.65 | 0xFD5F1742 |
Read some ?counter? from the timer.
SceInt32 SceSystimerForDriver_FD5F1742(SceSystimerId timer, SceKernelSysClock* a2);