Source

New LiquidCrystal / LCD.cpp

The default branch has multiple heads

Diff from to
 #else
 #include <Arduino.h>
 #endif
+
 #include "LCD.h"
 
 // CLASS CONSTRUCTORS
    command(LCD_SETCGRAMADDR | (location << 3));
    delayMicroseconds(30);
    
-   for (int i=0; i<8; i++) 
+   for (uint8_t i = 0; i < 8; i++)
    {
       write(charmap[i]);      // call the virtual write method
       delayMicroseconds(40);
    }
 }
 
+#ifdef __AVR__
+void LCD::createChar(uint8_t location, const prog_uchar charmap[])
+{
+   location &= 0x7;   // we only have 8 memory locations 0-7
+   
+   command(LCD_SETCGRAMADDR | (location << 3));
+   delayMicroseconds(30);
+   
+   for (uint8_t i = 0; i < 8; i++)
+   {
+      write(pgm_read_byte_near(charmap++));
+      delayMicroseconds(40);
+   }
+}
+#endif // __AVR__
+
 //
 // Switch on the backlight
 void LCD::backlight ( void )