Activate cache
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include "spi.h"
|
||||
#include "gpio.h"
|
||||
#include "../../nokia.h"
|
||||
#include <stdio.h>
|
||||
|
||||
extern void ScreenSaver(void);
|
||||
|
||||
@ -94,16 +95,31 @@ int main(void)
|
||||
|
||||
Nokia_Init();
|
||||
|
||||
|
||||
uint32_t oldTick=HAL_GetTick();
|
||||
uint32_t newTick=oldTick;
|
||||
uint32_t fps=0;
|
||||
|
||||
SCB_EnableICache();
|
||||
SCB_EnableDCache();
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
while (1) {
|
||||
|
||||
newTick=HAL_GetTick();
|
||||
|
||||
if(newTick-oldTick>1000)
|
||||
{
|
||||
oldTick=newTick;
|
||||
printf("FPS: %d\r\n",fps);
|
||||
fps=0;
|
||||
}
|
||||
|
||||
ScreenSaver();
|
||||
NokiaUpdate();
|
||||
fps++;
|
||||
|
||||
|
||||
/* USER CODE END WHILE */
|
||||
|
Reference in New Issue
Block a user