diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2020-07-29 22:33:18 +0100 |
|---|---|---|
| committer | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2020-07-29 22:33:18 +0100 |
| commit | db629d87c87b905ce3e60457eebf4e6552943260 (patch) | |
| tree | bca57f58e11462d549af0f0980c2d12465e088e8 | |
| parent | f30bb5f136a3344e969024ce7195da0e285ac3b3 (diff) | |
Minor fixes
| -rw-r--r-- | ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp | 8 | ||||
| -rw-r--r-- | ESP32-RGB64x32MatrixPanel-I2S-DMA.h | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp b/ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp index 4666967..286cab1 100644 --- a/ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp +++ b/ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp @@ -269,6 +269,8 @@ bool RGB64x32MatrixPanel_I2S_DMA::allocateDMAmemory() delay(1000); #endif + // Just os we know + everything_OK = true; return true; @@ -389,16 +391,12 @@ void RGB64x32MatrixPanel_I2S_DMA::configureDMA(int r1_pin, int g1_pin, int b1_ delay(1000); #endif - - // Just os we know - everything_OK = true; - + } // end initMatrixDMABuff - /* Update a specific co-ordinate in the DMA buffer */ void RGB64x32MatrixPanel_I2S_DMA::updateMatrixDMABuffer(int16_t x_coord, int16_t y_coord, uint8_t red, uint8_t green, uint8_t blue) { diff --git a/ESP32-RGB64x32MatrixPanel-I2S-DMA.h b/ESP32-RGB64x32MatrixPanel-I2S-DMA.h index 28ffbda..539a312 100644 --- a/ESP32-RGB64x32MatrixPanel-I2S-DMA.h +++ b/ESP32-RGB64x32MatrixPanel-I2S-DMA.h @@ -249,6 +249,9 @@ class RGB64x32MatrixPanel_I2S_DMA : public GFX { #if SERIAL_DEBUG Serial.printf("Set back buffer to: %d\n", back_buffer_id); #endif + + // Wait before we allow any writing to the buffer. Stop flicker. + while(!i2s_parallel_is_previous_buffer_free()) {} } inline void showDMABuffer() @@ -261,6 +264,9 @@ class RGB64x32MatrixPanel_I2S_DMA : public GFX { #endif i2s_parallel_flip_to_buffer(&I2S1, back_buffer_id); + + // Wait before we allow any writing to the buffer. Stop flicker. + while(!i2s_parallel_is_previous_buffer_free()) {} } |
