LCD refactoring - saves 6 bytes on 9x stock
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user