Attempted clearScreen() syncronisation fix
No idea if this will work.
This commit is contained in:
parent
ab641b9642
commit
f6584dd321
2 changed files with 8 additions and 5 deletions
|
@ -532,9 +532,9 @@ void IRAM_ATTR MatrixPanel_I2S_DMA::updateMatrixDMABuffer(int16_t x_coord, int16
|
||||||
|
|
||||||
|
|
||||||
/* Update the entire buffer with a single specific colour - quicker */
|
/* Update the entire buffer with a single specific colour - quicker */
|
||||||
void MatrixPanel_I2S_DMA::updateMatrixDMABuffer(uint8_t red, uint8_t green, uint8_t blue)
|
bool MatrixPanel_I2S_DMA::updateMatrixDMABuffer(uint8_t red, uint8_t green, uint8_t blue)
|
||||||
{
|
{
|
||||||
if ( !initialized ) return;
|
if ( !initialized ) return false;
|
||||||
|
|
||||||
/* https://ledshield.wordpress.com/2012/11/13/led-brightness-to-your-eye-gamma-correction-no/ */
|
/* https://ledshield.wordpress.com/2012/11/13/led-brightness-to-your-eye-gamma-correction-no/ */
|
||||||
#ifndef NO_CIE1931
|
#ifndef NO_CIE1931
|
||||||
|
@ -585,6 +585,8 @@ void MatrixPanel_I2S_DMA::updateMatrixDMABuffer(uint8_t red, uint8_t green, uint
|
||||||
|
|
||||||
} while(matrix_frame_parallel_row); // end row iteration
|
} while(matrix_frame_parallel_row); // end row iteration
|
||||||
} // colour depth loop (8)
|
} // colour depth loop (8)
|
||||||
|
|
||||||
|
return true;
|
||||||
} // updateMatrixDMABuffer (full frame paint)
|
} // updateMatrixDMABuffer (full frame paint)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -425,9 +425,10 @@ class MatrixPanel_I2S_DMA {
|
||||||
virtual void fillScreen(uint16_t color); // overwrite adafruit implementation
|
virtual void fillScreen(uint16_t color); // overwrite adafruit implementation
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A wrapper to fill whatever selected DMA buffer / screen with black
|
* A wrapper to fill whatever selected DMA buffer / screen with black.
|
||||||
|
* Returns true when operation is completed for syncronisation reasons.
|
||||||
*/
|
*/
|
||||||
inline void clearScreen(){ updateMatrixDMABuffer(0,0,0); };
|
inline bool clearScreen(){ return updateMatrixDMABuffer(0,0,0); };
|
||||||
|
|
||||||
#ifndef NO_FAST_FUNCTIONS
|
#ifndef NO_FAST_FUNCTIONS
|
||||||
/**
|
/**
|
||||||
|
@ -597,7 +598,7 @@ class MatrixPanel_I2S_DMA {
|
||||||
void updateMatrixDMABuffer(int16_t x, int16_t y, uint8_t red, uint8_t green, uint8_t blue);
|
void updateMatrixDMABuffer(int16_t x, int16_t y, uint8_t red, uint8_t green, uint8_t blue);
|
||||||
|
|
||||||
/* Update the entire DMA buffer (aka. The RGB Panel) a certain colour (wipe the screen basically) */
|
/* Update the entire DMA buffer (aka. The RGB Panel) a certain colour (wipe the screen basically) */
|
||||||
void updateMatrixDMABuffer(uint8_t red, uint8_t green, uint8_t blue);
|
bool updateMatrixDMABuffer(uint8_t red, uint8_t green, uint8_t blue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wipes DMA buffer(s) and reset all color/service bits
|
* wipes DMA buffer(s) and reset all color/service bits
|
||||||
|
|
Loading…
Reference in a new issue