Improved check for rendering in progress in HX83XX display driver, now both chip select and DMA enable bit are verified

replace/d4def4edbd283de85742b86200f78e59b3b9a8f5
Silvano Seva 2020-10-25 17:22:33 +01:00 zatwierdzone przez Niccolò Izzo
rodzic 1877f92905
commit bf3488def8
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -401,8 +401,12 @@ void display_render()
bool display_renderingInProgress()
{
/* Rendering is in progress if display's chip select is low. */
return gpio_readPin(LCD_CS);
/*
* Rendering is in progress if display's chip select is low or a DMA
* transfer is in progress.
*/
bool dmaBusy = (DMA2_Stream7->CR & DMA_SxCR_EN) ? true : false;
return (gpio_readPin(LCD_CS) == 0) || dmaBusy;
}
void *display_getFrameBuffer()