├── .gitattributes ├── .gitignore ├── PDQ_GFX ├── .gitignore ├── Fonts │ ├── FreeMono12pt7b.h │ ├── FreeMono18pt7b.h │ ├── FreeMono24pt7b.h │ ├── FreeMono9pt7b.h │ ├── FreeMonoBold12pt7b.h │ ├── FreeMonoBold18pt7b.h │ ├── FreeMonoBold24pt7b.h │ ├── FreeMonoBold9pt7b.h │ ├── FreeMonoBoldOblique12pt7b.h │ ├── FreeMonoBoldOblique18pt7b.h │ ├── FreeMonoBoldOblique24pt7b.h │ ├── FreeMonoBoldOblique9pt7b.h │ ├── FreeMonoOblique12pt7b.h │ ├── FreeMonoOblique18pt7b.h │ ├── FreeMonoOblique24pt7b.h │ ├── FreeMonoOblique9pt7b.h │ ├── FreeSans12pt7b.h │ ├── FreeSans18pt7b.h │ ├── FreeSans24pt7b.h │ ├── FreeSans9pt7b.h │ ├── FreeSansBold12pt7b.h │ ├── FreeSansBold18pt7b.h │ ├── FreeSansBold24pt7b.h │ ├── FreeSansBold9pt7b.h │ ├── FreeSansBoldOblique12pt7b.h │ ├── FreeSansBoldOblique18pt7b.h │ ├── FreeSansBoldOblique24pt7b.h │ ├── FreeSansBoldOblique9pt7b.h │ ├── FreeSansOblique12pt7b.h │ ├── FreeSansOblique18pt7b.h │ ├── FreeSansOblique24pt7b.h │ ├── FreeSansOblique9pt7b.h │ ├── FreeSerif12pt7b.h │ ├── FreeSerif18pt7b.h │ ├── FreeSerif24pt7b.h │ ├── FreeSerif9pt7b.h │ ├── FreeSerifBold12pt7b.h │ ├── FreeSerifBold18pt7b.h │ ├── FreeSerifBold24pt7b.h │ ├── FreeSerifBold9pt7b.h │ ├── FreeSerifBoldItalic12pt7b.h │ ├── FreeSerifBoldItalic18pt7b.h │ ├── FreeSerifBoldItalic24pt7b.h │ ├── FreeSerifBoldItalic9pt7b.h │ ├── FreeSerifItalic12pt7b.h │ ├── FreeSerifItalic18pt7b.h │ ├── FreeSerifItalic24pt7b.h │ └── FreeSerifItalic9pt7b.h ├── PDQ_GFX.cpp ├── PDQ_GFX.h ├── README.txt ├── TTF2GFX │ ├── Sample.fonts │ │ ├── Arial_Narrow48.Digits.pck.h │ │ ├── Comic_Sans_MS28.h │ │ ├── Comic_Sans_MS28.pck.h │ │ ├── Tahoma24.h │ │ ├── Tahoma24.pck.h │ │ ├── Tahoma36.h │ │ └── Tahoma36.pck.h │ ├── Src │ │ ├── .gitignore │ │ ├── Project1.dpr │ │ ├── Project1.dproj │ │ ├── Project1.dproj.local │ │ ├── Project1.dsk │ │ ├── Project1.identcache │ │ ├── Project1.res │ │ ├── TTF2GFX.dpr │ │ ├── TTF2GFX.dproj │ │ ├── TTF2GFX.dproj.local │ │ ├── TTF2GFX.dsk │ │ ├── TTF2GFX.identcache │ │ ├── TTF2GFX.res │ │ ├── Unit1.dfm │ │ ├── Unit1.pas │ │ └── stat.txt │ ├── TTF2GFX.exe │ └── readme.txt ├── fontconvert │ ├── Makefile │ ├── fontconvert.c │ └── makefonts.sh ├── gfxfont.h ├── glcdfont.c ├── library.properties └── license.txt ├── PDQ_ILI9340 ├── PDQ_FastPin.h ├── PDQ_ILI9340.cpp ├── PDQ_ILI9340.h ├── README.txt ├── examples │ ├── PDQ_GFX_Button_test │ │ ├── PDQ_GFX_Button_test.ino │ │ └── PDQ_ILI9340_config.h │ └── PDQ_graphicstest │ │ ├── PDQ_ILI9340_config.h │ │ └── PDQ_graphicstest.ino ├── library.properties └── tools │ ├── HaD_240x320.bmp │ ├── Makefile │ ├── crunch_bmp_rle.cpp │ └── readme.txt ├── PDQ_ILI9341 ├── .gitignore ├── PDQ_FastPin.h ├── PDQ_ILI9341.cpp ├── PDQ_ILI9341.h ├── README.txt ├── examples │ ├── PDQ_GFX_Button_test │ │ ├── PDQ_GFX_Button_test.ino │ │ └── PDQ_ILI9341_config.h │ ├── PDQ_attinytest │ │ ├── PDQ_ILI9341_config.h │ │ └── PDQ_attinytest.ino │ └── PDQ_graphicstest │ │ ├── PDQ_ILI9341_config.h │ │ └── PDQ_graphicstest.ino ├── library.properties └── tools │ ├── HaD_240x320.bmp │ ├── Makefile │ ├── crunch_bmp_rle.cpp │ └── readme.txt ├── PDQ_ST7735 ├── PDQ_FastPin.h ├── PDQ_ST7735.cpp ├── PDQ_ST7735.h ├── README.txt ├── examples │ ├── PDQ_GFX_Button_test │ │ ├── PDQ_GFX_Button_test.ino │ │ └── PDQ_ILI9341_config.h │ └── PDQ_graphicstest │ │ ├── PDQ_ST7735_config.h │ │ └── PDQ_graphicstest.ino ├── library.properties └── tools │ ├── HaD_128x160.bmp │ ├── Makefile │ ├── crunch_bmp_rle.cpp │ └── readme.txt ├── PDQ_ST7781 ├── PDQ_FastPin.h ├── PDQ_ST7781.cpp ├── PDQ_ST7781.h ├── README.txt ├── examples │ ├── PDQ_GFX_Button_test │ │ ├── PDQ_GFX_Button_test.ino │ │ ├── PDQ_ILI9341_config.h │ │ └── PDQ_ST7781_config.h │ └── PDQ_graphicstest │ │ ├── PDQ_ST7781_config.h │ │ └── PDQ_graphicstest.ino ├── library.properties └── tools │ ├── HaD_240x320.bmp │ ├── Makefile │ ├── crunch_bmp_rle.cpp │ └── readme.txt └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # ========================= 18 | # Operating System Files 19 | # ========================= 20 | 21 | # OSX 22 | # ========================= 23 | 24 | .DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | 28 | # Icon must end with two \r 29 | Icon 30 | 31 | 32 | # Thumbnails 33 | ._* 34 | 35 | # Files that might appear on external disk 36 | .Spotlight-V100 37 | .Trashes 38 | 39 | # Directories potentially created on remote AFP share 40 | .AppleDB 41 | .AppleDesktop 42 | Network Trash Folder 43 | Temporary Items 44 | .apdisk 45 | 46 | # IDE Directories 47 | .idea -------------------------------------------------------------------------------- /PDQ_GFX/.gitignore: -------------------------------------------------------------------------------- 1 | /__history/ 2 | -------------------------------------------------------------------------------- /PDQ_GFX/Fonts/FreeMono9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeMono9pt7bBitmaps[] PROGMEM = { 2 | 0xAA, 0xA8, 0x0C, 0xED, 0x24, 0x92, 0x48, 0x24, 0x48, 0x91, 0x2F, 0xE4, 3 | 0x89, 0x7F, 0x28, 0x51, 0x22, 0x40, 0x08, 0x3E, 0x62, 0x40, 0x30, 0x0E, 4 | 0x01, 0x81, 0xC3, 0xBE, 0x08, 0x08, 0x71, 0x12, 0x23, 0x80, 0x23, 0xB8, 5 | 0x0E, 0x22, 0x44, 0x70, 0x38, 0x81, 0x02, 0x06, 0x1A, 0x65, 0x46, 0xC8, 6 | 0xEC, 0xE9, 0x24, 0x5A, 0xAA, 0xA9, 0x40, 0xA9, 0x55, 0x5A, 0x80, 0x10, 7 | 0x22, 0x4B, 0xE3, 0x05, 0x11, 0x00, 0x10, 0x20, 0x47, 0xF1, 0x02, 0x04, 8 | 0x00, 0x6B, 0x48, 0xFF, 0x00, 0xF0, 0x02, 0x08, 0x10, 0x60, 0x81, 0x04, 9 | 0x08, 0x20, 0x41, 0x02, 0x08, 0x00, 0x38, 0x8A, 0x0C, 0x18, 0x30, 0x60, 10 | 0xC1, 0x82, 0x88, 0xE0, 0x27, 0x28, 0x42, 0x10, 0x84, 0x21, 0x3E, 0x38, 11 | 0x8A, 0x08, 0x10, 0x20, 0x82, 0x08, 0x61, 0x03, 0xF8, 0x7C, 0x06, 0x02, 12 | 0x02, 0x1C, 0x06, 0x01, 0x01, 0x01, 0x42, 0x3C, 0x18, 0xA2, 0x92, 0x8A, 13 | 0x28, 0xBF, 0x08, 0x21, 0xC0, 0x7C, 0x81, 0x03, 0xE4, 0x40, 0x40, 0x81, 14 | 0x03, 0x88, 0xE0, 0x1E, 0x41, 0x04, 0x0B, 0x98, 0xB0, 0xC1, 0xC2, 0x88, 15 | 0xE0, 0xFE, 0x04, 0x08, 0x20, 0x40, 0x82, 0x04, 0x08, 0x20, 0x40, 0x38, 16 | 0x8A, 0x0C, 0x14, 0x47, 0x11, 0x41, 0x83, 0x8C, 0xE0, 0x38, 0x8A, 0x1C, 17 | 0x18, 0x68, 0xCE, 0x81, 0x04, 0x13, 0xC0, 0xF0, 0x0F, 0x6C, 0x00, 0xD2, 18 | 0xD2, 0x00, 0x03, 0x04, 0x18, 0x60, 0x60, 0x18, 0x04, 0x03, 0xFF, 0x80, 19 | 0x00, 0x1F, 0xF0, 0x40, 0x18, 0x03, 0x00, 0x60, 0x20, 0x60, 0xC0, 0x80, 20 | 0x3D, 0x84, 0x08, 0x30, 0xC2, 0x00, 0x00, 0x00, 0x30, 0x3C, 0x46, 0x82, 21 | 0x8E, 0xB2, 0xA2, 0xA2, 0x9F, 0x80, 0x80, 0x40, 0x3C, 0x3C, 0x01, 0x40, 22 | 0x28, 0x09, 0x01, 0x10, 0x42, 0x0F, 0xC1, 0x04, 0x40, 0x9E, 0x3C, 0xFE, 23 | 0x21, 0x90, 0x48, 0x67, 0xE2, 0x09, 0x02, 0x81, 0x41, 0xFF, 0x80, 0x3E, 24 | 0xB0, 0xF0, 0x30, 0x08, 0x04, 0x02, 0x00, 0x80, 0x60, 0x8F, 0x80, 0xFE, 25 | 0x21, 0x90, 0x68, 0x14, 0x0A, 0x05, 0x02, 0x83, 0x43, 0x7F, 0x00, 0xFF, 26 | 0x20, 0x90, 0x08, 0x87, 0xC2, 0x21, 0x00, 0x81, 0x40, 0xFF, 0xC0, 0xFF, 27 | 0xA0, 0x50, 0x08, 0x87, 0xC2, 0x21, 0x00, 0x80, 0x40, 0x78, 0x00, 0x1E, 28 | 0x98, 0x6C, 0x0A, 0x00, 0x80, 0x20, 0xF8, 0x0B, 0x02, 0x60, 0x87, 0xC0, 29 | 0xE3, 0xA0, 0x90, 0x48, 0x27, 0xF2, 0x09, 0x04, 0x82, 0x41, 0x71, 0xC0, 30 | 0xF9, 0x08, 0x42, 0x10, 0x84, 0x27, 0xC0, 0x1F, 0x02, 0x02, 0x02, 0x02, 31 | 0x02, 0x82, 0x82, 0xC6, 0x78, 0xE3, 0xA1, 0x11, 0x09, 0x05, 0x83, 0x21, 32 | 0x08, 0x84, 0x41, 0x70, 0xC0, 0xE0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 33 | 0x41, 0x41, 0xFF, 0xE0, 0xEC, 0x19, 0x45, 0x28, 0xA4, 0xA4, 0x94, 0x91, 34 | 0x12, 0x02, 0x40, 0x5C, 0x1C, 0xC3, 0xB0, 0x94, 0x4A, 0x24, 0x92, 0x49, 35 | 0x14, 0x8A, 0x43, 0x70, 0x80, 0x1E, 0x31, 0x90, 0x50, 0x18, 0x0C, 0x06, 36 | 0x02, 0x82, 0x63, 0x0F, 0x00, 0xFE, 0x43, 0x41, 0x41, 0x42, 0x7C, 0x40, 37 | 0x40, 0x40, 0xF0, 0x1C, 0x31, 0x90, 0x50, 0x18, 0x0C, 0x06, 0x02, 0x82, 38 | 0x63, 0x1F, 0x04, 0x07, 0x92, 0x30, 0xFE, 0x21, 0x90, 0x48, 0x24, 0x23, 39 | 0xE1, 0x10, 0x84, 0x41, 0x70, 0xC0, 0x3A, 0xCD, 0x0A, 0x03, 0x01, 0x80, 40 | 0xC1, 0xC7, 0x78, 0xFF, 0xC4, 0x62, 0x21, 0x00, 0x80, 0x40, 0x20, 0x10, 41 | 0x08, 0x1F, 0x00, 0xE3, 0xA0, 0x90, 0x48, 0x24, 0x12, 0x09, 0x04, 0x82, 42 | 0x22, 0x0E, 0x00, 0xF1, 0xE8, 0x10, 0x82, 0x10, 0x42, 0x10, 0x22, 0x04, 43 | 0x80, 0x50, 0x0C, 0x00, 0x80, 0xF1, 0xE8, 0x09, 0x11, 0x25, 0x44, 0xA8, 44 | 0x55, 0x0C, 0xA1, 0x8C, 0x31, 0x84, 0x30, 0xE3, 0xA0, 0x88, 0x82, 0x80, 45 | 0x80, 0xC0, 0x90, 0x44, 0x41, 0x71, 0xC0, 0xE3, 0xA0, 0x88, 0x82, 0x81, 46 | 0x40, 0x40, 0x20, 0x10, 0x08, 0x1F, 0x00, 0xFD, 0x0A, 0x20, 0x81, 0x04, 47 | 0x10, 0x21, 0x83, 0xFC, 0xEA, 0xAA, 0xAA, 0xC0, 0x80, 0x81, 0x03, 0x02, 48 | 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0xD5, 0x55, 0x55, 0xC0, 49 | 0x10, 0x51, 0x22, 0x28, 0x20, 0xFF, 0xE0, 0x88, 0x80, 0x7E, 0x00, 0x80, 50 | 0x47, 0xEC, 0x14, 0x0A, 0x0C, 0xFB, 0xC0, 0x20, 0x10, 0x0B, 0xC6, 0x12, 51 | 0x05, 0x02, 0x81, 0x40, 0xB0, 0xB7, 0x80, 0x3A, 0x8E, 0x0C, 0x08, 0x10, 52 | 0x10, 0x9E, 0x03, 0x00, 0x80, 0x47, 0xA4, 0x34, 0x0A, 0x05, 0x02, 0x81, 53 | 0x21, 0x8F, 0x60, 0x3C, 0x43, 0x81, 0xFF, 0x80, 0x80, 0x61, 0x3E, 0x3D, 54 | 0x04, 0x3E, 0x41, 0x04, 0x10, 0x41, 0x0F, 0x80, 0x3D, 0xA1, 0xA0, 0x50, 55 | 0x28, 0x14, 0x09, 0x0C, 0x7A, 0x01, 0x01, 0x87, 0x80, 0xC0, 0x20, 0x10, 56 | 0x0B, 0xC6, 0x32, 0x09, 0x04, 0x82, 0x41, 0x20, 0xB8, 0xE0, 0x10, 0x01, 57 | 0xC0, 0x81, 0x02, 0x04, 0x08, 0x11, 0xFC, 0x10, 0x3E, 0x10, 0x84, 0x21, 58 | 0x08, 0x42, 0x3F, 0x00, 0xC0, 0x40, 0x40, 0x4F, 0x44, 0x58, 0x70, 0x48, 59 | 0x44, 0x42, 0xC7, 0x70, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10, 0x23, 60 | 0xF8, 0xB7, 0x64, 0x62, 0x31, 0x18, 0x8C, 0x46, 0x23, 0x91, 0x5E, 0x31, 61 | 0x90, 0x48, 0x24, 0x12, 0x09, 0x05, 0xC7, 0x3E, 0x31, 0xA0, 0x30, 0x18, 62 | 0x0C, 0x05, 0x8C, 0x7C, 0xDE, 0x30, 0x90, 0x28, 0x14, 0x0A, 0x05, 0x84, 63 | 0xBC, 0x40, 0x20, 0x38, 0x00, 0x3D, 0xA1, 0xA0, 0x50, 0x28, 0x14, 0x09, 64 | 0x0C, 0x7A, 0x01, 0x00, 0x80, 0xE0, 0xCE, 0xA1, 0x82, 0x04, 0x08, 0x10, 65 | 0x7C, 0x3A, 0x8D, 0x0B, 0x80, 0xF0, 0x70, 0xDE, 0x40, 0x40, 0xFC, 0x40, 66 | 0x40, 0x40, 0x40, 0x40, 0x41, 0x3E, 0xC3, 0x41, 0x41, 0x41, 0x41, 0x41, 67 | 0x43, 0x3D, 0xE3, 0xA0, 0x90, 0x84, 0x42, 0x20, 0xA0, 0x50, 0x10, 0xE3, 68 | 0xC0, 0x92, 0x4B, 0x25, 0x92, 0xA9, 0x98, 0x44, 0xE3, 0x31, 0x05, 0x01, 69 | 0x01, 0x41, 0x11, 0x05, 0xC7, 0xE3, 0xA0, 0x90, 0x84, 0x42, 0x40, 0xA0, 70 | 0x60, 0x10, 0x10, 0x08, 0x3E, 0x00, 0xFD, 0x08, 0x20, 0x82, 0x08, 0x10, 71 | 0xBF, 0x29, 0x24, 0xA2, 0x49, 0x26, 0xFF, 0xF8, 0x89, 0x24, 0x8A, 0x49, 72 | 0x2C, 0x61, 0x24, 0x30 }; 73 | 74 | const GFXglyph FreeMono9pt7bGlyphs[] PROGMEM = { 75 | { 0, 0, 0, 11, 0, 1 }, // 0x20 ' ' 76 | { 0, 2, 11, 11, 4, -10 }, // 0x21 '!' 77 | { 3, 6, 5, 11, 2, -10 }, // 0x22 '"' 78 | { 7, 7, 12, 11, 2, -10 }, // 0x23 '#' 79 | { 18, 8, 12, 11, 1, -10 }, // 0x24 '$' 80 | { 30, 7, 11, 11, 2, -10 }, // 0x25 '%' 81 | { 40, 7, 10, 11, 2, -9 }, // 0x26 '&' 82 | { 49, 3, 5, 11, 4, -10 }, // 0x27 ''' 83 | { 51, 2, 13, 11, 5, -10 }, // 0x28 '(' 84 | { 55, 2, 13, 11, 4, -10 }, // 0x29 ')' 85 | { 59, 7, 7, 11, 2, -10 }, // 0x2A '*' 86 | { 66, 7, 7, 11, 2, -8 }, // 0x2B '+' 87 | { 73, 3, 5, 11, 2, -1 }, // 0x2C ',' 88 | { 75, 9, 1, 11, 1, -5 }, // 0x2D '-' 89 | { 77, 2, 2, 11, 4, -1 }, // 0x2E '.' 90 | { 78, 7, 13, 11, 2, -11 }, // 0x2F '/' 91 | { 90, 7, 11, 11, 2, -10 }, // 0x30 '0' 92 | { 100, 5, 11, 11, 3, -10 }, // 0x31 '1' 93 | { 107, 7, 11, 11, 2, -10 }, // 0x32 '2' 94 | { 117, 8, 11, 11, 1, -10 }, // 0x33 '3' 95 | { 128, 6, 11, 11, 3, -10 }, // 0x34 '4' 96 | { 137, 7, 11, 11, 2, -10 }, // 0x35 '5' 97 | { 147, 7, 11, 11, 2, -10 }, // 0x36 '6' 98 | { 157, 7, 11, 11, 2, -10 }, // 0x37 '7' 99 | { 167, 7, 11, 11, 2, -10 }, // 0x38 '8' 100 | { 177, 7, 11, 11, 2, -10 }, // 0x39 '9' 101 | { 187, 2, 8, 11, 4, -7 }, // 0x3A ':' 102 | { 189, 3, 11, 11, 3, -7 }, // 0x3B ';' 103 | { 194, 8, 8, 11, 1, -8 }, // 0x3C '<' 104 | { 202, 9, 4, 11, 1, -6 }, // 0x3D '=' 105 | { 207, 9, 8, 11, 1, -8 }, // 0x3E '>' 106 | { 216, 7, 10, 11, 2, -9 }, // 0x3F '?' 107 | { 225, 8, 12, 11, 2, -10 }, // 0x40 '@' 108 | { 237, 11, 10, 11, 0, -9 }, // 0x41 'A' 109 | { 251, 9, 10, 11, 1, -9 }, // 0x42 'B' 110 | { 263, 9, 10, 11, 1, -9 }, // 0x43 'C' 111 | { 275, 9, 10, 11, 1, -9 }, // 0x44 'D' 112 | { 287, 9, 10, 11, 1, -9 }, // 0x45 'E' 113 | { 299, 9, 10, 11, 1, -9 }, // 0x46 'F' 114 | { 311, 10, 10, 11, 1, -9 }, // 0x47 'G' 115 | { 324, 9, 10, 11, 1, -9 }, // 0x48 'H' 116 | { 336, 5, 10, 11, 3, -9 }, // 0x49 'I' 117 | { 343, 8, 10, 11, 2, -9 }, // 0x4A 'J' 118 | { 353, 9, 10, 11, 1, -9 }, // 0x4B 'K' 119 | { 365, 8, 10, 11, 2, -9 }, // 0x4C 'L' 120 | { 375, 11, 10, 11, 0, -9 }, // 0x4D 'M' 121 | { 389, 9, 10, 11, 1, -9 }, // 0x4E 'N' 122 | { 401, 9, 10, 11, 1, -9 }, // 0x4F 'O' 123 | { 413, 8, 10, 11, 1, -9 }, // 0x50 'P' 124 | { 423, 9, 13, 11, 1, -9 }, // 0x51 'Q' 125 | { 438, 9, 10, 11, 1, -9 }, // 0x52 'R' 126 | { 450, 7, 10, 11, 2, -9 }, // 0x53 'S' 127 | { 459, 9, 10, 11, 1, -9 }, // 0x54 'T' 128 | { 471, 9, 10, 11, 1, -9 }, // 0x55 'U' 129 | { 483, 11, 10, 11, 0, -9 }, // 0x56 'V' 130 | { 497, 11, 10, 11, 0, -9 }, // 0x57 'W' 131 | { 511, 9, 10, 11, 1, -9 }, // 0x58 'X' 132 | { 523, 9, 10, 11, 1, -9 }, // 0x59 'Y' 133 | { 535, 7, 10, 11, 2, -9 }, // 0x5A 'Z' 134 | { 544, 2, 13, 11, 5, -10 }, // 0x5B '[' 135 | { 548, 7, 13, 11, 2, -11 }, // 0x5C '\' 136 | { 560, 2, 13, 11, 4, -10 }, // 0x5D ']' 137 | { 564, 7, 5, 11, 2, -10 }, // 0x5E '^' 138 | { 569, 11, 1, 11, 0, 2 }, // 0x5F '_' 139 | { 571, 3, 3, 11, 3, -11 }, // 0x60 '`' 140 | { 573, 9, 8, 11, 1, -7 }, // 0x61 'a' 141 | { 582, 9, 11, 11, 1, -10 }, // 0x62 'b' 142 | { 595, 7, 8, 11, 2, -7 }, // 0x63 'c' 143 | { 602, 9, 11, 11, 1, -10 }, // 0x64 'd' 144 | { 615, 8, 8, 11, 1, -7 }, // 0x65 'e' 145 | { 623, 6, 11, 11, 3, -10 }, // 0x66 'f' 146 | { 632, 9, 11, 11, 1, -7 }, // 0x67 'g' 147 | { 645, 9, 11, 11, 1, -10 }, // 0x68 'h' 148 | { 658, 7, 10, 11, 2, -9 }, // 0x69 'i' 149 | { 667, 5, 13, 11, 3, -9 }, // 0x6A 'j' 150 | { 676, 8, 11, 11, 2, -10 }, // 0x6B 'k' 151 | { 687, 7, 11, 11, 2, -10 }, // 0x6C 'l' 152 | { 697, 9, 8, 11, 1, -7 }, // 0x6D 'm' 153 | { 706, 9, 8, 11, 1, -7 }, // 0x6E 'n' 154 | { 715, 9, 8, 11, 1, -7 }, // 0x6F 'o' 155 | { 724, 9, 11, 11, 1, -7 }, // 0x70 'p' 156 | { 737, 9, 11, 11, 1, -7 }, // 0x71 'q' 157 | { 750, 7, 8, 11, 3, -7 }, // 0x72 'r' 158 | { 757, 7, 8, 11, 2, -7 }, // 0x73 's' 159 | { 764, 8, 10, 11, 2, -9 }, // 0x74 't' 160 | { 774, 8, 8, 11, 1, -7 }, // 0x75 'u' 161 | { 782, 9, 8, 11, 1, -7 }, // 0x76 'v' 162 | { 791, 9, 8, 11, 1, -7 }, // 0x77 'w' 163 | { 800, 9, 8, 11, 1, -7 }, // 0x78 'x' 164 | { 809, 9, 11, 11, 1, -7 }, // 0x79 'y' 165 | { 822, 7, 8, 11, 2, -7 }, // 0x7A 'z' 166 | { 829, 3, 13, 11, 4, -10 }, // 0x7B '{' 167 | { 834, 1, 13, 11, 5, -10 }, // 0x7C '|' 168 | { 836, 3, 13, 11, 4, -10 }, // 0x7D '}' 169 | { 841, 7, 3, 11, 2, -6 } }; // 0x7E '~' 170 | 171 | const GFXfont FreeMono9pt7b PROGMEM = { 172 | (uint8_t *)FreeMono9pt7bBitmaps, 173 | (GFXglyph *)FreeMono9pt7bGlyphs, 174 | 0x20, 0x7E, 18 }; 175 | 176 | // Approx. 1516 bytes 177 | -------------------------------------------------------------------------------- /PDQ_GFX/Fonts/FreeMonoBold9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeMonoBold9pt7bBitmaps[] PROGMEM = { 2 | 0xFF, 0xFF, 0xD2, 0x1F, 0x80, 0xEC, 0x89, 0x12, 0x24, 0x40, 0x36, 0x36, 3 | 0x36, 0x7F, 0x7F, 0x36, 0xFF, 0xFF, 0x3C, 0x3C, 0x3C, 0x00, 0x18, 0xFF, 4 | 0xFE, 0x3C, 0x1F, 0x1F, 0x83, 0x46, 0x8D, 0xF0, 0xC1, 0x83, 0x00, 0x61, 5 | 0x22, 0x44, 0x86, 0x67, 0x37, 0x11, 0x22, 0x4C, 0x70, 0x3C, 0x7E, 0x60, 6 | 0x60, 0x30, 0x7B, 0xDF, 0xCE, 0xFF, 0x7F, 0xC9, 0x24, 0x37, 0x66, 0xCC, 7 | 0xCC, 0xCC, 0x66, 0x31, 0xCE, 0x66, 0x33, 0x33, 0x33, 0x66, 0xC8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0xC6, 0x18, 0xC1, 0xB0, 0x36, 0x03, 0x80, 0x70, 0xF1, 80 | 0xFE, 0x3D, 0xBB, 0x37, 0x63, 0xF8, 0x77, 0x0E, 0xE1, 0x8C, 0xF7, 0xFB, 81 | 0xCD, 0x83, 0x83, 0xC3, 0xBB, 0xDF, 0xEF, 0xF3, 0xFC, 0xF6, 0x18, 0xCC, 82 | 0x33, 0x07, 0x81, 0xE0, 0x30, 0x0C, 0x06, 0x0F, 0xC3, 0xF0, 0xFF, 0xFF, 83 | 0x30, 0xC3, 0x0C, 0x7F, 0xFF, 0x37, 0x66, 0x66, 0xCC, 0x66, 0x66, 0x73, 84 | 0xFF, 0xFF, 0xFF, 0xF0, 0xCE, 0x66, 0x66, 0x33, 0x66, 0x66, 0xEC, 0x70, 85 | 0x7C, 0xF3, 0xC0, 0xC0 }; 86 | 87 | const GFXglyph FreeMonoBold9pt7bGlyphs[] PROGMEM = { 88 | { 0, 0, 0, 11, 0, 1 }, // 0x20 ' ' 89 | { 0, 3, 11, 11, 4, -10 }, // 0x21 '!' 90 | { 5, 7, 5, 11, 2, -10 }, // 0x22 '"' 91 | { 10, 8, 12, 11, 1, -10 }, // 0x23 '#' 92 | { 22, 7, 14, 11, 2, -11 }, // 0x24 '$' 93 | { 35, 7, 11, 11, 2, -10 }, // 0x25 '%' 94 | { 45, 8, 10, 11, 1, -9 }, // 0x26 '&' 95 | { 55, 3, 5, 11, 4, -10 }, // 0x27 ''' 96 | { 57, 4, 14, 11, 5, -10 }, // 0x28 '(' 97 | { 64, 4, 14, 11, 2, -10 }, // 0x29 ')' 98 | { 71, 8, 7, 11, 2, -10 }, // 0x2A '*' 99 | { 78, 8, 9, 11, 2, -8 }, // 0x2B '+' 100 | { 87, 3, 5, 11, 3, -1 }, // 0x2C ',' 101 | { 89, 9, 2, 11, 1, -5 }, // 0x2D '-' 102 | { 92, 2, 2, 11, 4, -1 }, // 0x2E '.' 103 | { 93, 7, 15, 11, 2, -12 }, // 0x2F '/' 104 | { 107, 7, 12, 11, 2, -11 }, // 0x30 '0' 105 | { 118, 7, 11, 11, 2, -10 }, // 0x31 '1' 106 | { 128, 8, 12, 11, 1, -11 }, // 0x32 '2' 107 | { 140, 8, 12, 11, 2, -11 }, // 0x33 '3' 108 | { 152, 7, 10, 11, 2, -9 }, // 0x34 '4' 109 | { 161, 9, 11, 11, 1, -10 }, // 0x35 '5' 110 | { 174, 8, 12, 11, 2, -11 }, // 0x36 '6' 111 | { 186, 8, 11, 11, 1, -10 }, // 0x37 '7' 112 | { 197, 7, 12, 11, 2, -11 }, // 0x38 '8' 113 | { 208, 8, 12, 11, 2, -11 }, // 0x39 '9' 114 | { 220, 2, 8, 11, 4, -7 }, // 0x3A ':' 115 | { 222, 3, 11, 11, 3, -7 }, // 0x3B ';' 116 | { 227, 9, 8, 11, 1, -8 }, // 0x3C '<' 117 | { 236, 9, 6, 11, 1, -7 }, // 0x3D '=' 118 | { 243, 9, 8, 11, 1, -8 }, // 0x3E '>' 119 | { 252, 8, 11, 11, 2, -10 }, // 0x3F '?' 120 | { 263, 9, 15, 11, 1, -11 }, // 0x40 '@' 121 | { 280, 11, 11, 11, 0, -10 }, // 0x41 'A' 122 | { 296, 10, 11, 11, 1, -10 }, // 0x42 'B' 123 | { 310, 9, 11, 11, 1, -10 }, // 0x43 'C' 124 | { 323, 10, 11, 11, 0, -10 }, // 0x44 'D' 125 | { 337, 9, 11, 11, 1, -10 }, // 0x45 'E' 126 | { 350, 9, 11, 11, 1, -10 }, // 0x46 'F' 127 | { 363, 10, 11, 11, 1, -10 }, // 0x47 'G' 128 | { 377, 9, 11, 11, 1, -10 }, // 0x48 'H' 129 | { 390, 6, 11, 11, 3, -10 }, // 0x49 'I' 130 | { 399, 10, 11, 11, 1, -10 }, // 0x4A 'J' 131 | { 413, 10, 11, 11, 1, -10 }, // 0x4B 'K' 132 | { 427, 9, 11, 11, 1, -10 }, // 0x4C 'L' 133 | { 440, 11, 11, 11, 0, -10 }, // 0x4D 'M' 134 | { 456, 11, 11, 11, 0, -10 }, // 0x4E 'N' 135 | { 472, 11, 11, 11, 0, -10 }, // 0x4F 'O' 136 | { 488, 9, 11, 11, 1, -10 }, // 0x50 'P' 137 | { 501, 11, 14, 11, 0, -10 }, // 0x51 'Q' 138 | { 521, 9, 11, 11, 1, -10 }, // 0x52 'R' 139 | { 534, 9, 11, 11, 1, -10 }, // 0x53 'S' 140 | { 547, 9, 11, 11, 1, -10 }, // 0x54 'T' 141 | { 560, 11, 11, 11, 0, -10 }, // 0x55 'U' 142 | { 576, 11, 11, 11, 0, -10 }, // 0x56 'V' 143 | { 592, 10, 11, 11, 0, -10 }, // 0x57 'W' 144 | { 606, 10, 11, 11, 0, -10 }, // 0x58 'X' 145 | { 620, 10, 11, 11, 0, -10 }, // 0x59 'Y' 146 | { 634, 8, 11, 11, 2, -10 }, // 0x5A 'Z' 147 | { 645, 4, 14, 11, 5, -10 }, // 0x5B '[' 148 | { 652, 7, 15, 11, 2, -12 }, // 0x5C '\' 149 | { 666, 4, 14, 11, 2, -10 }, // 0x5D ']' 150 | { 673, 7, 6, 11, 2, -11 }, // 0x5E '^' 151 | { 679, 11, 2, 11, 0, 3 }, // 0x5F '_' 152 | { 682, 3, 3, 11, 3, -11 }, // 0x60 '`' 153 | { 684, 9, 8, 11, 1, -7 }, // 0x61 'a' 154 | { 693, 10, 11, 11, 0, -10 }, // 0x62 'b' 155 | { 707, 9, 8, 11, 1, -7 }, // 0x63 'c' 156 | { 716, 10, 11, 11, 1, -10 }, // 0x64 'd' 157 | { 730, 9, 8, 11, 1, -7 }, // 0x65 'e' 158 | { 739, 8, 11, 11, 2, -10 }, // 0x66 'f' 159 | { 750, 9, 12, 11, 1, -7 }, // 0x67 'g' 160 | { 764, 9, 11, 11, 1, -10 }, // 0x68 'h' 161 | { 777, 8, 11, 11, 2, -10 }, // 0x69 'i' 162 | { 788, 6, 15, 11, 2, -10 }, // 0x6A 'j' 163 | { 800, 9, 11, 11, 1, -10 }, // 0x6B 'k' 164 | { 813, 8, 11, 11, 2, -10 }, // 0x6C 'l' 165 | { 824, 11, 8, 11, 0, -7 }, // 0x6D 'm' 166 | { 835, 9, 8, 11, 1, -7 }, // 0x6E 'n' 167 | { 844, 9, 8, 11, 1, -7 }, // 0x6F 'o' 168 | { 853, 11, 12, 11, 0, -7 }, // 0x70 'p' 169 | { 870, 11, 12, 11, 0, -7 }, // 0x71 'q' 170 | { 887, 9, 8, 11, 1, -7 }, // 0x72 'r' 171 | { 896, 8, 8, 11, 2, -7 }, // 0x73 's' 172 | { 904, 8, 11, 11, 1, -10 }, // 0x74 't' 173 | { 915, 9, 8, 11, 1, -7 }, // 0x75 'u' 174 | { 924, 11, 8, 11, 0, -7 }, // 0x76 'v' 175 | { 935, 11, 8, 11, 0, -7 }, // 0x77 'w' 176 | { 946, 9, 8, 11, 1, -7 }, // 0x78 'x' 177 | { 955, 10, 12, 11, 0, -7 }, // 0x79 'y' 178 | { 970, 7, 8, 11, 2, -7 }, // 0x7A 'z' 179 | { 977, 4, 14, 11, 3, -10 }, // 0x7B '{' 180 | { 984, 2, 14, 11, 5, -10 }, // 0x7C '|' 181 | { 988, 4, 14, 11, 4, -10 }, // 0x7D '}' 182 | { 995, 9, 4, 11, 1, -6 } }; // 0x7E '~' 183 | 184 | const GFXfont FreeMonoBold9pt7b PROGMEM = { 185 | (uint8_t *)FreeMonoBold9pt7bBitmaps, 186 | (GFXglyph *)FreeMonoBold9pt7bGlyphs, 187 | 0x20, 0x7E, 18 }; 188 | 189 | // Approx. 1672 bytes 190 | -------------------------------------------------------------------------------- /PDQ_GFX/Fonts/FreeMonoOblique9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeMonoOblique9pt7bBitmaps[] PROGMEM = { 2 | 0x11, 0x22, 0x24, 0x40, 0x00, 0xC0, 0xDE, 0xE5, 0x29, 0x00, 0x09, 0x05, 3 | 0x02, 0x82, 0x47, 0xF8, 0xA0, 0x51, 0xFE, 0x28, 0x14, 0x0A, 0x09, 0x00, 4 | 0x08, 0x1D, 0x23, 0x40, 0x70, 0x1C, 0x02, 0x82, 0x84, 0x78, 0x20, 0x20, 5 | 0x1C, 0x11, 0x08, 0x83, 0x80, 0x18, 0x71, 0xC0, 0x1C, 0x11, 0x08, 0x83, 6 | 0x80, 0x1E, 0x60, 0x81, 0x03, 0x0A, 0x65, 0x46, 0x88, 0xE8, 0xFA, 0x80, 7 | 0x12, 0x24, 0x48, 0x88, 0x88, 0x88, 0x80, 0x01, 0x11, 0x11, 0x11, 0x22, 8 | 0x44, 0x80, 0x10, 0x22, 0x5B, 0xC3, 0x0A, 0x22, 0x00, 0x04, 0x02, 0x02, 9 | 0x1F, 0xF0, 0x80, 0x40, 0x20, 0x00, 0x36, 0x4C, 0x80, 0xFF, 0x80, 0xF0, 10 | 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 11 | 0x08, 0x08, 0x00, 0x1C, 0x45, 0x0A, 0x18, 0x30, 0x61, 0x42, 0x85, 0x11, 12 | 0xC0, 0x04, 0x38, 0x90, 0x20, 0x81, 0x02, 0x04, 0x08, 0x23, 0xF8, 0x07, 13 | 0x04, 0xC4, 0x20, 0x10, 0x10, 0x30, 0x20, 0x20, 0x60, 0x40, 0x3F, 0x80, 14 | 0x0F, 0x00, 0x40, 0x20, 0x20, 0x60, 0x18, 0x04, 0x02, 0x01, 0x43, 0x1E, 15 | 0x00, 0x03, 0x05, 0x0A, 0x12, 0x22, 0x22, 0x42, 0x7F, 0x04, 0x04, 0x1E, 16 | 0x1F, 0x88, 0x08, 0x05, 0xC3, 0x30, 0x08, 0x04, 0x02, 0x02, 0x42, 0x1E, 17 | 0x00, 0x07, 0x18, 0x20, 0x40, 0x5C, 0xA6, 0xC2, 0x82, 0x82, 0xC4, 0x78, 18 | 0xFF, 0x04, 0x10, 0x20, 0x82, 0x04, 0x10, 0x20, 0x81, 0x00, 0x1E, 0x23, 19 | 0x41, 0x41, 0x62, 0x1C, 0x66, 0x82, 0x82, 0x84, 0x78, 0x1E, 0x23, 0x41, 20 | 0x41, 0x43, 0x65, 0x3A, 0x02, 0x04, 0x18, 0xE0, 0x6C, 0x00, 0x36, 0x18, 21 | 0xC0, 0x00, 0x19, 0x8C, 0xC4, 0x00, 0x01, 0x83, 0x06, 0x0C, 0x06, 0x00, 22 | 0x80, 0x30, 0x04, 0xFF, 0x80, 0x00, 0x1F, 0xF0, 0x20, 0x0C, 0x01, 0x00, 23 | 0x60, 0x20, 0x60, 0xC1, 0x80, 0x3D, 0x8E, 0x08, 0x10, 0xC6, 0x08, 0x00, 24 | 0x01, 0x80, 0x1C, 0x45, 0x0A, 0x79, 0x34, 0x69, 0x4E, 0x81, 0x03, 0x03, 25 | 0xC0, 0x0F, 0x00, 0x60, 0x12, 0x02, 0x40, 0x88, 0x21, 0x07, 0xE1, 0x04, 26 | 0x20, 0x5E, 0x3C, 0x3F, 0x84, 0x11, 0x04, 0x82, 0x3F, 0x88, 0x32, 0x04, 27 | 0x81, 0x60, 0xBF, 0xC0, 0x1E, 0x98, 0xD0, 0x28, 0x08, 0x04, 0x02, 0x01, 28 | 0x00, 0x41, 0x1F, 0x00, 0x3F, 0x0C, 0x22, 0x04, 0x81, 0x20, 0x48, 0x12, 29 | 0x09, 0x02, 0x43, 0x3F, 0x00, 0x3F, 0xC4, 0x11, 0x00, 0x88, 0x3E, 0x08, 30 | 0x82, 0x00, 0x82, 0x60, 0xBF, 0xE0, 0x3F, 0xE2, 0x08, 0x40, 0x11, 0x03, 31 | 0xE0, 0x44, 0x08, 0x01, 0x00, 0x60, 0x1F, 0x00, 0x1E, 0x98, 0xD0, 0x08, 32 | 0x08, 0x04, 0x7A, 0x05, 0x02, 0x41, 0x1F, 0x00, 0x3D, 0xE2, 0x18, 0x42, 33 | 0x08, 0x43, 0xF8, 0x41, 0x08, 0x21, 0x08, 0x21, 0x1E, 0xF0, 0x3F, 0x82, 34 | 0x02, 0x01, 0x00, 0x80, 0x40, 0x20, 0x20, 0x10, 0x7F, 0x00, 0x0F, 0xE0, 35 | 0x20, 0x04, 0x00, 0x80, 0x10, 0x02, 0x20, 0x84, 0x10, 0x84, 0x0F, 0x00, 36 | 0x3C, 0xE2, 0x10, 0x44, 0x11, 0x02, 0xC0, 0x64, 0x08, 0x81, 0x08, 0x61, 37 | 0x1E, 0x38, 0x3E, 0x02, 0x00, 0x80, 0x20, 0x10, 0x04, 0x01, 0x04, 0x42, 38 | 0x10, 0xBF, 0xE0, 0x38, 0x38, 0xC3, 0x05, 0x28, 0x29, 0x42, 0x52, 0x13, 39 | 0x10, 0x99, 0x84, 0x08, 0x20, 0x47, 0x8F, 0x00, 0x70, 0xE6, 0x08, 0xA1, 40 | 0x14, 0x22, 0x48, 0x49, 0x11, 0x22, 0x14, 0x43, 0x1E, 0x20, 0x1E, 0x18, 41 | 0x90, 0x28, 0x18, 0x0C, 0x06, 0x05, 0x02, 0x46, 0x1E, 0x00, 0x3F, 0x84, 42 | 0x31, 0x04, 0x81, 0x20, 0x8F, 0xC2, 0x00, 0x80, 0x60, 0x3E, 0x00, 0x1E, 43 | 0x18, 0x90, 0x28, 0x18, 0x0C, 0x06, 0x05, 0x02, 0x46, 0x1E, 0x08, 0x0F, 44 | 0x44, 0x60, 0x3F, 0x84, 0x31, 0x04, 0x81, 0x20, 0x8F, 0xC2, 0x10, 0x84, 45 | 0x60, 0xBC, 0x10, 0x0F, 0x88, 0xC8, 0x24, 0x01, 0x80, 0x38, 0x05, 0x02, 46 | 0xC2, 0x5E, 0x00, 0xFF, 0xC4, 0x44, 0x02, 0x01, 0x00, 0x80, 0x40, 0x60, 47 | 0x20, 0x7E, 0x00, 0xF1, 0xD0, 0x24, 0x09, 0x02, 0x41, 0xA0, 0x48, 0x12, 48 | 0x04, 0xC6, 0x1F, 0x00, 0xF1, 0xE8, 0x11, 0x02, 0x20, 0x82, 0x20, 0x44, 49 | 0x09, 0x01, 0x40, 0x28, 0x02, 0x00, 0xF1, 0xE8, 0x09, 0x12, 0x26, 0x45, 50 | 0x48, 0xAA, 0x29, 0x45, 0x28, 0xC6, 0x18, 0xC0, 0x38, 0xE2, 0x08, 0x26, 51 | 0x05, 0x00, 0x40, 0x18, 0x04, 0x81, 0x08, 0x41, 0x1C, 0x70, 0xE3, 0xA0, 52 | 0x90, 0x84, 0x81, 0x80, 0x80, 0x40, 0x20, 0x20, 0x7E, 0x00, 0x3F, 0x90, 53 | 0x88, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, 0x82, 0x7F, 0x00, 0x39, 0x08, 54 | 0x44, 0x21, 0x08, 0x42, 0x21, 0x0E, 0x00, 0x88, 0x44, 0x44, 0x22, 0x22, 55 | 0x11, 0x11, 0x38, 0x42, 0x11, 0x08, 0x42, 0x10, 0x84, 0x2E, 0x00, 0x08, 56 | 0x28, 0x92, 0x18, 0x20, 0xFF, 0xC0, 0xA4, 0x3E, 0x00, 0x80, 0x47, 0xA4, 57 | 0x34, 0x12, 0x18, 0xF7, 0x38, 0x01, 0x00, 0x40, 0x09, 0xE1, 0xC6, 0x20, 58 | 0x44, 0x09, 0x01, 0x30, 0x46, 0x13, 0xBC, 0x00, 0x1F, 0x48, 0x74, 0x0A, 59 | 0x00, 0x80, 0x20, 0x0C, 0x18, 0xF8, 0x01, 0x80, 0x40, 0x23, 0x96, 0x32, 60 | 0x0A, 0x05, 0x02, 0x81, 0x61, 0x1F, 0xE0, 0x1F, 0x30, 0xD0, 0x3F, 0xF8, 61 | 0x04, 0x01, 0x00, 0x7C, 0x07, 0xC3, 0x00, 0x80, 0xFE, 0x10, 0x04, 0x01, 62 | 0x00, 0x40, 0x10, 0x08, 0x0F, 0xE0, 0x1D, 0xD8, 0xC4, 0x12, 0x04, 0x82, 63 | 0x20, 0x8C, 0x61, 0xE8, 0x02, 0x01, 0x07, 0x80, 0x30, 0x04, 0x01, 0x00, 64 | 0x5C, 0x38, 0x88, 0x22, 0x08, 0x82, 0x21, 0x18, 0x4F, 0x3C, 0x04, 0x04, 65 | 0x00, 0x38, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0xFF, 0x01, 0x00, 0x80, 66 | 0x03, 0xF0, 0x10, 0x08, 0x04, 0x02, 0x02, 0x01, 0x00, 0x80, 0x40, 0x47, 67 | 0xC0, 0x38, 0x08, 0x04, 0x02, 0x71, 0x20, 0xA0, 0xA0, 0x68, 0x24, 0x11, 68 | 0x38, 0xE0, 0x3C, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 69 | 0xFF, 0x3E, 0xE2, 0x64, 0x88, 0x91, 0x12, 0x24, 0x48, 0x91, 0x17, 0x33, 70 | 0x37, 0x14, 0x4C, 0x24, 0x12, 0x09, 0x08, 0x85, 0xE3, 0x1E, 0x10, 0x90, 71 | 0x30, 0x18, 0x0C, 0x0B, 0x08, 0x78, 0x33, 0xC3, 0x8C, 0x40, 0x88, 0x12, 72 | 0x02, 0x60, 0x8C, 0x31, 0x78, 0x20, 0x08, 0x03, 0xE0, 0x00, 0x1C, 0xD8, 73 | 0xC4, 0x12, 0x04, 0x81, 0x20, 0x4C, 0x21, 0xF8, 0x02, 0x00, 0x81, 0xF0, 74 | 0x73, 0x8E, 0x04, 0x04, 0x02, 0x01, 0x00, 0x81, 0xFC, 0x1F, 0x61, 0x40, 75 | 0x3C, 0x03, 0x81, 0x82, 0xFC, 0x10, 0x63, 0xF9, 0x02, 0x04, 0x10, 0x20, 76 | 0x40, 0x7C, 0xE3, 0x10, 0x90, 0x48, 0x24, 0x22, 0x11, 0x18, 0xF6, 0xF3, 77 | 0xD0, 0x44, 0x10, 0x88, 0x24, 0x09, 0x02, 0x80, 0x40, 0xE1, 0xD0, 0x24, 78 | 0x91, 0x24, 0x55, 0x19, 0x86, 0x61, 0x10, 0x39, 0xC4, 0x20, 0xB0, 0x30, 79 | 0x0C, 0x04, 0x86, 0x13, 0x8E, 0x3C, 0x71, 0x04, 0x10, 0x40, 0x88, 0x09, 80 | 0x00, 0xA0, 0x06, 0x00, 0x40, 0x08, 0x01, 0x00, 0xFC, 0x00, 0x7F, 0x42, 81 | 0x04, 0x08, 0x10, 0x20, 0x42, 0xFE, 0x0C, 0x41, 0x04, 0x30, 0x8C, 0x08, 82 | 0x21, 0x04, 0x10, 0x60, 0x24, 0x94, 0x92, 0x52, 0x40, 0x18, 0x20, 0x82, 83 | 0x10, 0x40, 0xC4, 0x10, 0x82, 0x08, 0xC0, 0x61, 0x24, 0x30 }; 84 | 85 | const GFXglyph FreeMonoOblique9pt7bGlyphs[] PROGMEM = { 86 | { 0, 0, 0, 11, 0, 1 }, // 0x20 ' ' 87 | { 0, 4, 11, 11, 4, -10 }, // 0x21 '!' 88 | { 6, 5, 5, 11, 4, -10 }, // 0x22 '"' 89 | { 10, 9, 12, 11, 2, -10 }, // 0x23 '#' 90 | { 24, 8, 12, 11, 3, -10 }, // 0x24 '$' 91 | { 36, 9, 11, 11, 2, -10 }, // 0x25 '%' 92 | { 49, 7, 10, 11, 2, -9 }, // 0x26 '&' 93 | { 58, 2, 5, 11, 6, -10 }, // 0x27 ''' 94 | { 60, 4, 13, 11, 6, -10 }, // 0x28 '(' 95 | { 67, 4, 13, 11, 3, -10 }, // 0x29 ')' 96 | { 74, 7, 7, 11, 4, -10 }, // 0x2A '*' 97 | { 81, 9, 8, 11, 2, -8 }, // 0x2B '+' 98 | { 90, 4, 5, 11, 2, -1 }, // 0x2C ',' 99 | { 93, 9, 1, 11, 2, -5 }, // 0x2D '-' 100 | { 95, 2, 2, 11, 4, -1 }, // 0x2E '.' 101 | { 96, 9, 13, 11, 2, -11 }, // 0x2F '/' 102 | { 111, 7, 11, 11, 3, -10 }, // 0x30 '0' 103 | { 121, 7, 11, 11, 2, -10 }, // 0x31 '1' 104 | { 131, 9, 11, 11, 2, -10 }, // 0x32 '2' 105 | { 144, 9, 11, 11, 2, -10 }, // 0x33 '3' 106 | { 157, 8, 11, 11, 2, -10 }, // 0x34 '4' 107 | { 168, 9, 11, 11, 2, -10 }, // 0x35 '5' 108 | { 181, 8, 11, 11, 3, -10 }, // 0x36 '6' 109 | { 192, 7, 11, 11, 4, -10 }, // 0x37 '7' 110 | { 202, 8, 11, 11, 3, -10 }, // 0x38 '8' 111 | { 213, 8, 11, 11, 3, -10 }, // 0x39 '9' 112 | { 224, 3, 8, 11, 4, -7 }, // 0x3A ':' 113 | { 227, 5, 11, 11, 2, -7 }, // 0x3B ';' 114 | { 234, 9, 8, 11, 2, -8 }, // 0x3C '<' 115 | { 243, 9, 4, 11, 2, -6 }, // 0x3D '=' 116 | { 248, 9, 8, 11, 2, -8 }, // 0x3E '>' 117 | { 257, 7, 10, 11, 4, -9 }, // 0x3F '?' 118 | { 266, 7, 12, 11, 3, -10 }, // 0x40 '@' 119 | { 277, 11, 10, 11, 0, -9 }, // 0x41 'A' 120 | { 291, 10, 10, 11, 1, -9 }, // 0x42 'B' 121 | { 304, 9, 10, 11, 2, -9 }, // 0x43 'C' 122 | { 316, 10, 10, 11, 1, -9 }, // 0x44 'D' 123 | { 329, 10, 10, 11, 1, -9 }, // 0x45 'E' 124 | { 342, 11, 10, 11, 1, -9 }, // 0x46 'F' 125 | { 356, 9, 10, 11, 2, -9 }, // 0x47 'G' 126 | { 368, 11, 10, 11, 1, -9 }, // 0x48 'H' 127 | { 382, 9, 10, 11, 2, -9 }, // 0x49 'I' 128 | { 394, 11, 10, 11, 2, -9 }, // 0x4A 'J' 129 | { 408, 11, 10, 11, 1, -9 }, // 0x4B 'K' 130 | { 422, 10, 10, 11, 1, -9 }, // 0x4C 'L' 131 | { 435, 13, 10, 11, 0, -9 }, // 0x4D 'M' 132 | { 452, 11, 10, 11, 1, -9 }, // 0x4E 'N' 133 | { 466, 9, 10, 11, 2, -9 }, // 0x4F 'O' 134 | { 478, 10, 10, 11, 1, -9 }, // 0x50 'P' 135 | { 491, 9, 13, 11, 2, -9 }, // 0x51 'Q' 136 | { 506, 10, 10, 11, 1, -9 }, // 0x52 'R' 137 | { 519, 9, 10, 11, 2, -9 }, // 0x53 'S' 138 | { 531, 9, 10, 11, 3, -9 }, // 0x54 'T' 139 | { 543, 10, 10, 11, 2, -9 }, // 0x55 'U' 140 | { 556, 11, 10, 11, 2, -9 }, // 0x56 'V' 141 | { 570, 11, 10, 11, 2, -9 }, // 0x57 'W' 142 | { 584, 11, 10, 11, 1, -9 }, // 0x58 'X' 143 | { 598, 9, 10, 11, 3, -9 }, // 0x59 'Y' 144 | { 610, 9, 10, 11, 2, -9 }, // 0x5A 'Z' 145 | { 622, 5, 13, 11, 5, -10 }, // 0x5B '[' 146 | { 631, 4, 14, 11, 4, -11 }, // 0x5C '\' 147 | { 638, 5, 13, 11, 2, -10 }, // 0x5D ']' 148 | { 647, 7, 5, 11, 3, -10 }, // 0x5E '^' 149 | { 652, 11, 1, 11, 0, 2 }, // 0x5F '_' 150 | { 654, 2, 3, 11, 5, -11 }, // 0x60 '`' 151 | { 655, 9, 8, 11, 2, -7 }, // 0x61 'a' 152 | { 664, 11, 11, 11, 0, -10 }, // 0x62 'b' 153 | { 680, 10, 8, 11, 2, -7 }, // 0x63 'c' 154 | { 690, 9, 11, 11, 2, -10 }, // 0x64 'd' 155 | { 703, 9, 8, 11, 2, -7 }, // 0x65 'e' 156 | { 712, 10, 11, 11, 2, -10 }, // 0x66 'f' 157 | { 726, 10, 11, 11, 2, -7 }, // 0x67 'g' 158 | { 740, 10, 11, 11, 1, -10 }, // 0x68 'h' 159 | { 754, 8, 11, 11, 2, -10 }, // 0x69 'i' 160 | { 765, 9, 14, 11, 1, -10 }, // 0x6A 'j' 161 | { 781, 9, 11, 11, 1, -10 }, // 0x6B 'k' 162 | { 794, 8, 11, 11, 2, -10 }, // 0x6C 'l' 163 | { 805, 11, 8, 11, 0, -7 }, // 0x6D 'm' 164 | { 816, 9, 8, 11, 1, -7 }, // 0x6E 'n' 165 | { 825, 9, 8, 11, 2, -7 }, // 0x6F 'o' 166 | { 834, 11, 11, 11, 0, -7 }, // 0x70 'p' 167 | { 850, 10, 11, 11, 2, -7 }, // 0x71 'q' 168 | { 864, 9, 8, 11, 2, -7 }, // 0x72 'r' 169 | { 873, 8, 8, 11, 2, -7 }, // 0x73 's' 170 | { 881, 7, 10, 11, 2, -9 }, // 0x74 't' 171 | { 890, 9, 8, 11, 2, -7 }, // 0x75 'u' 172 | { 899, 10, 8, 11, 2, -7 }, // 0x76 'v' 173 | { 909, 10, 8, 11, 2, -7 }, // 0x77 'w' 174 | { 919, 10, 8, 11, 1, -7 }, // 0x78 'x' 175 | { 929, 12, 11, 11, 0, -7 }, // 0x79 'y' 176 | { 946, 8, 8, 11, 2, -7 }, // 0x7A 'z' 177 | { 954, 6, 13, 11, 4, -10 }, // 0x7B '{' 178 | { 964, 3, 12, 11, 5, -9 }, // 0x7C '|' 179 | { 969, 6, 13, 11, 3, -10 }, // 0x7D '}' 180 | { 979, 7, 3, 11, 3, -6 } }; // 0x7E '~' 181 | 182 | const GFXfont FreeMonoOblique9pt7b PROGMEM = { 183 | (uint8_t *)FreeMonoOblique9pt7bBitmaps, 184 | (GFXglyph *)FreeMonoOblique9pt7bGlyphs, 185 | 0x20, 0x7E, 18 }; 186 | 187 | // Approx. 1654 bytes 188 | -------------------------------------------------------------------------------- /PDQ_GFX/Fonts/FreeSans9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeSans9pt7bBitmaps[] PROGMEM = { 2 | 0xFF, 0xFF, 0xF8, 0xC0, 0xDE, 0xF7, 0x20, 0x09, 0x86, 0x41, 0x91, 0xFF, 3 | 0x13, 0x04, 0xC3, 0x20, 0xC8, 0xFF, 0x89, 0x82, 0x61, 0x90, 0x10, 0x1F, 4 | 0x14, 0xDA, 0x3D, 0x1E, 0x83, 0x40, 0x78, 0x17, 0x08, 0xF4, 0x7A, 0x35, 5 | 0x33, 0xF0, 0x40, 0x20, 0x38, 0x10, 0xEC, 0x20, 0xC6, 0x20, 0xC6, 0x40, 6 | 0xC6, 0x40, 0x6C, 0x80, 0x39, 0x00, 0x01, 0x3C, 0x02, 0x77, 0x02, 0x63, 7 | 0x04, 0x63, 0x04, 0x77, 0x08, 0x3C, 0x0E, 0x06, 0x60, 0xCC, 0x19, 0x81, 8 | 0xE0, 0x18, 0x0F, 0x03, 0x36, 0xC2, 0xD8, 0x73, 0x06, 0x31, 0xE3, 0xC4, 9 | 0xFE, 0x13, 0x26, 0x6C, 0xCC, 0xCC, 0xC4, 0x66, 0x23, 0x10, 0x8C, 0x46, 10 | 0x63, 0x33, 0x33, 0x32, 0x66, 0x4C, 0x80, 0x25, 0x7E, 0xA5, 0x00, 0x30, 11 | 0xC3, 0x3F, 0x30, 0xC3, 0x0C, 0xD6, 0xF0, 0xC0, 0x08, 0x44, 0x21, 0x10, 12 | 0x84, 0x42, 0x11, 0x08, 0x00, 0x3C, 0x66, 0x42, 0xC3, 0xC3, 0xC3, 0xC3, 13 | 0xC3, 0xC3, 0xC3, 0x42, 0x66, 0x3C, 0x11, 0x3F, 0x33, 0x33, 0x33, 0x33, 14 | 0x30, 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 15 | 0x10, 0x08, 0x07, 0xF8, 0x3C, 0x66, 0xC3, 0xC3, 0x03, 0x06, 0x1C, 0x07, 16 | 0x03, 0xC3, 0xC3, 0x66, 0x3C, 0x0C, 0x18, 0x71, 0x62, 0xC9, 0xA3, 0x46, 17 | 0xFE, 0x18, 0x30, 0x60, 0xC0, 0x7F, 0x20, 0x10, 0x08, 0x08, 0x07, 0xF3, 18 | 0x8C, 0x03, 0x01, 0x80, 0xF0, 0x6C, 0x63, 0xE0, 0x1E, 0x31, 0x98, 0x78, 19 | 0x0C, 0x06, 0xF3, 0x8D, 0x83, 0xC1, 0xE0, 0xD0, 0x6C, 0x63, 0xE0, 0xFF, 20 | 0x03, 0x02, 0x06, 0x04, 0x0C, 0x08, 0x18, 0x18, 0x18, 0x10, 0x30, 0x30, 21 | 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1B, 0x18, 0xF8, 0xC6, 0xC1, 0xE0, 0xF0, 22 | 0x6C, 0x63, 0xE0, 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 23 | 0x03, 0xC2, 0x66, 0x3C, 0xC0, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x64, 0xA0, 24 | 0x00, 0x81, 0xC7, 0x8E, 0x0C, 0x07, 0x80, 0x70, 0x0E, 0x01, 0x80, 0xFF, 25 | 0x80, 0x00, 0x1F, 0xF0, 0x00, 0x70, 0x0E, 0x01, 0xC0, 0x18, 0x38, 0x71, 26 | 0xC0, 0x80, 0x00, 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x18, 0x38, 0x18, 27 | 0x18, 0x0C, 0x00, 0x00, 0x01, 0x80, 0x03, 0xF0, 0x06, 0x0E, 0x06, 0x01, 28 | 0x86, 0x00, 0x66, 0x1D, 0xBB, 0x31, 0xCF, 0x18, 0xC7, 0x98, 0x63, 0xCC, 29 | 0x31, 0xE6, 0x11, 0xB3, 0x99, 0xCC, 0xF7, 0x86, 0x00, 0x01, 0x80, 0x00, 30 | 0x70, 0x40, 0x0F, 0xE0, 0x06, 0x00, 0xF0, 0x0F, 0x00, 0x90, 0x19, 0x81, 31 | 0x98, 0x10, 0x83, 0x0C, 0x3F, 0xC2, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30, 32 | 0xFF, 0x18, 0x33, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x3F, 0xC6, 0x06, 0xC0, 33 | 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8, 0x1F, 0x86, 0x19, 0x81, 0xA0, 0x3C, 34 | 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0, 35 | 0xFF, 0x18, 0x33, 0x03, 0x60, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 36 | 0x78, 0x0F, 0x03, 0x60, 0xCF, 0xF0, 0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0, 0xF8, 51 | 0x00, 0xFF, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x6F, 0xF3, 0x00, 0xC0, 52 | 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00, 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 53 | 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x6C, 54 | 0x60, 0xC0, 0xFB, 0x00, 0x08, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 55 | 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 56 | 0x70, 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 57 | 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00, 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 58 | 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0xC0, 0x78, 0x0F, 59 | 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 60 | 0xB0, 0x61, 0xF0, 0xC0, 0x6C, 0x0D, 0x81, 0x10, 0x63, 0x0C, 0x61, 0x04, 61 | 0x60, 0xCC, 0x19, 0x01, 0x60, 0x3C, 0x07, 0x00, 0x60, 0xC1, 0x81, 0x30, 62 | 0xE1, 0x98, 0x70, 0xCC, 0x28, 0x66, 0x26, 0x21, 0x13, 0x30, 0xC8, 0x98, 63 | 0x6C, 0x4C, 0x14, 0x34, 0x0A, 0x1A, 0x07, 0x07, 0x03, 0x03, 0x80, 0x81, 64 | 0x80, 0x60, 0x63, 0x0C, 0x30, 0xC1, 0x98, 0x0F, 0x00, 0xE0, 0x06, 0x00, 65 | 0xF0, 0x19, 0x01, 0x98, 0x30, 0xC6, 0x0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0x1C, 0x0C, 0x06, 0x03, 0x01, 0x03, 0x00, 0xFE, 95 | 0x0C, 0x30, 0xC1, 0x86, 0x18, 0x20, 0xC1, 0xFC, 0x36, 0x66, 0x66, 0x6E, 96 | 0xCE, 0x66, 0x66, 0x66, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xC6, 0x66, 97 | 0x66, 0x67, 0x37, 0x66, 0x66, 0x66, 0xC0, 0x61, 0x24, 0x38 }; 98 | 99 | const GFXglyph FreeSans9pt7bGlyphs[] PROGMEM = { 100 | { 0, 0, 0, 5, 0, 1 }, // 0x20 ' ' 101 | { 0, 2, 13, 6, 2, -12 }, // 0x21 '!' 102 | { 4, 5, 4, 6, 1, -12 }, // 0x22 '"' 103 | { 7, 10, 12, 10, 0, -11 }, // 0x23 '#' 104 | { 22, 9, 16, 10, 1, -13 }, // 0x24 '$' 105 | { 40, 16, 13, 16, 1, -12 }, // 0x25 '%' 106 | { 66, 11, 13, 12, 1, -12 }, // 0x26 '&' 107 | { 84, 2, 4, 4, 1, -12 }, // 0x27 ''' 108 | { 85, 4, 17, 6, 1, -12 }, // 0x28 '(' 109 | { 94, 4, 17, 6, 1, -12 }, // 0x29 ')' 110 | { 103, 5, 5, 7, 1, -12 }, // 0x2A '*' 111 | { 107, 6, 8, 11, 3, -7 }, // 0x2B '+' 112 | { 113, 2, 4, 5, 2, 0 }, // 0x2C ',' 113 | { 114, 4, 1, 6, 1, -4 }, // 0x2D '-' 114 | { 115, 2, 1, 5, 1, 0 }, // 0x2E '.' 115 | { 116, 5, 13, 5, 0, -12 }, // 0x2F '/' 116 | { 125, 8, 13, 10, 1, -12 }, // 0x30 '0' 117 | { 138, 4, 13, 10, 3, -12 }, // 0x31 '1' 118 | { 145, 9, 13, 10, 1, -12 }, // 0x32 '2' 119 | { 160, 8, 13, 10, 1, -12 }, // 0x33 '3' 120 | { 173, 7, 13, 10, 2, -12 }, // 0x34 '4' 121 | { 185, 9, 13, 10, 1, -12 }, // 0x35 '5' 122 | { 200, 9, 13, 10, 1, -12 }, // 0x36 '6' 123 | { 215, 8, 13, 10, 0, -12 }, // 0x37 '7' 124 | { 228, 9, 13, 10, 1, -12 }, // 0x38 '8' 125 | { 243, 8, 13, 10, 1, -12 }, // 0x39 '9' 126 | { 256, 2, 10, 5, 1, -9 }, // 0x3A ':' 127 | { 259, 3, 12, 5, 1, -8 }, // 0x3B ';' 128 | { 264, 9, 9, 11, 1, -8 }, // 0x3C '<' 129 | { 275, 9, 4, 11, 1, -5 }, // 0x3D '=' 130 | { 280, 9, 9, 11, 1, -8 }, // 0x3E '>' 131 | { 291, 9, 13, 10, 1, -12 }, // 0x3F '?' 132 | { 306, 17, 16, 18, 1, -12 }, // 0x40 '@' 133 | { 340, 12, 13, 12, 0, -12 }, // 0x41 'A' 134 | { 360, 11, 13, 12, 1, -12 }, // 0x42 'B' 135 | { 378, 11, 13, 13, 1, -12 }, // 0x43 'C' 136 | { 396, 11, 13, 13, 1, -12 }, // 0x44 'D' 137 | { 414, 9, 13, 11, 1, -12 }, // 0x45 'E' 138 | { 429, 8, 13, 11, 1, -12 }, // 0x46 'F' 139 | { 442, 12, 13, 14, 1, -12 }, // 0x47 'G' 140 | { 462, 11, 13, 13, 1, -12 }, // 0x48 'H' 141 | { 480, 2, 13, 5, 2, -12 }, // 0x49 'I' 142 | { 484, 7, 13, 10, 1, -12 }, // 0x4A 'J' 143 | { 496, 11, 13, 12, 1, -12 }, // 0x4B 'K' 144 | { 514, 8, 13, 10, 1, -12 }, // 0x4C 'L' 145 | { 527, 13, 13, 15, 1, -12 }, // 0x4D 'M' 146 | { 549, 11, 13, 13, 1, -12 }, // 0x4E 'N' 147 | { 567, 13, 13, 14, 1, -12 }, // 0x4F 'O' 148 | { 589, 10, 13, 12, 1, -12 }, // 0x50 'P' 149 | { 606, 13, 14, 14, 1, -12 }, // 0x51 'Q' 150 | { 629, 12, 13, 13, 1, -12 }, // 0x52 'R' 151 | { 649, 10, 13, 12, 1, -12 }, // 0x53 'S' 152 | { 666, 9, 13, 11, 1, -12 }, // 0x54 'T' 153 | { 681, 11, 13, 13, 1, -12 }, // 0x55 'U' 154 | { 699, 11, 13, 12, 0, -12 }, // 0x56 'V' 155 | { 717, 17, 13, 17, 0, -12 }, // 0x57 'W' 156 | { 745, 12, 13, 12, 0, -12 }, // 0x58 'X' 157 | { 765, 12, 13, 12, 0, -12 }, // 0x59 'Y' 158 | { 785, 10, 13, 11, 1, -12 }, // 0x5A 'Z' 159 | { 802, 3, 17, 5, 1, -12 }, // 0x5B '[' 160 | { 809, 5, 13, 5, 0, -12 }, // 0x5C '\' 161 | { 818, 3, 17, 5, 0, -12 }, // 0x5D ']' 162 | { 825, 7, 7, 8, 1, -12 }, // 0x5E '^' 163 | { 832, 10, 1, 10, 0, 3 }, // 0x5F '_' 164 | { 834, 4, 3, 5, 0, -12 }, // 0x60 '`' 165 | { 836, 9, 10, 10, 1, -9 }, // 0x61 'a' 166 | { 848, 9, 13, 10, 1, -12 }, // 0x62 'b' 167 | { 863, 8, 10, 9, 1, -9 }, // 0x63 'c' 168 | { 873, 8, 13, 10, 1, -12 }, // 0x64 'd' 169 | { 886, 8, 10, 10, 1, -9 }, // 0x65 'e' 170 | { 896, 4, 13, 5, 1, -12 }, // 0x66 'f' 171 | { 903, 8, 14, 10, 1, -9 }, // 0x67 'g' 172 | { 917, 8, 13, 10, 1, -12 }, // 0x68 'h' 173 | { 930, 2, 13, 4, 1, -12 }, // 0x69 'i' 174 | { 934, 4, 17, 4, 0, -12 }, // 0x6A 'j' 175 | { 943, 9, 13, 9, 1, -12 }, // 0x6B 'k' 176 | { 958, 2, 13, 4, 1, -12 }, // 0x6C 'l' 177 | { 962, 13, 10, 15, 1, -9 }, // 0x6D 'm' 178 | { 979, 8, 10, 10, 1, -9 }, // 0x6E 'n' 179 | { 989, 8, 10, 10, 1, -9 }, // 0x6F 'o' 180 | { 999, 9, 13, 10, 1, -9 }, // 0x70 'p' 181 | { 1014, 8, 13, 10, 1, -9 }, // 0x71 'q' 182 | { 1027, 5, 10, 6, 1, -9 }, // 0x72 'r' 183 | { 1034, 8, 10, 9, 1, -9 }, // 0x73 's' 184 | { 1044, 4, 12, 5, 1, -11 }, // 0x74 't' 185 | { 1050, 8, 10, 10, 1, -9 }, // 0x75 'u' 186 | { 1060, 9, 10, 9, 0, -9 }, // 0x76 'v' 187 | { 1072, 13, 10, 13, 0, -9 }, // 0x77 'w' 188 | { 1089, 8, 10, 9, 0, -9 }, // 0x78 'x' 189 | { 1099, 9, 14, 9, 0, -9 }, // 0x79 'y' 190 | { 1115, 7, 10, 9, 1, -9 }, // 0x7A 'z' 191 | { 1124, 4, 17, 6, 1, -12 }, // 0x7B '{' 192 | { 1133, 2, 17, 4, 2, -12 }, // 0x7C '|' 193 | { 1138, 4, 17, 6, 1, -12 }, // 0x7D '}' 194 | { 1147, 7, 3, 9, 1, -7 } }; // 0x7E '~' 195 | 196 | const GFXfont FreeSans9pt7b PROGMEM = { 197 | (uint8_t *)FreeSans9pt7bBitmaps, 198 | (GFXglyph *)FreeSans9pt7bGlyphs, 199 | 0x20, 0x7E, 22 }; 200 | 201 | // Approx. 1822 bytes 202 | -------------------------------------------------------------------------------- /PDQ_GFX/Fonts/FreeSerif9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeSerif9pt7bBitmaps[] PROGMEM = { 2 | 0xFF, 0xEA, 0x03, 0xDE, 0xF7, 0x20, 0x11, 0x09, 0x04, 0x82, 0x4F, 0xF9, 3 | 0x10, 0x89, 0xFF, 0x24, 0x12, 0x09, 0x0C, 0x80, 0x10, 0x7C, 0xD6, 0xD2, 4 | 0xD0, 0xF0, 0x38, 0x1E, 0x17, 0x93, 0x93, 0xD6, 0x7C, 0x10, 0x38, 0x43, 5 | 0x3C, 0x39, 0x21, 0x8A, 0x0C, 0x50, 0x65, 0x39, 0xCB, 0x20, 0xB9, 0x05, 6 | 0x88, 0x4C, 0x44, 0x64, 0x21, 0xC0, 0x0E, 0x00, 0xC8, 0x06, 0x40, 0x32, 7 | 0x01, 0xA0, 0x07, 0x78, 0x31, 0x87, 0x88, 0x46, 0x86, 0x34, 0x30, 0xC1, 8 | 0xC7, 0x17, 0xCF, 0x00, 0xFE, 0x08, 0x88, 0x84, 0x63, 0x18, 0xC6, 0x10, 9 | 0x82, 0x08, 0x20, 0x82, 0x08, 0x21, 0x0C, 0x63, 0x18, 0xC4, 0x22, 0x22, 10 | 0x00, 0x63, 0x9A, 0xDC, 0x72, 0xB6, 0x08, 0x08, 0x04, 0x02, 0x01, 0x0F, 11 | 0xF8, 0x40, 0x20, 0x10, 0x08, 0x00, 0xD8, 0xF0, 0xF0, 0x08, 0x84, 0x22, 12 | 0x10, 0x8C, 0x42, 0x31, 0x00, 0x1C, 0x31, 0x98, 0xD8, 0x3C, 0x1E, 0x0F, 13 | 0x07, 0x83, 0xC1, 0xE0, 0xD8, 0xC4, 0x61, 0xC0, 0x13, 0x8C, 0x63, 0x18, 14 | 0xC6, 0x31, 0x8C, 0x67, 0x80, 0x3C, 0x4E, 0x86, 0x06, 0x06, 0x04, 0x0C, 15 | 0x08, 0x10, 0x20, 0x41, 0xFE, 0x3C, 0xC6, 0x06, 0x04, 0x1C, 0x3E, 0x07, 16 | 0x03, 0x03, 0x03, 0x06, 0xF8, 0x04, 0x18, 0x71, 0x64, 0xC9, 0xA3, 0x46, 17 | 0xFE, 0x18, 0x30, 0x60, 0x0F, 0x10, 0x20, 0x3C, 0x0E, 0x07, 0x03, 0x03, 18 | 0x03, 0x02, 0x04, 0xF8, 0x07, 0x1C, 0x30, 0x60, 0x60, 0xDC, 0xE6, 0xC3, 19 | 0xC3, 0xC3, 0x43, 0x66, 0x3C, 0x7F, 0x82, 0x02, 0x02, 0x04, 0x04, 0x04, 20 | 0x08, 0x08, 0x08, 0x10, 0x10, 0x3C, 0x8F, 0x1E, 0x3E, 0x4F, 0x06, 0x36, 21 | 0xC7, 0x8F, 0x1B, 0x33, 0xC0, 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0xC3, 22 | 0x63, 0x3F, 0x06, 0x06, 0x0C, 0x38, 0x60, 0xF0, 0x0F, 0xD8, 0x00, 0x03, 23 | 0x28, 0x01, 0x87, 0x0E, 0x1C, 0x0C, 0x03, 0x80, 0x70, 0x0E, 0x00, 0x80, 24 | 0xFF, 0x80, 0x00, 0x00, 0x0F, 0xF8, 0x80, 0x1C, 0x01, 0xC0, 0x1C, 0x01, 25 | 0xC0, 0xE0, 0xE0, 0xE0, 0xC0, 0x00, 0x79, 0x1A, 0x18, 0x30, 0x60, 0x83, 26 | 0x04, 0x10, 0x20, 0x40, 0x03, 0x00, 0x0F, 0x83, 0x8C, 0x60, 0x26, 0x02, 27 | 0xC7, 0x9C, 0xC9, 0xD8, 0x9D, 0x99, 0xD9, 0x26, 0xEC, 0x60, 0x03, 0x04, 28 | 0x0F, 0x80, 0x02, 0x00, 0x10, 0x01, 0xC0, 0x16, 0x00, 0x98, 0x04, 0xC0, 29 | 0x43, 0x03, 0xF8, 0x20, 0x61, 0x03, 0x18, 0x1D, 0xE1, 0xF0, 0xFF, 0x86, 30 | 0x1C, 0xC1, 0x98, 0x33, 0x0C, 0x7E, 0x0C, 0x31, 0x83, 0x30, 0x66, 0x0C, 31 | 0xC3, 0x7F, 0xC0, 0x1F, 0x26, 0x1D, 0x81, 0xE0, 0x1C, 0x01, 0x80, 0x30, 32 | 0x06, 0x00, 0xC0, 0x0C, 0x00, 0xC1, 0x8F, 0xC0, 0xFF, 0x03, 0x1C, 0x30, 33 | 0x63, 0x07, 0x30, 0x33, 0x03, 0x30, 0x33, 0x03, 0x30, 0x33, 0x06, 0x30, 34 | 0xCF, 0xF0, 0xFF, 0x98, 0x26, 0x01, 0x80, 0x61, 0x1F, 0xC6, 0x11, 0x80, 35 | 0x60, 0x18, 0x16, 0x0F, 0xFE, 0xFF, 0xB0, 0x58, 0x0C, 0x06, 0x13, 0xF9, 36 | 0x84, 0xC0, 0x60, 0x30, 0x18, 0x1E, 0x00, 0x1F, 0x23, 0x0E, 0x60, 0x26, 37 | 0x00, 0xC0, 0x0C, 0x0F, 0xC0, 0x6C, 0x06, 0xC0, 0x66, 0x06, 0x30, 0x60, 38 | 0xF8, 0xF1, 0xEC, 0x19, 0x83, 0x30, 0x66, 0x0C, 0xFF, 0x98, 0x33, 0x06, 39 | 0x60, 0xCC, 0x19, 0x83, 0x78, 0xF0, 0xF6, 0x66, 0x66, 0x66, 0x66, 0x6F, 40 | 0x3C, 0x61, 0x86, 0x18, 0x61, 0x86, 0x18, 0x6D, 0xBC, 0xF3, 0xE6, 0x08, 41 | 0x61, 0x06, 0x20, 0x64, 0x07, 0x80, 0x6C, 0x06, 0x60, 0x63, 0x06, 0x18, 42 | 0x60, 0xCF, 0x3F, 0xF0, 0x18, 0x06, 0x01, 0x80, 0x60, 0x18, 0x06, 0x01, 43 | 0x80, 0x60, 0x18, 0x16, 0x0B, 0xFE, 0xF0, 0x0E, 0x70, 0x38, 0xE0, 0x71, 44 | 0xE1, 0x62, 0xC2, 0xC5, 0xC9, 0x89, 0x93, 0x13, 0x26, 0x23, 0x8C, 0x47, 45 | 0x18, 0x84, 0x33, 0x88, 0xF0, 0xE0, 0xEE, 0x09, 0xC1, 0x2C, 0x25, 0xC4, 46 | 0x9C, 0x91, 0x92, 0x1A, 0x41, 0xC8, 0x19, 0x03, 0x70, 0x20, 0x1F, 0x06, 47 | 0x31, 0x83, 0x20, 0x2C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x68, 0x09, 48 | 0x83, 0x18, 0xC1, 0xF0, 0xFE, 0x31, 0x98, 0x6C, 0x36, 0x1B, 0x19, 0xF8, 49 | 0xC0, 0x60, 0x30, 0x18, 0x1E, 0x00, 0x1F, 0x06, 0x31, 0x83, 0x20, 0x2C, 50 | 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x68, 0x19, 0x83, 0x18, 0xC0, 0xE0, 51 | 0x0E, 0x00, 0xE0, 0x07, 0xFE, 0x0C, 0x61, 0x86, 0x30, 0xC6, 0x18, 0xC6, 52 | 0x1F, 0x83, 0x70, 0x67, 0x0C, 0x71, 0x87, 0x78, 0x70, 0x1D, 0x31, 0x98, 53 | 0x4C, 0x07, 0x80, 0xE0, 0x1C, 0x07, 0x01, 0xA0, 0xD8, 0xCB, 0xC0, 0xFF, 54 | 0xF8, 0xCE, 0x18, 0x83, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 55 | 0xC0, 0x18, 0x07, 0x80, 0xF0, 0xEC, 0x09, 0x81, 0x30, 0x26, 0x04, 0xC0, 56 | 0x98, 0x13, 0x02, 0x60, 0x4C, 0x08, 0xC2, 0x0F, 0x80, 0xF8, 0x77, 0x02, 57 | 0x30, 0x23, 0x04, 0x18, 0x41, 0x84, 0x0C, 0x80, 0xC8, 0x07, 0x00, 0x70, 58 | 0x02, 0x00, 0x20, 0xFB, 0xE7, 0xB0, 0xC0, 0x8C, 0x20, 0x86, 0x18, 0x41, 59 | 0x8C, 0x40, 0xCB, 0x20, 0x65, 0x90, 0x1A, 0x70, 0x0E, 0x38, 0x03, 0x1C, 60 | 0x01, 0x04, 0x00, 0x82, 0x00, 0xFC, 0xF9, 0x83, 0x06, 0x10, 0x19, 0x00, 61 | 0xD0, 0x03, 0x00, 0x1C, 0x01, 0x30, 0x11, 0xC1, 0x86, 0x08, 0x19, 0xE3, 62 | 0xF0, 0xF8, 0xF6, 0x06, 0x30, 0x41, 0x88, 0x1D, 0x00, 0xD0, 0x06, 0x00, 63 | 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0xF0, 0x3F, 0xCC, 0x11, 0x06, 0x01, 64 | 0x80, 0x70, 0x0C, 0x03, 0x00, 0xE0, 0x38, 0x06, 0x05, 0xC1, 0x7F, 0xE0, 65 | 0xFB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB8, 0x82, 0x10, 0x82, 0x10, 0x86, 0x10, 66 | 0x86, 0x10, 0xED, 0xB6, 0xDB, 0x6D, 0xB6, 0xF8, 0x18, 0x1C, 0x34, 0x26, 67 | 0x62, 0x42, 0xC1, 0xFF, 0x80, 0x84, 0x20, 0x79, 0x98, 0x30, 0xE6, 0xD9, 68 | 0xB3, 0x3F, 0x20, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x71, 0xCC, 0xC3, 0x61, 69 | 0xB0, 0xD8, 0x6C, 0x63, 0xE0, 0x3C, 0xCF, 0x06, 0x0C, 0x18, 0x18, 0x9E, 70 | 0x01, 0x03, 0x80, 0xC0, 0x60, 0x31, 0xD9, 0x9D, 0x86, 0xC3, 0x61, 0xB0, 71 | 0xCC, 0x63, 0xF0, 0x3C, 0x46, 0xFE, 0xC0, 0xC0, 0xE1, 0x62, 0x3C, 0x1E, 72 | 0x41, 0x83, 0x06, 0x1E, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x0F, 0x00, 0x3C, 73 | 0x19, 0xF6, 0x31, 0x8C, 0x1E, 0x08, 0x04, 0x01, 0xFC, 0x40, 0xB0, 0x2E, 74 | 0x11, 0xF8, 0x20, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x71, 0xCC, 0xC6, 0x63, 75 | 0x31, 0x98, 0xCC, 0x6F, 0x78, 0x60, 0x02, 0xE6, 0x66, 0x66, 0xF0, 0x18, 76 | 0x00, 0x33, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8B, 0x80, 0x20, 0x70, 0x18, 77 | 0x0C, 0x06, 0x03, 0x3D, 0x88, 0xD8, 0x78, 0x36, 0x19, 0x8C, 0x6F, 0x78, 78 | 0x2E, 0x66, 0x66, 0x66, 0x66, 0x66, 0xF0, 0xEE, 0x71, 0xCE, 0x66, 0x31, 79 | 0x98, 0xC6, 0x63, 0x19, 0x8C, 0x66, 0x31, 0xBD, 0xEF, 0xEE, 0x39, 0x98, 80 | 0xCC, 0x66, 0x33, 0x19, 0x8D, 0xEF, 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1E, 81 | 0x0D, 0x8C, 0x7C, 0xEE, 0x39, 0x98, 0x6C, 0x36, 0x1B, 0x0D, 0x8C, 0xFC, 82 | 0x60, 0x30, 0x18, 0x1E, 0x00, 0x3D, 0x31, 0xB0, 0xD8, 0x6C, 0x36, 0x1B, 83 | 0x8C, 0xFE, 0x03, 0x01, 0x80, 0xC0, 0xF0, 0x6D, 0xC6, 0x18, 0x61, 0x86, 84 | 0x3C, 0x76, 0x38, 0x58, 0x3E, 0x38, 0xFE, 0x27, 0x98, 0xC6, 0x31, 0x8C, 85 | 0x38, 0xE7, 0x31, 0x98, 0xCC, 0x66, 0x33, 0x19, 0x8C, 0x7F, 0xF3, 0x61, 86 | 0x22, 0x32, 0x14, 0x1C, 0x08, 0x08, 0xEF, 0x36, 0x61, 0x62, 0x22, 0x32, 87 | 0x35, 0x41, 0x9C, 0x18, 0x81, 0x08, 0xF7, 0x12, 0x0E, 0x03, 0x01, 0xC1, 88 | 0x21, 0x09, 0xCF, 0xF3, 0x61, 0x62, 0x32, 0x34, 0x14, 0x1C, 0x08, 0x08, 89 | 0x08, 0x10, 0xE0, 0xFD, 0x18, 0x60, 0x83, 0x0C, 0x70, 0xFE, 0x19, 0x8C, 90 | 0x63, 0x18, 0xC4, 0x61, 0x8C, 0x63, 0x18, 0xC3, 0xFF, 0xF0, 0xC3, 0x18, 91 | 0xC6, 0x31, 0x84, 0x33, 0x18, 0xC6, 0x31, 0x98, 0x70, 0x24, 0xC1, 0xC0 }; 92 | 93 | const GFXglyph FreeSerif9pt7bGlyphs[] PROGMEM = { 94 | { 0, 0, 0, 5, 0, 1 }, // 0x20 ' ' 95 | { 0, 2, 12, 6, 2, -11 }, // 0x21 '!' 96 | { 3, 5, 4, 7, 1, -11 }, // 0x22 '"' 97 | { 6, 9, 12, 9, 0, -11 }, // 0x23 '#' 98 | { 20, 8, 14, 9, 1, -12 }, // 0x24 '$' 99 | { 34, 13, 12, 15, 1, -11 }, // 0x25 '%' 100 | { 54, 13, 13, 14, 1, -12 }, // 0x26 '&' 101 | { 76, 2, 4, 4, 1, -11 }, // 0x27 ''' 102 | { 77, 5, 15, 6, 1, -11 }, // 0x28 '(' 103 | { 87, 5, 15, 6, 0, -11 }, // 0x29 ')' 104 | { 97, 6, 8, 9, 3, -11 }, // 0x2A '*' 105 | { 103, 9, 9, 10, 0, -8 }, // 0x2B '+' 106 | { 114, 2, 3, 4, 2, 0 }, // 0x2C ',' 107 | { 115, 4, 1, 6, 1, -3 }, // 0x2D '-' 108 | { 116, 2, 2, 5, 1, -1 }, // 0x2E '.' 109 | { 117, 5, 12, 5, 0, -11 }, // 0x2F '/' 110 | { 125, 9, 13, 9, 0, -12 }, // 0x30 '0' 111 | { 140, 5, 13, 9, 2, -12 }, // 0x31 '1' 112 | { 149, 8, 12, 9, 1, -11 }, // 0x32 '2' 113 | { 161, 8, 12, 9, 0, -11 }, // 0x33 '3' 114 | { 173, 7, 12, 9, 1, -11 }, // 0x34 '4' 115 | { 184, 8, 12, 9, 0, -11 }, // 0x35 '5' 116 | { 196, 8, 13, 9, 1, -12 }, // 0x36 '6' 117 | { 209, 8, 12, 9, 0, -11 }, // 0x37 '7' 118 | { 221, 7, 13, 9, 1, -12 }, // 0x38 '8' 119 | { 233, 8, 14, 9, 1, -12 }, // 0x39 '9' 120 | { 247, 2, 8, 5, 1, -7 }, // 0x3A ':' 121 | { 249, 3, 10, 5, 1, -7 }, // 0x3B ';' 122 | { 253, 9, 9, 10, 1, -8 }, // 0x3C '<' 123 | { 264, 9, 5, 10, 1, -6 }, // 0x3D '=' 124 | { 270, 10, 9, 10, 0, -8 }, // 0x3E '>' 125 | { 282, 7, 13, 8, 1, -12 }, // 0x3F '?' 126 | { 294, 12, 13, 16, 2, -12 }, // 0x40 '@' 127 | { 314, 13, 12, 13, 0, -11 }, // 0x41 'A' 128 | { 334, 11, 12, 11, 0, -11 }, // 0x42 'B' 129 | { 351, 11, 12, 12, 1, -11 }, // 0x43 'C' 130 | { 368, 12, 12, 13, 0, -11 }, // 0x44 'D' 131 | { 386, 10, 12, 11, 1, -11 }, // 0x45 'E' 132 | { 401, 9, 12, 10, 1, -11 }, // 0x46 'F' 133 | { 415, 12, 12, 13, 1, -11 }, // 0x47 'G' 134 | { 433, 11, 12, 13, 1, -11 }, // 0x48 'H' 135 | { 450, 4, 12, 6, 1, -11 }, // 0x49 'I' 136 | { 456, 6, 12, 7, 0, -11 }, // 0x4A 'J' 137 | { 465, 12, 12, 13, 1, -11 }, // 0x4B 'K' 138 | { 483, 10, 12, 11, 1, -11 }, // 0x4C 'L' 139 | { 498, 15, 12, 16, 0, -11 }, // 0x4D 'M' 140 | { 521, 11, 12, 13, 1, -11 }, // 0x4E 'N' 141 | { 538, 11, 13, 13, 1, -12 }, // 0x4F 'O' 142 | { 556, 9, 12, 10, 1, -11 }, // 0x50 'P' 143 | { 570, 11, 16, 13, 1, -12 }, // 0x51 'Q' 144 | { 592, 11, 12, 12, 1, -11 }, // 0x52 'R' 145 | { 609, 9, 12, 10, 0, -11 }, // 0x53 'S' 146 | { 623, 11, 12, 11, 0, -11 }, // 0x54 'T' 147 | { 640, 11, 12, 13, 1, -11 }, // 0x55 'U' 148 | { 657, 12, 12, 13, 0, -11 }, // 0x56 'V' 149 | { 675, 17, 12, 17, 0, -11 }, // 0x57 'W' 150 | { 701, 13, 12, 13, 0, -11 }, // 0x58 'X' 151 | { 721, 12, 12, 13, 0, -11 }, // 0x59 'Y' 152 | { 739, 11, 12, 11, 0, -11 }, // 0x5A 'Z' 153 | { 756, 3, 15, 6, 2, -11 }, // 0x5B '[' 154 | { 762, 5, 12, 5, 0, -11 }, // 0x5C '\' 155 | { 770, 3, 15, 6, 1, -11 }, // 0x5D ']' 156 | { 776, 8, 7, 8, 0, -11 }, // 0x5E '^' 157 | { 783, 9, 1, 9, 0, 2 }, // 0x5F '_' 158 | { 785, 4, 3, 5, 0, -11 }, // 0x60 '`' 159 | { 787, 7, 8, 8, 1, -7 }, // 0x61 'a' 160 | { 794, 9, 13, 9, 0, -12 }, // 0x62 'b' 161 | { 809, 7, 8, 8, 0, -7 }, // 0x63 'c' 162 | { 816, 9, 13, 9, 0, -12 }, // 0x64 'd' 163 | { 831, 8, 8, 8, 0, -7 }, // 0x65 'e' 164 | { 839, 7, 13, 7, 1, -12 }, // 0x66 'f' 165 | { 851, 10, 12, 8, 0, -7 }, // 0x67 'g' 166 | { 866, 9, 13, 9, 0, -12 }, // 0x68 'h' 167 | { 881, 4, 11, 5, 1, -10 }, // 0x69 'i' 168 | { 887, 5, 15, 6, 0, -10 }, // 0x6A 'j' 169 | { 897, 9, 13, 9, 1, -12 }, // 0x6B 'k' 170 | { 912, 4, 13, 5, 1, -12 }, // 0x6C 'l' 171 | { 919, 14, 8, 14, 0, -7 }, // 0x6D 'm' 172 | { 933, 9, 8, 9, 0, -7 }, // 0x6E 'n' 173 | { 942, 9, 8, 9, 0, -7 }, // 0x6F 'o' 174 | { 951, 9, 12, 9, 0, -7 }, // 0x70 'p' 175 | { 965, 9, 12, 9, 0, -7 }, // 0x71 'q' 176 | { 979, 6, 8, 6, 0, -7 }, // 0x72 'r' 177 | { 985, 6, 8, 7, 1, -7 }, // 0x73 's' 178 | { 991, 5, 9, 5, 0, -8 }, // 0x74 't' 179 | { 997, 9, 8, 9, 0, -7 }, // 0x75 'u' 180 | { 1006, 8, 8, 8, 0, -7 }, // 0x76 'v' 181 | { 1014, 12, 8, 12, 0, -7 }, // 0x77 'w' 182 | { 1026, 9, 8, 9, 0, -7 }, // 0x78 'x' 183 | { 1035, 8, 12, 8, 0, -7 }, // 0x79 'y' 184 | { 1047, 7, 8, 7, 1, -7 }, // 0x7A 'z' 185 | { 1054, 5, 16, 9, 1, -12 }, // 0x7B '{' 186 | { 1064, 1, 12, 4, 1, -11 }, // 0x7C '|' 187 | { 1066, 5, 16, 9, 3, -11 }, // 0x7D '}' 188 | { 1076, 9, 3, 9, 0, -5 } }; // 0x7E '~' 189 | 190 | const GFXfont FreeSerif9pt7b PROGMEM = { 191 | (uint8_t *)FreeSerif9pt7bBitmaps, 192 | (GFXglyph *)FreeSerif9pt7bGlyphs, 193 | 0x20, 0x7E, 22 }; 194 | 195 | // Approx. 1752 bytes 196 | -------------------------------------------------------------------------------- /PDQ_GFX/Fonts/FreeSerifBold9pt7b.h: -------------------------------------------------------------------------------- 1 | const uint8_t FreeSerifBold9pt7bBitmaps[] PROGMEM = { 2 | 0xFF, 0xF4, 0x92, 0x1F, 0xF0, 0xCF, 0x3C, 0xE3, 0x88, 0x13, 0x09, 0x84, 3 | 0xC2, 0x47, 0xF9, 0x90, 0xC8, 0x4C, 0xFF, 0x13, 0x09, 0x0C, 0x86, 0x40, 4 | 0x10, 0x38, 0xD6, 0x92, 0xD2, 0xF0, 0x7C, 0x3E, 0x17, 0x93, 0x93, 0xD6, 5 | 0x7C, 0x10, 0x3C, 0x21, 0xCF, 0x0E, 0x24, 0x30, 0xA0, 0xC5, 0x03, 0x34, 6 | 0xE7, 0x26, 0x40, 0xB9, 0x04, 0xC4, 0x23, 0x30, 0x8C, 0x84, 0x1C, 0x0F, 7 | 0x00, 0xCC, 0x06, 0x60, 0x3E, 0x00, 0xE7, 0x8F, 0x18, 0x9C, 0x8C, 0xE4, 8 | 0xE3, 0xC7, 0x9E, 0x3C, 0x72, 0xFD, 0xE0, 0xFF, 0x80, 0x32, 0x44, 0xCC, 9 | 0xCC, 0xCC, 0xC4, 0x62, 0x10, 0x84, 0x22, 0x33, 0x33, 0x33, 0x32, 0x64, 10 | 0x80, 0x31, 0x6B, 0xB1, 0x8E, 0xD6, 0x8C, 0x00, 0x08, 0x04, 0x02, 0x01, 11 | 0x0F, 0xF8, 0x40, 0x20, 0x10, 0x08, 0x00, 0xDF, 0x95, 0x00, 0xFF, 0xFF, 12 | 0x80, 0x0C, 0x21, 0x86, 0x10, 0xC3, 0x08, 0x61, 0x84, 0x30, 0xC0, 0x1C, 13 | 0x33, 0x98, 0xDC, 0x7E, 0x3F, 0x1F, 0x8F, 0xC7, 0xE3, 0xB1, 0x98, 0xC3, 14 | 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0E, 0x00, 0xE0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0xE0, 0x0E, 0x01, 0xF0, 58 | 0xF8, 0xEE, 0x09, 0xC1, 0x38, 0x27, 0x04, 0xE0, 0x9C, 0x13, 0x82, 0x70, 59 | 0x4E, 0x08, 0xE2, 0x0F, 0x80, 0xFC, 0x7B, 0xC1, 0x0E, 0x08, 0x70, 0x81, 60 | 0xC4, 0x0E, 0x20, 0x7A, 0x01, 0xD0, 0x0E, 0x80, 0x38, 0x01, 0xC0, 0x04, 61 | 0x00, 0x20, 0x00, 0xFD, 0xFB, 0xDC, 0x38, 0x43, 0x87, 0x10, 0xE1, 0xC4, 62 | 0x38, 0xF2, 0x07, 0x2E, 0x81, 0xD3, 0xA0, 0x34, 0x70, 0x0E, 0x1C, 0x03, 63 | 0x87, 0x00, 0x60, 0x80, 0x10, 0x20, 0xFE, 0xF3, 0xC3, 0x0F, 0x10, 0x39, 64 | 0x00, 0xF0, 0x03, 0x80, 0x1E, 0x01, 0x70, 0x09, 0xC0, 0x8F, 0x08, 0x3D, 65 | 0xF3, 0xF0, 0xFC, 0x7B, 0xC1, 0x8E, 0x08, 0x38, 0x81, 0xE8, 0x07, 0x40, 66 | 0x1C, 0x00, 0xE0, 0x07, 0x00, 0x38, 0x01, 0xC0, 0x1F, 0x00, 0xFF, 0xD8, 67 | 0x72, 0x1E, 0x43, 0x80, 0xE0, 0x1C, 0x07, 0x01, 0xC0, 0x38, 0x2E, 0x0F, 68 | 0x83, 0x7F, 0xE0, 0xFC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xF0, 0xC1, 69 | 0x06, 0x18, 0x20, 0xC3, 0x04, 0x18, 0x60, 0x83, 0x0C, 0xF3, 0x33, 0x33, 70 | 0x33, 0x33, 0x33, 0x33, 0xF0, 0x18, 0x1C, 0x34, 0x26, 0x62, 0x43, 0xC1, 71 | 0xFF, 0x80, 0xC6, 0x30, 0x7C, 0x63, 0xB1, 0xC0, 0xE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1F, 0x8E, 86 | 0xC6, 0x3E, 0x00, 0xF7, 0x1E, 0xE7, 0x1D, 0xC7, 0x71, 0xDC, 0x77, 0x1D, 87 | 0xCE, 0x7F, 0x1C, 0x07, 0x01, 0xC0, 0xF8, 0x00, 0x3C, 0x9C, 0xEE, 0x3B, 88 | 0x8E, 0xE3, 0xB8, 0xEE, 0x39, 0xCE, 0x3F, 0x80, 0xE0, 0x38, 0x0E, 0x07, 89 | 0xC0, 0xF7, 0x7B, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0xF8, 0x7E, 0x73, 90 | 0xC7, 0x8E, 0x39, 0xB0, 0x10, 0xCF, 0x9C, 0x71, 0xC7, 0x1C, 0x71, 0xD3, 91 | 0x80, 0xF7, 0x9C, 0xE7, 0x39, 0xCE, 0x73, 0x9C, 0xE7, 0x39, 0xCE, 0x3F, 92 | 0xC0, 0xFB, 0xB8, 0x8C, 0x87, 0x43, 0xC0, 0xE0, 0x70, 0x10, 0x08, 0x00, 93 | 0xF7, 0xB6, 0x31, 0x73, 0xA3, 0x3A, 0x3D, 0xA3, 0xDC, 0x18, 0xC1, 0x88, 94 | 0x10, 0x80, 0xFB, 0xB8, 0x8E, 0x83, 0x81, 0xC0, 0xF0, 0x98, 0xCE, 0xEF, 95 | 0x80, 0xF7, 0x62, 0x72, 0x34, 0x34, 0x3C, 0x18, 0x18, 0x10, 0x10, 0x10, 96 | 0xE0, 0xE0, 0xFF, 0x1C, 0x70, 0xE3, 0x87, 0x1C, 0x71, 0xFE, 0x19, 0x8C, 97 | 0x63, 0x18, 0xCC, 0x61, 0x8C, 0x63, 0x18, 0xC3, 0xFF, 0xF8, 0xC3, 0x18, 98 | 0xC6, 0x31, 0x86, 0x33, 0x18, 0xC6, 0x31, 0x98, 0xF0, 0x8E }; 99 | 100 | const GFXglyph FreeSerifBold9pt7bGlyphs[] PROGMEM = { 101 | { 0, 0, 0, 5, 0, 1 }, // 0x20 ' ' 102 | { 0, 3, 12, 6, 1, -11 }, // 0x21 '!' 103 | { 5, 6, 5, 10, 2, -11 }, // 0x22 '"' 104 | { 9, 9, 13, 9, 0, -12 }, // 0x23 '#' 105 | { 24, 8, 14, 9, 1, -12 }, // 0x24 '$' 106 | { 38, 14, 12, 18, 2, -11 }, // 0x25 '%' 107 | { 59, 13, 12, 15, 1, -11 }, // 0x26 '&' 108 | { 79, 2, 5, 5, 1, -11 }, // 0x27 ''' 109 | { 81, 4, 15, 6, 1, -11 }, // 0x28 '(' 110 | { 89, 4, 15, 6, 1, -11 }, // 0x29 ')' 111 | { 97, 7, 7, 9, 2, -11 }, // 0x2A '*' 112 | { 104, 9, 9, 12, 1, -8 }, // 0x2B '+' 113 | { 115, 3, 6, 4, 1, -2 }, // 0x2C ',' 114 | { 118, 4, 2, 6, 1, -4 }, // 0x2D '-' 115 | { 119, 3, 3, 4, 1, -2 }, // 0x2E '.' 116 | { 121, 6, 13, 5, 0, -11 }, // 0x2F '/' 117 | { 131, 9, 12, 9, 0, -11 }, // 0x30 '0' 118 | { 145, 6, 12, 9, 1, -11 }, // 0x31 '1' 119 | { 154, 9, 12, 9, 0, -11 }, // 0x32 '2' 120 | { 168, 8, 12, 9, 0, -11 }, // 0x33 '3' 121 | { 180, 8, 12, 9, 1, -11 }, // 0x34 '4' 122 | { 192, 8, 12, 9, 1, -11 }, // 0x35 '5' 123 | { 204, 8, 12, 9, 1, -11 }, // 0x36 '6' 124 | { 216, 9, 12, 9, 0, -11 }, // 0x37 '7' 125 | { 230, 8, 12, 9, 1, -11 }, // 0x38 '8' 126 | { 242, 9, 12, 9, 0, -11 }, // 0x39 '9' 127 | { 256, 3, 9, 6, 1, -8 }, // 0x3A ':' 128 | { 260, 3, 12, 6, 2, -8 }, // 0x3B ';' 129 | { 265, 10, 10, 12, 1, -9 }, // 0x3C '<' 130 | { 278, 10, 5, 12, 1, -6 }, // 0x3D '=' 131 | { 285, 10, 10, 12, 1, -8 }, // 0x3E '>' 132 | { 298, 7, 12, 9, 1, -11 }, // 0x3F '?' 133 | { 309, 13, 12, 17, 2, -11 }, // 0x40 '@' 134 | { 329, 13, 12, 13, 0, -11 }, // 0x41 'A' 135 | { 349, 11, 12, 12, 0, -11 }, // 0x42 'B' 136 | { 366, 11, 12, 13, 1, -11 }, // 0x43 'C' 137 | { 383, 11, 12, 13, 1, -11 }, // 0x44 'D' 138 | { 400, 11, 12, 12, 1, -11 }, // 0x45 'E' 139 | { 417, 10, 12, 11, 1, -11 }, // 0x46 'F' 140 | { 432, 12, 12, 14, 1, -11 }, // 0x47 'G' 141 | { 450, 12, 12, 14, 1, -11 }, // 0x48 'H' 142 | { 468, 5, 12, 7, 1, -11 }, // 0x49 'I' 143 | { 476, 8, 14, 9, 0, -11 }, // 0x4A 'J' 144 | { 490, 13, 12, 14, 1, -11 }, // 0x4B 'K' 145 | { 510, 11, 12, 12, 1, -11 }, // 0x4C 'L' 146 | { 527, 16, 12, 17, 0, -11 }, // 0x4D 'M' 147 | { 551, 11, 12, 13, 1, -11 }, // 0x4E 'N' 148 | { 568, 12, 12, 14, 1, -11 }, // 0x4F 'O' 149 | { 586, 10, 12, 11, 1, -11 }, // 0x50 'P' 150 | { 601, 12, 15, 14, 1, -11 }, // 0x51 'Q' 151 | { 624, 12, 12, 13, 1, -11 }, // 0x52 'R' 152 | { 642, 8, 12, 10, 1, -11 }, // 0x53 'S' 153 | { 654, 12, 12, 12, 0, -11 }, // 0x54 'T' 154 | { 672, 11, 12, 13, 1, -11 }, // 0x55 'U' 155 | { 689, 13, 13, 13, 0, -11 }, // 0x56 'V' 156 | { 711, 18, 12, 18, 0, -11 }, // 0x57 'W' 157 | { 738, 13, 12, 13, 0, -11 }, // 0x58 'X' 158 | { 758, 13, 12, 13, 0, -11 }, // 0x59 'Y' 159 | { 778, 11, 12, 12, 1, -11 }, // 0x5A 'Z' 160 | { 795, 4, 15, 6, 1, -11 }, // 0x5B '[' 161 | { 803, 6, 13, 5, 0, -11 }, // 0x5C '\' 162 | { 813, 4, 15, 6, 1, -11 }, // 0x5D ']' 163 | { 821, 8, 7, 10, 1, -11 }, // 0x5E '^' 164 | { 828, 9, 1, 9, 0, 3 }, // 0x5F '_' 165 | { 830, 4, 3, 6, 0, -12 }, // 0x60 '`' 166 | { 832, 9, 9, 9, 0, -8 }, // 0x61 'a' 167 | { 843, 10, 12, 10, 0, -11 }, // 0x62 'b' 168 | { 858, 7, 9, 8, 0, -8 }, // 0x63 'c' 169 | { 866, 10, 12, 10, 0, -11 }, // 0x64 'd' 170 | { 881, 8, 9, 8, 0, -8 }, // 0x65 'e' 171 | { 890, 7, 12, 7, 0, -11 }, // 0x66 'f' 172 | { 901, 7, 13, 9, 1, -8 }, // 0x67 'g' 173 | { 913, 10, 12, 10, 0, -11 }, // 0x68 'h' 174 | { 928, 5, 12, 5, 0, -11 }, // 0x69 'i' 175 | { 936, 6, 16, 7, 0, -11 }, // 0x6A 'j' 176 | { 948, 10, 12, 10, 0, -11 }, // 0x6B 'k' 177 | { 963, 5, 12, 5, 0, -11 }, // 0x6C 'l' 178 | { 971, 15, 9, 15, 0, -8 }, // 0x6D 'm' 179 | { 988, 10, 9, 10, 0, -8 }, // 0x6E 'n' 180 | { 1000, 9, 9, 9, 0, -8 }, // 0x6F 'o' 181 | { 1011, 10, 13, 10, 0, -8 }, // 0x70 'p' 182 | { 1028, 10, 13, 10, 0, -8 }, // 0x71 'q' 183 | { 1045, 8, 9, 8, 0, -8 }, // 0x72 'r' 184 | { 1054, 5, 9, 7, 1, -8 }, // 0x73 's' 185 | { 1060, 6, 11, 6, 0, -10 }, // 0x74 't' 186 | { 1069, 10, 9, 10, 0, -8 }, // 0x75 'u' 187 | { 1081, 9, 9, 9, 0, -8 }, // 0x76 'v' 188 | { 1092, 12, 9, 13, 0, -8 }, // 0x77 'w' 189 | { 1106, 9, 9, 9, 0, -8 }, // 0x78 'x' 190 | { 1117, 8, 13, 9, 0, -8 }, // 0x79 'y' 191 | { 1130, 7, 9, 8, 1, -8 }, // 0x7A 'z' 192 | { 1138, 5, 16, 7, 0, -12 }, // 0x7B '{' 193 | { 1148, 1, 13, 4, 1, -11 }, // 0x7C '|' 194 | { 1150, 5, 16, 7, 2, -12 }, // 0x7D '}' 195 | { 1160, 8, 2, 9, 1, -4 } }; // 0x7E '~' 196 | 197 | const GFXfont FreeSerifBold9pt7b PROGMEM = { 198 | (uint8_t *)FreeSerifBold9pt7bBitmaps, 199 | (GFXglyph *)FreeSerifBold9pt7bGlyphs, 200 | 0x20, 0x7E, 22 }; 201 | 202 | // Approx. 1834 bytes 203 | -------------------------------------------------------------------------------- /PDQ_GFX/PDQ_GFX.cpp: -------------------------------------------------------------------------------- 1 | // Not much here, all in the header 2 | #include "glcdfont.c" 3 | -------------------------------------------------------------------------------- /PDQ_GFX/README.txt: -------------------------------------------------------------------------------- 1 | NOTE: This file is from the Adafruit_GFX library (which PDQ_GFX was based on). Thanks Adafruit! 2 | 3 | This is the core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific library for each display device we carry (to handle the lower-level functions). 4 | 5 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! 6 | 7 | Written by Limor Fried/Ladyada for Adafruit Industries. 8 | BSD license, check license.txt for more information. 9 | All text above must be included in any redistribution. 10 | 11 | To download, click the DOWNLOAD ZIP button, uncompress and rename the uncompressed folder Adafruit_GFX. Confirm that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h 12 | 13 | Place the Adafruit_GFX library folder your /Libraries/ folder. You may need to create the Libraries subfolder if its your first library. Restart the IDE. 14 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Sample.fonts/Arial_Narrow48.Digits.pck.h: -------------------------------------------------------------------------------- 1 | // Font charset: 0123456789. 2 | 3 | // font size 966 bytes 4 | const uint8_t Arial_Narrow48Bitmaps[] PROGMEM = { 5 | 0xFF, 0xDF, 0x07, 0x7D, 0xF7, 0x79, 0xF4, 0x7B, 0xF2, 0x7D, 0x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, 0xE3, 0xE4, 0xC6, 0xE3, 0x07, 0x2C, 0x7D, 0xC1, 0xC2, 60 | 0x37, 0x2B, 0x7C, 0xC3, 0xD0, 0x47, 0x0B, 0x7C, 0xB5, 0xC0, 0x57, 0x0B, 0x7C, 0xF5, 0x79, 0xF5, 61 | 0x79, 0xF5, 0x79, 0xF5, 0x79, 0xF5, 0x79, 0xF5, 0x7A, 0xD3, 0xC0, 0x37, 0x0D, 0x7D, 0xD2, 0xD0, 62 | 0x17, 0x1E, 0x7D, 0x1F, 0x3F, 0x9F, 0xF2, 0xCF, 0xF3, 0x0D, 0x4C, 0xBF, 0xC1, 0xF5, 0x29, 0x7C, 63 | 0x4D, 0x7C, 0x27, 0x7C, 0x27, 0x7B, 0x37, 0x7B, 0x37, 0x7B, 0x27, 0x7C, 0x27, 0x1C, 0x7C, 0xB3, 64 | 0xC2, 0x27, 0x2C, 0x7D, 0xC1, 0xC3, 0x07, 0x4C, 0x6D, 0x4D, 0x4E, 0x6D, 0xFF, 0x78, 0xEF, 0x17, 65 | 0xCF, 0x37, 0x9F, 0x77, 0x7D, 0x01}; 66 | 67 | const GFXglyph Arial_Narrow48Glyphs[] PROGMEM = { 68 | {0, 0, 0, 15, 0, 0}, // , 0 69 | {0, 0, 0, 15, 0, 0}, // !, 0 70 | {0, 0, 0, 15, 0, 0}, // ", 0 71 | {0, 0, 0, 15, 0, 0}, // #, 0 72 | {0, 0, 0, 15, 0, 0}, // $, 0 73 | {0, 0, 0, 15, 0, 0}, // %, 0 74 | {0, 0, 0, 15, 0, 0}, // &, 0 75 | {0, 0, 0, 15, 0, 0}, // ', 0 76 | {0, 0, 0, 15, 0, 0}, // (, 0 77 | {0, 0, 0, 15, 0, 0}, // ), 0 78 | {0, 0, 0, 15, 0, 0}, // *, 0 79 | {0, 0, 0, 15, 0, 0}, // +, 0 80 | {0, 0, 0, 15, 0, 0}, // ,, 0 81 | {0, 0, 0, 15, 0, 0}, // -, 0 82 | {32768, 5, 6, 15, 4, -21}, // ., 0 83 | {0, 0, 0, 15, 0, 0}, // /, 2 84 | {32770, 24, 48, 29, 2, -62}, // 0, 103 85 | {32873, 14, 47, 29, 6, -62}, // 1, 68 86 | {32941, 24, 47, 29, 2, -62}, // 2, 95 87 | {33036, 24, 48, 29, 2, -62}, // 3, 98 88 | {33134, 26, 47, 29, 1, -62}, // 4, 103 89 | {33237, 24, 46, 29, 2, -60}, // 5, 95 90 | {33332, 24, 48, 29, 2, -62}, // 6, 106 91 | {33438, 24, 45, 29, 2, -60}, // 7, 89 92 | {33527, 24, 48, 29, 2, -62}, // 8, 102 93 | {33629, 24, 48, 29, 2, -62} // 9, 106 94 | }; 95 | 96 | const GFXfont Arial_Narrow48 PROGMEM = { 97 | (uint8_t *)Arial_Narrow48Bitmaps, 98 | (GFXglyph *)Arial_Narrow48Glyphs, 99 | 32, 57, 75 100 | }; 101 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/.gitignore: -------------------------------------------------------------------------------- 1 | /__history/ 2 | /Win32/ 3 | *.~* 4 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/Project1.dpr: -------------------------------------------------------------------------------- 1 | program Project1; 2 | 3 | uses 4 | Vcl.Forms, 5 | Unit1 in 'Unit1.pas' {Form1}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/Project1.dproj.local: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 1899.12.30 00:00:00.000.987,C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Project1.dproj=D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Project1.dproj 5 | 1899.12.30 00:00:00.000.623,C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.dfm=D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Unit1.dfm 6 | 1899.12.30 00:00:00.000.623,C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.pas=D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Unit1.pas 7 | 1899.12.30 00:00:00.000.933,=C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.pas 8 | 1899.12.30 00:00:00.000.231,=C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.pas 9 | 10 | 11 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/Project1.identcache: -------------------------------------------------------------------------------- 1 | Jc:\program files (x86)\embarcadero\studio\16.0\SOURCE\VCL\Vcl.Graphics.pas6D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Unit1.pas9D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Project1.dpr -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/Project1.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_GFX/TTF2GFX/Src/Project1.res -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/TTF2GFX.dpr: -------------------------------------------------------------------------------- 1 | program TTF2GFX; 2 | 3 | uses 4 | Vcl.Forms, 5 | Unit1 in 'Unit1.pas' {Form1}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/TTF2GFX.dproj.local: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 1899.12.30 00:00:00.000.987,D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Project1.dproj=C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Project1.dproj 5 | 1899.12.30 00:00:00.000.933,=C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.pas 6 | 1899.12.30 00:00:00.000.231,=C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.pas 7 | 1899.12.30 00:00:00.000.623,D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Unit1.dfm=C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.dfm 8 | 1899.12.30 00:00:00.000.623,D:\Hobby\My.Radio\!Projects\!Arduino\TTF2GFX\Unit1.pas=C:\Users\Relayer\Documents\Embarcadero\Studio\Projects\Unit1.pas 9 | 2017.03.19 21:25:28.527,D:\Hobby\My.Radio\!Projects\!Arduino\PDQ_GFX_Libs\PDQ_GFX\TTF2GFX\Src\TTF2GFX.dproj=D:\Hobby\My.Radio\!Projects\!Arduino\PDQ_GFX_Libs\PDQ_GFX\TTF2GFX\Src\Project1.dproj 10 | 11 | 12 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/TTF2GFX.identcache: -------------------------------------------------------------------------------- 1 | QD:\Hobby\My.Radio\!Projects\!Arduino\PDQ_GFX_Libs\PDQ_GFX\TTF2GFX\Src\TTF2GFX.dprOD:\Hobby\My.Radio\!Projects\!Arduino\PDQ_GFX_Libs\PDQ_GFX\TTF2GFX\Src\Unit1.pas -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/TTF2GFX.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_GFX/TTF2GFX/Src/TTF2GFX.res -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/Unit1.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'TTF2GFX 1.0 by Andrey Belokon' 5 | ClientHeight = 363 6 | ClientWidth = 674 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | ShowHint = False 15 | OnCreate = FormCreate 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object SpeedButton1: TSpeedButton 19 | Left = 264 20 | Top = 16 21 | Width = 93 22 | Height = 22 23 | Caption = 'Select Font' 24 | OnClick = SpeedButton1Click 25 | end 26 | object Label3: TLabel 27 | Left = 16 28 | Top = 127 29 | Width = 83 30 | Height = 13 31 | Caption = 'It'#39's a sample text' 32 | Color = clCream 33 | ParentColor = False 34 | Transparent = False 35 | end 36 | object Label2: TLabel 37 | Left = 16 38 | Top = 100 39 | Width = 31 40 | Height = 13 41 | Caption = 'Label2' 42 | end 43 | object Label4: TLabel 44 | Left = 16 45 | Top = 16 46 | Width = 51 47 | Height = 13 48 | Caption = 'Font name' 49 | end 50 | object Label5: TLabel 51 | Left = 16 52 | Top = 73 53 | Width = 58 54 | Height = 13 55 | Caption = 'Text sample' 56 | end 57 | object Button1: TButton 58 | Left = 387 59 | Top = 14 60 | Width = 94 61 | Height = 25 62 | Caption = 'Convert!' 63 | TabOrder = 0 64 | OnClick = Button1Click 65 | end 66 | object edChars: TEdit 67 | Left = 96 68 | Top = 43 69 | Width = 544 70 | Height = 21 71 | Enabled = False 72 | TabOrder = 1 73 | Text = ' 0123456789.' 74 | end 75 | object Edit2: TEdit 76 | Left = 80 77 | Top = 16 78 | Width = 170 79 | Height = 21 80 | TabOrder = 2 81 | Text = 'Edit2' 82 | end 83 | object Edit3: TEdit 84 | Left = 80 85 | Top = 70 86 | Width = 378 87 | Height = 21 88 | TabOrder = 3 89 | Text = 'It'#39's a sample text' 90 | OnChange = Edit3Change 91 | end 92 | object cbPacked: TCheckBox 93 | Left = 496 94 | Top = 16 95 | Width = 97 96 | Height = 17 97 | Caption = 'Packed' 98 | TabOrder = 4 99 | end 100 | object cbChars: TCheckBox 101 | Left = 17 102 | Top = 45 103 | Width = 82 104 | Height = 17 105 | Caption = 'Only chars' 106 | TabOrder = 5 107 | OnClick = cbCharsClick 108 | end 109 | object FontDialog1: TFontDialog 110 | Font.Charset = DEFAULT_CHARSET 111 | Font.Color = clWindowText 112 | Font.Height = -11 113 | Font.Name = 'Tahoma' 114 | Font.Style = [] 115 | Options = [fdTrueTypeOnly, fdEffects, fdWysiwyg] 116 | Left = 272 117 | Top = 72 118 | end 119 | end 120 | -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/Unit1.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_GFX/TTF2GFX/Src/Unit1.pas -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/Src/stat.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_GFX/TTF2GFX/Src/stat.txt -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/TTF2GFX.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_GFX/TTF2GFX/TTF2GFX.exe -------------------------------------------------------------------------------- /PDQ_GFX/TTF2GFX/readme.txt: -------------------------------------------------------------------------------- 1 | Simple utility for create GFX fonts from TTF. 2 | Major feature: 3 | 1. Allow create subset of chars (chech "only chars" check box) 4 | 2. Create packed font 5 | 6 | Copyright (c) 2017 Andrey Belookon 7 | http://dspview.com 8 | ban.relayer@gmail.com -------------------------------------------------------------------------------- /PDQ_GFX/fontconvert/Makefile: -------------------------------------------------------------------------------- 1 | all: fontconvert 2 | 3 | CC = gcc 4 | CFLAGS = -Wall -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/include 5 | LIBS = -lfreetype 6 | 7 | fontconvert: fontconvert.c 8 | $(CC) $(CFLAGS) $< $(LIBS) -o $@ 9 | strip $@ 10 | 11 | clean: 12 | rm -f fontconvert 13 | -------------------------------------------------------------------------------- /PDQ_GFX/fontconvert/fontconvert.c: -------------------------------------------------------------------------------- 1 | /* 2 | TrueType to Adafruit_GFX font converter. Derived from Peter Jakobs' 3 | Adafruit_ftGFX fork & makefont tool, and Paul Kourany's Adafruit_mfGFX. 4 | 5 | NOT AN ARDUINO SKETCH. This is a command-line tool for preprocessing 6 | fonts to be used with the Adafruit_GFX Arduino library. 7 | 8 | For UNIX-like systems. Outputs to stdout; redirect to header file, e.g.: 9 | ./fontconvert ~/Library/Fonts/FreeSans.ttf 18 > FreeSans18pt7b.h 10 | 11 | REQUIRES FREETYPE LIBRARY. www.freetype.org 12 | 13 | Currently this only extracts the printable 7-bit ASCII chars of a font. 14 | Will eventually extend with some int'l chars a la ftGFX, not there yet. 15 | Keep 7-bit fonts around as an option in that case, more compact. 16 | 17 | See notes at end for glyph nomenclature & other tidbits. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include FT_GLYPH_H 25 | #include "../gfxfont.h" // Adafruit_GFX font structures 26 | 27 | #define DPI 141 // Approximate res. of Adafruit 2.8" TFT 28 | 29 | // Accumulate bits for output, with periodic hexadecimal byte write 30 | void enbit(uint8_t value) { 31 | static uint8_t row = 0, sum = 0, bit = 0x80, firstCall = 1; 32 | if(value) sum |= bit; // Set bit if needed 33 | if(!(bit >>= 1)) { // Advance to next bit, end of byte reached? 34 | if(!firstCall) { // Format output table nicely 35 | if(++row >= 12) { // Last entry on line? 36 | printf(",\n "); // Newline format output 37 | row = 0; // Reset row counter 38 | } else { // Not end of line 39 | printf(", "); // Simple comma delim 40 | } 41 | } 42 | printf("0x%02X", sum); // Write byte value 43 | sum = 0; // Clear for next byte 44 | bit = 0x80; // Reset bit counter 45 | firstCall = 0; // Formatting flag 46 | } 47 | } 48 | 49 | int main(int argc, char *argv[]) { 50 | int i, j, err, size, first=' ', last='~', 51 | bitmapOffset = 0, x, y, byte; 52 | char *fontName, c, *ptr; 53 | FT_Library library; 54 | FT_Face face; 55 | FT_Glyph glyph; 56 | FT_Bitmap *bitmap; 57 | FT_BitmapGlyphRec *g; 58 | GFXglyph *table; 59 | uint8_t bit; 60 | 61 | // Parse command line. Valid syntaxes are: 62 | // fontconvert [filename] [size] 63 | // fontconvert [filename] [size] [last char] 64 | // fontconvert [filename] [size] [first char] [last char] 65 | // Unless overridden, default first and last chars are 66 | // ' ' (space) and '~', respectively 67 | 68 | if(argc < 3) { 69 | fprintf(stderr, "Usage: %s fontfile size [first] [last]\n", 70 | argv[0]); 71 | return 1; 72 | } 73 | 74 | size = atoi(argv[2]); 75 | 76 | if(argc == 4) { 77 | last = atoi(argv[3]); 78 | } else if(argc == 5) { 79 | first = atoi(argv[3]); 80 | last = atoi(argv[4]); 81 | } 82 | 83 | if(last < first) { 84 | i = first; 85 | first = last; 86 | last = i; 87 | } 88 | 89 | ptr = strrchr(argv[1], '/'); // Find last slash in filename 90 | if(ptr) ptr++; // First character of filename (path stripped) 91 | else ptr = argv[1]; // No path; font in local dir. 92 | 93 | // Allocate space for font name and glyph table 94 | if((!(fontName = malloc(strlen(ptr) + 20))) || 95 | (!(table = (GFXglyph *)malloc((last - first + 1) * 96 | sizeof(GFXglyph))))) { 97 | fprintf(stderr, "Malloc error\n"); 98 | return 1; 99 | } 100 | 101 | // Derive font table names from filename. Period (filename 102 | // extension) is truncated and replaced with the font size & bits. 103 | strcpy(fontName, ptr); 104 | ptr = strrchr(fontName, '.'); // Find last period (file ext) 105 | if(!ptr) ptr = &fontName[strlen(fontName)]; // If none, append 106 | // Insert font size and 7/8 bit. fontName was alloc'd w/extra 107 | // space to allow this, we're not sprintfing into Forbidden Zone. 108 | sprintf(ptr, "%dpt%db", size, (last > 127) ? 8 : 7); 109 | // Space and punctuation chars in name replaced w/ underscores. 110 | for(i=0; (c=fontName[i]); i++) { 111 | if(isspace(c) || ispunct(c)) fontName[i] = '_'; 112 | } 113 | 114 | // Init FreeType lib, load font 115 | if((err = FT_Init_FreeType(&library))) { 116 | fprintf(stderr, "FreeType init error: %d", err); 117 | return err; 118 | } 119 | if((err = FT_New_Face(library, argv[1], 0, &face))) { 120 | fprintf(stderr, "Font load error: %d", err); 121 | FT_Done_FreeType(library); 122 | return err; 123 | } 124 | 125 | // << 6 because '26dot6' fixed-point format 126 | FT_Set_Char_Size(face, size << 6, 0, DPI, 0); 127 | 128 | // Currently all symbols from 'first' to 'last' are processed. 129 | // Fonts may contain WAY more glyphs than that, but this code 130 | // will need to handle encoding stuff to deal with extracting 131 | // the right symbols, and that's not done yet. 132 | // fprintf(stderr, "%ld glyphs\n", face->num_glyphs); 133 | 134 | printf("const uint8_t %sBitmaps[] PROGMEM = {\n ", fontName); 135 | 136 | // Process glyphs and output huge bitmap data array 137 | for(i=first, j=0; i<=last; i++, j++) { 138 | // MONO renderer provides clean image with perfect crop 139 | // (no wasted pixels) via bitmap struct. 140 | if((err = FT_Load_Char(face, i, FT_LOAD_TARGET_MONO))) { 141 | fprintf(stderr, "Error %d loading char '%c'\n", 142 | err, i); 143 | continue; 144 | } 145 | 146 | if((err = FT_Render_Glyph(face->glyph, 147 | FT_RENDER_MODE_MONO))) { 148 | fprintf(stderr, "Error %d rendering char '%c'\n", 149 | err, i); 150 | continue; 151 | } 152 | 153 | if((err = FT_Get_Glyph(face->glyph, &glyph))) { 154 | fprintf(stderr, "Error %d getting glyph '%c'\n", 155 | err, i); 156 | continue; 157 | } 158 | 159 | bitmap = &face->glyph->bitmap; 160 | g = (FT_BitmapGlyphRec *)glyph; 161 | 162 | // Minimal font and per-glyph information is stored to 163 | // reduce flash space requirements. Glyph bitmaps are 164 | // fully bit-packed; no per-scanline pad, though end of 165 | // each character may be padded to next byte boundary 166 | // when needed. 16-bit offset means 64K max for bitmaps, 167 | // code currently doesn't check for overflow. (Doesn't 168 | // check that size & offsets are within bounds either for 169 | // that matter...please convert fonts responsibly.) 170 | table[j].bitmapOffset = bitmapOffset; 171 | table[j].width = bitmap->width; 172 | table[j].height = bitmap->rows; 173 | table[j].xAdvance = face->glyph->advance.x >> 6; 174 | table[j].xOffset = g->left; 175 | table[j].yOffset = 1 - g->top; 176 | 177 | for(y=0; y < bitmap->rows; y++) { 178 | for(x=0;x < bitmap->width; x++) { 179 | byte = x / 8; 180 | bit = 0x80 >> (x & 7); 181 | enbit(bitmap->buffer[ 182 | y * bitmap->pitch + byte] & bit); 183 | } 184 | } 185 | 186 | // Pad end of char bitmap to next byte boundary if needed 187 | int n = (bitmap->width * bitmap->rows) & 7; 188 | if(n) { // Pixel count not an even multiple of 8? 189 | n = 8 - n; // # bits to next multiple 190 | while(n--) enbit(0); 191 | } 192 | bitmapOffset += (bitmap->width * bitmap->rows + 7) / 8; 193 | 194 | FT_Done_Glyph(glyph); 195 | } 196 | 197 | printf(" };\n\n"); // End bitmap array 198 | 199 | // Output glyph attributes table (one per character) 200 | printf("const GFXglyph %sGlyphs[] PROGMEM = {\n", fontName); 201 | for(i=first, j=0; i<=last; i++, j++) { 202 | printf(" { %5d, %3d, %3d, %3d, %4d, %4d }", 203 | table[j].bitmapOffset, 204 | table[j].width, 205 | table[j].height, 206 | table[j].xAdvance, 207 | table[j].xOffset, 208 | table[j].yOffset); 209 | if(i < last) { 210 | printf(", // 0x%02X", i); 211 | if((i >= ' ') && (i <= '~')) { 212 | printf(" '%c'", i); 213 | } 214 | putchar('\n'); 215 | } 216 | } 217 | printf(" }; // 0x%02X", last); 218 | if((last >= ' ') && (last <= '~')) printf(" '%c'", last); 219 | printf("\n\n"); 220 | 221 | // Output font structure 222 | printf("const GFXfont %s PROGMEM = {\n", fontName); 223 | printf(" (uint8_t *)%sBitmaps,\n", fontName); 224 | printf(" (GFXglyph *)%sGlyphs,\n", fontName); 225 | printf(" 0x%02X, 0x%02X, %ld };\n\n", 226 | first, last, face->size->metrics.height >> 6); 227 | printf("// Approx. %d bytes\n", 228 | bitmapOffset + (last - first + 1) * 7 + 7); 229 | // Size estimate is based on AVR struct and pointer sizes; 230 | // actual size may vary. 231 | 232 | FT_Done_FreeType(library); 233 | 234 | return 0; 235 | } 236 | 237 | /* ------------------------------------------------------------------------- 238 | 239 | Character metrics are slightly different from classic GFX & ftGFX. 240 | In classic GFX: cursor position is the upper-left pixel of each 5x7 241 | character; lower extent of most glyphs (except those w/descenders) 242 | is +6 pixels in Y direction. 243 | W/new GFX fonts: cursor position is on baseline, where baseline is 244 | 'inclusive' (containing the bottom-most row of pixels in most symbols, 245 | except those with descenders; ftGFX is one pixel lower). 246 | 247 | Cursor Y will be moved automatically when switching between classic 248 | and new fonts. If you switch fonts, any print() calls will continue 249 | along the same baseline. 250 | 251 | ...........#####.. -- yOffset 252 | ..........######.. 253 | ..........######.. 254 | .........#######.. 255 | ........#########. 256 | * = Cursor pos. ........#########. 257 | .......##########. 258 | ......#####..####. 259 | ......#####..####. 260 | *.#.. .....#####...####. 261 | .#.#. ....############## 262 | #...# ...############### 263 | #...# ...############### 264 | ##### ..#####......##### 265 | #...# .#####.......##### 266 | ====== #...# ====== #*###.........#### ======= Baseline 267 | || xOffset 268 | 269 | glyph->xOffset and yOffset are pixel offsets, in GFX coordinate space 270 | (+Y is down), from the cursor position to the top-left pixel of the 271 | glyph bitmap. i.e. yOffset is typically negative, xOffset is typically 272 | zero but a few glyphs will have other values (even negative xOffsets 273 | sometimes, totally normal). glyph->xAdvance is the distance to move 274 | the cursor on the X axis after drawing the corresponding symbol. 275 | 276 | There's also some changes with regard to 'background' color and new GFX 277 | fonts (classic fonts unchanged). See Adafruit_GFX.cpp for explanation. 278 | */ 279 | -------------------------------------------------------------------------------- /PDQ_GFX/fontconvert/makefonts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Ugly little Bash script, generates a set of .h files for GFX using 4 | # GNU FreeFont sources. There are three fonts: 'Mono' (Courier-like), 5 | # 'Sans' (Helvetica-like) and 'Serif' (Times-like); four styles: regular, 6 | # bold, oblique or italic, and bold+oblique or bold+italic; and four 7 | # sizes: 9, 12, 18 and 24 point. No real error checking or anything, 8 | # this just powers through all the combinations, calling the fontconvert 9 | # utility and redirecting the output to a .h file for each combo. 10 | 11 | # Adafruit_GFX repository does not include the source outline fonts 12 | # (huge zipfile, different license) but they're easily acquired: 13 | # http://savannah.gnu.org/projects/freefont/ 14 | 15 | convert=./fontconvert 16 | inpath=~/Desktop/freefont/ 17 | outpath=../Fonts/ 18 | fonts=(FreeMono FreeSans FreeSerif) 19 | styles=("" Bold Italic BoldItalic Oblique BoldOblique) 20 | sizes=(9 12 18 24) 21 | 22 | for f in ${fonts[*]} 23 | do 24 | for index in ${!styles[*]} 25 | do 26 | st=${styles[$index]} 27 | for si in ${sizes[*]} 28 | do 29 | infile=$inpath$f$st".ttf" 30 | if [ -f $infile ] # Does source combination exist? 31 | then 32 | outfile=$outpath$f$st$si"pt7b.h" 33 | # printf "%s %s %s > %s\n" $convert $infile $si $outfile 34 | $convert $infile $si > $outfile 35 | fi 36 | done 37 | done 38 | done 39 | -------------------------------------------------------------------------------- /PDQ_GFX/gfxfont.h: -------------------------------------------------------------------------------- 1 | // This is the PDQ re-mixed version of Adafruit's library from Xark 2 | // here is the original copyright notice and license: 3 | 4 | // Font structures for newer Adafruit_GFX (1.1 and later). 5 | // Example fonts are included in 'Fonts' directory. 6 | // To use a font in your Arduino sketch, #include the corresponding .h 7 | // file and pass address of GFXfont struct to setFont(). Pass NULL to 8 | // revert to 'classic' fixed-space bitmap font. 9 | 10 | #ifndef _GFXFONT_H_ 11 | #define _GFXFONT_H_ 12 | 13 | struct GFXglyph // Data stored PER GLYPH 14 | { 15 | uint16_t bitmapOffset; // Pointer into GFXfont->bitmap 16 | uint8_t width, height; // Bitmap dimensions in pixels 17 | uint8_t xAdvance; // Distance to advance cursor (x axis) 18 | int8_t xOffset, yOffset; // Dist from cursor pos to UL corner 19 | }; 20 | 21 | struct GFXfont // Data stored for FONT AS A WHOLE: 22 | { 23 | uint8_t *bitmap; // Glyph bitmaps, concatenated 24 | GFXglyph *glyph; // Glyph array 25 | uint8_t first, last; // ASCII extents 26 | uint8_t yAdvance; // Newline distance (y axis) 27 | }; 28 | 29 | #endif // _GFXFONT_H_ 30 | -------------------------------------------------------------------------------- /PDQ_GFX/glcdfont.c: -------------------------------------------------------------------------------- 1 | // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. 2 | // See gfxfont.h for newer custom bitmap font info. 3 | 4 | #ifndef FONT5X7_H 5 | #define FONT5X7_H 6 | 7 | #ifdef __AVR__ 8 | #include 9 | #include 10 | #elif defined(ESP8266) 11 | #include 12 | #else 13 | #define PROGMEM 14 | #endif 15 | 16 | // Standard ASCII 5x7 font 17 | 18 | const unsigned char glcdfont[] PROGMEM = 19 | { 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 21 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 22 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 23 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 24 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 25 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 26 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 27 | 0x00, 0x18, 0x3C, 0x18, 0x00, 28 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 29 | 0x00, 0x18, 0x24, 0x18, 0x00, 30 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 31 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 32 | 0x26, 0x29, 0x79, 0x29, 0x26, 33 | 0x40, 0x7F, 0x05, 0x05, 0x07, 34 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 35 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 36 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 37 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 38 | 0x14, 0x22, 0x7F, 0x22, 0x14, 39 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 40 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 41 | 0x00, 0x66, 0x89, 0x95, 0x6A, 42 | 0x60, 0x60, 0x60, 0x60, 0x60, 43 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 44 | 0x08, 0x04, 0x7E, 0x04, 0x08, 45 | 0x10, 0x20, 0x7E, 0x20, 0x10, 46 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 47 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 48 | 0x1E, 0x10, 0x10, 0x10, 0x10, 49 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 50 | 0x30, 0x38, 0x3E, 0x38, 0x30, 51 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x5F, 0x00, 0x00, 54 | 0x00, 0x07, 0x00, 0x07, 0x00, 55 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 56 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 57 | 0x23, 0x13, 0x08, 0x64, 0x62, 58 | 0x36, 0x49, 0x56, 0x20, 0x50, 59 | 0x00, 0x08, 0x07, 0x03, 0x00, 60 | 0x00, 0x1C, 0x22, 0x41, 0x00, 61 | 0x00, 0x41, 0x22, 0x1C, 0x00, 62 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 63 | 0x08, 0x08, 0x3E, 0x08, 0x08, 64 | 0x00, 0x80, 0x70, 0x30, 0x00, 65 | 0x08, 0x08, 0x08, 0x08, 0x08, 66 | 0x00, 0x00, 0x60, 0x60, 0x00, 67 | 0x20, 0x10, 0x08, 0x04, 0x02, 68 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 69 | 0x00, 0x42, 0x7F, 0x40, 0x00, 70 | 0x72, 0x49, 0x49, 0x49, 0x46, 71 | 0x21, 0x41, 0x49, 0x4D, 0x33, 72 | 0x18, 0x14, 0x12, 0x7F, 0x10, 73 | 0x27, 0x45, 0x45, 0x45, 0x39, 74 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 75 | 0x41, 0x21, 0x11, 0x09, 0x07, 76 | 0x36, 0x49, 0x49, 0x49, 0x36, 77 | 0x46, 0x49, 0x49, 0x29, 0x1E, 78 | 0x00, 0x00, 0x14, 0x00, 0x00, 79 | 0x00, 0x40, 0x34, 0x00, 0x00, 80 | 0x00, 0x08, 0x14, 0x22, 0x41, 81 | 0x14, 0x14, 0x14, 0x14, 0x14, 82 | 0x00, 0x41, 0x22, 0x14, 0x08, 83 | 0x02, 0x01, 0x59, 0x09, 0x06, 84 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 85 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 86 | 0x7F, 0x49, 0x49, 0x49, 0x36, 87 | 0x3E, 0x41, 0x41, 0x41, 0x22, 88 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 89 | 0x7F, 0x49, 0x49, 0x49, 0x41, 90 | 0x7F, 0x09, 0x09, 0x09, 0x01, 91 | 0x3E, 0x41, 0x41, 0x51, 0x73, 92 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 93 | 0x00, 0x41, 0x7F, 0x41, 0x00, 94 | 0x20, 0x40, 0x41, 0x3F, 0x01, 95 | 0x7F, 0x08, 0x14, 0x22, 0x41, 96 | 0x7F, 0x40, 0x40, 0x40, 0x40, 97 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 98 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 99 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 100 | 0x7F, 0x09, 0x09, 0x09, 0x06, 101 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 102 | 0x7F, 0x09, 0x19, 0x29, 0x46, 103 | 0x26, 0x49, 0x49, 0x49, 0x32, 104 | 0x03, 0x01, 0x7F, 0x01, 0x03, 105 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 106 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 107 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 108 | 0x63, 0x14, 0x08, 0x14, 0x63, 109 | 0x03, 0x04, 0x78, 0x04, 0x03, 110 | 0x61, 0x59, 0x49, 0x4D, 0x43, 111 | 0x00, 0x7F, 0x41, 0x41, 0x41, 112 | 0x02, 0x04, 0x08, 0x10, 0x20, 113 | 0x00, 0x41, 0x41, 0x41, 0x7F, 114 | 0x04, 0x02, 0x01, 0x02, 0x04, 115 | 0x40, 0x40, 0x40, 0x40, 0x40, 116 | 0x00, 0x03, 0x07, 0x08, 0x00, 117 | 0x20, 0x54, 0x54, 0x78, 0x40, 118 | 0x7F, 0x28, 0x44, 0x44, 0x38, 119 | 0x38, 0x44, 0x44, 0x44, 0x28, 120 | 0x38, 0x44, 0x44, 0x28, 0x7F, 121 | 0x38, 0x54, 0x54, 0x54, 0x18, 122 | 0x00, 0x08, 0x7E, 0x09, 0x02, 123 | 0x18, 0xA4, 0xA4, 0x9C, 0x78, 124 | 0x7F, 0x08, 0x04, 0x04, 0x78, 125 | 0x00, 0x44, 0x7D, 0x40, 0x00, 126 | 0x20, 0x40, 0x40, 0x3D, 0x00, 127 | 0x7F, 0x10, 0x28, 0x44, 0x00, 128 | 0x00, 0x41, 0x7F, 0x40, 0x00, 129 | 0x7C, 0x04, 0x78, 0x04, 0x78, 130 | 0x7C, 0x08, 0x04, 0x04, 0x78, 131 | 0x38, 0x44, 0x44, 0x44, 0x38, 132 | 0xFC, 0x18, 0x24, 0x24, 0x18, 133 | 0x18, 0x24, 0x24, 0x18, 0xFC, 134 | 0x7C, 0x08, 0x04, 0x04, 0x08, 135 | 0x48, 0x54, 0x54, 0x54, 0x24, 136 | 0x04, 0x04, 0x3F, 0x44, 0x24, 137 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 138 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 139 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 140 | 0x44, 0x28, 0x10, 0x28, 0x44, 141 | 0x4C, 0x90, 0x90, 0x90, 0x7C, 142 | 0x44, 0x64, 0x54, 0x4C, 0x44, 143 | 0x00, 0x08, 0x36, 0x41, 0x00, 144 | 0x00, 0x00, 0x77, 0x00, 0x00, 145 | 0x00, 0x41, 0x36, 0x08, 0x00, 146 | 0x02, 0x01, 0x02, 0x04, 0x02, 147 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 148 | 0x1E, 0xA1, 0xA1, 0x61, 0x12, 149 | 0x3A, 0x40, 0x40, 0x20, 0x7A, 150 | 0x38, 0x54, 0x54, 0x55, 0x59, 151 | 0x21, 0x55, 0x55, 0x79, 0x41, 152 | 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut 153 | 0x21, 0x55, 0x54, 0x78, 0x40, 154 | 0x20, 0x54, 0x55, 0x79, 0x40, 155 | 0x0C, 0x1E, 0x52, 0x72, 0x12, 156 | 0x39, 0x55, 0x55, 0x55, 0x59, 157 | 0x39, 0x54, 0x54, 0x54, 0x59, 158 | 0x39, 0x55, 0x54, 0x54, 0x58, 159 | 0x00, 0x00, 0x45, 0x7C, 0x41, 160 | 0x00, 0x02, 0x45, 0x7D, 0x42, 161 | 0x00, 0x01, 0x45, 0x7C, 0x40, 162 | 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut 163 | 0xF0, 0x28, 0x25, 0x28, 0xF0, 164 | 0x7C, 0x54, 0x55, 0x45, 0x00, 165 | 0x20, 0x54, 0x54, 0x7C, 0x54, 166 | 0x7C, 0x0A, 0x09, 0x7F, 0x49, 167 | 0x32, 0x49, 0x49, 0x49, 0x32, 168 | 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut 169 | 0x32, 0x4A, 0x48, 0x48, 0x30, 170 | 0x3A, 0x41, 0x41, 0x21, 0x7A, 171 | 0x3A, 0x42, 0x40, 0x20, 0x78, 172 | 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 173 | 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut 174 | 0x3D, 0x40, 0x40, 0x40, 0x3D, 175 | 0x3C, 0x24, 0xFF, 0x24, 0x24, 176 | 0x48, 0x7E, 0x49, 0x43, 0x66, 177 | 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 178 | 0xFF, 0x09, 0x29, 0xF6, 0x20, 179 | 0xC0, 0x88, 0x7E, 0x09, 0x03, 180 | 0x20, 0x54, 0x54, 0x79, 0x41, 181 | 0x00, 0x00, 0x44, 0x7D, 0x41, 182 | 0x30, 0x48, 0x48, 0x4A, 0x32, 183 | 0x38, 0x40, 0x40, 0x22, 0x7A, 184 | 0x00, 0x7A, 0x0A, 0x0A, 0x72, 185 | 0x7D, 0x0D, 0x19, 0x31, 0x7D, 186 | 0x26, 0x29, 0x29, 0x2F, 0x28, 187 | 0x26, 0x29, 0x29, 0x29, 0x26, 188 | 0x30, 0x48, 0x4D, 0x40, 0x20, 189 | 0x38, 0x08, 0x08, 0x08, 0x08, 190 | 0x08, 0x08, 0x08, 0x08, 0x38, 191 | 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 192 | 0x2F, 0x10, 0x28, 0x34, 0xFA, 193 | 0x00, 0x00, 0x7B, 0x00, 0x00, 194 | 0x08, 0x14, 0x2A, 0x14, 0x22, 195 | 0x22, 0x14, 0x2A, 0x14, 0x08, 196 | 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code 197 | 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block 198 | 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block 199 | 0x00, 0x00, 0x00, 0xFF, 0x00, 200 | 0x10, 0x10, 0x10, 0xFF, 0x00, 201 | 0x14, 0x14, 0x14, 0xFF, 0x00, 202 | 0x10, 0x10, 0xFF, 0x00, 0xFF, 203 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 204 | 0x14, 0x14, 0x14, 0xFC, 0x00, 205 | 0x14, 0x14, 0xF7, 0x00, 0xFF, 206 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 207 | 0x14, 0x14, 0xF4, 0x04, 0xFC, 208 | 0x14, 0x14, 0x17, 0x10, 0x1F, 209 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 210 | 0x14, 0x14, 0x14, 0x1F, 0x00, 211 | 0x10, 0x10, 0x10, 0xF0, 0x00, 212 | 0x00, 0x00, 0x00, 0x1F, 0x10, 213 | 0x10, 0x10, 0x10, 0x1F, 0x10, 214 | 0x10, 0x10, 0x10, 0xF0, 0x10, 215 | 0x00, 0x00, 0x00, 0xFF, 0x10, 216 | 0x10, 0x10, 0x10, 0x10, 0x10, 217 | 0x10, 0x10, 0x10, 0xFF, 0x10, 218 | 0x00, 0x00, 0x00, 0xFF, 0x14, 219 | 0x00, 0x00, 0xFF, 0x00, 0xFF, 220 | 0x00, 0x00, 0x1F, 0x10, 0x17, 221 | 0x00, 0x00, 0xFC, 0x04, 0xF4, 222 | 0x14, 0x14, 0x17, 0x10, 0x17, 223 | 0x14, 0x14, 0xF4, 0x04, 0xF4, 224 | 0x00, 0x00, 0xFF, 0x00, 0xF7, 225 | 0x14, 0x14, 0x14, 0x14, 0x14, 226 | 0x14, 0x14, 0xF7, 0x00, 0xF7, 227 | 0x14, 0x14, 0x14, 0x17, 0x14, 228 | 0x10, 0x10, 0x1F, 0x10, 0x1F, 229 | 0x14, 0x14, 0x14, 0xF4, 0x14, 230 | 0x10, 0x10, 0xF0, 0x10, 0xF0, 231 | 0x00, 0x00, 0x1F, 0x10, 0x1F, 232 | 0x00, 0x00, 0x00, 0x1F, 0x14, 233 | 0x00, 0x00, 0x00, 0xFC, 0x14, 234 | 0x00, 0x00, 0xF0, 0x10, 0xF0, 235 | 0x10, 0x10, 0xFF, 0x10, 0xFF, 236 | 0x14, 0x14, 0x14, 0xFF, 0x14, 237 | 0x10, 0x10, 0x10, 0x1F, 0x00, 238 | 0x00, 0x00, 0x00, 0xF0, 0x10, 239 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 240 | 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 241 | 0xFF, 0xFF, 0xFF, 0x00, 0x00, 242 | 0x00, 0x00, 0x00, 0xFF, 0xFF, 243 | 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 244 | 0x38, 0x44, 0x44, 0x38, 0x44, 245 | 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta 246 | 0x7E, 0x02, 0x02, 0x06, 0x06, 247 | 0x02, 0x7E, 0x02, 0x7E, 0x02, 248 | 0x63, 0x55, 0x49, 0x41, 0x63, 249 | 0x38, 0x44, 0x44, 0x3C, 0x04, 250 | 0x40, 0x7E, 0x20, 0x1E, 0x20, 251 | 0x06, 0x02, 0x7E, 0x02, 0x02, 252 | 0x99, 0xA5, 0xE7, 0xA5, 0x99, 253 | 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 254 | 0x4C, 0x72, 0x01, 0x72, 0x4C, 255 | 0x30, 0x4A, 0x4D, 0x4D, 0x30, 256 | 0x30, 0x48, 0x78, 0x48, 0x30, 257 | 0xBC, 0x62, 0x5A, 0x46, 0x3D, 258 | 0x3E, 0x49, 0x49, 0x49, 0x00, 259 | 0x7E, 0x01, 0x01, 0x01, 0x7E, 260 | 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 261 | 0x44, 0x44, 0x5F, 0x44, 0x44, 262 | 0x40, 0x51, 0x4A, 0x44, 0x40, 263 | 0x40, 0x44, 0x4A, 0x51, 0x40, 264 | 0x00, 0x00, 0xFF, 0x01, 0x03, 265 | 0xE0, 0x80, 0xFF, 0x00, 0x00, 266 | 0x08, 0x08, 0x6B, 0x6B, 0x08, 267 | 0x36, 0x12, 0x36, 0x24, 0x36, 268 | 0x06, 0x0F, 0x09, 0x0F, 0x06, 269 | 0x00, 0x00, 0x18, 0x18, 0x00, 270 | 0x00, 0x00, 0x10, 0x10, 0x00, 271 | 0x30, 0x40, 0xFF, 0x01, 0x01, 272 | 0x00, 0x1F, 0x01, 0x01, 0x1E, 273 | 0x00, 0x19, 0x1D, 0x17, 0x12, 274 | 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 275 | 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP 276 | }; 277 | 278 | #endif // FONT5X7_H 279 | -------------------------------------------------------------------------------- /PDQ_GFX/library.properties: -------------------------------------------------------------------------------- 1 | name=PDQ GFX Library 2 | version=1.1.5 3 | author=XarkLabs 4 | maintainer=Xark 5 | sentence=PDQ GFX graphics core library, this is the 'core' class that the other PDQ driver libraries derive from. 6 | paragraph=Install this library in addition to the PDQ GFX display library for your hardware. The PDQ_GFX library and drivers are "re-mixed" speed and size optimzed versions of Adafruit_GFX library and drivers for AVR Arduino (while maintaining sketch compatibility with original). Thanks Adafruit! Visit #Arduino on freenode.net IRC 7 | category=Display 8 | url=https://github.com/XarkLabs/PDQ_GFX_Libs/tree/master/PDQ_GFX 9 | architectures=* 10 | -------------------------------------------------------------------------------- /PDQ_GFX/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012 Adafruit Industries. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /PDQ_ILI9340/PDQ_ILI9340.cpp: -------------------------------------------------------------------------------- 1 | // Nothing, all in the header 2 | -------------------------------------------------------------------------------- /PDQ_ILI9340/README.txt: -------------------------------------------------------------------------------- 1 | NOTE: This file is from the Adafruit_ILI9340 library (which PDQ_IL9340 was based on). Thanks Adafruit! 2 | 3 | This is a library for the Adafruit 2.2" SPI display. 4 | This library works with the Adafruit 2.2" TFT Breakout w/SD card 5 | ----> http://www.adafruit.com/products/1480 6 | 7 | Check out the links above for our tutorials and wiring diagrams. 8 | These displays use SPI to communicate, 4 or 5 pins are required 9 | to interface (RST is optional). 10 | Adafruit invests time and resources providing this open source code, 11 | please support Adafruit and open-source hardware by purchasing 12 | products from Adafruit! 13 | 14 | Written by Limor Fried/Ladyada for Adafruit Industries. 15 | MIT license, all text above must be included in any redistribution 16 | 17 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_ILI9340. Check that the Adafruit_ILI9340 folder contains Adafruit_ILI9340.cpp and Adafruit_ILI9340. 18 | 19 | Place the Adafruit_ILI9340 library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE 20 | 21 | Also requires the Adafruit_GFX library for Arduino. 22 | -------------------------------------------------------------------------------- /PDQ_ILI9340/examples/PDQ_GFX_Button_test/PDQ_GFX_Button_test.ino: -------------------------------------------------------------------------------- 1 | // Simple test of PDQ_GFX_Button (based on Adafruit http://github.com/adafruit/Adafruit-GFX-Library) 2 | // This is designed to use Arduino Uno (or equivilent) 3 | // with Adafruit 2.8" TFT Touch Shield for Arduino w/Capacitive Touch (http://www.adafruit.com/products/1947) 4 | 5 | #include // must include this here (or else IDE can't find it) 6 | #include // must include this here (or else IDE can't find it) 7 | #include 8 | #include "PDQ_ILI9340_config.h" // PDQ: ILI9340 pins and other setup for this sketch 9 | #include 10 | #include // I2C capacitive touch library from Adafruit 11 | 12 | Adafruit_FT6206 ts = Adafruit_FT6206(); // touch screen library object 13 | PDQ_ILI9340 tft = PDQ_ILI9340(); // PDQ_GFX lcd library object 14 | 15 | #define NUM_BUTTONS 2 16 | PDQ_GFX_Button button[NUM_BUTTONS]; // array of buttons 17 | 18 | int16_t current_count = 0; // test count 19 | 20 | void setup(void) 21 | { 22 | Serial.begin(9600); 23 | 24 | tft.begin(); 25 | 26 | if (!ts.begin()) 27 | { 28 | Serial.println(F("Unable to start touchscreen.")); 29 | } 30 | else 31 | { 32 | Serial.println(F("Touchscreen started.")); 33 | } 34 | 35 | button[0].initButton(&tft, 60, 100, 72, 72, ILI9340_RED, ILI9340_BLACK, ILI9340_WHITE, "Decrement", 1); 36 | button[1].initButton(&tft, 180, 100, 72, 72, ILI9340_GREEN, ILI9340_BLACK, ILI9340_WHITE, "Increment", 1); 37 | 38 | tft.fillScreen(ILI9340_BLUE); 39 | 40 | tft.setCursor(54, 10); 41 | tft.setTextColor(ILI9340_WHITE, ILI9340_BLUE); 42 | tft.setTextSize(1); 43 | tft.print(F("Simple GFX_Button Test")); 44 | 45 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 46 | button[i].drawButton(false); 47 | } 48 | 49 | void loop() 50 | { 51 | // See if screen is being touched 52 | if (ts.touched()) 53 | { 54 | // Retrieve touch point 55 | TS_Point p = ts.getPoint(); 56 | 57 | // reverse coordinates to match orientation of LCD 58 | int x = tft.width() - p.x; 59 | int y = tft.height() - p.y; 60 | 61 | // tft.drawPixel(x, y, 0xffff); // touch debugging 62 | 63 | // loop through buttons and process touch coordinate 64 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 65 | { 66 | if (button[i].contains(x, y)) 67 | { 68 | button[i].press(true); 69 | } 70 | else 71 | { 72 | // if still touched, but outside of button area 73 | if (button[i].isPressed()) 74 | button[i].drawButton(false); // unhighlight 75 | button[i].press(false); // set not pressed 76 | button[i].press(false); // twice, because we don't want "justReleased" to return true 77 | } 78 | } 79 | } 80 | else 81 | { 82 | // screen not touched, so all buttons not pressed 83 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 84 | button[i].press(false); 85 | } 86 | 87 | // draw button and perform action if button was just released 88 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 89 | { 90 | if (button[i].justPressed()) 91 | { 92 | button[i].drawButton(true); 93 | } 94 | else if (button[i].justReleased()) 95 | { 96 | button[i].drawButton(false); 97 | 98 | // perform button action (decrement or increment in this simple test) 99 | if (i == 0) 100 | current_count -= 1; 101 | else if (i == 1) 102 | current_count += 1; 103 | } 104 | } 105 | 106 | // draw the current count 107 | tft.setCursor(60, 200); 108 | tft.setTextColor(ILI9340_WHITE, ILI9340_BLUE); 109 | tft.setTextSize(2); 110 | tft.print("Count = "); 111 | tft.print(current_count); 112 | tft.print(" "); 113 | 114 | // make sure we don't go too fast for touch controller 115 | delay(1); 116 | } 117 | -------------------------------------------------------------------------------- /PDQ_ILI9340/examples/PDQ_GFX_Button_test/PDQ_ILI9340_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ILI9341 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9341.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | // NOTE: These are typical hookups individual boards will vary, please check your documentation. 8 | // CAUTION: While Adafruit boards generally always come with needed level-converters, I find many 9 | // other LCD displays advertised as supporting 5V only support 5V power (with a regulator). 10 | // They still only have 3.3V safe logic (CS, DC, RESET, MOSI, SCK marked with * below). 11 | // If this is the case you will need a voltage level-converter (e.g., HC4050, divider circuit etc.). 12 | // 13 | // LCD PIN Uno (328) Leo (32u4) 644/1284 14 | // ------- --------- ---------- -------- 15 | // 1 VCC 3.3V/5V 3.3V/5V 3.3V/5V // +3.3V or 5V with on-board regulator 16 | // 2 GND GND GND GND 17 | // 3* CS 10 10 4 // Could be any GPIO pin, but then need to make sure SS isn't a LOW input (or slave SPI mode) 18 | // 4* RESET 0/8/RESET 0/8/RESET 0/RESET // This relies on soft-reset. You can also use Arduino reset pin (if correct voltage). 19 | // 5* DC/RS 9 9 3 // Could be any GPIO pin 20 | // 6* SDI/MOSI 11 ICSP4 5 // HW SPI pin (can't change) 21 | // 7* SCK 13 ICSP3 7 // HW SPI pin (can't change) NOTE: On Uno this causes on-board LED to flicker during SPI use 22 | // 8* LED 3.3V/5V 3.3V/5V 3.3V/5V // LCD screen blanked when LOW (could use GPIO for PWM dimming) 23 | // 9 SDO/MISO - - - // (not used if present, LCD code is currently "write only") 24 | // 25 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 26 | 27 | #define ILI9340_CS_PIN 10 // <= /CS pin (chip-select, LOW to get attention of ILI9341, HIGH and it ignores SPI bus) 28 | #define ILI9340_DC_PIN 9 // <= DC pin (1=data or 0=command indicator line) also called RS 29 | #define ILI9340_RST_PIN 8 // <= RST pin (optional) 30 | // 644/1284 #define ST7735_CS_PIN 4 // <= /CS pin (chip-select, LOW to get attention of ILI9341, HIGH and it ignores SPI bus) 31 | // 644/1284 #define ST7735_DC_PIN 3 // <= DC pin (1=data or 0=command indicator line) also called RS 32 | // (other pins used are dictated by AVR HW SPI used as shown above) 33 | 34 | // other PDQ library options 35 | #define ILI9340_SAVE_SPCR 0 // <= 0/1 with 1 to save/restore AVR SPI control register (to "play nice" when other SPI use) 36 | -------------------------------------------------------------------------------- /PDQ_ILI9340/examples/PDQ_graphicstest/PDQ_ILI9340_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ILI9340 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9340.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | // NOTE: These are typical hookups individual boards will vary, please check your documentation. 8 | // CAUTION: While Adafruit boards generally always come with needed level-converters, I find many 9 | // other LCD displays advertised as supporting 5V only support 5V power (with a regulator). 10 | // They still only have 3.3V safe logic (CS, DC, RESET, MOSI, SCK marked with * below). 11 | // If this is the case you will need a voltage level-converter (e.g., HC4050, divider circuit etc.). 12 | // 13 | // LCD PIN Uno (328) Leo (32u4) 644/1284 14 | // ------- --------- ---------- -------- 15 | // 1 VCC 3.3V/5V 3.3V/5V 3.3V/5V // +3.3V or 5V with on-board regulator 16 | // 2 GND GND GND GND 17 | // 3* CS 10 10 4 // Could be any GPIO pin, but then need to make sure SS isn't a LOW input (or slave SPI mode) 18 | // 4* RESET 0/8/RESET 0/8/RESET 0/RESET // This relies on soft-reset. You can also use Arduino reset pin (if correct voltage). 19 | // 5* DC/RS 9 9 3 // Could be any GPIO pin 20 | // 6* SDI/MOSI 11 ICSP4 5 // HW SPI pin (can't change) 21 | // 7* SCK 13 ICSP3 7 // HW SPI pin (can't change) NOTE: On Uno this causes on-board LED to flicker during SPI use 22 | // 8* LED 3.3V/5V 3.3V/5V 3.3V/5V // LCD screen blanked when LOW (could use GPIO for PWM dimming) 23 | // 9 SDO/MISO - - - // (not used if present, LCD code is currently "write only") 24 | // 25 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 26 | 27 | #define ILI9340_CS_PIN 10 // <= /CS pin (chip-select, LOW to get attention of ILI9340, HIGH and it ignores SPI bus) 28 | #define ILI9340_DC_PIN 9 // <= DC pin (1=data or 0=command indicator line) also called RS 29 | #define ILI9340_RST_PIN 8 // <= RST pin (optional) 30 | // 644/1284 #define ST7735_CS_PIN 4 // <= /CS pin (chip-select, LOW to get attention of ILI9340, HIGH and it ignores SPI bus) 31 | // 644/1284 #define ST7735_DC_PIN 3 // <= DC pin (1=data or 0=command indicator line) also called RS 32 | // (other pins used are dictated by AVR HW SPI used as shown above) 33 | 34 | // other PDQ library options 35 | #define ILI9340_SAVE_SPCR 0 // <= 0/1 with 1 to save/restore AVR SPI control register (to "play nice" when other SPI use) 36 | -------------------------------------------------------------------------------- /PDQ_ILI9340/library.properties: -------------------------------------------------------------------------------- 1 | name=PDQ_ILI9340 driver for PDQ_GFX Library 2 | version=1.1.5 3 | author=XarkLabs 4 | maintainer=Xark 5 | sentence=This is driver for IL9340 SPI LCD that goes with PDQ_GFX library. 6 | paragraph=The PDQ_GFX library and drivers are "re-mixed" speed and size optimzed versions of Adafruit_GFX library and drivers for AVR Arduino (while maintaining sketch compatibility with original). Thanks Adafruit! Visit #Arduino on freenode.net IRC 7 | category=Display 8 | url=https://github.com/XarkLabs/PDQ_GFX_Libs/tree/master/PDQ_ILI9340 9 | architectures=avr 10 | -------------------------------------------------------------------------------- /PDQ_ILI9340/tools/HaD_240x320.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_ILI9340/tools/HaD_240x320.bmp -------------------------------------------------------------------------------- /PDQ_ILI9340/tools/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Simple makefile for monochrome BMP to RLE data 3 | # 4 | all: crunch_bmp_rle 5 | 6 | crunch_bmp_rle: crunch_bmp_rle.cpp 7 | $(CXX) -Wall -Wextra -Os -o $@ $< 8 | 9 | clean: 10 | $(RM) crunch_bmp_rle crunch_bmp_rle.exe 11 | -------------------------------------------------------------------------------- /PDQ_ILI9340/tools/crunch_bmp_rle.cpp: -------------------------------------------------------------------------------- 1 | // Hacktastic Q & D BMP -> TVGameKit sprite cruncher 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | uint8_t bmp_header[54]; 10 | uint32_t pixel_offset; 11 | uint32_t dib_size; 12 | int32_t bmp_width; 13 | int32_t bmp_height; 14 | int16_t bmp_bpp; 15 | uint32_t bmp_line; 16 | uint8_t *RGB24_bitmap; 17 | 18 | #define MAX_SPRITES 256 19 | 20 | struct sprite_info 21 | { 22 | char *name; 23 | int32_t width; 24 | int32_t height; 25 | int32_t byte_width; 26 | uint8_t *mono_bitmap; 27 | uint8_t *mask_bitmap; 28 | }; 29 | 30 | int32_t num_sprites; 31 | struct sprite_info sprite[MAX_SPRITES]; 32 | 33 | // data = (data & mask) ^ mono; 34 | // 35 | // mask mono 36 | // 0 0 = black 37 | // 0 1 = white 38 | // 1 0 = transparent 39 | // 1 1 = xor 40 | // 41 | 42 | uint8_t human_readable = 0; 43 | uint8_t verbose = 1; 44 | 45 | uint8_t preamble_done = 0; 46 | 47 | int main(int argc, char* argv[]) 48 | { 49 | int32_t x, y, size; 50 | int32_t arg; 51 | struct sprite_info *spr = NULL; 52 | 53 | const char* bmp_name; 54 | FILE* f = NULL; 55 | 56 | for (arg = 1; arg < argc; arg++) 57 | { 58 | spr = &sprite[num_sprites]; 59 | 60 | if (argv[arg][0] == '-') 61 | { 62 | char *namestr = NULL; 63 | char c = argv[arg][1]; 64 | if (c >= 'A' && c <= 'Z') 65 | c += 32; 66 | switch(c) 67 | { 68 | case 'n': 69 | namestr = &argv[arg][2]; 70 | 71 | if (*namestr == 0 && arg+1 < argc) 72 | namestr = argv[++arg]; 73 | 74 | if (*namestr == 0) 75 | { 76 | fprintf(stderr, "Need symbol name after -n.\n"); 77 | exit(5); 78 | } 79 | 80 | if (spr->name) 81 | free(spr->name); 82 | spr->name = strdup(namestr); 83 | 84 | break; 85 | 86 | default: 87 | printf("Usage: crunch_bmp_rle [-n ]\n"); 88 | printf("\n"); 89 | printf(" -n - Name of next tilemap or tileset font (or BMP name used)\n"); 90 | printf("\n"); 91 | printf("Output will go to stdout, so use \"> output\" to redirect to file.\n"); 92 | exit(1); 93 | 94 | break; 95 | } 96 | 97 | continue; 98 | } 99 | 100 | bmp_name = argv[arg]; 101 | 102 | if ((f = fopen(bmp_name, "rb")) == NULL) 103 | { 104 | fprintf(stderr, "Error opening input BMP file \"%s\".\n", bmp_name); 105 | exit(5); 106 | } 107 | 108 | if (fread(bmp_header, sizeof (unsigned char), 54, f) != 54) 109 | { 110 | fprintf(stderr, "Error reading BMP header from \"%s\".\n", bmp_name); 111 | exit(5); 112 | } 113 | 114 | if (bmp_header[0] != 'B' || bmp_header[1] != 'M') 115 | { 116 | fprintf(stderr, "Error not valid BMP format \"%s\".\n", bmp_name); 117 | exit(5); 118 | } 119 | 120 | pixel_offset = bmp_header[10] | (bmp_header[11]<<8) | (bmp_header[12]<<16) | (bmp_header[13]<<24); 121 | dib_size = bmp_header[14] | (bmp_header[15]<<8) | (bmp_header[16]<<16) | (bmp_header[17]<<24); 122 | 123 | if (dib_size != 40) 124 | { 125 | fprintf(stderr, "Error unsupported BMP format DIB=%d \"%s\".\n", dib_size, bmp_name); 126 | exit(5); 127 | } 128 | 129 | // extract image height and width from header 130 | bmp_width = bmp_header[18] | (bmp_header[19]<<8) | (bmp_header[20]<<16) | (bmp_header[21]<<24); 131 | bmp_height = bmp_header[22] | (bmp_header[23]<<8) | (bmp_header[24]<<16) | (bmp_header[25]<<24); 132 | if (bmp_width < 0) 133 | bmp_width = -bmp_width; 134 | if (bmp_height < 0) 135 | bmp_height = -bmp_height; 136 | bmp_bpp = bmp_header[28] | (bmp_header[29]<<8); 137 | 138 | if (bmp_width < 1 || bmp_width > 4096 || bmp_height < 1 || bmp_height > 4096 || bmp_bpp != 24) 139 | { 140 | fprintf(stderr, "BMP \"%s\" size or depth fails sanity check (%d x %d bpp=%d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp); 141 | exit(5); 142 | } 143 | 144 | bmp_line = (((bmp_width*bmp_bpp) + 31) / 32) * 4; 145 | size = bmp_line * bmp_height; 146 | 147 | printf("\n// File: \"%s\": %d x %d (%d bpp, pixel offset %d, bytes per line %d, bitmap size %d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp, pixel_offset, bmp_line, size); 148 | 149 | RGB24_bitmap = (uint8_t *)malloc(size); 150 | if (!RGB24_bitmap) 151 | { 152 | fprintf(stderr, "Failed allocating %d bytes.\n", size); 153 | exit(5); 154 | } 155 | memset(RGB24_bitmap, 0, size); 156 | 157 | // seek to bitmap pixels and read them in 158 | if (fseek(f, pixel_offset, SEEK_SET) != 0 || fread(RGB24_bitmap, sizeof (unsigned char), size, f) != (size_t)size) 159 | { 160 | fprintf(stderr, "Error reading %d bytes of BMP data from \"%s\".\n", size, bmp_name); 161 | exit(5); 162 | } 163 | fclose(f); 164 | f = NULL; 165 | 166 | // convert bitmap into sprite and fill out sprite_info 167 | 168 | // give it a symbol name if not already specified 169 | if (spr->name == NULL) 170 | { 171 | char str_temp[256]; 172 | const char *n = bmp_name; 173 | 174 | // find start of filename after path 175 | if (strrchr(n, '/')) 176 | n = strrchr(n, '/')+1; 177 | else if (strrchr(n, '\\')) 178 | n = strrchr(n, '\\')+1; 179 | else if (strrchr(n, ':')) 180 | n = strrchr(n, ':')+1; 181 | 182 | strncpy(str_temp, n, sizeof (str_temp)-1); 183 | 184 | // remove extension 185 | if (strrchr(str_temp, '.')) 186 | *strrchr(str_temp, '.') = 0; 187 | 188 | spr->name = strdup(str_temp); 189 | } 190 | 191 | spr->width = bmp_width; 192 | spr->byte_width = ((spr->width + 7)/8)+1; 193 | spr->height = bmp_height; 194 | size = spr->byte_width * spr->height; 195 | spr->mono_bitmap = (uint8_t *)malloc(size); 196 | if (!spr->mono_bitmap) 197 | { 198 | fprintf(stderr, "Failed allocating %d bytes for mono bitmap.\n", size); 199 | exit(5); 200 | } 201 | memset(spr->mono_bitmap, 0, size); 202 | 203 | spr->mask_bitmap = (uint8_t *)malloc(size); 204 | if (!spr->mask_bitmap) 205 | { 206 | fprintf(stderr, "Failed allocating %d bytes for mask bitmap.\n", size); 207 | exit(5); 208 | } 209 | memset(spr->mask_bitmap, 0xff, size); 210 | 211 | printf("// BMP #%d \"%s\" (%d x %d with '.'=trans, ' '=black, 'X'=XOR, 'W'=white):\n\n", num_sprites, spr->name, spr->width, spr->height); 212 | printf("// *"); 213 | for (x = 0; x < bmp_width; x++) 214 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 215 | printf("*\n"); 216 | 217 | for (y = 0; y < bmp_height; y++) 218 | { 219 | printf("// %c", (y & 0x7) == 0x0 ? '+' : '|'); 220 | for (x = 0; x < bmp_width; x++) 221 | { 222 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 223 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 224 | uint8_t t = b ? '*' : '.'; 225 | 226 | printf("%c", t); 227 | } 228 | printf("%c\n", (y & 0x7) == 0x0 ? '+' : '|'); 229 | } 230 | 231 | printf("// *"); 232 | for (x = 0; x < bmp_width; x++) 233 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 234 | printf("*\n"); 235 | 236 | printf("\n// Compressed RLE data\n"); 237 | printf("const uint8_t %s[] PROGMEM =\n{\n\t", spr->name); 238 | 239 | uint32_t currun = 0; 240 | uint8_t curstate = 0; 241 | uint8_t* compout = spr->mono_bitmap; 242 | int tok = 0; 243 | 244 | for (y = 0; y < bmp_height; y++) 245 | { 246 | for (x = 0; x < bmp_width; x++) 247 | { 248 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 249 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 250 | 251 | if (b == curstate && currun < 32767) 252 | currun++; 253 | else 254 | { 255 | if (currun < 128) 256 | { 257 | *compout++ = currun; 258 | printf("0x%02x, ", currun); 259 | tok += 1; 260 | if (tok >= 16) 261 | { 262 | tok = 0; 263 | printf("\n\t"); 264 | } 265 | } 266 | else 267 | { 268 | *compout++ = (currun >> 8) | 0x80; 269 | *compout++ = (currun & 0xff); 270 | 271 | printf("0x%02x, ", 0x80 | (currun >> 8)); 272 | tok += 1; 273 | if (tok >= 16) 274 | { 275 | tok = 0; 276 | printf("\n\t"); 277 | } 278 | printf("0x%02x, ", (currun & 0xff)); 279 | tok += 1; 280 | if (tok >= 16) 281 | { 282 | tok = 0; 283 | printf("\n\t"); 284 | } 285 | } 286 | currun = 1; 287 | curstate = !curstate; 288 | } 289 | } 290 | } 291 | 292 | if (currun) 293 | { 294 | if (currun < 128) 295 | { 296 | *compout++ = currun; 297 | printf("0x%02x", currun); 298 | tok += 1; 299 | if (tok >= 16) 300 | { 301 | tok = 0; 302 | printf("\n\t"); 303 | } 304 | else 305 | printf(", "); 306 | 307 | } 308 | else 309 | { 310 | *compout++ = (currun >> 8) | 0x80; 311 | *compout++ = (currun & 0xff); 312 | 313 | printf("0x%02x", 0x80 | (currun >> 8)); 314 | tok += 1; 315 | if (tok >= 16) 316 | { 317 | tok = 0; 318 | printf("\n\t"); 319 | } 320 | else 321 | printf(", "); 322 | printf("0x%02x", (currun & 0xff)); 323 | tok += 1; 324 | if (tok >= 16) 325 | { 326 | tok = 0; 327 | printf("\n\t"); 328 | } 329 | else 330 | printf(", "); 331 | } 332 | } 333 | printf("\n};\n"); 334 | printf("\n// Compressed RLE size %d\n", (int32_t)(compout - spr->mono_bitmap)); 335 | 336 | printf("\n// Test decompress:\n"); 337 | 338 | uint8_t *cmp = spr->mono_bitmap; 339 | 340 | printf("// "); 341 | 342 | int runcnt; 343 | int color = 0; 344 | int pixcount = 0; 345 | while (cmp < compout) 346 | { 347 | runcnt = *cmp++; 348 | if (runcnt & 0x80) 349 | runcnt = ((runcnt & 0x7f) << 8) | *cmp++; 350 | 351 | while (runcnt--) 352 | { 353 | printf("%d", color); 354 | if (++pixcount == bmp_width) 355 | { 356 | pixcount = 0; 357 | printf("\n// "); 358 | } 359 | } 360 | color ^= 1; 361 | } 362 | 363 | printf("\n\n"); 364 | 365 | free(RGB24_bitmap); 366 | RGB24_bitmap = NULL; 367 | 368 | num_sprites++; 369 | } 370 | 371 | printf("// EOF\n"); 372 | fprintf(stderr, "Done!\n"); 373 | 374 | return 0; 375 | } 376 | -------------------------------------------------------------------------------- /PDQ_ILI9340/tools/readme.txt: -------------------------------------------------------------------------------- 1 | This a little "throw-away" utility I used to crunch a monochrome HackADay logo (http://hackaday.com) into something 2 | small enough to include in the benchmark. See "graphictest" example for how to decompress. 3 | 4 | It is messily hacked together, so beware (originally from an Arduino composite video sprite library "cruncher" https://www.youtube.com/watch?v=Imk5ony8JHI that is still a W.I.P.) 5 | 6 | Thanks Hack-A-Day (for your cool logo - please don't sue me...) 7 | -------------------------------------------------------------------------------- /PDQ_ILI9341/.gitignore: -------------------------------------------------------------------------------- 1 | /__history/ 2 | -------------------------------------------------------------------------------- /PDQ_ILI9341/PDQ_ILI9341.cpp: -------------------------------------------------------------------------------- 1 | // Nothing, all in the header 2 | -------------------------------------------------------------------------------- /PDQ_ILI9341/README.txt: -------------------------------------------------------------------------------- 1 | NOTE: This file is from the Adafruit_ILI9341 library (which PDQ_IL9341 was based on). Thanks Adafruit! 2 | 3 | This is a library for the Adafruit 2.2" SPI display. 4 | This library works with the Adafruit 2.2" TFT Breakout w/SD card 5 | ----> http://www.adafruit.com/products/1480 6 | 7 | Check out the links above for our tutorials and wiring diagrams. 8 | These displays use SPI to communicate, 4 or 5 pins are required 9 | to interface (RST is optional). 10 | Adafruit invests time and resources providing this open source code, 11 | please support Adafruit and open-source hardware by purchasing 12 | products from Adafruit! 13 | 14 | Written by Limor Fried/Ladyada for Adafruit Industries. 15 | MIT license, all text above must be included in any redistribution 16 | 17 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_ILI9340. Check that the Adafruit_ILI9340 folder contains Adafruit_ILI9340.cpp and Adafruit_ILI9340. 18 | 19 | Place the Adafruit_ILI9340 library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE 20 | 21 | Also requires the Adafruit_GFX library for Arduino. 22 | -------------------------------------------------------------------------------- /PDQ_ILI9341/examples/PDQ_GFX_Button_test/PDQ_GFX_Button_test.ino: -------------------------------------------------------------------------------- 1 | // Simple test of PDQ_GFX_Button (based on Adafruit http://github.com/adafruit/Adafruit-GFX-Library) 2 | // This is designed to use Arduino Uno (or equivilent) 3 | // with Adafruit 2.8" TFT Touch Shield for Arduino w/Capacitive Touch (http://www.adafruit.com/products/1947) 4 | 5 | #include // must include this here (or else IDE can't find it) 6 | #include // must include this here (or else IDE can't find it) 7 | #include 8 | #include "PDQ_ILI9341_config.h" // PDQ: ILI9341 pins and other setup for this sketch 9 | #include 10 | #include // I2C capacitive touch library from Adafruit 11 | 12 | Adafruit_FT6206 ts = Adafruit_FT6206(); // touch screen library object 13 | PDQ_ILI9341 tft = PDQ_ILI9341(); // PDQ_GFX lcd library object 14 | 15 | #define NUM_BUTTONS 2 16 | PDQ_GFX_Button button[NUM_BUTTONS]; // array of buttons 17 | 18 | int16_t current_count = 0; // test count 19 | 20 | void setup(void) 21 | { 22 | Serial.begin(9600); 23 | 24 | tft.begin(); 25 | 26 | if (!ts.begin()) 27 | { 28 | Serial.println(F("Unable to start touchscreen.")); 29 | } 30 | else 31 | { 32 | Serial.println(F("Touchscreen started.")); 33 | } 34 | 35 | button[0].initButton(&tft, 60, 100, 72, 72, ILI9341_RED, ILI9341_BLACK, ILI9341_WHITE, "Decrement", 1); 36 | button[1].initButton(&tft, 180, 100, 72, 72, ILI9341_GREEN, ILI9341_BLACK, ILI9341_WHITE, "Increment", 1); 37 | 38 | tft.fillScreen(ILI9341_BLUE); 39 | 40 | tft.setCursor(54, 10); 41 | tft.setTextColor(ILI9341_WHITE, ILI9341_BLUE); 42 | tft.setTextSize(1); 43 | tft.print(F("Simple GFX_Button Test")); 44 | 45 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 46 | button[i].drawButton(false); 47 | } 48 | 49 | void loop() 50 | { 51 | // See if screen is being touched 52 | if (ts.touched()) 53 | { 54 | // Retrieve touch point 55 | TS_Point p = ts.getPoint(); 56 | 57 | // reverse coordinates to match orientation of LCD 58 | int x = tft.width() - p.x; 59 | int y = tft.height() - p.y; 60 | 61 | // tft.drawPixel(x, y, 0xffff); // touch debugging 62 | 63 | // loop through buttons and process touch coordinate 64 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 65 | { 66 | if (button[i].contains(x, y)) 67 | { 68 | button[i].press(true); 69 | } 70 | else 71 | { 72 | // if still touched, but outside of button area 73 | if (button[i].isPressed()) 74 | button[i].drawButton(false); // unhighlight 75 | button[i].press(false); // set not pressed 76 | button[i].press(false); // twice, because we don't want "justReleased" to return true 77 | } 78 | } 79 | } 80 | else 81 | { 82 | // screen not touched, so all buttons not pressed 83 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 84 | button[i].press(false); 85 | } 86 | 87 | // draw button and perform action if button was just released 88 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 89 | { 90 | if (button[i].justPressed()) 91 | { 92 | button[i].drawButton(true); 93 | } 94 | else if (button[i].justReleased()) 95 | { 96 | button[i].drawButton(false); 97 | 98 | // perform button action (decrement or increment in this simple test) 99 | if (i == 0) 100 | current_count -= 1; 101 | else if (i == 1) 102 | current_count += 1; 103 | } 104 | } 105 | 106 | // draw the current count 107 | tft.setCursor(60, 200); 108 | tft.setTextColor(ILI9341_WHITE, ILI9341_BLUE); 109 | tft.setTextSize(2); 110 | tft.print("Count = "); 111 | tft.print(current_count); 112 | tft.print(" "); 113 | 114 | // make sure we don't go too fast for touch controller 115 | delay(1); 116 | } 117 | -------------------------------------------------------------------------------- /PDQ_ILI9341/examples/PDQ_GFX_Button_test/PDQ_ILI9341_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ILI9341 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9341.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | // NOTE: These are typical hookups individual boards will vary, please check your documentation. 8 | // CAUTION: While Adafruit boards generally always come with needed level-converters, I find many 9 | // other LCD displays advertised as supporting 5V only support 5V power (with a regulator). 10 | // They still only have 3.3V safe logic (CS, DC, RESET, MOSI, SCK marked with * below). 11 | // If this is the case you will need a voltage level-converter (e.g., HC4050, divider circuit etc.). 12 | // 13 | // LCD PIN Uno (328) Leo (32u4) 644/1284 14 | // ------- --------- ---------- -------- 15 | // 1 VCC 3.3V/5V 3.3V/5V 3.3V/5V // +3.3V or 5V with on-board regulator 16 | // 2 GND GND GND GND 17 | // 3* CS 10 10 4 // Could be any GPIO pin, but then need to make sure SS isn't a LOW input (or slave SPI mode) 18 | // 4* RESET 0/8/RESET 0/8/RESET 0/RESET // This relies on soft-reset. You can also use Arduino reset pin (if correct voltage). 19 | // 5* DC/RS 9 9 3 // Could be any GPIO pin 20 | // 6* SDI/MOSI 11 ICSP4 5 // HW SPI pin (can't change) 21 | // 7* SCK 13 ICSP3 7 // HW SPI pin (can't change) NOTE: On Uno this causes on-board LED to flicker during SPI use 22 | // 8* LED 3.3V/5V 3.3V/5V 3.3V/5V // LCD screen blanked when LOW (could use GPIO for PWM dimming) 23 | // 9 SDO/MISO - - - // (not used if present, LCD code is currently "write only") 24 | // 25 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 26 | 27 | #define ILI9341_CS_PIN 10 // <= /CS pin (chip-select, LOW to get attention of ILI9341, HIGH and it ignores SPI bus) 28 | #define ILI9341_DC_PIN 9 // <= DC pin (1=data or 0=command indicator line) also called RS 29 | #define ILI9341_RST_PIN 8 // <= RST pin (optional) 30 | // (other pins used are dictated by AVR HW SPI used as shown above) 31 | 32 | // other PDQ library options 33 | #define ILI9341_SAVE_SPI_SETTINGS 0 // <= 0/1 with 1 to save/restore AVR SPI control and statusregisters (required when other SPI devices are in use with other settings) 34 | -------------------------------------------------------------------------------- /PDQ_ILI9341/examples/PDQ_attinytest/PDQ_ILI9341_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ILI9341 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9341.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | #if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny45__) 8 | #error Sorry, this example is designed for ATtiny parts 9 | #endif 10 | 11 | // 12 | // NOTE: It is confusing, but USI SPI on ATtiny does not use the same pins as ISP SPI! 13 | // Specifically MOSI is really DO pin 1 (even though used as MISO for ISP) 14 | // 15 | // These are based on Arduino ATtiny pins as defined here http://highlowtech.org/?p=1695 16 | 17 | // LCD PIN ATtiny85 18 | // ------- --------- 19 | // 1 VCC 3.3V/5V (depending on module) 20 | // 2 GND GND 21 | // 3* CS 0 22 | // 4* RESET 3.3V/5V (depending on module, perhaps through 10K pull-up) 23 | // 5* DC/RS 3 24 | // 6* SDI/MOSI 1 25 | // 7* SCK 2 26 | // 8* LED 3.3V/5V 27 | // 9 SDO/MISO - 28 | // 29 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 30 | 31 | #define ILI9341_CS_PIN 0 // <= /CS pin (chip-select, LOW to get attention of ST7735, HIGH and it ignores SPI bus) 32 | #define ILI9341_DC_PIN 3 // <= DC pin (1=data or 0=command indicator line) also called RS 33 | //#define ILI9341_RST_PIN RESET // <= RST pin (optional) 34 | #define ILI9341_MOSI_PIN 1 // <= MOSI pin (if not hardware SPI) 35 | //#define ILI9341_MISO_PIN 0 // <= MISO pin (if not hardware SPI) 36 | #define ILI9341_SCLK_PIN 2 // <= SCLK pin (if not hardware SPI) 37 | // (with hardware SPI some pins dictated by AVR PIN function - as shown above) 38 | 39 | // other PDQ library options 40 | #define ILI9341_SAVE_SPI_SETTINGS 0 // <= 0/1 with 1 to save/restore AVR SPI control and statusregisters (required when other SPI devices are in use with other settings) 41 | -------------------------------------------------------------------------------- /PDQ_ILI9341/examples/PDQ_attinytest/PDQ_attinytest.ino: -------------------------------------------------------------------------------- 1 | // This is part of the PDQ re-mixed version of Adafruit's GFX library 2 | // and associated chipset drivers. 3 | // Here is the libraries original copyright notice: 4 | 5 | /*************************************************** 6 | This is an example sketch for the Adafruit 2.2" SPI display. 7 | This library works with the Adafruit 2.2" TFT Breakout w/SD card 8 | ----> http://www.adafruit.com/products/1480 9 | 10 | Check out the links above for our tutorials and wiring diagrams 11 | These displays use SPI to communicate, 4 or 5 pins are required to 12 | interface (RST is optional) 13 | Adafruit invests time and resources providing this open source code, 14 | please support Adafruit and open-source hardware by purchasing 15 | products from Adafruit! 16 | 17 | Written by Limor Fried/Ladyada for Adafruit Industries. 18 | MIT license, all text above must be included in any redistribution 19 | ****************************************************/ 20 | 21 | //#include "SPI.h" // must include this here (or else IDE can't find it) 22 | 23 | #include // PDQ: Core graphics library 24 | #include "PDQ_ILI9341_config.h" // PDQ: ST7735 pins and other setup for this sketch 25 | #include // PDQ: Hardware-specific driver library 26 | PDQ_ILI9341 tft; // PDQ: create LCD object (using pins in "PDQ_ST7735_config.h") 27 | 28 | // NOTE: Changes to test with Adafruit libraries (comment out PDQ lines above and un-comment the AF: ones below) 29 | 30 | // AF: #include // AF: Core graphics library 31 | // AF: #include // AF: Hardware-specific library 32 | // AF: Adafruit_ILI9341 tft(10, 9, 8); // AF: create LCD object (HW SPI, CS=pin 10, D/C=pin 8, reset=9) 33 | 34 | extern "C" char __data_start[]; // start of SRAM data 35 | extern "C" char _end[]; // end of SRAM data (used to check amount of SRAM this program's variables uses) 36 | extern "C" char __data_load_end[]; // end of FLASH (used to check amount of Flash this program and static data uses) 37 | 38 | void setup() 39 | { 40 | // OSCCAL = 0xae; // ~20MHz ATtiny overclock 41 | OSCCAL = 0xd0; // ~25MHz ATtiny overclock 42 | OSCCAL = 0xf2; // ~30MHz ATtiny overclock 43 | #if defined(ILI9341_RST_PIN) // reset like Adafruit does 44 | FastPin::setOutput(); 45 | FastPin::hi(); 46 | FastPin::lo(); 47 | delay(1); 48 | FastPin::hi(); 49 | #endif 50 | 51 | tft.begin(); 52 | } 53 | 54 | void loop(void) 55 | { 56 | uint32_t usecLines = testLines(ILI9341_BLUE); 57 | delay(100); 58 | 59 | uint32_t usecFillScreen = testFillScreen(); 60 | delay(100); 61 | 62 | uint16_t c = 4; 63 | int8_t d = 1; 64 | for (int32_t i = 0; i < tft.height(); i++) 65 | { 66 | tft.drawFastHLine(0, i, tft.width(), c); 67 | c += d; 68 | if (c <= 4 || c >= 11) 69 | d = -d; 70 | } 71 | 72 | tft.setCursor(0, 0); 73 | tft.setTextColor(ILI9341_MAGENTA); 74 | tft.setTextSize(2); 75 | 76 | #if defined(_PDQ_ILI9341H_) 77 | tft.print(F("PDQ GFX+PDQ ILI9341 ")); 78 | #else 79 | tft.print(F("Adafruit GFX+ILI9341")); 80 | #endif 81 | tft.setTextSize(1); 82 | tft.setTextColor(ILI9341_WHITE); 83 | tft.println(F(" SPI LCD Benchmark (ATtiny85 @ 16MHz)")); 84 | tft.setTextSize(1); 85 | tft.println(F("")); 86 | tft.setTextColor(tft.color565(0x80, 0x80, 0x80)); 87 | tft.print(F(" Memory Used: Flash=0x")); 88 | tft.print((uint16_t)__data_load_end, HEX); 89 | tft.print(F(" RAM=0x")); 90 | tft.println((uint16_t)_end - (uint16_t)__data_start, HEX); 91 | tft.println(F("")); 92 | tft.print(F(" OSCCAL=0x")); 93 | tft.println(OSCCAL, HEX); 94 | tft.println(F("")); 95 | tft.println(F("")); 96 | 97 | tft.setTextColor(ILI9341_GREEN); 98 | tft.println(F(" Benchmark microseconds")); 99 | tft.println(F("")); 100 | 101 | tft.setTextColor(ILI9341_CYAN); tft.setTextSize(1); 102 | tft.print(F("Lines ")); 103 | tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2); 104 | printnice(usecLines); 105 | 106 | tft.setTextColor(ILI9341_CYAN); tft.setTextSize(1); 107 | tft.print(F("Screen fill ")); 108 | tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2); 109 | printnice(usecFillScreen); 110 | 111 | tft.setTextSize(1); 112 | tft.println(F("")); 113 | tft.setTextColor(ILI9341_GREEN); tft.setTextSize(2); 114 | tft.print(F("Benchmark Completed!")); 115 | 116 | delay(60 * 1000L); 117 | } 118 | 119 | void printnice(int32_t v) 120 | { 121 | char str[32] = { 0 }; 122 | sprintf(str, "%lu", v); 123 | for (char *p = (str+strlen(str))-3; p > str; p -= 3) 124 | { 125 | memmove(p+1, p, strlen(p)+1); 126 | *p = ','; 127 | 128 | } 129 | while (strlen(str) < 10) 130 | { 131 | memmove(str+1, str, strlen(str)+1); 132 | *str = ' '; 133 | } 134 | tft.print(str); 135 | } 136 | 137 | static inline uint32_t micros_start() __attribute__ ((always_inline)); 138 | static inline uint32_t micros_start() 139 | { 140 | uint8_t oms = millis(); 141 | while ((uint8_t)millis() == oms) 142 | ; 143 | return micros(); 144 | } 145 | 146 | uint32_t testLines(uint16_t color) 147 | { 148 | uint32_t start, t; 149 | int32_t x1, y1, x2, y2; 150 | int32_t w = tft.width(); 151 | int32_t h = tft.height(); 152 | 153 | tft.fillScreen(ILI9341_BLACK); 154 | 155 | x1 = y1 = 0; 156 | y2 = h - 1; 157 | 158 | start = micros_start(); 159 | 160 | for (x2 = 0; x2 < w; x2 += 6) 161 | { 162 | tft.drawLine(x1, y1, x2, y2, color); 163 | } 164 | 165 | x2 = w - 1; 166 | 167 | for (y2 = 0; y2 < h; y2 += 6) 168 | { 169 | tft.drawLine(x1, y1, x2, y2, color); 170 | } 171 | 172 | t = micros() - start; // fillScreen doesn't count against timing 173 | 174 | tft.fillScreen(ILI9341_BLACK); 175 | 176 | x1 = w - 1; 177 | y1 = 0; 178 | y2 = h - 1; 179 | 180 | start = micros_start(); 181 | 182 | for (x2 = 0; x2 < w; x2 += 6) 183 | { 184 | tft.drawLine(x1, y1, x2, y2, color); 185 | } 186 | 187 | x2 = 0; 188 | for (y2 = 0; y2 < h; y2 += 6) 189 | { 190 | tft.drawLine(x1, y1, x2, y2, color); 191 | } 192 | 193 | t += micros() - start; 194 | 195 | tft.fillScreen(ILI9341_BLACK); 196 | 197 | x1 = 0; 198 | y1 = h - 1; 199 | y2 = 0; 200 | 201 | start = micros_start(); 202 | 203 | for (x2 = 0; x2 < w; x2 += 6) 204 | { 205 | tft.drawLine(x1, y1, x2, y2, color); 206 | } 207 | x2 = w - 1; 208 | for (y2 = 0; y2 < h; y2 += 6) 209 | { 210 | tft.drawLine(x1, y1, x2, y2, color); 211 | } 212 | t += micros() - start; 213 | 214 | tft.fillScreen(ILI9341_BLACK); 215 | 216 | x1 = w - 1; 217 | y1 = h - 1; 218 | y2 = 0; 219 | 220 | start = micros_start(); 221 | 222 | for (x2 = 0; x2 < w; x2 += 6) 223 | { 224 | tft.drawLine(x1, y1, x2, y2, color); 225 | } 226 | 227 | x2 = 0; 228 | for (y2 = 0; y2 < h; y2 += 6) 229 | { 230 | tft.drawLine(x1, y1, x2, y2, color); 231 | } 232 | 233 | t += micros() - start; 234 | 235 | return t; 236 | } 237 | uint32_t testFillScreen() 238 | { 239 | uint32_t start = micros_start(); 240 | 241 | for (uint8_t i = 0; i < 30; i++) 242 | { 243 | tft.fillScreen(ILI9341_RED); 244 | tft.fillScreen(ILI9341_BLACK); 245 | } 246 | 247 | return micros() - start; 248 | } 249 | -------------------------------------------------------------------------------- /PDQ_ILI9341/examples/PDQ_graphicstest/PDQ_ILI9341_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ILI9341 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9341.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | // NOTE: These are typical hookups individual boards will vary, please check your documentation. 8 | // CAUTION: While Adafruit boards generally always come with needed level-converters, I find many 9 | // other LCD displays advertised as supporting 5V only support 5V power (with a regulator). 10 | // They still only have 3.3V safe logic (CS, DC, RESET, MOSI, SCK marked with * below). 11 | // If this is the case you will need a voltage level-converter (e.g., HC4050, divider circuit etc.). 12 | // 13 | // LCD PIN Uno (328) Leo (32u4) 644/1284 14 | // ------- --------- ---------- -------- 15 | // 1 VCC 3.3V/5V 3.3V/5V 3.3V/5V // +3.3V or 5V with on-board regulator 16 | // 2 GND GND GND GND 17 | // 3* CS 10 10 4 // Could be any GPIO pin, but then need to make sure SS isn't a LOW input (or slave SPI mode) 18 | // 4* RESET 0/8/RESET 0/8/RESET 0/RESET // This relies on soft-reset. You can also use Arduino reset pin (if correct voltage). 19 | // 5* DC/RS 9 9 3 // Could be any GPIO pin 20 | // 6* SDI/MOSI 11 ICSP4 5 // HW SPI pin (can't change) 21 | // 7* SCK 13 ICSP3 7 // HW SPI pin (can't change) NOTE: On Uno this causes on-board LED to flicker during SPI use 22 | // 8* LED 3.3V/5V 3.3V/5V 3.3V/5V // LCD screen blanked when LOW (could use GPIO for PWM dimming) 23 | // 9 SDO/MISO - - - // (not used if present, LCD code is currently "write only") 24 | // 25 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 26 | 27 | #define ILI9341_CS_PIN 10 // <= /CS pin (chip-select, LOW to get attention of ILI9341, HIGH and it ignores SPI bus) 28 | #define ILI9341_DC_PIN 9 // <= DC pin (1=data or 0=command indicator line) also called RS 29 | #define ILI9341_RST_PIN 8 // <= RST pin (optional) 30 | // 644/1284 #define ST7735_CS_PIN 4 // <= /CS pin (chip-select, LOW to get attention of ILI9341, HIGH and it ignores SPI bus) 31 | // 644/1284 #define ST7735_DC_PIN 3 // <= DC pin (1=data or 0=command indicator line) also called RS 32 | // (other pins used are dictated by AVR HW SPI used as shown above) 33 | 34 | // other PDQ library options 35 | #define ILI9341_SAVE_SPI_SETTINGS 0 // <= 0/1 with 1 to save/restore AVR SPI control and statusregisters (required when other SPI devices are in use with other settings) 36 | -------------------------------------------------------------------------------- /PDQ_ILI9341/library.properties: -------------------------------------------------------------------------------- 1 | name=PDQ_ILI9341 driver for PDQ_GFX Library 2 | version=1.1.5 3 | author=XarkLabs 4 | maintainer=Xark 5 | sentence=This is driver for IL9341 SPI LCD that goes with PDQ_GFX library. 6 | paragraph=The PDQ_GFX library and drivers are "re-mixed" speed and size optimzed versions of Adafruit_GFX library and drivers for AVR Arduino (while maintaining sketch compatibility with original). Thanks Adafruit! Visit #Arduino on freenode.net IRC 7 | category=Display 8 | url=https://github.com/XarkLabs/PDQ_GFX_Libs/tree/master/PDQ_ILI9341 9 | architectures=avr 10 | -------------------------------------------------------------------------------- /PDQ_ILI9341/tools/HaD_240x320.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_ILI9341/tools/HaD_240x320.bmp -------------------------------------------------------------------------------- /PDQ_ILI9341/tools/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Simple makefile for monochrome BMP to RLE data 3 | # 4 | all: crunch_bmp_rle 5 | 6 | crunch_bmp_rle: crunch_bmp_rle.cpp 7 | $(CXX) -Wall -Wextra -Os -o $@ $< 8 | 9 | clean: 10 | $(RM) crunch_bmp_rle crunch_bmp_rle.exe 11 | -------------------------------------------------------------------------------- /PDQ_ILI9341/tools/crunch_bmp_rle.cpp: -------------------------------------------------------------------------------- 1 | // Hacktastic Q & D BMP -> TVGameKit sprite cruncher 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | uint8_t bmp_header[54]; 10 | uint32_t pixel_offset; 11 | uint32_t dib_size; 12 | int32_t bmp_width; 13 | int32_t bmp_height; 14 | int16_t bmp_bpp; 15 | uint32_t bmp_line; 16 | uint8_t *RGB24_bitmap; 17 | 18 | #define MAX_SPRITES 256 19 | 20 | struct sprite_info 21 | { 22 | char *name; 23 | int32_t width; 24 | int32_t height; 25 | int32_t byte_width; 26 | uint8_t *mono_bitmap; 27 | uint8_t *mask_bitmap; 28 | }; 29 | 30 | int32_t num_sprites; 31 | struct sprite_info sprite[MAX_SPRITES]; 32 | 33 | // data = (data & mask) ^ mono; 34 | // 35 | // mask mono 36 | // 0 0 = black 37 | // 0 1 = white 38 | // 1 0 = transparent 39 | // 1 1 = xor 40 | // 41 | 42 | uint8_t human_readable = 0; 43 | uint8_t verbose = 1; 44 | 45 | uint8_t preamble_done = 0; 46 | 47 | int main(int argc, char* argv[]) 48 | { 49 | int32_t x, y, size; 50 | int32_t arg; 51 | struct sprite_info *spr = NULL; 52 | 53 | const char* bmp_name; 54 | FILE* f = NULL; 55 | 56 | for (arg = 1; arg < argc; arg++) 57 | { 58 | spr = &sprite[num_sprites]; 59 | 60 | if (argv[arg][0] == '-') 61 | { 62 | char *namestr = NULL; 63 | char c = argv[arg][1]; 64 | if (c >= 'A' && c <= 'Z') 65 | c += 32; 66 | switch(c) 67 | { 68 | case 'n': 69 | namestr = &argv[arg][2]; 70 | 71 | if (*namestr == 0 && arg+1 < argc) 72 | namestr = argv[++arg]; 73 | 74 | if (*namestr == 0) 75 | { 76 | fprintf(stderr, "Need symbol name after -n.\n"); 77 | exit(5); 78 | } 79 | 80 | if (spr->name) 81 | free(spr->name); 82 | spr->name = strdup(namestr); 83 | 84 | break; 85 | 86 | default: 87 | printf("Usage: crunch_bmp_rle [-n ]\n"); 88 | printf("\n"); 89 | printf(" -n - Name of next tilemap or tileset font (or BMP name used)\n"); 90 | printf("\n"); 91 | printf("Output will go to stdout, so use \"> output\" to redirect to file.\n"); 92 | exit(1); 93 | 94 | break; 95 | } 96 | 97 | continue; 98 | } 99 | 100 | bmp_name = argv[arg]; 101 | 102 | if ((f = fopen(bmp_name, "rb")) == NULL) 103 | { 104 | fprintf(stderr, "Error opening input BMP file \"%s\".\n", bmp_name); 105 | exit(5); 106 | } 107 | 108 | if (fread(bmp_header, sizeof (unsigned char), 54, f) != 54) 109 | { 110 | fprintf(stderr, "Error reading BMP header from \"%s\".\n", bmp_name); 111 | exit(5); 112 | } 113 | 114 | if (bmp_header[0] != 'B' || bmp_header[1] != 'M') 115 | { 116 | fprintf(stderr, "Error not valid BMP format \"%s\".\n", bmp_name); 117 | exit(5); 118 | } 119 | 120 | pixel_offset = bmp_header[10] | (bmp_header[11]<<8) | (bmp_header[12]<<16) | (bmp_header[13]<<24); 121 | dib_size = bmp_header[14] | (bmp_header[15]<<8) | (bmp_header[16]<<16) | (bmp_header[17]<<24); 122 | 123 | if (dib_size != 40) 124 | { 125 | fprintf(stderr, "Error unsupported BMP format DIB=%d \"%s\".\n", dib_size, bmp_name); 126 | exit(5); 127 | } 128 | 129 | // extract image height and width from header 130 | bmp_width = bmp_header[18] | (bmp_header[19]<<8) | (bmp_header[20]<<16) | (bmp_header[21]<<24); 131 | bmp_height = bmp_header[22] | (bmp_header[23]<<8) | (bmp_header[24]<<16) | (bmp_header[25]<<24); 132 | if (bmp_width < 0) 133 | bmp_width = -bmp_width; 134 | if (bmp_height < 0) 135 | bmp_height = -bmp_height; 136 | bmp_bpp = bmp_header[28] | (bmp_header[29]<<8); 137 | 138 | if (bmp_width < 1 || bmp_width > 4096 || bmp_height < 1 || bmp_height > 4096 || bmp_bpp != 24) 139 | { 140 | fprintf(stderr, "BMP \"%s\" size or depth fails sanity check (%d x %d bpp=%d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp); 141 | exit(5); 142 | } 143 | 144 | bmp_line = (((bmp_width*bmp_bpp) + 31) / 32) * 4; 145 | size = bmp_line * bmp_height; 146 | 147 | printf("\n// File: \"%s\": %d x %d (%d bpp, pixel offset %d, bytes per line %d, bitmap size %d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp, pixel_offset, bmp_line, size); 148 | 149 | RGB24_bitmap = (uint8_t *)malloc(size); 150 | if (!RGB24_bitmap) 151 | { 152 | fprintf(stderr, "Failed allocating %d bytes.\n", size); 153 | exit(5); 154 | } 155 | memset(RGB24_bitmap, 0, size); 156 | 157 | // seek to bitmap pixels and read them in 158 | if (fseek(f, pixel_offset, SEEK_SET) != 0 || fread(RGB24_bitmap, sizeof (unsigned char), size, f) != (size_t)size) 159 | { 160 | fprintf(stderr, "Error reading %d bytes of BMP data from \"%s\".\n", size, bmp_name); 161 | exit(5); 162 | } 163 | fclose(f); 164 | f = NULL; 165 | 166 | // convert bitmap into sprite and fill out sprite_info 167 | 168 | // give it a symbol name if not already specified 169 | if (spr->name == NULL) 170 | { 171 | char str_temp[256]; 172 | const char *n = bmp_name; 173 | 174 | // find start of filename after path 175 | if (strrchr(n, '/')) 176 | n = strrchr(n, '/')+1; 177 | else if (strrchr(n, '\\')) 178 | n = strrchr(n, '\\')+1; 179 | else if (strrchr(n, ':')) 180 | n = strrchr(n, ':')+1; 181 | 182 | strncpy(str_temp, n, sizeof (str_temp)-1); 183 | 184 | // remove extension 185 | if (strrchr(str_temp, '.')) 186 | *strrchr(str_temp, '.') = 0; 187 | 188 | spr->name = strdup(str_temp); 189 | } 190 | 191 | spr->width = bmp_width; 192 | spr->byte_width = ((spr->width + 7)/8)+1; 193 | spr->height = bmp_height; 194 | size = spr->byte_width * spr->height; 195 | spr->mono_bitmap = (uint8_t *)malloc(size); 196 | if (!spr->mono_bitmap) 197 | { 198 | fprintf(stderr, "Failed allocating %d bytes for mono bitmap.\n", size); 199 | exit(5); 200 | } 201 | memset(spr->mono_bitmap, 0, size); 202 | 203 | spr->mask_bitmap = (uint8_t *)malloc(size); 204 | if (!spr->mask_bitmap) 205 | { 206 | fprintf(stderr, "Failed allocating %d bytes for mask bitmap.\n", size); 207 | exit(5); 208 | } 209 | memset(spr->mask_bitmap, 0xff, size); 210 | 211 | printf("// BMP #%d \"%s\" (%d x %d with '.'=trans, ' '=black, 'X'=XOR, 'W'=white):\n\n", num_sprites, spr->name, spr->width, spr->height); 212 | printf("// *"); 213 | for (x = 0; x < bmp_width; x++) 214 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 215 | printf("*\n"); 216 | 217 | for (y = 0; y < bmp_height; y++) 218 | { 219 | printf("// %c", (y & 0x7) == 0x0 ? '+' : '|'); 220 | for (x = 0; x < bmp_width; x++) 221 | { 222 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 223 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 224 | uint8_t t = b ? '*' : '.'; 225 | 226 | printf("%c", t); 227 | } 228 | printf("%c\n", (y & 0x7) == 0x0 ? '+' : '|'); 229 | } 230 | 231 | printf("// *"); 232 | for (x = 0; x < bmp_width; x++) 233 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 234 | printf("*\n"); 235 | 236 | printf("\n// Compressed RLE data\n"); 237 | printf("const uint8_t %s[] PROGMEM =\n{\n\t", spr->name); 238 | 239 | uint32_t currun = 0; 240 | uint8_t curstate = 0; 241 | uint8_t* compout = spr->mono_bitmap; 242 | int tok = 0; 243 | 244 | for (y = 0; y < bmp_height; y++) 245 | { 246 | for (x = 0; x < bmp_width; x++) 247 | { 248 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 249 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 250 | 251 | if (b == curstate && currun < 32767) 252 | currun++; 253 | else 254 | { 255 | if (currun < 128) 256 | { 257 | *compout++ = currun; 258 | printf("0x%02x, ", currun); 259 | tok += 1; 260 | if (tok >= 16) 261 | { 262 | tok = 0; 263 | printf("\n\t"); 264 | } 265 | } 266 | else 267 | { 268 | *compout++ = (currun >> 8) | 0x80; 269 | *compout++ = (currun & 0xff); 270 | 271 | printf("0x%02x, ", 0x80 | (currun >> 8)); 272 | tok += 1; 273 | if (tok >= 16) 274 | { 275 | tok = 0; 276 | printf("\n\t"); 277 | } 278 | printf("0x%02x, ", (currun & 0xff)); 279 | tok += 1; 280 | if (tok >= 16) 281 | { 282 | tok = 0; 283 | printf("\n\t"); 284 | } 285 | } 286 | currun = 1; 287 | curstate = !curstate; 288 | } 289 | } 290 | } 291 | 292 | if (currun) 293 | { 294 | if (currun < 128) 295 | { 296 | *compout++ = currun; 297 | printf("0x%02x", currun); 298 | tok += 1; 299 | if (tok >= 16) 300 | { 301 | tok = 0; 302 | printf("\n\t"); 303 | } 304 | else 305 | printf(", "); 306 | 307 | } 308 | else 309 | { 310 | *compout++ = (currun >> 8) | 0x80; 311 | *compout++ = (currun & 0xff); 312 | 313 | printf("0x%02x", 0x80 | (currun >> 8)); 314 | tok += 1; 315 | if (tok >= 16) 316 | { 317 | tok = 0; 318 | printf("\n\t"); 319 | } 320 | else 321 | printf(", "); 322 | printf("0x%02x", (currun & 0xff)); 323 | tok += 1; 324 | if (tok >= 16) 325 | { 326 | tok = 0; 327 | printf("\n\t"); 328 | } 329 | else 330 | printf(", "); 331 | } 332 | } 333 | printf("\n};\n"); 334 | printf("\n// Compressed RLE size %d\n", (int32_t)(compout - spr->mono_bitmap)); 335 | 336 | printf("\n// Test decompress:\n"); 337 | 338 | uint8_t *cmp = spr->mono_bitmap; 339 | 340 | printf("// "); 341 | 342 | int runcnt; 343 | int color = 0; 344 | int pixcount = 0; 345 | while (cmp < compout) 346 | { 347 | runcnt = *cmp++; 348 | if (runcnt & 0x80) 349 | runcnt = ((runcnt & 0x7f) << 8) | *cmp++; 350 | 351 | while (runcnt--) 352 | { 353 | printf("%d", color); 354 | if (++pixcount == bmp_width) 355 | { 356 | pixcount = 0; 357 | printf("\n// "); 358 | } 359 | } 360 | color ^= 1; 361 | } 362 | 363 | printf("\n\n"); 364 | 365 | free(RGB24_bitmap); 366 | RGB24_bitmap = NULL; 367 | 368 | num_sprites++; 369 | } 370 | 371 | printf("// EOF\n"); 372 | fprintf(stderr, "Done!\n"); 373 | 374 | return 0; 375 | } 376 | -------------------------------------------------------------------------------- /PDQ_ILI9341/tools/readme.txt: -------------------------------------------------------------------------------- 1 | This a little "throw-away" utility I used to crunch a monochrome HackADay logo (http://hackaday.com) into something 2 | small enough to include in the benchmark. See "graphictest" example for how to decompress. 3 | 4 | It is messily hacked together, so beware (originally from an Arduino composite video sprite library "cruncher" https://www.youtube.com/watch?v=Imk5ony8JHI that is still a W.I.P.) 5 | 6 | Thanks Hack-A-Day (for your cool logo - please don't sue me...) 7 | -------------------------------------------------------------------------------- /PDQ_ST7735/PDQ_ST7735.cpp: -------------------------------------------------------------------------------- 1 | // Nothing, all in the header 2 | -------------------------------------------------------------------------------- /PDQ_ST7735/README.txt: -------------------------------------------------------------------------------- 1 | NOTE: This file is from the Adafruit_ST7735 library (which PDQ_ST7735 was based on). Thanks Adafruit! 2 | 3 | This is a library for the Adafruit 1.8" SPI display. 4 | This library works with the Adafruit 1.8" TFT Breakout w/SD card 5 | ----> http://www.adafruit.com/products/358 6 | The 1.8" TFT shield 7 | ----> https://www.adafruit.com/product/802 8 | The 1.44" TFT breakout 9 | ----> https://www.adafruit.com/product/2088 10 | as well as Adafruit raw 1.8" TFT display 11 | ----> http://www.adafruit.com/products/618 12 | 13 | 14 | Check out the links above for our tutorials and wiring diagrams. 15 | These displays use SPI to communicate, 4 or 5 pins are required 16 | to interface (RST is optional). 17 | Adafruit invests time and resources providing this open source code, 18 | please support Adafruit and open-source hardware by purchasing 19 | products from Adafruit! 20 | 21 | Written by Limor Fried/Ladyada for Adafruit Industries. 22 | MIT license, all text above must be included in any redistribution 23 | 24 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_ST7735. Check that the Adafruit_ST7735 folder contains Adafruit_ST7735.cpp and Adafruit_ST7735. 25 | 26 | Place the Adafruit_ST7735 library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE 27 | 28 | Also requires the Adafruit_GFX library for Arduino. -------------------------------------------------------------------------------- /PDQ_ST7735/examples/PDQ_GFX_Button_test/PDQ_GFX_Button_test.ino: -------------------------------------------------------------------------------- 1 | // Simple test of PDQ_GFX_Button (based on Adafruit http://github.com/adafruit/Adafruit-GFX-Library) 2 | // This is designed to use Arduino Uno (or equivilent) 3 | // with Adafruit 2.8" TFT Touch Shield for Arduino w/Capacitive Touch (http://www.adafruit.com/products/1947) 4 | 5 | #include // must include this here (or else IDE can't find it) 6 | #include // must include this here (or else IDE can't find it) 7 | #include 8 | #include "PDQ_ST7735_config.h" // PDQ: ST7735 pins and other setup for this sketch 9 | #include 10 | #include // I2C capacitive touch library from Adafruit 11 | 12 | Adafruit_FT6206 ts = Adafruit_FT6206(); // touch screen library object 13 | PDQ_ST7735 tft = PDQ_ST7735(); // PDQ_GFX lcd library object 14 | 15 | #define NUM_BUTTONS 2 16 | PDQ_GFX_Button button[NUM_BUTTONS]; // array of buttons 17 | 18 | int16_t current_count = 0; // test count 19 | 20 | void setup(void) 21 | { 22 | Serial.begin(9600); 23 | 24 | tft.begin(); 25 | 26 | if (!ts.begin()) 27 | { 28 | Serial.println(F("Unable to start touchscreen.")); 29 | } 30 | else 31 | { 32 | Serial.println(F("Touchscreen started.")); 33 | } 34 | 35 | button[0].initButton(&tft, 60, 100, 72, 72, ST7735_RED, ST7735_BLACK, ST7735_WHITE, "Decrement", 1); 36 | button[1].initButton(&tft, 180, 100, 72, 72, ST7735_GREEN, ST7735_BLACK, ST7735_WHITE, "Increment", 1); 37 | 38 | tft.fillScreen(ST7735_BLUE); 39 | 40 | tft.setCursor(54, 10); 41 | tft.setTextColor(ST7735_WHITE, ST7735_BLUE); 42 | tft.setTextSize(1); 43 | tft.print(F("Simple GFX_Button Test")); 44 | 45 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 46 | button[i].drawButton(false); 47 | } 48 | 49 | void loop() 50 | { 51 | // See if screen is being touched 52 | if (ts.touched()) 53 | { 54 | // Retrieve touch point 55 | TS_Point p = ts.getPoint(); 56 | 57 | // reverse coordinates to match orientation of LCD 58 | int x = tft.width() - p.x; 59 | int y = tft.height() - p.y; 60 | 61 | // tft.drawPixel(x, y, 0xffff); // touch debugging 62 | 63 | // loop through buttons and process touch coordinate 64 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 65 | { 66 | if (button[i].contains(x, y)) 67 | { 68 | button[i].press(true); 69 | } 70 | else 71 | { 72 | // if still touched, but outside of button area 73 | if (button[i].isPressed()) 74 | button[i].drawButton(false); // unhighlight 75 | button[i].press(false); // set not pressed 76 | button[i].press(false); // twice, because we don't want "justReleased" to return true 77 | } 78 | } 79 | } 80 | else 81 | { 82 | // screen not touched, so all buttons not pressed 83 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 84 | button[i].press(false); 85 | } 86 | 87 | // draw button and perform action if button was just released 88 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 89 | { 90 | if (button[i].justPressed()) 91 | { 92 | button[i].drawButton(true); 93 | } 94 | else if (button[i].justReleased()) 95 | { 96 | button[i].drawButton(false); 97 | 98 | // perform button action (decrement or increment in this simple test) 99 | if (i == 0) 100 | current_count -= 1; 101 | else if (i == 1) 102 | current_count += 1; 103 | } 104 | } 105 | 106 | // draw the current count 107 | tft.setCursor(60, 200); 108 | tft.setTextColor(ST7735_WHITE, ST7735_BLUE); 109 | tft.setTextSize(2); 110 | tft.print("Count = "); 111 | tft.print(current_count); 112 | tft.print(" "); 113 | 114 | // make sure we don't go too fast for touch controller 115 | delay(1); 116 | } 117 | -------------------------------------------------------------------------------- /PDQ_ST7735/examples/PDQ_GFX_Button_test/PDQ_ILI9341_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ILI9341 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9341.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | // NOTE: These are typical hookups individual boards will vary, please check your documentation. 8 | // CAUTION: While Adafruit boards generally always come with needed level-converters, I find many 9 | // other LCD displays advertised as supporting 5V only support 5V power (with a regulator). 10 | // They still only have 3.3V safe logic (CS, DC, RESET, MOSI, SCK marked with * below). 11 | // If this is the case you will need a voltage level-converter (e.g., HC4050, divider circuit etc.). 12 | // 13 | // LCD PIN Uno (328) Leo (32u4) 644/1284 14 | // ------- --------- ---------- -------- 15 | // 1 VCC 3.3V/5V 3.3V/5V 3.3V/5V // +3.3V or 5V with on-board regulator 16 | // 2 GND GND GND GND 17 | // 3* CS 10 10 4 // Could be any GPIO pin, but then need to make sure SS isn't a LOW input (or slave SPI mode) 18 | // 4* RESET 0/8/RESET 0/8/RESET 0/RESET // This relies on soft-reset. You can also use Arduino reset pin (if correct voltage). 19 | // 5* DC/RS 9 9 3 // Could be any GPIO pin 20 | // 6* SDI/MOSI 11 ICSP4 5 // HW SPI pin (can't change) 21 | // 7* SCK 13 ICSP3 7 // HW SPI pin (can't change) NOTE: On Uno this causes on-board LED to flicker during SPI use 22 | // 8* LED 3.3V/5V 3.3V/5V 3.3V/5V // LCD screen blanked when LOW (could use GPIO for PWM dimming) 23 | // 9 SDO/MISO - - - // (not used if present, LCD code is currently "write only") 24 | // 25 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 26 | 27 | #define ILI9341_CS_PIN 10 // <= /CS pin (chip-select, LOW to get attention of ILI9341, HIGH and it ignores SPI bus) 28 | #define ILI9341_DC_PIN 9 // <= DC pin (1=data or 0=command indicator line) also called RS 29 | #define ILI9341_RST_PIN 8 // <= RST pin (optional) 30 | // (other pins used are dictated by AVR HW SPI used as shown above) 31 | 32 | // other PDQ library options 33 | #define ILI9341_SAVE_SPCR 0 // <= 0/1 with 1 to save/restore AVR SPI control register (to "play nice" when other SPI use) 34 | -------------------------------------------------------------------------------- /PDQ_ST7735/examples/PDQ_graphicstest/PDQ_ST7735_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ST7735 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9340.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | // ST7735 has several variations, set your version based on this list (using the color of the "tab" on the screen cover). 8 | // NOTE: The tab colors refer to Adafruit versions, other suppliers may vary (you may have to experiment to find the right one). 9 | enum 10 | { 11 | ST7735_INITB = 0, // 1.8" (128x160) ST7735B chipset (only one type) 12 | ST7735_INITR_GREENTAB = 1, // 1.8" (128x160) ST7735R chipset with green tab (same as ST7735_INITR_18GREENTAB) 13 | ST7735_INITR_REDTAB = 2, // 1.8" (128x160) ST7735R chipset with red tab (same as ST7735_INITR_18REDTAB) 14 | ST7735_INITR_BLACKTAB = 3, // 1.8" (128x160) ST7735S chipset with black tab (same as ST7735_INITR_18BLACKTAB) 15 | ST7735_INITR_144GREENTAB = 4, // 1.4" (128x128) ST7735R chipset with green tab 16 | ST7735_INITR_18GREENTAB = ST7735_INITR_GREENTAB, // 1.8" (128x160) ST7735R chipset with green tab 17 | ST7735_INITR_18REDTAB = ST7735_INITR_REDTAB, // 1.8" (128x160) ST7735R chipset with red tab 18 | ST7735_INITR_18BLACKTAB = ST7735_INITR_BLACKTAB, // 1.8" (128x160) ST7735S chipset with black tab 19 | }; 20 | 21 | #define ST7735_CHIPSET ST7735_INITR_BLACKTAB // <= Set ST7735 LCD chipset/variation here (from above list) 22 | 23 | // NOTE: These are typical hookups individual boards will vary, please check your documentation. 24 | // CAUTION: While Adafruit boards generally always come with needed level-converters, I find many 25 | // other LCD displays advertised as supporting 5V only support 5V power (with a regulator). 26 | // They still only have 3.3V safe logic (CS, DC, RESET, MOSI, SCK marked with * below). 27 | // If this is the case you will need a voltage level-converter (e.g., HC4050, divider circuit etc.). 28 | // 29 | // LCD PIN Uno (328) Leo (32u4) 644/1284 30 | // ------- --------- ---------- -------- 31 | // 1 VCC 3.3V/5V 3.3V/5V 3.3V/5V // +3.3V or 5V with on-board regulator 32 | // 2 GND GND GND GND 33 | // 3* CS 10 10 4 // Could be any GPIO pin, but then need to make sure SS isn't a LOW input (or slave SPI mode) 34 | // 4* RESET 3.3V/5V 3.3V/5V 3.3V/5V // This relies on soft-reset. You can also use Arduino reset pin (if correct voltage). 35 | // 5* DC/RS 9 9 3 // Could be any GPIO pin 36 | // 6* SDI/MOSI 11 ICSP4 5 // HW SPI pin (can't change) 37 | // 7* SCK 13 ICSP3 7 // HW SPI pin (can't change) NOTE: On Uno this causes on-board LED to flicker during SPI use 38 | // 8* LED 3.3V/5V 3.3V/5V 3.3V/5V // LCD screen blanked when LOW (could use GPIO for PWM dimming) 39 | // 9 SDO/MISO - - - // (not used if present, LCD code is currently "write only") 40 | // 41 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 42 | 43 | #define ST7735_CS_PIN 10 // <= /CS pin (chip-select, LOW to get attention of ST7735, HIGH and it ignores SPI bus) 44 | #define ST7735_DC_PIN 9 // <= DC pin (1=data or 0=command indicator line) also called RS 45 | // 644/1284 #define ST7735_CS_PIN 4 // <= /CS pin (chip-select, LOW to get attention of ST7735, HIGH and it ignores SPI bus) 46 | // 644/1284 #define ST7735_DC_PIN 3 // <= DC pin (1=data or 0=command indicator line) also called RS 47 | // (other pins used are dictated by AVR HW SPI used as shown above) 48 | 49 | // other PDQ library options 50 | #define ST7735_SAVE_SPI_SETTINGS 0 // <= 0/1 with 1 to save AVR SPI control and status registers (required when other SPI devices are in use with other settings) 51 | -------------------------------------------------------------------------------- /PDQ_ST7735/library.properties: -------------------------------------------------------------------------------- 1 | name=PDQ_ST7735 driver for PDQ_GFX Library 2 | version=1.1.5 3 | author=XarkLabs 4 | maintainer=Xark 5 | sentence=This is driver for ST7735 SPI LCD that goes with PDQ_GFX library. 6 | paragraph=The PDQ_GFX library and drivers are "re-mixed" speed and size optimzed versions of Adafruit_GFX library and drivers for AVR Arduino (while maintaining sketch compatibility with original). Thanks Adafruit! Visit #Arduino on freenode.net IRC 7 | category=Display 8 | url=https://github.com/XarkLabs/PDQ_GFX_Libs/tree/master/PDQ_ST7735 9 | architectures=avr 10 | -------------------------------------------------------------------------------- /PDQ_ST7735/tools/HaD_128x160.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_ST7735/tools/HaD_128x160.bmp -------------------------------------------------------------------------------- /PDQ_ST7735/tools/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Simple makefile for monochrome BMP to RLE data 3 | # 4 | all: crunch_bmp_rle 5 | 6 | crunch_bmp_rle: crunch_bmp_rle.cpp 7 | $(CXX) -Wall -Wextra -Os -o $@ $< 8 | 9 | clean: 10 | $(RM) crunch_bmp_rle crunch_bmp_rle.exe 11 | -------------------------------------------------------------------------------- /PDQ_ST7735/tools/crunch_bmp_rle.cpp: -------------------------------------------------------------------------------- 1 | // Hacktastic Q & D BMP -> TVGameKit sprite cruncher 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | uint8_t bmp_header[54]; 10 | uint32_t pixel_offset; 11 | uint32_t dib_size; 12 | int32_t bmp_width; 13 | int32_t bmp_height; 14 | int16_t bmp_bpp; 15 | uint32_t bmp_line; 16 | uint8_t *RGB24_bitmap; 17 | 18 | #define MAX_SPRITES 256 19 | 20 | struct sprite_info 21 | { 22 | char *name; 23 | int32_t width; 24 | int32_t height; 25 | int32_t byte_width; 26 | uint8_t *mono_bitmap; 27 | uint8_t *mask_bitmap; 28 | }; 29 | 30 | int32_t num_sprites; 31 | struct sprite_info sprite[MAX_SPRITES]; 32 | 33 | // data = (data & mask) ^ mono; 34 | // 35 | // mask mono 36 | // 0 0 = black 37 | // 0 1 = white 38 | // 1 0 = transparent 39 | // 1 1 = xor 40 | // 41 | 42 | uint8_t human_readable = 0; 43 | uint8_t verbose = 1; 44 | 45 | uint8_t preamble_done = 0; 46 | 47 | int main(int argc, char* argv[]) 48 | { 49 | int32_t x, y, size; 50 | int32_t arg; 51 | struct sprite_info *spr = NULL; 52 | 53 | const char* bmp_name; 54 | FILE* f = NULL; 55 | 56 | for (arg = 1; arg < argc; arg++) 57 | { 58 | spr = &sprite[num_sprites]; 59 | 60 | if (argv[arg][0] == '-') 61 | { 62 | char *namestr = NULL; 63 | char c = argv[arg][1]; 64 | if (c >= 'A' && c <= 'Z') 65 | c += 32; 66 | switch(c) 67 | { 68 | case 'n': 69 | namestr = &argv[arg][2]; 70 | 71 | if (*namestr == 0 && arg+1 < argc) 72 | namestr = argv[++arg]; 73 | 74 | if (*namestr == 0) 75 | { 76 | fprintf(stderr, "Need symbol name after -n.\n"); 77 | exit(5); 78 | } 79 | 80 | if (spr->name) 81 | free(spr->name); 82 | spr->name = strdup(namestr); 83 | 84 | break; 85 | 86 | default: 87 | printf("Usage: crunch_bmp_rle [-n ]\n"); 88 | printf("\n"); 89 | printf(" -n - Name of next tilemap or tileset font (or BMP name used)\n"); 90 | printf("\n"); 91 | printf("Output will go to stdout, so use \"> output\" to redirect to file.\n"); 92 | exit(1); 93 | 94 | break; 95 | } 96 | 97 | continue; 98 | } 99 | 100 | bmp_name = argv[arg]; 101 | 102 | if ((f = fopen(bmp_name, "rb")) == NULL) 103 | { 104 | fprintf(stderr, "Error opening input BMP file \"%s\".\n", bmp_name); 105 | exit(5); 106 | } 107 | 108 | if (fread(bmp_header, sizeof (unsigned char), 54, f) != 54) 109 | { 110 | fprintf(stderr, "Error reading BMP header from \"%s\".\n", bmp_name); 111 | exit(5); 112 | } 113 | 114 | if (bmp_header[0] != 'B' || bmp_header[1] != 'M') 115 | { 116 | fprintf(stderr, "Error not valid BMP format \"%s\".\n", bmp_name); 117 | exit(5); 118 | } 119 | 120 | pixel_offset = bmp_header[10] | (bmp_header[11]<<8) | (bmp_header[12]<<16) | (bmp_header[13]<<24); 121 | dib_size = bmp_header[14] | (bmp_header[15]<<8) | (bmp_header[16]<<16) | (bmp_header[17]<<24); 122 | 123 | if (dib_size != 40) 124 | { 125 | fprintf(stderr, "Error unsupported BMP format DIB=%d \"%s\".\n", dib_size, bmp_name); 126 | exit(5); 127 | } 128 | 129 | // extract image height and width from header 130 | bmp_width = bmp_header[18] | (bmp_header[19]<<8) | (bmp_header[20]<<16) | (bmp_header[21]<<24); 131 | bmp_height = bmp_header[22] | (bmp_header[23]<<8) | (bmp_header[24]<<16) | (bmp_header[25]<<24); 132 | if (bmp_width < 0) 133 | bmp_width = -bmp_width; 134 | if (bmp_height < 0) 135 | bmp_height = -bmp_height; 136 | bmp_bpp = bmp_header[28] | (bmp_header[29]<<8); 137 | 138 | if (bmp_width < 1 || bmp_width > 4096 || bmp_height < 1 || bmp_height > 4096 || bmp_bpp != 24) 139 | { 140 | fprintf(stderr, "BMP \"%s\" size or depth fails sanity check (%d x %d bpp=%d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp); 141 | exit(5); 142 | } 143 | 144 | bmp_line = (((bmp_width*bmp_bpp) + 31) / 32) * 4; 145 | size = bmp_line * bmp_height; 146 | 147 | printf("\n// File: \"%s\": %d x %d (%d bpp, pixel offset %d, bytes per line %d, bitmap size %d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp, pixel_offset, bmp_line, size); 148 | 149 | RGB24_bitmap = (uint8_t *)malloc(size); 150 | if (!RGB24_bitmap) 151 | { 152 | fprintf(stderr, "Failed allocating %d bytes.\n", size); 153 | exit(5); 154 | } 155 | memset(RGB24_bitmap, 0, size); 156 | 157 | // seek to bitmap pixels and read them in 158 | if (fseek(f, pixel_offset, SEEK_SET) != 0 || fread(RGB24_bitmap, sizeof (unsigned char), size, f) != (size_t)size) 159 | { 160 | fprintf(stderr, "Error reading %d bytes of BMP data from \"%s\".\n", size, bmp_name); 161 | exit(5); 162 | } 163 | fclose(f); 164 | f = NULL; 165 | 166 | // convert bitmap into sprite and fill out sprite_info 167 | 168 | // give it a symbol name if not already specified 169 | if (spr->name == NULL) 170 | { 171 | char str_temp[256]; 172 | const char *n = bmp_name; 173 | 174 | // find start of filename after path 175 | if (strrchr(n, '/')) 176 | n = strrchr(n, '/')+1; 177 | else if (strrchr(n, '\\')) 178 | n = strrchr(n, '\\')+1; 179 | else if (strrchr(n, ':')) 180 | n = strrchr(n, ':')+1; 181 | 182 | strncpy(str_temp, n, sizeof (str_temp)-1); 183 | 184 | // remove extension 185 | if (strrchr(str_temp, '.')) 186 | *strrchr(str_temp, '.') = 0; 187 | 188 | spr->name = strdup(str_temp); 189 | } 190 | 191 | spr->width = bmp_width; 192 | spr->byte_width = ((spr->width + 7)/8)+1; 193 | spr->height = bmp_height; 194 | size = spr->byte_width * spr->height; 195 | spr->mono_bitmap = (uint8_t *)malloc(size); 196 | if (!spr->mono_bitmap) 197 | { 198 | fprintf(stderr, "Failed allocating %d bytes for mono bitmap.\n", size); 199 | exit(5); 200 | } 201 | memset(spr->mono_bitmap, 0, size); 202 | 203 | spr->mask_bitmap = (uint8_t *)malloc(size); 204 | if (!spr->mask_bitmap) 205 | { 206 | fprintf(stderr, "Failed allocating %d bytes for mask bitmap.\n", size); 207 | exit(5); 208 | } 209 | memset(spr->mask_bitmap, 0xff, size); 210 | 211 | printf("// BMP #%d \"%s\" (%d x %d with '.'=trans, ' '=black, 'X'=XOR, 'W'=white):\n\n", num_sprites, spr->name, spr->width, spr->height); 212 | printf("// *"); 213 | for (x = 0; x < bmp_width; x++) 214 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 215 | printf("*\n"); 216 | 217 | for (y = 0; y < bmp_height; y++) 218 | { 219 | printf("// %c", (y & 0x7) == 0x0 ? '+' : '|'); 220 | for (x = 0; x < bmp_width; x++) 221 | { 222 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 223 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 224 | uint8_t t = b ? '*' : '.'; 225 | 226 | printf("%c", t); 227 | } 228 | printf("%c\n", (y & 0x7) == 0x0 ? '+' : '|'); 229 | } 230 | 231 | printf("// *"); 232 | for (x = 0; x < bmp_width; x++) 233 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 234 | printf("*\n"); 235 | 236 | printf("\n// Compressed RLE data\n"); 237 | printf("const uint8_t %s[] PROGMEM =\n{\n\t", spr->name); 238 | 239 | uint32_t currun = 0; 240 | uint8_t curstate = 0; 241 | uint8_t* compout = spr->mono_bitmap; 242 | int tok = 0; 243 | 244 | for (y = 0; y < bmp_height; y++) 245 | { 246 | for (x = 0; x < bmp_width; x++) 247 | { 248 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 249 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 250 | 251 | if (b == curstate && currun < 32767) 252 | currun++; 253 | else 254 | { 255 | if (currun < 128) 256 | { 257 | *compout++ = currun; 258 | printf("0x%02x, ", currun); 259 | tok += 1; 260 | if (tok >= 16) 261 | { 262 | tok = 0; 263 | printf("\n\t"); 264 | } 265 | } 266 | else 267 | { 268 | *compout++ = (currun >> 8) | 0x80; 269 | *compout++ = (currun & 0xff); 270 | 271 | printf("0x%02x, ", 0x80 | (currun >> 8)); 272 | tok += 1; 273 | if (tok >= 16) 274 | { 275 | tok = 0; 276 | printf("\n\t"); 277 | } 278 | printf("0x%02x, ", (currun & 0xff)); 279 | tok += 1; 280 | if (tok >= 16) 281 | { 282 | tok = 0; 283 | printf("\n\t"); 284 | } 285 | } 286 | currun = 1; 287 | curstate = !curstate; 288 | } 289 | } 290 | } 291 | 292 | if (currun) 293 | { 294 | if (currun < 128) 295 | { 296 | *compout++ = currun; 297 | printf("0x%02x", currun); 298 | tok += 1; 299 | if (tok >= 16) 300 | { 301 | tok = 0; 302 | printf("\n\t"); 303 | } 304 | else 305 | printf(", "); 306 | 307 | } 308 | else 309 | { 310 | *compout++ = (currun >> 8) | 0x80; 311 | *compout++ = (currun & 0xff); 312 | 313 | printf("0x%02x", 0x80 | (currun >> 8)); 314 | tok += 1; 315 | if (tok >= 16) 316 | { 317 | tok = 0; 318 | printf("\n\t"); 319 | } 320 | else 321 | printf(", "); 322 | printf("0x%02x", (currun & 0xff)); 323 | tok += 1; 324 | if (tok >= 16) 325 | { 326 | tok = 0; 327 | printf("\n\t"); 328 | } 329 | else 330 | printf(", "); 331 | } 332 | } 333 | printf("\n};\n"); 334 | printf("\n// Compressed RLE size %d\n", (int32_t)(compout - spr->mono_bitmap)); 335 | 336 | printf("\n// Test decompress:\n"); 337 | 338 | uint8_t *cmp = spr->mono_bitmap; 339 | 340 | printf("// "); 341 | 342 | int runcnt; 343 | int color = 0; 344 | int pixcount = 0; 345 | while (cmp < compout) 346 | { 347 | runcnt = *cmp++; 348 | if (runcnt & 0x80) 349 | runcnt = ((runcnt & 0x7f) << 8) | *cmp++; 350 | 351 | while (runcnt--) 352 | { 353 | printf("%d", color); 354 | if (++pixcount == bmp_width) 355 | { 356 | pixcount = 0; 357 | printf("\n// "); 358 | } 359 | } 360 | color ^= 1; 361 | } 362 | 363 | printf("\n\n"); 364 | 365 | free(RGB24_bitmap); 366 | RGB24_bitmap = NULL; 367 | 368 | num_sprites++; 369 | } 370 | 371 | printf("// EOF\n"); 372 | fprintf(stderr, "Done!\n"); 373 | 374 | return 0; 375 | } 376 | -------------------------------------------------------------------------------- /PDQ_ST7735/tools/readme.txt: -------------------------------------------------------------------------------- 1 | This a little "throw-away" utility I used to crunch a monochrome HackADay logo (http://hackaday.com) into something 2 | small enough to include in the benchmark. See "graphictest" example for how to decompress. 3 | 4 | It is messily hacked together, so beware (originally from an Arduino composite video sprite library "cruncher" https://www.youtube.com/watch?v=Imk5ony8JHI that is still a W.I.P.) 5 | 6 | Thanks Hack-A-Day (for your cool logo - please don't sue me...) 7 | -------------------------------------------------------------------------------- /PDQ_ST7781/PDQ_ST7781.cpp: -------------------------------------------------------------------------------- 1 | // Nothing, all in the header 2 | -------------------------------------------------------------------------------- /PDQ_ST7781/README.txt: -------------------------------------------------------------------------------- 1 | NOTE: This driver was based on Seeed TFT library ( https://github.com/Seeed-Studio/TFT_Touch_Shield_V1 ) and made to work with Adafruit style PDQ_GFX. Thanks Seeed Studio and Adafruit! 2 | 3 | It works with Seeed Studio Arduino Touch Shield V1.0 (which was also sold by Radio Shack). Fast parallel LCD interface (not SPI). 4 | 5 | See http://www.seeedstudio.com/wiki/2.8%27%27_TFT_Touch_Shield_V1.0 6 | -------------------------------------------------------------------------------- /PDQ_ST7781/examples/PDQ_GFX_Button_test/PDQ_GFX_Button_test.ino: -------------------------------------------------------------------------------- 1 | // Simple test of PDQ_GFX_Button (based on Adafruit http://github.com/adafruit/Adafruit-GFX-Library) 2 | // This is designed to use Arduino Uno (or equivilent) 3 | // with Adafruit 2.8" TFT Touch Shield for Arduino w/Capacitive Touch (http://www.adafruit.com/products/1947) 4 | 5 | #include // must include this here (or else IDE can't find it) 6 | #include // must include this here (or else IDE can't find it) 7 | #include 8 | #include "PDQ_ILI9341_config.h" // PDQ: ILI9341 pins and other setup for this sketch 9 | #include 10 | #include // I2C capacitive touch library from Adafruit 11 | 12 | Adafruit_FT6206 ts = Adafruit_FT6206(); // touch screen library object 13 | PDQ_ILI9341 tft = PDQ_ILI9341(); // PDQ_GFX lcd library object 14 | 15 | #define NUM_BUTTONS 2 16 | PDQ_GFX_Button button[NUM_BUTTONS]; // array of buttons 17 | 18 | int16_t current_count = 0; // test count 19 | 20 | void setup(void) 21 | { 22 | Serial.begin(9600); 23 | 24 | tft.begin(); 25 | 26 | if (!ts.begin()) 27 | { 28 | Serial.println(F("Unable to start touchscreen.")); 29 | } 30 | else 31 | { 32 | Serial.println(F("Touchscreen started.")); 33 | } 34 | 35 | button[0].initButton(&tft, 60, 100, 72, 72, ILI9341_RED, ILI9341_BLACK, ILI9341_WHITE, "Decrement", 1); 36 | button[1].initButton(&tft, 180, 100, 72, 72, ILI9341_GREEN, ILI9341_BLACK, ILI9341_WHITE, "Increment", 1); 37 | 38 | tft.fillScreen(ILI9341_BLUE); 39 | 40 | tft.setCursor(54, 10); 41 | tft.setTextColor(ILI9341_WHITE, ILI9341_BLUE); 42 | tft.setTextSize(1); 43 | tft.print(F("Simple GFX_Button Test")); 44 | 45 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 46 | button[i].drawButton(false); 47 | } 48 | 49 | void loop() 50 | { 51 | // See if screen is being touched 52 | if (ts.touched()) 53 | { 54 | // Retrieve touch point 55 | TS_Point p = ts.getPoint(); 56 | 57 | // reverse coordinates to match orientation of LCD 58 | int x = tft.width() - p.x; 59 | int y = tft.height() - p.y; 60 | 61 | // tft.drawPixel(x, y, 0xffff); // touch debugging 62 | 63 | // loop through buttons and process touch coordinate 64 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 65 | { 66 | if (button[i].contains(x, y)) 67 | { 68 | button[i].press(true); 69 | } 70 | else 71 | { 72 | // if still touched, but outside of button area 73 | if (button[i].isPressed()) 74 | button[i].drawButton(false); // unhighlight 75 | button[i].press(false); // set not pressed 76 | button[i].press(false); // twice, because we don't want "justReleased" to return true 77 | } 78 | } 79 | } 80 | else 81 | { 82 | // screen not touched, so all buttons not pressed 83 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 84 | button[i].press(false); 85 | } 86 | 87 | // draw button and perform action if button was just released 88 | for (uint8_t i = 0; i < NUM_BUTTONS; i++) 89 | { 90 | if (button[i].justPressed()) 91 | { 92 | button[i].drawButton(true); 93 | } 94 | else if (button[i].justReleased()) 95 | { 96 | button[i].drawButton(false); 97 | 98 | // perform button action (decrement or increment in this simple test) 99 | if (i == 0) 100 | current_count -= 1; 101 | else if (i == 1) 102 | current_count += 1; 103 | } 104 | } 105 | 106 | // draw the current count 107 | tft.setCursor(60, 200); 108 | tft.setTextColor(ILI9341_WHITE, ILI9341_BLUE); 109 | tft.setTextSize(2); 110 | tft.print("Count = "); 111 | tft.print(current_count); 112 | tft.print(" "); 113 | 114 | // make sure we don't go too fast for touch controller 115 | delay(1); 116 | } 117 | -------------------------------------------------------------------------------- /PDQ_ST7781/examples/PDQ_GFX_Button_test/PDQ_ILI9341_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ILI9341 configuration 3 | // 4 | // You need to include this file above #include "PDQ_ILI9341.h" in your sketch. 5 | // Check settings on lines marked with "<=". 6 | 7 | // NOTE: These are typical hookups individual boards will vary, please check your documentation. 8 | // CAUTION: While Adafruit boards generally always come with needed level-converters, I find many 9 | // other LCD displays advertised as supporting 5V only support 5V power (with a regulator). 10 | // They still only have 3.3V safe logic (CS, DC, RESET, MOSI, SCK marked with * below). 11 | // If this is the case you will need a voltage level-converter (e.g., HC4050, divider circuit etc.). 12 | // 13 | // LCD PIN Uno (328) Leo (32u4) 644/1284 14 | // ------- --------- ---------- -------- 15 | // 1 VCC 3.3V/5V 3.3V/5V 3.3V/5V // +3.3V or 5V with on-board regulator 16 | // 2 GND GND GND GND 17 | // 3* CS 10 10 4 // Could be any GPIO pin, but then need to make sure SS isn't a LOW input (or slave SPI mode) 18 | // 4* RESET 0/8/RESET 0/8/RESET 0/RESET // This relies on soft-reset. You can also use Arduino reset pin (if correct voltage). 19 | // 5* DC/RS 9 9 3 // Could be any GPIO pin 20 | // 6* SDI/MOSI 11 ICSP4 5 // HW SPI pin (can't change) 21 | // 7* SCK 13 ICSP3 7 // HW SPI pin (can't change) NOTE: On Uno this causes on-board LED to flicker during SPI use 22 | // 8* LED 3.3V/5V 3.3V/5V 3.3V/5V // LCD screen blanked when LOW (could use GPIO for PWM dimming) 23 | // 9 SDO/MISO - - - // (not used if present, LCD code is currently "write only") 24 | // 25 | // * = Typically only 3.3V safe logic-line (unless board has level converter [ala Adafruit]). Be careful with 5V! 26 | 27 | #define ILI9341_CS_PIN 10 // <= /CS pin (chip-select, LOW to get attention of ILI9341, HIGH and it ignores SPI bus) 28 | #define ILI9341_DC_PIN 9 // <= DC pin (1=data or 0=command indicator line) also called RS 29 | #define ILI9341_RST_PIN 8 // <= RST pin (optional) 30 | // (other pins used are dictated by AVR HW SPI used as shown above) 31 | 32 | // other PDQ library options 33 | #define ILI9341_SAVE_SPCR 0 // <= 0/1 with 1 to save/restore AVR SPI control register (to "play nice" when other SPI use) 34 | -------------------------------------------------------------------------------- /PDQ_ST7781/examples/PDQ_GFX_Button_test/PDQ_ST7781_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ST7781 configuration (using 8-bit "parallel" interface with 16-bit data) 3 | // 4 | // You need to include this file above #include "PDQ_ST7781.h" in your sketch. 5 | 6 | #if 0 // set to 1 for SeeedStudio Touch Shield V1.0 PORT optimized version 7 | 8 | // Seeed Studio Touch Shield V1.0 pin usage: 9 | // D2 - LCD data bit 0 10 | // D3 - LCD data bit 1 11 | // D4 - LCD data bit 2 12 | // D5 - LCD data bit 3 13 | // D6 - LCD data bit 4 14 | // D7 - LCD data bit 5 15 | // D8 - LCD data bit 6 16 | // D9 - LCD data bit 7 17 | // D10 - LCD CS pin, active low. 18 | // D11 - LCD RS pin. 19 | // D12 - LCD WR pin. 20 | // D13 - LCD RD pin. 21 | // 22 | // LCD Data Bit : 7 6 5 4 3 2 1 0 23 | // Uno port/pin : PB1 PB0 PB7 PD6 PD5 PD4 PD3 PD2 24 | 25 | #define USE_PORT_ACCESS 26 | 27 | #define PORT_DATALO6 PORTD // PD7=D5 PD6=D4 PD5=D3 PD4=D2 PD3=D1 PD2=D0 x x 28 | #define DDR_DATALO6 DDRD 29 | #define DATALO6_MASK 0xfc 30 | 31 | #define PORT_DATAHI2 PORTB // x x PB5=RD PB4=WR PB3=RS PB2=CS PB1=D7 PB0=D6 32 | #define DDR_DATAHI2 DDRB 33 | #define DATAHI2_MASK 0x03 34 | #define CS_BIT 0x04 35 | #define RS_BIT 0x08 36 | #define WR_BIT 0x10 37 | #define RD_BIT 0x20 // read functionality is not used by this library 38 | 39 | #else // else, individually assignable pin version (but significantly slower) 40 | 41 | // set these below for your shield/breakout pins (Arduino "digitalWrite" numbering) 42 | #define LCD_D0 2 43 | #define LCD_D1 3 44 | #define LCD_D2 4 45 | #define LCD_D3 5 46 | #define LCD_D4 6 47 | #define LCD_D5 7 48 | #define LCD_D6 8 49 | #define LCD_D7 9 50 | #define LCD_CS 10 51 | #define LCD_RS 11 // sometimes called "DC" 52 | #define LCD_WR 12 53 | #define LCD_RD 13 // read functionality is not used by this library (comment this out if you don't have this pin) 54 | 55 | #endif 56 | 57 | #define FIXED_ROTATION 0 // 0 to 3 or comment-out for run-time rotation switching (slightly slower and bigger) 58 | -------------------------------------------------------------------------------- /PDQ_ST7781/examples/PDQ_graphicstest/PDQ_ST7781_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDQ_ST7781 configuration (using 8-bit "parallel" interface with 16-bit data) 3 | // 4 | // You need to include this file above #include "PDQ_ST7781.h" in your sketch. 5 | 6 | #if 0 // set to 1 for SeeedStudio Touch Shield V1.0 PORT optimized version 7 | 8 | // Seeed Studio Touch Shield V1.0 pin usage: 9 | // D2 - LCD data bit 0 10 | // D3 - LCD data bit 1 11 | // D4 - LCD data bit 2 12 | // D5 - LCD data bit 3 13 | // D6 - LCD data bit 4 14 | // D7 - LCD data bit 5 15 | // D8 - LCD data bit 6 16 | // D9 - LCD data bit 7 17 | // D10 - LCD CS pin, active low. 18 | // D11 - LCD RS pin. 19 | // D12 - LCD WR pin. 20 | // D13 - LCD RD pin. 21 | // 22 | // LCD Data Bit : 7 6 5 4 3 2 1 0 23 | // Uno port/pin : PB1 PB0 PB7 PD6 PD5 PD4 PD3 PD2 24 | 25 | #define USE_PORT_ACCESS 26 | 27 | #define PORT_DATALO6 PORTD // PD7=D5 PD6=D4 PD5=D3 PD4=D2 PD3=D1 PD2=D0 x x 28 | #define DDR_DATALO6 DDRD 29 | #define DATALO6_MASK 0xfc 30 | 31 | #define PORT_DATAHI2 PORTB // x x PB5=RD PB4=WR PB3=RS PB2=CS PB1=D7 PB0=D6 32 | #define DDR_DATAHI2 DDRB 33 | #define DATAHI2_MASK 0x03 34 | #define CS_BIT 0x04 35 | #define RS_BIT 0x08 36 | #define WR_BIT 0x10 37 | #define RD_BIT 0x20 // read functionality is not used by this library 38 | 39 | #else // else, individually assignable pin version (but significantly slower) 40 | 41 | // set these below for your shield/breakout pins (Arduino "digitalWrite" numbering) 42 | #define LCD_D0 2 43 | #define LCD_D1 3 44 | #define LCD_D2 4 45 | #define LCD_D3 5 46 | #define LCD_D4 6 47 | #define LCD_D5 7 48 | #define LCD_D6 8 49 | #define LCD_D7 9 50 | #define LCD_CS 10 51 | #define LCD_RS 11 // sometimes called "DC" 52 | #define LCD_WR 12 53 | #define LCD_RD 13 // read functionality is not used by this library (comment this out if you don't have this pin) 54 | 55 | #endif 56 | 57 | #define FIXED_ROTATION 0 // 0 to 3 or comment-out for run-time rotation switching (slightly slower and bigger) 58 | -------------------------------------------------------------------------------- /PDQ_ST7781/library.properties: -------------------------------------------------------------------------------- 1 | name=PDQ_ST7781 driver for PDQ_GFX Library 2 | version=1.1.5 3 | author=XarkLabs 4 | maintainer=Xark 5 | sentence=This is driver for ST7781 LCD that goes with PDQ_GFX library. 6 | paragraph=The PDQ_GFX library and drivers are "re-mixed" speed and size optimzed versions of Adafruit_GFX library and drivers for AVR Arduino (while maintaining sketch compatibility with original). Thanks Adafruit! Visit #Arduino on freenode.net IRC 7 | category=Display 8 | url=https://github.com/XarkLabs/PDQ_GFX_Libs/tree/master/PDQ_ST7781 9 | architectures=avr 10 | -------------------------------------------------------------------------------- /PDQ_ST7781/tools/HaD_240x320.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XarkLabs/PDQ_GFX_Libs/1d2dcda0031a5ed451175f9d70680e53e7a20200/PDQ_ST7781/tools/HaD_240x320.bmp -------------------------------------------------------------------------------- /PDQ_ST7781/tools/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Simple makefile for monochrome BMP to RLE data 3 | # 4 | all: crunch_bmp_rle 5 | 6 | crunch_bmp_rle: crunch_bmp_rle.cpp 7 | $(CXX) -Wall -Wextra -Os -o $@ $< 8 | 9 | clean: 10 | $(RM) crunch_bmp_rle crunch_bmp_rle.exe 11 | -------------------------------------------------------------------------------- /PDQ_ST7781/tools/crunch_bmp_rle.cpp: -------------------------------------------------------------------------------- 1 | // Hacktastic Q & D BMP -> TVGameKit sprite cruncher 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | uint8_t bmp_header[54]; 10 | uint32_t pixel_offset; 11 | uint32_t dib_size; 12 | int32_t bmp_width; 13 | int32_t bmp_height; 14 | int16_t bmp_bpp; 15 | uint32_t bmp_line; 16 | uint8_t *RGB24_bitmap; 17 | 18 | #define MAX_SPRITES 256 19 | 20 | struct sprite_info 21 | { 22 | char *name; 23 | int32_t width; 24 | int32_t height; 25 | int32_t byte_width; 26 | uint8_t *mono_bitmap; 27 | uint8_t *mask_bitmap; 28 | }; 29 | 30 | int32_t num_sprites; 31 | struct sprite_info sprite[MAX_SPRITES]; 32 | 33 | // data = (data & mask) ^ mono; 34 | // 35 | // mask mono 36 | // 0 0 = black 37 | // 0 1 = white 38 | // 1 0 = transparent 39 | // 1 1 = xor 40 | // 41 | 42 | uint8_t human_readable = 0; 43 | uint8_t verbose = 1; 44 | 45 | uint8_t preamble_done = 0; 46 | 47 | int main(int argc, char* argv[]) 48 | { 49 | int32_t x, y, size; 50 | int32_t arg; 51 | struct sprite_info *spr = NULL; 52 | 53 | const char* bmp_name; 54 | FILE* f = NULL; 55 | 56 | for (arg = 1; arg < argc; arg++) 57 | { 58 | spr = &sprite[num_sprites]; 59 | 60 | if (argv[arg][0] == '-') 61 | { 62 | char *namestr = NULL; 63 | char c = argv[arg][1]; 64 | if (c >= 'A' && c <= 'Z') 65 | c += 32; 66 | switch(c) 67 | { 68 | case 'n': 69 | namestr = &argv[arg][2]; 70 | 71 | if (*namestr == 0 && arg+1 < argc) 72 | namestr = argv[++arg]; 73 | 74 | if (*namestr == 0) 75 | { 76 | fprintf(stderr, "Need symbol name after -n.\n"); 77 | exit(5); 78 | } 79 | 80 | if (spr->name) 81 | free(spr->name); 82 | spr->name = strdup(namestr); 83 | 84 | break; 85 | 86 | default: 87 | printf("Usage: crunch_bmp_rle [-n ]\n"); 88 | printf("\n"); 89 | printf(" -n - Name of next tilemap or tileset font (or BMP name used)\n"); 90 | printf("\n"); 91 | printf("Output will go to stdout, so use \"> output\" to redirect to file.\n"); 92 | exit(1); 93 | 94 | break; 95 | } 96 | 97 | continue; 98 | } 99 | 100 | bmp_name = argv[arg]; 101 | 102 | if ((f = fopen(bmp_name, "rb")) == NULL) 103 | { 104 | fprintf(stderr, "Error opening input BMP file \"%s\".\n", bmp_name); 105 | exit(5); 106 | } 107 | 108 | if (fread(bmp_header, sizeof (unsigned char), 54, f) != 54) 109 | { 110 | fprintf(stderr, "Error reading BMP header from \"%s\".\n", bmp_name); 111 | exit(5); 112 | } 113 | 114 | if (bmp_header[0] != 'B' || bmp_header[1] != 'M') 115 | { 116 | fprintf(stderr, "Error not valid BMP format \"%s\".\n", bmp_name); 117 | exit(5); 118 | } 119 | 120 | pixel_offset = bmp_header[10] | (bmp_header[11]<<8) | (bmp_header[12]<<16) | (bmp_header[13]<<24); 121 | dib_size = bmp_header[14] | (bmp_header[15]<<8) | (bmp_header[16]<<16) | (bmp_header[17]<<24); 122 | 123 | if (dib_size != 40) 124 | { 125 | fprintf(stderr, "Error unsupported BMP format DIB=%d \"%s\".\n", dib_size, bmp_name); 126 | exit(5); 127 | } 128 | 129 | // extract image height and width from header 130 | bmp_width = bmp_header[18] | (bmp_header[19]<<8) | (bmp_header[20]<<16) | (bmp_header[21]<<24); 131 | bmp_height = bmp_header[22] | (bmp_header[23]<<8) | (bmp_header[24]<<16) | (bmp_header[25]<<24); 132 | if (bmp_width < 0) 133 | bmp_width = -bmp_width; 134 | if (bmp_height < 0) 135 | bmp_height = -bmp_height; 136 | bmp_bpp = bmp_header[28] | (bmp_header[29]<<8); 137 | 138 | if (bmp_width < 1 || bmp_width > 4096 || bmp_height < 1 || bmp_height > 4096 || bmp_bpp != 24) 139 | { 140 | fprintf(stderr, "BMP \"%s\" size or depth fails sanity check (%d x %d bpp=%d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp); 141 | exit(5); 142 | } 143 | 144 | bmp_line = (((bmp_width*bmp_bpp) + 31) / 32) * 4; 145 | size = bmp_line * bmp_height; 146 | 147 | printf("\n// File: \"%s\": %d x %d (%d bpp, pixel offset %d, bytes per line %d, bitmap size %d).\n", bmp_name, bmp_width, bmp_height, bmp_bpp, pixel_offset, bmp_line, size); 148 | 149 | RGB24_bitmap = (uint8_t *)malloc(size); 150 | if (!RGB24_bitmap) 151 | { 152 | fprintf(stderr, "Failed allocating %d bytes.\n", size); 153 | exit(5); 154 | } 155 | memset(RGB24_bitmap, 0, size); 156 | 157 | // seek to bitmap pixels and read them in 158 | if (fseek(f, pixel_offset, SEEK_SET) != 0 || fread(RGB24_bitmap, sizeof (unsigned char), size, f) != (size_t)size) 159 | { 160 | fprintf(stderr, "Error reading %d bytes of BMP data from \"%s\".\n", size, bmp_name); 161 | exit(5); 162 | } 163 | fclose(f); 164 | f = NULL; 165 | 166 | // convert bitmap into sprite and fill out sprite_info 167 | 168 | // give it a symbol name if not already specified 169 | if (spr->name == NULL) 170 | { 171 | char str_temp[256]; 172 | const char *n = bmp_name; 173 | 174 | // find start of filename after path 175 | if (strrchr(n, '/')) 176 | n = strrchr(n, '/')+1; 177 | else if (strrchr(n, '\\')) 178 | n = strrchr(n, '\\')+1; 179 | else if (strrchr(n, ':')) 180 | n = strrchr(n, ':')+1; 181 | 182 | strncpy(str_temp, n, sizeof (str_temp)-1); 183 | 184 | // remove extension 185 | if (strrchr(str_temp, '.')) 186 | *strrchr(str_temp, '.') = 0; 187 | 188 | spr->name = strdup(str_temp); 189 | } 190 | 191 | spr->width = bmp_width; 192 | spr->byte_width = ((spr->width + 7)/8)+1; 193 | spr->height = bmp_height; 194 | size = spr->byte_width * spr->height; 195 | spr->mono_bitmap = (uint8_t *)malloc(size); 196 | if (!spr->mono_bitmap) 197 | { 198 | fprintf(stderr, "Failed allocating %d bytes for mono bitmap.\n", size); 199 | exit(5); 200 | } 201 | memset(spr->mono_bitmap, 0, size); 202 | 203 | spr->mask_bitmap = (uint8_t *)malloc(size); 204 | if (!spr->mask_bitmap) 205 | { 206 | fprintf(stderr, "Failed allocating %d bytes for mask bitmap.\n", size); 207 | exit(5); 208 | } 209 | memset(spr->mask_bitmap, 0xff, size); 210 | 211 | printf("// BMP #%d \"%s\" (%d x %d with '.'=trans, ' '=black, 'X'=XOR, 'W'=white):\n\n", num_sprites, spr->name, spr->width, spr->height); 212 | printf("// *"); 213 | for (x = 0; x < bmp_width; x++) 214 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 215 | printf("*\n"); 216 | 217 | for (y = 0; y < bmp_height; y++) 218 | { 219 | printf("// %c", (y & 0x7) == 0x0 ? '+' : '|'); 220 | for (x = 0; x < bmp_width; x++) 221 | { 222 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 223 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 224 | uint8_t t = b ? '*' : '.'; 225 | 226 | printf("%c", t); 227 | } 228 | printf("%c\n", (y & 0x7) == 0x0 ? '+' : '|'); 229 | } 230 | 231 | printf("// *"); 232 | for (x = 0; x < bmp_width; x++) 233 | printf("%c", (x & 0x7) == 0x0 ? '+' : '-'); 234 | printf("*\n"); 235 | 236 | printf("\n// Compressed RLE data\n"); 237 | printf("const uint8_t %s[] PROGMEM =\n{\n\t", spr->name); 238 | 239 | uint32_t currun = 0; 240 | uint8_t curstate = 0; 241 | uint8_t* compout = spr->mono_bitmap; 242 | int tok = 0; 243 | 244 | for (y = 0; y < bmp_height; y++) 245 | { 246 | for (x = 0; x < bmp_width; x++) 247 | { 248 | uint8_t* rgb = &RGB24_bitmap[((bmp_height-1-y) * bmp_line) + (x * 3)]; 249 | uint8_t b = rgb[1] >= 0x80 ? 0x1 : 0x0; 250 | 251 | if (b == curstate && currun < 32767) 252 | currun++; 253 | else 254 | { 255 | if (currun < 128) 256 | { 257 | *compout++ = currun; 258 | printf("0x%02x, ", currun); 259 | tok += 1; 260 | if (tok >= 16) 261 | { 262 | tok = 0; 263 | printf("\n\t"); 264 | } 265 | } 266 | else 267 | { 268 | *compout++ = (currun >> 8) | 0x80; 269 | *compout++ = (currun & 0xff); 270 | 271 | printf("0x%02x, ", 0x80 | (currun >> 8)); 272 | tok += 1; 273 | if (tok >= 16) 274 | { 275 | tok = 0; 276 | printf("\n\t"); 277 | } 278 | printf("0x%02x, ", (currun & 0xff)); 279 | tok += 1; 280 | if (tok >= 16) 281 | { 282 | tok = 0; 283 | printf("\n\t"); 284 | } 285 | } 286 | currun = 1; 287 | curstate = !curstate; 288 | } 289 | } 290 | } 291 | 292 | if (currun) 293 | { 294 | if (currun < 128) 295 | { 296 | *compout++ = currun; 297 | printf("0x%02x", currun); 298 | tok += 1; 299 | if (tok >= 16) 300 | { 301 | tok = 0; 302 | printf("\n\t"); 303 | } 304 | else 305 | printf(", "); 306 | 307 | } 308 | else 309 | { 310 | *compout++ = (currun >> 8) | 0x80; 311 | *compout++ = (currun & 0xff); 312 | 313 | printf("0x%02x", 0x80 | (currun >> 8)); 314 | tok += 1; 315 | if (tok >= 16) 316 | { 317 | tok = 0; 318 | printf("\n\t"); 319 | } 320 | else 321 | printf(", "); 322 | printf("0x%02x", (currun & 0xff)); 323 | tok += 1; 324 | if (tok >= 16) 325 | { 326 | tok = 0; 327 | printf("\n\t"); 328 | } 329 | else 330 | printf(", "); 331 | } 332 | } 333 | printf("\n};\n"); 334 | printf("\n// Compressed RLE size %d\n", (int32_t)(compout - spr->mono_bitmap)); 335 | 336 | printf("\n// Test decompress:\n"); 337 | 338 | uint8_t *cmp = spr->mono_bitmap; 339 | 340 | printf("// "); 341 | 342 | int runcnt; 343 | int color = 0; 344 | int pixcount = 0; 345 | while (cmp < compout) 346 | { 347 | runcnt = *cmp++; 348 | if (runcnt & 0x80) 349 | runcnt = ((runcnt & 0x7f) << 8) | *cmp++; 350 | 351 | while (runcnt--) 352 | { 353 | printf("%d", color); 354 | if (++pixcount == bmp_width) 355 | { 356 | pixcount = 0; 357 | printf("\n// "); 358 | } 359 | } 360 | color ^= 1; 361 | } 362 | 363 | printf("\n\n"); 364 | 365 | free(RGB24_bitmap); 366 | RGB24_bitmap = NULL; 367 | 368 | num_sprites++; 369 | } 370 | 371 | printf("// EOF\n"); 372 | fprintf(stderr, "Done!\n"); 373 | 374 | return 0; 375 | } 376 | -------------------------------------------------------------------------------- /PDQ_ST7781/tools/readme.txt: -------------------------------------------------------------------------------- 1 | This a little "throw-away" utility I used to crunch a monochrome HackADay logo (http://hackaday.com) into something 2 | small enough to include in the benchmark. See "graphictest" example for how to decompress. 3 | 4 | It is messily hacked together, so beware (originally from an Arduino composite video sprite library "cruncher" https://www.youtube.com/watch?v=Imk5ony8JHI that is still a W.I.P.) 5 | 6 | Thanks Hack-A-Day (for your cool logo - please don't sue me...) 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PDQ_GFX_Libs with packed font support 2 | ============ 3 | Version with special "packed" font support. Also include TTF2GFX for create custom GFX fonts from TTF. 4 | Speed up improvement for GFX text drawing about 2-3 times. 5 | Allow to create custom fonts with subset of chars (not all ASCII table). 6 | Special "packing" algorithm for GFX font allow to save 20-50% of space 7 | 8 | PDQ_GFX_Libs 9 | ============ 10 | 11 | An optimized fork of Adafruit's GFX library (and LCD drivers) for Arduino (AVR). 12 | 13 | This is a replacement "re-mix" of the Adafruit GFX library and associated hardware drivers. 14 | 15 | Currently supported are ILI9340, ILI9341, ST7735 and ST7781 LCD drivers (and compatible chipsets). 16 | 17 | It is between 2.5x and 12x faster than the Adafruit libraries for SPI LCDs, but it aims to be completely "sketch compatible" (so you 18 | can easily speed up your sketches that are using Adafruit's library). You just need to change the name of the #include and "tft" 19 | object. A version of the Adafruit "benchmark" example is included (PDQ_graphicsbest.ino) with each driver library. 20 | 21 | This includes the 1.8", 2.2" and 2.8" SPI TFT LCD boards or "touch shields" that are commonly available from Adafruit and 22 | many other vendors. These are commonly 128x128, 128x160 or 240x320 (but the library supports rotation). 23 | 24 | I would also like to thank the excellent http://fastled.io/ project for creating the "FastPin.h" template header that allows 25 | for full speed GPIO while allowing the use of "friendly" Arduino pin numbering (it is included in the PDQ driver libraries). 26 | 27 | New features in latest commit ("v1.1.5" 2016-04-09) include: 28 | 29 | * Synced core functions with Adafruit_GFX (few changes - I think their clipping is still broken [fixed in PDQ_GFX]) 30 | * Support for new fonts as seen in Adafruit_GFX GitHub 31 | * Minor bugfixes 32 | 33 | New features in latest commit ("v1.0.0" 2015-05-30) include: 34 | 35 | * Arduino IDE 1.6.x support (mainly information in library.properties, but also tested and 100% warning free). 36 | * New ATtiny85 support for IL934x using USI SPI (not quite as fast as 328P - but can run 20MHz PLL to make up). 37 | * New support for parallel ST7781 driver as used in Seeed Studio 2.8" Touch Shield (also sold by Radio Shack). This is the fastest LCD supported currently. 38 | * "Bit-banged" SPI support. Not as fast, but can use (nearly) any pins. 39 | * Added pushColor with a count that can speed up application rendering runs of same color. 40 | * Tidied up files and made sure all drivers were updated with latest tweaks. 41 | 42 | Suggestions, issues, bugs and comments welcome. Via https://hackaday.io/Xark or visit #Arduino channel on Freenode.net IRC. 43 | I have also posted a write-up about the development of this library at http://hackaday.io/Xark (describes most of the optimizations done). 44 | 45 | 46 | Issues 47 | ------ 48 | 49 | Currently, the library may only be used from the INO file in your project. You _cannot_ include it in a header file and 50 | use it from other CPP files. The current workaround is to write wrapper functions or classes, declare them in a header 51 | file, and then implement them in the INO file. --------------------------------------------------------------------------------