diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-01 23:56:57 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-09 22:07:49 +0100 |
commit | f8e968991d0d94e3b1c5c5611c3d69a9c032d7da (patch) | |
tree | 2bb2d70d7d0cf3d2c16f65fe54e4d888a34e6875 /firmware/drivers/lcd-2bit-horz.c | |
parent | eaccdeeae2ff57efe1859ba80b7558b328e16a10 (diff) | |
download | rockbox-f8e968991d0d94e3b1c5c5611c3d69a9c032d7da.tar.gz rockbox-f8e968991d0d94e3b1c5c5611c3d69a9c032d7da.zip |
lcd: Move parameter handling calls to lcd-bitmap-common.c
No need to reimplement the same drawmode, getwidth, etc, calls
for each pixel format.
Change-Id: Ibbe32814f72e1492c190ba578cec303c1cf29b12
Diffstat (limited to 'firmware/drivers/lcd-2bit-horz.c')
-rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index 1b192377f6..cf7e20d4a8 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c | |||
@@ -105,16 +105,6 @@ void lcd_init(void) | |||
105 | 105 | ||
106 | /*** parameter handling ***/ | 106 | /*** parameter handling ***/ |
107 | 107 | ||
108 | void lcd_set_drawmode(int mode) | ||
109 | { | ||
110 | lcd_current_viewport->drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID); | ||
111 | } | ||
112 | |||
113 | int lcd_get_drawmode(void) | ||
114 | { | ||
115 | return lcd_current_viewport->drawmode; | ||
116 | } | ||
117 | |||
118 | void lcd_set_foreground(unsigned brightness) | 108 | void lcd_set_foreground(unsigned brightness) |
119 | { | 109 | { |
120 | lcd_current_viewport->fg_pattern = brightness; | 110 | lcd_current_viewport->fg_pattern = brightness; |
@@ -137,38 +127,6 @@ unsigned lcd_get_background(void) | |||
137 | return lcd_current_viewport->bg_pattern; | 127 | return lcd_current_viewport->bg_pattern; |
138 | } | 128 | } |
139 | 129 | ||
140 | void lcd_set_drawinfo(int mode, unsigned fg_brightness, unsigned bg_brightness) | ||
141 | { | ||
142 | lcd_set_drawmode(mode); | ||
143 | lcd_set_foreground(fg_brightness); | ||
144 | lcd_set_background(bg_brightness); | ||
145 | } | ||
146 | |||
147 | int lcd_getwidth(void) | ||
148 | { | ||
149 | return lcd_current_viewport->width; | ||
150 | } | ||
151 | |||
152 | int lcd_getheight(void) | ||
153 | { | ||
154 | return lcd_current_viewport->height; | ||
155 | } | ||
156 | |||
157 | void lcd_setfont(int newfont) | ||
158 | { | ||
159 | lcd_current_viewport->font = newfont; | ||
160 | } | ||
161 | |||
162 | int lcd_getfont(void) | ||
163 | { | ||
164 | return lcd_current_viewport->font; | ||
165 | } | ||
166 | |||
167 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) | ||
168 | { | ||
169 | return font_getstringsize(str, w, h, lcd_current_viewport->font); | ||
170 | } | ||
171 | |||
172 | /*** low-level drawing functions ***/ | 130 | /*** low-level drawing functions ***/ |
173 | 131 | ||
174 | static void setpixel(int x, int y) | 132 | static void setpixel(int x, int y) |