
30th Apr 2010, 11:38 am
|
|
Junior Member
|
|
Join Date: Sep 2009
Posts: 31
|
|
Quote:
Originally Posted by flasher86
it looks up because it causes an infinite loop because variable KeyVal doesn't change no matter what happes with (*GetKeyVal)() as the result of this function is assigned to KeyVal before the loop. You should use (*GetKeyVal)() inside the loop.
Another problem with that is that if a one cycle of main() function tooks too much time, it locks up no matter how properly it is designed. In my case it keep hanging after about 2 seconds of executing main(), so this function must hang. Try to do this using multiply main() function variable dependent loop which will work for sure. Its because main function is executed directly by FW code every single time, and between those calls to this function it does some necessary operations (not sure what exactly though). For instance screen doesn't get refreshed before one cycle of main() is executed. If we draw a bitmap, it will be displayed only after main() function is ended.
But normal use of "getch()" or "repeat until keypressed" (pascal) is as far as I know impossible to implement. We must follow tricks to do that, because to be honest, when I first met RKP platform I was surprised by the way its all running (infinite loop of main function - in opposite to normal console app where main is executed once and thats it.
For now we can only read RAW data of flash memory, but implementing filesystem is possible, so probably yes - it will be possible to read files from flash - not sure about writing though, but who knows
SIG11. But isn't your function reading values only from standard button input? I got touchpad, so most probably (*GetKeyVal)() is something that should be left original way because it may be written differently - depends on used input keyboard driver in a particular rk26 model player.
|
Try attachment.
Does it work on your player?
|