Hi,
I wat to setup a simple timer interrupt which displays a text message e.g. everyday at 9am. I am really at the beginning of my code but I am not sure what route to choose now. I guess what is needed is some kind of an interrupt to not loop until time=9am. Is there any tutorial out there which explains how to set up timer interrupts?
Also, would a separate prx filebe required here? Can prx programs be considered as separate threads at all or should that be done inside my main internally?
I would really like to understand prx and threads on PSP better but the SDK doxygen doc is too hard for me to understand. Does anyone know of good tutorials?
Best regards,
Kai
Timer and Interrupts
-
- Posts: 36
- Joined: Thu Nov 29, 2007 7:08 pm
-
- Posts: 36
- Joined: Thu Nov 29, 2007 7:08 pm
Adrahil, this is exactly what I am looking for. I am using the VTimers successfully but when the PSP goes to sleep, the timers go to sleep as well and there is no chance to wake the PSP up from a VTimer callback.
I checked the psprtc.h header file but could not find any rtc timer handler functionality. Ca you give me a clue where in the sdk these functions sit?
I checked the psprtc.h header file but could not find any rtc timer handler functionality. Ca you give me a clue where in the sdk these functions sit?
Have a look at Art's code. There is a modified psprtc.h and a little alarm library.
http://forums.qj.net/f-psp-development- ... 36338.html
http://forums.qj.net/f-psp-development- ... 36338.html
-
- Posts: 36
- Joined: Thu Nov 29, 2007 7:08 pm
Ok. I had a look the the timebaby source code and I copied the modified psprtc.h header into my sdk directory (by the way,when is this new header file going to be part of the standard sdk distribution?)
When compiling my code I get
[Linker error] undefined reference to `sceRtcRegisterCallback'
[Linker error] undefined reference to `sceRtcSetAlarmTick'
which are two of the functions that are new in the psprtc.h so I assumed they sit in the precompiled .s files provided with the sources. I included them in my makefile and now I get the follwoing compile errors:
unrecognized opcode `dummy'
junk at end of line, first unrecognized character is `/'
[sceRtc_driver.o] Error 1
How can these functions`sceRtcRegisterCallback' and `sceRtcSetAlarmTick' be made accessable more easily? Or how doI get rid of the assembler errors in a precompiled .s file?
When compiling my code I get
[Linker error] undefined reference to `sceRtcRegisterCallback'
[Linker error] undefined reference to `sceRtcSetAlarmTick'
which are two of the functions that are new in the psprtc.h so I assumed they sit in the precompiled .s files provided with the sources. I included them in my makefile and now I get the follwoing compile errors:
unrecognized opcode `dummy'
junk at end of line, first unrecognized character is `/'
[sceRtc_driver.o] Error 1
How can these functions`sceRtcRegisterCallback' and `sceRtcSetAlarmTick' be made accessable more easily? Or how doI get rid of the assembler errors in a precompiled .s file?