Add simple lcdRefresh() speedtest

This commit is contained in:
Stefan `Sec` Zehl 2011-08-01 14:32:22 +02:00
parent 49c49e328f
commit bd047cbe5a
2 changed files with 42 additions and 0 deletions

View File

@ -127,3 +127,44 @@ void f_font(void){
while(!getInputRaw())delayms(10);
};
void f_speedtest(void){
lcdClear();
lcdPrintln("Speedtest");
lcdNl();
lcdNl();
lcdPrintln("running...");
int start=getTimer();
int ctr=0;
while(ctr++<1000){
lcdRefresh();
};
start=getTimer()-start;
lcdPrint("Ticks:");
lcdPrintln(IntToStr(start,6,0));
lcdPrint("Tickspd:");
lcdPrintln(IntToStr(SYSTICKSPEED,3,0));
lcdRefresh();
getInputWait();
getInputWaitRelease();
};
void f_speedtest2(void){
lcdClear();
lcdPrintln("Speedtest");
lcdNl();
lcdNl();
lcdPrintln("running...");
int start=getTimer();
int ctr=0;
int tm;
while(!getInputRaw()){
ctr++;
tm=((getTimer()-start)*SYSTICKSPEED)*1000/ctr;
DoInt(0,32,tm);
lcdRefresh();
};
getInputWaitRelease();
};

View File

@ -1,6 +1,7 @@
#include <sysinit.h>
#include "basic/basic.h"
#include "basic/config.h"
#include "lcd/lcd.h"
#include "lcd/print.h"