mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-04-03 17:17:10 +02:00
Merge branch 'dev' of git.planet-casio.com:Lephenixnoir/gint into feat/touchscreen
This commit is contained in:
commit
0aca688343
2 changed files with 21 additions and 1 deletions
|
@ -16,6 +16,10 @@ extern "C" {
|
|||
/* r61523_display(): Update the entire display (320x528) */
|
||||
void r61523_display(uint16_t *vram);
|
||||
|
||||
/* r61523_display_rect(): Update a rectangle (both bounds included). */
|
||||
void r61523_display_rect(
|
||||
uint16_t *vram, int xmin, int xmax, int ymin, int ymax);
|
||||
|
||||
/* r61523_win_set(): Set the display window */
|
||||
void r61523_win_set(int x1, int x2, int y1, int y2);
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ void r61523_win_set(int x1, int x2, int y1, int y2)
|
|||
void r61523_display(uint16_t *vram)
|
||||
{
|
||||
r61523_win_set(0, 319, 0, 527);
|
||||
|
||||
select(44);
|
||||
|
||||
int row_offset = 0;
|
||||
|
@ -125,6 +124,23 @@ void r61523_display(uint16_t *vram)
|
|||
}
|
||||
}
|
||||
|
||||
void r61523_display_rect(
|
||||
uint16_t *vram, int xmin, int xmax, int ymin, int ymax)
|
||||
{
|
||||
// dma_transfer_wait(0);
|
||||
r61523_win_set(xmin, xmax, ymin, ymax);
|
||||
select(44);
|
||||
|
||||
vram += 320 * ymin + xmin;
|
||||
uint16_t volatile *DISPLAY = (void *)0xb4000000;
|
||||
|
||||
for(int y = 0; y < ymax - ymin + 1; y++) {
|
||||
for(int x = 0; x < xmax - xmin + 1; x++)
|
||||
*DISPLAY = vram[x];
|
||||
vram += 320;
|
||||
}
|
||||
}
|
||||
|
||||
static bool r61523_update(int x, int y, image_t const *fb, int flags)
|
||||
{
|
||||
if(fb->format != IMAGE_RGB565)
|
||||
|
|
Loading…
Add table
Reference in a new issue