summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-24 23:06:06 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-24 23:06:06 +0000
commit24a1f94cd7cc50fbda6689d33c5d2dbcf123dab5 (patch)
tree1be06cf64f839ea856f28122e0bcd3d8c6182c8c
parent22c1a8e1d97c3fd078067f4e1d2444b3499bd869 (diff)
downloadrockbox-24a1f94cd7cc50fbda6689d33c5d2dbcf123dab5.tar.gz
rockbox-24a1f94cd7cc50fbda6689d33c5d2dbcf123dab5.zip
Fixed yellow FM builds, and changed the function type names according to the rockbox coding style.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6858 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/recorder/radio.c8
-rw-r--r--firmware/drivers/lcd-h100.c14
-rw-r--r--firmware/drivers/lcd-recorder.c14
-rw-r--r--firmware/export/lcd.h4
4 files changed, 22 insertions, 18 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 93e2022caf..5dbe9478d6 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -443,7 +443,9 @@ bool radio_screen(void)
443 /* Only display the peak meter when not recording */ 443 /* Only display the peak meter when not recording */
444 if(!audio_status()) 444 if(!audio_status())
445 { 445 {
446 lcd_clearrect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh); 446 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
447 lcd_fillrect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
448 lcd_set_drawmode(DRMODE_SOLID);
447 peak_meter_draw(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh); 449 peak_meter_draw(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
448 lcd_update_rect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh); 450 lcd_update_rect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
449 } 451 }
@@ -477,7 +479,9 @@ bool radio_screen(void)
477 } 479 }
478 else 480 else
479 { 481 {
480 lcd_clearrect(0, 8 + top_of_screen*fh, LCD_WIDTH, fh); 482 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
483 lcd_fillrect(0, 8 + top_of_screen*fh, LCD_WIDTH, fh);
484 lcd_set_drawmode(DRMODE_SOLID);
481 } 485 }
482 486
483 freq = curr_freq / 100000; 487 freq = curr_freq / 100000;
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c
index 2b0326eb3b..db2aba8673 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/drivers/lcd-h100.c
@@ -331,7 +331,7 @@ static void nopixel(int x, int y)
331 (void)y; 331 (void)y;
332} 332}
333 333
334tLCDPixelFunc* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel, 334lcd_pixelfunc_type* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel,
335 nopixel, clearpixel, nopixel, clearpixel}; 335 nopixel, clearpixel, nopixel, clearpixel};
336 336
337static void flipblock(unsigned char *address, unsigned mask, unsigned bits) 337static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
@@ -354,7 +354,7 @@ static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
354 *address = (*address & ~mask) | (bits & mask); 354 *address = (*address & ~mask) | (bits & mask);
355} 355}
356 356
357tLCDBlockFunc* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock}; 357lcd_blockfunc_type* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock};
358 358
359/*** drawing functions ***/ 359/*** drawing functions ***/
360 360
@@ -384,7 +384,7 @@ void lcd_drawline(int x1, int y1, int x2, int y2)
384 int d, dinc1, dinc2; 384 int d, dinc1, dinc2;
385 int x, xinc1, xinc2; 385 int x, xinc1, xinc2;
386 int y, yinc1, yinc2; 386 int y, yinc1, yinc2;
387 tLCDPixelFunc *pfunc = pixelfunc[drawmode]; 387 lcd_pixelfunc_type *pfunc = pixelfunc[drawmode];
388 388
389 deltax = abs(x2 - x1); 389 deltax = abs(x2 - x1);
390 deltay = abs(y2 - y1); 390 deltay = abs(y2 - y1);
@@ -452,7 +452,7 @@ void lcd_hline(int x1, int x2, int y)
452 int x; 452 int x;
453 unsigned char *dst; 453 unsigned char *dst;
454 unsigned char mask, bits; 454 unsigned char mask, bits;
455 tLCDBlockFunc *bfunc; 455 lcd_blockfunc_type *bfunc;
456 456
457 /* direction flip */ 457 /* direction flip */
458 if (x2 < x1) 458 if (x2 < x1)
@@ -487,7 +487,7 @@ void lcd_vline(int x, int y1, int y2)
487 int ny; 487 int ny;
488 unsigned char *dst; 488 unsigned char *dst;
489 unsigned char mask_top, mask_bottom, bits; 489 unsigned char mask_top, mask_bottom, bits;
490 tLCDBlockFunc *bfunc; 490 lcd_blockfunc_type *bfunc;
491 491
492 /* direction flip */ 492 /* direction flip */
493 if (y2 < y1) 493 if (y2 < y1)
@@ -547,7 +547,7 @@ void lcd_drawrect(int x, int y, int width, int height)
547} 547}
548 548
549/* helper function for lcd_fillrect() */ 549/* helper function for lcd_fillrect() */
550static void fillrow(tLCDBlockFunc *bfunc, unsigned char *address, 550static void fillrow(lcd_blockfunc_type *bfunc, unsigned char *address,
551 int width, unsigned mask, unsigned bits) 551 int width, unsigned mask, unsigned bits)
552{ 552{
553 int i; 553 int i;
@@ -562,7 +562,7 @@ void lcd_fillrect(int x, int y, int width, int height)
562 int ny; 562 int ny;
563 unsigned char *dst; 563 unsigned char *dst;
564 unsigned char mask_top, mask_bottom, bits; 564 unsigned char mask_top, mask_bottom, bits;
565 tLCDBlockFunc *bfunc; 565 lcd_blockfunc_type *bfunc;
566 bool fillopt = (drawmode & DRMODE_INVERSEVID) ? 566 bool fillopt = (drawmode & DRMODE_INVERSEVID) ?
567 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); 567 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG);
568 568
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index 16a47f28bf..a83f58e35d 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -390,7 +390,7 @@ static void nopixel(int x, int y)
390 (void)y; 390 (void)y;
391} 391}
392 392
393tLCDPixelFunc* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel, 393lcd_pixelfunc_type* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel,
394 nopixel, clearpixel, nopixel, clearpixel}; 394 nopixel, clearpixel, nopixel, clearpixel};
395 395
396static void flipblock(unsigned char *address, unsigned mask, unsigned bits) 396static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
@@ -413,7 +413,7 @@ static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
413 *address = (*address & ~mask) | (bits & mask); 413 *address = (*address & ~mask) | (bits & mask);
414} 414}
415 415
416tLCDBlockFunc* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock}; 416lcd_blockfunc_type* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock};
417 417
418/*** drawing functions ***/ 418/*** drawing functions ***/
419 419
@@ -443,7 +443,7 @@ void lcd_drawline(int x1, int y1, int x2, int y2)
443 int d, dinc1, dinc2; 443 int d, dinc1, dinc2;
444 int x, xinc1, xinc2; 444 int x, xinc1, xinc2;
445 int y, yinc1, yinc2; 445 int y, yinc1, yinc2;
446 tLCDPixelFunc *pfunc = pixelfunc[drawmode]; 446 lcd_pixelfunc_type *pfunc = pixelfunc[drawmode];
447 447
448 deltax = abs(x2 - x1); 448 deltax = abs(x2 - x1);
449 deltay = abs(y2 - y1); 449 deltay = abs(y2 - y1);
@@ -511,7 +511,7 @@ void lcd_hline(int x1, int x2, int y)
511 int x; 511 int x;
512 unsigned char *dst; 512 unsigned char *dst;
513 unsigned char mask, bits; 513 unsigned char mask, bits;
514 tLCDBlockFunc *bfunc; 514 lcd_blockfunc_type *bfunc;
515 515
516 /* direction flip */ 516 /* direction flip */
517 if (x2 < x1) 517 if (x2 < x1)
@@ -546,7 +546,7 @@ void lcd_vline(int x, int y1, int y2)
546 int ny; 546 int ny;
547 unsigned char *dst; 547 unsigned char *dst;
548 unsigned char mask_top, mask_bottom, bits; 548 unsigned char mask_top, mask_bottom, bits;
549 tLCDBlockFunc *bfunc; 549 lcd_blockfunc_type *bfunc;
550 550
551 /* direction flip */ 551 /* direction flip */
552 if (y2 < y1) 552 if (y2 < y1)
@@ -606,7 +606,7 @@ void lcd_drawrect(int x, int y, int width, int height)
606} 606}
607 607
608/* helper function for lcd_fillrect() */ 608/* helper function for lcd_fillrect() */
609static void fillrow(tLCDBlockFunc *bfunc, unsigned char *address, 609static void fillrow(lcd_blockfunc_type *bfunc, unsigned char *address,
610 int width, unsigned mask, unsigned bits) 610 int width, unsigned mask, unsigned bits)
611{ 611{
612 int i; 612 int i;
@@ -621,7 +621,7 @@ void lcd_fillrect(int x, int y, int width, int height)
621 int ny; 621 int ny;
622 unsigned char *dst; 622 unsigned char *dst;
623 unsigned char mask_top, mask_bottom, bits; 623 unsigned char mask_top, mask_bottom, bits;
624 tLCDBlockFunc *bfunc; 624 lcd_blockfunc_type *bfunc;
625 bool fillopt = (drawmode & DRMODE_INVERSEVID) ? 625 bool fillopt = (drawmode & DRMODE_INVERSEVID) ?
626 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); 626 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG);
627 627
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 700ebbf67c..c6e0fe0f0e 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -126,8 +126,8 @@ extern void lcd_jump_scroll_delay(int ms);
126#define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] &= ~(1<<((y)&7)) 126#define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] &= ~(1<<((y)&7))
127#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] ^= (1<<((y)&7)) 127#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] ^= (1<<((y)&7))
128 128
129typedef void tLCDPixelFunc(int x, int y); /* for b&w */ 129typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */
130typedef void tLCDBlockFunc(unsigned char *address, unsigned mask, unsigned bits); 130typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits);
131 131
132/* Memory copy of display bitmap */ 132/* Memory copy of display bitmap */
133extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; 133extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];