summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-recorder.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-recorder.c')
-rw-r--r--firmware/drivers/lcd-recorder.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index f7eb529fea..8cf5f12b8b 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -143,19 +143,19 @@ void lcd_init (void)
143 PBIOR |= 0x000f; /* IOR = 1 */ 143 PBIOR |= 0x000f; /* IOR = 1 */
144 144
145 /* inits like the original firmware */ 145 /* inits like the original firmware */
146 lcd_write(true, LCD_SOFTWARE_RESET); 146 lcd_write_command(LCD_SOFTWARE_RESET);
147 lcd_write(true, LCD_SET_INTERNAL_REGULATOR_RESISTOR_RATIO + 4); 147 lcd_write_command(LCD_SET_INTERNAL_REGULATOR_RESISTOR_RATIO + 4);
148 lcd_write(true, LCD_SET_1OVER4_BIAS_RATIO + 0); /* force 1/4 bias: 0 */ 148 lcd_write_command(LCD_SET_1OVER4_BIAS_RATIO + 0); /* force 1/4 bias: 0 */
149 lcd_write(true, LCD_SET_POWER_CONTROL_REGISTER + 7); /* power control register: op-amp=1, regulator=1, booster=1 */ 149 lcd_write_command(LCD_SET_POWER_CONTROL_REGISTER + 7); /* power control register: op-amp=1, regulator=1, booster=1 */
150 lcd_write(true, LCD_SET_DISPLAY_ON); 150 lcd_write_command(LCD_SET_DISPLAY_ON);
151 lcd_write(true, LCD_SET_NORMAL_DISPLAY); 151 lcd_write_command(LCD_SET_NORMAL_DISPLAY);
152 lcd_write(true, LCD_SET_SEGMENT_REMAP + 1); /* mirror horizontal: 1 */ 152 lcd_write_command(LCD_SET_SEGMENT_REMAP + 1); /* mirror horizontal: 1 */
153 lcd_write(true, LCD_SET_COM_OUTPUT_SCAN_DIRECTION + 8); /* mirror vertical: 1 */ 153 lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION + 8); /* mirror vertical: 1 */
154 lcd_write(true, LCD_SET_DISPLAY_START_LINE + 0); 154 lcd_write_command(LCD_SET_DISPLAY_START_LINE + 0);
155 lcd_set_contrast(lcd_default_contrast()); 155 lcd_set_contrast(lcd_default_contrast());
156 lcd_write(true, LCD_SET_PAGE_ADDRESS); 156 lcd_write_command(LCD_SET_PAGE_ADDRESS);
157 lcd_write(true, LCD_SET_LOWER_COLUMN_ADDRESS + 0); 157 lcd_write_command(LCD_SET_LOWER_COLUMN_ADDRESS + 0);
158 lcd_write(true, LCD_SET_HIGHER_COLUMN_ADDRESS + 0); 158 lcd_write_command(LCD_SET_HIGHER_COLUMN_ADDRESS + 0);
159 159
160 lcd_clear_display(); 160 lcd_clear_display();
161 lcd_update(); 161 lcd_update();
@@ -171,9 +171,9 @@ void lcd_blit (unsigned char* p_data, int x, int y, int width, int height, int s
171 /* Copy display bitmap to hardware */ 171 /* Copy display bitmap to hardware */
172 while (height--) 172 while (height--)
173 { 173 {
174 lcd_write (true, LCD_CNTL_PAGE | (y++ & 0xf)); 174 lcd_write_command (LCD_CNTL_PAGE | (y++ & 0xf));
175 lcd_write (true, LCD_CNTL_HIGHCOL | (((x+xoffset)>>4) & 0xf)); 175 lcd_write_command (LCD_CNTL_HIGHCOL | (((x+xoffset)>>4) & 0xf));
176 lcd_write (true, LCD_CNTL_LOWCOL | ((x+xoffset) & 0xf)); 176 lcd_write_command (LCD_CNTL_LOWCOL | ((x+xoffset) & 0xf));
177 177
178 lcd_write_data(p_data, width); 178 lcd_write_data(p_data, width);
179 p_data += stride; 179 p_data += stride;
@@ -193,9 +193,9 @@ void lcd_update (void)
193 /* Copy display bitmap to hardware */ 193 /* Copy display bitmap to hardware */
194 for (y = 0; y < LCD_HEIGHT/8; y++) 194 for (y = 0; y < LCD_HEIGHT/8; y++)
195 { 195 {
196 lcd_write (true, LCD_CNTL_PAGE | (y & 0xf)); 196 lcd_write_command (LCD_CNTL_PAGE | (y & 0xf));
197 lcd_write (true, LCD_CNTL_HIGHCOL | ((xoffset>>4) & 0xf)); 197 lcd_write_command (LCD_CNTL_HIGHCOL | ((xoffset>>4) & 0xf));
198 lcd_write (true, LCD_CNTL_LOWCOL | (xoffset & 0xf)); 198 lcd_write_command (LCD_CNTL_LOWCOL | (xoffset & 0xf));
199 199
200 lcd_write_data (lcd_framebuffer[y], LCD_WIDTH); 200 lcd_write_data (lcd_framebuffer[y], LCD_WIDTH);
201 } 201 }
@@ -224,9 +224,9 @@ void lcd_update_rect (int x_start, int y,
224 /* Copy specified rectange bitmap to hardware */ 224 /* Copy specified rectange bitmap to hardware */
225 for (; y <= ymax; y++) 225 for (; y <= ymax; y++)
226 { 226 {
227 lcd_write (true, LCD_CNTL_PAGE | (y & 0xf)); 227 lcd_write_command (LCD_CNTL_PAGE | (y & 0xf));
228 lcd_write (true, LCD_CNTL_HIGHCOL | (((x_start+xoffset)>>4) & 0xf)); 228 lcd_write_command (LCD_CNTL_HIGHCOL | (((x_start+xoffset)>>4) & 0xf));
229 lcd_write (true, LCD_CNTL_LOWCOL | ((x_start+xoffset) & 0xf)); 229 lcd_write_command (LCD_CNTL_LOWCOL | ((x_start+xoffset) & 0xf));
230 230
231 lcd_write_data (&lcd_framebuffer[y][x_start], width); 231 lcd_write_data (&lcd_framebuffer[y][x_start], width);
232 } 232 }
@@ -234,16 +234,16 @@ void lcd_update_rect (int x_start, int y,
234 234
235void lcd_set_contrast(int val) 235void lcd_set_contrast(int val)
236{ 236{
237 lcd_write(true, LCD_CNTL_CONTRAST); 237 lcd_write_command(LCD_CNTL_CONTRAST);
238 lcd_write(true, val); 238 lcd_write_command(val);
239} 239}
240 240
241void lcd_set_invert_display(bool yesno) 241void lcd_set_invert_display(bool yesno)
242{ 242{
243 if (yesno) 243 if (yesno)
244 lcd_write(true, LCD_SET_REVERSE_DISPLAY); 244 lcd_write_command(LCD_SET_REVERSE_DISPLAY);
245 else 245 else
246 lcd_write(true, LCD_SET_NORMAL_DISPLAY); 246 lcd_write_command(LCD_SET_NORMAL_DISPLAY);
247} 247}
248 248
249/* turn the display upside down (call lcd_update() afterwards) */ 249/* turn the display upside down (call lcd_update() afterwards) */
@@ -251,14 +251,14 @@ void lcd_set_flip(bool yesno)
251{ 251{
252 if (yesno) 252 if (yesno)
253 { 253 {
254 lcd_write(true, LCD_SET_SEGMENT_REMAP); 254 lcd_write_command(LCD_SET_SEGMENT_REMAP);
255 lcd_write(true, LCD_SET_COM_OUTPUT_SCAN_DIRECTION); 255 lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION);
256 xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 112 we have */ 256 xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 112 we have */
257 } 257 }
258 else 258 else
259 { 259 {
260 lcd_write(true, LCD_SET_SEGMENT_REMAP | 0x01); 260 lcd_write_command(LCD_SET_SEGMENT_REMAP | 0x01);
261 lcd_write(true, LCD_SET_COM_OUTPUT_SCAN_DIRECTION | 0x08); 261 lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION | 0x08);
262 xoffset = 0; 262 xoffset = 0;
263 } 263 }
264} 264}
@@ -274,7 +274,7 @@ void lcd_set_flip(bool yesno)
274 */ 274 */
275void lcd_roll(int lines) 275void lcd_roll(int lines)
276{ 276{
277 lcd_write(true, LCD_SET_DISPLAY_START_LINE | (lines & (LCD_HEIGHT-1))); 277 lcd_write_command(LCD_SET_DISPLAY_START_LINE | (lines & (LCD_HEIGHT-1)));
278} 278}
279 279
280#endif /* SIMULATOR */ 280#endif /* SIMULATOR */