]> git.karo-electronics.de Git - oswald.git/commitdiff
Add invert option
authorNils Faerber <nils.faerber@kernelconcepts.de>
Sat, 6 Jul 2013 21:17:34 +0000 (23:17 +0200)
committerNils Faerber <nils.faerber@kernelconcepts.de>
Sat, 6 Jul 2013 21:17:34 +0000 (23:17 +0200)
metawatch/mw_lcd.c
metawatch/mw_lcd.h

index 0eb75507029c1504aef2ea379e17481052ead136..2082a6d5e4c3f55334aebac8533d2bff170d28af 100644 (file)
@@ -197,12 +197,21 @@ __interrupt void DMA_ISR (void)
 /* writes the complete internal framebuffer to the LCD */
 void mw_lcd_update_screen(void)
 {
-#ifndef LCD_DMA
+//#ifndef LCD_DMA
        unsigned int i,j;
-#endif
+//#endif
 
 //     debug_uart_tx("uscr1\n");
 
+       // invert the buffer
+       if (0) {
+               for (i=0; i<96; i++) {
+                       for ( j = 0; j < 12; j++ ) {
+                               lcd_buf[i].Data[j] = ~lcd_buf[i].Data[j];
+                       }
+               }
+       }
+
        LCD_CS_ASSERT();
 
        /* send WRITE command */
@@ -267,7 +276,7 @@ void mw_lcd_update_screen(void)
        mw_lcd_static_mode();
 }
 
-void mw_lcd_draw_pixel(unsigned char x, unsigned char y, unsigned char color)
+void mw_lcd_draw_pixel(const uint8_t x, const uint8_t y, const uint8_t color)
 {
        switch (color) {
                case 1:
index 5211da05bff9f5d5051e54439c48e1d29158ef4b..0113c81ff53addd102e5bdd3233ac82db5842741 100644 (file)
@@ -25,7 +25,7 @@ void mw_lcd_update_screen(void);
 #define LCD_WHITE      0
 #endif
 #define LCD_XOR                2
-void mw_lcd_draw_pixel(unsigned char x, unsigned char y, unsigned char color);
+void mw_lcd_draw_pixel(const uint8_t x, const uint8_t y, const uint8_t color);
 
 #endif