tests/disp_dev: improve screen cleanup speed

This commit is contained in:
Alexandre Abadie 2021-05-19 10:01:03 +02:00
parent 12a0adc57c
commit 4b2f9af90f
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -30,6 +30,9 @@
#include "ili9341.h"
#endif
#define DISPLAY_BUFFER_MAX_SIZE (320)
static uint16_t display_buffer[DISPLAY_BUFFER_MAX_SIZE] = { 0 };
int main(void)
{
/* Use the first screen */
@ -52,11 +55,8 @@ int main(void)
expect(max_height == 240);
#endif
uint16_t color = 0;
for (uint16_t y = 0; y < max_height; ++y) {
for (uint16_t x = 0; x < max_width; ++x) {
disp_dev_map(disp_dev->dev, x, x, y, y, &color);
}
disp_dev_map(disp_dev->dev, 0, max_width - 1, y, y, display_buffer);
}
disp_dev_map(disp_dev->dev, 95, 222, 85, 153, (const uint16_t *)picture);