r61523: add r61523_set_pixel() function

This is used for touch framerate experiments where a full frame refresh
is too expensive.
This commit is contained in:
Lephe 2025-04-05 08:22:26 +02:00
parent dff487b20a
commit 93e58c7f63
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 15 additions and 0 deletions

View file

@ -23,6 +23,9 @@ void r61523_display_rect(
/* r61523_win_set(): Set the display window */
void r61523_win_set(int x1, int x2, int y1, int y2);
/* r61523_set_pixel(): Write a pixel directly to DD (slow) */
void r61523_set_pixel(int x, int y, int color);
#ifdef __cplusplus
}
#endif

View file

@ -172,6 +172,18 @@ void r61523_display_rect(
}
}
void r61523_set_pixel(int x, int y, int color)
{
if((unsigned)x >= 320 || (unsigned)y >= 528)
return;
// dma_transfer_wait(0);
r61523_win_set(x, x, y, y);
select(44);
uint16_t volatile *DISPLAY = (void *)0xb4000000;
*DISPLAY = color;
}
static bool r61523_update(int x, int y, image_t const *fb, int flags)
{
if(fb->format != IMAGE_RGB565)