diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd.c | 13 | ||||
-rw-r--r-- | firmware/drivers/lcd.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c index 8a6207bc87..6df3f28ffd 100644 --- a/firmware/drivers/lcd.c +++ b/firmware/drivers/lcd.c @@ -540,6 +540,19 @@ void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny, } } +/* + * Draw a rectangle with point a (upper left) at (x, y) + * and size (nx, ny) + */ +void lcd_drawrect (int x, int y, int nx, int ny) +{ + lcd_drawline(x, y, nx, y); + lcd_drawline(x, ny, nx, ny); + + lcd_drawline(x, y, x, ny); + lcd_drawline(nx, y, nx, ny); +} + /* * Clear a rectangular area at (x, y), size (nx, ny) */ diff --git a/firmware/drivers/lcd.h b/firmware/drivers/lcd.h index 3694ac72a9..7e0495cd99 100644 --- a/firmware/drivers/lcd.h +++ b/firmware/drivers/lcd.h @@ -74,6 +74,7 @@ extern void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny, bool clear); extern void lcd_clearrect (int x, int y, int nx, int ny); extern void lcd_fillrect (int x, int y, int nx, int ny); +extern void lcd_drawrect (int x, int y, int nx, int ny); extern void lcd_invertrect (int x, int y, int nx, int ny); extern void lcd_drawline( int x1, int y1, int x2, int y2 ); extern void lcd_drawpixel(int x, int y); |