Index: emcore/trunk/drawing.S |
— | — | @@ -69,104 +69,7 @@ |
70 | 70 | .size rendertext, .-rendertext
|
71 | 71 |
|
72 | 72 |
|
73 | | -.section .icode.renderfillrect, "ax", %progbits
|
74 | | -.align 2
|
75 | | -.global renderfillrect
|
76 | | -.type renderfillrect, %function
|
77 | | -renderfillrect:
|
78 | | - ldr r12, [sp,#8]
|
79 | | - mla r1, r12, r2, r1
|
80 | | -#if (LCD_BYTESPERPIXEL == 1)
|
81 | | - add r0, r0, r1
|
82 | | -#elif (LCD_BYTESPERPIXEL == 2)
|
83 | | - add r0, r0, r1,lsl#1
|
84 | | -#elif (LCD_BYTESPERPIXEL == 4)
|
85 | | - add r0, r0, r1,lsl#2
|
86 | | -#else
|
87 | | -#error Unknown number of bytes per pixel!
|
88 | | -#endif
|
89 | | - ldmfd sp, {r1,r2}
|
90 | | -renderfillrect_y:
|
91 | | - cmp r1, #0
|
92 | | - cmpne r3, #0
|
93 | | - moveq pc, lr
|
94 | | - sub r1, r1, #1
|
95 | | - mov r12, r3
|
96 | | -renderfillrect_x:
|
97 | | -#if (LCD_BYTESPERPIXEL == 1)
|
98 | | - strb r2, [r0], #1
|
99 | | -#elif (LCD_BYTESPERPIXEL == 2)
|
100 | | - strh r2, [r0], #2
|
101 | | -#elif (LCD_BYTESPERPIXEL == 4)
|
102 | | - str r2, [r0], #4
|
103 | | -#else
|
104 | | -#error Unknown number of bytes per pixel!
|
105 | | -#endif
|
106 | | - subs r12, r12, #1
|
107 | | - bne renderfillrect_x
|
108 | | - ldr r12, [sp,#8]
|
109 | | - sub r12, r12, r3
|
110 | | -#if (LCD_BYTESPERPIXEL == 1)
|
111 | | - add r0, r0, r12
|
112 | | -#elif (LCD_BYTESPERPIXEL == 2)
|
113 | | - add r0, r0, r12,lsl#1
|
114 | | -#elif (LCD_BYTESPERPIXEL == 4)
|
115 | | - add r0, r0, r12,lsl#2
|
116 | | -#else
|
117 | | -#error Unknown number of bytes per pixel!
|
118 | | -#endif
|
119 | | - b renderfillrect_y
|
120 | | -.size renderfillrect, .-renderfillrect
|
121 | | -
|
122 | | -
|
123 | 73 | #if (LCD_BYTESPERPIXEL == 2)
|
124 | | -.section .icode.renderbmp, "ax", %progbits
|
125 | | -.align 2
|
126 | | -.global renderbmp
|
127 | | -.type renderbmp, %function
|
128 | | -renderbmp:
|
129 | | - mov r2, r2,lsl#1
|
130 | | - ldrh r3, [r1]
|
131 | | - sub r3, r3, #0x4d00
|
132 | | - subs r3, r3, #0x42
|
133 | | - movne pc, lr
|
134 | | - stmfd sp!, {r4,lr}
|
135 | | - ldrh r4, [r1,#18]
|
136 | | - ldrh r12, [r1,#20]
|
137 | | - orr r4, r4, r12,lsl#16
|
138 | | - ldrh r3, [r1,#22]
|
139 | | - ldrh r12, [r1,#24]
|
140 | | - orr r3, r3, r12,lsl#16
|
141 | | - ldrh lr, [r1,#10]
|
142 | | - ldrh r12, [r1,#12]
|
143 | | - orr lr, lr, r12,lsl#16
|
144 | | - add r1, r1, lr
|
145 | | - mul lr, r2, r3
|
146 | | - add r0, r0, lr
|
147 | | -renderbmp_row:
|
148 | | - mov r12, r4
|
149 | | - sub r0, r0, r2
|
150 | | -renderbmp_pixel:
|
151 | | -#ifdef LCD_BIGENDIAN
|
152 | | - ldrb lr, [r1,#1]
|
153 | | - strb lr, [r0], #1
|
154 | | - ldrb lr, [r1], #2
|
155 | | - strb lr, [r0], #1
|
156 | | -#else
|
157 | | - ldrh lr, [r1], #2
|
158 | | - strh lr, [r0], #2
|
159 | | -#endif
|
160 | | - subs r12, r12, #1
|
161 | | - bne renderbmp_pixel
|
162 | | - tst r4, #1
|
163 | | - addne r1, r1, #2
|
164 | | - sub r0, r0, r4,lsl#1
|
165 | | - subs r3, r3, #1
|
166 | | - bne renderbmp_row
|
167 | | - ldmfd sp!, {r4,pc}
|
168 | | -.size renderbmp, .-renderbmp
|
169 | | -
|
170 | | -
|
171 | 74 | .section .icode.renderchar, "ax", %progbits
|
172 | 75 | .align 2
|
173 | 76 | .global renderchar
|
Index: emcore/trunk/drawing.h |
— | — | @@ -34,8 +34,6 @@ |
35 | 35 |
|
36 | 36 | void renderchar(void* buffer, int fgcol, int bgcol, char text, int stride);
|
37 | 37 | void rendertext(void* buffer, int fgcol, int bgcol, char* text, int stride);
|
38 | | -void renderbmp(void* buffer, void* bitmap, int stride);
|
39 | | -void renderfillrect(uint16_t* buffer, int x, int y, int width, int height, int color, int stride);
|
40 | 38 | int get_font_width(void);
|
41 | 39 | int get_font_height(void);
|
42 | 40 |
|
Index: emcore/trunk/export/syscallwrappers.h |
— | — | @@ -48,10 +48,8 @@ |
49 | 49 | #define readdir __emcore_syscall->readdir
|
50 | 50 | #define mkdir __emcore_syscall->mkdir
|
51 | 51 | #define rmdir __emcore_syscall->rmdir
|
52 | | -#define renderbmp __emcore_syscall->renderbmp
|
53 | 52 | #define renderchar __emcore_syscall->renderchar
|
54 | 53 | #define rendertext __emcore_syscall->rendertext
|
55 | | -#define renderfillrect __emcore_syscall->renderfillrect
|
56 | 54 | #define get_font_width __emcore_syscall->get_font_width
|
57 | 55 | #define get_font_height __emcore_syscall->get_font_height
|
58 | 56 | #define execimage __emcore_syscall->execimage
|
Index: emcore/trunk/export/syscallapi.h |
— | — | @@ -108,10 +108,8 @@ |
109 | 109 | typeof(readdir) *readdir;
|
110 | 110 | typeof(mkdir) *mkdir;
|
111 | 111 | typeof(rmdir) *rmdir;
|
112 | | - typeof(renderbmp) *renderbmp;
|
113 | 112 | typeof(renderchar) *renderchar;
|
114 | 113 | typeof(rendertext) *rendertext;
|
115 | | - typeof(renderfillrect) *renderfillrect;
|
116 | 114 | typeof(get_font_width) *get_font_width;
|
117 | 115 | typeof(get_font_height) *get_font_height;
|
118 | 116 | typeof(execimage) *execimage;
|
Index: emcore/trunk/syscallapi.c |
— | — | @@ -169,10 +169,8 @@ |
170 | 170 | .lcd_get_height = lcd_get_height,
|
171 | 171 | .lcd_get_bytes_per_pixel = lcd_get_bytes_per_pixel,
|
172 | 172 | .lcd_translate_color = lcd_translate_color,
|
173 | | - .renderbmp = renderbmp,
|
174 | 173 | .renderchar = renderchar,
|
175 | 174 | .rendertext = rendertext,
|
176 | | - .renderfillrect = renderfillrect,
|
177 | 175 | .get_font_width = get_font_width,
|
178 | 176 | .get_font_height = get_font_height,
|
179 | 177 | #endif
|