comparison src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_bw.c @ 193:6a53de2c4fc2

R2D sync with Magnetite R2D is never compiled in Selenite, thus the present change has absolutely no impact on anything - but this sync is being done in order to keep the overall diff between Magnetite and Selenite to a minimum.
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 23 May 2020 07:13:36 +0000
parents
children
comparison
equal deleted inserted replaced
192:4f40ae165be4 193:6a53de2c4fc2
1 #include "r2d/lcds/luna/r2d_luna_lcd.h"
2
3 void r2d_lcd_power_on(void)
4 {
5 }
6
7 void r2d_lcd_power_off(void)
8 {
9 }
10
11 void r2d_refresh(void)
12 {
13 UINT16 i, j, k;
14 UINT32 v;
15 UINT32 *p;
16 INT16 y1, y2;
17
18 p=r2d_g_framebuffer->p_memory_words;
19
20 y1=r2d_update_ul_y; //0
21 y2=r2d_update_br_y; //219
22
23 /* set window area */
24 LCD_REG_WR(0x36, 175);
25 LCD_REG_WR(0x37, 0);
26 LCD_REG_WR(0x38, y2);
27 LCD_REG_WR(0x39, y1);
28 /* set current write address */
29 LCD_REG_WR(0x20, 0);
30 LCD_REG_WR(0x21, y1);
31 /* set up for GRAM write */
32 LCD_IR = 0x22;
33
34 p=p+y1*R2D_MWWIDTH;
35
36 for (i=y1;i<=y2;i++)
37 {
38 for (j = 0; j < R2D_MWWIDTH-1; j++)
39 {
40 v=*p++;
41 for (k=0;k<32;k++)
42 {
43 if (v&1)
44 LCD_DR = 0x0000;
45 else
46 LCD_DR = 0xFFFF;
47 v=v>>1;
48 }
49 }
50 v=*p++;
51 for (k=0;k<16;k++)
52 {
53 if (v&1)
54 LCD_DR = 0x0000;
55 else
56 LCD_DR = 0xFFFF;
57 v=v>>1;
58 }
59 }
60
61 r2d_reinit_update_region();
62 }