comparison src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_96x64.c @ 45:c905daaff834

implemented 96x64 BW framebuffer config, compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 17 Oct 2020 21:30:59 +0000
parents
children 4221c724c664
comparison
equal deleted inserted replaced
44:1821e301a65b 45:c905daaff834
1 #include "r2d/lcds/luna/r2d_luna_lcd.h"
2 #include "r2d/lcds/luna/colormap.h"
3
4 void r2d_lcd_power_on(void)
5 {
6 }
7
8 void r2d_lcd_power_off(void)
9 {
10 }
11
12 void r2d_refresh(void)
13 {
14 UINT16 i, j, k;
15 UINT32 v;
16 UINT32 *p;
17 INT16 y1, y2;
18
19 p=r2d_g_framebuffer->p_memory_words;
20
21 y1=r2d_update_ul_y; //0
22 y2=r2d_update_br_y; //63
23
24 /* set window area */
25 LCD_REG_WR(0x36, 135);
26 LCD_REG_WR(0x37, 40);
27 LCD_REG_WR(0x38, y2 + 78);
28 LCD_REG_WR(0x39, y1 + 78);
29 /* set current write address */
30 LCD_REG_WR(0x20, 40);
31 LCD_REG_WR(0x21, y1 + 78);
32 /* set up for GRAM write */
33 LCD_IR = 0x22;
34
35 p=p+y1*R2D_MWWIDTH;
36
37 for (i=y1;i<=y2;i++)
38 {
39 for (j = 0; j < R2D_MWWIDTH-1; j++)
40 {
41 v=*p++;
42 for (k=0;k<32;k++)
43 {
44 if (v&1)
45 LCD_DR = LCD16_COLOR_BLACK;
46 else
47 LCD_DR = LCD16_COLOR_WHITE;
48 v=v>>1;
49 }
50 }
51 p++;
52 }
53
54 r2d_reinit_update_region();
55 }