diff --git a/Font5x7.c b/Font5x7.c new file mode 100644 index 0000000..1a08e44 --- /dev/null +++ b/Font5x7.c @@ -0,0 +1,2565 @@ +/* Generated by convbdf on Tue Oct 3 00:24:24 MDT 2000. */ +/* Font information: + name: "-Misc-Fixed-Medium-R-Normal--7-70-75-75-C-50-ISO8859-1" + pixel size: 7 + ascent: 6 + descent: 1 +*/ + +#include + +/* Font character bitmap data. */ +const uint16_t x5x7_bits [] = +{ + + /* Character (0x00): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |**** | + |**** | + |**** | + |**** | + |**** | + |**** | + | | + +----------------+ */ + 0xf000, + 0xf000, + 0xf000, + 0xf000, + 0xf000, + 0xf000, + 0x0000, + + /* Character (0x01): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | * | + | *** | + |***** | + | *** | + | * | + | | + +----------------+ */ + 0x0000, + 0x2000, + 0x7000, + 0xf800, + 0x7000, + 0x2000, + 0x0000, + + /* Character (0x02): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * * | + |* * | + | * * | + |* * | + | * * | + |* * | + | | + +----------------+ */ + 0x5000, + 0xa000, + 0x5000, + 0xa000, + 0x5000, + 0xa000, + 0x0000, + + /* Character (0x03): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |*** | + |* * | + |* * | + | *** | + | * | + | * | + +----------------+ */ + 0xa000, + 0xe000, + 0xa000, + 0xa000, + 0x7000, + 0x2000, + 0x2000, + + /* Character (0x04): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |** | + |* | + |** | + |* ** | + | * | + | ** | + | * | + +----------------+ */ + 0xc000, + 0x8000, + 0xc000, + 0xb000, + 0x2000, + 0x3000, + 0x2000, + + /* Character (0x05): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |** | + |* | + |** | + | ** | + | * * | + | ** | + | * * | + +----------------+ */ + 0xc000, + 0x8000, + 0xc000, + 0x6000, + 0x5000, + 0x6000, + 0x5000, + + /* Character (0x06): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* | + |* | + |** | + | ** | + | * | + | ** | + | * | + +----------------+ */ + 0x8000, + 0x8000, + 0xc000, + 0x3000, + 0x2000, + 0x3000, + 0x2000, + + /* Character (0x07): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * * | + | * | + | | + | | + | | + | | + +----------------+ */ + 0x2000, + 0x5000, + 0x2000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x08): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | *** | + | * | + | | + | *** | + | | + | | + +----------------+ */ + 0x2000, + 0x7000, + 0x2000, + 0x0000, + 0x7000, + 0x0000, + 0x0000, + + /* Character (0x09): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |** * | + |* ** | + |* * | + | * | + | * | + | ** | + +----------------+ */ + 0x9000, + 0xd000, + 0xb000, + 0x9000, + 0x2000, + 0x2000, + 0x3000, + + /* Character (0x0a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + |* * | + | * | + | *** | + | * | + | * | + +----------------+ */ + 0xa000, + 0xa000, + 0xa000, + 0x4000, + 0x7000, + 0x2000, + 0x2000, + + /* Character (0x0b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + |*** | + | | + | | + | | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0xe000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x0c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + |*** | + | * | + | * | + | * | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0xe000, + 0x2000, + 0x2000, + 0x2000, + + /* Character (0x0d): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | *** | + | * | + | * | + | * | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x3800, + 0x2000, + 0x2000, + 0x2000, + + /* Character (0x0e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | *** | + | | + | | + | | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0x3800, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x0f): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + |***** | + | * | + | * | + | * | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0xf800, + 0x2000, + 0x2000, + 0x2000, + + /* Character (0x10): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + |***** | + | | + | | + | | + | | + | | + +----------------+ */ + 0x0000, + 0xf800, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x11): + bbw=6, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |***** | + | | + | | + | | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0xf800, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x12): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + |***** | + | | + | | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0xf800, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x13): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | | + |***** | + | | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0xf800, + 0x0000, + 0x0000, + + /* Character (0x14): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | | + | | + |***** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0xf800, + 0x0000, + + /* Character (0x15): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | *** | + | * | + | * | + | * | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0x3800, + 0x2000, + 0x2000, + 0x2000, + + /* Character (0x16): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + |*** | + | * | + | * | + | * | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0xe000, + 0x2000, + 0x2000, + 0x2000, + + /* Character (0x17): + bbw=6, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + |***** | + | | + | | + | | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0xf800, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x18): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + |***** | + | * | + | * | + | * | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0xf800, + 0x2000, + 0x2000, + 0x2000, + + /* Character (0x19): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + | * | + | * | + | * | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0x2000, + 0x2000, + 0x2000, + 0x2000, + + /* Character (0x1a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + | * | + | *** | + | | + +----------------+ */ + 0x1000, + 0x2000, + 0x4000, + 0x2000, + 0x1000, + 0x7000, + 0x0000, + + /* Character (0x1b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + | * | + | *** | + | | + +----------------+ */ + 0x4000, + 0x2000, + 0x1000, + 0x2000, + 0x4000, + 0x7000, + 0x0000, + + /* Character (0x1c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | *** | + | * * | + | * * | + | * * | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x7000, + 0x5000, + 0x5000, + 0x5000, + 0x0000, + + /* Character (0x1d): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | * | + | *** | + | * | + | *** | + | * | + | | + +----------------+ */ + 0x0000, + 0x1000, + 0x7000, + 0x2000, + 0x7000, + 0x4000, + 0x0000, + + /* Character (0x1e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | ** | + | * | + |*** | + | * | + |* ** | + | | + +----------------+ */ + 0x0000, + 0x3000, + 0x4000, + 0xe000, + 0x4000, + 0xb000, + 0x0000, + + /* Character (0x1f): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | * | + | | + | | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x2000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x20): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | | + | | + | | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x21): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + | | + | * | + | | + +----------------+ */ + 0x2000, + 0x2000, + 0x2000, + 0x2000, + 0x0000, + 0x2000, + 0x0000, + + /* Character (0x22): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * * | + | * * | + | * * | + | | + | | + | | + | | + +----------------+ */ + 0x5000, + 0x5000, + 0x5000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x23): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | * * | + |***** | + | * * | + |***** | + | * * | + | | + +----------------+ */ + 0x0000, + 0x5000, + 0xf800, + 0x5000, + 0xf800, + 0x5000, + 0x0000, + + /* Character (0x24): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | *** | + |* * | + | *** | + | * * | + | *** | + | | + +----------------+ */ + 0x0000, + 0x7000, + 0xa000, + 0x7000, + 0x2800, + 0x7000, + 0x0000, + + /* Character (0x25): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* | + |* * | + | * | + | * | + |* * | + | * | + | | + +----------------+ */ + 0x8000, + 0x9000, + 0x2000, + 0x4000, + 0x9000, + 0x1000, + 0x0000, + + /* Character (0x26): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | * | + |* * | + | * | + |* * | + | * * | + | | + +----------------+ */ + 0x0000, + 0x4000, + 0xa000, + 0x4000, + 0xa000, + 0x5000, + 0x0000, + + /* Character (0x27): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + | * | + |* | + | | + | | + | | + | | + +----------------+ */ + 0x6000, + 0x4000, + 0x8000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x28): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + | * | + | * | + | | + +----------------+ */ + 0x2000, + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0x2000, + 0x0000, + + /* Character (0x29): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + | * | + | * | + | | + +----------------+ */ + 0x4000, + 0x2000, + 0x2000, + 0x2000, + 0x2000, + 0x4000, + 0x0000, + + /* Character (0x2a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + |* * | + | * | + |*** | + | * | + |* * | + | | + +----------------+ */ + 0x0000, + 0xa000, + 0x4000, + 0xe000, + 0x4000, + 0xa000, + 0x0000, + + /* Character (0x2b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | * | + | * | + |***** | + | * | + | * | + | | + +----------------+ */ + 0x0000, + 0x2000, + 0x2000, + 0xf800, + 0x2000, + 0x2000, + 0x0000, + + /* Character (0x2c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | | + | ** | + | * | + |* | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x6000, + 0x4000, + 0x8000, + + /* Character (0x2d): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + |**** | + | | + | | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0xf000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x2e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | | + | ** | + | ** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x6000, + 0x6000, + 0x0000, + + /* Character (0x2f): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | * | + | * | + | * | + |* | + | | + | | + +----------------+ */ + 0x0000, + 0x1000, + 0x2000, + 0x4000, + 0x8000, + 0x0000, + 0x0000, + + /* Character (0x30): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + |* * | + |* * | + |* * | + |* * | + | * | + | | + +----------------+ */ + 0x4000, + 0xa000, + 0xa000, + 0xa000, + 0xa000, + 0x4000, + 0x0000, + + /* Character (0x31): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + |** | + | * | + | * | + | * | + |*** | + | | + +----------------+ */ + 0x4000, + 0xc000, + 0x4000, + 0x4000, + 0x4000, + 0xe000, + 0x0000, + + /* Character (0x32): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + | * | + | * | + | * | + |**** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x1000, + 0x2000, + 0x4000, + 0xf000, + 0x0000, + + /* Character (0x33): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |**** | + | * | + | ** | + | * | + |* * | + | ** | + | | + +----------------+ */ + 0xf000, + 0x1000, + 0x6000, + 0x1000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x34): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | ** | + |* * | + |**** | + | * | + | * | + | | + +----------------+ */ + 0x2000, + 0x6000, + 0xa000, + 0xf000, + 0x2000, + 0x2000, + 0x0000, + + /* Character (0x35): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |**** | + |* | + |*** | + | * | + |* * | + | ** | + | | + +----------------+ */ + 0xf000, + 0x8000, + 0xe000, + 0x1000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x36): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* | + |*** | + |* * | + |* * | + | ** | + | | + +----------------+ */ + 0x6000, + 0x8000, + 0xe000, + 0x9000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x37): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |**** | + | * | + | * | + | * | + | * | + | * | + | | + +----------------+ */ + 0xf000, + 0x1000, + 0x2000, + 0x2000, + 0x4000, + 0x4000, + 0x0000, + + /* Character (0x38): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + | ** | + |* * | + |* * | + | ** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x6000, + 0x9000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x39): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + |* * | + | *** | + | * | + | ** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x9000, + 0x7000, + 0x1000, + 0x6000, + 0x0000, + + /* Character (0x3a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | ** | + | ** | + | | + | ** | + | ** | + | | + +----------------+ */ + 0x0000, + 0x6000, + 0x6000, + 0x0000, + 0x6000, + 0x6000, + 0x0000, + + /* Character (0x3b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | ** | + | ** | + | | + | ** | + | * | + |* | + +----------------+ */ + 0x0000, + 0x6000, + 0x6000, + 0x0000, + 0x6000, + 0x4000, + 0x8000, + + /* Character (0x3c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | * | + | * | + |* | + | * | + | * | + | | + +----------------+ */ + 0x0000, + 0x2000, + 0x4000, + 0x8000, + 0x4000, + 0x2000, + 0x0000, + + /* Character (0x3d): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |**** | + | | + |**** | + | | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0xf000, + 0x0000, + 0xf000, + 0x0000, + 0x0000, + + /* Character (0x3e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + |* | + | * | + | * | + | * | + |* | + | | + +----------------+ */ + 0x0000, + 0x8000, + 0x4000, + 0x2000, + 0x4000, + 0x8000, + 0x0000, + + /* Character (0x3f): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + |* * | + | * | + | * | + | | + | * | + | | + +----------------+ */ + 0x4000, + 0xa000, + 0x2000, + 0x4000, + 0x0000, + 0x4000, + 0x0000, + + /* Character (0x40): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + |* ** | + |* ** | + |* | + | ** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0xb000, + 0xb000, + 0x8000, + 0x6000, + 0x0000, + + /* Character (0x41): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + |* * | + |**** | + |* * | + |* * | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x9000, + 0xf000, + 0x9000, + 0x9000, + 0x0000, + + /* Character (0x42): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + |* * | + |*** | + |* * | + |* * | + |*** | + | | + +----------------+ */ + 0xe000, + 0x9000, + 0xe000, + 0x9000, + 0x9000, + 0xe000, + 0x0000, + + /* Character (0x43): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + |* | + |* | + |* * | + | ** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x8000, + 0x8000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x44): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + |* * | + |* * | + |* * | + |* * | + |*** | + | | + +----------------+ */ + 0xe000, + 0x9000, + 0x9000, + 0x9000, + 0x9000, + 0xe000, + 0x0000, + + /* Character (0x45): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |**** | + |* | + |*** | + |* | + |* | + |**** | + | | + +----------------+ */ + 0xf000, + 0x8000, + 0xe000, + 0x8000, + 0x8000, + 0xf000, + 0x0000, + + /* Character (0x46): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |**** | + |* | + |*** | + |* | + |* | + |* | + | | + +----------------+ */ + 0xf000, + 0x8000, + 0xe000, + 0x8000, + 0x8000, + 0x8000, + 0x0000, + + /* Character (0x47): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + |* | + |* ** | + |* * | + | *** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x8000, + 0xb000, + 0x9000, + 0x7000, + 0x0000, + + /* Character (0x48): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + |**** | + |* * | + |* * | + |* * | + | | + +----------------+ */ + 0x9000, + 0x9000, + 0xf000, + 0x9000, + 0x9000, + 0x9000, + 0x0000, + + /* Character (0x49): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + | * | + | * | + | * | + | * | + |*** | + | | + +----------------+ */ + 0xe000, + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0xe000, + 0x0000, + + /* Character (0x4a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + |* * | + | ** | + | | + +----------------+ */ + 0x1000, + 0x1000, + 0x1000, + 0x1000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x4b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + |** | + |** | + |* * | + |* * | + | | + +----------------+ */ + 0x9000, + 0xa000, + 0xc000, + 0xc000, + 0xa000, + 0x9000, + 0x0000, + + /* Character (0x4c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* | + |* | + |* | + |* | + |* | + |**** | + | | + +----------------+ */ + 0x8000, + 0x8000, + 0x8000, + 0x8000, + 0x8000, + 0xf000, + 0x0000, + + /* Character (0x4d): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |**** | + |**** | + |* * | + |* * | + |* * | + | | + +----------------+ */ + 0x9000, + 0xf000, + 0xf000, + 0x9000, + 0x9000, + 0x9000, + 0x0000, + + /* Character (0x4e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |** * | + |** * | + |* ** | + |* ** | + |* * | + | | + +----------------+ */ + 0x9000, + 0xd000, + 0xd000, + 0xb000, + 0xb000, + 0x9000, + 0x0000, + + /* Character (0x4f): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + |* * | + |* * | + |* * | + | ** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x9000, + 0x9000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x50): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + |* * | + |* * | + |*** | + |* | + |* | + | | + +----------------+ */ + 0xe000, + 0x9000, + 0x9000, + 0xe000, + 0x8000, + 0x8000, + 0x0000, + + /* Character (0x51): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + |* * | + |* * | + |** * | + | ** | + | * | + +----------------+ */ + 0x6000, + 0x9000, + 0x9000, + 0x9000, + 0xd000, + 0x6000, + 0x1000, + + /* Character (0x52): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + |* * | + |* * | + |*** | + |* * | + |* * | + | | + +----------------+ */ + 0xe000, + 0x9000, + 0x9000, + 0xe000, + 0xa000, + 0x9000, + 0x0000, + + /* Character (0x53): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | ** | + |* * | + | * | + | * | + |* * | + | ** | + | | + +----------------+ */ + 0x6000, + 0x9000, + 0x4000, + 0x2000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x54): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + | * | + | * | + | * | + | * | + | * | + | | + +----------------+ */ + 0xe000, + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0x0000, + + /* Character (0x55): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + |* * | + |* * | + |* * | + | ** | + | | + +----------------+ */ + 0x9000, + 0x9000, + 0x9000, + 0x9000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x56): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + |* * | + |* * | + | ** | + | ** | + | | + +----------------+ */ + 0x9000, + 0x9000, + 0x9000, + 0x9000, + 0x6000, + 0x6000, + 0x0000, + + /* Character (0x57): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + |* * | + |**** | + |**** | + |* * | + | | + +----------------+ */ + 0x9000, + 0x9000, + 0x9000, + 0xf000, + 0xf000, + 0x9000, + 0x0000, + + /* Character (0x58): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + | ** | + | ** | + |* * | + |* * | + | | + +----------------+ */ + 0x9000, + 0x9000, + 0x6000, + 0x6000, + 0x9000, + 0x9000, + 0x0000, + + /* Character (0x59): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* * | + |* * | + |* * | + | * | + | * | + | * | + | | + +----------------+ */ + 0xa000, + 0xa000, + 0xa000, + 0x4000, + 0x4000, + 0x4000, + 0x0000, + + /* Character (0x5a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |**** | + | * | + | * | + | * | + |* | + |**** | + | | + +----------------+ */ + 0xf000, + 0x1000, + 0x2000, + 0x4000, + 0x8000, + 0xf000, + 0x0000, + + /* Character (0x5b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + |* | + |* | + |* | + |* | + |*** | + | | + +----------------+ */ + 0xe000, + 0x8000, + 0x8000, + 0x8000, + 0x8000, + 0xe000, + 0x0000, + + /* Character (0x5c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + |* | + | * | + | * | + | * | + | | + | | + +----------------+ */ + 0x0000, + 0x8000, + 0x4000, + 0x2000, + 0x1000, + 0x0000, + 0x0000, + + /* Character (0x5d): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |*** | + | * | + | * | + | * | + | * | + |*** | + | | + +----------------+ */ + 0xe000, + 0x2000, + 0x2000, + 0x2000, + 0x2000, + 0xe000, + 0x0000, + + /* Character (0x5e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + |* * | + | | + | | + | | + | | + | | + +----------------+ */ + 0x4000, + 0xa000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x5f): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | | + | | + | | + |**** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0xf000, + 0x0000, + + /* Character (0x60): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |** | + | * | + | * | + | | + | | + | | + | | + +----------------+ */ + 0xc000, + 0x4000, + 0x2000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + + /* Character (0x61): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | *** | + |* * | + |* ** | + | * * | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x7000, + 0x9000, + 0xb000, + 0x5000, + 0x0000, + + /* Character (0x62): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* | + |* | + |*** | + |* * | + |* * | + |*** | + | | + +----------------+ */ + 0x8000, + 0x8000, + 0xe000, + 0x9000, + 0x9000, + 0xe000, + 0x0000, + + /* Character (0x63): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | ** | + |* | + |* | + | ** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x6000, + 0x8000, + 0x8000, + 0x6000, + 0x0000, + + /* Character (0x64): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | *** | + |* * | + |* * | + | *** | + | | + +----------------+ */ + 0x1000, + 0x1000, + 0x7000, + 0x9000, + 0x9000, + 0x7000, + 0x0000, + + /* Character (0x65): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | ** | + |* ** | + |** | + | ** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x6000, + 0xb000, + 0xc000, + 0x6000, + 0x0000, + + /* Character (0x66): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * * | + | * | + |*** | + | * | + | * | + | | + +----------------+ */ + 0x2000, + 0x5000, + 0x4000, + 0xe000, + 0x4000, + 0x4000, + 0x0000, + + /* Character (0x67): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | *** | + |* * | + | ** | + |* | + | *** | + +----------------+ */ + 0x0000, + 0x0000, + 0x7000, + 0x9000, + 0x6000, + 0x8000, + 0x7000, + + /* Character (0x68): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* | + |* | + |*** | + |* * | + |* * | + |* * | + | | + +----------------+ */ + 0x8000, + 0x8000, + 0xe000, + 0x9000, + 0x9000, + 0x9000, + 0x0000, + + /* Character (0x69): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | | + |** | + | * | + | * | + |*** | + | | + +----------------+ */ + 0x4000, + 0x0000, + 0xc000, + 0x4000, + 0x4000, + 0xe000, + 0x0000, + + /* Character (0x6a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | | + | * | + | * | + | * | + |* * | + | * | + +----------------+ */ + 0x2000, + 0x0000, + 0x2000, + 0x2000, + 0x2000, + 0xa000, + 0x4000, + + /* Character (0x6b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* | + |* | + |* * | + |** | + |* * | + |* * | + | | + +----------------+ */ + 0x8000, + 0x8000, + 0xa000, + 0xc000, + 0xa000, + 0x9000, + 0x0000, + + /* Character (0x6c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |** | + | * | + | * | + | * | + | * | + |*** | + | | + +----------------+ */ + 0xc000, + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0xe000, + 0x0000, + + /* Character (0x6d): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |* * | + |**** | + |* * | + |* * | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0xa000, + 0xf000, + 0x9000, + 0x9000, + 0x0000, + + /* Character (0x6e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |*** | + |* * | + |* * | + |* * | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0xe000, + 0x9000, + 0x9000, + 0x9000, + 0x0000, + + /* Character (0x6f): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | ** | + |* * | + |* * | + | ** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x6000, + 0x9000, + 0x9000, + 0x6000, + 0x0000, + + /* Character (0x70): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |*** | + |* * | + |* * | + |*** | + |* | + +----------------+ */ + 0x0000, + 0x0000, + 0xe000, + 0x9000, + 0x9000, + 0xe000, + 0x8000, + + /* Character (0x71): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | *** | + |* * | + |* * | + | *** | + | * | + +----------------+ */ + 0x0000, + 0x0000, + 0x7000, + 0x9000, + 0x9000, + 0x7000, + 0x1000, + + /* Character (0x72): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |*** | + |* * | + |* | + |* | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0xe000, + 0x9000, + 0x8000, + 0x8000, + 0x0000, + + /* Character (0x73): + bbw=6, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + | *** | + |** | + | ** | + |*** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x7000, + 0xc000, + 0x3000, + 0xe000, + 0x0000, + + /* Character (0x74): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + |*** | + | * | + | * | + | ** | + | | + +----------------+ */ + 0x4000, + 0x4000, + 0xe000, + 0x4000, + 0x4000, + 0x3000, + 0x0000, + + /* Character (0x75): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |* * | + |* * | + |* * | + | *** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x9000, + 0x9000, + 0x9000, + 0x7000, + 0x0000, + + /* Character (0x76): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |* * | + |* * | + |* * | + | * | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0xa000, + 0xa000, + 0xa000, + 0x4000, + 0x0000, + + /* Character (0x77): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |* * | + |* * | + |**** | + |**** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x9000, + 0x9000, + 0xf000, + 0xf000, + 0x0000, + + /* Character (0x78): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |* * | + | ** | + | ** | + |* * | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0x9000, + 0x6000, + 0x6000, + 0x9000, + 0x0000, + + /* Character (0x79): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |* * | + |* * | + | * * | + | * | + | * | + +----------------+ */ + 0x0000, + 0x0000, + 0x9000, + 0x9000, + 0x5000, + 0x2000, + 0x4000, + + /* Character (0x7a): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | | + | | + |**** | + | * | + | * | + |**** | + | | + +----------------+ */ + 0x0000, + 0x0000, + 0xf000, + 0x2000, + 0x4000, + 0xf000, + 0x0000, + + /* Character (0x7b): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + |** | + | * | + | * | + | * | + | | + +----------------+ */ + 0x2000, + 0x4000, + 0xc000, + 0x4000, + 0x4000, + 0x2000, + 0x0000, + + /* Character (0x7c): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * | + | * | + | * | + | * | + | * | + | * | + | | + +----------------+ */ + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0x4000, + 0x0000, + + /* Character (0x7d): + bbw=6, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + |* | + | * | + | ** | + | * | + | * | + |* | + | | + +----------------+ */ + 0x8000, + 0x4000, + 0x6000, + 0x4000, + 0x4000, + 0x8000, + 0x0000, + + /* Character (0x7e): + bbw=5, bbh=7, bbx=0, bby=-1, width=5 + +----------------+ + | * * | + |* * | + | | + | | + | | + | | + | | + +----------------+ */ + 0x5000, + 0xa000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, + 0x0000, +}; + +#if 0 +/* Character width data. */ +static UNS_8 x5x7_width [] = +{ + 5, /* (0x00) */ + 5, /* (0x01) */ + 5, /* (0x02) */ + 5, /* (0x03) */ + 5, /* (0x04) */ + 5, /* (0x05) */ + 5, /* (0x06) */ + 5, /* (0x07) */ + 5, /* (0x08) */ + 5, /* (0x09) */ + 5, /* (0x0a) */ + 5, /* (0x0b) */ + 5, /* (0x0c) */ + 5, /* (0x0d) */ + 5, /* (0x0e) */ + 5, /* (0x0f) */ + 5, /* (0x10) */ + 5, /* (0x11) */ + 5, /* (0x12) */ + 5, /* (0x13) */ + 5, /* (0x14) */ + 5, /* (0x15) */ + 5, /* (0x16) */ + 5, /* (0x17) */ + 5, /* (0x18) */ + 5, /* (0x19) */ + 5, /* (0x1a) */ + 5, /* (0x1b) */ + 5, /* (0x1c) */ + 5, /* (0x1d) */ + 5, /* (0x1e) */ + 5, /* (0x1f) */ + 5, /* (0x20) */ + 5, /* (0x21) */ + 5, /* (0x22) */ + 5, /* (0x23) */ + 5, /* (0x24) */ + 5, /* (0x25) */ + 5, /* (0x26) */ + 5, /* (0x27) */ + 5, /* (0x28) */ + 5, /* (0x29) */ + 5, /* (0x2a) */ + 5, /* (0x2b) */ + 5, /* (0x2c) */ + 5, /* (0x2d) */ + 5, /* (0x2e) */ + 5, /* (0x2f) */ + 5, /* (0x30) */ + 5, /* (0x31) */ + 5, /* (0x32) */ + 5, /* (0x33) */ + 5, /* (0x34) */ + 5, /* (0x35) */ + 5, /* (0x36) */ + 5, /* (0x37) */ + 5, /* (0x38) */ + 5, /* (0x39) */ + 5, /* (0x3a) */ + 5, /* (0x3b) */ + 5, /* (0x3c) */ + 5, /* (0x3d) */ + 5, /* (0x3e) */ + 5, /* (0x3f) */ + 5, /* (0x40) */ + 5, /* (0x41) */ + 5, /* (0x42) */ + 5, /* (0x43) */ + 5, /* (0x44) */ + 5, /* (0x45) */ + 5, /* (0x46) */ + 5, /* (0x47) */ + 5, /* (0x48) */ + 5, /* (0x49) */ + 5, /* (0x4a) */ + 5, /* (0x4b) */ + 5, /* (0x4c) */ + 5, /* (0x4d) */ + 5, /* (0x4e) */ + 5, /* (0x4f) */ + 5, /* (0x50) */ + 5, /* (0x51) */ + 5, /* (0x52) */ + 5, /* (0x53) */ + 5, /* (0x54) */ + 5, /* (0x55) */ + 5, /* (0x56) */ + 5, /* (0x57) */ + 5, /* (0x58) */ + 5, /* (0x59) */ + 5, /* (0x5a) */ + 5, /* (0x5b) */ + 5, /* (0x5c) */ + 5, /* (0x5d) */ + 5, /* (0x5e) */ + 5, /* (0x5f) */ + 5, /* (0x60) */ + 5, /* (0x61) */ + 5, /* (0x62) */ + 5, /* (0x63) */ + 5, /* (0x64) */ + 5, /* (0x65) */ + 5, /* (0x66) */ + 5, /* (0x67) */ + 5, /* (0x68) */ + 5, /* (0x69) */ + 5, /* (0x6a) */ + 5, /* (0x6b) */ + 5, /* (0x6c) */ + 5, /* (0x6d) */ + 5, /* (0x6e) */ + 5, /* (0x6f) */ + 5, /* (0x70) */ + 5, /* (0x71) */ + 5, /* (0x72) */ + 5, /* (0x73) */ + 5, /* (0x74) */ + 5, /* (0x75) */ + 5, /* (0x76) */ + 5, /* (0x77) */ + 5, /* (0x78) */ + 5, /* (0x79) */ + 5, /* (0x7a) */ + 5, /* (0x7b) */ + 5, /* (0x7c) */ + 5, /* (0x7d) */ + 5, /* (0x7e) */ +}; +#endif + +/* Font information structure */ +//const FONT_T font_x5x7 = {7, 0x00, 0x7E, x5x7_bits, x5x7_width}; + diff --git a/Makefile b/Makefile index 30d26ac..371a9fc 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,7 @@ CSRC = $(STARTUPSRC) \ $(SHELLSRC) \ $(DSPLIBSRC) \ usbcfg.c \ - main.c si5351.c si5351_low.c tlv320aic3204.c dsp.c + main.c si5351.c si5351_low.c tlv320aic3204.c dsp.c ili9431.c numfont20x24.c Font5x7.c # $(TESTSRC) \ diff --git a/halconf.h b/halconf.h index 11c4000..ba412ad 100644 --- a/halconf.h +++ b/halconf.h @@ -146,7 +146,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI TRUE #endif /** diff --git a/ili9431.c b/ili9431.c new file mode 100644 index 0000000..5bae118 --- /dev/null +++ b/ili9431.c @@ -0,0 +1,560 @@ +#include "ch.h" +#include "hal.h" +#include "nanovna.h" + +#define RESET_ASSERT palClearPad(GPIOA, 15) +#define RESET_NEGATE palSetPad(GPIOA, 15) +#define CS_LOW palClearPad(GPIOB, 6) +#define CS_HIGH palSetPad(GPIOB, 6) +#define DC_CMD palClearPad(GPIOB, 7) +#define DC_DATA palSetPad(GPIOB, 7) + +#define RGB565(r,g,b) ( (((r)<<8)&0xf800) | (((g)<<3)&0x07e0) | ((b)&0x001f) ) + +uint16_t spi_buffer[1024]; + + + +static const SPIConfig spicfg = { + NULL, + GPIOB, + 6, + 0, + SPI_CR2_DS_2 | SPI_CR2_DS_1 | SPI_CR2_DS_0 +}; + +void +ssp_wait(void) +{ + while (SPI1->SR & SPI_SR_BSY) + ; +} + +void +ssp_wait_slot(void) +{ + while ((SPI1->SR & 0x1800) == 0x1800) + ; +} + +void +ssp_senddata(uint8_t x) +{ + *(uint8_t*)(&SPI1->DR) = x; + while (SPI1->SR & SPI_SR_BSY) + ; +} + +void +ssp_senddata16(uint16_t x) +{ + ssp_wait_slot(); + SPI1->DR = x; + //while (SPI1->SR & SPI_SR_BSY) + // ; +} + +void +ssp_databit8(void) +{ + SPI1->CR2 = (SPI1->CR2 & 0xf0ff) | 0x0700; +//LPC_SSP1->CR0 = (LPC_SSP1->CR0 & 0xf0) | SSP_DATABIT_8; +} + +void +ssp_databit16(void) +{ + SPI1->CR2 = (SPI1->CR2 & 0xf0ff) | 0x0f00; + //LPC_SSP1->CR0 = (LPC_SSP1->CR0 & 0xf0) | SSP_DATABIT_16; +} + +void +spi_init(void) +{ + rccEnableSPI1(FALSE); + + //spiStart(&SPID1, &spicfg); /* Setup transfer parameters. */ + SPI1->CR1 = 0; + SPI1->CR1 = SPI_CR1_MSTR | SPI_CR1_BIDIOE | SPI_CR1_SSM | SPI_CR1_SSI;// | SPI_CR1_BR_1; + SPI1->CR2 = 0x0700; + SPI1->CR1 |= SPI_CR1_SPE; +} + +#if 0 +void +spi_test(void) +{ + spiSelect(&SPID1); /* Slave Select assertion. */ + spiSend(&SPID1, 512, txbuf); /* Atomic transfer operations. */ + spiUnselect(&SPID1); /* Slave Select de-assertion. */ +} +#endif + +void +send_command(uint8_t cmd, int len, const uint8_t *data) +{ + CS_LOW; + DC_CMD; + ssp_databit8(); + ssp_senddata(cmd); + DC_DATA; + while (len-- > 0) { + ssp_senddata(*data++); + } + //CS_HIGH; +} + +void +send_command16(uint8_t cmd, int data) +{ + CS_LOW; + DC_CMD; + ssp_databit8(); + ssp_senddata(cmd); + DC_DATA; + ssp_databit16(); + ssp_senddata16(data); + CS_HIGH; +} + +const uint8_t ili9341_init_seq[] = { + // cmd, len, data..., + // Power control B + 0xCF, 3, 0x00, 0x83, 0x30, + // Power on sequence control + 0xED, 4, 0x64, 0x03, 0x12, 0x81, + //0xED, 4, 0x55, 0x01, 0x23, 0x01, + // Driver timing control A + 0xE8, 3, 0x85, 0x01, 0x79, + //0xE8, 3, 0x84, 0x11, 0x7a, + // Power control A + 0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02, + // Pump ratio control + 0xF7, 1, 0x20, + // Driver timing control B + 0xEA, 2, 0x00, 0x00, + // POWER_CONTROL_1 + 0xC0, 1, 0x26, + // POWER_CONTROL_2 + 0xC1, 1, 0x11, + // VCOM_CONTROL_1 + 0xC5, 2, 0x35, 0x3E, + // VCOM_CONTROL_2 + 0xC7, 1, 0xBE, + // MEMORY_ACCESS_CONTROL + //0x36, 1, 0x48, // portlait + 0x36, 1, 0x28, // landscape + // COLMOD_PIXEL_FORMAT_SET : 16 bit pixel + 0x3A, 1, 0x55, + // Frame Rate + 0xB1, 2, 0x00, 0x1B, + // Gamma Function Disable + 0xF2, 1, 0x08, + // gamma set for curve 01/2/04/08 + 0x26, 1, 0x01, + // positive gamma correction + 0xE0, 15, 0x1F, 0x1A, 0x18, 0x0A, 0x0F, 0x06, 0x45, 0x87, 0x32, 0x0A, 0x07, 0x02, 0x07, 0x05, 0x00, + // negativ gamma correction + 0xE1, 15, 0x00, 0x25, 0x27, 0x05, 0x10, 0x09, 0x3A, 0x78, 0x4D, 0x05, 0x18, 0x0D, 0x38, 0x3A, 0x1F, + + // Column Address Set + 0x2A, 4, 0x00, 0x00, 0x01, 0x3f, // width 320 + // Page Address Set + 0x2B, 4, 0x00, 0x00, 0x00, 0xef, // height 240 + + // entry mode + 0xB7, 1, 0x06, + // display function control + 0xB6, 4, 0x0A, 0x82, 0x27, 0x00, + // sleep out + 0x11, 0, + 0 // sentinel +}; + +void +ili9341_init(void) +{ + //spiAcquireBus(&SPID1); /* Acquire ownership of the bus. */ + spi_init(); + + DC_DATA; + RESET_ASSERT; + chThdSleepMilliseconds(10); + RESET_NEGATE; + + send_command(0x01, 0, NULL); // SW reset + chThdSleepMilliseconds(5); + send_command(0x28, 0, NULL); // display off + + const uint8_t *p; + for (p = ili9341_init_seq; *p; ) { + send_command(p[0], p[1], &p[2]); + p += 2 + p[1]; + chThdSleepMilliseconds(5); + } + + chThdSleepMilliseconds(100); + send_command(0x29, 0, NULL); // display on + //spiReleaseBus(&SPID1); /* Ownership release. */ +} + +void ili9341_pixel(int x, int y, int color) +{ + uint8_t xx[4] = { x >> 8, x, (x+1) >> 8, (x+1) }; + uint8_t yy[4] = { y >> 8, y, (y+1) >> 8, (y+1) }; + uint8_t cc[2] = { color >> 8, color }; + send_command(0x2A, 4, xx); + send_command(0x2B, 4, yy); + send_command(0x2C, 2, cc); + //send_command16(0x2C, color); +} + +void ili9341_fill(int x, int y, int w, int h, int color) +{ + uint8_t xx[4] = { x >> 8, x, (x+w) >> 8, (x+w) }; + uint8_t yy[4] = { y >> 8, y, (y+h) >> 8, (y+h) }; + int len = w * h; + send_command(0x2A, 4, xx); + send_command(0x2B, 4, yy); + send_command(0x2C, 0, NULL); + while (len-- > 0) + ssp_senddata16(color); +} + +typedef struct { + uint16_t width; + uint16_t height; + uint16_t scaley; + uint16_t slide; + const uint32_t *bitmap; +} font_t; + +const font_t NF20x24 = { 20, 24, 1, 24, (const uint32_t *)numfont20x24 }; +//const font_t NF32x24 = { 32, 24, 1, 24, (const uint32_t *)numfont32x24 }; +//const font_t NF32x48 = { 32, 48, 2, 24, (const uint32_t *)numfont32x24 }; + +void +ili9341_drawfont(uint8_t ch, const font_t *font, int x, int y, uint16_t fg, uint16_t bg) +{ + int ex = x + font->width-1; + int ey = y + font->height-1; + uint8_t xx[4] = { x >> 8, x, ex >> 8, ex }; + uint8_t yy[4] = { y >> 8, y, ey >> 8, ey }; + uint16_t *buf = spi_buffer; + uint32_t bits; + const uint32_t *bitmap = &font->bitmap[font->slide * ch]; + int len; + int c, r, j; + + for (c = 0; c < font->slide; c++) { + for (j = 0; j < font->scaley; j++) { + bits = bitmap[c]; + for (r = 0; r < font->width; r++) { + *buf++ = (0x80000000UL & bits) ? fg : bg; + bits <<= 1; + } + } + } + send_command(0x2A, 4, xx); + send_command(0x2B, 4, yy); + send_command(0x2C, 0, NULL); + len = buf - spi_buffer; + buf = spi_buffer; + while (len-- > 0) + ssp_senddata16(*buf++); +} + +const uint16_t colormap[] = { + RGB565(255,0,0), RGB565(0,255,0), RGB565(0,0,255), + RGB565(255,255,0), RGB565(0,255,255), RGB565(255,0,255) +}; + +void +ili9341_test(int mode) +{ + int x, y; + int i; + switch (mode) { + default: +#if 1 + ili9341_fill(0, 0, 320, 240, 0); + for (y = 0; y < 240; y++) { + ili9341_fill(0, y, 320, 1, RGB565(y, (y + 120) % 256, 240-y)); + } + break; + case 1: + ili9341_fill(0, 0, 320, 240, 0); + for (y = 0; y < 240; y++) { + for (x = 0; x < 320; x++) { + ili9341_pixel(x, y, (y<<8)|x); + } + } + break; + case 2: + //send_command16(0x55, 0xff00); + ili9341_pixel(64, 64, 0xaa55); + break; +#endif +#if 1 + case 3: + for (i = 0; i < 10; i++) + ili9341_drawfont(i, &NF20x24, i*20, 120, colormap[i%6], 0x0000); + break; +#endif + } +} + +#if 0 +void +spi_dma_setup() +{ + GPDMA_Init(); + LPC_GPDMA->CONFIG = 0x01; /* Enable DMA channels, little endian */ + while ( !(LPC_GPDMA->CONFIG & 0x01) ); + //NVIC_EnableIRQ(DMA_IRQn); +} + +void +spi_dma_transfer(void *data, int length) +{ +#if 0 + GPDMA_Channel_CFG_Type ssp_dma_cfg; + ssp_dma_cfg.ChannelNum = 0; + ssp_dma_cfg.SrcMemAddr = data; + ssp_dma_cfg.DstConn = GPDMA_CONN_SSP1_Tx; + ssp_dma_cfg.DstMemAddr = &LPC_SSP1->DR; + ssp_dma_cfg.TransferSize = length; + ssp_dma_cfg.TransferWidth = GPDMA_WIDTH_HALFWORD; + //ssp_dma_cfg.TransferWidth = GPDMA_WIDTH_WORD; + //ssp_dma_cfg.TransferType = GPDMA_TRANSFERTYPE_M2P_CONTROLLER_PERIPHERAL; + ssp_dma_cfg.TransferType = GPDMA_TRANSFERTYPE_M2P_CONTROLLER_DMA; + ssp_dma_cfg.DMALLI = 0; + GPDMA_Setup(&ssp_dma_cfg); + GPDMA_ChannelCmd(0, ENABLE); +#endif + +#define GPDMA_SSP1_TX_CHANNEL 12 + //LPC_CREG->DMAMUX &= ~3<<(GPDMA_SSP1_TX_CHANNEL*2); + //LPC_CREG->DMAMUX |= 0<<(GPDMA_SSP1_TX_CHANNEL*2); + LPC_GPDMA->C0SRCADDR = (uint32_t)data; + LPC_GPDMA->C0DESTADDR = (uint32_t)&LPC_SSP1->DR; + LPC_GPDMA->C0LLI = 0; + LPC_GPDMA->C0CONTROL = (length >> 1) | // Transfersize (does not matter when flow control is handled by peripheral) + (0x2 << 12) | // Source Burst Size + (0x1 << 15) | // Destination Burst Size + //(0x0 << 15) | // Destination Burst Size + (0x2 << 18) | // Source width // 32 bit width + (0x1 << 21) | // Destination width // 16 bits + (0x0 << 24) | // Source AHB master 0 / 1 + (0x1 << 25) | // Dest AHB master 0 / 1 + (0x1 << 26) | // Source increment(LAST Sample) + (0x0 << 27) | // Destination increment + (0x1UL << 31); // Terminal count interrupt disabled + LPC_GPDMA->C0CONFIG = (0x1) | // Enable bit + (0x0 << 1) | // SRCPERIPHERAL - memory + (GPDMA_SSP1_TX_CHANNEL << 6) | // Destination peripheral - memory - no setting + (0x1 << 11) | // Flow control - peripheral to memory - DMA control +// (0x5 << 11) | // Flow control - peripheral to memory - peripheral control + (0x0 << 14) | // Int error mask + (0x1 << 15); // ITC - term count error mask + SSP_DMACmd(LPC_SSP1, SSP_DMA_TX, ENABLE); + + // software trigger + LPC_GPDMA->SOFTBREQ = 1<INTTCSTAT & GPDMA_DMACIntTCStat_Ch(0)) + ; + LPC_GPDMA->INTTCCLEAR = GPDMA_DMACIntTCClear_Ch(0); +} + +void +spi_dma_stop() +{ + SSP_DMACmd(LPC_SSP1, SSP_DMA_TX, DISABLE); +} + +void DMA_IRQHandler (void) +{ + if (LPC_GPDMA->INTERRSTAT & GPDMA_DMACIntErrStat_Ch(0)) + { + LPC_GPDMA->INTERRCLR = GPDMA_DMACIntErrClr_Ch(0); + } + + if (LPC_GPDMA->INTTCSTAT & GPDMA_DMACIntTCStat_Ch(0)) + { + LPC_GPDMA->INTTCCLEAR = GPDMA_DMACIntTCClear_Ch(0); + } +} + +void +ili9341_dma_test() +{ + int sx = 40, ex = 200; + uint8_t xx[4] = { sx >> 8, sx, ex >> 8, ex }; + int x; + int y = 0; + spi_dma_setup(); + + //while (1) { + for (y = 0; y < 320; y++) { + int sy = y, ey = sy + 1; + uint8_t yy[4] = { sy >> 8, sy, ey >> 8, ey }; + for (x = 0; x < 160; x++) { + //int c = ((~x & 0x7) ? 0x7 : 0x0) | (~x & ~0x7); + //spi_buffer[x] = (y<<8)|(c&0xff); + spi_buffer[x] = (x<<8)|y; + } + + ssp_databit8(); + send_command(0x2A, 4, xx); + send_command(0x2B, 4, yy); + send_command(0x2C, 0, NULL); + ssp_databit16(); + spi_dma_transfer(spi_buffer, 240); + spi_dma_sync(); + } + //chThdSleepMilliseconds(100); + //} + spi_dma_stop(); +} + +extern const UNS_16 x5x7_bits []; +extern const uint32_t numfont20x24[][24]; +extern const uint32_t numfont32x24[][24]; + +typedef struct { + uint16_t width; + uint16_t height; + uint16_t scaley; + uint16_t slide; + const uint32_t *bitmap; +} font_t; + +const font_t NF20x24 = { 20, 24, 1, 24, (const uint32_t *)numfont20x24 }; +const font_t NF32x24 = { 32, 24, 1, 24, (const uint32_t *)numfont32x24 }; +const font_t NF32x48 = { 32, 48, 2, 24, (const uint32_t *)numfont32x24 }; + +void +ili9341_drawfont(uint8_t ch, const font_t *font, int x, int y, uint16_t fg, uint16_t bg) +{ + int ex = x + font->width-1; + int ey = y + font->height-1; + uint8_t xx[4] = { x >> 8, x, ex >> 8, ex }; + uint8_t yy[4] = { y >> 8, y, ey >> 8, ey }; + uint16_t *buf = spi_buffer; + uint32_t bits; + const uint32_t *bitmap = &font->bitmap[font->slide * ch]; + int c, r, j; + + for (c = 0; c < font->slide; c++) { + for (j = 0; j < font->scaley; j++) { + bits = bitmap[c]; + for (r = 0; r < font->width; r++) { + *buf++ = (0x80000000UL & bits) ? fg : bg; + bits <<= 1; + } + } + } + send_command(0x2A, 4, xx); + send_command(0x2B, 4, yy); + send_command(0x2C, 0, NULL); +} + +void +ili9341_drawchar_dma(uint8_t ch, int x, int y, uint16_t fg, uint16_t bg) +{ + int ex = x + 4; + int ey = y + 7; + uint8_t xx[4] = { x >> 8, x, ex >> 8, ex }; + uint8_t yy[4] = { y >> 8, y, ey >> 8, ey }; + uint16_t *buf = spi_buffer; + + uint16_t bits; + int c, r; + for(c = 0; c < 7; c++) { + bits = x5x7_bits[(ch * 7) + c]; + for (r = 0; r < 5; r++) { + *buf++ = (0x8000 & bits) ? fg : bg; + bits <<= 1; + } + } + ssp_databit8(); + send_command(0x2A, 4, xx); + send_command(0x2B, 4, yy); + send_command(0x2C, 0, NULL); + ssp_databit16(); + spi_dma_transfer(spi_buffer, 35); + spi_dma_sync(); +} +#endif + +#if 0 +void +ili9341_drawstring_dma(char *str, int x, int y, uint16_t fg, uint16_t bg) +{ + spi_dma_setup(); + while (*str) { + ili9341_drawchar_dma(*str, x, y, fg, bg); + x += 5; + str++; + } +} + +void +ili9341_drawstring(char *str, int x, int y, uint16_t fg, uint16_t bg) +{ + while (*str) { + ili9341_drawchar(*str, x, y, fg, bg); + x += 5; + str++; + } +} +#endif + +#if 0 +void +ili9341_bulk_test() +{ + int x, y; + while (1) { + for(y = 0; y < 320; y++) { + int sx = 0, ex = 240; + int sy = y, ey = y+1; + uint8_t xx[4] = { sx >> 8, sx, ex >> 8, ex }; + uint8_t yy[4] = { sy >> 8, sy, ey >> 8, ey }; + ssp_databit8(); + send_command(0x2A, 4, xx); + send_command(0x2B, 4, yy); + send_command(0x2C, 0, NULL); + ssp_databit16(); + for (x = 0; x < 240; x++) + ssp_senddata((y<<8)|x); + } + chThdSleepMilliseconds(100); + } +} + +int test(void) +{ + char buf[16]; + int i; + + spi_init(); + //spi_test(); + ili9341_init(); + //ili9341_test(); + ili9341_dma_test(); + //ili9341_bulk_test(); + ili9341_drawstring_dma("Hello", 100, 100, 0xffff, 0x0000); + for (i = 0; i < 10; i++) + ili9341_drawfont_dma(i, &NF20x24, i*20, 120, 0xffff, 0x0000); + for (i = 0; i < 5; i++) + ili9341_drawfont_dma(i, &NF32x48, i*32, 144, 0xffff, 0x0000); + for (i = 0; i < 5; i++) + ili9341_drawfont_dma(i+5, &NF32x48, i*32, 192, 0xffff, 0x0000); +} +#endif diff --git a/main.c b/main.c index 34ceabc..a5aeb65 100644 --- a/main.c +++ b/main.c @@ -344,6 +344,7 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) (void)argc; (void)argv; +#if 0 for (i = 0; i < 100; i++) { palClearPad(GPIOC, GPIOC_LED); set_frequency(10000000); @@ -355,6 +356,20 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) palSetPad(GPIOC, GPIOC_LED); chThdSleepMilliseconds(50); } +#endif + +#if 1 + int mode = 0; + if (argc >= 1) + mode = atoi(argv[0]); + + for (i = 0; i < 20; i++) { + palClearPad(GPIOC, GPIOC_LED); + ili9341_test(mode); + palSetPad(GPIOC, GPIOC_LED); + chThdSleepMilliseconds(50); + } +#endif } static void cmd_gain(BaseSequentialStream *chp, int argc, char *argv[]) @@ -487,6 +502,11 @@ int main(void) usbStart(serusbcfg.usbp, &usbcfg); usbConnectBus(serusbcfg.usbp); + /* + * SPI LCD Initialize + */ + ili9341_init(); + /* * I2S Initialize */ diff --git a/mcuconf.h b/mcuconf.h index d061767..c19dfe1 100644 --- a/mcuconf.h +++ b/mcuconf.h @@ -175,7 +175,7 @@ /* * SPI driver system settings. */ -#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI1 TRUE #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 #define STM32_SPI_SPI2_DMA_PRIORITY 1 diff --git a/nanovna.h b/nanovna.h index 9289b98..55c08f3 100644 --- a/nanovna.h +++ b/nanovna.h @@ -44,3 +44,10 @@ void dsp_process(int16_t *src, size_t len); void calclate_gamma(void); int si5351_set_frequency_with_offset(int freq, int offset, uint8_t drive_strength); + +void ili9341_init(void); +void ili9341_test(int mode); + +extern const uint16_t x5x7_bits []; +extern const uint32_t numfont20x24[][24]; + diff --git a/numfont20x24.c b/numfont20x24.c new file mode 100644 index 0000000..b33bb4d --- /dev/null +++ b/numfont20x24.c @@ -0,0 +1,474 @@ +/* + * Copyright (c) 2014-2015, TAKAHASHI Tomohiro (TTRFTECH) edy555@gmail.com + * All rights reserved. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * The software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#include + +const uint32_t numfont20x24[][24] = { + { // 0 + 0b00000111111111000000100000000000, + 0b00011111111111110000000000000000, + 0b00111111111111111000000000000000, + 0b01111111111111111100000000000000, + 0b01111110000011111100000000000000, + 0b11111100000001111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + + 0b11111100000001111110000000000000, + 0b01111110000011111100000000000000, + 0b01111111111111111100000000000000, + 0b00111111111111111000000000000000, + 0b00011111111111110000000000000000, + 0b00000111111111000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 1 + 0b00000000011111000000100000000000, + 0b00000000111111000000000000000000, + 0b00000000111111000000000000000000, + 0b00000001111111000000000000000000, + 0b00000111111111000000000000000000, + 0b00011111111111000000000000000000, + 0b00011111111111000000000000000000, + 0b00011111111111000000000000000000, + + 0b00011111011111000000000000000000, + 0b00011111011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000011111000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 2 + 0b00000011111110000000100000000000, + 0b00001111111111100000000000000000, + 0b00111111111111111000000000000000, + 0b01111111111111111100000000000000, + 0b01111110000011111100000000000000, + 0b11111100000001111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000001111110000000000000, + + 0b00000000000011111110000000000000, + 0b00000000001111111100000000000000, + 0b00000001111111111000000000000000, + 0b00000111111111100000000000000000, + 0b00011111111100000000000000000000, + 0b00111111110000000000000000000000, + 0b01111111000000000000000000000000, + 0b11111100000000000000000000000000, + + 0b11111000000000000000000000000000, + 0b11111000000000000000000000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 3 + 0b00000011111110000000100000000000, + 0b00001111111111100000000000000000, + 0b00111111111111111000000000000000, + 0b01111111111111111100000000000000, + 0b01111110000011111100000000000000, + 0b11111100000001111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000001111110000000000000, + + 0b00000000000011111100000000000000, + 0b00000000111111111100000000000000, + 0b00000000111111110000000000000000, + 0b00000000111111110000000000000000, + 0b00000000111111111000000000000000, + 0b00000000000011111100000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + + 0b11111000000000111110000000000000, + 0b11111100000001111110000000000000, + 0b01111111111111111100000000000000, + 0b00111111111111111000000000000000, + 0b00001111111111110000000000000000, + 0b00000001111110000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 4 + 0b00000000000011110000100000000000, + 0b00000000000111110000000000000000, + 0b00000000001111110000000000000000, + 0b00000000011111110000000000000000, + 0b00000000111111110000000000000000, + 0b00000001111111110000000000000000, + 0b00000011111111110000000000000000, + 0b00000111111111110000000000000000, + + 0b00001111110111110000000000000000, + 0b00011111100111110000000000000000, + 0b00111111000111110000000000000000, + 0b01111110000111110000000000000000, + 0b11111100000111110000000000000000, + 0b11111000000111110000000000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b00000000000111110000000000000000, + 0b00000000000111110000000000000000, + 0b00000000000111110000000000000000, + 0b00000000000111110000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 5 + 0b11111111111111111110100000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b11110000000000000000000000000000, + 0b11110000000000000000000000000000, + 0b11110000000000000000000000000000, + 0b11110011111110000000000000000000, + + 0b11111111111111110000000000000000, + 0b11111111111111111000000000000000, + 0b11111111111111111100000000000000, + 0b11111110000011111100000000000000, + 0b00000000000001111110000000000000, + 0b00000000000000111110000000000000, + 0b00000000000000111110000000000000, + 0b11111000000000111110000000000000, + + 0b11111000000001111110000000000000, + 0b11111100000111111110000000000000, + 0b01111111111111111100000000000000, + 0b00111111111111111000000000000000, + 0b00001111111111110000000000000000, + 0b00000001111110000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 6 + 0b00000011111111100000100000000000, + 0b00011111111111111000000000000000, + 0b00111111111111111100000000000000, + 0b01111111111111111100000000000000, + 0b01111110000001111100000000000000, + 0b11111100000000000000000000000000, + 0b11111000000000000000000000000000, + 0b11111000000000000000000000000000, + + 0b11111011111110000000000000000000, + 0b11111111111111110000000000000000, + 0b11111111111111111000000000000000, + 0b11111111111111111100000000000000, + 0b11111110000111111100000000000000, + 0b11111100000001111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + + 0b11111100000001111110000000000000, + 0b11111110000011111110000000000000, + 0b01111111111111111100000000000000, + 0b00111111111111111000000000000000, + 0b00001111111111110000000000000000, + 0b00000001111110000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 7 + 0b11111111111111111110100000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b11111111111111111110000000000000, + 0b00000000000001111110000000000000, + 0b00000000000011111100000000000000, + 0b00000000000111111000000000000000, + 0b00000000001111110000000000000000, + + 0b00000000011111100000000000000000, + 0b00000000011111000000000000000000, + 0b00000000111111000000000000000000, + 0b00000000111110000000000000000000, + 0b00000001111110000000000000000000, + 0b00000001111100000000000000000000, + 0b00000001111100000000000000000000, + 0b00000011111100000000000000000000, + + 0b00000011111000000000000000000000, + 0b00000011111000000000000000000000, + 0b00000011111000000000000000000000, + 0b00000011111000000000000000000000, + 0b00000011111000000000000000000000, + 0b00000011111000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 8 + 0b00000011111110000000100000000000, + 0b00001111111111100000000000000000, + 0b00111111111111111000000000000000, + 0b01111111111111111100000000000000, + 0b01111110000011111100000000000000, + 0b11111100000001111110000000000000, + 0b11111000000000111110000000000000, + 0b01111100000001111100000000000000, + + 0b01111110000011111100000000000000, + 0b00111111111111111000000000000000, + 0b00011111111111110000000000000000, + 0b00011111111111110000000000000000, + 0b00111111111111111000000000000000, + 0b01111110000011111100000000000000, + 0b11111100000001111110000000000000, + 0b11111000000000111110000000000000, + + 0b11111000000000111110000000000000, + 0b11111100000001111110000000000000, + 0b01111111111111111100000000000000, + 0b00111111111111111000000000000000, + 0b00011111111111110000000000000000, + 0b00000111111111000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // 9 + 0b00000011111110000000100000000000, + 0b00001111111111100000000000000000, + 0b00111111111111111000000000000000, + 0b01111111111111111100000000000000, + 0b01111110000011111100000000000000, + 0b11111100000001111110000000000000, + 0b11111000000000111110000000000000, + 0b11111000000000111110000000000000, + + 0b11111100000000111110000000000000, + 0b11111110000001111110000000000000, + 0b01111111111111111110000000000000, + 0b00111111111111111110000000000000, + 0b00001111111111111110000000000000, + 0b00000011111111111110000000000000, + 0b00000000000000111110000000000000, + 0b00000000000000111110000000000000, + + 0b11111000000001111110000000000000, + 0b11111100000011111100000000000000, + 0b11111111111111111100000000000000, + 0b01111111111111111000000000000000, + 0b00111111111111110000000000000000, + 0b00001111111111000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // . (period) = \001 + 0b00000000000000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000001110000000000000000000000, + 0b00000011111000000000000000000000, + 0b00000011111000000000000000000000, + 0b00000001110000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // - (minus) = \002 + 0b00000000000000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00111111111111111100000000000000, + 0b00111111111111111100000000000000, + 0b00111111111111111100000000000000, + 0b00111111111111111100000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // infinity = \003 + 0b00000000000000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000111100011110000000000000000, + 0b00001111110111111000000000000000, + 0b00011111110111111100000000000000, + + 0b00111000111100011100000000000000, + 0b01111000111000011110000000000000, + 0b01110000011000001110000000000000, + 0b01110000011000001110000000000000, + 0b01110000011000001110000000000000, + 0b01110000011000001110000000000000, + 0b01111000011100011110000000000000, + 0b00111000111100011100000000000000, + + 0b00111111101111111100000000000000, + 0b00011111101111111000000000000000, + 0b00001111000111100000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // dB = \004 + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000011101111110000000000000000, + + 0b00000011101111111000000000000000, + 0b00000011101111111100000000000000, + 0b00000011101110011110000000000000, + 0b00000011101110001110000000000000, + 0b00111111101110011110000000000000, + 0b01111111101111111110000000000000, + 0b11111111101111111000000000000000, + 0b11110011101111111100000000000000, + + 0b11100011101110011110000000000000, + 0b11100011101110001110000000000000, + 0b11110011101110011110000000000000, + 0b01111111101111111110000000000000, + 0b01111111101111111100000000000000, + 0b00111101101111110000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // speaker = \005 + 0b00000000000000000000000000000000, + 0b00000000000000111000000000000000, + 0b00000000000001111000000000000000, + 0b00000000000011011000000000000000, + 0b00000000000110011000000000000000, + 0b00000000001100011000000000000000, + 0b00011111111000011000000000000000, + 0b00011111110000011000000000000000, + + 0b00011000110000011000000000000000, + 0b00011000110000011000000000000000, + 0b00011000110000011000000000000000, + 0b00011000110000011000000000000000, + 0b00011000110000011000000000000000, + 0b00011000110000011000000000000000, + 0b00011111110000011000000000000000, + 0b00011111111000011000000000000000, + + 0b00000000001100011000000000000000, + 0b00000000000110011000000000000000, + 0b00000000000011011000000000000000, + 0b00000000000001111000000000000000, + 0b00000000000000111000000000000000, + 0b00000000000000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + { // antenna = \006 + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00111111111111111100000000000000, + 0b00111111111111111100000000000000, + + 0b00110000011000001100000000000000, + 0b00011000011000011000000000000000, + 0b00001100011000110000000000000000, + 0b00000110011001100000000000000000, + 0b00000011011011000000000000000000, + 0b00000001111110000000000000000000, + 0b00000000111100000000000000000000, + 0b00000000011000000000000000000000, + + 0b00000000011000000000000000000000, + 0b00000000011000000000000000000000, + 0b00000000011000000000000000000000, + 0b00000000011000000000000000000000, + 0b00000000011000000000000000000000, + 0b00000000011000000000100000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + }, + +}; +