Quote:
As you can see it uses loop without returning from main(). Could you tell me codes for each your key? int main() { int iOldPwr = read_mem(CLOCK_PWRCON); int nKey; int i; unsigned int iAddr = 0; unsigned int imask_tmp; int iSec =0; read_creg(%imask, imask_tmp); write_creg(%imask, 0x0000); initConsole(); printf(" Start...\n"); while ( 1 ) { nKey = waitKey(); printf("Pressed %04x\n",nKey); if ((nKey & KEY_VAL_PLAY) ) { break; } } setCursor(0,14); setColor(COLOR_WHITE); setColorBg(COLOR_BLACK); printf("\n\n\n"); printf("FAP vers. 0.3\n"); printf("(C) 2010 by Y.Pokhilko (sig11@mail.ru)\n"); printf("Latest version always at:\n"); printf("http://ypokhilko.vn.ua/apps/\n"); printf("Press any key to continue\n"); waitKey(); waitKey(); write_creg(%imask, imask_tmp); SetGameFreq(72); write_mem(CLOCK_PWRCON,iOldPwr); (*GameExit)(); } |
I noticed that they are all the same for no matter what key I press (either 66 or 64 randomly). It reminds me trying to init my touchpad using firmware from SDK (rk26). My touchpad seems to be using completely different way of getting input values rather than simple reading GPIO pin states.
But your app seems to work even if main() function does not finish quickly. What's the trick? Everytime I (and knob also) lengthen the time of executing this function above 2 secs it crashes. Is this caused by this (*GetKeyVal)() function? Also I noticed you added CPU management to your apps, that's something I planned to do for a long time (I noticed huge battery consumption while running some RKP app because of that). btw. It somehow reads that I touch my touchpad, but its rather caused by reaction of back-light (of touchpad) driver which is mainly operated by KEY_PORT mem address (the higher value in there, the brighter lights of touchpad are). |
Quote:
Probably needed to use another port? Quote:
Quote:
|
Quote:
Quote:
#define DMA_ENABLE_INTERRUPT { write_creg(%imask, imask_tmp);} is this enough? I used it to disable interrupt while managing SDRAM transfer. But I always enable it once transfer is done. If I disable it completely, it wont crash then? How about this screen refresh, it refreshes screen after main() is ended. Are you uploading graphics directly to LCD_DATA memory? Quote:
|
Quote:
Quote:
I am using LCD_DATA port to generate bitmap and I do not use SDRAM yet. Quote:
|
Quote:
Gosh, I wish I had player with normal keyboard. This touchpad is driving me crazy, not only because of this whole mess, but it happens that touchpad locks up sometimes and I need reset - developers of my player did lazy job in creating their driver. Also if I was able to do my own driver I would be able to use touchpad more efficiently (for example finger sliding detection is supported by the chip but it's not supported by built-in driver). So some sort of mouse-like input would be possible - just dreaming :-) |
Quote:
DealExtreme: $41.90 Stylish 2.4-inch 1GB MP4 Player with SD Card Slot http://www1.dealextreme.com/producti...23_1_small.jpg Not sure if this one supports .rkp:- 206K Full Color 1GB MP4 Player - Easy Navigation Keys China Wholesale - *************** Buy China wholesale - 206K Full Color 1GB MP4 Player - Easy Navigation Keys http://www.davismicro.com/bookpic/20085222045067430.jpg I really like this player best, with a removable nokia phone battery too, full size SD card, buttons look nice (I count a total of 10!), would be better in 2GB though. update. found a 2Gig one. ;) http://www.onvon.com/206k-full-color...5e3558cb38f782 |
Quote:
|
Quote:
Also, the firmware is really good (IMHO) ;) I think I can recommend it. |
Quote:
|
| All times are GMT -7. The time now is 8:38 pm. |
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 RC 2