Skip to content

Commit 73b7b20

Browse files
committed
doom: fix demo on CM7
1 parent 754cdab commit 73b7b20

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libraries/doom/doomgeneric_arduino.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static void handleKeyInput()
230230
#endif
231231
}
232232

233-
#define DEBUG_CM7_VIDEO
233+
//#define DEBUG_CM7_VIDEO
234234

235235
static void DMA2D_CopyBuffer(uint32_t *pSrc, uint32_t *pDst)
236236
{
@@ -242,21 +242,21 @@ static void DMA2D_CopyBuffer(uint32_t *pSrc, uint32_t *pDst)
242242

243243
destination = (uint32_t)pDst; // + ((yPos * stm32_getXSize()) + xPos) * 4;
244244

245-
HAL_DMA2D_PollForTransfer(&DMA2D_Handle, 200); /* wait for the previous DMA2D transfer to ends */
245+
HAL_DMA2D_PollForTransfer(&DMA2D_Handle, 100); /* wait for the previous DMA2D transfer to ends */
246246
/* copy the new decoded frame to the LCD Frame buffer*/
247247
HAL_DMA2D_Start(&DMA2D_Handle, (uint32_t)pSrc, destination, DOOMGENERIC_RESX, DOOMGENERIC_RESY);
248248
#if defined(CORE_CM7) && !defined(DEBUG_CM7_VIDEO)
249-
HAL_DMA2D_PollForTransfer(&DMA2D_Handle, 200); /* wait for the previous DMA2D transfer to ends */
249+
HAL_DMA2D_PollForTransfer(&DMA2D_Handle, 100); /* wait for the previous DMA2D transfer to ends */
250250
#endif
251251
}
252252

253253
void DG_DrawFrame()
254254
{
255255
uint32_t fb = getNextFrameBuffer();
256256
#ifdef CORE_CM7
257-
SCB_CleanInvalidateDCache();
258-
SCB_InvalidateICache();
259-
//SCB_InvalidateDCache_by_Addr((uint32_t *)fb, DOOMGENERIC_RESX * DOOMGENERIC_RESY * 4);
257+
//SCB_CleanInvalidateDCache();
258+
//SCB_InvalidateICache();
259+
SCB_InvalidateDCache_by_Addr((uint32_t *)fb, DOOMGENERIC_RESX * DOOMGENERIC_RESY * 4);
260260
#endif
261261

262262
DMA2D_CopyBuffer((uint32_t *)DG_ScreenBuffer, (uint32_t *)fb);

0 commit comments

Comments
 (0)