Skip to content

Commit

Permalink
Simple Speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewCapon committed Oct 20, 2023
1 parent 28a58b8 commit 944dbbe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ void Arduino_H7_Video::beginDraw() {

void Arduino_H7_Video::endDraw() {
ArduinoGraphics::endDraw();

#ifdef CORE_CM7
SCB_CleanInvalidateDCache();
#endif
dsi_drawCurrentFrameBuffer();
}

Expand Down Expand Up @@ -184,7 +186,9 @@ void Arduino_H7_Video::set(int x, int y, uint8_t r, uint8_t g, uint8_t b) {
return;

uint32_t color = (uint32_t)((uint32_t)(r << 16) | (uint32_t)(g << 8) | (uint32_t)(b << 0));
dsi_lcdFillArea((void *)(dsi_getCurrentFrameBuffer() + ((x_rot + (dsi_getDisplayXSize() * y_rot)) * sizeof(uint16_t))), 1, 1, color);

uint16_t *pData = (uint16_t *)dsi_getCurrentFrameBuffer() + ((x_rot + (dsi_getDisplayXSize() * y_rot)));
*pData = color;
}
#endif

Expand Down

0 comments on commit 944dbbe

Please sign in to comment.