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 ;
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_4x5[] = {
Anaesthetix 0:3cd0a11a2f91 17 70, 86, 32,127, 4, 5, 1, 4,
Anaesthetix 0:3cd0a11a2f91 18 0x00,0x00,0x00,0x00, //
Anaesthetix 0:3cd0a11a2f91 19 0x00,0x2e,0x00,0x00, // !
Anaesthetix 0:3cd0a11a2f91 20 0x06,0x00,0x06,0x00, // "
Anaesthetix 0:3cd0a11a2f91 21 0x3e,0x14,0x3e,0x00, // #
Anaesthetix 0:3cd0a11a2f91 22 0x0c,0x36,0x18,0x00, // $
Anaesthetix 0:3cd0a11a2f91 23 0x32,0x08,0x26,0x00, // %
Anaesthetix 0:3cd0a11a2f91 24 0x14,0x2a,0x34,0x00, // &
Anaesthetix 0:3cd0a11a2f91 25 0x00,0x06,0x00,0x00, // '
Anaesthetix 0:3cd0a11a2f91 26 0x00,0x1c,0x22,0x00, // (
Anaesthetix 0:3cd0a11a2f91 27 0x22,0x1c,0x00,0x00, // )
Anaesthetix 0:3cd0a11a2f91 28 0x14,0x08,0x14,0x00, // *
Anaesthetix 0:3cd0a11a2f91 29 0x08,0x1c,0x08,0x00, // +
Anaesthetix 0:3cd0a11a2f91 30 0x40,0x60,0x00,0x00, // ,
Anaesthetix 0:3cd0a11a2f91 31 0x08,0x08,0x08,0x00, // -
Anaesthetix 0:3cd0a11a2f91 32 0x00,0x20,0x00,0x00, // .
Anaesthetix 0:3cd0a11a2f91 33 0x60,0x1c,0x02,0x00, // /
Anaesthetix 0:3cd0a11a2f91 34 0x3e,0x22,0x3e,0x00, // 0
Anaesthetix 0:3cd0a11a2f91 35 0x24,0x3e,0x20,0x00, // 1
Anaesthetix 0:3cd0a11a2f91 36 0x32,0x2a,0x26,0x00, // 2
Anaesthetix 0:3cd0a11a2f91 37 0x22,0x2a,0x3e,0x00, // 3
Anaesthetix 0:3cd0a11a2f91 38 0x0e,0x08,0x3e,0x00, // 4
Anaesthetix 0:3cd0a11a2f91 39 0x2e,0x2a,0x3a,0x00, // 5
Anaesthetix 0:3cd0a11a2f91 40 0x3e,0x2a,0x3a,0x00, // 6
Anaesthetix 0:3cd0a11a2f91 41 0x02,0x3a,0x06,0x00, // 7
Anaesthetix 0:3cd0a11a2f91 42 0x3e,0x2a,0x3e,0x00, // 8
Anaesthetix 0:3cd0a11a2f91 43 0x2e,0x2a,0x3e,0x00, // 9
Anaesthetix 0:3cd0a11a2f91 44 0x00,0x14,0x00,0x00, // :
Anaesthetix 0:3cd0a11a2f91 45 0x40,0x64,0x00,0x00, // ;
Anaesthetix 0:3cd0a11a2f91 46 0x08,0x14,0x22,0x00, // <
Anaesthetix 0:3cd0a11a2f91 47 0x14,0x14,0x14,0x00, // =
Anaesthetix 0:3cd0a11a2f91 48 0x22,0x14,0x08,0x00, // >
Anaesthetix 0:3cd0a11a2f91 49 0x02,0x2a,0x06,0x00, // ?
Anaesthetix 0:3cd0a11a2f91 50 0x3e,0x22,0x2e,0x00, // @
Anaesthetix 0:3cd0a11a2f91 51 0x3e,0x0a,0x3e,0x00, // A
Anaesthetix 0:3cd0a11a2f91 52 0x3e,0x2a,0x36,0x00, // B
Anaesthetix 0:3cd0a11a2f91 53 0x3e,0x22,0x22,0x00, // C
Anaesthetix 0:3cd0a11a2f91 54 0x3e,0x22,0x1c,0x00, // D
Anaesthetix 0:3cd0a11a2f91 55 0x3e,0x2a,0x22,0x00, // E
Anaesthetix 0:3cd0a11a2f91 56 0x3e,0x0a,0x02,0x00, // F
Anaesthetix 0:3cd0a11a2f91 57 0x3e,0x22,0x3a,0x00, // G
Anaesthetix 0:3cd0a11a2f91 58 0x3e,0x08,0x3e,0x00, // H
Anaesthetix 0:3cd0a11a2f91 59 0x22,0x3e,0x22,0x00, // I
Anaesthetix 0:3cd0a11a2f91 60 0x30,0x20,0x3e,0x00, // J
Anaesthetix 0:3cd0a11a2f91 61 0x3e,0x08,0x36,0x00, // K
Anaesthetix 0:3cd0a11a2f91 62 0x3e,0x20,0x20,0x00, // L
Anaesthetix 0:3cd0a11a2f91 63 0x3e,0x04,0x3e,0x00, // M
Anaesthetix 0:3cd0a11a2f91 64 0x3c,0x08,0x1e,0x00, // N
Anaesthetix 0:3cd0a11a2f91 65 0x3e,0x22,0x3e,0x00, // O
Anaesthetix 0:3cd0a11a2f91 66 0x3e,0x0a,0x0e,0x00, // P
Anaesthetix 0:3cd0a11a2f91 67 0x3e,0x22,0x7e,0x00, // Q
Anaesthetix 0:3cd0a11a2f91 68 0x3e,0x0a,0x34,0x00, // R
Anaesthetix 0:3cd0a11a2f91 69 0x2e,0x2a,0x3a,0x00, // S
Anaesthetix 0:3cd0a11a2f91 70 0x02,0x3e,0x02,0x00, // T
Anaesthetix 0:3cd0a11a2f91 71 0x3e,0x20,0x3e,0x00, // U
Anaesthetix 0:3cd0a11a2f91 72 0x1e,0x20,0x1e,0x00, // V
Anaesthetix 0:3cd0a11a2f91 73 0x3e,0x10,0x3e,0x00, // W
Anaesthetix 0:3cd0a11a2f91 74 0x36,0x08,0x36,0x00, // X
Anaesthetix 0:3cd0a11a2f91 75 0x06,0x38,0x06,0x00, // Y
Anaesthetix 0:3cd0a11a2f91 76 0x32,0x2a,0x26,0x00, // Z
Anaesthetix 0:3cd0a11a2f91 77 0x00,0x3e,0x22,0x00, // [
Anaesthetix 0:3cd0a11a2f91 78 0x02,0x1c,0x60,0x00, // "\"
Anaesthetix 0:3cd0a11a2f91 79 0x22,0x3e,0x00,0x00, // ]
Anaesthetix 0:3cd0a11a2f91 80 0x04,0x02,0x04,0x00, // ^
Anaesthetix 0:3cd0a11a2f91 81 0x40,0x40,0x40,0x00, // _
Anaesthetix 0:3cd0a11a2f91 82 0x00,0x02,0x00,0x00, // `
Anaesthetix 0:3cd0a11a2f91 83 0x3e,0x0a,0x3e,0x00, // a
Anaesthetix 0:3cd0a11a2f91 84 0x3e,0x2a,0x36,0x00, // b
Anaesthetix 0:3cd0a11a2f91 85 0x3e,0x22,0x22,0x00, // c
Anaesthetix 0:3cd0a11a2f91 86 0x3e,0x22,0x1c,0x00, // d
Anaesthetix 0:3cd0a11a2f91 87 0x3e,0x2a,0x22,0x00, // e
Anaesthetix 0:3cd0a11a2f91 88 0x3e,0x0a,0x02,0x00, // f
Anaesthetix 0:3cd0a11a2f91 89 0x3e,0x22,0x3a,0x00, // g
Anaesthetix 0:3cd0a11a2f91 90 0x3e,0x08,0x3e,0x00, // h
Anaesthetix 0:3cd0a11a2f91 91 0x22,0x3e,0x22,0x00, // i
Anaesthetix 0:3cd0a11a2f91 92 0x30,0x20,0x3e,0x00, // j
Anaesthetix 0:3cd0a11a2f91 93 0x3e,0x08,0x36,0x00, // k
Anaesthetix 0:3cd0a11a2f91 94 0x3e,0x20,0x20,0x00, // l
Anaesthetix 0:3cd0a11a2f91 95 0x3e,0x04,0x3e,0x00, // m
Anaesthetix 0:3cd0a11a2f91 96 0x3c,0x08,0x1e,0x00, // n
Anaesthetix 0:3cd0a11a2f91 97 0x3e,0x22,0x3e,0x00, // o
Anaesthetix 0:3cd0a11a2f91 98 0x3e,0x0a,0x0e,0x00, // p
Anaesthetix 0:3cd0a11a2f91 99 0x3e,0x22,0x7e,0x00, // q
Anaesthetix 0:3cd0a11a2f91 100 0x3e,0x0a,0x34,0x00, // r
Anaesthetix 0:3cd0a11a2f91 101 0x2e,0x2a,0x3a,0x00, // s
Anaesthetix 0:3cd0a11a2f91 102 0x02,0x3e,0x02,0x00, // t
Anaesthetix 0:3cd0a11a2f91 103 0x3e,0x20,0x3e,0x00, // u
Anaesthetix 0:3cd0a11a2f91 104 0x1e,0x20,0x1e,0x00, // v
Anaesthetix 0:3cd0a11a2f91 105 0x3e,0x10,0x3e,0x00, // w
Anaesthetix 0:3cd0a11a2f91 106 0x36,0x08,0x36,0x00, // x
Anaesthetix 0:3cd0a11a2f91 107 0x06,0x38,0x06,0x00, // y
Anaesthetix 0:3cd0a11a2f91 108 0x32,0x2a,0x26,0x00, // z
Anaesthetix 0:3cd0a11a2f91 109 0x08,0x3e,0x22,0x00, // {
Anaesthetix 0:3cd0a11a2f91 110 0x00,0x7e,0x00,0x00, // |
Anaesthetix 0:3cd0a11a2f91 111 0x22,0x3e,0x08,0x00, // }
Anaesthetix 0:3cd0a11a2f91 112 0x02,0x06,0x04,0x00, // ~
Anaesthetix 0:3cd0a11a2f91 113 0x00,0x00,0x00,0x00
Anaesthetix 0:3cd0a11a2f91 114 };