A simple library for SSH1106 controlled GLCDs

Dependents:   SSH1106_OLED

Committer:
Anaesthetix
Date:
Thu Dec 22 23:15:46 2016 +0000
Revision:
2:b55dd362afb9
Parent:
0:3cd0a11a2f91
Made universal for different resolutions.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anaesthetix 0:3cd0a11a2f91 1 ; // Compiler bug: remove if needed
Anaesthetix 0:3cd0a11a2f91 2
Anaesthetix 0:3cd0a11a2f91 3 /* The array starts with a 8 byte header:
Anaesthetix 0:3cd0a11a2f91 4 * 1st Byte: 'F' first 2 bytes are always FV
Anaesthetix 0:3cd0a11a2f91 5 * 2nd Byte: 'V' for FONT VERTICAL
Anaesthetix 0:3cd0a11a2f91 6 * 3rd Byte: First code to define
Anaesthetix 0:3cd0a11a2f91 7 * 4th Byte: Last code to define
Anaesthetix 0:3cd0a11a2f91 8 * 5th Byte: Width of character in dots
Anaesthetix 0:3cd0a11a2f91 9 * 6th Byte: Height of character in dots
Anaesthetix 0:3cd0a11a2f91 10 * 7th Byte: Height of character in bytes
Anaesthetix 0:3cd0a11a2f91 11 * 8th Byte: Bytes needed for each character (1..255)
Anaesthetix 0:3cd0a11a2f91 12 * or 0 for big fonts calculate WidthInDots * HeightInBytes
Anaesthetix 0:3cd0a11a2f91 13 * After that font data will follow
Anaesthetix 0:3cd0a11a2f91 14 */
Anaesthetix 0:3cd0a11a2f91 15
Anaesthetix 0:3cd0a11a2f91 16 const char font_7x7[] = {
Anaesthetix 0:3cd0a11a2f91 17 70, 86, 32,127, 7, 7, 1, 7,
Anaesthetix 0:3cd0a11a2f91 18 0x00,0x00,0x00,0x00,0x00,0x00,0x00, //
Anaesthetix 0:3cd0a11a2f91 19 0x5e,0x00,0x00,0x00,0x00,0x00,0x00, // !
Anaesthetix 0:3cd0a11a2f91 20 0x0c,0x00,0x0c,0x00,0x00,0x00,0x00, // "
Anaesthetix 0:3cd0a11a2f91 21 0x14,0x3e,0x14,0x3e,0x14,0x00,0x00, // #
Anaesthetix 0:3cd0a11a2f91 22 0x2e,0x2a,0x7f,0x2a,0x3a,0x00,0x00, // $
Anaesthetix 0:3cd0a11a2f91 23 0x1c,0x14,0x1c,0x00,0x7c,0x00,0x70, // %
Anaesthetix 0:3cd0a11a2f91 24 0x78,0x4e,0x5a,0x2e,0x40,0x00,0x00, // &
Anaesthetix 0:3cd0a11a2f91 25 0x0c,0x00,0x00,0x00,0x00,0x00,0x00, // '
Anaesthetix 0:3cd0a11a2f91 26 0x7e,0x81,0x00,0x00,0x00,0x00,0x00, // (
Anaesthetix 0:3cd0a11a2f91 27 0x81,0x7e,0x00,0x00,0x00,0x00,0x00, // )
Anaesthetix 0:3cd0a11a2f91 28 0x04,0x1c,0x0e,0x1c,0x04,0x00,0x00, // *
Anaesthetix 0:3cd0a11a2f91 29 0x08,0x1c,0x08,0x00,0x00,0x00,0x00, // +
Anaesthetix 0:3cd0a11a2f91 30 0xc0,0x00,0x00,0x00,0x00,0x00,0x00, // ,
Anaesthetix 0:3cd0a11a2f91 31 0x08,0x08,0x08,0x00,0x00,0x00,0x00, // -
Anaesthetix 0:3cd0a11a2f91 32 0x40,0x00,0x00,0x00,0x00,0x00,0x00, // .
Anaesthetix 0:3cd0a11a2f91 33 0x70,0x0e,0x00,0x00,0x00,0x00,0x00, // /
Anaesthetix 0:3cd0a11a2f91 34 0x7c,0x44,0x7c,0x00,0x00,0x00,0x00, // 0
Anaesthetix 0:3cd0a11a2f91 35 0x08,0x7c,0x00,0x00,0x00,0x00,0x00, // 1
Anaesthetix 0:3cd0a11a2f91 36 0x64,0x54,0x4c,0x00,0x00,0x00,0x00, // 2
Anaesthetix 0:3cd0a11a2f91 37 0x44,0x54,0x7c,0x00,0x00,0x00,0x00, // 3
Anaesthetix 0:3cd0a11a2f91 38 0x1c,0x10,0x7c,0x00,0x00,0x00,0x00, // 4
Anaesthetix 0:3cd0a11a2f91 39 0x5c,0x54,0x34,0x00,0x00,0x00,0x00, // 5
Anaesthetix 0:3cd0a11a2f91 40 0x7c,0x54,0x74,0x00,0x00,0x00,0x00, // 6
Anaesthetix 0:3cd0a11a2f91 41 0x04,0x04,0x7c,0x00,0x00,0x00,0x00, // 7
Anaesthetix 0:3cd0a11a2f91 42 0x7c,0x54,0x7c,0x00,0x00,0x00,0x00, // 8
Anaesthetix 0:3cd0a11a2f91 43 0x1c,0x14,0x7c,0x00,0x00,0x00,0x00, // 9
Anaesthetix 0:3cd0a11a2f91 44 0x50,0x00,0x00,0x00,0x00,0x00,0x00, // :
Anaesthetix 0:3cd0a11a2f91 45 0xd0,0x00,0x00,0x00,0x00,0x00,0x00, // ;
Anaesthetix 0:3cd0a11a2f91 46 0x20,0x50,0x50,0x00,0x00,0x00,0x00, // <
Anaesthetix 0:3cd0a11a2f91 47 0x28,0x28,0x28,0x00,0x00,0x00,0x00, // =
Anaesthetix 0:3cd0a11a2f91 48 0x50,0x50,0x20,0x00,0x00,0x00,0x00, // >
Anaesthetix 0:3cd0a11a2f91 49 0x02,0x5a,0x0e,0x00,0x00,0x00,0x00, // ?
Anaesthetix 0:3cd0a11a2f91 50 0x7e,0x42,0x5a,0x5a,0x52,0x5e,0x00, // @
Anaesthetix 0:3cd0a11a2f91 51 0x7e,0x0a,0x0a,0x7e,0x00,0x00,0x00, // A
Anaesthetix 0:3cd0a11a2f91 52 0x7e,0x4a,0x4a,0x7c,0x00,0x00,0x00, // B
Anaesthetix 0:3cd0a11a2f91 53 0x7e,0x42,0x42,0x42,0x00,0x00,0x00, // C
Anaesthetix 0:3cd0a11a2f91 54 0x7e,0x42,0x42,0x7c,0x00,0x00,0x00, // D
Anaesthetix 0:3cd0a11a2f91 55 0x7e,0x4a,0x4a,0x42,0x00,0x00,0x00, // E
Anaesthetix 0:3cd0a11a2f91 56 0x7e,0x0a,0x0a,0x02,0x00,0x00,0x00, // F
Anaesthetix 0:3cd0a11a2f91 57 0x7e,0x42,0x4a,0x7a,0x00,0x00,0x00, // G
Anaesthetix 0:3cd0a11a2f91 58 0x7e,0x08,0x08,0x7e,0x00,0x00,0x00, // H
Anaesthetix 0:3cd0a11a2f91 59 0x42,0x42,0x7e,0x42,0x42,0x00,0x00, // I
Anaesthetix 0:3cd0a11a2f91 60 0x42,0x42,0x7e,0x02,0x00,0x00,0x00, // J
Anaesthetix 0:3cd0a11a2f91 61 0x7e,0x08,0x0e,0x78,0x00,0x00,0x00, // K
Anaesthetix 0:3cd0a11a2f91 62 0x7e,0x40,0x40,0x40,0x00,0x00,0x00, // L
Anaesthetix 0:3cd0a11a2f91 63 0x7e,0x02,0x06,0x02,0x7e,0x00,0x00, // M
Anaesthetix 0:3cd0a11a2f91 64 0x7e,0x04,0x08,0x7e,0x00,0x00,0x00, // N
Anaesthetix 0:3cd0a11a2f91 65 0x7e,0x42,0x42,0x7e,0x00,0x00,0x00, // O
Anaesthetix 0:3cd0a11a2f91 66 0x7e,0x0a,0x0a,0x0e,0x00,0x00,0x00, // P
Anaesthetix 0:3cd0a11a2f91 67 0x7e,0x42,0xc2,0x7e,0x00,0x00,0x00, // Q
Anaesthetix 0:3cd0a11a2f91 68 0x7e,0x0a,0x7a,0x0e,0x00,0x00,0x00, // R
Anaesthetix 0:3cd0a11a2f91 69 0x4e,0x4a,0x4a,0x7a,0x00,0x00,0x00, // S
Anaesthetix 0:3cd0a11a2f91 70 0x02,0x02,0x7e,0x02,0x02,0x00,0x00, // T
Anaesthetix 0:3cd0a11a2f91 71 0x7e,0x40,0x40,0x7e,0x00,0x00,0x00, // U
Anaesthetix 0:3cd0a11a2f91 72 0x1e,0x20,0x40,0x20,0x1e,0x00,0x00, // V
Anaesthetix 0:3cd0a11a2f91 73 0x7e,0x40,0x60,0x40,0x7e,0x00,0x00, // W
Anaesthetix 0:3cd0a11a2f91 74 0x42,0x24,0x18,0x24,0x42,0x00,0x00, // X
Anaesthetix 0:3cd0a11a2f91 75 0x0e,0x08,0x78,0x08,0x0e,0x00,0x00, // Y
Anaesthetix 0:3cd0a11a2f91 76 0x62,0x52,0x4a,0x46,0x00,0x00,0x00, // Z
Anaesthetix 0:3cd0a11a2f91 77 0xff,0x81,0x00,0x00,0x00,0x00,0x00, // [
Anaesthetix 0:3cd0a11a2f91 78 0x0e,0x70,0x00,0x00,0x00,0x00,0x00, // "\"
Anaesthetix 0:3cd0a11a2f91 79 0x81,0xff,0x00,0x00,0x00,0x00,0x00, // ]
Anaesthetix 0:3cd0a11a2f91 80 0x04,0x02,0x04,0x00,0x00,0x00,0x00, // ^
Anaesthetix 0:3cd0a11a2f91 81 0x40,0x40,0x40,0x40,0x40,0x00,0x00, // _
Anaesthetix 0:3cd0a11a2f91 82 0x02,0x04,0x00,0x00,0x00,0x00,0x00, // `
Anaesthetix 0:3cd0a11a2f91 83 0x7c,0x14,0x14,0x7c,0x00,0x00,0x00, // a
Anaesthetix 0:3cd0a11a2f91 84 0x7c,0x54,0x54,0x78,0x00,0x00,0x00, // b
Anaesthetix 0:3cd0a11a2f91 85 0x7c,0x44,0x44,0x44,0x00,0x00,0x00, // c
Anaesthetix 0:3cd0a11a2f91 86 0x7c,0x44,0x44,0x78,0x00,0x00,0x00, // d
Anaesthetix 0:3cd0a11a2f91 87 0x7c,0x54,0x54,0x44,0x00,0x00,0x00, // e
Anaesthetix 0:3cd0a11a2f91 88 0x7c,0x14,0x14,0x04,0x00,0x00,0x00, // f
Anaesthetix 0:3cd0a11a2f91 89 0x7c,0x44,0x54,0x74,0x00,0x00,0x00, // g
Anaesthetix 0:3cd0a11a2f91 90 0x7c,0x10,0x10,0x7c,0x00,0x00,0x00, // h
Anaesthetix 0:3cd0a11a2f91 91 0x44,0x44,0x7c,0x44,0x44,0x00,0x00, // i
Anaesthetix 0:3cd0a11a2f91 92 0x44,0x44,0x7c,0x04,0x00,0x00,0x00, // j
Anaesthetix 0:3cd0a11a2f91 93 0x7c,0x10,0x1c,0x70,0x00,0x00,0x00, // k
Anaesthetix 0:3cd0a11a2f91 94 0x7c,0x40,0x40,0x40,0x00,0x00,0x00, // l
Anaesthetix 0:3cd0a11a2f91 95 0x7c,0x04,0x0c,0x04,0x7c,0x00,0x00, // m
Anaesthetix 0:3cd0a11a2f91 96 0x7c,0x08,0x10,0x7c,0x00,0x00,0x00, // n
Anaesthetix 0:3cd0a11a2f91 97 0x7c,0x44,0x44,0x7c,0x00,0x00,0x00, // o
Anaesthetix 0:3cd0a11a2f91 98 0x7c,0x14,0x14,0x1c,0x00,0x00,0x00, // p
Anaesthetix 0:3cd0a11a2f91 99 0x7c,0x44,0xc4,0x7c,0x00,0x00,0x00, // q
Anaesthetix 0:3cd0a11a2f91 100 0x7c,0x14,0x74,0x1c,0x00,0x00,0x00, // r
Anaesthetix 0:3cd0a11a2f91 101 0x5c,0x54,0x54,0x74,0x00,0x00,0x00, // s
Anaesthetix 0:3cd0a11a2f91 102 0x04,0x04,0x7c,0x04,0x04,0x00,0x00, // t
Anaesthetix 0:3cd0a11a2f91 103 0x7c,0x40,0x40,0x7c,0x00,0x00,0x00, // u
Anaesthetix 0:3cd0a11a2f91 104 0x1c,0x20,0x40,0x20,0x1c,0x00,0x00, // v
Anaesthetix 0:3cd0a11a2f91 105 0x7c,0x40,0x60,0x40,0x7c,0x00,0x00, // w
Anaesthetix 0:3cd0a11a2f91 106 0x44,0x28,0x10,0x28,0x44,0x00,0x00, // x
Anaesthetix 0:3cd0a11a2f91 107 0x1c,0x10,0x70,0x10,0x1c,0x00,0x00, // y
Anaesthetix 0:3cd0a11a2f91 108 0x64,0x54,0x4c,0x44,0x00,0x00,0x00, // z
Anaesthetix 0:3cd0a11a2f91 109 0x08,0xf7,0x81,0x00,0x00,0x00,0x00, //
Anaesthetix 0:3cd0a11a2f91 110 0xff,0x00,0x00,0x00,0x00,0x00,0x00, // |
Anaesthetix 0:3cd0a11a2f91 111 0x81,0xf7,0x08,0x00,0x00,0x00,0x00, //
Anaesthetix 0:3cd0a11a2f91 112 0x18,0x08,0x10,0x18,0x00,0x00,0x00, // ~
Anaesthetix 0:3cd0a11a2f91 113 0x00,0x00,0x00,0x00,0x00,0x00,0x00
Anaesthetix 0:3cd0a11a2f91 114 };