diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2023-04-19 01:52:26 +0100 |
|---|---|---|
| committer | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2023-04-19 01:52:26 +0100 |
| commit | 004c45d01c66eebe5d84bf92c4692e7fe19e0471 (patch) | |
| tree | 39cf22bea972435f6eb06e3ea460912d8114bda9 /src | |
| parent | ec290f3dba03e7557552d3fedc7c8cc25404c2f6 (diff) | |
| parent | de344347d1e1e1cf6c5e15089b3c2fa116b0b0a7 (diff) | |
Merge branch 'master' of https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA
Diffstat (limited to 'src')
| -rw-r--r-- | src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp index eccf4c9..12555b9 100644 --- a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp +++ b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp @@ -586,7 +586,7 @@ void MatrixPanel_I2S_DMA::clearFrameBuffer(bool _buff_id) } while (colouridx); #if defined(SPIRAM_DMA_BUFFER) - Cache_WriteBack_Addr((uint32_t)row, sizeof(ESP32_I2S_DMA_STORAGE_TYPE) * ((fb->rowBits[row_idx]->width * fb->rowBits[row_idx]->colour_depth) - 1)); + Cache_WriteBack_Addr((uint32_t)row, fb->rowBits[row_idx]->getColorDepthSize()); #endif } while (row_idx); @@ -656,8 +656,9 @@ void MatrixPanel_I2S_DMA::brtCtrlOEv2(uint8_t brt, const int _buff_id) // switch pointer to a row for a specific colour index #if defined(SPIRAM_DMA_BUFFER) - ESP32_I2S_DMA_STORAGE_TYPE *row_hack = fb->rowBits[row_idx]->getDataPtr(colouridx, _buff_id); - Cache_WriteBack_Addr((uint32_t)row_hack, sizeof(ESP32_I2S_DMA_STORAGE_TYPE) * ((fb->rowBits[row_idx]->width * fb->rowBits[row_idx]->colour_depth) - 1)); + ESP32_I2S_DMA_STORAGE_TYPE *row_hack = fb->rowBits[row_idx]->getDataPtr(0, _buff_id); + //Cache_WriteBack_Addr((uint32_t)row_hack, sizeof(ESP32_I2S_DMA_STORAGE_TYPE) * ((fb->rowBits[row_idx]->width * fb->rowBits[row_idx]->colour_depth) - 1)); + Cache_WriteBack_Addr((uint32_t)row_hack, fb->rowBits[row_idx]->getColorDepthSize()); #endif } while (row_idx); } |
