diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/graphics/rgb24/bunpattern.png | bin | 0 -> 59932 bytes | |||
| -rw-r--r-- | examples/io/pads/spi.c | 6 | ||||
| -rw-r--r-- | examples/system/timer/main.c | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/examples/graphics/rgb24/bunpattern.png b/examples/graphics/rgb24/bunpattern.png Binary files differnew file mode 100644 index 0000000..61524f8 --- /dev/null +++ b/examples/graphics/rgb24/bunpattern.png diff --git a/examples/io/pads/spi.c b/examples/io/pads/spi.c index 05a0e59..43b5bc3 100644 --- a/examples/io/pads/spi.c +++ b/examples/io/pads/spi.c @@ -179,12 +179,12 @@ SPI_Request *SPI_CreateRequest(void) { } void SPI_SetPollRate(uint32_t value) { - TIM_CTRL(2) = 0x0258; // CLK/8 input, IRQ on reload, disable one-shot IRQ + TIMER_CTRL(2) = 0x0258; // CLK/8 input, IRQ on reload, disable one-shot IRQ if (value < 65) - TIM_RELOAD(2) = 0xffff; + TIMER_RELOAD(2) = 0xffff; else - TIM_RELOAD(2) = (F_CPU / 8) / value; + TIMER_RELOAD(2) = (F_CPU / 8) / value; } void SPI_Init(SPI_Callback callback) { 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); |
