summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-h100.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-h100.c')
-rw-r--r--firmware/drivers/lcd-h100.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c
index 616a8521b0..93988f6c74 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/drivers/lcd-h100.c
@@ -333,7 +333,7 @@ static void nopixel(int x, int y)
333 (void)y; 333 (void)y;
334} 334}
335 335
336lcd_pixelfunc_type* pixelfunc[8] = { 336lcd_pixelfunc_type* lcd_pixelfuncs[8] = {
337 flippixel, nopixel, setpixel, setpixel, 337 flippixel, nopixel, setpixel, setpixel,
338 nopixel, clearpixel, nopixel, clearpixel 338 nopixel, clearpixel, nopixel, clearpixel
339}; 339};
@@ -378,7 +378,7 @@ static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits)
378 *address = (*address & ~mask) | (~bits & mask); 378 *address = (*address & ~mask) | (~bits & mask);
379} 379}
380 380
381lcd_blockfunc_type* blockfunc[8] = { 381lcd_blockfunc_type* lcd_blockfuncs[8] = {
382 flipblock, bgblock, fgblock, solidblock, 382 flipblock, bgblock, fgblock, solidblock,
383 flipinvblock, bginvblock, fginvblock, solidinvblock 383 flipinvblock, bginvblock, fginvblock, solidinvblock
384}; 384};
@@ -398,7 +398,7 @@ void lcd_clear_display(void)
398void lcd_drawpixel(int x, int y) 398void lcd_drawpixel(int x, int y)
399{ 399{
400 if (((unsigned)x < LCD_WIDTH) || ((unsigned)y < LCD_HEIGHT)) 400 if (((unsigned)x < LCD_WIDTH) || ((unsigned)y < LCD_HEIGHT))
401 pixelfunc[drawmode](x, y); 401 lcd_pixelfuncs[drawmode](x, y);
402} 402}
403 403
404/* Draw a line */ 404/* Draw a line */
@@ -410,7 +410,7 @@ void lcd_drawline(int x1, int y1, int x2, int y2)
410 int d, dinc1, dinc2; 410 int d, dinc1, dinc2;
411 int x, xinc1, xinc2; 411 int x, xinc1, xinc2;
412 int y, yinc1, yinc2; 412 int y, yinc1, yinc2;
413 lcd_pixelfunc_type *pfunc = pixelfunc[drawmode]; 413 lcd_pixelfunc_type *pfunc = lcd_pixelfuncs[drawmode];
414 414
415 deltax = abs(x2 - x1); 415 deltax = abs(x2 - x1);
416 deltay = abs(y2 - y1); 416 deltay = abs(y2 - y1);
@@ -498,7 +498,7 @@ void lcd_hline(int x1, int x2, int y)
498 if (x2 >= LCD_WIDTH) 498 if (x2 >= LCD_WIDTH)
499 x2 = LCD_WIDTH-1; 499 x2 = LCD_WIDTH-1;
500 500
501 bfunc = blockfunc[drawmode]; 501 bfunc = lcd_blockfuncs[drawmode];
502 dst = &lcd_framebuffer[y>>3][x1]; 502 dst = &lcd_framebuffer[y>>3][x1];
503 mask = 1 << (y & 7); 503 mask = 1 << (y & 7);
504 504
@@ -532,7 +532,7 @@ void lcd_vline(int x, int y1, int y2)
532 if (y2 >= LCD_HEIGHT) 532 if (y2 >= LCD_HEIGHT)
533 y2 = LCD_HEIGHT-1; 533 y2 = LCD_HEIGHT-1;
534 534
535 bfunc = blockfunc[drawmode]; 535 bfunc = lcd_blockfuncs[drawmode];
536 dst = &lcd_framebuffer[y1>>3][x]; 536 dst = &lcd_framebuffer[y1>>3][x];
537 ny = y2 - (y1 & ~7); 537 ny = y2 - (y1 & ~7);
538 mask = 0xFFu << (y1 & 7); 538 mask = 0xFFu << (y1 & 7);
@@ -598,7 +598,7 @@ void lcd_fillrect(int x, int y, int width, int height)
598 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); 598 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG);
599 if (fillopt &&(drawmode & DRMODE_INVERSEVID)) 599 if (fillopt &&(drawmode & DRMODE_INVERSEVID))
600 bits = 0; 600 bits = 0;
601 bfunc = blockfunc[drawmode]; 601 bfunc = lcd_blockfuncs[drawmode];
602 dst = &lcd_framebuffer[y>>3][x]; 602 dst = &lcd_framebuffer[y>>3][x];
603 ny = height - 1 + (y & 7); 603 ny = height - 1 + (y & 7);
604 mask = 0xFFu << (y & 7); 604 mask = 0xFFu << (y & 7);
@@ -683,7 +683,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
683 shift = y & 7; 683 shift = y & 7;
684 ny = height - 1 + shift + src_y; 684 ny = height - 1 + shift + src_y;
685 685
686 bfunc = blockfunc[drawmode]; 686 bfunc = lcd_blockfuncs[drawmode];
687 mask = 0xFFu << (shift + src_y); 687 mask = 0xFFu << (shift + src_y);
688 mask_bottom = 0xFFu >> (7 - (ny & 7)); 688 mask_bottom = 0xFFu >> (7 - (ny & 7));
689 689
@@ -779,7 +779,7 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str)
779 ofs -= width; 779 ofs -= width;
780 continue; 780 continue;
781 } 781 }
782 782
783 bits = pf->bits + (pf->offset ? 783 bits = pf->bits + (pf->offset ?
784 pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch)); 784 pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch));
785 785