Quote:
Quote:
Though whole SDK is very buggy. btw sprintf doesn't support long data type. This function acts like it was signed int then. |
Quote:
int fputc(int ch,int handle) { if ( ch & 0xFF ) outch1(ch & 0xFF); if ( ch >> 8 ) outch1(ch >> 8); return 1; } int fwrite(const char* buff,int isize,int count,int handle) { int i; int j = count; while ( j > 0 ) { for ( i = 0; i < isize; i++ ) { int ch = *buff; outch1(ch & 0xFF); outch1(ch >> 8); buff++; } j--; } return count; } where outch1() is your function for output of one char. My console driver is not ready yet ( cursor is missing, 8x16 font only, CP866 only, no UTF8 support e.t.c. ) |
That great! thanks.
I have been trying to emulate the conio.h functions like clrscr(), gotoxy() getch()to make game porting easier. I was having problems making a while loop work for a getch() to emulate an operation like "press any key" I'll give it another try.:) tried this instead of while:- int KeyVal; KeyVal=(*GetKeyVal)(); KeyVal=KeyVal&0x1FFF; for ( ; ; ) { if (KeyVal==KEY_VAL_PLAY) break; } player just locks up, got something to do with detecting the keypress. |
Quote:
#define KEY_PORT GPIO_PDAT0 unsigned int getKey() { unsigned int KeyTemp; KeyTemp = read_mem(KEY_PORT); KeyTemp = ((~KeyTemp) & 0x3f) | (KeyTemp & 0x40); return (KeyTemp); } |
(Sorry for my bad English)
Does this means that we are going to be able to run an app that can read files from FLASH ??? |
Quote:
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. Quote:
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. |
Quote:
Keeping this in mind, I will have another go at this, thanks again, flasher. ;) |
Quote:
BTW. Open Dialog is almost done. Going into directories works, as well as coming back up level, also I introduced icons (in the sd card there must be icons folder in which icons in bmp format are stored and named like extentions of files ex. txt.bmp, gif.bmp and so on). Now I am trying to make scrolling of the filenames longer than possible to display in a row. Next will be filtering filelist only to files that we are interested in, and its done. |
1 Attachment(s)
Quote:
Does it work on your player? |
It shows START...
I press some key and it shows some number just below it (66 or 64?), then there are some messages and "Press any key to continue" text. After that nothing. I don't know if this suppose to continue after some key is pressed but it stucks here(no quit possible). Also I noticed that backlight of my touchpad is always turned on in your application, while by default it turns on when I hit the button and turns off about a sec later. So I don't think that it should be used - it interfere custom input driver. Beside that, its amazing how your console works. I like it! EDIT: I downloaded file manager from your repository, and it doesn't get stuck before init, but keyboard isn't working on my player. It acts like it was always the same button. Waiting for a new version so I can test it. It looks nice. |
| 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