Browse Source

Recover 32 bytes of SRAM in Marlin bootscreen code

Scott Lahteine 8 years ago
parent
commit
45c74406cf
1 changed files with 7 additions and 12 deletions
  1. 7
    12
      Marlin/ultralcd_impl_HD44780.h

+ 7
- 12
Marlin/ultralcd_impl_HD44780.h View File

440
   }
440
   }
441
 
441
 
442
   void bootscreen() {
442
   void bootscreen() {
443
-    byte top_left[8] = {
443
+    const static PROGMEM byte corner[4][8] = { {
444
       B00000,
444
       B00000,
445
       B00000,
445
       B00000,
446
       B00000,
446
       B00000,
449
       B00010,
449
       B00010,
450
       B00100,
450
       B00100,
451
       B00100
451
       B00100
452
-    };
453
-    byte top_right[8] = {
452
+    }, {
454
       B00000,
453
       B00000,
455
       B00000,
454
       B00000,
456
       B00000,
455
       B00000,
459
       B01100,
458
       B01100,
460
       B00100,
459
       B00100,
461
       B00100
460
       B00100
462
-    };
463
-    byte botom_left[8] = {
461
+    }, {
464
       B00100,
462
       B00100,
465
       B00010,
463
       B00010,
466
       B00001,
464
       B00001,
469
       B00000,
467
       B00000,
470
       B00000,
468
       B00000,
471
       B00000
469
       B00000
472
-    };
473
-    byte botom_right[8] = {
470
+    }, {
474
       B00100,
471
       B00100,
475
       B01000,
472
       B01000,
476
       B10000,
473
       B10000,
479
       B00000,
476
       B00000,
480
       B00000,
477
       B00000,
481
       B00000
478
       B00000
482
-    };
483
-    lcd.createChar(0, top_left);
484
-    lcd.createChar(1, top_right);
485
-    lcd.createChar(2, botom_left);
486
-    lcd.createChar(3, botom_right);
479
+    } };
480
+    for (uint8_t i = 0; i < 4; i++)
481
+      createChar_P(i, corner[i]);
487
 
482
 
488
     lcd.clear();
483
     lcd.clear();
489
 
484
 

Loading…
Cancel
Save