diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-04-18 21:20:06 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-04-18 21:20:06 +0000 |
commit | f237b69053036651f4d8d43b6a72fecea1173c38 (patch) | |
tree | b6fe65ad304ba9a29400dd4ad5a8611879e4ac27 /firmware/lcd.c | |
parent | 7f309df42979719aee3b7ac05f73cf4a2050059c (diff) | |
download | rockbox-f237b69053036651f4d8d43b6a72fecea1173c38.tar.gz rockbox-f237b69053036651f4d8d43b6a72fecea1173c38.zip |
Added drawpixel, clearpixel and drawline to the API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@139 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/lcd.c')
-rw-r--r-- | firmware/lcd.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/firmware/lcd.c b/firmware/lcd.c index 5d31529ec0..5e1672b321 100644 --- a/firmware/lcd.c +++ b/firmware/lcd.c | |||
@@ -580,6 +580,7 @@ void lcd_invertrect (int x, int y, int nx, int ny) | |||
580 | } | 580 | } |
581 | 581 | ||
582 | #define DRAW_PIXEL(x,y) display[x][y/8] |= (1<<(y%7)) | 582 | #define DRAW_PIXEL(x,y) display[x][y/8] |= (1<<(y%7)) |
583 | #define CLEAR_PIXEL(x,y) display[x][y/8] &= ~(1<<(y%7)) | ||
583 | 584 | ||
584 | void lcd_drawline( int x1, int y1, int x2, int y2 ) | 585 | void lcd_drawline( int x1, int y1, int x2, int y2 ) |
585 | { | 586 | { |
@@ -651,6 +652,23 @@ void lcd_drawline( int x1, int y1, int x2, int y2 ) | |||
651 | } | 652 | } |
652 | } | 653 | } |
653 | 654 | ||
655 | /* | ||
656 | * Set a single pixel | ||
657 | */ | ||
658 | void lcd_drawpixel(int x, int y) | ||
659 | { | ||
660 | DRAW_PIXEL(x,y); | ||
661 | } | ||
662 | |||
663 | /* | ||
664 | * Clear a single pixel | ||
665 | */ | ||
666 | void lcd_clearpixel(int x, int y) | ||
667 | { | ||
668 | CLEAR_PIXEL(x,y); | ||
669 | } | ||
670 | |||
671 | |||
654 | #else | 672 | #else |
655 | /* no LCD defined, no code to use */ | 673 | /* no LCD defined, no code to use */ |
656 | #endif | 674 | #endif |