58 lines
2.7 KiB
C
58 lines
2.7 KiB
C
/*
|
|
* Tiny4kOLED - Drivers for SSD1306 controlled dot matrix OLED/PLED 128x32 displays
|
|
*
|
|
* Based on ssd1306xled, re-written and extended by Stephen Denne
|
|
* from 2017-04-25 at https://github.com/datacute/Tiny4kOLED
|
|
*
|
|
*/
|
|
/*
|
|
* SSD1306xLED - Drivers for SSD1306 controlled dot matrix OLED/PLED 128x64 displays
|
|
*
|
|
* @created: 2014-08-12
|
|
* @author: Neven Boyanov
|
|
*
|
|
* Source code available at: https://bitbucket.org/tinusaur/ssd1306xled
|
|
*
|
|
* Reduced to the characters needed for the USB Tester 2020 by Stefan Wagner
|
|
* https://easyeda.com/wagiminator
|
|
*/
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
#include <avr/pgmspace.h>
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
/* Standard ASCII 8x16 font */
|
|
const uint8_t ssd1306xled_font8x16a [] PROGMEM = {
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01, // ) 41 = -
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // * 42 = SPACE
|
|
0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20, // + 43 = A
|
|
0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00, // , 44 = V
|
|
0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00, // - 45 = W
|
|
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F, // . 46 = m
|
|
0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20, // / 47 = h
|
|
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00, // 0 48
|
|
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, // 1 49
|
|
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00, // 2 50
|
|
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00, // 3 51
|
|
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00, // 4 52
|
|
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00, // 5 53
|
|
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00, // 6 54
|
|
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00, // 7 55
|
|
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00, // 8 56
|
|
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00, // 9 57
|
|
};
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
const DCfont TinyOLED4kfont8x16a = {
|
|
(uint8_t *)ssd1306xled_font8x16a,
|
|
8, // character width in pixels
|
|
2, // character height in pages (8 pixels)
|
|
41,57 // ASCII extents
|
|
};
|
|
|
|
// for backwards compatibility
|
|
#define FONT8X16A (&TinyOLED4kfont8x16a)
|