SSD1306 LCD 96x16 model

Dependents:   testSoftware8_alles_display

Fork of ssd1306_library by Miguel Angel Rodriguez Jodar

Committer:
mikevd1
Date:
Tue Aug 07 11:27:27 2018 +0000
Revision:
10:346065d26cc9
Parent:
9:57209a7e9cba
Child:
11:1b5a69808460
display shows something;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rodriguj 3:bb6fba3e84ff 1 /*
rodriguj 4:35757c8b7625 2 * ssd1306.h
rodriguj 3:bb6fba3e84ff 3 *
rodriguj 3:bb6fba3e84ff 4 * Created on: 20 oct. 2017
rodriguj 3:bb6fba3e84ff 5 * Author: Miguel Angel Rodriguez Jodar
rodriguj 3:bb6fba3e84ff 6 *
rodriguj 3:bb6fba3e84ff 7 * Based upon Adafruit library.
rodriguj 3:bb6fba3e84ff 8 * GPL licensed.
rodriguj 3:bb6fba3e84ff 9 *
rodriguj 3:bb6fba3e84ff 10 */
rodriguj 3:bb6fba3e84ff 11
rodriguj 0:3d84b3bfb794 12 #include "ssd1306.h"
rodriguj 0:3d84b3bfb794 13 #include "mbed.h"
rodriguj 0:3d84b3bfb794 14
rodriguj 4:35757c8b7625 15 /* I believe this charset was taken from the compilation from Joseph Gil years ago
rodriguj 4:35757c8b7625 16 * when I needed a charset for a different (FPGA) project, but I cannot remember
rodriguj 4:35757c8b7625 17 * exactly the website I took it from.
rodriguj 4:35757c8b7625 18 * What I do remember is that the owner of the website claimed that this charset
rodriguj 4:35757c8b7625 19 * is in the public domain.
rodriguj 4:35757c8b7625 20 * This a complete (256 ASCII codes) 8x8 charset, using the 437 page code (original IBM)
rodriguj 4:35757c8b7625 21 * so you can use its graphic blocks to build decent text based GUIs without the need
rodriguj 4:35757c8b7625 22 * to use plot, line and circle primitives
rodriguj 4:35757c8b7625 23 */
rodriguj 0:3d84b3bfb794 24 static const char charset[2048] = {
rodriguj 0:3d84b3bfb794 25 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x81,
rodriguj 0:3d84b3bfb794 26 0x95, 0xB1, 0xB1, 0x95, 0x81, 0x7E, 0x7E, 0xFF, 0xEB, 0xCF,
rodriguj 0:3d84b3bfb794 27 0xCF, 0xEB, 0xFF, 0x7E, 0x0E, 0x1F, 0x3F, 0x7E, 0x3F, 0x1F,
rodriguj 0:3d84b3bfb794 28 0x0E, 0x00, 0x08, 0x1C, 0x3E, 0x7F, 0x3E, 0x1C, 0x08, 0x00,
rodriguj 0:3d84b3bfb794 29 0x38, 0x3A, 0x9F, 0xFF, 0x9F, 0x3A, 0x38, 0x00, 0x18, 0x3C,
rodriguj 0:3d84b3bfb794 30 0xBE, 0xFF, 0xBE, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x3C,
rodriguj 0:3d84b3bfb794 31 0x3C, 0x18, 0x00, 0x00, 0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7,
rodriguj 0:3d84b3bfb794 32 0xFF, 0xFF, 0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00,
rodriguj 0:3d84b3bfb794 33 0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, 0x70, 0xF8,
rodriguj 0:3d84b3bfb794 34 0x88, 0x88, 0xFD, 0x7F, 0x07, 0x0F, 0x00, 0x4E, 0x5F, 0xF1,
rodriguj 0:3d84b3bfb794 35 0xF1, 0x5F, 0x4E, 0x00, 0xC0, 0xE0, 0xFF, 0x7F, 0x05, 0x05,
rodriguj 0:3d84b3bfb794 36 0x07, 0x07, 0xC0, 0xFF, 0x7F, 0x05, 0x05, 0x65, 0x7F, 0x3F,
rodriguj 0:3d84b3bfb794 37 0x5A, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x5A, 0x7F, 0x3E,
rodriguj 0:3d84b3bfb794 38 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x00, 0x08, 0x08, 0x1C, 0x1C,
rodriguj 0:3d84b3bfb794 39 0x3E, 0x3E, 0x7F, 0x00, 0x00, 0x24, 0x66, 0xFF, 0xFF, 0x66,
rodriguj 0:3d84b3bfb794 40 0x24, 0x00, 0x00, 0x5F, 0x5F, 0x00, 0x00, 0x5F, 0x5F, 0x00,
rodriguj 0:3d84b3bfb794 41 0x06, 0x0F, 0x09, 0x7F, 0x7F, 0x01, 0x7F, 0x7F, 0x40, 0x9A,
rodriguj 0:3d84b3bfb794 42 0xBF, 0xA5, 0xA5, 0xFD, 0x59, 0x02, 0x00, 0x70, 0x70, 0x70,
rodriguj 0:3d84b3bfb794 43 0x70, 0x70, 0x70, 0x00, 0x80, 0x94, 0xB6, 0xFF, 0xFF, 0xB6,
rodriguj 0:3d84b3bfb794 44 0x94, 0x80, 0x00, 0x04, 0x06, 0x7F, 0x7F, 0x06, 0x04, 0x00,
rodriguj 0:3d84b3bfb794 45 0x00, 0x10, 0x30, 0x7F, 0x7F, 0x30, 0x10, 0x00, 0x08, 0x08,
rodriguj 0:3d84b3bfb794 46 0x08, 0x2A, 0x3E, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x3E, 0x2A,
rodriguj 0:3d84b3bfb794 47 0x08, 0x08, 0x08, 0x00, 0x3C, 0x3C, 0x20, 0x20, 0x20, 0x20,
rodriguj 0:3d84b3bfb794 48 0x20, 0x00, 0x08, 0x1C, 0x3E, 0x08, 0x08, 0x3E, 0x1C, 0x08,
rodriguj 0:3d84b3bfb794 49 0x30, 0x38, 0x3C, 0x3E, 0x3E, 0x3C, 0x38, 0x30, 0x06, 0x0E,
rodriguj 0:3d84b3bfb794 50 0x1E, 0x3E, 0x3E, 0x1E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 51 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x5F, 0x5F, 0x06,
rodriguj 0:3d84b3bfb794 52 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x07, 0x03, 0x00,
rodriguj 0:3d84b3bfb794 53 0x14, 0x7F, 0x7F, 0x14, 0x7F, 0x7F, 0x14, 0x00, 0x00, 0x24,
rodriguj 0:3d84b3bfb794 54 0x2E, 0x6B, 0x6B, 0x3A, 0x12, 0x00, 0x46, 0x66, 0x30, 0x18,
rodriguj 0:3d84b3bfb794 55 0x0C, 0x66, 0x62, 0x00, 0x30, 0x7A, 0x4F, 0x5D, 0x37, 0x7A,
rodriguj 0:3d84b3bfb794 56 0x48, 0x00, 0x00, 0x00, 0x04, 0x07, 0x03, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 57 0x00, 0x00, 0x1C, 0x3E, 0x63, 0x41, 0x00, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 58 0x41, 0x63, 0x3E, 0x1C, 0x00, 0x00, 0x08, 0x2A, 0x3E, 0x1C,
rodriguj 0:3d84b3bfb794 59 0x1C, 0x3E, 0x2A, 0x08, 0x00, 0x08, 0x08, 0x3E, 0x3E, 0x08,
rodriguj 0:3d84b3bfb794 60 0x08, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x60, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 61 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 62 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0C,
rodriguj 0:3d84b3bfb794 63 0x06, 0x03, 0x01, 0x00, 0x1C, 0x3E, 0x63, 0x49, 0x63, 0x3E,
rodriguj 0:3d84b3bfb794 64 0x1C, 0x00, 0x00, 0x40, 0x42, 0x7F, 0x7F, 0x40, 0x40, 0x00,
rodriguj 0:3d84b3bfb794 65 0x42, 0x63, 0x71, 0x59, 0x49, 0x6F, 0x66, 0x00, 0x22, 0x63,
rodriguj 0:3d84b3bfb794 66 0x49, 0x49, 0x49, 0x7F, 0x36, 0x00, 0x18, 0x1C, 0x16, 0x53,
rodriguj 0:3d84b3bfb794 67 0x7F, 0x7F, 0x50, 0x00, 0x2F, 0x6F, 0x49, 0x49, 0x49, 0x79,
rodriguj 0:3d84b3bfb794 68 0x31, 0x00, 0x3C, 0x7E, 0x4B, 0x49, 0x49, 0x78, 0x30, 0x00,
rodriguj 0:3d84b3bfb794 69 0x03, 0x03, 0x71, 0x79, 0x0D, 0x07, 0x03, 0x00, 0x36, 0x7F,
rodriguj 0:3d84b3bfb794 70 0x49, 0x49, 0x49, 0x7F, 0x36, 0x00, 0x06, 0x4F, 0x49, 0x49,
rodriguj 0:3d84b3bfb794 71 0x69, 0x3F, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00,
rodriguj 0:3d84b3bfb794 72 0x00, 0x00, 0x00, 0x00, 0x80, 0xE6, 0x66, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 73 0x00, 0x00, 0x08, 0x1C, 0x36, 0x63, 0x41, 0x00, 0x00, 0x24,
rodriguj 0:3d84b3bfb794 74 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x41, 0x63, 0x36,
rodriguj 0:3d84b3bfb794 75 0x1C, 0x08, 0x00, 0x00, 0x02, 0x03, 0x01, 0x59, 0x5D, 0x07,
rodriguj 0:3d84b3bfb794 76 0x02, 0x00, 0x3E, 0x7F, 0x41, 0x5D, 0x5D, 0x1F, 0x1E, 0x00,
rodriguj 0:3d84b3bfb794 77 0x7C, 0x7E, 0x0B, 0x09, 0x0B, 0x7E, 0x7C, 0x00, 0x41, 0x7F,
rodriguj 0:3d84b3bfb794 78 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00, 0x1C, 0x3E, 0x63, 0x41,
rodriguj 0:3d84b3bfb794 79 0x41, 0x63, 0x22, 0x00, 0x41, 0x7F, 0x7F, 0x41, 0x63, 0x3E,
rodriguj 0:3d84b3bfb794 80 0x1C, 0x00, 0x41, 0x7F, 0x7F, 0x49, 0x5D, 0x41, 0x63, 0x00,
rodriguj 0:3d84b3bfb794 81 0x41, 0x7F, 0x7F, 0x49, 0x1D, 0x01, 0x03, 0x00, 0x1C, 0x3E,
rodriguj 0:3d84b3bfb794 82 0x63, 0x41, 0x51, 0x33, 0x72, 0x00, 0x7F, 0x7F, 0x08, 0x08,
rodriguj 0:3d84b3bfb794 83 0x08, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x41, 0x7F, 0x7F, 0x41,
rodriguj 0:3d84b3bfb794 84 0x00, 0x00, 0x30, 0x70, 0x40, 0x41, 0x7F, 0x3F, 0x01, 0x00,
rodriguj 0:3d84b3bfb794 85 0x41, 0x7F, 0x7F, 0x08, 0x1C, 0x77, 0x63, 0x00, 0x41, 0x7F,
rodriguj 0:3d84b3bfb794 86 0x7F, 0x41, 0x40, 0x60, 0x70, 0x00, 0x7F, 0x7F, 0x0E, 0x1C,
rodriguj 0:3d84b3bfb794 87 0x0E, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x06, 0x0C, 0x18, 0x7F,
rodriguj 0:3d84b3bfb794 88 0x7F, 0x00, 0x3E, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x3E, 0x00,
rodriguj 0:3d84b3bfb794 89 0x41, 0x7F, 0x7F, 0x49, 0x09, 0x0F, 0x06, 0x00, 0x3E, 0x7F,
rodriguj 0:3d84b3bfb794 90 0x41, 0x41, 0xE1, 0xFF, 0xBE, 0x00, 0x41, 0x7F, 0x7F, 0x09,
rodriguj 0:3d84b3bfb794 91 0x19, 0x7F, 0x66, 0x00, 0x00, 0x22, 0x67, 0x4D, 0x59, 0x73,
rodriguj 0:3d84b3bfb794 92 0x22, 0x00, 0x00, 0x07, 0x43, 0x7F, 0x7F, 0x43, 0x07, 0x00,
rodriguj 0:3d84b3bfb794 93 0x3F, 0x7F, 0x40, 0x40, 0x40, 0x7F, 0x3F, 0x00, 0x1F, 0x3F,
rodriguj 0:3d84b3bfb794 94 0x60, 0x40, 0x60, 0x3F, 0x1F, 0x00, 0x3F, 0x7F, 0x60, 0x38,
rodriguj 0:3d84b3bfb794 95 0x60, 0x7F, 0x3F, 0x00, 0x63, 0x77, 0x1C, 0x08, 0x1C, 0x77,
rodriguj 0:3d84b3bfb794 96 0x63, 0x00, 0x00, 0x07, 0x4F, 0x78, 0x78, 0x4F, 0x07, 0x00,
rodriguj 0:3d84b3bfb794 97 0x47, 0x63, 0x71, 0x59, 0x4D, 0x67, 0x73, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 98 0x7F, 0x7F, 0x41, 0x41, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C,
rodriguj 0:3d84b3bfb794 99 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x41, 0x41, 0x7F, 0x7F,
rodriguj 0:3d84b3bfb794 100 0x00, 0x00, 0x08, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x08, 0x00,
rodriguj 0:3d84b3bfb794 101 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 102 0x01, 0x03, 0x06, 0x04, 0x00, 0x00, 0x20, 0x74, 0x54, 0x54,
rodriguj 0:3d84b3bfb794 103 0x3C, 0x78, 0x40, 0x00, 0x41, 0x7F, 0x3F, 0x44, 0x44, 0x7C,
rodriguj 0:3d84b3bfb794 104 0x38, 0x00, 0x38, 0x7C, 0x44, 0x44, 0x44, 0x6C, 0x28, 0x00,
rodriguj 0:3d84b3bfb794 105 0x38, 0x7C, 0x44, 0x45, 0x3F, 0x7F, 0x40, 0x00, 0x38, 0x7C,
rodriguj 0:3d84b3bfb794 106 0x54, 0x54, 0x54, 0x5C, 0x18, 0x00, 0x48, 0x7E, 0x7F, 0x49,
rodriguj 0:3d84b3bfb794 107 0x09, 0x03, 0x02, 0x00, 0x98, 0xBC, 0xA4, 0xA4, 0xF8, 0x7C,
rodriguj 0:3d84b3bfb794 108 0x04, 0x00, 0x41, 0x7F, 0x7F, 0x08, 0x04, 0x7C, 0x78, 0x00,
rodriguj 0:3d84b3bfb794 109 0x00, 0x00, 0x44, 0x7D, 0x7D, 0x40, 0x00, 0x00, 0x00, 0x60,
rodriguj 0:3d84b3bfb794 110 0xE0, 0x80, 0x80, 0xFD, 0x7D, 0x00, 0x41, 0x7F, 0x7F, 0x10,
rodriguj 0:3d84b3bfb794 111 0x38, 0x6C, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7F, 0x7F, 0x40,
rodriguj 0:3d84b3bfb794 112 0x00, 0x00, 0x7C, 0x7C, 0x0C, 0x78, 0x0C, 0x7C, 0x78, 0x00,
rodriguj 0:3d84b3bfb794 113 0x04, 0x7C, 0x78, 0x04, 0x04, 0x7C, 0x78, 0x00, 0x38, 0x7C,
rodriguj 0:3d84b3bfb794 114 0x44, 0x44, 0x44, 0x7C, 0x38, 0x00, 0x84, 0xFC, 0xF8, 0xA4,
rodriguj 0:3d84b3bfb794 115 0x24, 0x3C, 0x18, 0x00, 0x18, 0x3C, 0x24, 0xA4, 0xF8, 0xFC,
rodriguj 0:3d84b3bfb794 116 0x84, 0x00, 0x44, 0x7C, 0x78, 0x4C, 0x04, 0x0C, 0x08, 0x00,
rodriguj 0:3d84b3bfb794 117 0x48, 0x5C, 0x54, 0x54, 0x54, 0x74, 0x24, 0x00, 0x04, 0x04,
rodriguj 0:3d84b3bfb794 118 0x3F, 0x7F, 0x44, 0x64, 0x20, 0x00, 0x3C, 0x7C, 0x40, 0x40,
rodriguj 0:3d84b3bfb794 119 0x3C, 0x7C, 0x40, 0x00, 0x1C, 0x3C, 0x60, 0x40, 0x60, 0x3C,
rodriguj 0:3d84b3bfb794 120 0x1C, 0x00, 0x3C, 0x7C, 0x60, 0x38, 0x60, 0x7C, 0x3C, 0x00,
rodriguj 0:3d84b3bfb794 121 0x44, 0x6C, 0x38, 0x10, 0x38, 0x6C, 0x44, 0x00, 0x9C, 0xBC,
rodriguj 0:3d84b3bfb794 122 0xA0, 0xA0, 0xA0, 0xFC, 0x7C, 0x00, 0x00, 0x4C, 0x64, 0x74,
rodriguj 0:3d84b3bfb794 123 0x5C, 0x4C, 0x64, 0x00, 0x00, 0x08, 0x08, 0x3E, 0x77, 0x41,
rodriguj 0:3d84b3bfb794 124 0x41, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 125 0x00, 0x41, 0x41, 0x77, 0x3E, 0x08, 0x08, 0x00, 0x02, 0x03,
rodriguj 0:3d84b3bfb794 126 0x01, 0x03, 0x02, 0x03, 0x01, 0x00, 0x70, 0x78, 0x4C, 0x46,
rodriguj 0:3d84b3bfb794 127 0x4C, 0x78, 0x70, 0x00, 0x1E, 0xBF, 0xA1, 0xA1, 0xE1, 0x73,
rodriguj 0:3d84b3bfb794 128 0x12, 0x00, 0x3D, 0x7D, 0x40, 0x40, 0x3D, 0x7D, 0x40, 0x00,
rodriguj 0:3d84b3bfb794 129 0x38, 0x7C, 0x54, 0x56, 0x57, 0x5D, 0x18, 0x00, 0x22, 0x75,
rodriguj 0:3d84b3bfb794 130 0x55, 0x55, 0x3D, 0x79, 0x42, 0x00, 0x21, 0x75, 0x54, 0x54,
rodriguj 0:3d84b3bfb794 131 0x3C, 0x79, 0x41, 0x00, 0x20, 0x74, 0x55, 0x57, 0x3E, 0x78,
rodriguj 0:3d84b3bfb794 132 0x40, 0x00, 0x20, 0x74, 0x57, 0x57, 0x3C, 0x78, 0x40, 0x00,
rodriguj 0:3d84b3bfb794 133 0x18, 0x3C, 0xA4, 0xA4, 0xE4, 0x64, 0x24, 0x00, 0x3A, 0x7D,
rodriguj 0:3d84b3bfb794 134 0x55, 0x55, 0x55, 0x5D, 0x1A, 0x00, 0x39, 0x7D, 0x54, 0x54,
rodriguj 0:3d84b3bfb794 135 0x54, 0x5D, 0x19, 0x00, 0x38, 0x7C, 0x55, 0x57, 0x56, 0x5C,
rodriguj 0:3d84b3bfb794 136 0x18, 0x00, 0x00, 0x01, 0x45, 0x7C, 0x7C, 0x41, 0x01, 0x00,
rodriguj 0:3d84b3bfb794 137 0x02, 0x01, 0x45, 0x7D, 0x7D, 0x41, 0x02, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 138 0x49, 0x7B, 0x7A, 0x40, 0x00, 0x00, 0x79, 0x7D, 0x16, 0x12,
rodriguj 0:3d84b3bfb794 139 0x16, 0x7D, 0x79, 0x00, 0x78, 0x7E, 0x17, 0x15, 0x17, 0x7E,
rodriguj 0:3d84b3bfb794 140 0x78, 0x00, 0x7C, 0x7C, 0x56, 0x57, 0x55, 0x44, 0x44, 0x00,
rodriguj 0:3d84b3bfb794 141 0x20, 0x74, 0x54, 0x7C, 0x7C, 0x54, 0x54, 0x00, 0x7C, 0x7E,
rodriguj 0:3d84b3bfb794 142 0x0B, 0x09, 0x7F, 0x7F, 0x49, 0x00, 0x3A, 0x7D, 0x45, 0x45,
rodriguj 0:3d84b3bfb794 143 0x45, 0x7D, 0x3A, 0x00, 0x39, 0x7D, 0x44, 0x44, 0x44, 0x7D,
rodriguj 0:3d84b3bfb794 144 0x39, 0x00, 0x38, 0x7C, 0x45, 0x47, 0x46, 0x7C, 0x38, 0x00,
rodriguj 0:3d84b3bfb794 145 0x3A, 0x79, 0x41, 0x41, 0x39, 0x7A, 0x40, 0x00, 0x3C, 0x7D,
rodriguj 0:3d84b3bfb794 146 0x43, 0x42, 0x3C, 0x7C, 0x40, 0x00, 0x9D, 0xBD, 0xA0, 0xA0,
rodriguj 0:3d84b3bfb794 147 0xA0, 0xFD, 0x7D, 0x00, 0x19, 0x3D, 0x66, 0x42, 0x66, 0x3D,
rodriguj 0:3d84b3bfb794 148 0x19, 0x00, 0x3D, 0x7D, 0x40, 0x40, 0x40, 0x7D, 0x3D, 0x00,
rodriguj 0:3d84b3bfb794 149 0x18, 0x3C, 0x24, 0xE7, 0xE7, 0x24, 0x24, 0x00, 0x48, 0x7E,
rodriguj 0:3d84b3bfb794 150 0x7F, 0x49, 0x43, 0x66, 0x20, 0x00, 0x00, 0x2B, 0x2F, 0xFC,
rodriguj 0:3d84b3bfb794 151 0xFC, 0x2F, 0x2B, 0x00, 0xFF, 0xFF, 0x09, 0x09, 0x2F, 0xF6,
rodriguj 0:3d84b3bfb794 152 0xF8, 0xA0, 0x20, 0x60, 0x48, 0x7E, 0x3F, 0x09, 0x03, 0x02,
rodriguj 0:3d84b3bfb794 153 0x20, 0x74, 0x56, 0x57, 0x3D, 0x78, 0x40, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 154 0x48, 0x7A, 0x7B, 0x41, 0x00, 0x00, 0x38, 0x7C, 0x44, 0x46,
rodriguj 0:3d84b3bfb794 155 0x47, 0x7D, 0x38, 0x00, 0x3C, 0x7C, 0x42, 0x43, 0x3D, 0x7C,
rodriguj 0:3d84b3bfb794 156 0x40, 0x00, 0x0A, 0x7B, 0x71, 0x0B, 0x0A, 0x7B, 0x71, 0x00,
rodriguj 0:3d84b3bfb794 157 0x7A, 0x7B, 0x19, 0x33, 0x62, 0x7B, 0x79, 0x00, 0x00, 0x26,
rodriguj 0:3d84b3bfb794 158 0x2F, 0x29, 0x2F, 0x2F, 0x28, 0x00, 0x00, 0x26, 0x2F, 0x29,
rodriguj 0:3d84b3bfb794 159 0x2F, 0x26, 0x00, 0x00, 0x00, 0x20, 0x70, 0x5D, 0x4D, 0x40,
rodriguj 0:3d84b3bfb794 160 0x60, 0x20, 0x38, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
rodriguj 0:3d84b3bfb794 161 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x38, 0x00, 0x42, 0x6F,
rodriguj 0:3d84b3bfb794 162 0x3F, 0x18, 0xCC, 0xEE, 0xBB, 0x91, 0x42, 0x6F, 0x3F, 0x58,
rodriguj 0:3d84b3bfb794 163 0x6C, 0xD6, 0xFB, 0x41, 0x00, 0x00, 0x30, 0x7D, 0x7D, 0x30,
rodriguj 0:3d84b3bfb794 164 0x00, 0x00, 0x08, 0x1C, 0x36, 0x22, 0x08, 0x1C, 0x36, 0x22,
rodriguj 0:3d84b3bfb794 165 0x22, 0x36, 0x1C, 0x08, 0x22, 0x36, 0x1C, 0x08, 0xAA, 0x00,
rodriguj 0:3d84b3bfb794 166 0x55, 0x00, 0xAA, 0x00, 0x55, 0x00, 0xAA, 0x55, 0xAA, 0x55,
rodriguj 0:3d84b3bfb794 167 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0xFF, 0x55, 0xFF, 0xAA, 0xFF,
rodriguj 0:3d84b3bfb794 168 0x55, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 169 0x10, 0x10, 0x10, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x14, 0x14,
rodriguj 0:3d84b3bfb794 170 0x14, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x10, 0x10, 0xFF, 0xFF,
rodriguj 0:3d84b3bfb794 171 0x00, 0xFF, 0xFF, 0x00, 0x10, 0x10, 0xF0, 0xF0, 0x10, 0xF0,
rodriguj 0:3d84b3bfb794 172 0xF0, 0x00, 0x14, 0x14, 0x14, 0xFC, 0xFC, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 173 0x14, 0x14, 0xF7, 0xF7, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 174 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x14, 0x14, 0xF4, 0xF4,
rodriguj 0:3d84b3bfb794 175 0x04, 0xFC, 0xFC, 0x00, 0x14, 0x14, 0x17, 0x17, 0x10, 0x1F,
rodriguj 0:3d84b3bfb794 176 0x1F, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x10, 0x1F, 0x1F, 0x00,
rodriguj 0:3d84b3bfb794 177 0x14, 0x14, 0x14, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x10, 0x10,
rodriguj 0:3d84b3bfb794 178 0x10, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
rodriguj 0:3d84b3bfb794 179 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x1F, 0x10,
rodriguj 0:3d84b3bfb794 180 0x10, 0x10, 0x10, 0x10, 0x10, 0xF0, 0xF0, 0x10, 0x10, 0x10,
rodriguj 0:3d84b3bfb794 181 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10,
rodriguj 0:3d84b3bfb794 182 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF,
rodriguj 0:3d84b3bfb794 183 0xFF, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x14,
rodriguj 0:3d84b3bfb794 184 0x14, 0x14, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x10,
rodriguj 0:3d84b3bfb794 185 0x00, 0x00, 0x1F, 0x1F, 0x10, 0x17, 0x17, 0x14, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 186 0xFC, 0xFC, 0x04, 0xF4, 0xF4, 0x14, 0x14, 0x14, 0x17, 0x17,
rodriguj 0:3d84b3bfb794 187 0x10, 0x17, 0x17, 0x14, 0x14, 0x14, 0xF4, 0xF4, 0x04, 0xF4,
rodriguj 0:3d84b3bfb794 188 0xF4, 0x14, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xF7, 0xF7, 0x14,
rodriguj 0:3d84b3bfb794 189 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
rodriguj 0:3d84b3bfb794 190 0xF7, 0xF7, 0x00, 0xF7, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x17,
rodriguj 0:3d84b3bfb794 191 0x17, 0x14, 0x14, 0x14, 0x10, 0x10, 0x1F, 0x1F, 0x10, 0x1F,
rodriguj 0:3d84b3bfb794 192 0x1F, 0x10, 0x14, 0x14, 0x14, 0xF4, 0xF4, 0x14, 0x14, 0x14,
rodriguj 0:3d84b3bfb794 193 0x10, 0x10, 0xF0, 0xF0, 0x10, 0xF0, 0xF0, 0x10, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 194 0x1F, 0x1F, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00, 0x1F,
rodriguj 0:3d84b3bfb794 195 0x1F, 0x14, 0x14, 0x14, 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x14,
rodriguj 0:3d84b3bfb794 196 0x14, 0x14, 0x00, 0x00, 0xF0, 0xF0, 0x10, 0xF0, 0xF0, 0x10,
rodriguj 0:3d84b3bfb794 197 0x10, 0x10, 0xFF, 0xFF, 0x10, 0xFF, 0xFF, 0x10, 0x14, 0x14,
rodriguj 0:3d84b3bfb794 198 0x14, 0xFF, 0xFF, 0x14, 0x14, 0x14, 0x10, 0x10, 0x10, 0x1F,
rodriguj 0:3d84b3bfb794 199 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x10,
rodriguj 0:3d84b3bfb794 200 0x10, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
rodriguj 0:3d84b3bfb794 201 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF,
rodriguj 0:3d84b3bfb794 202 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 203 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
rodriguj 0:3d84b3bfb794 204 0x0F, 0x0F, 0x38, 0x7C, 0x44, 0x6C, 0x38, 0x6C, 0x44, 0x00,
rodriguj 0:3d84b3bfb794 205 0x7E, 0x7F, 0x01, 0x09, 0x5F, 0x76, 0x20, 0x00, 0x7F, 0x7F,
rodriguj 0:3d84b3bfb794 206 0x01, 0x01, 0x01, 0x03, 0x03, 0x00, 0x04, 0x7C, 0x7C, 0x04,
rodriguj 0:3d84b3bfb794 207 0x7C, 0x7C, 0x04, 0x00, 0x63, 0x77, 0x5D, 0x49, 0x41, 0x63,
rodriguj 0:3d84b3bfb794 208 0x63, 0x00, 0x38, 0x7C, 0x44, 0x7C, 0x3C, 0x04, 0x04, 0x00,
rodriguj 0:3d84b3bfb794 209 0x80, 0xFC, 0x7C, 0x40, 0x40, 0x7C, 0x3C, 0x00, 0x04, 0x06,
rodriguj 0:3d84b3bfb794 210 0x02, 0x7E, 0x7C, 0x06, 0x02, 0x00, 0x00, 0x99, 0xBD, 0xE7,
rodriguj 0:3d84b3bfb794 211 0xE7, 0xBD, 0x99, 0x00, 0x1C, 0x3E, 0x6B, 0x49, 0x6B, 0x3E,
rodriguj 0:3d84b3bfb794 212 0x1C, 0x00, 0x4C, 0x7E, 0x73, 0x01, 0x73, 0x7E, 0x4C, 0x00,
rodriguj 0:3d84b3bfb794 213 0x00, 0x30, 0x78, 0x4A, 0x4F, 0x7D, 0x39, 0x00, 0x18, 0x3C,
rodriguj 0:3d84b3bfb794 214 0x24, 0x3C, 0x3C, 0x24, 0x3C, 0x18, 0x98, 0xFC, 0x64, 0x3C,
rodriguj 0:3d84b3bfb794 215 0x3E, 0x27, 0x3D, 0x18, 0x00, 0x1C, 0x3E, 0x6B, 0x49, 0x49,
rodriguj 0:3d84b3bfb794 216 0x49, 0x00, 0x7C, 0x7E, 0x02, 0x02, 0x02, 0x7E, 0x7C, 0x00,
rodriguj 0:3d84b3bfb794 217 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x00, 0x00, 0x44,
rodriguj 0:3d84b3bfb794 218 0x44, 0x5F, 0x5F, 0x44, 0x44, 0x00, 0x00, 0x40, 0x51, 0x5B,
rodriguj 0:3d84b3bfb794 219 0x4E, 0x44, 0x40, 0x00, 0x00, 0x40, 0x44, 0x4E, 0x5B, 0x51,
rodriguj 0:3d84b3bfb794 220 0x40, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x07, 0x06,
rodriguj 0:3d84b3bfb794 221 0x60, 0xE0, 0x80, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x08,
rodriguj 0:3d84b3bfb794 222 0x08, 0x2A, 0x2A, 0x08, 0x08, 0x00, 0x24, 0x36, 0x12, 0x36,
rodriguj 0:3d84b3bfb794 223 0x24, 0x36, 0x12, 0x00, 0x00, 0x06, 0x0F, 0x09, 0x0F, 0x06,
rodriguj 0:3d84b3bfb794 224 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 225 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x10, 0x30,
rodriguj 0:3d84b3bfb794 226 0x70, 0xC0, 0xFF, 0xFF, 0x01, 0x01, 0x00, 0x01, 0x1F, 0x1E,
rodriguj 0:3d84b3bfb794 227 0x01, 0x1F, 0x1E, 0x00, 0x00, 0x11, 0x19, 0x1D, 0x17, 0x12,
rodriguj 0:3d84b3bfb794 228 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00,
rodriguj 0:3d84b3bfb794 229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
rodriguj 0:3d84b3bfb794 230 };
rodriguj 0:3d84b3bfb794 231
rodriguj 0:3d84b3bfb794 232
rodriguj 3:bb6fba3e84ff 233 SSD1306::SSD1306 (PinName sda, PinName scl, char ssd1306_addr)
rodriguj 0:3d84b3bfb794 234 {
rodriguj 0:3d84b3bfb794 235 idxfb = 0;
rodriguj 0:3d84b3bfb794 236 fb = new char[1024];
rodriguj 2:7f1160c1a741 237 if (!fb) {
rodriguj 0:3d84b3bfb794 238 printf ("SSD1306: Framebuffer allocation failed!\r\n");
rodriguj 0:3d84b3bfb794 239 for (;;) { }
rodriguj 0:3d84b3bfb794 240 }
rodriguj 2:7f1160c1a741 241
rodriguj 0:3d84b3bfb794 242 bus = new I2C (sda, scl);
rodriguj 3:bb6fba3e84ff 243 ssd1306_i2c_addr = ssd1306_addr;
rodriguj 3:bb6fba3e84ff 244 do_not_delete_bus = 0;
rodriguj 0:3d84b3bfb794 245 #ifdef SSD1306_DEBUG
rodriguj 0:3d84b3bfb794 246 printf ("SSD1306 debug: fb = 0x%08.8X\r\n", fb);
rodriguj 0:3d84b3bfb794 247 #endif
rodriguj 3:bb6fba3e84ff 248 }
rodriguj 2:7f1160c1a741 249
rodriguj 3:bb6fba3e84ff 250 SSD1306::SSD1306 (I2C &busi2c, char ssd1306_addr)
rodriguj 3:bb6fba3e84ff 251 {
rodriguj 3:bb6fba3e84ff 252 bus = &busi2c;
rodriguj 3:bb6fba3e84ff 253 idxfb = 0;
rodriguj 3:bb6fba3e84ff 254 fb = new char[1024];
rodriguj 3:bb6fba3e84ff 255 if (!fb) {
rodriguj 3:bb6fba3e84ff 256 printf ("SSD1306: Framebuffer allocation failed!\r\n");
rodriguj 3:bb6fba3e84ff 257 for (;;) { }
rodriguj 3:bb6fba3e84ff 258 }
rodriguj 3:bb6fba3e84ff 259 ssd1306_i2c_addr = ssd1306_addr;
rodriguj 3:bb6fba3e84ff 260 do_not_delete_bus = 1;
rodriguj 0:3d84b3bfb794 261 }
rodriguj 0:3d84b3bfb794 262
rodriguj 0:3d84b3bfb794 263 void SSD1306::speed (I2CSpeed spd)
rodriguj 0:3d84b3bfb794 264 {
rodriguj 2:7f1160c1a741 265 switch (spd) {
rodriguj 4:35757c8b7625 266 case Slow:
rodriguj 2:7f1160c1a741 267 bus->frequency(100000);
rodriguj 2:7f1160c1a741 268 break;
rodriguj 2:7f1160c1a741 269 case Medium:
rodriguj 2:7f1160c1a741 270 bus->frequency(400000);
rodriguj 2:7f1160c1a741 271 break;
rodriguj 2:7f1160c1a741 272 case Fast:
rodriguj 2:7f1160c1a741 273 bus->frequency(1000000);
rodriguj 2:7f1160c1a741 274 break;
rodriguj 0:3d84b3bfb794 275 }
rodriguj 0:3d84b3bfb794 276 }
rodriguj 0:3d84b3bfb794 277
rodriguj 0:3d84b3bfb794 278 char SSD1306::scan (void)
rodriguj 0:3d84b3bfb794 279 {
rodriguj 0:3d84b3bfb794 280 int addr;
rodriguj 0:3d84b3bfb794 281 int res;
rodriguj 0:3d84b3bfb794 282 char i2caddr = 0;
rodriguj 2:7f1160c1a741 283
rodriguj 0:3d84b3bfb794 284 for (addr=0; addr<256; addr++) {
rodriguj 0:3d84b3bfb794 285 res = bus->write (addr, NULL, 0);
rodriguj 0:3d84b3bfb794 286 if (res == 0)
rodriguj 0:3d84b3bfb794 287 i2caddr = addr & 0xFE;
rodriguj 0:3d84b3bfb794 288 }
rodriguj 0:3d84b3bfb794 289 return i2caddr;
rodriguj 0:3d84b3bfb794 290 }
rodriguj 0:3d84b3bfb794 291
rodriguj 0:3d84b3bfb794 292 int SSD1306::command_data (char c, char c_or_d, char lastitem)
rodriguj 0:3d84b3bfb794 293 {
rodriguj 0:3d84b3bfb794 294 int res;
rodriguj 2:7f1160c1a741 295
rodriguj 0:3d84b3bfb794 296 bus->start();
rodriguj 2:7f1160c1a741 297 res = bus->write(ssd1306_i2c_addr);
rodriguj 2:7f1160c1a741 298 if (!res) goto terminate_transaction;
rodriguj 2:7f1160c1a741 299 res = bus->write(c_or_d | lastitem);
rodriguj 2:7f1160c1a741 300 if (!res) goto terminate_transaction;
rodriguj 2:7f1160c1a741 301 res = bus->write(c);
rodriguj 2:7f1160c1a741 302 if (!res) goto terminate_transaction;
rodriguj 2:7f1160c1a741 303
rodriguj 2:7f1160c1a741 304 terminate_transaction:
rodriguj 2:7f1160c1a741 305 bus->stop();
rodriguj 0:3d84b3bfb794 306 return res;
rodriguj 0:3d84b3bfb794 307 }
rodriguj 0:3d84b3bfb794 308
rodriguj 0:3d84b3bfb794 309 int SSD1306::command (char c)
rodriguj 0:3d84b3bfb794 310 {
rodriguj 4:35757c8b7625 311 return command_data (c, SSD1306_IS_COMMAND, SSD1306_IS_LAST);
rodriguj 0:3d84b3bfb794 312 }
rodriguj 0:3d84b3bfb794 313
rodriguj 0:3d84b3bfb794 314 int SSD1306::data (char d)
rodriguj 0:3d84b3bfb794 315 {
rodriguj 4:35757c8b7625 316 return command_data (d, SSD1306_IS_DATA, SSD1306_IS_LAST);
rodriguj 0:3d84b3bfb794 317 }
rodriguj 0:3d84b3bfb794 318
rodriguj 0:3d84b3bfb794 319 int SSD1306::init (void)
rodriguj 0:3d84b3bfb794 320 {
rodriguj 3:bb6fba3e84ff 321 static const char comando[] = {0x80, SSD1306_DISPLAYOFF,
rodriguj 3:bb6fba3e84ff 322 0x80, SSD1306_CHARGEPUMP,
rodriguj 3:bb6fba3e84ff 323 0x80, 0x14,
mikevd1 10:346065d26cc9 324 0x80, SSD1306_MEMORYMODE,
mikevd1 10:346065d26cc9 325 0x80, 0x00,
rodriguj 3:bb6fba3e84ff 326 0x80, SSD1306_SEGREMAP | 0x1,
rodriguj 3:bb6fba3e84ff 327 0x80, SSD1306_COMSCANDEC,
rodriguj 3:bb6fba3e84ff 328 0x80, SSD1306_SETCONTRAST,
rodriguj 3:bb6fba3e84ff 329 0x80, 0x7F,
rodriguj 3:bb6fba3e84ff 330 0x00, SSD1306_DISPLAYON
rodriguj 3:bb6fba3e84ff 331 };
rodriguj 2:7f1160c1a741 332
rodriguj 0:3d84b3bfb794 333 return bus->write (ssd1306_i2c_addr, comando, sizeof comando);
rodriguj 0:3d84b3bfb794 334 }
rodriguj 0:3d84b3bfb794 335
mikevd1 10:346065d26cc9 336 int SSD1306::initAll (void)
mikevd1 10:346065d26cc9 337 {
mikevd1 10:346065d26cc9 338 static const char comando[] = {0x80, SSD1306_DISPLAYOFF,
mikevd1 10:346065d26cc9 339 0x80, SSD1306_CHARGEPUMP,
mikevd1 10:346065d26cc9 340 0x80, 0x14,
mikevd1 10:346065d26cc9 341 0x80, SSD1306_MEMORYMODE,
mikevd1 10:346065d26cc9 342 0x80, 0x00,
mikevd1 10:346065d26cc9 343 0x80, SSD1306_SEGREMAP | 0x1,
mikevd1 10:346065d26cc9 344 0x80, SSD1306_COMSCANDEC,
mikevd1 10:346065d26cc9 345 0x80, SSD1306_SETCONTRAST,
mikevd1 10:346065d26cc9 346 0x80, 0x7F,
mikevd1 10:346065d26cc9 347 0xA4,
mikevd1 10:346065d26cc9 348 0x00, SSD1306_DISPLAYON
mikevd1 10:346065d26cc9 349 };
mikevd1 10:346065d26cc9 350
mikevd1 10:346065d26cc9 351 return bus->write (ssd1306_i2c_addr, comando, sizeof comando);
mikevd1 10:346065d26cc9 352 }
mikevd1 10:346065d26cc9 353
mikevd1 10:346065d26cc9 354
rodriguj 1:c5cf4ca5939f 355 void SSD1306::scroll (bool refresh)
rodriguj 0:3d84b3bfb794 356 {
rodriguj 0:3d84b3bfb794 357 int i;
rodriguj 2:7f1160c1a741 358
rodriguj 0:3d84b3bfb794 359 for (i=128; i<1024; i++)
rodriguj 0:3d84b3bfb794 360 fb[i-128] = fb[i];
rodriguj 0:3d84b3bfb794 361 for (i=896; i<1024; i++)
rodriguj 0:3d84b3bfb794 362 fb[i] = 0;
rodriguj 1:c5cf4ca5939f 363 if (refresh)
rodriguj 8:09b1578f93d9 364 redraw();
rodriguj 2:7f1160c1a741 365 }
rodriguj 2:7f1160c1a741 366
rodriguj 2:7f1160c1a741 367 void SSD1306::locate (char row, char column)
rodriguj 2:7f1160c1a741 368 {
rodriguj 2:7f1160c1a741 369 idxfb = row*128+column*8;
rodriguj 0:3d84b3bfb794 370 }
rodriguj 0:3d84b3bfb794 371
rodriguj 1:c5cf4ca5939f 372 void SSD1306::putchar (char c, bool refresh)
rodriguj 0:3d84b3bfb794 373 {
rodriguj 0:3d84b3bfb794 374 int idx,i;
rodriguj 2:7f1160c1a741 375
rodriguj 0:3d84b3bfb794 376 idx = c*8;
rodriguj 2:7f1160c1a741 377 if (idxfb == 1024) {
rodriguj 2:7f1160c1a741 378 scroll(refresh);
rodriguj 2:7f1160c1a741 379 idxfb = 896;
rodriguj 2:7f1160c1a741 380 }
rodriguj 0:3d84b3bfb794 381 for (i=0; i<8; i++) {
rodriguj 0:3d84b3bfb794 382 fb[idxfb] = charset[idx+i];
rodriguj 0:3d84b3bfb794 383 idxfb++;
rodriguj 0:3d84b3bfb794 384 }
rodriguj 1:c5cf4ca5939f 385 if (refresh)
rodriguj 8:09b1578f93d9 386 redraw();
rodriguj 2:7f1160c1a741 387 }
rodriguj 2:7f1160c1a741 388
rodriguj 2:7f1160c1a741 389 void SSD1306::puts (char *s, bool refresh)
rodriguj 2:7f1160c1a741 390 {
rodriguj 2:7f1160c1a741 391 while (*s) putchar (*s++, refresh);
rodriguj 0:3d84b3bfb794 392 }
rodriguj 0:3d84b3bfb794 393
rodriguj 4:35757c8b7625 394 void SSD1306::printf (const char *fmt,...)
rodriguj 3:bb6fba3e84ff 395 {
rodriguj 3:bb6fba3e84ff 396 char *s = new char[129];
rodriguj 3:bb6fba3e84ff 397 va_list args;
rodriguj 3:bb6fba3e84ff 398
rodriguj 3:bb6fba3e84ff 399 va_start (args, fmt);
rodriguj 3:bb6fba3e84ff 400 vsnprintf (s, 128, fmt, args);
rodriguj 3:bb6fba3e84ff 401 puts (s, false);
rodriguj 3:bb6fba3e84ff 402 delete[] s;
rodriguj 3:bb6fba3e84ff 403 va_end (args);
rodriguj 3:bb6fba3e84ff 404 }
rodriguj 3:bb6fba3e84ff 405
rodriguj 3:bb6fba3e84ff 406
rodriguj 8:09b1578f93d9 407 void SSD1306::redraw (void)
rodriguj 0:3d84b3bfb794 408 {
rodriguj 0:3d84b3bfb794 409 int i;
rodriguj 2:7f1160c1a741 410
rodriguj 0:3d84b3bfb794 411 command (0xb0);
rodriguj 0:3d84b3bfb794 412 command (SSD1306_SETLOWCOLUMN | 0x0); // low col = 0
rodriguj 0:3d84b3bfb794 413 command (SSD1306_SETHIGHCOLUMN | 0x0); // hi col = 0
rodriguj 0:3d84b3bfb794 414 command (SSD1306_SETSTARTLINE | 0x0); // line #0
rodriguj 2:7f1160c1a741 415
rodriguj 0:3d84b3bfb794 416 bus->start();
rodriguj 0:3d84b3bfb794 417 bus->write (ssd1306_i2c_addr);
rodriguj 0:3d84b3bfb794 418 bus->write (0x40);
rodriguj 0:3d84b3bfb794 419 for (i=0; i<1024; i++) {
rodriguj 0:3d84b3bfb794 420 bus->write (fb[i]);
rodriguj 0:3d84b3bfb794 421 }
rodriguj 0:3d84b3bfb794 422 bus->stop();
rodriguj 0:3d84b3bfb794 423 }
rodriguj 0:3d84b3bfb794 424
rodriguj 8:09b1578f93d9 425 void SSD1306::display (void)
rodriguj 8:09b1578f93d9 426 {
rodriguj 8:09b1578f93d9 427 redraw();
rodriguj 8:09b1578f93d9 428 }
rodriguj 8:09b1578f93d9 429
rodriguj 0:3d84b3bfb794 430 void SSD1306::set_contrast (char v)
rodriguj 0:3d84b3bfb794 431 {
rodriguj 0:3d84b3bfb794 432 command (SSD1306_SETCONTRAST);
rodriguj 0:3d84b3bfb794 433 command (v);
rodriguj 0:3d84b3bfb794 434 }
rodriguj 0:3d84b3bfb794 435
rodriguj 1:c5cf4ca5939f 436 void SSD1306::cls (char *bkground, bool refresh)
rodriguj 0:3d84b3bfb794 437 {
rodriguj 0:3d84b3bfb794 438 int i;
rodriguj 1:c5cf4ca5939f 439
rodriguj 2:7f1160c1a741 440 if (!bkground) {
rodriguj 1:c5cf4ca5939f 441 for (i=0; i<1024; i++)
rodriguj 1:c5cf4ca5939f 442 fb[i] = 0;
rodriguj 2:7f1160c1a741 443 } else {
rodriguj 1:c5cf4ca5939f 444 for (i=0; i<1024; i++)
rodriguj 1:c5cf4ca5939f 445 fb[i] = bkground[i];
rodriguj 0:3d84b3bfb794 446 }
rodriguj 0:3d84b3bfb794 447 idxfb = 0;
rodriguj 1:c5cf4ca5939f 448 if (refresh)
rodriguj 8:09b1578f93d9 449 redraw();
rodriguj 0:3d84b3bfb794 450 }
rodriguj 0:3d84b3bfb794 451
mikevd1 10:346065d26cc9 452 void SSD1306::bitMap (char *bkground, bool refresh)
mikevd1 10:346065d26cc9 453 {
mikevd1 10:346065d26cc9 454
mikevd1 10:346065d26cc9 455 const unsigned char nunu_logo0 [] = {
mikevd1 10:346065d26cc9 456 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 457 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 458 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 459 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 460 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 461 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 463 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 464 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 465 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 466 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 467 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 468 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 469 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 470 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 471 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 472 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0x80,
mikevd1 10:346065d26cc9 473 0x80, 0x80, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 474 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 475 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 476 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
mikevd1 10:346065d26cc9 477 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 479 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 480 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x07, 0x03, 0x07,
mikevd1 10:346065d26cc9 481 0x07, 0x03, 0x07, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 482 0x00, 0x00, 0x00, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 483 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x26, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 484 0x00, 0x00, 0x00, 0x40, 0x58, 0x64, 0x97, 0x48, 0xB5, 0x4A, 0x23, 0x04, 0x01, 0x02, 0x01, 0x02,
mikevd1 10:346065d26cc9 485 0x01, 0x01, 0x02, 0x49, 0x52, 0xAD, 0xA6, 0x48, 0x52, 0x64, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 486 0x00, 0x00, 0x00, 0x69, 0xA5, 0x99, 0x42, 0x99, 0x59, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 487 0x00, 0x00, 0x00, 0x65, 0x9D, 0x42, 0x98, 0xA5, 0x54, 0xAA, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 488 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x1F, 0x1F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 489 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x1F, 0x1F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 490 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x1F, 0x0F, 0x1E, 0x0E,
mikevd1 10:346065d26cc9 491 0x0E, 0x1F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 492 0x00, 0x00, 0x00, 0x04, 0x02, 0x09, 0x06, 0x09, 0x0A, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 493 0x00, 0x00, 0x00, 0x04, 0x02, 0x09, 0x06, 0x09, 0x0A, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 494 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x04, 0x09, 0x0A, 0x08, 0x06, 0x08, 0x04,
mikevd1 10:346065d26cc9 495 0x06, 0x0A, 0x02, 0x09, 0x09, 0x04, 0x05, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 496 0x00, 0x00, 0x00, 0x00, 0x0A, 0x1F, 0x00, 0x12, 0x12, 0x0C, 0x00, 0x08, 0x0C, 0x16, 0x02, 0x1C,
mikevd1 10:346065d26cc9 497 0x0C, 0x00, 0x80, 0x16, 0x02, 0x1C, 0x0A, 0x00, 0x00, 0x1E, 0x12, 0x02, 0x00, 0x0C, 0x1C, 0x10,
mikevd1 10:346065d26cc9 498 0x10, 0x1E, 0x04, 0x00, 0x0C, 0x1C, 0x02, 0x00, 0x00, 0x1D, 0x05, 0x00, 0x04, 0x1E, 0x00, 0x02,
mikevd1 10:346065d26cc9 499 0x1E, 0x08, 0x00, 0x20, 0x3E, 0x18, 0x08, 0xB6, 0x30, 0x00, 0x00, 0x1E, 0x04, 0x1A, 0x0C, 0x00,
mikevd1 10:346065d26cc9 500 0x02, 0x1E, 0x12, 0x02, 0x08, 0x0C, 0x16, 0x00, 0x16, 0x0C, 0x00, 0x00, 0x0C, 0x12, 0x00, 0x16,
mikevd1 10:346065d26cc9 501 0x08, 0x00, 0x1A, 0x0F, 0x00, 0x02, 0x0E, 0x18, 0x00, 0x0C, 0x1E, 0x00, 0x00, 0x1E, 0x08, 0x00,
mikevd1 10:346065d26cc9 502 0x04, 0x1F, 0x00, 0x00, 0x0C, 0x1E, 0x00, 0x16, 0x04, 0x00, 0x00, 0x1F, 0x04, 0x0C, 0x1A, 0x00,
mikevd1 10:346065d26cc9 503 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 504 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0x01, 0x08, 0x07, 0x00, 0x00, 0x13, 0x16, 0x0C, 0x06, 0x01,
mikevd1 10:346065d26cc9 505 0x00, 0x07, 0x0F, 0x01, 0x08, 0x07, 0x06, 0x00, 0x06, 0x0E, 0x05, 0x01, 0x06, 0x02, 0x00, 0x04,
mikevd1 10:346065d26cc9 506 0x0F, 0x00, 0x00, 0x00, 0x07, 0x06, 0x01, 0x00, 0x07, 0x04, 0x00, 0x06, 0x0E, 0x01, 0x09, 0x07,
mikevd1 10:346065d26cc9 507 0x00, 0x00, 0x05, 0x0F, 0x01, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x06, 0x07, 0x00, 0x09, 0x05, 0x00,
mikevd1 10:346065d26cc9 508 0x00, 0x0A, 0x03, 0x0A, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 509 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 510 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 511 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 512 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 513 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 514 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 515 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 516 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 517 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 518 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 519 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
mikevd1 10:346065d26cc9 520 };
mikevd1 10:346065d26cc9 521
mikevd1 10:346065d26cc9 522
mikevd1 10:346065d26cc9 523 const unsigned char nunu_logo1 [] = {
mikevd1 10:346065d26cc9 524 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0,
mikevd1 10:346065d26cc9 525 0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 526 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 527 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 528 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xC0, 0x80,
mikevd1 10:346065d26cc9 529 0xC0, 0x00, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 530 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 531 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 532 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 533 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 534 0x00, 0x00, 0x40, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 535 0x00, 0x00, 0x00, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 536 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x58, 0xDC, 0x56, 0xB7, 0xEC, 0x6F, 0x69, 0xF3, 0x9E,
mikevd1 10:346065d26cc9 537 0xE9, 0x3E, 0xD7, 0xB5, 0xDB, 0x5A, 0xBD, 0x66, 0xDC, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 538 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4, 0xAF, 0xBA, 0x77, 0xD5, 0xAF, 0xB8, 0x40, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 539 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xBA, 0xEE, 0x36, 0xED, 0xEA, 0x3B, 0xF6, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 540 0x00, 0x00, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0x0F, 0x0F, 0x0F,
mikevd1 10:346065d26cc9 541 0x1F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 542 0x00, 0x00, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 543 0x00, 0x00, 0x00, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 544 0x00, 0x00, 0x00, 0x00, 0xD0, 0xB6, 0xCF, 0x79, 0x9E, 0xE3, 0x7D, 0xDB, 0x3C, 0x17, 0x07, 0x0C,
mikevd1 10:346065d26cc9 545 0x07, 0x0A, 0x1D, 0x17, 0xF6, 0x96, 0xCF, 0x79, 0xE9, 0x3E, 0xD7, 0xB4, 0x80, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 546 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x75, 0x5D, 0xDD, 0xB5, 0xCA, 0x7F, 0x42, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 547 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x7B, 0xCE, 0x3B, 0xE9, 0xED, 0x37, 0xEE, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 548 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 549 0x00, 0x00, 0x2B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 550 0x00, 0x00, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 551 0x00, 0x00, 0x00, 0xEB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 552 0x00, 0x00, 0x00, 0x00, 0xB9, 0xAE, 0xD7, 0x75, 0xCD, 0x7B, 0x7C, 0xC7, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 553 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7B, 0xCD, 0xCD, 0x7B, 0xBC, 0xC7, 0xA5, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 554 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x33, 0xDE, 0x97, 0xFC, 0x6B, 0xED, 0x24, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 555 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xEB, 0xAE, 0x3B, 0xE9, 0xED, 0x37, 0xEE, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 556 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 557 0x00, 0x00, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 558 0x00, 0x00, 0x24, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 559 0x00, 0x00, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 560 0x00, 0x00, 0x00, 0x00, 0xED, 0x35, 0xDB, 0xAE, 0xB6, 0xDB, 0x35, 0xED, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 561 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x75, 0x9D, 0x93, 0xFE, 0x2A, 0xFF, 0x52, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 562 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x33, 0xDE, 0x7E, 0xC3, 0x79, 0xDF, 0x64, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 563 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD7, 0x76, 0x37, 0xE9, 0xED, 0x37, 0xEE, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 564 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 565 0x00, 0x00, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 566 0x00, 0x00, 0x01, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xF0, 0xF0,
mikevd1 10:346065d26cc9 567 0xF0, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x17, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 568 0x00, 0x00, 0x00, 0x00, 0xAD, 0xEB, 0x7C, 0x97, 0xE7, 0x3C, 0xE9, 0xAF, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 569 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x33, 0xEE, 0x97, 0xEC, 0x79, 0xEF, 0x24, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 570 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xED, 0xBA, 0xBB, 0xAD, 0xD3, 0x7E, 0x6F, 0xD8, 0xA0, 0xB0,
mikevd1 10:346065d26cc9 571 0xA0, 0xE0, 0x30, 0xE0, 0xE4, 0x3E, 0xDE, 0xB3, 0xDB, 0x59, 0xAD, 0xF7, 0x16, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 572 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 573 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 574 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 575 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 576 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0x7B, 0xCD, 0xDD, 0x56, 0xB6, 0x2B, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 577 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xDB, 0xCD, 0x7B, 0x7C, 0xC7, 0x05, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 578 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0E, 0x2E, 0x5B, 0x35, 0xED, 0xDD, 0x35, 0xEB, 0xAE,
mikevd1 10:346065d26cc9 579 0xCD, 0x7B, 0xAC, 0xB7, 0xB9, 0xAF, 0xD6, 0x76, 0x3B, 0x1A, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 580 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 581 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 582 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, 0x03, 0x07,
mikevd1 10:346065d26cc9 583 0x07, 0x07, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 584 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 585 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 586 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0x02, 0x03,
mikevd1 10:346065d26cc9 587 0x03, 0x02, 0x02, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
mikevd1 10:346065d26cc9 588 };
mikevd1 10:346065d26cc9 589
mikevd1 10:346065d26cc9 590
mikevd1 10:346065d26cc9 591 const unsigned char nunu_logo2 [] = {
mikevd1 10:346065d26cc9 592 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xE0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
mikevd1 10:346065d26cc9 593 0xF0, 0xF0, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF8,
mikevd1 10:346065d26cc9 594 0xF8, 0xF8, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8,
mikevd1 10:346065d26cc9 595 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x40, 0xD0, 0x00, 0x20, 0xD0,
mikevd1 10:346065d26cc9 596 0xB0, 0x08, 0x60, 0x90, 0x40, 0x90, 0x90, 0x40, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 597 0x00, 0x00, 0x40, 0xA0, 0x20, 0x60, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 598 0xD0, 0x20, 0x00, 0xD8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 599 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 600 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x03, 0x03, 0x01, 0x01, 0x03, 0x07,
mikevd1 10:346065d26cc9 601 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 602 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 603 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x42, 0x09, 0xB6, 0x46, 0x99, 0x00, 0x02,
mikevd1 10:346065d26cc9 604 0x00, 0x01, 0x00, 0x01, 0x01, 0x56, 0x40, 0xAD, 0x24, 0x96, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 605 0x00, 0x00, 0x08, 0x6A, 0xD9, 0x06, 0x20, 0xDB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
mikevd1 10:346065d26cc9 606 0x52, 0x65, 0x9C, 0x22, 0x4A, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 607 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 608 0x00, 0x00, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 609 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 610 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xE0, 0xE0, 0xE0, 0xE0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 611 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x52, 0xC0, 0x2D, 0x92, 0x49, 0x00, 0x00,
mikevd1 10:346065d26cc9 612 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xCC, 0x22, 0x96, 0x41, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 613 0x00, 0x00, 0x10, 0x4B, 0x92, 0xA4, 0x2D, 0x92, 0x21, 0xC0, 0x60, 0x00, 0x80, 0x60, 0x00, 0xD2,
mikevd1 10:346065d26cc9 614 0x92, 0xA9, 0x29, 0x92, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 615 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 616 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 617 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
mikevd1 10:346065d26cc9 618 0x03, 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00,
mikevd1 10:346065d26cc9 619 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x05, 0x01, 0x04, 0x01, 0x00, 0x00,
mikevd1 10:346065d26cc9 620 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x06, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 621 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01, 0x06, 0x02, 0x05, 0x06, 0x01, 0x04, 0x02,
mikevd1 10:346065d26cc9 622 0x04, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 623 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 624 0x00, 0x00, 0x00, 0xF8, 0x40, 0x20, 0x40, 0xC0, 0x00, 0xC0, 0x60, 0x20, 0x60, 0x80, 0x00, 0xC0,
mikevd1 10:346065d26cc9 625 0xA0, 0x20, 0x00, 0x00, 0xE0, 0x60, 0x20, 0x00, 0xC0, 0x40, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE0,
mikevd1 10:346065d26cc9 626 0x40, 0x20, 0x00, 0xC8, 0x00, 0x00, 0xE0, 0x40, 0x20, 0x60, 0x40, 0x00, 0xC0, 0x60, 0x00, 0xE0,
mikevd1 10:346065d26cc9 627 0x60, 0x00, 0xC0, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x20, 0x20, 0x00, 0xC0, 0x40, 0x20, 0x40, 0xC0,
mikevd1 10:346065d26cc9 628 0x00, 0xC0, 0x40, 0x20, 0x20, 0x00, 0xA0, 0xEC, 0x40, 0x20, 0xC0, 0x00, 0x00, 0xC0, 0x40, 0x20,
mikevd1 10:346065d26cc9 629 0x60, 0x80, 0x00, 0xC8, 0x40, 0x00, 0xC0, 0x60, 0x20, 0x40, 0xC0, 0x00, 0xB8, 0xA8, 0x80, 0x40,
mikevd1 10:346065d26cc9 630 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x20, 0x20, 0x3C, 0x14, 0x0E, 0x04, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 631 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 632 0x00, 0x00, 0x00, 0x07, 0x04, 0x08, 0x06, 0x03, 0x00, 0x03, 0x0D, 0x01, 0x0D, 0x00, 0x00, 0x04,
mikevd1 10:346065d26cc9 633 0x09, 0x05, 0x06, 0x00, 0x01, 0x0E, 0x08, 0x00, 0x03, 0x06, 0x08, 0x04, 0x07, 0x00, 0x00, 0x07,
mikevd1 10:346065d26cc9 634 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x07, 0x00, 0x00, 0x02, 0x07, 0x00, 0x1D, 0x27, 0x24, 0x25,
mikevd1 10:346065d26cc9 635 0x18, 0x00, 0x04, 0x09, 0x05, 0x06, 0x00, 0x07, 0x0C, 0x04, 0x00, 0x07, 0x04, 0x09, 0x05, 0x00,
mikevd1 10:346065d26cc9 636 0x00, 0x07, 0x04, 0x08, 0x0C, 0x00, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
mikevd1 10:346065d26cc9 637 0x05, 0x06, 0x00, 0x07, 0x00, 0x00, 0x07, 0x05, 0x09, 0x09, 0x00, 0x00, 0x03, 0x05, 0x01, 0x06,
mikevd1 10:346065d26cc9 638 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xB0, 0xC8, 0xB8, 0x50, 0xAC,
mikevd1 10:346065d26cc9 639 0x0E, 0xDE, 0xCE, 0x9D, 0x95, 0x9F, 0x0E, 0x1F, 0x0F, 0x0E, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 640 0x00, 0x00, 0x00, 0xF0, 0x08, 0x08, 0x10, 0x00, 0x30, 0xE0, 0x00, 0xE0, 0x10, 0x00, 0xFF, 0x10,
mikevd1 10:346065d26cc9 641 0x08, 0x10, 0xF0, 0x00, 0xF0, 0x50, 0x40, 0x48, 0x70, 0x00, 0x40, 0xB8, 0x10, 0x08, 0x00, 0xF0,
mikevd1 10:346065d26cc9 642 0x10, 0x08, 0x30, 0xE0, 0x00, 0xE0, 0x50, 0x48, 0x50, 0x30, 0x00, 0x18, 0xFC, 0x00, 0x00, 0x52,
mikevd1 10:346065d26cc9 643 0xD2, 0x00, 0xF0, 0x10, 0x08, 0x10, 0x00, 0x20, 0x68, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 644 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 645 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 646 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF5, 0x7E, 0x3F, 0x23, 0x1D, 0x07, 0x06,
mikevd1 10:346065d26cc9 647 0x0B, 0x14, 0x69, 0x57, 0x47, 0xAD, 0x5E, 0x7A, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 648 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x01, 0x00, 0x00, 0x09, 0x07, 0x00, 0x00, 0x00, 0x01, 0x01,
mikevd1 10:346065d26cc9 649 0x02, 0x03, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
mikevd1 10:346065d26cc9 650 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01,
mikevd1 10:346065d26cc9 651 0x01, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x01, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 652 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 653 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 654 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 655 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00
mikevd1 10:346065d26cc9 656 };
mikevd1 10:346065d26cc9 657
mikevd1 10:346065d26cc9 658
mikevd1 10:346065d26cc9 659 const unsigned char nunu_logo3 [] = {
mikevd1 10:346065d26cc9 660 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xE0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
mikevd1 10:346065d26cc9 661 0xF0, 0xF0, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF8,
mikevd1 10:346065d26cc9 662 0xF8, 0xF8, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8,
mikevd1 10:346065d26cc9 663 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x00, 0xA0, 0x60, 0x80, 0x50,
mikevd1 10:346065d26cc9 664 0xA0, 0x18, 0x60, 0x90, 0x40, 0xA0, 0x90, 0x40, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 665 0x00, 0x00, 0x80, 0xA0, 0x20, 0x50, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 666 0x90, 0x60, 0x00, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 667 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 668 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x03, 0x03, 0x01, 0x01, 0x03, 0x07,
mikevd1 10:346065d26cc9 669 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 670 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 671 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x02, 0x6B, 0x94, 0x42, 0x9D, 0x00, 0x02,
mikevd1 10:346065d26cc9 672 0x00, 0x01, 0x00, 0x01, 0x01, 0x46, 0x90, 0xAD, 0x25, 0x96, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 673 0x00, 0x00, 0x08, 0x6A, 0xDB, 0x04, 0x20, 0xDB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
mikevd1 10:346065d26cc9 674 0x96, 0x60, 0x19, 0xA6, 0x46, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 675 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 676 0x00, 0x00, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 677 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 678 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xE0, 0xE0, 0xE0, 0xE0, 0xF0, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
mikevd1 10:346065d26cc9 679 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0x90, 0x6D, 0x92, 0x49, 0x00, 0x00,
mikevd1 10:346065d26cc9 680 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xDD, 0x22, 0x96, 0x29, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 681 0x00, 0x00, 0x10, 0x2B, 0x96, 0xA0, 0x29, 0x96, 0x92, 0x40, 0x40, 0x80, 0x40, 0x80, 0x00, 0xD2,
mikevd1 10:346065d26cc9 682 0x92, 0x99, 0x46, 0x92, 0x2D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 683 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 684 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 685 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
mikevd1 10:346065d26cc9 686 0x03, 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x0F, 0x07, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00,
mikevd1 10:346065d26cc9 687 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x01, 0x00, 0x02, 0x00, 0x00,
mikevd1 10:346065d26cc9 688 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x06, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 689 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x05, 0x02, 0x0A, 0x01, 0x02, 0x04, 0x05, 0x02,
mikevd1 10:346065d26cc9 690 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 691 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 692 0x00, 0x00, 0x00, 0xF8, 0x40, 0x20, 0x60, 0x80, 0x00, 0xC0, 0x40, 0x20, 0x40, 0x80, 0x00, 0xC0,
mikevd1 10:346065d26cc9 693 0x40, 0x20, 0x00, 0x00, 0xE0, 0x60, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE0,
mikevd1 10:346065d26cc9 694 0x60, 0x00, 0x00, 0xC8, 0x00, 0x00, 0xE0, 0x40, 0x20, 0x40, 0x80, 0x00, 0x80, 0x60, 0x00, 0xE0,
mikevd1 10:346065d26cc9 695 0x20, 0x00, 0xC0, 0xA0, 0x20, 0x00, 0x00, 0xE0, 0x60, 0x00, 0x00, 0xC0, 0x80, 0x20, 0x60, 0x80,
mikevd1 10:346065d26cc9 696 0x00, 0x80, 0x40, 0x20, 0x20, 0x00, 0x60, 0x68, 0x40, 0x20, 0xC0, 0x00, 0x00, 0xC0, 0x40, 0x20,
mikevd1 10:346065d26cc9 697 0x40, 0x40, 0x00, 0xC8, 0x40, 0x00, 0xC0, 0x80, 0x20, 0x40, 0x80, 0x00, 0x50, 0xA8, 0x80, 0x40,
mikevd1 10:346065d26cc9 698 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x38, 0x1C, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 699 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 700 0x00, 0x00, 0x00, 0x07, 0x04, 0x08, 0x04, 0x03, 0x00, 0x03, 0x05, 0x09, 0x04, 0x00, 0x00, 0x04,
mikevd1 10:346065d26cc9 701 0x05, 0x0A, 0x02, 0x00, 0x01, 0x0E, 0x00, 0x00, 0x01, 0x05, 0x08, 0x04, 0x07, 0x00, 0x00, 0x07,
mikevd1 10:346065d26cc9 702 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x07, 0x00, 0x00, 0x02, 0x07, 0x00, 0x16, 0x25, 0x25, 0x19,
mikevd1 10:346065d26cc9 703 0x18, 0x00, 0x00, 0x05, 0x05, 0x06, 0x00, 0x05, 0x04, 0x08, 0x00, 0x07, 0x05, 0x08, 0x05, 0x00,
mikevd1 10:346065d26cc9 704 0x00, 0x07, 0x04, 0x04, 0x04, 0x00, 0x02, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00,
mikevd1 10:346065d26cc9 705 0x00, 0x07, 0x00, 0x06, 0x05, 0x00, 0x03, 0x05, 0x00, 0x0D, 0x00, 0x00, 0x03, 0x05, 0x01, 0x06,
mikevd1 10:346065d26cc9 706 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xB0, 0xC0, 0x78, 0x58, 0xA8,
mikevd1 10:346065d26cc9 707 0x4E, 0x9E, 0xCE, 0x9D, 0x96, 0x9F, 0x0E, 0x1F, 0x0F, 0x06, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 708 0x00, 0x00, 0x00, 0xE0, 0x10, 0x08, 0x10, 0x00, 0x30, 0xC0, 0x80, 0xE0, 0x00, 0x00, 0xFE, 0x10,
mikevd1 10:346065d26cc9 709 0x08, 0x10, 0xB0, 0x00, 0xE0, 0x60, 0x48, 0x50, 0x30, 0x00, 0xA0, 0x70, 0x10, 0x08, 0x00, 0xF0,
mikevd1 10:346065d26cc9 710 0x10, 0x08, 0x90, 0x50, 0x00, 0xE0, 0x50, 0x48, 0x58, 0x20, 0x00, 0x18, 0xFC, 0x00, 0x00, 0x20,
mikevd1 10:346065d26cc9 711 0xD2, 0x00, 0xE0, 0x10, 0x08, 0x00, 0x00, 0x30, 0x60, 0x48, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 712 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 713 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 714 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0x36, 0x7F, 0x2B, 0x1D, 0x07, 0x06,
mikevd1 10:346065d26cc9 715 0x09, 0x16, 0x69, 0x57, 0x47, 0x9D, 0x59, 0xBE, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 716 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x01, 0x00, 0x00, 0x09, 0x07, 0x00, 0x00, 0x00, 0x01, 0x01,
mikevd1 10:346065d26cc9 717 0x02, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
mikevd1 10:346065d26cc9 718 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x02, 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01,
mikevd1 10:346065d26cc9 719 0x00, 0x00, 0x01, 0x01, 0x02, 0x01, 0x00, 0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 720 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 721 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 722 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 723 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00
mikevd1 10:346065d26cc9 724 };
mikevd1 10:346065d26cc9 725
mikevd1 10:346065d26cc9 726 const unsigned char nunu_logo6 [] = {
mikevd1 10:346065d26cc9 727 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0x70, 0x38, 0x10, 0x38, 0x38, 0x10, 0x38, 0x70,
mikevd1 10:346065d26cc9 728 0xF8, 0xF0, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF8, 0xF0,
mikevd1 10:346065d26cc9 729 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xF0, 0xF8, 0xF0, 0x70, 0x20, 0x00, 0x00,
mikevd1 10:346065d26cc9 730 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x08, 0x00, 0x08,
mikevd1 10:346065d26cc9 731 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF8, 0xF0, 0xF0,
mikevd1 10:346065d26cc9 732 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xF0, 0xF8, 0xF0, 0x70, 0x20, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 733 0x00, 0x00, 0x00, 0x35, 0x7F, 0x7F, 0x7F, 0x3F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
mikevd1 10:346065d26cc9 734 0x3F, 0x7F, 0x7F, 0x7F, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x1F, 0x3F, 0x7F,
mikevd1 10:346065d26cc9 735 0x7A, 0x70, 0x60, 0x70, 0x70, 0x70, 0x60, 0x70, 0x7B, 0x7F, 0x3F, 0x1F, 0x0F, 0x06, 0x00, 0x00,
mikevd1 10:346065d26cc9 736 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
mikevd1 10:346065d26cc9 737 0x00, 0x00, 0x08, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0x7A,
mikevd1 10:346065d26cc9 738 0x70, 0x60, 0x70, 0x70, 0x70, 0x60, 0x70, 0x7B, 0x7F, 0x3F, 0x1F, 0x0F, 0x06, 0x00, 0x00, 0x00
mikevd1 10:346065d26cc9 739 };
mikevd1 10:346065d26cc9 740
mikevd1 10:346065d26cc9 741
mikevd1 10:346065d26cc9 742 int i;
mikevd1 10:346065d26cc9 743 static int l = 3 ;
mikevd1 10:346065d26cc9 744
mikevd1 10:346065d26cc9 745 if (!bkground) {
mikevd1 10:346065d26cc9 746 for (i=0; i<1024; i++)
mikevd1 10:346065d26cc9 747 if ( l == 0)
mikevd1 10:346065d26cc9 748 {
mikevd1 10:346065d26cc9 749 fb[i] = nunu_logo0[i];
mikevd1 10:346065d26cc9 750 }
mikevd1 10:346065d26cc9 751 else if ( l == 1)
mikevd1 10:346065d26cc9 752 {
mikevd1 10:346065d26cc9 753 fb[i] = nunu_logo1[i];
mikevd1 10:346065d26cc9 754 }
mikevd1 10:346065d26cc9 755 else if ( l == 2)
mikevd1 10:346065d26cc9 756 {
mikevd1 10:346065d26cc9 757 fb[i] = nunu_logo2[i];
mikevd1 10:346065d26cc9 758 }
mikevd1 10:346065d26cc9 759 else
mikevd1 10:346065d26cc9 760 {
mikevd1 10:346065d26cc9 761 fb[i] = nunu_logo3[i];
mikevd1 10:346065d26cc9 762 }
mikevd1 10:346065d26cc9 763 //l++;
mikevd1 10:346065d26cc9 764 if ( l == 4 )
mikevd1 10:346065d26cc9 765 {
mikevd1 10:346065d26cc9 766 l = 0 ;
mikevd1 10:346065d26cc9 767 }
mikevd1 10:346065d26cc9 768
mikevd1 10:346065d26cc9 769 } else {
mikevd1 10:346065d26cc9 770 for (i=0; i<1024; i++)
mikevd1 10:346065d26cc9 771 fb[i] = nunu_logo1[i];
mikevd1 10:346065d26cc9 772 }
mikevd1 10:346065d26cc9 773 idxfb = 0;
mikevd1 10:346065d26cc9 774 if (refresh)
mikevd1 10:346065d26cc9 775 redraw();
mikevd1 10:346065d26cc9 776 }
mikevd1 10:346065d26cc9 777
rodriguj 4:35757c8b7625 778 void SSD1306::plot (char x, char y, PlotStyle mode, bool refresh)
rodriguj 0:3d84b3bfb794 779 {
rodriguj 0:3d84b3bfb794 780 x = x % 128;
rodriguj 0:3d84b3bfb794 781 y = y % 64;
rodriguj 3:bb6fba3e84ff 782
rodriguj 4:35757c8b7625 783 switch (mode) {
rodriguj 2:7f1160c1a741 784 case Normal:
rodriguj 2:7f1160c1a741 785 fb[(y/8)*128+x] |= (1<<(y%8));
rodriguj 2:7f1160c1a741 786 break;
rodriguj 2:7f1160c1a741 787 case Inverse:
rodriguj 2:7f1160c1a741 788 fb[(y/8)*128+x] &= ~(1<<(y%8));
rodriguj 2:7f1160c1a741 789 break;
rodriguj 2:7f1160c1a741 790 case Xor:
rodriguj 2:7f1160c1a741 791 fb[(y/8)*128+x] ^= (1<<(y%8));
rodriguj 2:7f1160c1a741 792 break;
rodriguj 0:3d84b3bfb794 793 }
rodriguj 1:c5cf4ca5939f 794 if (refresh)
rodriguj 8:09b1578f93d9 795 redraw();
rodriguj 0:3d84b3bfb794 796 }
rodriguj 1:c5cf4ca5939f 797
rodriguj 3:bb6fba3e84ff 798 bool SSD1306::point (char x, char y)
rodriguj 3:bb6fba3e84ff 799 {
rodriguj 3:bb6fba3e84ff 800 x = x % 128;
rodriguj 3:bb6fba3e84ff 801 y = y % 64;
rodriguj 3:bb6fba3e84ff 802
rodriguj 3:bb6fba3e84ff 803 if ( fb[(y/8)*128+x] & (1<<(y%8)) )
rodriguj 3:bb6fba3e84ff 804 return true;
rodriguj 3:bb6fba3e84ff 805 else
rodriguj 3:bb6fba3e84ff 806 return false;
rodriguj 3:bb6fba3e84ff 807 }
rodriguj 3:bb6fba3e84ff 808
rodriguj 4:35757c8b7625 809 void SSD1306::line (char x0, char y0, char x1, char y1, PlotStyle mode, bool refresh)
rodriguj 1:c5cf4ca5939f 810 {
rodriguj 1:c5cf4ca5939f 811 int dx = abs (x1 - x0), sx = x0 < x1 ? 1 : -1;
rodriguj 1:c5cf4ca5939f 812 int dy = -abs (y1 - y0), sy = y0 < y1 ? 1 : -1;
rodriguj 1:c5cf4ca5939f 813 int err = dx + dy, e2; /* error value e_xy */
rodriguj 1:c5cf4ca5939f 814
rodriguj 2:7f1160c1a741 815 for (;;) {
rodriguj 2:7f1160c1a741 816 /* loop */
rodriguj 4:35757c8b7625 817 plot (x0, y0, mode, false);
rodriguj 1:c5cf4ca5939f 818 if (x0 == x1 && y0 == y1) break;
rodriguj 1:c5cf4ca5939f 819 e2 = 2 * err;
rodriguj 2:7f1160c1a741 820 if (e2 >= dy) {
rodriguj 2:7f1160c1a741 821 err += dy; /* e_xy+e_x > 0 */
rodriguj 2:7f1160c1a741 822 x0 += sx;
rodriguj 2:7f1160c1a741 823 }
rodriguj 2:7f1160c1a741 824 if (e2 <= dx) {
rodriguj 2:7f1160c1a741 825 err += dx; /* e_xy+e_y < 0 */
rodriguj 2:7f1160c1a741 826 y0 += sy;
rodriguj 2:7f1160c1a741 827 }
rodriguj 1:c5cf4ca5939f 828 }
rodriguj 1:c5cf4ca5939f 829 if (refresh)
rodriguj 8:09b1578f93d9 830 redraw();
rodriguj 1:c5cf4ca5939f 831 }
rodriguj 3:bb6fba3e84ff 832
rodriguj 4:35757c8b7625 833 void SSD1306::circle (char x0, char y0, char r, PlotStyle mode, bool refresh)
rodriguj 3:bb6fba3e84ff 834 {
rodriguj 3:bb6fba3e84ff 835 int x = r-1;
rodriguj 3:bb6fba3e84ff 836 int y = 0;
rodriguj 3:bb6fba3e84ff 837 int dx = 1;
rodriguj 3:bb6fba3e84ff 838 int dy = 1;
rodriguj 3:bb6fba3e84ff 839 int err = dx - 2*r;
rodriguj 3:bb6fba3e84ff 840
rodriguj 3:bb6fba3e84ff 841 while (x >= y)
rodriguj 3:bb6fba3e84ff 842 {
rodriguj 4:35757c8b7625 843 plot (x0 + x, y0 + y, mode);
rodriguj 4:35757c8b7625 844 plot (x0 + y, y0 + x, mode);
rodriguj 4:35757c8b7625 845 plot (x0 - y, y0 + x, mode);
rodriguj 4:35757c8b7625 846 plot (x0 - x, y0 + y, mode);
rodriguj 4:35757c8b7625 847 plot (x0 - x, y0 - y, mode);
rodriguj 4:35757c8b7625 848 plot (x0 - y, y0 - x, mode);
rodriguj 4:35757c8b7625 849 plot (x0 + y, y0 - x, mode);
rodriguj 4:35757c8b7625 850 plot (x0 + x, y0 - y, mode);
rodriguj 3:bb6fba3e84ff 851
rodriguj 3:bb6fba3e84ff 852 if (err <= 0)
rodriguj 3:bb6fba3e84ff 853 {
rodriguj 3:bb6fba3e84ff 854 y++;
rodriguj 3:bb6fba3e84ff 855 err += dy;
rodriguj 3:bb6fba3e84ff 856 dy += 2;
rodriguj 3:bb6fba3e84ff 857 }
rodriguj 3:bb6fba3e84ff 858 if (err > 0)
rodriguj 3:bb6fba3e84ff 859 {
rodriguj 3:bb6fba3e84ff 860 x--;
rodriguj 3:bb6fba3e84ff 861 dx += 2;
rodriguj 3:bb6fba3e84ff 862 err += dx - 2*r;
rodriguj 3:bb6fba3e84ff 863 }
rodriguj 3:bb6fba3e84ff 864 }
rodriguj 3:bb6fba3e84ff 865 if (refresh)
rodriguj 8:09b1578f93d9 866 redraw();
rodriguj 3:bb6fba3e84ff 867 }
rodriguj 8:09b1578f93d9 868
rodriguj 8:09b1578f93d9 869 void SSD1306::fill (char x, char y, bool refresh)
rodriguj 8:09b1578f93d9 870 {
rodriguj 8:09b1578f93d9 871 unsigned char rqueue = 0, wqueue = 1;
rodriguj 8:09b1578f93d9 872 char *qpixel_x = new char[256];
rodriguj 8:09b1578f93d9 873 char *qpixel_y = new char[256];
rodriguj 8:09b1578f93d9 874
rodriguj 8:09b1578f93d9 875 if (!qpixel_x || !qpixel_y)
rodriguj 8:09b1578f93d9 876 {
rodriguj 8:09b1578f93d9 877 if (qpixel_x) delete[] qpixel_x;
rodriguj 8:09b1578f93d9 878 if (qpixel_y) delete[] qpixel_y;
rodriguj 8:09b1578f93d9 879 printf ("SSD1306::fill ERROR. Not enough memory\r\n");
rodriguj 8:09b1578f93d9 880 return;
rodriguj 8:09b1578f93d9 881 }
rodriguj 8:09b1578f93d9 882
rodriguj 8:09b1578f93d9 883 qpixel_x[0] = x;
rodriguj 8:09b1578f93d9 884 qpixel_y[0] = y;
rodriguj 9:57209a7e9cba 885 plot (x, y, SSD1306::Normal);
rodriguj 8:09b1578f93d9 886 while (wqueue != rqueue)
rodriguj 8:09b1578f93d9 887 {
rodriguj 8:09b1578f93d9 888 x = qpixel_x[rqueue];
rodriguj 8:09b1578f93d9 889 y = qpixel_y[rqueue];
rodriguj 8:09b1578f93d9 890 rqueue++;
rodriguj 8:09b1578f93d9 891
rodriguj 9:57209a7e9cba 892 if (x!=127 && !point (x+1,y))
rodriguj 8:09b1578f93d9 893 {
rodriguj 9:57209a7e9cba 894 plot (x+1, y, SSD1306::Normal);
rodriguj 8:09b1578f93d9 895 qpixel_x[wqueue] = x+1;
rodriguj 8:09b1578f93d9 896 qpixel_y[wqueue] = y;
rodriguj 8:09b1578f93d9 897 wqueue++;
rodriguj 8:09b1578f93d9 898 }
rodriguj 8:09b1578f93d9 899
rodriguj 9:57209a7e9cba 900 if (x!=0 && !point (x-1,y))
rodriguj 8:09b1578f93d9 901 {
rodriguj 9:57209a7e9cba 902 plot (x-1, y, SSD1306::Normal);
rodriguj 8:09b1578f93d9 903 qpixel_x[wqueue] = x-1;
rodriguj 8:09b1578f93d9 904 qpixel_y[wqueue] = y;
rodriguj 8:09b1578f93d9 905 wqueue++;
rodriguj 8:09b1578f93d9 906 }
rodriguj 8:09b1578f93d9 907
rodriguj 9:57209a7e9cba 908 if (y!=63 && !point (x,y+1))
rodriguj 8:09b1578f93d9 909 {
rodriguj 9:57209a7e9cba 910 plot (x, y+1, SSD1306::Normal);
rodriguj 8:09b1578f93d9 911 qpixel_x[wqueue] = x;
rodriguj 8:09b1578f93d9 912 qpixel_y[wqueue] = y+1;
rodriguj 8:09b1578f93d9 913 wqueue++;
rodriguj 8:09b1578f93d9 914 }
rodriguj 8:09b1578f93d9 915
rodriguj 9:57209a7e9cba 916 if (y!=0 && !point (x,y-1))
rodriguj 8:09b1578f93d9 917 {
rodriguj 9:57209a7e9cba 918 plot (x, y-1, SSD1306::Normal);
rodriguj 8:09b1578f93d9 919 qpixel_x[wqueue] = x;
rodriguj 8:09b1578f93d9 920 qpixel_y[wqueue] = y-1;
rodriguj 8:09b1578f93d9 921 wqueue++;
rodriguj 8:09b1578f93d9 922 }
rodriguj 8:09b1578f93d9 923 }
rodriguj 8:09b1578f93d9 924 delete[] qpixel_x;
rodriguj 8:09b1578f93d9 925 delete[] qpixel_y;
rodriguj 8:09b1578f93d9 926
rodriguj 8:09b1578f93d9 927 if (refresh)
rodriguj 8:09b1578f93d9 928 redraw();
rodriguj 8:09b1578f93d9 929 }