LCD refactoring - saves 6 bytes on 9x stock

This commit is contained in:
bsongis
2014-08-20 22:29:45 +02:00
parent 749afc103e
commit 4d84ba4c19
19 changed files with 349 additions and 334 deletions
@@ -119,7 +119,7 @@ void lcdRefresh()
#endif
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_A0);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_RnW);
for (xcoord_t x=LCD_W; x>0; --x) {
for (coord_t x=LCD_W; x>0; --x) {
PORTA_LCD_DAT = *p++;
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_E);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_E);
+2 -2
View File
@@ -634,7 +634,7 @@ uint32_t Card_CSD[4]; // TODO elsewhere
#endif
bool lcd_refresh = true;
uint8_t lcd_buf[DISPLAY_BUF_SIZE];
display_t lcd_buf[DISPLAY_BUF_SIZE];
void lcdSetRefVolt(uint8_t val)
{
@@ -642,7 +642,7 @@ void lcdSetRefVolt(uint8_t val)
void lcdRefresh()
{
memcpy(lcd_buf, displayBuf, DISPLAY_BUF_SIZE);
memcpy(lcd_buf, displayBuf, sizeof(lcd_buf));
lcd_refresh = true;
}
+1 -1
View File
@@ -125,7 +125,7 @@ void lcdRefresh()
#endif
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_A0);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_RnW);
for (xcoord_t x=LCD_W; x>0; --x) {
for (coord_t x=LCD_W; x>0; --x) {
PORTA_LCD_DAT = *p++;
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_E);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_E);