Dropped display_renderingInProgress() function from display API

Removed display_renderingInProgress() function from display interface as it
has never been used so far.
pull/238/head
Silvano Seva 2024-01-17 00:13:19 +01:00
rodzic c533c47103
commit 731054a131
11 zmienionych plików z 4 dodań i 77 usunięć

Wyświetl plik

@ -134,14 +134,6 @@ void gfx_renderRows(uint8_t startRow, uint8_t endRow);
*/
void gfx_render();
/**
* This function calls the correspondent method of the low level interface display.h
* Check if framebuffer is being copied to the screen or not, in which case it
* can be modified without problems.
* @return false if rendering is not in progress.
*/
bool gfx_renderingInProgress();
/**
* Clears a portion of the screen content
* This results in a black screen on color displays

Wyświetl plik

@ -94,13 +94,6 @@ void display_renderRows(uint8_t startRow, uint8_t endRow);
*/
void display_render();
/**
* Check if framebuffer is being copied to the screen or not, in which case it
* can be modified without problems.
* @return false if rendering is not in progress.
*/
bool display_renderingInProgress();
/**
* Set display contrast.
* NOTE: not all the display controllers support contrast control, thus on some

Wyświetl plik

@ -147,7 +147,7 @@ static bw_t _color2bw(color_t true_color)
#error Please define a pixel format type into hwconfig.h or meson.build
#endif
static bool initialized = 0;
static PIXEL_T *buf;
static uint16_t fbSize;
static char text[32];
@ -156,7 +156,6 @@ void gfx_init()
{
display_init();
buf = (PIXEL_T *)(display_getFrameBuffer());
initialized = 1;
// Calculate framebuffer size
#ifdef CONFIG_PIX_FMT_RGB565
@ -174,7 +173,6 @@ void gfx_init()
void gfx_terminate()
{
display_terminate();
initialized = 0;
}
void gfx_renderRows(uint8_t startRow, uint8_t endRow)
@ -187,15 +185,11 @@ void gfx_render()
display_render();
}
bool gfx_renderingInProgress()
{
return display_renderingInProgress();
}
void gfx_clearRows(uint8_t startRow, uint8_t endRow)
{
if(!initialized) return;
if(endRow < startRow) return;
if(endRow < startRow)
return;
uint16_t start = startRow * CONFIG_SCREEN_WIDTH * sizeof(PIXEL_T);
uint16_t height = endRow - startRow * CONFIG_SCREEN_WIDTH * sizeof(PIXEL_T);
// Set the specified rows to 0x00 = make the screen black
@ -204,14 +198,12 @@ void gfx_clearRows(uint8_t startRow, uint8_t endRow)
void gfx_clearScreen()
{
if(!initialized) return;
// Set the whole framebuffer to 0x00 = make the screen black
memset(buf, 0x00, fbSize);
}
void gfx_fillScreen(color_t color)
{
if(!initialized) return;
for(int16_t y = 0; y < CONFIG_SCREEN_HEIGHT; y++)
{
for(int16_t x = 0; x < CONFIG_SCREEN_WIDTH; x++)
@ -259,7 +251,6 @@ inline void gfx_setPixel(point_t pos, color_t color)
void gfx_drawLine(point_t start, point_t end, color_t color)
{
if(!initialized) return;
int16_t steep = abs(end.y - start.y) > abs(end.x - start.x);
if (steep)
@ -319,7 +310,6 @@ void gfx_drawLine(point_t start, point_t end, color_t color)
void gfx_drawRect(point_t start, uint16_t width, uint16_t height, color_t color, bool fill)
{
if(!initialized) return;
if(width == 0) return;
if(height == 0) return;
uint16_t x_max = start.x + width - 1;

Wyświetl plik

@ -524,16 +524,6 @@ void display_render()
display_renderRows(0, CONFIG_SCREEN_HEIGHT);
}
bool display_renderingInProgress()
{
/*
* 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()
{
return (void *)(frameBuffer);

Wyświetl plik

@ -36,7 +36,6 @@ static const struct display_buffer_descriptor displayBufDesc =
};
static uint8_t frameBuffer[FB_SIZE];
static bool rendering = false;
void display_init()
{
@ -63,7 +62,6 @@ void display_render()
static uint8_t shadowBuffer[FB_SIZE] = { 0 };
memset(shadowBuffer, 0x00, FB_SIZE);
rendering = true;
for(uint8_t y = 0; y < CONFIG_SCREEN_HEIGHT; y++)
{
for(uint8_t x = 0; x < CONFIG_SCREEN_WIDTH; x++)
@ -76,12 +74,6 @@ void display_render()
}
display_write(displayDev, 0, 0, &displayBufDesc, shadowBuffer);
rendering = false;
}
bool display_renderingInProgress()
{
return rendering;
}
void *display_getFrameBuffer()

Wyświetl plik

@ -130,11 +130,6 @@ void display_render()
display_renderRows(0, CONFIG_SCREEN_HEIGHT);
}
bool display_renderingInProgress()
{
return (gpio_readPin(LCD_CS) == 0);
}
void *display_getFrameBuffer()
{
return (void *)(frameBuffer);

Wyświetl plik

@ -150,11 +150,6 @@ void display_render()
display_renderRows(0, (CONFIG_SCREEN_WIDTH / 8) - 1);
}
bool display_renderingInProgress()
{
return (gpio_readPin(LCD_CS) == 0);
}
void *display_getFrameBuffer()
{
return (void *)(frameBuffer);

Wyświetl plik

@ -135,11 +135,6 @@ void display_render()
display_renderRows(0, CONFIG_SCREEN_HEIGHT / 8);
}
bool display_renderingInProgress()
{
return (gpio_readPin(LCD_CS) == 0);
}
void *display_getFrameBuffer()
{
return (void *)(frameBuffer);

Wyświetl plik

@ -160,11 +160,6 @@ void display_render()
display_renderRows(0, CONFIG_SCREEN_HEIGHT / 8);
}
bool display_renderingInProgress()
{
return (gpio_readPin(LCD_CS) == 0);
}
void *display_getFrameBuffer()
{
return (void *)(frameBuffer);

Wyświetl plik

@ -165,11 +165,6 @@ void display_render()
display_renderRows(0, CONFIG_SCREEN_HEIGHT);
}
bool display_renderingInProgress()
{
return inProgress;
}
void *display_getFrameBuffer()
{
return (void *) (frameBuffer);

Wyświetl plik

@ -49,11 +49,6 @@ void display_render()
}
bool display_renderingInProgress()
{
return false;
}
void *display_getFrameBuffer()
{
return (void *) (frameBuffer);