summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c')
-rw-r--r--firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c133
1 files changed, 133 insertions, 0 deletions
diff --git a/firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c b/firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c
new file mode 100644
index 0000000000..8e5a4f472a
--- /dev/null
+++ b/firmware/target/arm/s5l8700/meizu-m6sl/lcd-m6sl.c
@@ -0,0 +1,133 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Alan Korr
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "config.h"
20
21#include "hwcompat.h"
22#include "kernel.h"
23#include "lcd.h"
24#include "system.h"
25#include "cpu.h"
26
27/*** definitions ***/
28
29
30/** globals **/
31
32static int xoffset; /* needed for flip */
33
34/*** hardware configuration ***/
35
36int lcd_default_contrast(void)
37{
38 return 0x1f;
39}
40
41void lcd_set_contrast(int val)
42{
43}
44
45void lcd_set_invert_display(bool yesno)
46{
47}
48
49/* turn the display upside down (call lcd_update() afterwards) */
50void lcd_set_flip(bool yesno)
51{
52 /* TODO: flip mode isn't working. The commands in the else part of
53 this function are how the original firmware inits the LCD */
54
55 if (yesno)
56 {
57 xoffset = 132 - LCD_WIDTH; /* 132 colums minus the 128 we have */
58 }
59 else
60 {
61 xoffset = 0;
62 }
63}
64
65
66/* LCD init */
67void lcd_init_device(void)
68{
69}
70
71/*** Update functions ***/
72
73/* Performance function that works with an external buffer
74 note that by and bheight are in 8-pixel units! */
75void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
76 int bheight, int stride)
77{
78 /* Copy display bitmap to hardware */
79 while (bheight--)
80 {
81 }
82}
83
84
85/* Performance function that works with an external buffer
86 note that by and bheight are in 8-pixel units! */
87void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases,
88 int x, int by, int width, int bheight, int stride)
89{
90 (void)values;
91 (void)phases;
92 (void)x;
93 (void)by;
94 (void)width;
95 (void)bheight;
96 (void)stride;
97}
98
99/* Update the display.
100 This must be called after all other LCD functions that change the display. */
101void lcd_update(void) ICODE_ATTR;
102void lcd_update(void)
103{
104 int y;
105
106 /* Copy display bitmap to hardware */
107 for (y = 0; y < LCD_FBHEIGHT; y++)
108 {
109 }
110}
111
112/* Update a fraction of the display. */
113void lcd_update_rect(int, int, int, int) ICODE_ATTR;
114void lcd_update_rect(int x, int y, int width, int height)
115{
116 int ymax;
117
118 /* The Y coordinates have to work on even 8 pixel rows */
119 ymax = (y + height-1) >> 3;
120 y >>= 3;
121
122 if(x + width > LCD_WIDTH)
123 width = LCD_WIDTH - x;
124 if (width <= 0)
125 return; /* nothing left to do, 0 is harmful to lcd_write_data() */
126 if(ymax >= LCD_FBHEIGHT)
127 ymax = LCD_FBHEIGHT-1;
128
129 /* Copy specified rectange bitmap to hardware */
130 for (; y <= ymax; y++)
131 {
132 }
133}