diff options
| author | John "Lameguy" Wilbert Villamor <lameguy64@gmail.com> | 2022-03-25 09:22:20 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-25 09:22:20 +0800 |
| commit | 975e614b3c840e2f717adac1d1cb9cee4e5e561b (patch) | |
| tree | 6584ce5b0dbe27a466c95c81fac61b0d90f627bd /examples/system/timer | |
| parent | 05d44488bd5587786f4bd0286fc0f555c79aa46a (diff) | |
| parent | 45168ae43e29aa5930ee5a206475ae836078915f (diff) | |
| download | psn00bsdk-975e614b3c840e2f717adac1d1cb9cee4e5e561b.tar.gz | |
Merge pull request #46 from spicyjpeg/psxmdec
Critical ldscript fixes, initial MDEC support and CI updates
Diffstat (limited to 'examples/system/timer')
| -rw-r--r-- | examples/system/timer/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/system/timer/main.c b/examples/system/timer/main.c index 8153581..eb62712 100644 --- a/examples/system/timer/main.c +++ b/examples/system/timer/main.c @@ -3,6 +3,7 @@ #include <psxgpu.h> #include <psxapi.h> #include <psxetc.h> +#include <hwregs_c.h> /* OT and Packet Buffer sizes */ #define OT_LEN 256 @@ -34,7 +35,7 @@ void display(); volatile int timer_calls = 0; -volatile short *timer2_ctrl = (short*)0x1F801124; + void timer_func() { timer_calls++; @@ -74,7 +75,7 @@ int main() { //counter = 5163000/560; SetRCnt(RCntCNT2, counter, RCntMdINTR); - *timer2_ctrl = 0x1E58; + TIMER_CTRL(2) = 0x1E58; InterruptCallback(6, timer_func); StartRCnt(RCntCNT2); ChangeClearRCnt(2, 0); |
