diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-02-27 19:45:38 +0100 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-02-27 19:45:38 +0100 |
| commit | 69a364049a3958396d2d083c660591dad9ec257d (patch) | |
| tree | e56b1b614890e512726448dad10cb68b3b7b261f /examples/system | |
| parent | a2da2debfde1d44338d203aa4d56e485c4bb16ae (diff) | |
| download | psn00bsdk-69a364049a3958396d2d083c660591dad9ec257d.tar.gz | |
Rename some hwregs_c.h and hwregs.a definitions
Diffstat (limited to 'examples/system')
| -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); |
