From: Nils Faerber Date: Sat, 6 Jul 2013 21:17:34 +0000 (+0200) Subject: Add invert option X-Git-Url: https://git.karo-electronics.de/?p=oswald.git;a=commitdiff_plain;h=b855a8c32c0742bf402ab409e63aad7b3606a824;ds=sidebyside Add invert option --- diff --git a/metawatch/mw_lcd.c b/metawatch/mw_lcd.c index 0eb7550..2082a6d 100644 --- a/metawatch/mw_lcd.c +++ b/metawatch/mw_lcd.c @@ -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: diff --git a/metawatch/mw_lcd.h b/metawatch/mw_lcd.h index 5211da0..0113c81 100644 --- a/metawatch/mw_lcd.h +++ b/metawatch/mw_lcd.h @@ -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