Browse code

Add invert option

Nils Faerber authored on 06/07/2013 21:17:34
Showing 2 changed files
... ...
@@ -197,12 +197,21 @@ __interrupt void DMA_ISR (void)
197 197
 /* writes the complete internal framebuffer to the LCD */
198 198
 void mw_lcd_update_screen(void)
199 199
 {
200
-#ifndef LCD_DMA
200
+//#ifndef LCD_DMA
201 201
 	unsigned int i,j;
202
-#endif
202
+//#endif
203 203
 
204 204
 //	debug_uart_tx("uscr1\n");
205 205
 
206
+	// invert the buffer
207
+	if (0) {
208
+		for (i=0; i<96; i++) {
209
+			for ( j = 0; j < 12; j++ ) {
210
+				lcd_buf[i].Data[j] = ~lcd_buf[i].Data[j];
211
+			}
212
+		}
213
+	}
214
+
206 215
 	LCD_CS_ASSERT();
207 216
 
208 217
 	/* send WRITE command */
... ...
@@ -267,7 +276,7 @@ void mw_lcd_update_screen(void)
267 276
 	mw_lcd_static_mode();
268 277
 }
269 278
 
270
-void mw_lcd_draw_pixel(unsigned char x, unsigned char y, unsigned char color)
279
+void mw_lcd_draw_pixel(const uint8_t x, const uint8_t y, const uint8_t color)
271 280
 {
272 281
 	switch (color) {
273 282
 		case 1:
... ...
@@ -25,7 +25,7 @@ void mw_lcd_update_screen(void);
25 25
 #define LCD_WHITE	0
26 26
 #endif
27 27
 #define LCD_XOR		2
28
-void mw_lcd_draw_pixel(unsigned char x, unsigned char y, unsigned char color);
28
+void mw_lcd_draw_pixel(const uint8_t x, const uint8_t y, const uint8_t color);
29 29
 
30 30
 #endif
31 31